first commit
This commit is contained in:
7
public/assets/quill/ui/color-picker.d.ts
vendored
Normal file
7
public/assets/quill/ui/color-picker.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import Picker from './picker.js';
|
||||
declare class ColorPicker extends Picker {
|
||||
constructor(select: HTMLSelectElement, label: string);
|
||||
buildItem(option: HTMLOptionElement): HTMLSpanElement;
|
||||
selectItem(item: HTMLElement | null, trigger?: boolean): void;
|
||||
}
|
||||
export default ColorPicker;
|
||||
30
public/assets/quill/ui/color-picker.js
Normal file
30
public/assets/quill/ui/color-picker.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import Picker from './picker.js';
|
||||
class ColorPicker extends Picker {
|
||||
constructor(select, label) {
|
||||
super(select);
|
||||
this.label.innerHTML = label;
|
||||
this.container.classList.add('ql-color-picker');
|
||||
Array.from(this.container.querySelectorAll('.ql-picker-item')).slice(0, 7).forEach(item => {
|
||||
item.classList.add('ql-primary');
|
||||
});
|
||||
}
|
||||
buildItem(option) {
|
||||
const item = super.buildItem(option);
|
||||
item.style.backgroundColor = option.getAttribute('value') || '';
|
||||
return item;
|
||||
}
|
||||
selectItem(item, trigger) {
|
||||
super.selectItem(item, trigger);
|
||||
const colorLabel = this.label.querySelector('.ql-color-label');
|
||||
const value = item ? item.getAttribute('data-value') || '' : '';
|
||||
if (colorLabel) {
|
||||
if (colorLabel.tagName === 'line') {
|
||||
colorLabel.style.stroke = value;
|
||||
} else {
|
||||
colorLabel.style.fill = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
export default ColorPicker;
|
||||
//# sourceMappingURL=color-picker.js.map
|
||||
1
public/assets/quill/ui/color-picker.js.map
Normal file
1
public/assets/quill/ui/color-picker.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"color-picker.js","names":["Picker","ColorPicker","constructor","select","label","innerHTML","container","classList","add","Array","from","querySelectorAll","slice","forEach","item","buildItem","option","style","backgroundColor","getAttribute","selectItem","trigger","colorLabel","querySelector","value","tagName","stroke","fill"],"sources":["../../src/ui/color-picker.ts"],"sourcesContent":["import Picker from './picker.js';\n\nclass ColorPicker extends Picker {\n constructor(select: HTMLSelectElement, label: string) {\n super(select);\n this.label.innerHTML = label;\n this.container.classList.add('ql-color-picker');\n Array.from(this.container.querySelectorAll('.ql-picker-item'))\n .slice(0, 7)\n .forEach((item) => {\n item.classList.add('ql-primary');\n });\n }\n\n buildItem(option: HTMLOptionElement) {\n const item = super.buildItem(option);\n item.style.backgroundColor = option.getAttribute('value') || '';\n return item;\n }\n\n selectItem(item: HTMLElement | null, trigger?: boolean) {\n super.selectItem(item, trigger);\n const colorLabel = this.label.querySelector<HTMLElement>('.ql-color-label');\n const value = item ? item.getAttribute('data-value') || '' : '';\n if (colorLabel) {\n if (colorLabel.tagName === 'line') {\n colorLabel.style.stroke = value;\n } else {\n colorLabel.style.fill = value;\n }\n }\n }\n}\n\nexport default ColorPicker;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,aAAa;AAEhC,MAAMC,WAAW,SAASD,MAAM,CAAC;EAC/BE,WAAWA,CAACC,MAAyB,EAAEC,KAAa,EAAE;IACpD,KAAK,CAACD,MAAM,CAAC;IACb,IAAI,CAACC,KAAK,CAACC,SAAS,GAAGD,KAAK;IAC5B,IAAI,CAACE,SAAS,CAACC,SAAS,CAACC,GAAG,CAAC,iBAAiB,CAAC;IAC/CC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACJ,SAAS,CAACK,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAC3DC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CACXC,OAAO,CAAEC,IAAI,IAAK;MACjBA,IAAI,CAACP,SAAS,CAACC,GAAG,CAAC,YAAY,CAAC;IAClC,CAAC,CAAC;EACN;EAEAO,SAASA,CAACC,MAAyB,EAAE;IACnC,MAAMF,IAAI,GAAG,KAAK,CAACC,SAAS,CAACC,MAAM,CAAC;IACpCF,IAAI,CAACG,KAAK,CAACC,eAAe,GAAGF,MAAM,CAACG,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE;IAC/D,OAAOL,IAAI;EACb;EAEAM,UAAUA,CAACN,IAAwB,EAAEO,OAAiB,EAAE;IACtD,KAAK,CAACD,UAAU,CAACN,IAAI,EAAEO,OAAO,CAAC;IAC/B,MAAMC,UAAU,GAAG,IAAI,CAAClB,KAAK,CAACmB,aAAa,CAAc,iBAAiB,CAAC;IAC3E,MAAMC,KAAK,GAAGV,IAAI,GAAGA,IAAI,CAACK,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,EAAE;IAC/D,IAAIG,UAAU,EAAE;MACd,IAAIA,UAAU,CAACG,OAAO,KAAK,MAAM,EAAE;QACjCH,UAAU,CAACL,KAAK,CAACS,MAAM,GAAGF,KAAK;MACjC,CAAC,MAAM;QACLF,UAAU,CAACL,KAAK,CAACU,IAAI,GAAGH,KAAK;MAC/B;IACF;EACF;AACF;AAEA,eAAevB,WAAW","ignoreList":[]}
|
||||
7
public/assets/quill/ui/icon-picker.d.ts
vendored
Normal file
7
public/assets/quill/ui/icon-picker.d.ts
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import Picker from './picker.js';
|
||||
declare class IconPicker extends Picker {
|
||||
defaultItem: HTMLElement | null;
|
||||
constructor(select: HTMLSelectElement, icons: Record<string, string>);
|
||||
selectItem(target: HTMLElement | null, trigger?: boolean): void;
|
||||
}
|
||||
export default IconPicker;
|
||||
22
public/assets/quill/ui/icon-picker.js
Normal file
22
public/assets/quill/ui/icon-picker.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import Picker from './picker.js';
|
||||
class IconPicker extends Picker {
|
||||
constructor(select, icons) {
|
||||
super(select);
|
||||
this.container.classList.add('ql-icon-picker');
|
||||
Array.from(this.container.querySelectorAll('.ql-picker-item')).forEach(item => {
|
||||
item.innerHTML = icons[item.getAttribute('data-value') || ''];
|
||||
});
|
||||
this.defaultItem = this.container.querySelector('.ql-selected');
|
||||
this.selectItem(this.defaultItem);
|
||||
}
|
||||
selectItem(target, trigger) {
|
||||
super.selectItem(target, trigger);
|
||||
const item = target || this.defaultItem;
|
||||
if (item != null) {
|
||||
if (this.label.innerHTML === item.innerHTML) return;
|
||||
this.label.innerHTML = item.innerHTML;
|
||||
}
|
||||
}
|
||||
}
|
||||
export default IconPicker;
|
||||
//# sourceMappingURL=icon-picker.js.map
|
||||
1
public/assets/quill/ui/icon-picker.js.map
Normal file
1
public/assets/quill/ui/icon-picker.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"icon-picker.js","names":["Picker","IconPicker","constructor","select","icons","container","classList","add","Array","from","querySelectorAll","forEach","item","innerHTML","getAttribute","defaultItem","querySelector","selectItem","target","trigger","label"],"sources":["../../src/ui/icon-picker.ts"],"sourcesContent":["import Picker from './picker.js';\n\nclass IconPicker extends Picker {\n defaultItem: HTMLElement | null;\n\n constructor(select: HTMLSelectElement, icons: Record<string, string>) {\n super(select);\n this.container.classList.add('ql-icon-picker');\n Array.from(this.container.querySelectorAll('.ql-picker-item')).forEach(\n (item) => {\n item.innerHTML = icons[item.getAttribute('data-value') || ''];\n },\n );\n this.defaultItem = this.container.querySelector('.ql-selected');\n this.selectItem(this.defaultItem);\n }\n\n selectItem(target: HTMLElement | null, trigger?: boolean) {\n super.selectItem(target, trigger);\n const item = target || this.defaultItem;\n if (item != null) {\n if (this.label.innerHTML === item.innerHTML) return;\n this.label.innerHTML = item.innerHTML;\n }\n }\n}\n\nexport default IconPicker;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,aAAa;AAEhC,MAAMC,UAAU,SAASD,MAAM,CAAC;EAG9BE,WAAWA,CAACC,MAAyB,EAAEC,KAA6B,EAAE;IACpE,KAAK,CAACD,MAAM,CAAC;IACb,IAAI,CAACE,SAAS,CAACC,SAAS,CAACC,GAAG,CAAC,gBAAgB,CAAC;IAC9CC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACJ,SAAS,CAACK,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAACC,OAAO,CACnEC,IAAI,IAAK;MACRA,IAAI,CAACC,SAAS,GAAGT,KAAK,CAACQ,IAAI,CAACE,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC;IAC/D,CACF,CAAC;IACD,IAAI,CAACC,WAAW,GAAG,IAAI,CAACV,SAAS,CAACW,aAAa,CAAC,cAAc,CAAC;IAC/D,IAAI,CAACC,UAAU,CAAC,IAAI,CAACF,WAAW,CAAC;EACnC;EAEAE,UAAUA,CAACC,MAA0B,EAAEC,OAAiB,EAAE;IACxD,KAAK,CAACF,UAAU,CAACC,MAAM,EAAEC,OAAO,CAAC;IACjC,MAAMP,IAAI,GAAGM,MAAM,IAAI,IAAI,CAACH,WAAW;IACvC,IAAIH,IAAI,IAAI,IAAI,EAAE;MAChB,IAAI,IAAI,CAACQ,KAAK,CAACP,SAAS,KAAKD,IAAI,CAACC,SAAS,EAAE;MAC7C,IAAI,CAACO,KAAK,CAACP,SAAS,GAAGD,IAAI,CAACC,SAAS;IACvC;EACF;AACF;AAEA,eAAeZ,UAAU","ignoreList":[]}
|
||||
49
public/assets/quill/ui/icons.d.ts
vendored
Normal file
49
public/assets/quill/ui/icons.d.ts
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
declare const _default: {
|
||||
align: {
|
||||
'': string;
|
||||
center: string;
|
||||
right: string;
|
||||
justify: string;
|
||||
};
|
||||
background: string;
|
||||
blockquote: string;
|
||||
bold: string;
|
||||
clean: string;
|
||||
code: string;
|
||||
'code-block': string;
|
||||
color: string;
|
||||
direction: {
|
||||
'': string;
|
||||
rtl: string;
|
||||
};
|
||||
formula: string;
|
||||
header: {
|
||||
'1': string;
|
||||
'2': string;
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
'6': string;
|
||||
};
|
||||
italic: string;
|
||||
image: string;
|
||||
indent: {
|
||||
'+1': string;
|
||||
'-1': string;
|
||||
};
|
||||
link: string;
|
||||
list: {
|
||||
bullet: string;
|
||||
check: string;
|
||||
ordered: string;
|
||||
};
|
||||
script: {
|
||||
sub: string;
|
||||
super: string;
|
||||
};
|
||||
strike: string;
|
||||
table: string;
|
||||
underline: string;
|
||||
video: string;
|
||||
};
|
||||
export default _default;
|
||||
82
public/assets/quill/ui/icons.js
Normal file
82
public/assets/quill/ui/icons.js
Normal file
@@ -0,0 +1,82 @@
|
||||
const alignLeftIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"3\" x2=\"15\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"13\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"9\" y1=\"4\" y2=\"4\"/></svg>";
|
||||
const alignCenterIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"15\" x2=\"3\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"14\" x2=\"4\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"12\" x2=\"6\" y1=\"4\" y2=\"4\"/></svg>";
|
||||
const alignRightIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"15\" x2=\"3\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"15\" x2=\"5\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"15\" x2=\"9\" y1=\"4\" y2=\"4\"/></svg>";
|
||||
const alignJustifyIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"15\" x2=\"3\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"15\" x2=\"3\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"15\" x2=\"3\" y1=\"4\" y2=\"4\"/></svg>";
|
||||
const backgroundIcon = "<svg viewbox=\"0 0 18 18\"><g class=\"ql-fill ql-color-label\"><polygon points=\"6 6.868 6 6 5 6 5 7 5.942 7 6 6.868\"/><rect height=\"1\" width=\"1\" x=\"4\" y=\"4\"/><polygon points=\"6.817 5 6 5 6 6 6.38 6 6.817 5\"/><rect height=\"1\" width=\"1\" x=\"2\" y=\"6\"/><rect height=\"1\" width=\"1\" x=\"3\" y=\"5\"/><rect height=\"1\" width=\"1\" x=\"4\" y=\"7\"/><polygon points=\"4 11.439 4 11 3 11 3 12 3.755 12 4 11.439\"/><rect height=\"1\" width=\"1\" x=\"2\" y=\"12\"/><rect height=\"1\" width=\"1\" x=\"2\" y=\"9\"/><rect height=\"1\" width=\"1\" x=\"2\" y=\"15\"/><polygon points=\"4.63 10 4 10 4 11 4.192 11 4.63 10\"/><rect height=\"1\" width=\"1\" x=\"3\" y=\"8\"/><path d=\"M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z\"/><path d=\"M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z\"/><path d=\"M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z\"/><rect height=\"1\" width=\"1\" x=\"12\" y=\"2\"/><rect height=\"1\" width=\"1\" x=\"11\" y=\"3\"/><path d=\"M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z\"/><rect height=\"1\" width=\"1\" x=\"2\" y=\"3\"/><rect height=\"1\" width=\"1\" x=\"6\" y=\"2\"/><rect height=\"1\" width=\"1\" x=\"3\" y=\"2\"/><rect height=\"1\" width=\"1\" x=\"5\" y=\"3\"/><rect height=\"1\" width=\"1\" x=\"9\" y=\"2\"/><rect height=\"1\" width=\"1\" x=\"15\" y=\"14\"/><polygon points=\"13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174\"/><rect height=\"1\" width=\"1\" x=\"13\" y=\"7\"/><rect height=\"1\" width=\"1\" x=\"15\" y=\"5\"/><rect height=\"1\" width=\"1\" x=\"14\" y=\"6\"/><rect height=\"1\" width=\"1\" x=\"15\" y=\"8\"/><rect height=\"1\" width=\"1\" x=\"14\" y=\"9\"/><path d=\"M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z\"/><rect height=\"1\" width=\"1\" x=\"14\" y=\"3\"/><polygon points=\"12 6.868 12 6 11.62 6 12 6.868\"/><rect height=\"1\" width=\"1\" x=\"15\" y=\"2\"/><rect height=\"1\" width=\"1\" x=\"12\" y=\"5\"/><rect height=\"1\" width=\"1\" x=\"13\" y=\"4\"/><polygon points=\"12.933 9 13 9 13 8 12.495 8 12.933 9\"/><rect height=\"1\" width=\"1\" x=\"9\" y=\"14\"/><rect height=\"1\" width=\"1\" x=\"8\" y=\"15\"/><path d=\"M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z\"/><rect height=\"1\" width=\"1\" x=\"5\" y=\"15\"/><path d=\"M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z\"/><rect height=\"1\" width=\"1\" x=\"11\" y=\"15\"/><path d=\"M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z\"/><rect height=\"1\" width=\"1\" x=\"14\" y=\"15\"/><rect height=\"1\" width=\"1\" x=\"15\" y=\"11\"/></g><polyline class=\"ql-stroke\" points=\"5.5 13 9 5 12.5 13\"/><line class=\"ql-stroke\" x1=\"11.63\" x2=\"6.38\" y1=\"11\" y2=\"11\"/></svg>";
|
||||
const blockquoteIcon = "<svg viewbox=\"0 0 18 18\"><rect class=\"ql-fill ql-stroke\" height=\"3\" width=\"3\" x=\"4\" y=\"5\"/><rect class=\"ql-fill ql-stroke\" height=\"3\" width=\"3\" x=\"11\" y=\"5\"/><path class=\"ql-even ql-fill ql-stroke\" d=\"M7,8c0,4.031-3,5-3,5\"/><path class=\"ql-even ql-fill ql-stroke\" d=\"M14,8c0,4.031-3,5-3,5\"/></svg>";
|
||||
const boldIcon = "<svg viewbox=\"0 0 18 18\"><path class=\"ql-stroke\" d=\"M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z\"/><path class=\"ql-stroke\" d=\"M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z\"/></svg>";
|
||||
const cleanIcon = "<svg class=\"\" viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"5\" x2=\"13\" y1=\"3\" y2=\"3\"/><line class=\"ql-stroke\" x1=\"6\" x2=\"9.35\" y1=\"12\" y2=\"3\"/><line class=\"ql-stroke\" x1=\"11\" x2=\"15\" y1=\"11\" y2=\"15\"/><line class=\"ql-stroke\" x1=\"15\" x2=\"11\" y1=\"11\" y2=\"15\"/><rect class=\"ql-fill\" height=\"1\" rx=\"0.5\" ry=\"0.5\" width=\"7\" x=\"2\" y=\"14\"/></svg>";
|
||||
const codeIcon = "<svg viewbox=\"0 0 18 18\"><polyline class=\"ql-even ql-stroke\" points=\"5 7 3 9 5 11\"/><polyline class=\"ql-even ql-stroke\" points=\"13 7 15 9 13 11\"/><line class=\"ql-stroke\" x1=\"10\" x2=\"8\" y1=\"5\" y2=\"13\"/></svg>";
|
||||
const colorIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-color-label ql-stroke ql-transparent\" x1=\"3\" x2=\"15\" y1=\"15\" y2=\"15\"/><polyline class=\"ql-stroke\" points=\"5.5 11 9 3 12.5 11\"/><line class=\"ql-stroke\" x1=\"11.63\" x2=\"6.38\" y1=\"9\" y2=\"9\"/></svg>";
|
||||
const directionLeftToRightIcon = "<svg viewbox=\"0 0 18 18\"><polygon class=\"ql-stroke ql-fill\" points=\"3 11 5 9 3 7 3 11\"/><line class=\"ql-stroke ql-fill\" x1=\"15\" x2=\"11\" y1=\"4\" y2=\"4\"/><path class=\"ql-fill\" d=\"M11,3a3,3,0,0,0,0,6h1V3H11Z\"/><rect class=\"ql-fill\" height=\"11\" width=\"1\" x=\"11\" y=\"4\"/><rect class=\"ql-fill\" height=\"11\" width=\"1\" x=\"13\" y=\"4\"/></svg>";
|
||||
const directionRightToLeftIcon = "<svg viewbox=\"0 0 18 18\"><polygon class=\"ql-stroke ql-fill\" points=\"15 12 13 10 15 8 15 12\"/><line class=\"ql-stroke ql-fill\" x1=\"9\" x2=\"5\" y1=\"4\" y2=\"4\"/><path class=\"ql-fill\" d=\"M5,3A3,3,0,0,0,5,9H6V3H5Z\"/><rect class=\"ql-fill\" height=\"11\" width=\"1\" x=\"5\" y=\"4\"/><rect class=\"ql-fill\" height=\"11\" width=\"1\" x=\"7\" y=\"4\"/></svg>";
|
||||
const formulaIcon = "<svg viewbox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z\"/><rect class=\"ql-fill\" height=\"1.6\" rx=\"0.8\" ry=\"0.8\" width=\"5\" x=\"5.15\" y=\"6.2\"/><path class=\"ql-fill\" d=\"M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z\"/></svg>";
|
||||
const headerIcon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z\"/></svg>";
|
||||
const header2Icon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z\"/></svg>";
|
||||
const header3Icon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z\"/></svg>";
|
||||
const header4Icon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z\"/></svg>";
|
||||
const header5Icon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z\"/></svg>";
|
||||
const header6Icon = "<svg viewBox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z\"/></svg>";
|
||||
const italicIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"7\" x2=\"13\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"5\" x2=\"11\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"8\" x2=\"10\" y1=\"14\" y2=\"4\"/></svg>";
|
||||
const imageIcon = "<svg viewbox=\"0 0 18 18\"><rect class=\"ql-stroke\" height=\"10\" width=\"12\" x=\"3\" y=\"4\"/><circle class=\"ql-fill\" cx=\"6\" cy=\"7\" r=\"1\"/><polyline class=\"ql-even ql-fill\" points=\"5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12\"/></svg>";
|
||||
const indentIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"3\" x2=\"15\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"15\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"9\" y2=\"9\"/><polyline class=\"ql-fill ql-stroke\" points=\"3 7 3 11 5 9 3 7\"/></svg>";
|
||||
const outdentIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"3\" x2=\"15\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"15\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"9\" y2=\"9\"/><polyline class=\"ql-stroke\" points=\"5 7 5 11 3 9 5 7\"/></svg>";
|
||||
const linkIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"7\" x2=\"11\" y1=\"7\" y2=\"11\"/><path class=\"ql-even ql-stroke\" d=\"M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z\"/><path class=\"ql-even ql-stroke\" d=\"M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z\"/></svg>";
|
||||
const listBulletIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"6\" x2=\"15\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"6\" x2=\"15\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"6\" x2=\"15\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"3\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"3\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"3\" x2=\"3\" y1=\"14\" y2=\"14\"/></svg>";
|
||||
const listCheckIcon = "<svg class=\"\" viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"4\" y2=\"4\"/><polyline class=\"ql-stroke\" points=\"3 4 4 5 6 3\"/><line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"14\" y2=\"14\"/><polyline class=\"ql-stroke\" points=\"3 14 4 15 6 13\"/><line class=\"ql-stroke\" x1=\"9\" x2=\"15\" y1=\"9\" y2=\"9\"/><polyline class=\"ql-stroke\" points=\"3 9 4 10 6 8\"/></svg>";
|
||||
const listOrderedIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke\" x1=\"7\" x2=\"15\" y1=\"4\" y2=\"4\"/><line class=\"ql-stroke\" x1=\"7\" x2=\"15\" y1=\"9\" y2=\"9\"/><line class=\"ql-stroke\" x1=\"7\" x2=\"15\" y1=\"14\" y2=\"14\"/><line class=\"ql-stroke ql-thin\" x1=\"2.5\" x2=\"4.5\" y1=\"5.5\" y2=\"5.5\"/><path class=\"ql-fill\" d=\"M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z\"/><path class=\"ql-stroke ql-thin\" d=\"M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156\"/><path class=\"ql-stroke ql-thin\" d=\"M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109\"/></svg>";
|
||||
const subscriptIcon = "<svg viewbox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z\"/><path class=\"ql-fill\" d=\"M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z\"/></svg>";
|
||||
const superscriptIcon = "<svg viewbox=\"0 0 18 18\"><path class=\"ql-fill\" d=\"M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z\"/><path class=\"ql-fill\" d=\"M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z\"/></svg>";
|
||||
const strikeIcon = "<svg viewbox=\"0 0 18 18\"><line class=\"ql-stroke ql-thin\" x1=\"15.5\" x2=\"2.5\" y1=\"8.5\" y2=\"9.5\"/><path class=\"ql-fill\" d=\"M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z\"/><path class=\"ql-fill\" d=\"M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z\"/></svg>";
|
||||
const tableIcon = "<svg viewbox=\"0 0 18 18\"><rect class=\"ql-stroke\" height=\"12\" width=\"12\" x=\"3\" y=\"3\"/><rect class=\"ql-fill\" height=\"2\" width=\"3\" x=\"5\" y=\"5\"/><rect class=\"ql-fill\" height=\"2\" width=\"4\" x=\"9\" y=\"5\"/><g class=\"ql-fill ql-transparent\"><rect height=\"2\" width=\"3\" x=\"5\" y=\"8\"/><rect height=\"2\" width=\"4\" x=\"9\" y=\"8\"/><rect height=\"2\" width=\"3\" x=\"5\" y=\"11\"/><rect height=\"2\" width=\"4\" x=\"9\" y=\"11\"/></g></svg>";
|
||||
const underlineIcon = "<svg viewbox=\"0 0 18 18\"><path class=\"ql-stroke\" d=\"M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3\"/><rect class=\"ql-fill\" height=\"1\" rx=\"0.5\" ry=\"0.5\" width=\"12\" x=\"3\" y=\"15\"/></svg>";
|
||||
const videoIcon = "<svg viewbox=\"0 0 18 18\"><rect class=\"ql-stroke\" height=\"12\" width=\"12\" x=\"3\" y=\"3\"/><rect class=\"ql-fill\" height=\"12\" width=\"1\" x=\"5\" y=\"3\"/><rect class=\"ql-fill\" height=\"12\" width=\"1\" x=\"12\" y=\"3\"/><rect class=\"ql-fill\" height=\"2\" width=\"8\" x=\"5\" y=\"8\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"3\" y=\"5\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"3\" y=\"7\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"3\" y=\"10\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"3\" y=\"12\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"12\" y=\"5\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"12\" y=\"7\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"12\" y=\"10\"/><rect class=\"ql-fill\" height=\"1\" width=\"3\" x=\"12\" y=\"12\"/></svg>";
|
||||
export default {
|
||||
align: {
|
||||
'': alignLeftIcon,
|
||||
center: alignCenterIcon,
|
||||
right: alignRightIcon,
|
||||
justify: alignJustifyIcon
|
||||
},
|
||||
background: backgroundIcon,
|
||||
blockquote: blockquoteIcon,
|
||||
bold: boldIcon,
|
||||
clean: cleanIcon,
|
||||
code: codeIcon,
|
||||
'code-block': codeIcon,
|
||||
color: colorIcon,
|
||||
direction: {
|
||||
'': directionLeftToRightIcon,
|
||||
rtl: directionRightToLeftIcon
|
||||
},
|
||||
formula: formulaIcon,
|
||||
header: {
|
||||
'1': headerIcon,
|
||||
'2': header2Icon,
|
||||
'3': header3Icon,
|
||||
'4': header4Icon,
|
||||
'5': header5Icon,
|
||||
'6': header6Icon
|
||||
},
|
||||
italic: italicIcon,
|
||||
image: imageIcon,
|
||||
indent: {
|
||||
'+1': indentIcon,
|
||||
'-1': outdentIcon
|
||||
},
|
||||
link: linkIcon,
|
||||
list: {
|
||||
bullet: listBulletIcon,
|
||||
check: listCheckIcon,
|
||||
ordered: listOrderedIcon
|
||||
},
|
||||
script: {
|
||||
sub: subscriptIcon,
|
||||
super: superscriptIcon
|
||||
},
|
||||
strike: strikeIcon,
|
||||
table: tableIcon,
|
||||
underline: underlineIcon,
|
||||
video: videoIcon
|
||||
};
|
||||
//# sourceMappingURL=icons.js.map
|
||||
1
public/assets/quill/ui/icons.js.map
Normal file
1
public/assets/quill/ui/icons.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"icons.js","names":["align","alignLeftIcon","center","alignCenterIcon","right","alignRightIcon","justify","alignJustifyIcon","background","backgroundIcon","blockquote","blockquoteIcon","bold","boldIcon","clean","cleanIcon","code","codeIcon","color","colorIcon","direction","directionLeftToRightIcon","rtl","directionRightToLeftIcon","formula","formulaIcon","header","headerIcon","header2Icon","header3Icon","header4Icon","header5Icon","header6Icon","italic","italicIcon","image","imageIcon","indent","indentIcon","outdentIcon","link","linkIcon","list","bullet","listBulletIcon","check","listCheckIcon","ordered","listOrderedIcon","script","sub","subscriptIcon","super","superscriptIcon","strike","strikeIcon","table","tableIcon","underline","underlineIcon","video","videoIcon"],"sources":["../../src/ui/icons.ts"],"sourcesContent":["import alignLeftIcon from '../assets/icons/align-left.svg';\nimport alignCenterIcon from '../assets/icons/align-center.svg';\nimport alignRightIcon from '../assets/icons/align-right.svg';\nimport alignJustifyIcon from '../assets/icons/align-justify.svg';\nimport backgroundIcon from '../assets/icons/background.svg';\nimport blockquoteIcon from '../assets/icons/blockquote.svg';\nimport boldIcon from '../assets/icons/bold.svg';\nimport cleanIcon from '../assets/icons/clean.svg';\nimport codeIcon from '../assets/icons/code.svg';\nimport colorIcon from '../assets/icons/color.svg';\nimport directionLeftToRightIcon from '../assets/icons/direction-ltr.svg';\nimport directionRightToLeftIcon from '../assets/icons/direction-rtl.svg';\nimport formulaIcon from '../assets/icons/formula.svg';\nimport headerIcon from '../assets/icons/header.svg';\nimport header2Icon from '../assets/icons/header-2.svg';\nimport header3Icon from '../assets/icons/header-3.svg';\nimport header4Icon from '../assets/icons/header-4.svg';\nimport header5Icon from '../assets/icons/header-5.svg';\nimport header6Icon from '../assets/icons/header-6.svg';\nimport italicIcon from '../assets/icons/italic.svg';\nimport imageIcon from '../assets/icons/image.svg';\nimport indentIcon from '../assets/icons/indent.svg';\nimport outdentIcon from '../assets/icons/outdent.svg';\nimport linkIcon from '../assets/icons/link.svg';\nimport listBulletIcon from '../assets/icons/list-bullet.svg';\nimport listCheckIcon from '../assets/icons/list-check.svg';\nimport listOrderedIcon from '../assets/icons/list-ordered.svg';\nimport subscriptIcon from '../assets/icons/subscript.svg';\nimport superscriptIcon from '../assets/icons/superscript.svg';\nimport strikeIcon from '../assets/icons/strike.svg';\nimport tableIcon from '../assets/icons/table.svg';\nimport underlineIcon from '../assets/icons/underline.svg';\nimport videoIcon from '../assets/icons/video.svg';\n\nexport default {\n align: {\n '': alignLeftIcon,\n center: alignCenterIcon,\n right: alignRightIcon,\n justify: alignJustifyIcon,\n },\n background: backgroundIcon,\n blockquote: blockquoteIcon,\n bold: boldIcon,\n clean: cleanIcon,\n code: codeIcon,\n 'code-block': codeIcon,\n color: colorIcon,\n direction: {\n '': directionLeftToRightIcon,\n rtl: directionRightToLeftIcon,\n },\n formula: formulaIcon,\n header: {\n '1': headerIcon,\n '2': header2Icon,\n '3': header3Icon,\n '4': header4Icon,\n '5': header5Icon,\n '6': header6Icon,\n },\n italic: italicIcon,\n image: imageIcon,\n indent: {\n '+1': indentIcon,\n '-1': outdentIcon,\n },\n link: linkIcon,\n list: {\n bullet: listBulletIcon,\n check: listCheckIcon,\n ordered: listOrderedIcon,\n },\n script: {\n sub: subscriptIcon,\n super: superscriptIcon,\n },\n strike: strikeIcon,\n table: tableIcon,\n underline: underlineIcon,\n video: videoIcon,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,eAAe;EACbA,KAAK,EAAE;IACL,EAAE,EAAEC,aAAa;IACjBC,MAAM,EAAEC,eAAe;IACvBC,KAAK,EAAEC,cAAc;IACrBC,OAAO,EAAEC;EACX,CAAC;EACDC,UAAU,EAAEC,cAAc;EAC1BC,UAAU,EAAEC,cAAc;EAC1BC,IAAI,EAAEC,QAAQ;EACdC,KAAK,EAAEC,SAAS;EAChBC,IAAI,EAAEC,QAAQ;EACd,YAAY,EAAEA,QAAQ;EACtBC,KAAK,EAAEC,SAAS;EAChBC,SAAS,EAAE;IACT,EAAE,EAAEC,wBAAwB;IAC5BC,GAAG,EAAEC;EACP,CAAC;EACDC,OAAO,EAAEC,WAAW;EACpBC,MAAM,EAAE;IACN,GAAG,EAAEC,UAAU;IACf,GAAG,EAAEC,WAAW;IAChB,GAAG,EAAEC,WAAW;IAChB,GAAG,EAAEC,WAAW;IAChB,GAAG,EAAEC,WAAW;IAChB,GAAG,EAAEC;EACP,CAAC;EACDC,MAAM,EAAEC,UAAU;EAClBC,KAAK,EAAEC,SAAS;EAChBC,MAAM,EAAE;IACN,IAAI,EAAEC,UAAU;IAChB,IAAI,EAAEC;EACR,CAAC;EACDC,IAAI,EAAEC,QAAQ;EACdC,IAAI,EAAE;IACJC,MAAM,EAAEC,cAAc;IACtBC,KAAK,EAAEC,aAAa;IACpBC,OAAO,EAAEC;EACX,CAAC;EACDC,MAAM,EAAE;IACNC,GAAG,EAAEC,aAAa;IAClBC,KAAK,EAAEC;EACT,CAAC;EACDC,MAAM,EAAEC,UAAU;EAClBC,KAAK,EAAEC,SAAS;EAChBC,SAAS,EAAEC,aAAa;EACxBC,KAAK,EAAEC;AACT,CAAC","ignoreList":[]}
|
||||
16
public/assets/quill/ui/picker.d.ts
vendored
Normal file
16
public/assets/quill/ui/picker.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
declare class Picker {
|
||||
select: HTMLSelectElement;
|
||||
container: HTMLElement;
|
||||
label: HTMLElement;
|
||||
constructor(select: HTMLSelectElement);
|
||||
togglePicker(): void;
|
||||
buildItem(option: HTMLOptionElement): HTMLSpanElement;
|
||||
buildLabel(): HTMLSpanElement;
|
||||
buildOptions(): void;
|
||||
buildPicker(): void;
|
||||
escape(): void;
|
||||
close(): void;
|
||||
selectItem(item: HTMLElement | null, trigger?: boolean): void;
|
||||
update(): void;
|
||||
}
|
||||
export default Picker;
|
||||
171
public/assets/quill/ui/picker.js
Normal file
171
public/assets/quill/ui/picker.js
Normal file
@@ -0,0 +1,171 @@
|
||||
const DropdownIcon = "<svg viewbox=\"0 0 18 18\"><polygon class=\"ql-stroke\" points=\"7 11 9 13 11 11 7 11\"/><polygon class=\"ql-stroke\" points=\"7 7 9 5 11 7 7 7\"/></svg>";
|
||||
let optionsCounter = 0;
|
||||
function toggleAriaAttribute(element, attribute) {
|
||||
element.setAttribute(attribute, `${!(element.getAttribute(attribute) === 'true')}`);
|
||||
}
|
||||
class Picker {
|
||||
constructor(select) {
|
||||
this.select = select;
|
||||
this.container = document.createElement('span');
|
||||
this.buildPicker();
|
||||
this.select.style.display = 'none';
|
||||
// @ts-expect-error Fix me later
|
||||
this.select.parentNode.insertBefore(this.container, this.select);
|
||||
this.label.addEventListener('mousedown', () => {
|
||||
this.togglePicker();
|
||||
});
|
||||
this.label.addEventListener('keydown', event => {
|
||||
switch (event.key) {
|
||||
case 'Enter':
|
||||
this.togglePicker();
|
||||
break;
|
||||
case 'Escape':
|
||||
this.escape();
|
||||
event.preventDefault();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
});
|
||||
this.select.addEventListener('change', this.update.bind(this));
|
||||
}
|
||||
togglePicker() {
|
||||
this.container.classList.toggle('ql-expanded');
|
||||
// Toggle aria-expanded and aria-hidden to make the picker accessible
|
||||
toggleAriaAttribute(this.label, 'aria-expanded');
|
||||
// @ts-expect-error
|
||||
toggleAriaAttribute(this.options, 'aria-hidden');
|
||||
}
|
||||
buildItem(option) {
|
||||
const item = document.createElement('span');
|
||||
// @ts-expect-error
|
||||
item.tabIndex = '0';
|
||||
item.setAttribute('role', 'button');
|
||||
item.classList.add('ql-picker-item');
|
||||
const value = option.getAttribute('value');
|
||||
if (value) {
|
||||
item.setAttribute('data-value', value);
|
||||
}
|
||||
if (option.textContent) {
|
||||
item.setAttribute('data-label', option.textContent);
|
||||
}
|
||||
item.addEventListener('click', () => {
|
||||
this.selectItem(item, true);
|
||||
});
|
||||
item.addEventListener('keydown', event => {
|
||||
switch (event.key) {
|
||||
case 'Enter':
|
||||
this.selectItem(item, true);
|
||||
event.preventDefault();
|
||||
break;
|
||||
case 'Escape':
|
||||
this.escape();
|
||||
event.preventDefault();
|
||||
break;
|
||||
default:
|
||||
}
|
||||
});
|
||||
return item;
|
||||
}
|
||||
buildLabel() {
|
||||
const label = document.createElement('span');
|
||||
label.classList.add('ql-picker-label');
|
||||
label.innerHTML = DropdownIcon;
|
||||
// @ts-expect-error
|
||||
label.tabIndex = '0';
|
||||
label.setAttribute('role', 'button');
|
||||
label.setAttribute('aria-expanded', 'false');
|
||||
this.container.appendChild(label);
|
||||
return label;
|
||||
}
|
||||
buildOptions() {
|
||||
const options = document.createElement('span');
|
||||
options.classList.add('ql-picker-options');
|
||||
|
||||
// Don't want screen readers to read this until options are visible
|
||||
options.setAttribute('aria-hidden', 'true');
|
||||
// @ts-expect-error
|
||||
options.tabIndex = '-1';
|
||||
|
||||
// Need a unique id for aria-controls
|
||||
options.id = `ql-picker-options-${optionsCounter}`;
|
||||
optionsCounter += 1;
|
||||
this.label.setAttribute('aria-controls', options.id);
|
||||
|
||||
// @ts-expect-error
|
||||
this.options = options;
|
||||
Array.from(this.select.options).forEach(option => {
|
||||
const item = this.buildItem(option);
|
||||
options.appendChild(item);
|
||||
if (option.selected === true) {
|
||||
this.selectItem(item);
|
||||
}
|
||||
});
|
||||
this.container.appendChild(options);
|
||||
}
|
||||
buildPicker() {
|
||||
Array.from(this.select.attributes).forEach(item => {
|
||||
this.container.setAttribute(item.name, item.value);
|
||||
});
|
||||
this.container.classList.add('ql-picker');
|
||||
this.label = this.buildLabel();
|
||||
this.buildOptions();
|
||||
}
|
||||
escape() {
|
||||
// Close menu and return focus to trigger label
|
||||
this.close();
|
||||
// Need setTimeout for accessibility to ensure that the browser executes
|
||||
// focus on the next process thread and after any DOM content changes
|
||||
setTimeout(() => this.label.focus(), 1);
|
||||
}
|
||||
close() {
|
||||
this.container.classList.remove('ql-expanded');
|
||||
this.label.setAttribute('aria-expanded', 'false');
|
||||
// @ts-expect-error
|
||||
this.options.setAttribute('aria-hidden', 'true');
|
||||
}
|
||||
selectItem(item) {
|
||||
let trigger = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
||||
const selected = this.container.querySelector('.ql-selected');
|
||||
if (item === selected) return;
|
||||
if (selected != null) {
|
||||
selected.classList.remove('ql-selected');
|
||||
}
|
||||
if (item == null) return;
|
||||
item.classList.add('ql-selected');
|
||||
// @ts-expect-error Fix me later
|
||||
this.select.selectedIndex = Array.from(item.parentNode.children).indexOf(item);
|
||||
if (item.hasAttribute('data-value')) {
|
||||
// @ts-expect-error Fix me later
|
||||
this.label.setAttribute('data-value', item.getAttribute('data-value'));
|
||||
} else {
|
||||
this.label.removeAttribute('data-value');
|
||||
}
|
||||
if (item.hasAttribute('data-label')) {
|
||||
// @ts-expect-error Fix me later
|
||||
this.label.setAttribute('data-label', item.getAttribute('data-label'));
|
||||
} else {
|
||||
this.label.removeAttribute('data-label');
|
||||
}
|
||||
if (trigger) {
|
||||
this.select.dispatchEvent(new Event('change'));
|
||||
this.close();
|
||||
}
|
||||
}
|
||||
update() {
|
||||
let option;
|
||||
if (this.select.selectedIndex > -1) {
|
||||
const item =
|
||||
// @ts-expect-error Fix me later
|
||||
this.container.querySelector('.ql-picker-options').children[this.select.selectedIndex];
|
||||
option = this.select.options[this.select.selectedIndex];
|
||||
// @ts-expect-error
|
||||
this.selectItem(item);
|
||||
} else {
|
||||
this.selectItem(null);
|
||||
}
|
||||
const isActive = option != null && option !== this.select.querySelector('option[selected]');
|
||||
this.label.classList.toggle('ql-active', isActive);
|
||||
}
|
||||
}
|
||||
export default Picker;
|
||||
//# sourceMappingURL=picker.js.map
|
||||
1
public/assets/quill/ui/picker.js.map
Normal file
1
public/assets/quill/ui/picker.js.map
Normal file
File diff suppressed because one or more lines are too long
12
public/assets/quill/ui/tooltip.d.ts
vendored
Normal file
12
public/assets/quill/ui/tooltip.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import type Quill from '../core.js';
|
||||
import type { Bounds } from '../core/selection.js';
|
||||
declare class Tooltip {
|
||||
quill: Quill;
|
||||
boundsContainer: HTMLElement;
|
||||
root: HTMLDivElement;
|
||||
constructor(quill: Quill, boundsContainer?: HTMLElement);
|
||||
hide(): void;
|
||||
position(reference: Bounds): number;
|
||||
show(): void;
|
||||
}
|
||||
export default Tooltip;
|
||||
56
public/assets/quill/ui/tooltip.js
Normal file
56
public/assets/quill/ui/tooltip.js
Normal file
@@ -0,0 +1,56 @@
|
||||
const isScrollable = el => {
|
||||
const {
|
||||
overflowY
|
||||
} = getComputedStyle(el, null);
|
||||
return overflowY !== 'visible' && overflowY !== 'clip';
|
||||
};
|
||||
class Tooltip {
|
||||
constructor(quill, boundsContainer) {
|
||||
this.quill = quill;
|
||||
this.boundsContainer = boundsContainer || document.body;
|
||||
this.root = quill.addContainer('ql-tooltip');
|
||||
// @ts-expect-error
|
||||
this.root.innerHTML = this.constructor.TEMPLATE;
|
||||
if (isScrollable(this.quill.root)) {
|
||||
this.quill.root.addEventListener('scroll', () => {
|
||||
this.root.style.marginTop = `${-1 * this.quill.root.scrollTop}px`;
|
||||
});
|
||||
}
|
||||
this.hide();
|
||||
}
|
||||
hide() {
|
||||
this.root.classList.add('ql-hidden');
|
||||
}
|
||||
position(reference) {
|
||||
const left = reference.left + reference.width / 2 - this.root.offsetWidth / 2;
|
||||
// root.scrollTop should be 0 if scrollContainer !== root
|
||||
const top = reference.bottom + this.quill.root.scrollTop;
|
||||
this.root.style.left = `${left}px`;
|
||||
this.root.style.top = `${top}px`;
|
||||
this.root.classList.remove('ql-flip');
|
||||
const containerBounds = this.boundsContainer.getBoundingClientRect();
|
||||
const rootBounds = this.root.getBoundingClientRect();
|
||||
let shift = 0;
|
||||
if (rootBounds.right > containerBounds.right) {
|
||||
shift = containerBounds.right - rootBounds.right;
|
||||
this.root.style.left = `${left + shift}px`;
|
||||
}
|
||||
if (rootBounds.left < containerBounds.left) {
|
||||
shift = containerBounds.left - rootBounds.left;
|
||||
this.root.style.left = `${left + shift}px`;
|
||||
}
|
||||
if (rootBounds.bottom > containerBounds.bottom) {
|
||||
const height = rootBounds.bottom - rootBounds.top;
|
||||
const verticalShift = reference.bottom - reference.top + height;
|
||||
this.root.style.top = `${top - verticalShift}px`;
|
||||
this.root.classList.add('ql-flip');
|
||||
}
|
||||
return shift;
|
||||
}
|
||||
show() {
|
||||
this.root.classList.remove('ql-editing');
|
||||
this.root.classList.remove('ql-hidden');
|
||||
}
|
||||
}
|
||||
export default Tooltip;
|
||||
//# sourceMappingURL=tooltip.js.map
|
||||
1
public/assets/quill/ui/tooltip.js.map
Normal file
1
public/assets/quill/ui/tooltip.js.map
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user