inital commit

This commit is contained in:
2026-01-01 15:25:19 +05:30
commit f0ae49465a
36361 changed files with 4894111 additions and 0 deletions

14
node_modules/jodit/esm/plugins/indent/config.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
declare module 'jodit/config' {
interface Config {
/**
* The number of pixels to use for indenting the current line.
*/
indentMargin: number;
}
}
export {};

31
node_modules/jodit/esm/plugins/indent/config.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
import { Dom } from "../../core/dom/index.js";
import { Icon } from "../../core/ui/icon.js";
import { Config } from "../../config.js";
import indentIcon from "./icons/indent.svg.js";
import outdentIcon from "./icons/outdent.svg.js";
import { getKey } from "./helpers.js";
Icon.set('indent', indentIcon).set('outdent', outdentIcon);
Config.prototype.controls.indent = {
tooltip: 'Increase Indent'
};
Config.prototype.controls.outdent = {
isDisabled: (editor) => {
const current = editor.s.current();
if (current) {
const currentBox = Dom.closest(current, Dom.isBlock, editor.editor);
if (currentBox) {
const arrow = getKey(editor.o.direction, currentBox);
return (!currentBox.style[arrow] ||
parseInt(currentBox.style[arrow], 10) <= 0);
}
}
return true;
},
tooltip: 'Decrease Indent'
};
Config.prototype.indentMargin = 10;

10
node_modules/jodit/esm/plugins/indent/helpers.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* Get style rule key for current direction
* @internal
*/
export declare const getKey: (direction: string, box: HTMLElement) => "marginLeft" | "marginRight" | "paddingLeft" | "paddingRight";

14
node_modules/jodit/esm/plugins/indent/helpers.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* @module plugins/indent
*/
import { Dom } from "../../core/dom/dom.js";
/**
* Get style rule key for current direction
* @internal
*/
export const getKey = (direction, box) => `${Dom.isCell(box) ? 'padding' : 'margin'}${direction === 'rtl' ? 'Right' : 'Left'}`;

View File

@@ -0,0 +1 @@
export default "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 1792\"> <path d=\"M352 832q0 14-9 23l-288 288q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-576q0-13 9.5-22.5t22.5-9.5q14 0 23 9l288 288q9 9 9 23zm1440 480v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z\"/> </svg> ";

View File

@@ -0,0 +1 @@
export default "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 1792\"> <path d=\"M384 544v576q0 13-9.5 22.5t-22.5 9.5q-14 0-23-9l-288-288q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5t9.5 22.5zm1408 768v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z\"/> </svg> ";

16
node_modules/jodit/esm/plugins/indent/indent.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* [[include:plugins/indent/README.md]]
* @packageDocumentation
* @module plugins/indent
*/
import type { IJodit } from "../../types/index";
import "./config";
/**
* Indents the line containing the selection or insertion point.
*/
export declare function indent(editor: IJodit): void;

80
node_modules/jodit/esm/plugins/indent/indent.js generated vendored Normal file
View File

@@ -0,0 +1,80 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
import { BR } from "../../core/constants.js";
import { Dom } from "../../core/dom/index.js";
import { pluginSystem } from "../../core/global.js";
import { attr, call } from "../../core/helpers/utils/index.js";
import "./config.js";
import { getKey } from "./helpers.js";
const applyIndentToBox = (processedElements, currentBox, editor, command) => {
if (!currentBox) {
return;
}
if (processedElements.has(currentBox)) {
return;
}
const key = getKey(editor.o.direction, currentBox);
processedElements.add(currentBox);
let value = currentBox.style[key] ? parseInt(currentBox.style[key], 10) : 0;
value += editor.o.indentMargin * (command === 'outdent' ? -1 : 1);
currentBox.style[key] = value > 0 ? value + 'px' : '';
if (!attr(currentBox, 'style')) {
attr(currentBox, 'style', null);
}
};
/**
* Indents the line containing the selection or insertion point.
*/
export function indent(editor) {
editor
.registerButton({
name: 'indent',
group: 'indent'
})
.registerButton({
name: 'outdent',
group: 'indent'
});
const indentCommand = (command) => {
const processedElements = new Set();
const { enter, enterBlock } = editor.o;
const isBrMode = enter.toLowerCase() === BR;
const current = editor.s.current();
if (isBrMode && editor.s.isCollapsed()) {
if (current) {
const box = Dom.wrapNextInline(current, enterBlock, editor);
applyIndentToBox(processedElements, box, editor, command);
return false;
}
}
editor.s.eachSelection((current) => {
editor.s.save();
let currentBox = current
? Dom.up(current, Dom.isBlock, editor.editor)
: false;
if (!currentBox && current) {
currentBox = call(!isBrMode ? Dom.wrapInline : Dom.wrapNextInline, current, !isBrMode ? enter.toLowerCase() : enterBlock, editor);
}
if (!currentBox) {
editor.s.restore();
return false;
}
applyIndentToBox(processedElements, currentBox, editor, command);
editor.s.restore();
});
editor.synchronizeValues();
return false;
};
editor.registerCommand('indent', {
exec: indentCommand,
hotkeys: ['ctrl+]', 'cmd+]']
});
editor.registerCommand('outdent', {
exec: indentCommand,
hotkeys: ['ctrl+[', 'cmd+[']
});
}
pluginSystem.add('indent', indent);