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

11
node_modules/jodit/esm/plugins/font/config.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
/*!
* 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 {
defaultFontSizePoints: 'px' | 'pt';
}
}
export {};

117
node_modules/jodit/esm/plugins/font/config.js generated vendored Normal file
View File

@@ -0,0 +1,117 @@
/*!
* 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 { trimChars } from "../../core/helpers/string/trim.js";
import { css } from "../../core/helpers/utils/css.js";
import { Icon } from "../../core/ui/icon.js";
import { Config } from "../../config.js";
import fontIcon from "./icons/font.svg.js";
import fontsizeIcon from "./icons/fontsize.svg.js";
/**
* Default font-size points
*/
Config.prototype.defaultFontSizePoints = 'px';
Icon.set('font', fontIcon).set('fontsize', fontsizeIcon);
Config.prototype.controls.fontsize = {
command: 'fontsize',
data: {
cssRule: 'font-size',
normalise: (v, editor) => {
if (/pt$/i.test(v) && editor.o.defaultFontSizePoints === 'pt') {
return v.replace(/pt$/i, '');
}
return v;
}
},
list: [8, 9, 10, 11, 12, 14, 16, 18, 24, 30, 32, 34, 36, 48, 60, 72, 96],
textTemplate: (editor, value) => {
return value + editor.o.defaultFontSizePoints;
},
childTemplate: (editor, key, value) => {
return `${value}${editor.o.defaultFontSizePoints}`;
},
tooltip: 'Font size',
value: (editor, button) => {
var _a;
const current = editor.s.current();
if (!current) {
return;
}
const box = Dom.closest(current, Dom.isElement, editor.editor);
if (!box) {
return;
}
const control = button.control;
const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
const value = css(box, cssKey);
return value.toString();
},
isChildActive: (editor, button) => {
var _a, _b;
const value = button.state.value;
const normalize = (_b = (_a = button.control.data) === null || _a === void 0 ? void 0 : _a.normalize) !== null && _b !== void 0 ? _b : ((v) => v);
return Boolean(value &&
button.control.args &&
normalize(button.control.args[0].toString()) ===
normalize(value.toString()));
},
isActive: (editor, button) => {
var _a, _b;
const value = button.state.value;
if (!value) {
return false;
}
const normalize = (_b = (_a = button.control.data) === null || _a === void 0 ? void 0 : _a.normalize) !== null && _b !== void 0 ? _b : ((v) => v);
let keySet = button.control.data.cacheListSet;
if (!keySet) {
const keys = Object.keys(button.control.list).map(normalize);
keySet = new Set(keys);
button.control.data.cacheListSet = keySet;
}
return keySet.has(normalize(value.toString()));
}
};
Config.prototype.controls.font = {
...Config.prototype.controls.fontsize,
command: 'fontname',
textTemplate: (j, value) => {
const [first] = value.split(',');
return trimChars(first, '"\'');
},
list: {
'': 'Default',
'Arial, Helvetica, sans-serif': 'Arial',
"'Courier New', Courier, monospace": 'Courier New',
'Georgia, Palatino, serif': 'Georgia',
"'Lucida Sans Unicode', 'Lucida Grande', sans-serif": 'Lucida Sans Unicode',
'Tahoma, Geneva, sans-serif': 'Tahoma',
"'Times New Roman', Times, serif": 'Times New Roman',
"'Trebuchet MS', Helvetica, sans-serif": 'Trebuchet MS',
'Helvetica, sans-serif': 'Helvetica',
'Impact, Charcoal, sans-serif': 'Impact',
'Verdana, Geneva, sans-serif': 'Verdana'
},
childTemplate: (editor, key, value) => {
let isAvailable = false;
try {
isAvailable =
key.indexOf('dings') === -1 &&
document.fonts.check(`16px ${key}`, value);
}
catch (_a) { }
return `<span data-style="${key}" style="${isAvailable ? `font-family: ${key}!important;` : ''}">${value}</span>`;
},
data: {
cssRule: 'font-family',
normalize: (v) => {
return v
.toLowerCase()
.replace(/['"]+/g, '')
.replace(/[^a-z0-9-]+/g, ',');
}
},
tooltip: 'Font family'
};

16
node_modules/jodit/esm/plugins/font/font.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/font/README.md]]
* @packageDocumentation
* @module plugins/font
*/
import type { IJodit } from "../../types/index";
import "./config";
/**
* Process commands `fontsize` and `fontname`
*/
export declare function font(editor: IJodit): void;

