@notectl/core 1.0.6 → 1.0.8
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/README.md +78 -56
- package/custom-elements.json +344 -0
- package/dist/chunks/{AttrRegistry-DTsHyDVA.mjs → AttrRegistry-D-przlzb.mjs} +4 -4
- package/dist/chunks/{AttrRegistry-DTsHyDVA.mjs.map → AttrRegistry-D-przlzb.mjs.map} +1 -1
- package/dist/chunks/ColorNames-iaWsSZx1.mjs +35 -0
- package/dist/chunks/ColorNames-iaWsSZx1.mjs.map +1 -0
- package/dist/chunks/ColorValidation-Dyy4Bye8.mjs +140 -0
- package/dist/chunks/ColorValidation-Dyy4Bye8.mjs.map +1 -0
- package/dist/chunks/{Commands-DLP85Mp5.mjs → Commands-CSpSwGXv.mjs} +13 -13
- package/dist/chunks/{Commands-DLP85Mp5.mjs.map → Commands-CSpSwGXv.mjs.map} +1 -1
- package/dist/chunks/ToolbarKeyboardNav-B32OMv8r.mjs +46 -0
- package/dist/chunks/ToolbarKeyboardNav-B32OMv8r.mjs.map +1 -0
- package/dist/chunks/{ToolbarPlugin-sJTiZr-S.mjs → ToolbarPlugin-DY2xaJiu.mjs} +63 -93
- package/dist/chunks/ToolbarPlugin-DY2xaJiu.mjs.map +1 -0
- package/dist/chunks/index-BAk1EG1x.mjs +541 -0
- package/dist/chunks/index-BAk1EG1x.mjs.map +1 -0
- package/dist/chunks/index-BRYzYOYC.mjs +63 -0
- package/dist/chunks/index-BRYzYOYC.mjs.map +1 -0
- package/dist/chunks/index-BSFLNveF.mjs +953 -0
- package/dist/chunks/index-BSFLNveF.mjs.map +1 -0
- package/dist/chunks/index-BYgspns5.mjs +209 -0
- package/dist/chunks/index-BYgspns5.mjs.map +1 -0
- package/dist/chunks/index-B_3qDrUN.mjs +64 -0
- package/dist/chunks/index-B_3qDrUN.mjs.map +1 -0
- package/dist/chunks/index-Bsp4LC5t.mjs +130 -0
- package/dist/chunks/index-Bsp4LC5t.mjs.map +1 -0
- package/dist/chunks/index-C-YWHOcC.mjs +100 -0
- package/dist/chunks/index-C-YWHOcC.mjs.map +1 -0
- package/dist/chunks/index-C2GQoHot.mjs +92 -0
- package/dist/chunks/index-C2GQoHot.mjs.map +1 -0
- package/dist/chunks/index-CT3HGdQt.mjs +39 -0
- package/dist/chunks/index-CT3HGdQt.mjs.map +1 -0
- package/dist/chunks/index-Ct0ivLhO.mjs +407 -0
- package/dist/chunks/index-Ct0ivLhO.mjs.map +1 -0
- package/dist/chunks/index-CxiWyUho.mjs +191 -0
- package/dist/chunks/index-CxiWyUho.mjs.map +1 -0
- package/dist/chunks/index-D3CQWJiw.mjs +200 -0
- package/dist/chunks/index-D3CQWJiw.mjs.map +1 -0
- package/dist/chunks/index-DC1EK22F.mjs +41 -0
- package/dist/chunks/index-DC1EK22F.mjs.map +1 -0
- package/dist/chunks/index-Dh76rR13.mjs +196 -0
- package/dist/chunks/index-Dh76rR13.mjs.map +1 -0
- package/dist/chunks/index-o6hDR07y.mjs +41 -0
- package/dist/chunks/index-o6hDR07y.mjs.map +1 -0
- package/dist/chunks/index-uTnc9y7M.mjs +62 -0
- package/dist/chunks/index-uTnc9y7M.mjs.map +1 -0
- package/dist/chunks/resolvePluginLocale-B4w1OkPy.mjs +34 -0
- package/dist/chunks/resolvePluginLocale-B4w1OkPy.mjs.map +1 -0
- package/dist/editor/NotectlEditor.d.ts +10 -0
- package/dist/editor/NotectlEditor.d.ts.map +1 -1
- package/dist/editor/PaperLayoutController.d.ts +27 -0
- package/dist/editor/PaperLayoutController.d.ts.map +1 -0
- package/dist/editor/PaperSize.d.ts +35 -0
- package/dist/editor/PaperSize.d.ts.map +1 -0
- package/dist/editor/styles/color-picker.d.ts +1 -1
- package/dist/editor/styles/color-picker.d.ts.map +1 -1
- package/dist/editor/styles/paper.d.ts +3 -0
- package/dist/editor/styles/paper.d.ts.map +1 -0
- package/dist/editor/styles/table.d.ts +1 -1
- package/dist/editor/styles/table.d.ts.map +1 -1
- package/dist/editor/styles/toolbar.d.ts +1 -1
- package/dist/editor/styles/toolbar.d.ts.map +1 -1
- package/dist/editor/styles.d.ts.map +1 -1
- package/dist/i18n/Locale.d.ts +17 -0
- package/dist/i18n/Locale.d.ts.map +1 -0
- package/dist/i18n/LocaleService.d.ts +8 -0
- package/dist/i18n/LocaleService.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/resolvePluginLocale.d.ts +3 -0
- package/dist/i18n/resolvePluginLocale.d.ts.map +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/input/ClipboardHandler.d.ts.map +1 -1
- package/dist/input/InputHandler.d.ts.map +1 -1
- package/dist/input/KeyboardHandler.d.ts.map +1 -1
- package/dist/input/PasteHandler.d.ts.map +1 -1
- package/dist/notectl-core.mjs +2126 -1952
- package/dist/notectl-core.mjs.map +1 -1
- package/dist/notectl-core.umd.js +2002 -1544
- package/dist/notectl-core.umd.js.map +1 -1
- package/dist/plugins/PluginManager.d.ts +5 -0
- package/dist/plugins/PluginManager.d.ts.map +1 -1
- package/dist/plugins/alignment/AlignmentLocale.d.ts +19 -0
- package/dist/plugins/alignment/AlignmentLocale.d.ts.map +1 -0
- package/dist/plugins/alignment/AlignmentPlugin.d.ts +4 -0
- package/dist/plugins/alignment/AlignmentPlugin.d.ts.map +1 -1
- package/dist/plugins/alignment.mjs +3 -89
- package/dist/plugins/alignment.mjs.map +1 -1
- package/dist/plugins/blockquote/BlockquoteLocale.d.ts +17 -0
- package/dist/plugins/blockquote/BlockquoteLocale.d.ts.map +1 -0
- package/dist/plugins/blockquote/BlockquotePlugin.d.ts +3 -0
- package/dist/plugins/blockquote/BlockquotePlugin.d.ts.map +1 -1
- package/dist/plugins/blockquote.mjs +2 -55
- package/dist/plugins/blockquote.mjs.map +1 -1
- package/dist/plugins/code-block/CodeBlockLocale.d.ts +17 -0
- package/dist/plugins/code-block/CodeBlockLocale.d.ts.map +1 -0
- package/dist/plugins/code-block/CodeBlockPlugin.d.ts +1 -0
- package/dist/plugins/code-block/CodeBlockPlugin.d.ts.map +1 -1
- package/dist/plugins/code-block/CodeBlockTypes.d.ts +2 -0
- package/dist/plugins/code-block/CodeBlockTypes.d.ts.map +1 -1
- package/dist/plugins/code-block.mjs +3 -3
- package/dist/plugins/font/FontLocale.d.ts +15 -0
- package/dist/plugins/font/FontLocale.d.ts.map +1 -0
- package/dist/plugins/font/FontPlugin.d.ts +3 -0
- package/dist/plugins/font/FontPlugin.d.ts.map +1 -1
- package/dist/plugins/font-size/FontSizeLocale.d.ts +17 -0
- package/dist/plugins/font-size/FontSizeLocale.d.ts.map +1 -0
- package/dist/plugins/font-size/FontSizePlugin.d.ts +3 -0
- package/dist/plugins/font-size/FontSizePlugin.d.ts.map +1 -1
- package/dist/plugins/font-size/FontSizePopup.d.ts +2 -0
- package/dist/plugins/font-size/FontSizePopup.d.ts.map +1 -1
- package/dist/plugins/font-size.mjs +2 -201
- package/dist/plugins/font-size.mjs.map +1 -1
- package/dist/plugins/font.mjs +2 -183
- package/dist/plugins/font.mjs.map +1 -1
- package/dist/plugins/hard-break.mjs +1 -1
- package/dist/plugins/heading/HeadingLocale.d.ts +26 -0
- package/dist/plugins/heading/HeadingLocale.d.ts.map +1 -0
- package/dist/plugins/heading/HeadingPlugin.d.ts +4 -0
- package/dist/plugins/heading/HeadingPlugin.d.ts.map +1 -1
- package/dist/plugins/heading.mjs +1 -184
- package/dist/plugins/heading.mjs.map +1 -1
- package/dist/plugins/highlight/HighlightLocale.d.ts +17 -0
- package/dist/plugins/highlight/HighlightLocale.d.ts.map +1 -0
- package/dist/plugins/highlight/HighlightPlugin.d.ts +3 -5
- package/dist/plugins/highlight/HighlightPlugin.d.ts.map +1 -1
- package/dist/plugins/highlight.mjs +2 -123
- package/dist/plugins/highlight.mjs.map +1 -1
- package/dist/plugins/horizontal-rule/HorizontalRuleLocale.d.ts +15 -0
- package/dist/plugins/horizontal-rule/HorizontalRuleLocale.d.ts.map +1 -0
- package/dist/plugins/horizontal-rule/HorizontalRulePlugin.d.ts +4 -0
- package/dist/plugins/horizontal-rule/HorizontalRulePlugin.d.ts.map +1 -1
- package/dist/plugins/horizontal-rule.mjs +2 -56
- package/dist/plugins/horizontal-rule.mjs.map +1 -1
- package/dist/plugins/image/ImageLocale.d.ts +25 -0
- package/dist/plugins/image/ImageLocale.d.ts.map +1 -0
- package/dist/plugins/image/ImagePlugin.d.ts +1 -0
- package/dist/plugins/image/ImagePlugin.d.ts.map +1 -1
- package/dist/plugins/image/ImageUpload.d.ts +3 -0
- package/dist/plugins/image/ImageUpload.d.ts.map +1 -1
- package/dist/plugins/image.mjs +4 -378
- package/dist/plugins/image.mjs.map +1 -1
- package/dist/plugins/link/LinkLocale.d.ts +23 -0
- package/dist/plugins/link/LinkLocale.d.ts.map +1 -0
- package/dist/plugins/link/LinkPlugin.d.ts +3 -0
- package/dist/plugins/link/LinkPlugin.d.ts.map +1 -1
- package/dist/plugins/link.mjs +2 -124
- package/dist/plugins/link.mjs.map +1 -1
- package/dist/plugins/list/ListLocale.d.ts +18 -0
- package/dist/plugins/list/ListLocale.d.ts.map +1 -0
- package/dist/plugins/list/ListPlugin.d.ts +4 -0
- package/dist/plugins/list/ListPlugin.d.ts.map +1 -1
- package/dist/plugins/list.mjs +2 -190
- package/dist/plugins/list.mjs.map +1 -1
- package/dist/plugins/print/PrintLocale.d.ts +16 -0
- package/dist/plugins/print/PrintLocale.d.ts.map +1 -0
- package/dist/plugins/print/PrintPlugin.d.ts +1 -0
- package/dist/plugins/print/PrintPlugin.d.ts.map +1 -1
- package/dist/plugins/print/PrintStyleCollector.d.ts +7 -0
- package/dist/plugins/print/PrintStyleCollector.d.ts.map +1 -1
- package/dist/plugins/print/PrintTypes.d.ts +5 -0
- package/dist/plugins/print/PrintTypes.d.ts.map +1 -1
- package/dist/plugins/shared/ColorMarkOperations.d.ts +28 -0
- package/dist/plugins/shared/ColorMarkOperations.d.ts.map +1 -0
- package/dist/plugins/shared/ColorNames.d.ts +22 -0
- package/dist/plugins/shared/ColorNames.d.ts.map +1 -0
- package/dist/plugins/shared/ColorPickerPopup.d.ts +31 -0
- package/dist/plugins/shared/ColorPickerPopup.d.ts.map +1 -0
- package/dist/plugins/shared/ColorValidation.d.ts +14 -0
- package/dist/plugins/shared/ColorValidation.d.ts.map +1 -0
- package/dist/plugins/strikethrough/StrikethroughLocale.d.ts +17 -0
- package/dist/plugins/strikethrough/StrikethroughLocale.d.ts.map +1 -0
- package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts +3 -0
- package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts.map +1 -1
- package/dist/plugins/strikethrough.mjs +2 -32
- package/dist/plugins/strikethrough.mjs.map +1 -1
- package/dist/plugins/super-sub/SuperSubLocale.d.ts +19 -0
- package/dist/plugins/super-sub/SuperSubLocale.d.ts.map +1 -0
- package/dist/plugins/super-sub/SuperSubPlugin.d.ts +3 -0
- package/dist/plugins/super-sub/SuperSubPlugin.d.ts.map +1 -1
- package/dist/plugins/super-sub.mjs +2 -78
- package/dist/plugins/super-sub.mjs.map +1 -1
- package/dist/plugins/table/TableBorderColor.d.ts +24 -0
- package/dist/plugins/table/TableBorderColor.d.ts.map +1 -0
- package/dist/plugins/table/TableCommands.d.ts +9 -8
- package/dist/plugins/table/TableCommands.d.ts.map +1 -1
- package/dist/plugins/table/TableContextMenu.d.ts +14 -0
- package/dist/plugins/table/TableContextMenu.d.ts.map +1 -0
- package/dist/plugins/table/TableControls.d.ts +3 -1
- package/dist/plugins/table/TableControls.d.ts.map +1 -1
- package/dist/plugins/table/TableControlsDOM.d.ts +13 -1
- package/dist/plugins/table/TableControlsDOM.d.ts.map +1 -1
- package/dist/plugins/table/TableLocale.d.ts +48 -0
- package/dist/plugins/table/TableLocale.d.ts.map +1 -0
- package/dist/plugins/table/TableNavigation.d.ts +2 -1
- package/dist/plugins/table/TableNavigation.d.ts.map +1 -1
- package/dist/plugins/table/TableNodeViews.d.ts +3 -1
- package/dist/plugins/table/TableNodeViews.d.ts.map +1 -1
- package/dist/plugins/table/TablePlugin.d.ts +7 -1
- package/dist/plugins/table/TablePlugin.d.ts.map +1 -1
- package/dist/plugins/table/index.d.ts +3 -0
- package/dist/plugins/table/index.d.ts.map +1 -1
- package/dist/plugins/table.mjs +18 -660
- package/dist/plugins/table.mjs.map +1 -1
- package/dist/plugins/text-color/TextColorLocale.d.ts +17 -0
- package/dist/plugins/text-color/TextColorLocale.d.ts.map +1 -0
- package/dist/plugins/text-color/TextColorPlugin.d.ts +3 -5
- package/dist/plugins/text-color/TextColorPlugin.d.ts.map +1 -1
- package/dist/plugins/text-color.mjs +2 -123
- package/dist/plugins/text-color.mjs.map +1 -1
- package/dist/plugins/text-formatting/TextFormattingLocale.d.ts +18 -0
- package/dist/plugins/text-formatting/TextFormattingLocale.d.ts.map +1 -0
- package/dist/plugins/text-formatting/TextFormattingPlugin.d.ts +4 -0
- package/dist/plugins/text-formatting/TextFormattingPlugin.d.ts.map +1 -1
- package/dist/plugins/text-formatting.mjs +2 -49
- package/dist/plugins/text-formatting.mjs.map +1 -1
- package/dist/plugins/toolbar/ToolbarLocale.d.ts +14 -0
- package/dist/plugins/toolbar/ToolbarLocale.d.ts.map +1 -0
- package/dist/plugins/toolbar/ToolbarPlugin.d.ts +1 -0
- package/dist/plugins/toolbar/ToolbarPlugin.d.ts.map +1 -1
- package/dist/plugins/toolbar.mjs +1 -1
- package/dist/state/EditorState.d.ts +4 -1
- package/dist/state/EditorState.d.ts.map +1 -1
- package/dist/view/EditorView.d.ts.map +1 -1
- package/package.json +3 -2
- package/dist/chunks/Plugin-B9OZ6Y4c.mjs +0 -15
- package/dist/chunks/Plugin-B9OZ6Y4c.mjs.map +0 -1
- package/dist/chunks/ToolbarPlugin-sJTiZr-S.mjs.map +0 -1
- package/dist/chunks/color-picker-Csf0wx5a.mjs +0 -5
- package/dist/chunks/color-picker-Csf0wx5a.mjs.map +0 -1
- package/dist/chunks/index-QvKiO9_4.mjs +0 -538
- package/dist/chunks/index-QvKiO9_4.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SuperSubPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/super-sub/SuperSubPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"SuperSubPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/super-sub/SuperSubPlugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI7E,OAAO,QAAQ,6BAA6B,CAAC;IAC5C,UAAU,gBAAgB;QACzB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;KACjC;CACD;AAID,mDAAmD;AACnD,MAAM,WAAW,qBAAqB;IACrC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,4EAA4E;AAC5E,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,qBAAqB,CAAC;IACzC,sEAAsE;IACtE,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;CACjC;AAkGD,qBAAa,cAAe,YAAW,MAAM;IAC5C,QAAQ,CAAC,EAAE,eAAe;IAC1B,QAAQ,CAAC,IAAI,6BAA6B;IAC1C,QAAQ,CAAC,QAAQ,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,MAAM,CAAkB;gBAEpB,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;IAI5C,IAAI,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAsBlC,OAAO,CAAC,YAAY;IA6CpB,OAAO,CAAC,eAAe;IAWvB;;;;;OAKG;IACH,OAAO,CAAC,6BAA6B;IA+DrC;;;OAGG;IACH,OAAO,CAAC,4BAA4B;IAuBpC,OAAO,CAAC,gBAAgB;CAMxB"}
|
|
@@ -1,81 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { m as e } from "../chunks/TypeBrands-C09nE2qO.mjs";
|
|
3
|
-
import { f as i } from "../chunks/ToolbarItem-ugDymuXi.mjs";
|
|
4
|
-
const r = { superscript: true, subscript: true }, o = [{ type: "superscript", opposite: "subscript", configKey: "superscript", rank: 4, tag: "sup", label: "Superscript", icon: ['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">', '<path d="M16 7.41L11.41 12 16 16.59 14.59 18l-6-6 6-6z"', ' fill="none"/>', '<path d="M9.64 7.64c.23-.5.36-1.05.36-1.64', " 0-2.21-1.79-4-4-4H2v14h4.36c2.34 0 4.24-1.9", " 4.24-4.24 0-1.6-.89-2.99-2.2-3.71zM4.5 4.5H6c.83", " 0 1.5.67 1.5 1.5S6.83 7.5 6 7.5H4.5v-3zm2 9H4.5v-3H6.5c.83", ' 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z" fill="none"/>', '<path d="M15.97 3.84c0-.47.19-.91.53-1.21.34-.31.8-.49', " 1.3-.49.5 0 .95.18 1.28.48.32.3.5.7.51 1.15h1.59c-.02", "-.96-.43-1.83-1.13-2.42C19.36.77 18.45.44 17.5.44c-.88", " 0-1.74.28-2.39.8-.67.53-1.06 1.28-1.06 2.1 0 .76.34", " 1.47.93 1.97.59.49 1.41.84 2.32 1.15.7.24 1.26.5 1.62.8.35.3.53.64.53", " 1.02 0 .48-.2.93-.55 1.24-.36.3-.84.48-1.37.48-.55 0-1.04-.2-1.39-.54", "-.34-.33-.53-.8-.53-1.32h-1.58c.01 1.02.43 1.95 1.16 2.57.72.62 1.67.96", " 2.67.96.92 0 1.81-.3 2.46-.84.67-.56 1.04-1.33 1.04-2.18 0-.81-.36-1.56", "-.99-2.08-.62-.51-1.48-.88-2.43-1.2-.67-.23-1.2-.47-1.52-.75-.32-.27-.46", '-.59-.46-.94z"/>', '<path d="M5.88 20h2.66l3.4-5.42L15.3 20h2.67l-4.73-7.38', ' 4.37-6.62h-2.6l-3.07 4.98L8.92 6h-2.6l4.26 6.58z"/>', "</svg>"].join(""), keyBinding: "Mod-.", toolbarPriority: 50, toHTMLString: (t2) => `<sup>${t2}</sup>`, parseHTML: [{ tag: "sup" }], sanitize: { tags: ["sup"] } }, { type: "subscript", opposite: "superscript", configKey: "subscript", rank: 4, tag: "sub", label: "Subscript", icon: ['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">', '<path d="M15.97 16.84c0-.47.19-.91.53-1.21.34-.31.8-.49', " 1.3-.49.5 0 .95.18 1.28.48.32.3.5.7.51 1.15h1.59c-.02", "-.96-.43-1.83-1.13-2.42-.7-.58-1.61-.91-2.56-.91-.88", " 0-1.74.28-2.39.8-.67.53-1.06 1.28-1.06 2.1 0 .76.34", " 1.47.93 1.97.59.49 1.41.84 2.32 1.15.7.24 1.26.5 1.62.8.35.3.53.64.53", " 1.02 0 .48-.2.93-.55 1.24-.36.3-.84.48-1.37.48-.55 0-1.04-.2-1.39-.54", "-.34-.33-.53-.8-.53-1.32h-1.58c.01 1.02.43 1.95 1.16 2.57.72.62 1.67.96", " 2.67.96.92 0 1.81-.3 2.46-.84.67-.56 1.04-1.33 1.04-2.18 0-.81-.36-1.56", "-.99-2.08-.62-.51-1.48-.88-2.43-1.2-.67-.23-1.2-.47-1.52-.75-.32-.27-.46", '-.59-.46-.94z"/>', '<path d="M5.88 18h2.66l3.4-5.42L15.3 18h2.67l-4.73-7.38', ' 4.37-6.62h-2.6l-3.07 4.98L8.92 4h-2.6l4.26 6.58z"/>', "</svg>"].join(""), keyBinding: "Mod-,", toolbarPriority: 51, toHTMLString: (t2) => `<sub>${t2}</sub>`, parseHTML: [{ tag: "sub" }], sanitize: { tags: ["sub"] } }];
|
|
5
|
-
class p {
|
|
6
|
-
id = "super-sub";
|
|
7
|
-
name = "Superscript & Subscript";
|
|
8
|
-
priority = 23;
|
|
9
|
-
config;
|
|
10
|
-
constructor(t2) {
|
|
11
|
-
this.config = { ...r, ...t2 };
|
|
12
|
-
}
|
|
13
|
-
init(t2) {
|
|
14
|
-
const s2 = o.filter((t3) => this.config[t3.configKey]), e2 = s2.filter((t3) => this.isToolbarVisible(t3.configKey)).at(-1);
|
|
15
|
-
for (const i2 of s2) {
|
|
16
|
-
const s3 = !!this.config.separatorAfter && i2 === e2;
|
|
17
|
-
this.registerMark(t2, i2, s3);
|
|
18
|
-
}
|
|
19
|
-
this.registerKeymaps(t2, s2), this.registerExclusivityMiddleware(t2, s2), this.registerDisabledToolbarItems(t2);
|
|
20
|
-
}
|
|
21
|
-
registerMark(r2, o2, p2) {
|
|
22
|
-
const a = n(o2.type), c = this.isToolbarVisible(o2.configKey);
|
|
23
|
-
r2.registerMarkSpec({ type: o2.type, rank: o2.rank, toDOM: () => document.createElement(o2.tag), toHTMLString: (t2, s2) => o2.toHTMLString(s2), parseHTML: o2.parseHTML, sanitize: o2.sanitize }), r2.registerCommand(a, () => {
|
|
24
|
-
const s2 = t(r2.getState(), e(o2.type));
|
|
25
|
-
return !!s2 && (r2.dispatch(s2), true);
|
|
26
|
-
}), c && r2.registerToolbarItem({ id: o2.type, group: "format", icon: o2.icon, label: o2.label, tooltip: `${o2.label} (${i(o2.keyBinding)})`, command: a, priority: o2.toolbarPriority, separatorAfter: p2, isActive: (t2) => s(t2, e(o2.type)) });
|
|
27
|
-
}
|
|
28
|
-
registerKeymaps(t2, s2) {
|
|
29
|
-
const e2 = {};
|
|
30
|
-
for (const i2 of s2) {
|
|
31
|
-
const s3 = n(i2.type);
|
|
32
|
-
e2[i2.keyBinding] = () => t2.executeCommand(s3);
|
|
33
|
-
}
|
|
34
|
-
Object.keys(e2).length > 0 && t2.registerKeymap(e2);
|
|
35
|
-
}
|
|
36
|
-
registerExclusivityMiddleware(t2, s2) {
|
|
37
|
-
s2.some((t3) => "superscript" === t3.type) && s2.some((t3) => "subscript" === t3.type) && t2.registerMiddleware((t3, s3, i2) => {
|
|
38
|
-
let r2 = false;
|
|
39
|
-
const p2 = [];
|
|
40
|
-
for (const s4 of t3.steps) {
|
|
41
|
-
if ("addMark" !== s4.type) {
|
|
42
|
-
p2.push(s4);
|
|
43
|
-
continue;
|
|
44
|
-
}
|
|
45
|
-
const t4 = s4.mark.type, i3 = o.find((s5) => s5.type === t4);
|
|
46
|
-
if (!i3) {
|
|
47
|
-
p2.push(s4);
|
|
48
|
-
continue;
|
|
49
|
-
}
|
|
50
|
-
r2 = true;
|
|
51
|
-
const n3 = { type: "removeMark", blockId: s4.blockId, from: s4.from, to: s4.to, mark: { type: e(i3.opposite) }, ...s4.path ? { path: s4.path } : {} };
|
|
52
|
-
p2.push(n3, s4);
|
|
53
|
-
}
|
|
54
|
-
let n2 = t3.storedMarksAfter;
|
|
55
|
-
if (n2) {
|
|
56
|
-
const t4 = n2.some((t5) => "superscript" === t5.type), s4 = n2.some((t5) => "subscript" === t5.type);
|
|
57
|
-
if (t4 && s4) {
|
|
58
|
-
const t5 = n2.findLastIndex((t6) => "superscript" === t6.type) > n2.findLastIndex((t6) => "subscript" === t6.type) ? "subscript" : "superscript";
|
|
59
|
-
n2 = n2.filter((s5) => s5.type !== t5), r2 = true;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
i2(r2 ? { ...t3, steps: p2, storedMarksAfter: n2 } : t3);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
registerDisabledToolbarItems(t2) {
|
|
66
|
-
if (this.config.toolbar) for (const s2 of o) {
|
|
67
|
-
const e2 = this.config[s2.configKey], i2 = this.config.toolbar[s2.configKey] ?? true;
|
|
68
|
-
!e2 && i2 && t2.registerToolbarItem({ id: s2.type, group: "format", icon: s2.icon, label: s2.label, command: n(s2.type), priority: s2.toolbarPriority, isEnabled: () => false });
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
isToolbarVisible(t2) {
|
|
72
|
-
return !this.config.toolbar || (this.config.toolbar[t2] ?? true);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function n(t2) {
|
|
76
|
-
return `toggle${t2.charAt(0).toUpperCase()}${t2.slice(1)}`;
|
|
77
|
-
}
|
|
1
|
+
import { b } from "../chunks/index-C2GQoHot.mjs";
|
|
78
2
|
export {
|
|
79
|
-
|
|
3
|
+
b as SuperSubPlugin
|
|
80
4
|
};
|
|
81
5
|
//# sourceMappingURL=super-sub.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"super-sub.mjs","sources":["../../src/plugins/super-sub/SuperSubPlugin.ts"],"sourcesContent":["/**\n * SuperSubPlugin: registers superscript and subscript inline marks with\n * MarkSpecs, toggle commands, keyboard shortcuts, toolbar buttons, and\n * a middleware that enforces mutual exclusivity between the two marks.\n *\n * Data-driven — each mark type is defined declaratively and all\n * registrations are derived from the same definition table.\n */\n\nimport { isMarkActive, toggleMark } from '../../commands/Commands.js';\nimport type { Mark } from '../../model/Document.js';\nimport type { ParseRule } from '../../model/ParseRule.js';\nimport type { SanitizeConfig } from '../../model/SanitizeConfig.js';\nimport { markType as mkType } from '../../model/TypeBrands.js';\nimport type { RemoveMarkStep, Step } from '../../state/Transaction.js';\nimport type { Plugin, PluginContext } from '../Plugin.js';\nimport { formatShortcut } from '../toolbar/ToolbarItem.js';\n\n// --- Attribute Registry Augmentation ---\n\ndeclare module '../../model/AttrRegistry.js' {\n\tinterface MarkAttrRegistry {\n\t\tsuperscript: Record<string, never>;\n\t\tsubscript: Record<string, never>;\n\t}\n}\n\n// --- Configuration ---\n\n/** Controls toolbar button visibility per mark. */\nexport interface SuperSubToolbarConfig {\n\treadonly superscript?: boolean;\n\treadonly subscript?: boolean;\n}\n\n/** Controls which marks are enabled and which toolbar buttons are shown. */\nexport interface SuperSubConfig {\n\treadonly superscript: boolean;\n\treadonly subscript: boolean;\n\treadonly toolbar?: SuperSubToolbarConfig;\n\t/** When true, a separator is rendered after the last toolbar item. */\n\treadonly separatorAfter?: boolean;\n}\n\nconst DEFAULT_CONFIG: SuperSubConfig = {\n\tsuperscript: true,\n\tsubscript: true,\n};\n\n// --- Mark Definitions ---\n\ninterface MarkDefinition {\n\treadonly type: 'superscript' | 'subscript';\n\treadonly opposite: 'superscript' | 'subscript';\n\treadonly configKey: keyof Omit<SuperSubConfig, 'toolbar' | 'separatorAfter'>;\n\treadonly rank: number;\n\treadonly tag: string;\n\treadonly label: string;\n\treadonly icon: string;\n\treadonly keyBinding: string;\n\treadonly toolbarPriority: number;\n\treadonly toHTMLString: (content: string) => string;\n\treadonly parseHTML: readonly ParseRule[];\n\treadonly sanitize: SanitizeConfig;\n}\n\nconst SUPERSCRIPT_ICON: string = [\n\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">',\n\t'<path d=\"M16 7.41L11.41 12 16 16.59 14.59 18l-6-6 6-6z\"',\n\t' fill=\"none\"/>',\n\t'<path d=\"M9.64 7.64c.23-.5.36-1.05.36-1.64',\n\t' 0-2.21-1.79-4-4-4H2v14h4.36c2.34 0 4.24-1.9',\n\t' 4.24-4.24 0-1.6-.89-2.99-2.2-3.71zM4.5 4.5H6c.83',\n\t' 0 1.5.67 1.5 1.5S6.83 7.5 6 7.5H4.5v-3zm2 9H4.5v-3H6.5c.83',\n\t' 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z\" fill=\"none\"/>',\n\t'<path d=\"M15.97 3.84c0-.47.19-.91.53-1.21.34-.31.8-.49',\n\t' 1.3-.49.5 0 .95.18 1.28.48.32.3.5.7.51 1.15h1.59c-.02',\n\t'-.96-.43-1.83-1.13-2.42C19.36.77 18.45.44 17.5.44c-.88',\n\t' 0-1.74.28-2.39.8-.67.53-1.06 1.28-1.06 2.1 0 .76.34',\n\t' 1.47.93 1.97.59.49 1.41.84 2.32 1.15.7.24 1.26.5 1.62.8.35.3.53.64.53',\n\t' 1.02 0 .48-.2.93-.55 1.24-.36.3-.84.48-1.37.48-.55 0-1.04-.2-1.39-.54',\n\t'-.34-.33-.53-.8-.53-1.32h-1.58c.01 1.02.43 1.95 1.16 2.57.72.62 1.67.96',\n\t' 2.67.96.92 0 1.81-.3 2.46-.84.67-.56 1.04-1.33 1.04-2.18 0-.81-.36-1.56',\n\t'-.99-2.08-.62-.51-1.48-.88-2.43-1.2-.67-.23-1.2-.47-1.52-.75-.32-.27-.46',\n\t'-.59-.46-.94z\"/>',\n\t'<path d=\"M5.88 20h2.66l3.4-5.42L15.3 20h2.67l-4.73-7.38',\n\t' 4.37-6.62h-2.6l-3.07 4.98L8.92 6h-2.6l4.26 6.58z\"/>',\n\t'</svg>',\n].join('');\n\nconst SUBSCRIPT_ICON: string = [\n\t'<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">',\n\t'<path d=\"M15.97 16.84c0-.47.19-.91.53-1.21.34-.31.8-.49',\n\t' 1.3-.49.5 0 .95.18 1.28.48.32.3.5.7.51 1.15h1.59c-.02',\n\t'-.96-.43-1.83-1.13-2.42-.7-.58-1.61-.91-2.56-.91-.88',\n\t' 0-1.74.28-2.39.8-.67.53-1.06 1.28-1.06 2.1 0 .76.34',\n\t' 1.47.93 1.97.59.49 1.41.84 2.32 1.15.7.24 1.26.5 1.62.8.35.3.53.64.53',\n\t' 1.02 0 .48-.2.93-.55 1.24-.36.3-.84.48-1.37.48-.55 0-1.04-.2-1.39-.54',\n\t'-.34-.33-.53-.8-.53-1.32h-1.58c.01 1.02.43 1.95 1.16 2.57.72.62 1.67.96',\n\t' 2.67.96.92 0 1.81-.3 2.46-.84.67-.56 1.04-1.33 1.04-2.18 0-.81-.36-1.56',\n\t'-.99-2.08-.62-.51-1.48-.88-2.43-1.2-.67-.23-1.2-.47-1.52-.75-.32-.27-.46',\n\t'-.59-.46-.94z\"/>',\n\t'<path d=\"M5.88 18h2.66l3.4-5.42L15.3 18h2.67l-4.73-7.38',\n\t' 4.37-6.62h-2.6l-3.07 4.98L8.92 4h-2.6l4.26 6.58z\"/>',\n\t'</svg>',\n].join('');\n\nconst MARK_DEFINITIONS: readonly MarkDefinition[] = [\n\t{\n\t\ttype: 'superscript',\n\t\topposite: 'subscript',\n\t\tconfigKey: 'superscript',\n\t\trank: 4,\n\t\ttag: 'sup',\n\t\tlabel: 'Superscript',\n\t\ticon: SUPERSCRIPT_ICON,\n\t\tkeyBinding: 'Mod-.',\n\t\ttoolbarPriority: 50,\n\t\ttoHTMLString: (content) => `<sup>${content}</sup>`,\n\t\tparseHTML: [{ tag: 'sup' }],\n\t\tsanitize: { tags: ['sup'] },\n\t},\n\t{\n\t\ttype: 'subscript',\n\t\topposite: 'superscript',\n\t\tconfigKey: 'subscript',\n\t\trank: 4,\n\t\ttag: 'sub',\n\t\tlabel: 'Subscript',\n\t\ticon: SUBSCRIPT_ICON,\n\t\tkeyBinding: 'Mod-,',\n\t\ttoolbarPriority: 51,\n\t\ttoHTMLString: (content) => `<sub>${content}</sub>`,\n\t\tparseHTML: [{ tag: 'sub' }],\n\t\tsanitize: { tags: ['sub'] },\n\t},\n];\n\n// --- Plugin ---\n\nexport class SuperSubPlugin implements Plugin {\n\treadonly id = 'super-sub';\n\treadonly name = 'Superscript & Subscript';\n\treadonly priority = 23;\n\n\tprivate readonly config: SuperSubConfig;\n\n\tconstructor(config?: Partial<SuperSubConfig>) {\n\t\tthis.config = { ...DEFAULT_CONFIG, ...config };\n\t}\n\n\tinit(context: PluginContext): void {\n\t\tconst enabledMarks: MarkDefinition[] = MARK_DEFINITIONS.filter(\n\t\t\t(def) => this.config[def.configKey],\n\t\t);\n\n\t\tconst visibleToolbarMarks: MarkDefinition[] = enabledMarks.filter((def) =>\n\t\t\tthis.isToolbarVisible(def.configKey),\n\t\t);\n\t\tconst lastVisibleMark: MarkDefinition | undefined = visibleToolbarMarks.at(-1);\n\n\t\tfor (const def of enabledMarks) {\n\t\t\tconst isSeparatorTarget: boolean = !!this.config.separatorAfter && def === lastVisibleMark;\n\t\t\tthis.registerMark(context, def, isSeparatorTarget);\n\t\t}\n\n\t\tthis.registerKeymaps(context, enabledMarks);\n\t\tthis.registerExclusivityMiddleware(context, enabledMarks);\n\t\tthis.registerDisabledToolbarItems(context);\n\t}\n\n\tprivate registerMark(context: PluginContext, def: MarkDefinition, separatorAfter: boolean): void {\n\t\tconst commandName: string = toCommandName(def.type);\n\t\tconst toolbarVisible: boolean = this.isToolbarVisible(def.configKey);\n\n\t\tcontext.registerMarkSpec({\n\t\t\ttype: def.type,\n\t\t\trank: def.rank,\n\t\t\ttoDOM() {\n\t\t\t\treturn document.createElement(def.tag);\n\t\t\t},\n\t\t\ttoHTMLString: (_mark, content) => def.toHTMLString(content),\n\t\t\tparseHTML: def.parseHTML,\n\t\t\tsanitize: def.sanitize,\n\t\t});\n\n\t\tcontext.registerCommand(commandName, () => {\n\t\t\tconst tr = toggleMark(context.getState(), mkType(def.type));\n\t\t\tif (tr) {\n\t\t\t\tcontext.dispatch(tr);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t});\n\n\t\tif (toolbarVisible) {\n\t\t\tcontext.registerToolbarItem({\n\t\t\t\tid: def.type,\n\t\t\t\tgroup: 'format',\n\t\t\t\ticon: def.icon,\n\t\t\t\tlabel: def.label,\n\t\t\t\ttooltip: `${def.label} (${formatShortcut(def.keyBinding)})`,\n\t\t\t\tcommand: commandName,\n\t\t\t\tpriority: def.toolbarPriority,\n\t\t\t\tseparatorAfter,\n\t\t\t\tisActive: (state) => isMarkActive(state, mkType(def.type)),\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate registerKeymaps(context: PluginContext, marks: readonly MarkDefinition[]): void {\n\t\tconst keymap: Record<string, () => boolean> = {};\n\t\tfor (const def of marks) {\n\t\t\tconst commandName: string = toCommandName(def.type);\n\t\t\tkeymap[def.keyBinding] = () => context.executeCommand(commandName);\n\t\t}\n\t\tif (Object.keys(keymap).length > 0) {\n\t\t\tcontext.registerKeymap(keymap);\n\t\t}\n\t}\n\n\t/**\n\t * Ensures superscript and subscript are mutually exclusive.\n\t * When an addMark step for one type is found, a removeMark step\n\t * for the opposite type is injected. For stored marks, the opposite\n\t * mark is filtered out.\n\t */\n\tprivate registerExclusivityMiddleware(\n\t\tcontext: PluginContext,\n\t\tenabledMarks: readonly MarkDefinition[],\n\t): void {\n\t\tconst bothEnabled: boolean =\n\t\t\tenabledMarks.some((d) => d.type === 'superscript') &&\n\t\t\tenabledMarks.some((d) => d.type === 'subscript');\n\n\t\tif (!bothEnabled) return;\n\n\t\tcontext.registerMiddleware((tr, _state, next) => {\n\t\t\tlet patched = false;\n\n\t\t\t// Handle addMark steps: inject removeMark for the opposite type\n\t\t\tconst patchedSteps: Step[] = [];\n\t\t\tfor (const step of tr.steps) {\n\t\t\t\tif (step.type !== 'addMark') {\n\t\t\t\t\tpatchedSteps.push(step);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst markName: string = step.mark.type;\n\t\t\t\tconst def: MarkDefinition | undefined = MARK_DEFINITIONS.find((d) => d.type === markName);\n\t\t\t\tif (!def) {\n\t\t\t\t\tpatchedSteps.push(step);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tpatched = true;\n\t\t\t\tconst removeStep: RemoveMarkStep = {\n\t\t\t\t\ttype: 'removeMark',\n\t\t\t\t\tblockId: step.blockId,\n\t\t\t\t\tfrom: step.from,\n\t\t\t\t\tto: step.to,\n\t\t\t\t\tmark: { type: mkType(def.opposite) },\n\t\t\t\t\t...(step.path ? { path: step.path } : {}),\n\t\t\t\t};\n\t\t\t\tpatchedSteps.push(removeStep, step);\n\t\t\t}\n\n\t\t\t// Handle stored marks: remove the opposite mark\n\t\t\tlet storedMarksAfter: readonly Mark[] | null = tr.storedMarksAfter;\n\t\t\tif (storedMarksAfter) {\n\t\t\t\tconst hasSup: boolean = storedMarksAfter.some((m) => m.type === 'superscript');\n\t\t\t\tconst hasSub: boolean = storedMarksAfter.some((m) => m.type === 'subscript');\n\n\t\t\t\tif (hasSup && hasSub) {\n\t\t\t\t\t// Keep the one that was most recently added (last in array)\n\t\t\t\t\tconst lastSupIdx: number = storedMarksAfter.findLastIndex(\n\t\t\t\t\t\t(m) => m.type === 'superscript',\n\t\t\t\t\t);\n\t\t\t\t\tconst lastSubIdx: number = storedMarksAfter.findLastIndex((m) => m.type === 'subscript');\n\t\t\t\t\tconst removeType: string = lastSupIdx > lastSubIdx ? 'subscript' : 'superscript';\n\n\t\t\t\t\tstoredMarksAfter = storedMarksAfter.filter((m) => m.type !== removeType);\n\t\t\t\t\tpatched = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tnext(patched ? { ...tr, steps: patchedSteps, storedMarksAfter } : tr);\n\t\t});\n\t}\n\n\t/**\n\t * Registers disabled toolbar buttons for marks whose feature is disabled\n\t * but whose toolbar button is explicitly requested.\n\t */\n\tprivate registerDisabledToolbarItems(context: PluginContext): void {\n\t\tif (!this.config.toolbar) return;\n\n\t\tfor (const def of MARK_DEFINITIONS) {\n\t\t\tconst featureEnabled: boolean = this.config[def.configKey];\n\t\t\tconst toolbarVisible: boolean = this.config.toolbar[def.configKey] ?? true;\n\n\t\t\tif (!featureEnabled && toolbarVisible) {\n\t\t\t\tcontext.registerToolbarItem({\n\t\t\t\t\tid: def.type,\n\t\t\t\t\tgroup: 'format',\n\t\t\t\t\ticon: def.icon,\n\t\t\t\t\tlabel: def.label,\n\t\t\t\t\tcommand: toCommandName(def.type),\n\t\t\t\t\tpriority: def.toolbarPriority,\n\t\t\t\t\tisEnabled: () => false,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate isToolbarVisible(\n\t\tconfigKey: keyof Omit<SuperSubConfig, 'toolbar' | 'separatorAfter'>,\n\t): boolean {\n\t\tif (!this.config.toolbar) return true;\n\t\treturn this.config.toolbar[configKey] ?? true;\n\t}\n}\n\n/** Converts a mark type to its toggle command name (e.g. 'superscript' → 'toggleSuperscript'). */\nfunction toCommandName(markType: string): string {\n\treturn `toggle${markType.charAt(0).toUpperCase()}${markType.slice(1)}`;\n}\n"],"names":["DEFAULT_CONFIG","superscript","subscript","MARK_DEFINITIONS","type","opposite","configKey","rank","tag","label","icon","join","keyBinding","toolbarPriority","toHTMLString","content","parseHTML","sanitize","tags","SuperSubPlugin","id","name","priority","config","this","context","enabledMarks","filter","def","lastVisibleMark","isToolbarVisible","at","isSeparatorTarget","separatorAfter","registerMark","registerKeymaps","registerExclusivityMiddleware","registerDisabledToolbarItems","commandName","toCommandName","toolbarVisible","registerMarkSpec","toDOM","document","createElement","_mark","registerCommand","tr","toggleMark","getState","mkType","dispatch","registerToolbarItem","group","tooltip","formatShortcut","command","isActive","state","isMarkActive","marks","keymap","executeCommand","Object","keys","length","registerKeymap","some","d","registerMiddleware","_state","next","patched","patchedSteps","step","steps","push","markName","mark","find","removeStep","blockId","from","to","path","storedMarksAfter","hasSup","m","hasSub","removeType","findLastIndex","toolbar","featureEnabled","isEnabled","markType","charAt","toUpperCase","slice"],"mappings":";;;AA4CA,MAAMA,IAAiC,EACtCC,aAAAA,MACAC,WAAAA,QA6DKC,IAA8C,CACnD,EACCC,MAAM,eACNC,UAAU,aACVC,WAAW,eACXC,MAAM,GACNC,KAAK,OACLC,OAAO,eACPC,MAjD+B,CAChC,gEACA,2DACA,kBACA,8CACA,gDACA,qDACA,+DACA,sDACA,0DACA,0DACA,0DACA,wDACA,0EACA,0EACA,2EACA,4EACA,4EACA,oBACA,2DACA,wDACA,QAAA,EACCC,KAAK,EAAA,GA4BLC,YAAY,SACZC,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,GAAiB1D,OAAQ4D,CAAAA,OAAMA,GAAEnF,SAASqF,EAAAA,GAC7DjB,KAAAA;AAAAA,QACD;AAAA,MACD;AAEAD,MAAAA,GAAKC,KAAU,EAAA,GAAKzB,IAAI4B,OAAOF,IAAcY,yBAAqBtC,EAAAA;AAAAA,IAAAA,CAAAA;AAAAA,EAEpE;AAAA,EAMQ,6BAA6BtB,IAAAA;AACpC,QAAKD,KAAKD,OAAOoE,QAEjB,YAAW/D,MAAOzB,GAAkB;AACnC,YAAMyF,KAA0BpE,KAAKD,OAAOK,GAAItB,SAAAA,GAC1CkC,KAA0BhB,KAAKD,OAAOoE,QAAQ/D,GAAItB;AAAc,OAEjEsF,MAAkBpD,MACtBf,GAAQ2B,oBAAoB,EAC3BhC,IAAIQ,GAAIxB,MACRiD,OAAO,UACP3C,MAAMkB,GAAIlB,MACVD,OAAOmB,GAAInB,OACX+C,SAASjB,EAAcX,GAAIxB,IAAAA,GAC3BkB,UAAUM,GAAIf,iBACdgF,WAAW,MAAA;IAGd;AAAA,EACD;AAAA,EAEQ,iBACPvF,IAAAA;AAEA,WAAA,CAAKkB,KAAKD,OAAOoE,YACVnE,KAAKD,OAAOoE,QAAQrF,EAAAA,KAAAA;AAAAA,EAC5B;AAAA;AAID,SAASiC,EAAcuD;AACtB,SAAO,SAASA,GAASC,OAAO,CAAA,EAAGC,YAAAA,CAAAA,GAAgBF,GAASG,MAAM;AACnE;"}
|
|
1
|
+
{"version":3,"file":"super-sub.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BlockId } from '../../model/TypeBrands.js';
|
|
2
|
+
import { EditorState } from '../../state/EditorState.js';
|
|
3
|
+
import { Transaction } from '../../state/Transaction.js';
|
|
4
|
+
import { PluginContext } from '../Plugin.js';
|
|
5
|
+
import { TableLocale } from './TableLocale.js';
|
|
6
|
+
/** Subdued, border-appropriate colors: grays, earth tones, muted hues. */
|
|
7
|
+
export declare const BORDER_COLOR_PALETTE: readonly string[];
|
|
8
|
+
/**
|
|
9
|
+
* Builds a transaction that sets `borderColor` on a table node.
|
|
10
|
+
* Preserves existing attributes (spread pattern).
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildSetBorderColorTransaction(state: EditorState, tableId: BlockId, borderColor: string | undefined): Transaction | null;
|
|
13
|
+
/** Sets the border color on the table surrounding the cursor. */
|
|
14
|
+
export declare function setTableBorderColor(context: PluginContext, color: string, locale?: TableLocale): boolean;
|
|
15
|
+
/** Resets the border color to theme default. */
|
|
16
|
+
export declare function resetTableBorderColor(context: PluginContext, locale?: TableLocale): boolean;
|
|
17
|
+
/** Reads the current border color from a table node. */
|
|
18
|
+
export declare function getTableBorderColor(state: EditorState, tableId: BlockId): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Renders an accessible border color picker into a container element.
|
|
21
|
+
* Includes "Default", "No borders", and a WAI-ARIA grid of color swatches.
|
|
22
|
+
*/
|
|
23
|
+
export declare function renderBorderColorPicker(container: HTMLElement, context: PluginContext, tableId: BlockId, onClose: () => void, locale?: TableLocale): void;
|
|
24
|
+
//# sourceMappingURL=TableBorderColor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableBorderColor.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableBorderColor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAIlD,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIrE,0EAA0E;AAC1E,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAqBjD,CAAC;AAYF;;;GAGG;AACH,wBAAgB,8BAA8B,CAC7C,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,MAAM,GAAG,SAAS,GAC7B,WAAW,GAAG,IAAI,CA2BpB;AAID,iEAAiE;AACjE,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,WAA6B,GACnC,OAAO,CAaT;AAED,gDAAgD;AAChD,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,aAAa,EACtB,MAAM,GAAE,WAA6B,GACnC,OAAO,CAYT;AAED,wDAAwD;AACxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAI5F;AAID;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,IAAI,EACnB,MAAM,GAAE,WAA6B,GACnC,IAAI,CA+JN"}
|
|
@@ -2,6 +2,7 @@ import { BlockId } from '../../model/TypeBrands.js';
|
|
|
2
2
|
import { EditorState } from '../../state/EditorState.js';
|
|
3
3
|
import { Transaction } from '../../state/Transaction.js';
|
|
4
4
|
import { PluginContext } from '../Plugin.js';
|
|
5
|
+
import { TableLocale } from './TableLocale.js';
|
|
5
6
|
/** Builds a transaction that inserts a new row at the given index. */
|
|
6
7
|
export declare function buildInsertRowTransaction(state: EditorState, tableId: BlockId, rowIndex: number): Transaction | null;
|
|
7
8
|
/** Builds a transaction that inserts a new column at the given index. */
|
|
@@ -30,21 +31,21 @@ export declare function createDeleteTableTransaction(state: EditorState, tableId
|
|
|
30
31
|
*/
|
|
31
32
|
export declare function insertTable(context: PluginContext, rows: number, cols: number): boolean;
|
|
32
33
|
/** Adds a row above the current row. */
|
|
33
|
-
export declare function addRowAbove(context: PluginContext): boolean;
|
|
34
|
+
export declare function addRowAbove(context: PluginContext, locale?: TableLocale): boolean;
|
|
34
35
|
/** Adds a row below the current row. */
|
|
35
|
-
export declare function addRowBelow(context: PluginContext): boolean;
|
|
36
|
+
export declare function addRowBelow(context: PluginContext, locale?: TableLocale): boolean;
|
|
36
37
|
/** Adds a column to the left of the current column. */
|
|
37
|
-
export declare function addColumnLeft(context: PluginContext): boolean;
|
|
38
|
+
export declare function addColumnLeft(context: PluginContext, locale?: TableLocale): boolean;
|
|
38
39
|
/** Adds a column to the right of the current column. */
|
|
39
|
-
export declare function addColumnRight(context: PluginContext): boolean;
|
|
40
|
+
export declare function addColumnRight(context: PluginContext, locale?: TableLocale): boolean;
|
|
40
41
|
/** Deletes the current row. If it's the last row, deletes the entire table. */
|
|
41
|
-
export declare function deleteRow(context: PluginContext): boolean;
|
|
42
|
+
export declare function deleteRow(context: PluginContext, locale?: TableLocale): boolean;
|
|
42
43
|
/** Deletes the current column. If it's the last column, deletes the entire table. */
|
|
43
|
-
export declare function deleteColumn(context: PluginContext): boolean;
|
|
44
|
+
export declare function deleteColumn(context: PluginContext, locale?: TableLocale): boolean;
|
|
44
45
|
/** Deletes the entire table and moves cursor to surrounding block. */
|
|
45
|
-
export declare function deleteTable(context: PluginContext): boolean;
|
|
46
|
+
export declare function deleteTable(context: PluginContext, locale?: TableLocale): boolean;
|
|
46
47
|
/** Selects the surrounding table as a node object. */
|
|
47
48
|
export declare function selectTable(context: PluginContext): boolean;
|
|
48
49
|
/** Registers all table commands on the given plugin context. */
|
|
49
|
-
export declare function registerTableCommands(context: PluginContext): void;
|
|
50
|
+
export declare function registerTableCommands(context: PluginContext, locale?: TableLocale): void;
|
|
50
51
|
//# sourceMappingURL=TableCommands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCommands.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableCommands.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,KAAK,EAAE,OAAO,EAAgB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luginContext } from '../Plugin.js';
|
|
3
|
+
import { TableLocale } from './TableLocale.js';
|
|
4
|
+
export interface TableContextMenuHandle {
|
|
5
|
+
isOpen(): boolean;
|
|
6
|
+
close(): void;
|
|
7
|
+
destroy(): void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Creates and displays an accessible context menu for table operations.
|
|
11
|
+
* Attaches to the provided container (shadow root or editor container).
|
|
12
|
+
*/
|
|
13
|
+
export declare function createTableContextMenu(container: HTMLElement, context: PluginContext, tableId: BlockId, anchorRect: DOMRect, onClosed?: () => void, locale?: TableLocale): TableContextMenuHandle;
|
|
14
|
+
//# sourceMappingURL=TableContextMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableContextMenu.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableContextMenu.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIrE,MAAM,WAAW,sBAAsB;IACtC,MAAM,IAAI,OAAO,CAAC;IAClB,KAAK,IAAI,IAAI,CAAC;IACd,OAAO,IAAI,IAAI,CAAC;CAChB;AAyCD;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,OAAO,EACnB,QAAQ,CAAC,EAAE,MAAM,IAAI,EACrB,MAAM,GAAE,WAA6B,GACnC,sBAAsB,CAgQxB"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { BlockNode } from '../../model/Document.js';
|
|
2
2
|
import { EditorState } from '../../state/EditorState.js';
|
|
3
3
|
import { Transaction } from '../../state/Transaction.js';
|
|
4
|
+
import { PluginContext } from '../Plugin.js';
|
|
5
|
+
import { TableLocale } from './TableLocale.js';
|
|
4
6
|
export interface TableControlsHandle {
|
|
5
7
|
update(node: BlockNode): void;
|
|
6
8
|
destroy(): void;
|
|
7
9
|
}
|
|
8
10
|
/** Creates table controls for the given table element. */
|
|
9
|
-
export declare function createTableControls(container: HTMLElement, tableEl: HTMLTableElement, initialNode: BlockNode, getState: () => EditorState, dispatch: (tr: Transaction) => void): TableControlsHandle;
|
|
11
|
+
export declare function createTableControls(container: HTMLElement, tableEl: HTMLTableElement, initialNode: BlockNode, getState: () => EditorState, dispatch: (tr: Transaction) => void, pluginContext?: PluginContext, locale?: TableLocale): TableControlsHandle;
|
|
10
12
|
//# sourceMappingURL=TableControls.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableControls.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableControls.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"TableControls.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableControls.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiClD,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIrE,MAAM,WAAW,mBAAmB;IACnC,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IAC9B,OAAO,IAAI,IAAI,CAAC;CAChB;AA0XD,0DAA0D;AAC1D,wBAAgB,mBAAmB,CAClC,SAAS,EAAE,WAAW,EACtB,OAAO,EAAE,gBAAgB,EACzB,WAAW,EAAE,SAAS,EACtB,QAAQ,EAAE,MAAM,WAAW,EAC3B,QAAQ,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,EACnC,aAAa,CAAC,EAAE,aAAa,EAC7B,MAAM,CAAC,EAAE,WAAW,GAClB,mBAAmB,CAUrB"}
|
|
@@ -8,11 +8,23 @@ export declare const TABLE_DELETE_SVG: string;
|
|
|
8
8
|
/** Creates a button with standard table-control setup (mousedown prevention, ARIA). */
|
|
9
9
|
export declare function createButton(className: string, innerHTML: string, title: string): HTMLButtonElement;
|
|
10
10
|
/** Builds the insert-line element (horizontal or vertical) with a plus-icon button. */
|
|
11
|
-
export declare function buildInsertLine(orientation: 'horizontal' | 'vertical'): HTMLDivElement;
|
|
11
|
+
export declare function buildInsertLine(orientation: 'horizontal' | 'vertical', label?: string): HTMLDivElement;
|
|
12
12
|
/** Builds a zone-button for adding rows or columns at the table edge. */
|
|
13
13
|
export declare function buildAddButton(className: string, title: string): HTMLButtonElement;
|
|
14
14
|
/** Builds a handle-bar container (for column or row handles). */
|
|
15
15
|
export declare function buildHandleBar(className: string): HTMLDivElement;
|
|
16
|
+
/** SVG icon for kebab menu (three vertical dots). */
|
|
17
|
+
export declare const ACTIONS_SVG: string;
|
|
18
|
+
/** Builds the table actions button (kebab menu icon). */
|
|
19
|
+
export declare function buildActionsButton(label?: string): HTMLButtonElement;
|
|
20
|
+
/** Builds the context menu discovery hint shown on first focus. */
|
|
21
|
+
export declare function buildContextHint(label?: string): HTMLDivElement;
|
|
22
|
+
/** SVG icon for border/grid. */
|
|
23
|
+
export declare const BORDER_COLOR_SVG: string;
|
|
24
|
+
/** Builds the border color button with a color indicator swatch. */
|
|
25
|
+
export declare function buildBorderColorButton(currentColor?: string): HTMLButtonElement;
|
|
26
|
+
/** Updates the swatch indicator to reflect the current border color. */
|
|
27
|
+
export declare function updateBorderColorSwatch(swatch: HTMLElement, color?: string): void;
|
|
16
28
|
/** Builds a single column or row handle with a delete button. */
|
|
17
29
|
export declare function buildHandle(className: string, index: number, deleteLabel: string, onDelete: (idx: number) => void): HTMLDivElement;
|
|
18
30
|
//# sourceMappingURL=TableControlsDOM.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableControlsDOM.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableControlsDOM.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,eAAO,MAAM,QAAQ,EAAE,MAI6B,CAAC;AAErD,eAAO,MAAM,UAAU,EAAE,MAI2B,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,MAKG,CAAC;AAInC,uFAAuF;AACvF,wBAAgB,YAAY,CAC3B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACX,iBAAiB,CAanB;AAED,uFAAuF;AACvF,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"TableControlsDOM.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableControlsDOM.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,eAAO,MAAM,QAAQ,EAAE,MAI6B,CAAC;AAErD,eAAO,MAAM,UAAU,EAAE,MAI2B,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,MAKG,CAAC;AAInC,uFAAuF;AACvF,wBAAgB,YAAY,CAC3B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACX,iBAAiB,CAanB;AAED,uFAAuF;AACvF,wBAAgB,eAAe,CAC9B,WAAW,EAAE,YAAY,GAAG,UAAU,EACtC,KAAK,CAAC,EAAE,MAAM,GACZ,cAAc,CAWhB;AAED,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAoBlF;AAED,iEAAiE;AACjE,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,CAMhE;AAED,qDAAqD;AACrD,eAAO,MAAM,WAAW,EAAE,MAKc,CAAC;AAEzC,yDAAyD;AACzD,wBAAgB,kBAAkB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAQpE;AAED,mEAAmE;AACnE,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,cAAc,CAQ/D;AAED,gCAAgC;AAChC,eAAO,MAAM,gBAAgB,EAAE,MAIoB,CAAC;AAEpD,oEAAoE;AACpE,wBAAgB,sBAAsB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAc/E;AAED,wEAAwE;AACxE,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAWjF;AAED,iEAAiE;AACjE,wBAAgB,WAAW,CAC1B,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAC7B,cAAc,CAchB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locale interface and default English locale for the TablePlugin.
|
|
3
|
+
* Allows full i18n of all user-facing strings in the table feature.
|
|
4
|
+
*/
|
|
5
|
+
export interface TableLocale {
|
|
6
|
+
readonly insertRowAbove: string;
|
|
7
|
+
readonly insertRowBelow: string;
|
|
8
|
+
readonly insertColumnLeft: string;
|
|
9
|
+
readonly insertColumnRight: string;
|
|
10
|
+
readonly deleteRow: string;
|
|
11
|
+
readonly deleteColumn: string;
|
|
12
|
+
readonly borderColorLabel: string;
|
|
13
|
+
readonly deleteTable: string;
|
|
14
|
+
readonly tableActions: string;
|
|
15
|
+
readonly menuKeyboardHint: string;
|
|
16
|
+
readonly insertRow: string;
|
|
17
|
+
readonly insertColumn: string;
|
|
18
|
+
readonly addRow: string;
|
|
19
|
+
readonly addColumn: string;
|
|
20
|
+
readonly tableActionsHint: string;
|
|
21
|
+
readonly contextMenuHint: string;
|
|
22
|
+
readonly borderColor: string;
|
|
23
|
+
readonly defaultColor: string;
|
|
24
|
+
readonly noBorders: string;
|
|
25
|
+
readonly borderColorPicker: string;
|
|
26
|
+
readonly announceBorderColorSet: (colorName: string) => string;
|
|
27
|
+
readonly announceBorderReset: string;
|
|
28
|
+
readonly borderSwatchLabel: (colorName: string) => string;
|
|
29
|
+
readonly announceRowInsertedAbove: string;
|
|
30
|
+
readonly announceRowInsertedBelow: string;
|
|
31
|
+
readonly announceColumnInserted: (side: string) => string;
|
|
32
|
+
readonly announceRowDeleted: string;
|
|
33
|
+
readonly announceColumnDeleted: string;
|
|
34
|
+
readonly announceTableDeleted: string;
|
|
35
|
+
readonly insertTable: string;
|
|
36
|
+
readonly tableAriaLabel: (rows: number, cols: number) => string;
|
|
37
|
+
readonly tableAriaDescription: string;
|
|
38
|
+
}
|
|
39
|
+
export declare const TABLE_LOCALE_EN: TableLocale;
|
|
40
|
+
export declare const TABLE_LOCALE_DE: TableLocale;
|
|
41
|
+
export declare const TABLE_LOCALE_ES: TableLocale;
|
|
42
|
+
export declare const TABLE_LOCALE_FR: TableLocale;
|
|
43
|
+
export declare const TABLE_LOCALE_ZH: TableLocale;
|
|
44
|
+
export declare const TABLE_LOCALE_RU: TableLocale;
|
|
45
|
+
export declare const TABLE_LOCALE_AR: TableLocale;
|
|
46
|
+
export declare const TABLE_LOCALE_HI: TableLocale;
|
|
47
|
+
export declare const TABLE_LOCALES: Record<string, TableLocale>;
|
|
48
|
+
//# sourceMappingURL=TableLocale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableLocale.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableLocale.ts"],"names":[],"mappings":"AAAA;;;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CAAC,sBAAsB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1D,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;IAGtC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAG7B,QAAQ,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAChE,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAC;CACtC;AAID,eAAO,MAAM,eAAe,EAAE,WA8C7B,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,WAwC7B,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,WAwC7B,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,WAyC7B,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,WAwC7B,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,WAiE7B,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,WAoD7B,CAAC;AAIF,eAAO,MAAM,eAAe,EAAE,WAyD7B,CAAC;AAIF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CASrD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PluginContext } from '../Plugin.js';
|
|
2
|
+
import { TableLocale } from './TableLocale.js';
|
|
2
3
|
/** Registers all table navigation keymaps. */
|
|
3
|
-
export declare function registerTableKeymaps(context: PluginContext): void;
|
|
4
|
+
export declare function registerTableKeymaps(context: PluginContext, locale?: TableLocale): void;
|
|
4
5
|
//# sourceMappingURL=TableNavigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableNavigation.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableNavigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAUlD,8CAA8C;AAC9C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"TableNavigation.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableNavigation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAUlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,8CAA8C;AAC9C,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAgBvF"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { SchemaRegistry } from '../../model/SchemaRegistry.js';
|
|
2
2
|
import { NodeViewFactory } from '../../view/NodeView.js';
|
|
3
|
+
import { PluginContext } from '../Plugin.js';
|
|
4
|
+
import { TableLocale } from './TableLocale.js';
|
|
3
5
|
/**
|
|
4
6
|
* Creates a NodeViewFactory for the table node type.
|
|
5
7
|
* Renders as outer container with controls + table + tbody.
|
|
6
8
|
*/
|
|
7
|
-
export declare function createTableNodeViewFactory(_registry: SchemaRegistry): NodeViewFactory;
|
|
9
|
+
export declare function createTableNodeViewFactory(_registry: SchemaRegistry, pluginContext?: PluginContext, locale?: TableLocale): NodeViewFactory;
|
|
8
10
|
/**
|
|
9
11
|
* Creates a NodeViewFactory for the table_row node type.
|
|
10
12
|
* Renders as `<tr role="row">`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableNodeViews.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableNodeViews.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE,OAAO,KAAK,EAAY,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"TableNodeViews.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableNodeViews.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE,OAAO,KAAK,EAAY,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGlD,OAAO,EAAmB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAErE;;;GAGG;AACH,wBAAgB,0BAA0B,CACzC,SAAS,EAAE,cAAc,EACzB,aAAa,CAAC,EAAE,aAAa,EAC7B,MAAM,GAAE,WAA6B,GACnC,eAAe,CA+GjB;AAgBD;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,cAAc,GAAG,eAAe,CAuBxF;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,cAAc,GAAG,eAAe,CAgDzF"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { EditorState } from '../../state/EditorState.js';
|
|
2
2
|
import { Transaction } from '../../state/Transaction.js';
|
|
3
3
|
import { Plugin, PluginContext } from '../Plugin.js';
|
|
4
|
+
import { TableLocale } from './TableLocale.js';
|
|
4
5
|
declare module '../../model/AttrRegistry.js' {
|
|
5
6
|
interface NodeAttrRegistry {
|
|
6
|
-
table:
|
|
7
|
+
table: {
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
};
|
|
7
10
|
table_row: Record<string, never>;
|
|
8
11
|
table_cell: {
|
|
9
12
|
colspan?: number;
|
|
@@ -18,12 +21,15 @@ export interface TableConfig {
|
|
|
18
21
|
readonly maxPickerCols?: number;
|
|
19
22
|
/** When true, a separator is rendered after the table toolbar item. */
|
|
20
23
|
readonly separatorAfter?: boolean;
|
|
24
|
+
/** Locale for all user-facing strings. Defaults to English. */
|
|
25
|
+
readonly locale?: TableLocale;
|
|
21
26
|
}
|
|
22
27
|
export declare class TablePlugin implements Plugin {
|
|
23
28
|
readonly id = "table";
|
|
24
29
|
readonly name = "Table";
|
|
25
30
|
readonly priority = 40;
|
|
26
31
|
private readonly config;
|
|
32
|
+
private locale;
|
|
27
33
|
private selectionService;
|
|
28
34
|
private cleanupMouseSelection;
|
|
29
35
|
private context;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TablePlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TablePlugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"TablePlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TablePlugin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI1D,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAenE,OAAO,QAAQ,6BAA6B,CAAC;IAC5C,UAAU,gBAAgB;QACzB,KAAK,EAAE;YAAE,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAChC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACjC,UAAU,EAAE;YAAE,OAAO,CAAC,EAAE,MAAM,CAAC;YAAC,OAAO,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACnD;CACD;AAID,MAAM,WAAW,WAAW;IAC3B,kDAAkD;IAClD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,qDAAqD;IACrD,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,uEAAuE;IACvE,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC9B;AAgBD,qBAAa,WAAY,YAAW,MAAM;IACzC,QAAQ,CAAC,EAAE,WAAW;IACtB,QAAQ,CAAC,IAAI,WAAW;IACxB,QAAQ,CAAC,QAAQ,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,gBAAgB,CAAsC;IAC9D,OAAO,CAAC,qBAAqB,CAA6B;IAC1D,OAAO,CAAC,OAAO,CAA8B;gBAEjC,MAAM,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC;IAIzC,IAAI,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAgBlC,OAAO,IAAI,IAAI;IAMf,OAAO,IAAI,IAAI;IAOf,aAAa,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,GAAG,IAAI;IAUpF,OAAO,CAAC,iBAAiB;IA2CzB,OAAO,CAAC,iBAAiB;IAQzB,OAAO,CAAC,mBAAmB;CA2B3B"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export { TablePlugin, type TableConfig, } from './TablePlugin.js';
|
|
2
2
|
export { TableSelectionServiceKey, type TableSelectionService, type CellRange, } from './TableSelection.js';
|
|
3
3
|
export { findTableContext, isInsideTable, type TableContext, } from './TableHelpers.js';
|
|
4
|
+
export { type TableContextMenuHandle, createTableContextMenu, } from './TableContextMenu.js';
|
|
5
|
+
export { BORDER_COLOR_PALETTE, getTableBorderColor, setTableBorderColor, resetTableBorderColor, } from './TableBorderColor.js';
|
|
6
|
+
export { TABLE_LOCALE_EN, TABLE_LOCALE_DE, TABLE_LOCALE_ES, TABLE_LOCALE_FR, TABLE_LOCALE_ZH, TABLE_LOCALE_RU, TABLE_LOCALE_AR, TABLE_LOCALE_HI, type TableLocale, } from './TableLocale.js';
|
|
4
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EACX,KAAK,WAAW,GAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,KAAK,YAAY,GACjB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EACX,KAAK,WAAW,GAChB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,wBAAwB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,SAAS,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,gBAAgB,EAChB,aAAa,EACb,KAAK,YAAY,GACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,sBAAsB,EAC3B,sBAAsB,GACtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACN,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,GACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACN,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,eAAe,EACf,KAAK,WAAW,GAChB,MAAM,kBAAkB,CAAC"}
|