quoin-editor 0.4.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +205 -0
- package/MIGRATION.md +233 -0
- package/README.md +78 -715
- package/dist/ai.cjs +1107 -0
- package/dist/ai.cjs.map +1 -0
- package/dist/ai.d.cts +68 -0
- package/dist/ai.d.ts +68 -0
- package/dist/ai.js +1107 -0
- package/dist/ai.js.map +1 -0
- package/dist/catalogue.cjs +59 -0
- package/dist/catalogue.cjs.map +1 -0
- package/dist/catalogue.d.cts +39 -0
- package/dist/catalogue.d.ts +39 -0
- package/dist/catalogue.js +59 -0
- package/dist/catalogue.js.map +1 -0
- package/dist/chunk-2QCRZ7OL.cjs +319 -0
- package/dist/chunk-2QCRZ7OL.cjs.map +1 -0
- package/dist/chunk-2VDK27IF.cjs +6666 -0
- package/dist/chunk-2VDK27IF.cjs.map +1 -0
- package/dist/chunk-47MLKSI2.js +326 -0
- package/dist/chunk-47MLKSI2.js.map +1 -0
- package/dist/chunk-5DNCCN6X.cjs +326 -0
- package/dist/chunk-5DNCCN6X.cjs.map +1 -0
- package/dist/chunk-AEJXZBVR.cjs +1378 -0
- package/dist/chunk-AEJXZBVR.cjs.map +1 -0
- package/dist/chunk-CDELOHDY.cjs +239 -0
- package/dist/chunk-CDELOHDY.cjs.map +1 -0
- package/dist/chunk-E75EHRPA.cjs +175 -0
- package/dist/chunk-E75EHRPA.cjs.map +1 -0
- package/dist/chunk-EL2OEJQC.cjs +562 -0
- package/dist/chunk-EL2OEJQC.cjs.map +1 -0
- package/dist/chunk-GLLXHMH2.cjs +25 -0
- package/dist/chunk-GLLXHMH2.cjs.map +1 -0
- package/dist/chunk-GTTPVJSD.cjs +3286 -0
- package/dist/chunk-GTTPVJSD.cjs.map +1 -0
- package/dist/chunk-HELJTLNC.cjs +100 -0
- package/dist/chunk-HELJTLNC.cjs.map +1 -0
- package/dist/chunk-HJIQT3S5.js +4047 -0
- package/dist/chunk-HJIQT3S5.js.map +1 -0
- package/dist/chunk-HZSSEYJS.cjs +504 -0
- package/dist/chunk-HZSSEYJS.cjs.map +1 -0
- package/dist/chunk-JDPTZUBW.js +184 -0
- package/dist/chunk-JDPTZUBW.js.map +1 -0
- package/dist/chunk-JEIFJHEI.js +14 -0
- package/dist/chunk-JEIFJHEI.js.map +1 -0
- package/dist/chunk-K574XHMM.js +25 -0
- package/dist/chunk-K574XHMM.js.map +1 -0
- package/dist/chunk-KAVU6T6J.js +249 -0
- package/dist/chunk-KAVU6T6J.js.map +1 -0
- package/dist/chunk-KXOBZGQO.js +1378 -0
- package/dist/chunk-KXOBZGQO.js.map +1 -0
- package/dist/chunk-LCQSG4M6.js +3335 -0
- package/dist/chunk-LCQSG4M6.js.map +1 -0
- package/dist/chunk-MQ2XQ4MX.js +100 -0
- package/dist/chunk-MQ2XQ4MX.js.map +1 -0
- package/dist/chunk-ND5XJVK2.cjs +3335 -0
- package/dist/chunk-ND5XJVK2.cjs.map +1 -0
- package/dist/chunk-NNDYYEW5.js +504 -0
- package/dist/chunk-NNDYYEW5.js.map +1 -0
- package/dist/chunk-NOKWNK2O.js +319 -0
- package/dist/chunk-NOKWNK2O.js.map +1 -0
- package/dist/chunk-OMOBMXD5.cjs +57 -0
- package/dist/chunk-OMOBMXD5.cjs.map +1 -0
- package/dist/chunk-PMWCQSQX.js +239 -0
- package/dist/chunk-PMWCQSQX.js.map +1 -0
- package/dist/chunk-POBM7MGR.js +30 -0
- package/dist/chunk-POBM7MGR.js.map +1 -0
- package/dist/chunk-PWUEPDA3.cjs +598 -0
- package/dist/chunk-PWUEPDA3.cjs.map +1 -0
- package/dist/chunk-PZ4GT5JO.cjs +4047 -0
- package/dist/chunk-PZ4GT5JO.cjs.map +1 -0
- package/dist/chunk-QAW5NH6S.cjs +14 -0
- package/dist/chunk-QAW5NH6S.cjs.map +1 -0
- package/dist/chunk-RDG4VI6E.cjs +706 -0
- package/dist/chunk-RDG4VI6E.cjs.map +1 -0
- package/dist/chunk-RUDWMKYX.js +562 -0
- package/dist/chunk-RUDWMKYX.js.map +1 -0
- package/dist/chunk-SG37UBDO.js +706 -0
- package/dist/chunk-SG37UBDO.js.map +1 -0
- package/dist/chunk-SLVDAHHK.cjs +30 -0
- package/dist/chunk-SLVDAHHK.cjs.map +1 -0
- package/dist/chunk-T7SW6OWV.js +598 -0
- package/dist/chunk-T7SW6OWV.js.map +1 -0
- package/dist/chunk-TC4DARU2.js +175 -0
- package/dist/chunk-TC4DARU2.js.map +1 -0
- package/dist/chunk-WQHV3MRE.cjs +184 -0
- package/dist/chunk-WQHV3MRE.cjs.map +1 -0
- package/dist/chunk-WXMYDXPN.cjs +33 -0
- package/dist/chunk-WXMYDXPN.cjs.map +1 -0
- package/dist/chunk-XEBWC7ZL.js +57 -0
- package/dist/chunk-XEBWC7ZL.js.map +1 -0
- package/dist/chunk-ZC24WB7Y.cjs +249 -0
- package/dist/chunk-ZC24WB7Y.cjs.map +1 -0
- package/dist/chunk-ZGZEJCRV.js +6666 -0
- package/dist/chunk-ZGZEJCRV.js.map +1 -0
- package/dist/chunk-ZHOSSWUM.js +33 -0
- package/dist/chunk-ZHOSSWUM.js.map +1 -0
- package/dist/chunk-ZS2WA357.js +3286 -0
- package/dist/chunk-ZS2WA357.js.map +1 -0
- package/dist/comments.cjs +993 -0
- package/dist/comments.cjs.map +1 -0
- package/dist/comments.d.cts +88 -0
- package/dist/comments.d.ts +88 -0
- package/dist/comments.js +993 -0
- package/dist/comments.js.map +1 -0
- package/dist/diff.cjs +343 -0
- package/dist/diff.cjs.map +1 -0
- package/dist/diff.d.cts +67 -0
- package/dist/diff.d.ts +67 -0
- package/dist/diff.js +343 -0
- package/dist/diff.js.map +1 -0
- package/dist/docx.cjs +854 -0
- package/dist/docx.cjs.map +1 -0
- package/dist/docx.d.cts +27 -0
- package/dist/docx.d.ts +27 -0
- package/dist/docx.js +854 -0
- package/dist/docx.js.map +1 -0
- package/dist/embed-provider-jXwlRmnp.d.cts +19 -0
- package/dist/embed-provider-jXwlRmnp.d.ts +19 -0
- package/dist/embed.cjs +17 -0
- package/dist/embed.cjs.map +1 -0
- package/dist/embed.d.cts +56 -0
- package/dist/embed.d.ts +56 -0
- package/dist/embed.js +17 -0
- package/dist/embed.js.map +1 -0
- package/dist/emoji-data.cjs +1968 -0
- package/dist/emoji-data.cjs.map +1 -0
- package/dist/emoji-data.js +1968 -0
- package/dist/emoji-data.js.map +1 -0
- package/dist/emoji-extension-C12gDPm6.d.cts +46 -0
- package/dist/emoji-extension-DpQ43HjE.d.ts +46 -0
- package/dist/emoji.cjs +18 -0
- package/dist/emoji.cjs.map +1 -0
- package/dist/emoji.d.cts +31 -0
- package/dist/emoji.d.ts +31 -0
- package/dist/emoji.js +18 -0
- package/dist/emoji.js.map +1 -0
- package/dist/engine.cjs +119 -0
- package/dist/engine.cjs.map +1 -0
- package/dist/engine.d.cts +144 -0
- package/dist/engine.d.ts +144 -0
- package/dist/engine.js +119 -0
- package/dist/engine.js.map +1 -0
- package/dist/find-extension-DKqLLSuP.d.ts +41 -0
- package/dist/find-extension-_sbZEt3R.d.cts +41 -0
- package/dist/find.cjs +20 -0
- package/dist/find.cjs.map +1 -0
- package/dist/find.d.cts +44 -0
- package/dist/find.d.ts +44 -0
- package/dist/find.js +20 -0
- package/dist/find.js.map +1 -0
- package/dist/headless.cjs +151 -518
- package/dist/headless.cjs.map +1 -1
- package/dist/headless.d.cts +102 -69
- package/dist/headless.d.ts +102 -69
- package/dist/headless.js +149 -467
- package/dist/headless.js.map +1 -1
- package/dist/index-CgD72kHB.d.cts +65 -0
- package/dist/index-DNYbTK3w.d.ts +65 -0
- package/dist/index.cjs +183 -2753
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +345 -253
- package/dist/index.d.ts +345 -253
- package/dist/index.js +168 -2696
- package/dist/index.js.map +1 -1
- package/dist/math.cjs +18 -0
- package/dist/math.cjs.map +1 -0
- package/dist/math.d.cts +49 -0
- package/dist/math.d.ts +49 -0
- package/dist/math.js +18 -0
- package/dist/math.js.map +1 -0
- package/dist/mention.cjs +18 -0
- package/dist/mention.cjs.map +1 -0
- package/dist/mention.d.cts +50 -0
- package/dist/mention.d.ts +50 -0
- package/dist/mention.js +18 -0
- package/dist/mention.js.map +1 -0
- package/dist/presence.cjs +565 -0
- package/dist/presence.cjs.map +1 -0
- package/dist/presence.d.cts +30 -0
- package/dist/presence.d.ts +30 -0
- package/dist/presence.js +565 -0
- package/dist/presence.js.map +1 -0
- package/dist/registry-CWBOSAHm.d.cts +121 -0
- package/dist/registry-CWBOSAHm.d.ts +121 -0
- package/dist/stats-extension-Bly88uio.d.ts +40 -0
- package/dist/stats-extension-CJPijvUb.d.cts +40 -0
- package/dist/stats.cjs +19 -0
- package/dist/stats.cjs.map +1 -0
- package/dist/stats.d.cts +19 -0
- package/dist/stats.d.ts +19 -0
- package/dist/stats.js +19 -0
- package/dist/stats.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/table-extension-BTLxFy2S.d.cts +57 -0
- package/dist/table-extension-Dzf4k6hI.d.ts +57 -0
- package/dist/table.cjs +50 -0
- package/dist/table.cjs.map +1 -0
- package/dist/table.d.cts +57 -0
- package/dist/table.d.ts +57 -0
- package/dist/table.js +50 -0
- package/dist/table.js.map +1 -0
- package/dist/to-html-C5t7xyaM.d.ts +21 -0
- package/dist/to-html-CNCITCln.d.cts +21 -0
- package/dist/toc-extension-B3-s6h2x.d.cts +25 -0
- package/dist/toc-extension-DWm5alVj.d.ts +25 -0
- package/dist/toc.cjs +18 -0
- package/dist/toc.cjs.map +1 -0
- package/dist/toc.d.cts +24 -0
- package/dist/toc.d.ts +24 -0
- package/dist/toc.js +18 -0
- package/dist/toc.js.map +1 -0
- package/dist/types-Cz7XJLaK.d.cts +366 -0
- package/dist/types-DULc8wwg.d.cts +120 -0
- package/dist/types-DULc8wwg.d.ts +120 -0
- package/dist/types-a1CRBlEh.d.ts +366 -0
- package/dist/view-controller-DSHw0ltQ.d.cts +118 -0
- package/dist/view-controller-UbpzblGl.d.ts +118 -0
- package/dist/view.cjs +23 -0
- package/dist/view.cjs.map +1 -0
- package/dist/view.d.cts +40 -0
- package/dist/view.d.ts +40 -0
- package/dist/view.js +23 -0
- package/dist/view.js.map +1 -0
- package/dist/yjs.cjs +1026 -0
- package/dist/yjs.cjs.map +1 -0
- package/dist/yjs.d.cts +22 -0
- package/dist/yjs.d.ts +22 -0
- package/dist/yjs.js +1026 -0
- package/dist/yjs.js.map +1 -0
- package/package.json +219 -20
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { E as Extension } from './types-Cz7XJLaK.cjs';
|
|
2
|
+
|
|
3
|
+
/** Every string the table feature shows or speaks. Rows and columns are counted from 1. */
|
|
4
|
+
type TableLabels = {
|
|
5
|
+
/** The slash command, and the name of a table. */
|
|
6
|
+
table: string;
|
|
7
|
+
tableDescription: string;
|
|
8
|
+
cell(row: number, col: number): string;
|
|
9
|
+
/** The toolbar Alt+F10 reaches from a cell, which holds the handles of the caret's row and column. */
|
|
10
|
+
tableControls: string;
|
|
11
|
+
rowOptions(row: number): string;
|
|
12
|
+
columnOptions(col: number): string;
|
|
13
|
+
insertRowAbove: string;
|
|
14
|
+
insertRowBelow: string;
|
|
15
|
+
insertColumnLeft: string;
|
|
16
|
+
insertColumnRight: string;
|
|
17
|
+
moveRowUp: string;
|
|
18
|
+
moveRowDown: string;
|
|
19
|
+
moveColumnLeft: string;
|
|
20
|
+
moveColumnRight: string;
|
|
21
|
+
deleteRow: string;
|
|
22
|
+
deleteColumn: string;
|
|
23
|
+
headerRow: string;
|
|
24
|
+
alignLeft: string;
|
|
25
|
+
alignCenter: string;
|
|
26
|
+
alignRight: string;
|
|
27
|
+
/** The button on the edge between two rows or columns, named after the row or column it inserts. */
|
|
28
|
+
insertRowAt(row: number): string;
|
|
29
|
+
insertColumnAt(col: number): string;
|
|
30
|
+
resizeColumn(col: number): string;
|
|
31
|
+
columnWidth(px: number): string;
|
|
32
|
+
rowInserted: string;
|
|
33
|
+
rowDeleted: string;
|
|
34
|
+
rowMoved: string;
|
|
35
|
+
columnInserted: string;
|
|
36
|
+
columnDeleted: string;
|
|
37
|
+
columnMoved: string;
|
|
38
|
+
headerRowOn: string;
|
|
39
|
+
headerRowOff: string;
|
|
40
|
+
alignedLeft: string;
|
|
41
|
+
alignedCenter: string;
|
|
42
|
+
alignedRight: string;
|
|
43
|
+
alignmentCleared: string;
|
|
44
|
+
};
|
|
45
|
+
declare const englishTableLabels: TableLabels;
|
|
46
|
+
|
|
47
|
+
type TableOptions = {
|
|
48
|
+
/** Every string the feature shows or speaks, English by default. A key left out stays English. */
|
|
49
|
+
labels?: Partial<TableLabels>;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Tables: the TABLE block typed in place, with a slash command that inserts one, keys that move between cells, handles
|
|
53
|
+
* whose menus insert, move and delete rows and columns, column borders that resize, and cell ranges selected by a drag.
|
|
54
|
+
*/
|
|
55
|
+
declare function tableExtension(options?: TableOptions): Extension;
|
|
56
|
+
|
|
57
|
+
export { type TableLabels as T, type TableOptions as a, englishTableLabels as e, tableExtension as t };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { E as Extension } from './types-a1CRBlEh.js';
|
|
2
|
+
|
|
3
|
+
/** Every string the table feature shows or speaks. Rows and columns are counted from 1. */
|
|
4
|
+
type TableLabels = {
|
|
5
|
+
/** The slash command, and the name of a table. */
|
|
6
|
+
table: string;
|
|
7
|
+
tableDescription: string;
|
|
8
|
+
cell(row: number, col: number): string;
|
|
9
|
+
/** The toolbar Alt+F10 reaches from a cell, which holds the handles of the caret's row and column. */
|
|
10
|
+
tableControls: string;
|
|
11
|
+
rowOptions(row: number): string;
|
|
12
|
+
columnOptions(col: number): string;
|
|
13
|
+
insertRowAbove: string;
|
|
14
|
+
insertRowBelow: string;
|
|
15
|
+
insertColumnLeft: string;
|
|
16
|
+
insertColumnRight: string;
|
|
17
|
+
moveRowUp: string;
|
|
18
|
+
moveRowDown: string;
|
|
19
|
+
moveColumnLeft: string;
|
|
20
|
+
moveColumnRight: string;
|
|
21
|
+
deleteRow: string;
|
|
22
|
+
deleteColumn: string;
|
|
23
|
+
headerRow: string;
|
|
24
|
+
alignLeft: string;
|
|
25
|
+
alignCenter: string;
|
|
26
|
+
alignRight: string;
|
|
27
|
+
/** The button on the edge between two rows or columns, named after the row or column it inserts. */
|
|
28
|
+
insertRowAt(row: number): string;
|
|
29
|
+
insertColumnAt(col: number): string;
|
|
30
|
+
resizeColumn(col: number): string;
|
|
31
|
+
columnWidth(px: number): string;
|
|
32
|
+
rowInserted: string;
|
|
33
|
+
rowDeleted: string;
|
|
34
|
+
rowMoved: string;
|
|
35
|
+
columnInserted: string;
|
|
36
|
+
columnDeleted: string;
|
|
37
|
+
columnMoved: string;
|
|
38
|
+
headerRowOn: string;
|
|
39
|
+
headerRowOff: string;
|
|
40
|
+
alignedLeft: string;
|
|
41
|
+
alignedCenter: string;
|
|
42
|
+
alignedRight: string;
|
|
43
|
+
alignmentCleared: string;
|
|
44
|
+
};
|
|
45
|
+
declare const englishTableLabels: TableLabels;
|
|
46
|
+
|
|
47
|
+
type TableOptions = {
|
|
48
|
+
/** Every string the feature shows or speaks, English by default. A key left out stays English. */
|
|
49
|
+
labels?: Partial<TableLabels>;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Tables: the TABLE block typed in place, with a slash command that inserts one, keys that move between cells, handles
|
|
53
|
+
* whose menus insert, move and delete rows and columns, column borders that resize, and cell ranges selected by a drag.
|
|
54
|
+
*/
|
|
55
|
+
declare function tableExtension(options?: TableOptions): Extension;
|
|
56
|
+
|
|
57
|
+
export { type TableLabels as T, type TableOptions as a, englishTableLabels as e, tableExtension as t };
|
package/dist/table.cjs
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client';"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var _chunkAEJXZBVRcjs = require('./chunk-AEJXZBVR.cjs');
|
|
23
|
+
require('./chunk-2VDK27IF.cjs');
|
|
24
|
+
require('./chunk-GTTPVJSD.cjs');
|
|
25
|
+
require('./chunk-OMOBMXD5.cjs');
|
|
26
|
+
require('./chunk-PZ4GT5JO.cjs');
|
|
27
|
+
require('./chunk-2QCRZ7OL.cjs');
|
|
28
|
+
require('./chunk-ND5XJVK2.cjs');
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
exports.addColumn = _chunkAEJXZBVRcjs.addColumn; exports.addRow = _chunkAEJXZBVRcjs.addRow; exports.cellSelection = _chunkAEJXZBVRcjs.cellSelection; exports.cellSelectionKey = _chunkAEJXZBVRcjs.cellSelectionKey; exports.cellSelectionPlugin = _chunkAEJXZBVRcjs.cellSelectionPlugin; exports.cellsInRange = _chunkAEJXZBVRcjs.cellsInRange; exports.deleteCellContents = _chunkAEJXZBVRcjs.deleteCellContents; exports.englishTableLabels = _chunkAEJXZBVRcjs.englishTableLabels; exports.insertTable = _chunkAEJXZBVRcjs.insertTable; exports.moveColumn = _chunkAEJXZBVRcjs.moveColumn; exports.moveRow = _chunkAEJXZBVRcjs.moveRow; exports.removeColumn = _chunkAEJXZBVRcjs.removeColumn; exports.removeRow = _chunkAEJXZBVRcjs.removeRow; exports.selectCells = _chunkAEJXZBVRcjs.selectCells; exports.setCellsMark = _chunkAEJXZBVRcjs.setCellsMark; exports.setColumnAlign = _chunkAEJXZBVRcjs.setColumnAlign; exports.setColumnWidth = _chunkAEJXZBVRcjs.setColumnWidth; exports.tableExtension = _chunkAEJXZBVRcjs.tableExtension; exports.toggleHeaderRow = _chunkAEJXZBVRcjs.toggleHeaderRow;
|
|
50
|
+
//# sourceMappingURL=table.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["table.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,4iCAAC","file":"/home/runner/work/quoin-editor/quoin-editor/dist/table.cjs"}
|
package/dist/table.d.cts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export { T as TableLabels, a as TableOptions, e as englishTableLabels, t as tableExtension } from './table-extension-BTLxFy2S.cjs';
|
|
2
|
+
import { b as Command, c as EditorState, P as PluginKey, d as PluginSpec } from './types-Cz7XJLaK.cjs';
|
|
3
|
+
import { A as Attrs } from './types-DULc8wwg.cjs';
|
|
4
|
+
|
|
5
|
+
type Cell = readonly [row: number, col: number];
|
|
6
|
+
type ColumnAlign = 'left' | 'center' | 'right';
|
|
7
|
+
|
|
8
|
+
/** Inserts an empty row at `index`, from 0 above the first row to the row count below the last. */
|
|
9
|
+
declare const addRow: (blockId: string, index: number) => Command;
|
|
10
|
+
/** Removes the row at `index`. A table keeps at least one row. */
|
|
11
|
+
declare const removeRow: (blockId: string, index: number) => Command;
|
|
12
|
+
declare const moveRow: (blockId: string, from: number, to: number) => Command;
|
|
13
|
+
/** Inserts an empty column at `index`, unaligned and as wide as the column before it. */
|
|
14
|
+
declare const addColumn: (blockId: string, index: number) => Command;
|
|
15
|
+
/** Removes the column at `index`. A table keeps at least one column. */
|
|
16
|
+
declare const removeColumn: (blockId: string, index: number) => Command;
|
|
17
|
+
declare const moveColumn: (blockId: string, from: number, to: number) => Command;
|
|
18
|
+
declare const toggleHeaderRow: (blockId: string) => Command;
|
|
19
|
+
/** Aligns the column's cells, or with `null` leaves them to the reading direction. */
|
|
20
|
+
declare const setColumnAlign: (blockId: string, col: number, align: ColumnAlign | null) => Command;
|
|
21
|
+
/**
|
|
22
|
+
* Sets the column's width in pixels. A table that keeps no widths yet takes the others from `drawn`, the widths its
|
|
23
|
+
* columns are drawn at, so that they stay as they are, or without them sets the others to `DEFAULT_COLUMN_WIDTH`.
|
|
24
|
+
*/
|
|
25
|
+
declare const setColumnWidth: (blockId: string, col: number, px: number, drawn?: readonly number[]) => Command;
|
|
26
|
+
/**
|
|
27
|
+
* Inserts an empty table with a header row after the selection's block and the blocks nested under it, or in place of
|
|
28
|
+
* an empty paragraph, and puts the caret in its first cell.
|
|
29
|
+
*/
|
|
30
|
+
declare function insertTable(rows: number, cols: number, options?: {
|
|
31
|
+
newId?: () => string;
|
|
32
|
+
}): Command;
|
|
33
|
+
|
|
34
|
+
/** A rectangle of a table's cells, between the cell the selection started in and the one it reaches. */
|
|
35
|
+
type CellRange = {
|
|
36
|
+
readonly block: string;
|
|
37
|
+
readonly anchor: Cell;
|
|
38
|
+
readonly head: Cell;
|
|
39
|
+
};
|
|
40
|
+
declare const cellSelectionKey: PluginKey<CellRange | null>;
|
|
41
|
+
/** Holds the cell range of the selection, the same object for as long as it spans the same cells. */
|
|
42
|
+
declare const cellSelectionPlugin: PluginSpec<CellRange | null>;
|
|
43
|
+
declare function cellSelection(state: EditorState): CellRange | null;
|
|
44
|
+
/** The cells of the range, row by row. */
|
|
45
|
+
declare function cellsInRange({ anchor, head }: CellRange): Cell[];
|
|
46
|
+
/** Selects the cells from `anchor` to `head`: from the start of the first one to the end of the last. */
|
|
47
|
+
declare function selectCells(blockId: string, anchor: Cell, head: Cell): Command;
|
|
48
|
+
|
|
49
|
+
/** Empties every cell of the cell range and leaves the caret in its first cell. */
|
|
50
|
+
declare const deleteCellContents: Command;
|
|
51
|
+
/**
|
|
52
|
+
* Applies a mark to the whole of every cell in the cell range through the editor's own mark commands, one cell after
|
|
53
|
+
* another in one transaction: it is removed once every cell carries it all through, and added to all otherwise.
|
|
54
|
+
*/
|
|
55
|
+
declare function setCellsMark(type: string, attrs?: Attrs): Command;
|
|
56
|
+
|
|
57
|
+
export { type Cell, type CellRange, type ColumnAlign, addColumn, addRow, cellSelection, cellSelectionKey, cellSelectionPlugin, cellsInRange, deleteCellContents, insertTable, moveColumn, moveRow, removeColumn, removeRow, selectCells, setCellsMark, setColumnAlign, setColumnWidth, toggleHeaderRow };
|
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export { T as TableLabels, a as TableOptions, e as englishTableLabels, t as tableExtension } from './table-extension-Dzf4k6hI.js';
|
|
2
|
+
import { b as Command, c as EditorState, P as PluginKey, d as PluginSpec } from './types-a1CRBlEh.js';
|
|
3
|
+
import { A as Attrs } from './types-DULc8wwg.js';
|
|
4
|
+
|
|
5
|
+
type Cell = readonly [row: number, col: number];
|
|
6
|
+
type ColumnAlign = 'left' | 'center' | 'right';
|
|
7
|
+
|
|
8
|
+
/** Inserts an empty row at `index`, from 0 above the first row to the row count below the last. */
|
|
9
|
+
declare const addRow: (blockId: string, index: number) => Command;
|
|
10
|
+
/** Removes the row at `index`. A table keeps at least one row. */
|
|
11
|
+
declare const removeRow: (blockId: string, index: number) => Command;
|
|
12
|
+
declare const moveRow: (blockId: string, from: number, to: number) => Command;
|
|
13
|
+
/** Inserts an empty column at `index`, unaligned and as wide as the column before it. */
|
|
14
|
+
declare const addColumn: (blockId: string, index: number) => Command;
|
|
15
|
+
/** Removes the column at `index`. A table keeps at least one column. */
|
|
16
|
+
declare const removeColumn: (blockId: string, index: number) => Command;
|
|
17
|
+
declare const moveColumn: (blockId: string, from: number, to: number) => Command;
|
|
18
|
+
declare const toggleHeaderRow: (blockId: string) => Command;
|
|
19
|
+
/** Aligns the column's cells, or with `null` leaves them to the reading direction. */
|
|
20
|
+
declare const setColumnAlign: (blockId: string, col: number, align: ColumnAlign | null) => Command;
|
|
21
|
+
/**
|
|
22
|
+
* Sets the column's width in pixels. A table that keeps no widths yet takes the others from `drawn`, the widths its
|
|
23
|
+
* columns are drawn at, so that they stay as they are, or without them sets the others to `DEFAULT_COLUMN_WIDTH`.
|
|
24
|
+
*/
|
|
25
|
+
declare const setColumnWidth: (blockId: string, col: number, px: number, drawn?: readonly number[]) => Command;
|
|
26
|
+
/**
|
|
27
|
+
* Inserts an empty table with a header row after the selection's block and the blocks nested under it, or in place of
|
|
28
|
+
* an empty paragraph, and puts the caret in its first cell.
|
|
29
|
+
*/
|
|
30
|
+
declare function insertTable(rows: number, cols: number, options?: {
|
|
31
|
+
newId?: () => string;
|
|
32
|
+
}): Command;
|
|
33
|
+
|
|
34
|
+
/** A rectangle of a table's cells, between the cell the selection started in and the one it reaches. */
|
|
35
|
+
type CellRange = {
|
|
36
|
+
readonly block: string;
|
|
37
|
+
readonly anchor: Cell;
|
|
38
|
+
readonly head: Cell;
|
|
39
|
+
};
|
|
40
|
+
declare const cellSelectionKey: PluginKey<CellRange | null>;
|
|
41
|
+
/** Holds the cell range of the selection, the same object for as long as it spans the same cells. */
|
|
42
|
+
declare const cellSelectionPlugin: PluginSpec<CellRange | null>;
|
|
43
|
+
declare function cellSelection(state: EditorState): CellRange | null;
|
|
44
|
+
/** The cells of the range, row by row. */
|
|
45
|
+
declare function cellsInRange({ anchor, head }: CellRange): Cell[];
|
|
46
|
+
/** Selects the cells from `anchor` to `head`: from the start of the first one to the end of the last. */
|
|
47
|
+
declare function selectCells(blockId: string, anchor: Cell, head: Cell): Command;
|
|
48
|
+
|
|
49
|
+
/** Empties every cell of the cell range and leaves the caret in its first cell. */
|
|
50
|
+
declare const deleteCellContents: Command;
|
|
51
|
+
/**
|
|
52
|
+
* Applies a mark to the whole of every cell in the cell range through the editor's own mark commands, one cell after
|
|
53
|
+
* another in one transaction: it is removed once every cell carries it all through, and added to all otherwise.
|
|
54
|
+
*/
|
|
55
|
+
declare function setCellsMark(type: string, attrs?: Attrs): Command;
|
|
56
|
+
|
|
57
|
+
export { type Cell, type CellRange, type ColumnAlign, addColumn, addRow, cellSelection, cellSelectionKey, cellSelectionPlugin, cellsInRange, deleteCellContents, insertTable, moveColumn, moveRow, removeColumn, removeRow, selectCells, setCellsMark, setColumnAlign, setColumnWidth, toggleHeaderRow };
|
package/dist/table.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
addColumn,
|
|
4
|
+
addRow,
|
|
5
|
+
cellSelection,
|
|
6
|
+
cellSelectionKey,
|
|
7
|
+
cellSelectionPlugin,
|
|
8
|
+
cellsInRange,
|
|
9
|
+
deleteCellContents,
|
|
10
|
+
englishTableLabels,
|
|
11
|
+
insertTable,
|
|
12
|
+
moveColumn,
|
|
13
|
+
moveRow,
|
|
14
|
+
removeColumn,
|
|
15
|
+
removeRow,
|
|
16
|
+
selectCells,
|
|
17
|
+
setCellsMark,
|
|
18
|
+
setColumnAlign,
|
|
19
|
+
setColumnWidth,
|
|
20
|
+
tableExtension,
|
|
21
|
+
toggleHeaderRow
|
|
22
|
+
} from "./chunk-KXOBZGQO.js";
|
|
23
|
+
import "./chunk-ZGZEJCRV.js";
|
|
24
|
+
import "./chunk-ZS2WA357.js";
|
|
25
|
+
import "./chunk-XEBWC7ZL.js";
|
|
26
|
+
import "./chunk-HJIQT3S5.js";
|
|
27
|
+
import "./chunk-NOKWNK2O.js";
|
|
28
|
+
import "./chunk-LCQSG4M6.js";
|
|
29
|
+
export {
|
|
30
|
+
addColumn,
|
|
31
|
+
addRow,
|
|
32
|
+
cellSelection,
|
|
33
|
+
cellSelectionKey,
|
|
34
|
+
cellSelectionPlugin,
|
|
35
|
+
cellsInRange,
|
|
36
|
+
deleteCellContents,
|
|
37
|
+
englishTableLabels,
|
|
38
|
+
insertTable,
|
|
39
|
+
moveColumn,
|
|
40
|
+
moveRow,
|
|
41
|
+
removeColumn,
|
|
42
|
+
removeRow,
|
|
43
|
+
selectCells,
|
|
44
|
+
setCellsMark,
|
|
45
|
+
setColumnAlign,
|
|
46
|
+
setColumnWidth,
|
|
47
|
+
tableExtension,
|
|
48
|
+
toggleHeaderRow
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { S as Schema, Q as QuoinBlock } from './types-DULc8wwg.js';
|
|
2
|
+
import { E as EmbedProvider } from './embed-provider-jXwlRmnp.js';
|
|
3
|
+
|
|
4
|
+
type HTMLOptions = {
|
|
5
|
+
schema?: Schema;
|
|
6
|
+
/** The address of a stored picture or file. One that is no http, https, blob, data or relative address is left out. */
|
|
7
|
+
resolveAssetUrl?: (storageKey: string) => string;
|
|
8
|
+
renderMath?: (latex: string, options: {
|
|
9
|
+
displayMode: boolean;
|
|
10
|
+
}) => string;
|
|
11
|
+
embeds?: 'iframe' | 'link';
|
|
12
|
+
/** Tried before the built in providers, in order. Only used when `embeds` is `'iframe'`. */
|
|
13
|
+
embedProviders?: readonly EmbedProvider[];
|
|
14
|
+
/** The title of a frame given its provider's name, the name itself by default. */
|
|
15
|
+
frameTitle?: (provider: string) => string;
|
|
16
|
+
/** The accessible name of a task checkbox whose item has no text, `'Task'` by default. */
|
|
17
|
+
taskLabel?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const toHTML: (blocks: readonly QuoinBlock[], options?: HTMLOptions) => string;
|
|
20
|
+
|
|
21
|
+
export { type HTMLOptions as H, toHTML as t };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { S as Schema, Q as QuoinBlock } from './types-DULc8wwg.cjs';
|
|
2
|
+
import { E as EmbedProvider } from './embed-provider-jXwlRmnp.cjs';
|
|
3
|
+
|
|
4
|
+
type HTMLOptions = {
|
|
5
|
+
schema?: Schema;
|
|
6
|
+
/** The address of a stored picture or file. One that is no http, https, blob, data or relative address is left out. */
|
|
7
|
+
resolveAssetUrl?: (storageKey: string) => string;
|
|
8
|
+
renderMath?: (latex: string, options: {
|
|
9
|
+
displayMode: boolean;
|
|
10
|
+
}) => string;
|
|
11
|
+
embeds?: 'iframe' | 'link';
|
|
12
|
+
/** Tried before the built in providers, in order. Only used when `embeds` is `'iframe'`. */
|
|
13
|
+
embedProviders?: readonly EmbedProvider[];
|
|
14
|
+
/** The title of a frame given its provider's name, the name itself by default. */
|
|
15
|
+
frameTitle?: (provider: string) => string;
|
|
16
|
+
/** The accessible name of a task checkbox whose item has no text, `'Task'` by default. */
|
|
17
|
+
taskLabel?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const toHTML: (blocks: readonly QuoinBlock[], options?: HTMLOptions) => string;
|
|
20
|
+
|
|
21
|
+
export { type HTMLOptions as H, toHTML as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { E as Extension } from './types-Cz7XJLaK.cjs';
|
|
2
|
+
|
|
3
|
+
/** Every string the table of contents feature shows or speaks. */
|
|
4
|
+
type TocLabels = {
|
|
5
|
+
/** The slash command, and the name of a table of contents and of its navigation. */
|
|
6
|
+
tableOfContents: string;
|
|
7
|
+
/** The name of the navigation of the second table of contents in a document, and of those after it. */
|
|
8
|
+
tableOfContentsNumbered(n: number): string;
|
|
9
|
+
tableOfContentsDescription: string;
|
|
10
|
+
/** What a table of contents shows while the document has no headings. */
|
|
11
|
+
noHeadings: string;
|
|
12
|
+
};
|
|
13
|
+
declare const englishTocLabels: TocLabels;
|
|
14
|
+
|
|
15
|
+
type TocOptions = {
|
|
16
|
+
/** Every string the feature shows or speaks, English by default. A key left out stays English. */
|
|
17
|
+
labels?: Partial<TocLabels>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Table of contents: TOC blocks drawn as the headings of the document, linked and nested by level, and kept up to date
|
|
21
|
+
* as they are written, and a slash command that inserts one.
|
|
22
|
+
*/
|
|
23
|
+
declare function tocExtension(options?: TocOptions): Extension;
|
|
24
|
+
|
|
25
|
+
export { type TocLabels as T, type TocOptions as a, englishTocLabels as e, tocExtension as t };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { E as Extension } from './types-a1CRBlEh.js';
|
|
2
|
+
|
|
3
|
+
/** Every string the table of contents feature shows or speaks. */
|
|
4
|
+
type TocLabels = {
|
|
5
|
+
/** The slash command, and the name of a table of contents and of its navigation. */
|
|
6
|
+
tableOfContents: string;
|
|
7
|
+
/** The name of the navigation of the second table of contents in a document, and of those after it. */
|
|
8
|
+
tableOfContentsNumbered(n: number): string;
|
|
9
|
+
tableOfContentsDescription: string;
|
|
10
|
+
/** What a table of contents shows while the document has no headings. */
|
|
11
|
+
noHeadings: string;
|
|
12
|
+
};
|
|
13
|
+
declare const englishTocLabels: TocLabels;
|
|
14
|
+
|
|
15
|
+
type TocOptions = {
|
|
16
|
+
/** Every string the feature shows or speaks, English by default. A key left out stays English. */
|
|
17
|
+
labels?: Partial<TocLabels>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Table of contents: TOC blocks drawn as the headings of the document, linked and nested by level, and kept up to date
|
|
21
|
+
* as they are written, and a slash command that inserts one.
|
|
22
|
+
*/
|
|
23
|
+
declare function tocExtension(options?: TocOptions): Extension;
|
|
24
|
+
|
|
25
|
+
export { type TocLabels as T, type TocOptions as a, englishTocLabels as e, tocExtension as t };
|
package/dist/toc.cjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkCDELOHDYcjs = require('./chunk-CDELOHDY.cjs');
|
|
7
|
+
require('./chunk-2VDK27IF.cjs');
|
|
8
|
+
require('./chunk-GTTPVJSD.cjs');
|
|
9
|
+
require('./chunk-OMOBMXD5.cjs');
|
|
10
|
+
require('./chunk-PZ4GT5JO.cjs');
|
|
11
|
+
require('./chunk-2QCRZ7OL.cjs');
|
|
12
|
+
require('./chunk-ND5XJVK2.cjs');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
exports.englishTocLabels = _chunkCDELOHDYcjs.englishTocLabels; exports.headings = _chunkCDELOHDYcjs.headings; exports.tocExtension = _chunkCDELOHDYcjs.tocExtension;
|
|
18
|
+
//# sourceMappingURL=toc.cjs.map
|
package/dist/toc.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["toc.cjs"],"names":[],"mappings":"AAAA,qFAAY;AACZ;AACE;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACF,oKAAC","file":"/home/runner/work/quoin-editor/quoin-editor/dist/toc.cjs"}
|
package/dist/toc.d.cts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { T as TocLabels, a as TocOptions, e as englishTocLabels, t as tocExtension } from './toc-extension-B3-s6h2x.cjs';
|
|
2
|
+
import { E as EngineDoc, S as Schema } from './types-DULc8wwg.cjs';
|
|
3
|
+
import './types-Cz7XJLaK.cjs';
|
|
4
|
+
|
|
5
|
+
/** A heading of the document, as a table of contents lists it. */
|
|
6
|
+
type TocHeading = {
|
|
7
|
+
/** The id of the heading's block, which a link to the block names as `#block-<blockId>`. */
|
|
8
|
+
readonly blockId: string;
|
|
9
|
+
/** The id `toHTML` gives the heading's element, `h-<blockId>`. */
|
|
10
|
+
readonly anchor: string;
|
|
11
|
+
/** From 1 to 6. */
|
|
12
|
+
readonly level: number;
|
|
13
|
+
/** The heading's plain text. */
|
|
14
|
+
readonly text: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The headings of the document in order, as `toHTML` lists them in its table of contents: a heading with no text is
|
|
18
|
+
* left out. Their text is read with `schema`, the core one by default, which has to know any atom of the host's own.
|
|
19
|
+
*/
|
|
20
|
+
declare function headings(doc: EngineDoc, options?: {
|
|
21
|
+
schema?: Schema;
|
|
22
|
+
}): TocHeading[];
|
|
23
|
+
|
|
24
|
+
export { type TocHeading, headings };
|
package/dist/toc.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { T as TocLabels, a as TocOptions, e as englishTocLabels, t as tocExtension } from './toc-extension-DWm5alVj.js';
|
|
2
|
+
import { E as EngineDoc, S as Schema } from './types-DULc8wwg.js';
|
|
3
|
+
import './types-a1CRBlEh.js';
|
|
4
|
+
|
|
5
|
+
/** A heading of the document, as a table of contents lists it. */
|
|
6
|
+
type TocHeading = {
|
|
7
|
+
/** The id of the heading's block, which a link to the block names as `#block-<blockId>`. */
|
|
8
|
+
readonly blockId: string;
|
|
9
|
+
/** The id `toHTML` gives the heading's element, `h-<blockId>`. */
|
|
10
|
+
readonly anchor: string;
|
|
11
|
+
/** From 1 to 6. */
|
|
12
|
+
readonly level: number;
|
|
13
|
+
/** The heading's plain text. */
|
|
14
|
+
readonly text: string;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The headings of the document in order, as `toHTML` lists them in its table of contents: a heading with no text is
|
|
18
|
+
* left out. Their text is read with `schema`, the core one by default, which has to know any atom of the host's own.
|
|
19
|
+
*/
|
|
20
|
+
declare function headings(doc: EngineDoc, options?: {
|
|
21
|
+
schema?: Schema;
|
|
22
|
+
}): TocHeading[];
|
|
23
|
+
|
|
24
|
+
export { type TocHeading, headings };
|
package/dist/toc.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
englishTocLabels,
|
|
4
|
+
headings,
|
|
5
|
+
tocExtension
|
|
6
|
+
} from "./chunk-PMWCQSQX.js";
|
|
7
|
+
import "./chunk-ZGZEJCRV.js";
|
|
8
|
+
import "./chunk-ZS2WA357.js";
|
|
9
|
+
import "./chunk-XEBWC7ZL.js";
|
|
10
|
+
import "./chunk-HJIQT3S5.js";
|
|
11
|
+
import "./chunk-NOKWNK2O.js";
|
|
12
|
+
import "./chunk-LCQSG4M6.js";
|
|
13
|
+
export {
|
|
14
|
+
englishTocLabels,
|
|
15
|
+
headings,
|
|
16
|
+
tocExtension
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=toc.js.map
|
package/dist/toc.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"mappings":"","names":[]}
|