50
node_modules/jodit/esm/plugins/font/font.js generated vendored Normal file
View File

@@ -0,0 +1,50 @@
/*!
* 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 { pluginSystem } from "../../core/global.js";
import { normalizeSize } from "../../core/helpers/index.js";
import "./config.js";
/**
* Process commands `fontsize` and `fontname`
*/
export function font(editor) {
editor
.registerButton({
name: 'font',
group: 'font'
})
.registerButton({
name: 'fontsize',
group: 'font'
});
const callback = (command, second, third) => {
switch (command) {
case 'fontsize':
editor.s.commitStyle({
attributes: {
style: {
fontSize: normalizeSize(third, editor.o.defaultFontSizePoints)
}
}
});
break;
case 'fontname':
editor.s.commitStyle({
attributes: {
style: {
fontFamily: third
}
}
});
break;
}
editor.synchronizeValues();
return false;
};
editor
.registerCommand('fontsize', callback)
.registerCommand('fontname', callback);
}
pluginSystem.add('font', font);

View File

@@ -0,0 +1 @@
export default "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 1792\"> <path d=\"M789 559l-170 450q33 0 136.5 2t160.5 2q19 0 57-2-87-253-184-452zm-725 1105l2-79q23-7 56-12.5t57-10.5 49.5-14.5 44.5-29 31-50.5l237-616 280-724h128q8 14 11 21l205 480q33 78 106 257.5t114 274.5q15 34 58 144.5t72 168.5q20 45 35 57 19 15 88 29.5t84 20.5q6 38 6 57 0 4-.5 13t-.5 13q-63 0-190-8t-191-8q-76 0-215 7t-178 8q0-43 4-78l131-28q1 0 12.5-2.5t15.5-3.5 14.5-4.5 15-6.5 11-8 9-11 2.5-14q0-16-31-96.5t-72-177.5-42-100l-450-2q-26 58-76.5 195.5t-50.5 162.5q0 22 14 37.5t43.5 24.5 48.5 13.5 57 8.5 41 4q1 19 1 58 0 9-2 27-58 0-174.5-10t-174.5-10q-8 0-26.5 4t-21.5 4q-80 14-188 14z\"/> </svg> ";

View File

@@ -0,0 +1 @@
export default "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 1792\"> <path d=\"M1744 1408q33 0 42 18.5t-11 44.5l-126 162q-20 26-49 26t-49-26l-126-162q-20-26-11-44.5t42-18.5h80v-1024h-80q-33 0-42-18.5t11-44.5l126-162q20-26 49-26t49 26l126 162q20 26 11 44.5t-42 18.5h-80v1024h80zm-1663-1279l54 27q12 5 211 5 44 0 132-2t132-2q36 0 107.5.5t107.5.5h293q6 0 21 .5t20.5 0 16-3 17.5-9 15-17.5l42-1q4 0 14 .5t14 .5q2 112 2 336 0 80-5 109-39 14-68 18-25-44-54-128-3-9-11-48t-14.5-73.5-7.5-35.5q-6-8-12-12.5t-15.5-6-13-2.5-18-.5-16.5.5q-17 0-66.5-.5t-74.5-.5-64 2-71 6q-9 81-8 136 0 94 2 388t2 455q0 16-2.5 71.5t0 91.5 12.5 69q40 21 124 42.5t120 37.5q5 40 5 50 0 14-3 29l-34 1q-76 2-218-8t-207-10q-50 0-151 9t-152 9q-3-51-3-52v-9q17-27 61.5-43t98.5-29 78-27q19-42 19-383 0-101-3-303t-3-303v-117q0-2 .5-15.5t.5-25-1-25.5-3-24-5-14q-11-12-162-12-33 0-93 12t-80 26q-19 13-34 72.5t-31.5 111-42.5 53.5q-42-26-56-44v-383z\"/> </svg> ";