@notectl/core 1.7.0 → 1.7.2
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 +2 -2
- package/dist/chunks/{AttrRegistry-I-VdmRnN.mjs → AttrRegistry-D9Jx_RVb.mjs} +2 -2
- package/dist/chunks/{AttrRegistry-I-VdmRnN.mjs.map → AttrRegistry-D9Jx_RVb.mjs.map} +1 -1
- package/dist/chunks/AttributedMarkCommands-BtLea72z.mjs +80 -0
- package/dist/chunks/AttributedMarkCommands-BtLea72z.mjs.map +1 -0
- package/dist/chunks/{CaretNavigation-CAJXoaae.mjs → CaretNavigation-7JYpIKbs.mjs} +56 -56
- package/dist/chunks/{CaretNavigation-CAJXoaae.mjs.map → CaretNavigation-7JYpIKbs.mjs.map} +1 -1
- package/dist/chunks/ColorGrid-Dneqb8if.mjs +81 -0
- package/dist/chunks/ColorGrid-Dneqb8if.mjs.map +1 -0
- package/dist/chunks/ColorPickerPopup-CiCLBbe9.mjs +37 -0
- package/dist/chunks/ColorPickerPopup-CiCLBbe9.mjs.map +1 -0
- package/dist/chunks/ColorValidation-CV4f1wu6.mjs +39 -0
- package/dist/chunks/ColorValidation-CV4f1wu6.mjs.map +1 -0
- package/dist/chunks/{Document-CuwE73FF.mjs → Document-Brtw2jL1.mjs} +18 -18
- package/dist/chunks/{Document-CuwE73FF.mjs.map → Document-Brtw2jL1.mjs.map} +1 -1
- package/dist/chunks/MarkCommands-6RUJ4L3r.mjs +94 -0
- package/dist/chunks/MarkCommands-6RUJ4L3r.mjs.map +1 -0
- package/dist/chunks/{NavigationUtils-CyW0Vo8A.mjs → NavigationUtils-Cspt2ZrK.mjs} +3 -3
- package/dist/chunks/{NavigationUtils-CyW0Vo8A.mjs.map → NavigationUtils-Cspt2ZrK.mjs.map} +1 -1
- package/dist/chunks/{NodeResolver-B-wzthAQ.mjs → NodeResolver-C2XYkeOi.mjs} +2 -2
- package/dist/chunks/{NodeResolver-B-wzthAQ.mjs.map → NodeResolver-C2XYkeOi.mjs.map} +1 -1
- package/dist/chunks/PopupPositioning-BTT-_pQ3.mjs +32 -0
- package/dist/chunks/PopupPositioning-BTT-_pQ3.mjs.map +1 -0
- package/dist/chunks/RangeIterator-Bh4Vl_6D.mjs +16 -0
- package/dist/chunks/RangeIterator-Bh4Vl_6D.mjs.map +1 -0
- package/dist/chunks/{Selection-DmFDwiPJ.mjs → Selection-BRTab5hO.mjs} +7 -7
- package/dist/chunks/{Selection-DmFDwiPJ.mjs.map → Selection-BRTab5hO.mjs.map} +1 -1
- package/dist/chunks/StyleRuntime-ChRjVQwL.mjs +239 -0
- package/dist/chunks/StyleRuntime-ChRjVQwL.mjs.map +1 -0
- package/dist/chunks/ToolbarItem-BpZggUGo.mjs.map +1 -1
- package/dist/chunks/{ToolbarKeyboardNav-B32OMv8r.mjs → ToolbarKeyboardNav-DhpL8zNV.mjs} +3 -3
- package/dist/chunks/{ToolbarKeyboardNav-B32OMv8r.mjs.map → ToolbarKeyboardNav-DhpL8zNV.mjs.map} +1 -1
- package/dist/chunks/{ToolbarPlugin-B6JETWaw.mjs → ToolbarPlugin-DpLVJ71w.mjs} +348 -135
- package/dist/chunks/ToolbarPlugin-DpLVJ71w.mjs.map +1 -0
- package/dist/chunks/index--n1RGpq-.mjs +171 -0
- package/dist/chunks/index--n1RGpq-.mjs.map +1 -0
- package/dist/chunks/index-4or5UzNO.mjs +168 -0
- package/dist/chunks/index-4or5UzNO.mjs.map +1 -0
- package/dist/chunks/{index-pxbbDHVH.mjs → index-ABlTDvEX.mjs} +20 -19
- package/dist/chunks/index-ABlTDvEX.mjs.map +1 -0
- package/dist/chunks/{index--z_Txzej.mjs → index-BAke7kNL.mjs} +45 -45
- package/dist/chunks/{index--z_Txzej.mjs.map → index-BAke7kNL.mjs.map} +1 -1
- package/dist/chunks/{index-DMt3ojrY.mjs → index-BXtw5PNN.mjs} +2 -2
- package/dist/chunks/{index-DMt3ojrY.mjs.map → index-BXtw5PNN.mjs.map} +1 -1
- package/dist/chunks/{index-FlTg80Pk.mjs → index-BhDXjueu.mjs} +285 -325
- package/dist/chunks/index-BhDXjueu.mjs.map +1 -0
- package/dist/chunks/{index-D0s0Q8Wc.mjs → index-BqNUfq-y.mjs} +43 -35
- package/dist/chunks/index-BqNUfq-y.mjs.map +1 -0
- package/dist/chunks/{index-CflvcXSd.mjs → index-BvqkuEY1.mjs} +21 -17
- package/dist/chunks/index-BvqkuEY1.mjs.map +1 -0
- package/dist/chunks/{index-C9gc3Bws.mjs → index-C1opJocO.mjs} +32 -32
- package/dist/chunks/{index-C9gc3Bws.mjs.map → index-C1opJocO.mjs.map} +1 -1
- package/dist/chunks/index-CWltg1wK.mjs +124 -0
- package/dist/chunks/index-CWltg1wK.mjs.map +1 -0
- package/dist/chunks/{index-D8tbbW97.mjs → index-Cd3uJLP3.mjs} +2 -2
- package/dist/chunks/{index-D8tbbW97.mjs.map → index-Cd3uJLP3.mjs.map} +1 -1
- package/dist/chunks/{index-C0cEs7Jc.mjs → index-CluzpB2b.mjs} +10 -10
- package/dist/chunks/{index-C0cEs7Jc.mjs.map → index-CluzpB2b.mjs.map} +1 -1
- package/dist/chunks/{index-CoeD4T9-.mjs → index-D3NlpmT1.mjs} +15 -11
- package/dist/chunks/index-D3NlpmT1.mjs.map +1 -0
- package/dist/chunks/{index-CAV2N-fF.mjs → index-D515iymW.mjs} +75 -74
- package/dist/chunks/{index-CAV2N-fF.mjs.map → index-D515iymW.mjs.map} +1 -1
- package/dist/chunks/{index-B-NSeaM4.mjs → index-Dk49P9N4.mjs} +2 -2
- package/dist/chunks/{index-B-NSeaM4.mjs.map → index-Dk49P9N4.mjs.map} +1 -1
- package/dist/chunks/index-DyzigvbZ.mjs +410 -0
- package/dist/chunks/index-DyzigvbZ.mjs.map +1 -0
- package/dist/chunks/index-ErZ5_a1o.mjs +296 -0
- package/dist/chunks/index-ErZ5_a1o.mjs.map +1 -0
- package/dist/chunks/{index-CNs4QQ8l.mjs → index-fsVJLutn.mjs} +52 -64
- package/dist/chunks/index-fsVJLutn.mjs.map +1 -0
- package/dist/commands/AttributedMarkCommands.d.ts +46 -0
- package/dist/commands/AttributedMarkCommands.d.ts.map +1 -0
- package/dist/commands/CommandHelpers.d.ts +21 -0
- package/dist/commands/CommandHelpers.d.ts.map +1 -0
- package/dist/commands/Commands.d.ts +2 -8
- package/dist/commands/Commands.d.ts.map +1 -1
- package/dist/commands/DeleteCommands.d.ts.map +1 -1
- package/dist/commands/GapCursorCommands.d.ts.map +1 -1
- package/dist/commands/NodeSelectionCommands.d.ts.map +1 -1
- package/dist/commands/PasteCommand.d.ts.map +1 -1
- package/dist/commands/RangeIterator.d.ts +10 -0
- package/dist/commands/RangeIterator.d.ts.map +1 -0
- package/dist/editor/DocumentParser.d.ts.map +1 -1
- package/dist/editor/DocumentSerializer.d.ts +2 -0
- package/dist/editor/DocumentSerializer.d.ts.map +1 -1
- package/dist/editor/EditorThemeController.d.ts +3 -0
- package/dist/editor/EditorThemeController.d.ts.map +1 -1
- package/dist/editor/MarkSerializer.d.ts +11 -0
- package/dist/editor/MarkSerializer.d.ts.map +1 -0
- package/dist/editor/NotectlEditor.d.ts +19 -3
- package/dist/editor/NotectlEditor.d.ts.map +1 -1
- package/dist/editor/PaperLayoutController.d.ts +2 -0
- package/dist/editor/PaperLayoutController.d.ts.map +1 -1
- package/dist/editor/styles/font-select.d.ts +1 -1
- package/dist/editor/styles/font-select.d.ts.map +1 -1
- package/dist/editor/styles/font-size-select.d.ts +1 -1
- package/dist/editor/styles/font-size-select.d.ts.map +1 -1
- package/dist/editor/styles/heading-select.d.ts +1 -1
- package/dist/editor/styles/heading-select.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/index.d.ts +9 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/input/ClipboardHandler.d.ts +0 -2
- package/dist/input/ClipboardHandler.d.ts.map +1 -1
- package/dist/input/LegacyHTMLNormalizer.d.ts.map +1 -1
- package/dist/model/MarkSpec.d.ts +6 -0
- package/dist/model/MarkSpec.d.ts.map +1 -1
- package/dist/notectl-core.mjs +2244 -2095
- package/dist/notectl-core.mjs.map +1 -1
- package/dist/notectl-core.umd.js +2862 -2415
- package/dist/notectl-core.umd.js.map +1 -1
- package/dist/plugins/PluginManager.d.ts +2 -0
- package/dist/plugins/PluginManager.d.ts.map +1 -1
- package/dist/plugins/alignment/AlignmentPlugin.d.ts.map +1 -1
- package/dist/plugins/alignment.mjs +1 -1
- package/dist/plugins/blockquote.mjs +1 -1
- package/dist/plugins/caret-navigation.mjs +1 -1
- package/dist/plugins/code-block/CodeBlockNodeView.d.ts.map +1 -1
- package/dist/plugins/code-block.mjs +1 -1
- package/dist/plugins/font/FontPlugin.d.ts +0 -6
- package/dist/plugins/font/FontPlugin.d.ts.map +1 -1
- package/dist/plugins/font-size/FontSizeOperations.d.ts.map +1 -1
- package/dist/plugins/font-size/FontSizePlugin.d.ts +0 -5
- package/dist/plugins/font-size/FontSizePlugin.d.ts.map +1 -1
- package/dist/plugins/font-size.mjs +1 -1
- package/dist/plugins/font.mjs +1 -1
- package/dist/plugins/gap-cursor.mjs +2 -2
- package/dist/plugins/hard-break.mjs +2 -25
- package/dist/plugins/hard-break.mjs.map +1 -1
- package/dist/plugins/heading/HeadingBlockTypePicker.d.ts +1 -7
- package/dist/plugins/heading/HeadingBlockTypePicker.d.ts.map +1 -1
- package/dist/plugins/heading/HeadingPlugin.d.ts +0 -6
- package/dist/plugins/heading/HeadingPlugin.d.ts.map +1 -1
- package/dist/plugins/heading.mjs +1 -1
- package/dist/plugins/highlight/HighlightPlugin.d.ts.map +1 -1
- package/dist/plugins/highlight.mjs +1 -1
- package/dist/plugins/horizontal-rule.mjs +1 -1
- package/dist/plugins/image/ImageNodeView.d.ts.map +1 -1
- package/dist/plugins/image/ImagePlugin.d.ts.map +1 -1
- package/dist/plugins/image.mjs +1 -1
- package/dist/plugins/link/LinkPlugin.d.ts.map +1 -1
- package/dist/plugins/link.mjs +1 -1
- package/dist/plugins/list/ListPlugin.d.ts.map +1 -1
- package/dist/plugins/list.mjs +1 -1
- package/dist/plugins/print/PrintContentPreparer.d.ts.map +1 -1
- package/dist/plugins/shared/ColorGrid.d.ts +25 -0
- package/dist/plugins/shared/ColorGrid.d.ts.map +1 -0
- package/dist/plugins/shared/ColorMarkOperations.d.ts.map +1 -1
- package/dist/plugins/shared/ColorPickerPopup.d.ts.map +1 -1
- package/dist/plugins/shared/ColorValidation.d.ts +13 -2
- package/dist/plugins/shared/ColorValidation.d.ts.map +1 -1
- package/dist/plugins/shared/PopupKeyboardPatterns.d.ts +43 -0
- package/dist/plugins/shared/PopupKeyboardPatterns.d.ts.map +1 -0
- package/dist/plugins/shared/PopupManager.d.ts +45 -0
- package/dist/plugins/shared/PopupManager.d.ts.map +1 -0
- package/dist/plugins/shared/PopupPositioning.d.ts +21 -0
- package/dist/plugins/shared/PopupPositioning.d.ts.map +1 -0
- package/dist/plugins/strikethrough.mjs +1 -1
- package/dist/plugins/super-sub.mjs +1 -1
- package/dist/plugins/table/TableBorderColor.d.ts.map +1 -1
- package/dist/plugins/table/TableContextMenu.d.ts +2 -1
- package/dist/plugins/table/TableContextMenu.d.ts.map +1 -1
- package/dist/plugins/table/TableControls.d.ts.map +1 -1
- package/dist/plugins/table/TableControlsDOM.d.ts.map +1 -1
- package/dist/plugins/table/TableControlsLayout.d.ts.map +1 -1
- package/dist/plugins/table/TableNodeViews.d.ts.map +1 -1
- package/dist/plugins/table.mjs +1 -1
- package/dist/plugins/text-color/TextColorPlugin.d.ts.map +1 -1
- package/dist/plugins/text-color.mjs +1 -1
- package/dist/plugins/text-formatting.mjs +1 -1
- package/dist/plugins/toolbar/ToolbarItem.d.ts +11 -2
- package/dist/plugins/toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarOverflowController.d.ts +5 -1
- package/dist/plugins/toolbar/ToolbarOverflowController.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarPlugin.d.ts +1 -0
- package/dist/plugins/toolbar/ToolbarPlugin.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarPopupController.d.ts +9 -1
- package/dist/plugins/toolbar/ToolbarPopupController.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarRenderers.d.ts.map +1 -1
- package/dist/plugins/toolbar/ToolbarTooltip.d.ts.map +1 -1
- package/dist/plugins/toolbar/index.d.ts +1 -1
- package/dist/plugins/toolbar/index.d.ts.map +1 -1
- package/dist/plugins/toolbar.mjs +1 -1
- package/dist/state/BlockTreeOps.d.ts +21 -0
- package/dist/state/BlockTreeOps.d.ts.map +1 -0
- package/dist/state/InlineContentOps.d.ts +37 -0
- package/dist/state/InlineContentOps.d.ts.map +1 -0
- package/dist/state/StepApplication.d.ts.map +1 -1
- package/dist/style/StyleRuntime.d.ts +38 -0
- package/dist/style/StyleRuntime.d.ts.map +1 -0
- package/dist/test/PluginTestUtils.d.ts +4 -0
- package/dist/test/PluginTestUtils.d.ts.map +1 -1
- package/dist/view/Reconciler.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/chunks/ColorNames-BdsHwA2f.mjs +0 -59
- package/dist/chunks/ColorNames-BdsHwA2f.mjs.map +0 -1
- package/dist/chunks/ColorPickerPopup-xL8ZUfpB.mjs +0 -125
- package/dist/chunks/ColorPickerPopup-xL8ZUfpB.mjs.map +0 -1
- package/dist/chunks/Commands-CicwYoTQ.mjs +0 -286
- package/dist/chunks/Commands-CicwYoTQ.mjs.map +0 -1
- package/dist/chunks/MarkCommands-CC37WA7Z.mjs +0 -94
- package/dist/chunks/MarkCommands-CC37WA7Z.mjs.map +0 -1
- package/dist/chunks/ToolbarPlugin-B6JETWaw.mjs.map +0 -1
- package/dist/chunks/index-B9GkDVsx.mjs +0 -187
- package/dist/chunks/index-B9GkDVsx.mjs.map +0 -1
- package/dist/chunks/index-CKPrAOr6.mjs +0 -209
- package/dist/chunks/index-CKPrAOr6.mjs.map +0 -1
- package/dist/chunks/index-CNs4QQ8l.mjs.map +0 -1
- package/dist/chunks/index-CflvcXSd.mjs.map +0 -1
- package/dist/chunks/index-CoeD4T9-.mjs.map +0 -1
- package/dist/chunks/index-D0s0Q8Wc.mjs.map +0 -1
- package/dist/chunks/index-DfzCof6H.mjs +0 -191
- package/dist/chunks/index-DfzCof6H.mjs.map +0 -1
- package/dist/chunks/index-DyIwN_67.mjs +0 -404
- package/dist/chunks/index-DyIwN_67.mjs.map +0 -1
- package/dist/chunks/index-FlTg80Pk.mjs.map +0 -1
- package/dist/chunks/index-pxbbDHVH.mjs.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BlockId } from '../../model/TypeBrands.js';
|
|
2
2
|
import { PluginContext } from '../Plugin.js';
|
|
3
|
+
import { PopupManager } from '../shared/PopupManager.js';
|
|
3
4
|
import { TableLocale } from './TableLocale.js';
|
|
4
5
|
export interface TableContextMenuHandle {
|
|
5
6
|
isOpen(): boolean;
|
|
@@ -10,5 +11,5 @@ export interface TableContextMenuHandle {
|
|
|
10
11
|
* Creates and displays an accessible context menu for table operations.
|
|
11
12
|
* Attaches to the provided container (shadow root or editor container).
|
|
12
13
|
*/
|
|
13
|
-
export declare function createTableContextMenu(container: HTMLElement, context: PluginContext, tableId: BlockId, anchorRect: DOMRect, onClosed?: () => void, locale?: TableLocale): TableContextMenuHandle;
|
|
14
|
+
export declare function createTableContextMenu(container: HTMLElement, context: PluginContext, tableId: BlockId, anchorRect: DOMRect, onClosed?: () => void, locale?: TableLocale, popupManager?: PopupManager): TableContextMenuHandle;
|
|
14
15
|
//# sourceMappingURL=TableContextMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableContextMenu.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableContextMenu.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"TableContextMenu.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableContextMenu.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAI3E,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,EACrC,YAAY,CAAC,EAAE,YAAY,GACzB,sBAAsB,CA6RxB"}
|
|
@@ -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;AAE9D,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;AAgYD,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableControlsDOM.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableControlsDOM.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"TableControlsDOM.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableControlsDOM.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,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,CAiBjF;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableControlsLayout.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableControlsLayout.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"TableControlsLayout.d.ts","sourceRoot":"","sources":["../../../src/plugins/table/TableControlsLayout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,UAAU;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;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{"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;AAIpE,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"}
|
package/dist/plugins/table.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextColorPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/text-color/TextColorPlugin.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"TextColorPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/text-color/TextColorPlugin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI1D,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIhF,OAAO,QAAQ,6BAA6B,CAAC;IAC5C,UAAU,gBAAgB;QACzB,SAAS,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAC7B;CACD;AAID,MAAM,WAAW,eAAe;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,2EAA2E;IAC3E,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CAClC;AAsFD,qBAAa,eAAgB,YAAW,MAAM;IAC7C,QAAQ,CAAC,EAAE,eAAe;IAC1B,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,QAAQ,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAC3C,OAAO,CAAC,MAAM,CAAmB;gBAErB,MAAM,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;IAK7C,IAAI,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IASlC,OAAO,CAAC,gBAAgB;IAqCxB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,mBAAmB;CAoC3B"}
|
|
@@ -13,7 +13,7 @@ export interface DropdownConfig {
|
|
|
13
13
|
}[];
|
|
14
14
|
}
|
|
15
15
|
export type ToolbarGroup = 'format' | 'block' | 'insert' | (string & {});
|
|
16
|
-
export type PopupType = 'gridPicker' | 'dropdown' | 'custom';
|
|
16
|
+
export type PopupType = 'gridPicker' | 'dropdown' | 'custom' | 'combobox';
|
|
17
17
|
interface ToolbarItemBase {
|
|
18
18
|
readonly id: string;
|
|
19
19
|
/** Grouping key: 'format' | 'insert' | 'block' or custom. */
|
|
@@ -53,7 +53,16 @@ interface ToolbarItemCustomPopup extends ToolbarItemBase {
|
|
|
53
53
|
readonly popupType: 'custom';
|
|
54
54
|
renderPopup(container: HTMLElement, context: PluginContext, onClose: () => void): void;
|
|
55
55
|
}
|
|
56
|
-
export
|
|
56
|
+
export interface ToolbarItemCombobox extends Omit<ToolbarItemBase, 'icon'> {
|
|
57
|
+
readonly popupType: 'combobox';
|
|
58
|
+
/** Optional icon — combobox items typically display a text label instead. */
|
|
59
|
+
readonly icon?: string;
|
|
60
|
+
/** Pure function returning the current label text. Called on every state change. */
|
|
61
|
+
getLabel(state: EditorState): string;
|
|
62
|
+
/** Renders the popup content when the combobox is opened. */
|
|
63
|
+
renderPopup(container: HTMLElement, context: PluginContext, onClose: () => void): void;
|
|
64
|
+
}
|
|
65
|
+
export type ToolbarItem = ToolbarItemNoPopup | ToolbarItemGridPicker | ToolbarItemDropdown | ToolbarItemCustomPopup | ToolbarItemCombobox;
|
|
57
66
|
/**
|
|
58
67
|
* Formats a keymap binding string into a human-readable shortcut,
|
|
59
68
|
* using platform-appropriate modifier symbols (⌘ on Mac, Ctrl on others).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarItem.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarItem.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,cAAc;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CAC7E;AAED,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AACzE,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,UAAU,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolbarItem.d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-1,5 +1,6 @@
|
|
|
1
1
|
import { EditorState } from '../../state/EditorState.js';
|
|
2
2
|
import { PluginContext } from '../Plugin.js';
|
|
3
|
+
import { PopupManager } from '../shared/PopupManager.js';
|
|
3
4
|
import { ToolbarItem } from './ToolbarItem.js';
|
|
4
5
|
type OnOverflowChange = (visibleButtons: readonly HTMLButtonElement[], overflowButton: HTMLButtonElement | null) => void;
|
|
5
6
|
type OnItemActivated = (overflowButton: HTMLButtonElement, item: ToolbarItem) => void;
|
|
@@ -10,6 +11,7 @@ export interface OverflowControllerConfig {
|
|
|
10
11
|
readonly onOverflowChange: OnOverflowChange;
|
|
11
12
|
readonly onItemActivated: OnItemActivated;
|
|
12
13
|
readonly getActiveElement: () => Element | null;
|
|
14
|
+
readonly popupManager?: PopupManager;
|
|
13
15
|
}
|
|
14
16
|
export declare class ToolbarOverflowController {
|
|
15
17
|
private readonly toolbar;
|
|
@@ -18,9 +20,11 @@ export declare class ToolbarOverflowController {
|
|
|
18
20
|
private readonly onItemActivated;
|
|
19
21
|
private readonly getActiveElement;
|
|
20
22
|
private readonly ariaLabel;
|
|
23
|
+
private readonly popupManager;
|
|
21
24
|
private entries;
|
|
22
25
|
private overflowButton;
|
|
23
26
|
private overflowDropdown;
|
|
27
|
+
private overflowHandle;
|
|
24
28
|
private overflowEntries;
|
|
25
29
|
private resizeObserver;
|
|
26
30
|
private closeHandler;
|
|
@@ -36,6 +40,7 @@ export declare class ToolbarOverflowController {
|
|
|
36
40
|
updateItemStates(state: EditorState): void;
|
|
37
41
|
/** Cleans up ResizeObserver, DOM elements, and event listeners. */
|
|
38
42
|
destroy(): void;
|
|
43
|
+
private measureChildWidths;
|
|
39
44
|
private measureAvailableWidth;
|
|
40
45
|
private resetVisibility;
|
|
41
46
|
private setOverflowButtonVisible;
|
|
@@ -44,7 +49,6 @@ export declare class ToolbarOverflowController {
|
|
|
44
49
|
private openDropdown;
|
|
45
50
|
private renderDropdownItems;
|
|
46
51
|
private positionDropdown;
|
|
47
|
-
private appendToRoot;
|
|
48
52
|
private registerCloseHandler;
|
|
49
53
|
private closeDropdown;
|
|
50
54
|
private activateOverflowItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarOverflowController.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarOverflowController.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ToolbarOverflowController.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarOverflowController.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAE3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAUpD,KAAK,gBAAgB,GAAG,CACvB,cAAc,EAAE,SAAS,iBAAiB,EAAE,EAC5C,cAAc,EAAE,iBAAiB,GAAG,IAAI,KACpC,IAAI,CAAC;AAEV,KAAK,eAAe,GAAG,CAAC,cAAc,EAAE,iBAAiB,EAAE,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;AAEtF,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAC5C,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,gBAAgB,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;IAChD,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;CACrC;AAcD,qBAAa,yBAAyB;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;IAC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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolbarPlugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarPlugin.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAUxE,OAAO,EAEN,KAAK,uBAAuB,IAAI,2BAA2B,EAC3D,MAAM,8BAA8B,CAAC;AAQtC,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IACtD;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,2BAA2B,CAAC;CAChD;AAID,MAAM,WAAW,iBAAiB;IACjC,sEAAsE;IACtE,OAAO,IAAI,IAAI,CAAC;IAChB,+CAA+C;IAC/C,UAAU,IAAI,IAAI,CAAC;CACnB;AAED,eAAO,MAAM,iBAAiB,+BAA+C,CAAC;AAU9E,qBAAa,aAAc,YAAW,MAAM;IAC3C,QAAQ,CAAC,EAAE,aAAa;IACx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C5B,4EAA4E;IAC5E,OAAO,CAAC,cAAc;IAWtB,OAAO,CAAC,mBAAmB;IAmC3B,OAAO,CAAC,qBAAqB;IAwD7B,OAAO,CAAC,YAAY;IAyDpB,OAAO,CAAC,kBAAkB;CAkB1B"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { PluginContext } from '../Plugin.js';
|
|
2
|
+
import { PopupManager } from '../shared/PopupManager.js';
|
|
2
3
|
import { ToolbarItem } from './ToolbarItem.js';
|
|
3
4
|
export declare class ToolbarPopupController {
|
|
4
5
|
private activePopup;
|
|
5
6
|
private activePopupButton;
|
|
6
|
-
private
|
|
7
|
+
private activeHandle;
|
|
7
8
|
private readonly getActiveElement;
|
|
9
|
+
private popupManager;
|
|
8
10
|
constructor(getActiveElement: () => Element | null);
|
|
11
|
+
/** Injects the PopupManager instance (called after service registration). */
|
|
12
|
+
setPopupManager(manager: PopupManager): void;
|
|
9
13
|
/** Whether a popup is currently open. */
|
|
10
14
|
isOpen(): boolean;
|
|
11
15
|
/** Toggles a popup for the given toolbar button. */
|
|
@@ -15,6 +19,10 @@ export declare class ToolbarPopupController {
|
|
|
15
19
|
/** Closes popup and restores focus to the trigger button. */
|
|
16
20
|
closeAndRestoreFocus(): void;
|
|
17
21
|
destroy(): void;
|
|
22
|
+
private openViaManager;
|
|
23
|
+
private openLegacy;
|
|
24
|
+
private renderPopupContent;
|
|
25
|
+
private clearButtonState;
|
|
18
26
|
private positionAndAppend;
|
|
19
27
|
private focusFirstItem;
|
|
20
28
|
private handlePopupKeydown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarPopupController.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarPopupController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"ToolbarPopupController.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarPopupController.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAIpD,qBAAa,sBAAsB;IAClC,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,iBAAiB,CAAkC;IAC3D,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuB;IACxD,OAAO,CAAC,YAAY,CAA6B;gBAErC,gBAAgB,EAAE,MAAM,OAAO,GAAG,IAAI;IAIlD,6EAA6E;IAC7E,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAI5C,yCAAyC;IACzC,MAAM,IAAI,OAAO;IAIjB,oDAAoD;IACpD,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI;IAalF,6DAA6D;IAC7D,KAAK,IAAI,IAAI;IAiBb,6DAA6D;IAC7D,oBAAoB,IAAI,IAAI;IAM5B,OAAO,IAAI,IAAI;IAMf,OAAO,CAAC,cAAc;IAiCtB,OAAO,CAAC,UAAU;IAuClB,OAAO,CAAC,kBAAkB;IA6B1B,OAAO,CAAC,gBAAgB;IAUxB,OAAO,CAAC,iBAAiB;IAmBzB,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,kBAAkB;IA+B1B,OAAO,CAAC,qBAAqB;IA2B7B,OAAO,CAAC,iBAAiB;IAuCzB,OAAO,CAAC,wBAAwB;CA8BhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarRenderers.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarRenderers.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"ToolbarRenderers.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarRenderers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzE;;;GAGG;AACH,wBAAgB,gBAAgB,CAC/B,SAAS,EAAE,WAAW,EACtB,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,MAAM,IAAI,GACjB,IAAI,CA8DN;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAO5F;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAC7B,SAAS,EAAE,WAAW,EACtB,MAAM,EAAE,cAAc,EACtB,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,EACzC,OAAO,EAAE,MAAM,IAAI,GACjB,IAAI,CAqCN;AAED,iDAAiD;AACjD,wBAAgB,eAAe,IAAI,eAAe,CAKjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolbarTooltip.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarTooltip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"ToolbarTooltip.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/ToolbarTooltip.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,qBAAa,cAAc;IAC1B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;IACtC,OAAO,CAAC,KAAK,CAA8C;IAC3D,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAgB;IAE9C,MAAM,CAAC,QAAQ,CAAC,UAAU,6BAA6B;gBAE3C,aAAa,EAAE,MAAM,OAAO;IASxC,IAAI,CAAC,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAmCrC,IAAI,IAAI,IAAI;IAYZ,OAAO,IAAI,IAAI;CAIf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ToolbarPlugin, ToolbarServiceKey, type ToolbarServiceAPI, type ToolbarLayoutConfig, } from './ToolbarPlugin.js';
|
|
2
|
-
export type { ToolbarItem, ToolbarGroup, PopupType, GridPickerConfig, DropdownConfig, } from './ToolbarItem.js';
|
|
2
|
+
export type { ToolbarItem, ToolbarItemCombobox, ToolbarGroup, PopupType, GridPickerConfig, DropdownConfig, } from './ToolbarItem.js';
|
|
3
3
|
export { formatShortcut } from './ToolbarItem.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,aAAa,EACb,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACxB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACX,WAAW,EACX,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,cAAc,GACd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/toolbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,aAAa,EACb,iBAAiB,EACjB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACxB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACX,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,cAAc,GACd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/plugins/toolbar.mjs
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BlockNode, ChildNode, Document } from '../model/Document.js';
|
|
2
|
+
/** Finds a block by ID anywhere in the tree and applies a transform. */
|
|
3
|
+
export declare function mapBlock(doc: Document, blockId: string, fn: (block: BlockNode) => BlockNode): Document;
|
|
4
|
+
/** Recursively maps over children to find and transform a block by ID. */
|
|
5
|
+
export declare function mapBlockInChildren(children: readonly ChildNode[], blockId: string, fn: (block: BlockNode) => BlockNode): ChildNode[];
|
|
6
|
+
/**
|
|
7
|
+
* Maps a node at the given path, replacing it with the result of fn.
|
|
8
|
+
* Navigates down the path immutably, creating new parent nodes as needed.
|
|
9
|
+
*/
|
|
10
|
+
export declare function mapNodeByPath(doc: Document, path: readonly string[], fn: (node: BlockNode) => BlockNode): Document;
|
|
11
|
+
/** Recursive helper for mapNodeByPath — walks one level deeper. */
|
|
12
|
+
export declare function mapNodeByPathRecursive(node: BlockNode, path: readonly string[], depth: number, fn: (node: BlockNode) => BlockNode): BlockNode;
|
|
13
|
+
/**
|
|
14
|
+
* Searches children for a level where `predicate` matches,
|
|
15
|
+
* then applies `transform` at that level.
|
|
16
|
+
* Recurses into nested BlockNodes if not found at the current level.
|
|
17
|
+
*
|
|
18
|
+
* Returns `null` if no matching level was found.
|
|
19
|
+
*/
|
|
20
|
+
export declare function findAndTransformChildren(children: readonly ChildNode[], predicate: (children: readonly ChildNode[]) => boolean, transform: (children: readonly ChildNode[]) => readonly ChildNode[]): readonly ChildNode[] | null;
|
|
21
|
+
//# sourceMappingURL=BlockTreeOps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockTreeOps.d.ts","sourceRoot":"","sources":["../../src/state/BlockTreeOps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,QAAQ,EAAe,MAAM,sBAAsB,CAAC;AAElG,wEAAwE;AACxE,wBAAgB,QAAQ,CACvB,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,GACjC,QAAQ,CAIV;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,SAAS,SAAS,EAAE,EAC9B,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,GACjC,SAAS,EAAE,CASb;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC5B,GAAG,EAAE,QAAQ,EACb,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,EAAE,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,GAChC,QAAQ,CAYV;AAED,mEAAmE;AACnE,wBAAgB,sBAAsB,CACrC,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,SAAS,GAChC,SAAS,CASX;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACvC,QAAQ,EAAE,SAAS,SAAS,EAAE,EAC9B,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,SAAS,EAAE,KAAK,OAAO,EACtD,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,SAAS,EAAE,KAAK,SAAS,SAAS,EAAE,GACjE,SAAS,SAAS,EAAE,GAAG,IAAI,CAqB7B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ChildNode, InlineNode, Mark, TextNode, TextSegment } from '../model/Document.js';
|
|
2
|
+
/**
|
|
3
|
+
* Inserts text into mixed inline content at the given offset.
|
|
4
|
+
* Handles both TextNode and InlineNode children.
|
|
5
|
+
*/
|
|
6
|
+
export declare function insertTextIntoInlineContent(nodes: readonly (TextNode | InlineNode)[], offset: number, text: string, marks: readonly Mark[]): (TextNode | InlineNode)[];
|
|
7
|
+
/**
|
|
8
|
+
* Inserts segments into mixed inline content at the given offset.
|
|
9
|
+
*/
|
|
10
|
+
export declare function insertSegmentsIntoInlineContent(nodes: readonly (TextNode | InlineNode)[], offset: number, segments: readonly TextSegment[]): (TextNode | InlineNode)[];
|
|
11
|
+
/**
|
|
12
|
+
* Deletes content from mixed inline content in the given range.
|
|
13
|
+
* Removes InlineNodes that fall within the range.
|
|
14
|
+
*/
|
|
15
|
+
export declare function deleteFromInlineContent(nodes: readonly (TextNode | InlineNode)[], from: number, to: number): (TextNode | InlineNode)[];
|
|
16
|
+
/**
|
|
17
|
+
* Slices mixed inline content to the given range.
|
|
18
|
+
* InlineNodes are preserved as atoms (included if within range).
|
|
19
|
+
*/
|
|
20
|
+
export declare function sliceInlineContent(nodes: readonly (TextNode | InlineNode)[], from: number, to: number): (TextNode | InlineNode)[];
|
|
21
|
+
/**
|
|
22
|
+
* Applies or removes a mark from mixed inline content in the given range.
|
|
23
|
+
* InlineNodes are passed through unchanged (marks only apply to text).
|
|
24
|
+
*/
|
|
25
|
+
export declare function applyMarkToInlineContent(nodes: readonly (TextNode | InlineNode)[], from: number, to: number, mark: Mark, add: boolean): (TextNode | InlineNode)[];
|
|
26
|
+
/** Inserts an InlineNode at the given offset in mixed inline content. */
|
|
27
|
+
export declare function insertInlineNodeAtOffset(nodes: readonly (TextNode | InlineNode)[], offset: number, inlineNode: InlineNode): (TextNode | InlineNode)[];
|
|
28
|
+
/** Removes the InlineNode at the given offset from mixed inline content. */
|
|
29
|
+
export declare function removeInlineNodeAtOffset(nodes: readonly (TextNode | InlineNode)[], offset: number): (TextNode | InlineNode)[];
|
|
30
|
+
/** Replaces the attrs of an InlineNode at the given offset. */
|
|
31
|
+
export declare function setInlineNodeAttrsAtOffset(nodes: readonly (TextNode | InlineNode)[], offset: number, attrs: Readonly<Record<string, string | number | boolean>>): (TextNode | InlineNode)[];
|
|
32
|
+
/**
|
|
33
|
+
* Replaces the inline content children of a ChildNode array,
|
|
34
|
+
* preserving any BlockNode children in their original positions.
|
|
35
|
+
*/
|
|
36
|
+
export declare function replaceInlineChildren(original: readonly ChildNode[], newInlineChildren: readonly (TextNode | InlineNode)[]): readonly ChildNode[];
|
|
37
|
+
//# sourceMappingURL=InlineContentOps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineContentOps.d.ts","sourceRoot":"","sources":["../../src/state/InlineContentOps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,IAAI,EACT,KAAK,QAAQ,EACb,KAAK,WAAW,EAMhB,MAAM,sBAAsB,CAAC;AAE9B;;;GAGG;AACH,wBAAgB,2BAA2B,CAC1C,KAAK,EAAE,SAAS,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,EACzC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,SAAS,IAAI,EAAE,GACpB,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,CAuC3B;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC9C,KAAK,EAAE,SAAS,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,EACzC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,SAAS,WAAW,EAAE,GAC9B,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,CA6C3B;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,SAAS,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,EACzC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACR,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,CAgC3B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,SAAS,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,EACzC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,GACR,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,CAmC3B;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACvC,KAAK,EAAE,SAAS,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,EACzC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,OAAO,GACV,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,CA0C3B;AAED,yEAAyE;AACzE,wBAAgB,wBAAwB,CACvC,KAAK,EAAE,SAAS,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,EACzC,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,GACpB,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,CAuC3B;AAED,4EAA4E;AAC5E,wBAAgB,wBAAwB,CACvC,KAAK,EAAE,SAAS,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,EACzC,MAAM,EAAE,MAAM,GACZ,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,CAiB3B;AAED,+DAA+D;AAC/D,wBAAgB,0BAA0B,CACzC,KAAK,EAAE,SAAS,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,EACzC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,GACxD,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,CAmB3B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACpC,QAAQ,EAAE,SAAS,SAAS,EAAE,EAC9B,iBAAiB,EAAE,SAAS,CAAC,QAAQ,GAAG,UAAU,CAAC,EAAE,GACnD,SAAS,SAAS,EAAE,CAQtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepApplication.d.ts","sourceRoot":"","sources":["../../src/state/StepApplication.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGN,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"file":"StepApplication.d.ts","sourceRoot":"","sources":["../../src/state/StepApplication.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGN,KAAK,QAAQ,EAQb,MAAM,sBAAsB,CAAC;AAa9B,OAAO,KAAK,EAcX,IAAI,EACJ,MAAM,kBAAkB,CAAC;AAE1B,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAG,QAAQ,CA+B7D"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime style abstraction.
|
|
3
|
+
*
|
|
4
|
+
* - `inline` mode writes directly to `HTMLElement.style` (legacy behavior)
|
|
5
|
+
* - `strict` mode writes no inline styles and instead assigns token attributes
|
|
6
|
+
* backed by dynamic CSS rules in a stylesheet.
|
|
7
|
+
*/
|
|
8
|
+
export type RuntimeStyleMode = 'inline' | 'strict';
|
|
9
|
+
export interface StyleRootOptions {
|
|
10
|
+
readonly mode: RuntimeStyleMode;
|
|
11
|
+
readonly nonce?: string;
|
|
12
|
+
readonly sheet?: CSSStyleSheet | null;
|
|
13
|
+
}
|
|
14
|
+
type StyleRoot = ShadowRoot | Document;
|
|
15
|
+
/** Creates a constructable stylesheet when the environment supports it. */
|
|
16
|
+
export declare function createRuntimeStyleSheet(): CSSStyleSheet | null;
|
|
17
|
+
/** Registers styling mode for a root (shadow root or document). */
|
|
18
|
+
export declare function registerStyleRoot(root: StyleRoot, options: StyleRootOptions): void;
|
|
19
|
+
/** Unregisters root styling and tears down strict runtime state if present. */
|
|
20
|
+
export declare function unregisterStyleRoot(root: StyleRoot): void;
|
|
21
|
+
/** Sets a single style property. Empty value removes the property. */
|
|
22
|
+
export declare function setStyleProperty(el: HTMLElement, property: string, value: string): void;
|
|
23
|
+
/** Removes a single style property. */
|
|
24
|
+
export declare function removeStyleProperty(el: HTMLElement, property: string): void;
|
|
25
|
+
/** Sets multiple style properties in one call. */
|
|
26
|
+
export declare function setStyleProperties(el: HTMLElement, properties: Readonly<Record<string, string | undefined | null>>): void;
|
|
27
|
+
/** Replaces the element style text. */
|
|
28
|
+
export declare function setStyleText(el: HTMLElement, cssText: string): void;
|
|
29
|
+
/** Merges a cssText fragment into current element styles. */
|
|
30
|
+
export declare function appendStyleText(el: HTMLElement, cssText: string): void;
|
|
31
|
+
/** Alias for legacy `setAttribute('style', ...)` sites. */
|
|
32
|
+
export declare function setStyleAttribute(el: HTMLElement, cssText: string): void;
|
|
33
|
+
/** Returns serialized styles for an element. */
|
|
34
|
+
export declare function getStyleText(el: HTMLElement): string;
|
|
35
|
+
/** Returns the configured CSP nonce for the node's style root (if any). */
|
|
36
|
+
export declare function getStyleNonceForNode(node: Node): string | undefined;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=StyleRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyleRuntime.d.ts","sourceRoot":"","sources":["../../src/style/StyleRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAChC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACtC;AAED,KAAK,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAcvC,2EAA2E;AAC3E,wBAAgB,uBAAuB,IAAI,aAAa,GAAG,IAAI,CAO9D;AAED,mEAAmE;AACnE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,CAWlF;AAED,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAOzD;AAED,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAOvF;AAED,uCAAuC;AACvC,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE3E;AAED,kDAAkD;AAClD,wBAAgB,kBAAkB,CACjC,EAAE,EAAE,WAAW,EACf,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC,GAC7D,IAAI,CASN;AAED,uCAAuC;AACvC,wBAAgB,YAAY,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAOnE;AAED,6DAA6D;AAC7D,wBAAgB,eAAe,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAQtE;AAED,2DAA2D;AAC3D,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAExE;AAED,gDAAgD;AAChD,wBAAgB,YAAY,CAAC,EAAE,EAAE,WAAW,GAAG,MAAM,CAIpD;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAInE"}
|
|
@@ -86,6 +86,10 @@ export declare function expectToolbarActive(harness: PluginHarnessResult, itemId
|
|
|
86
86
|
* Assert that a toolbar item's `isEnabled()` returns the expected value.
|
|
87
87
|
*/
|
|
88
88
|
export declare function expectToolbarEnabled(harness: PluginHarnessResult, itemId: string, enabled: boolean, state?: EditorState): void;
|
|
89
|
+
/**
|
|
90
|
+
* Assert that a combobox toolbar item's `getLabel()` returns the expected value.
|
|
91
|
+
*/
|
|
92
|
+
export declare function expectComboboxLabel(harness: PluginHarnessResult, itemId: string, expectedLabel: string, state?: EditorState): void;
|
|
89
93
|
/**
|
|
90
94
|
* Assert that a key binding is registered.
|
|
91
95
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginTestUtils.d.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MD;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAG/F;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACzC,OAAO,EAAE,mBAAmB,EAC5B,WAAW,EAAE,MAAM,GACjB,IAAI,CAGN;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAM/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reconciler.d.ts","sourceRoot":"","sources":["../../src/view/Reconciler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAA+B,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAE,KAAK,aAAa,EAAyB,MAAM,8BAA8B,CAAC;AAEzF,OAAO,KAAK,EAAE,SAAS,EAAwB,MAAM,sBAAsB,CAAC;AAW5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Reconciler.d.ts","sourceRoot":"","sources":["../../src/view/Reconciler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAA+B,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAClG,OAAO,EAAE,KAAK,aAAa,EAAyB,MAAM,8BAA8B,CAAC;AAEzF,OAAO,KAAK,EAAE,SAAS,EAAwB,MAAM,sBAAsB,CAAC;AAW5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAA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@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@notectl/core",
|
|
3
|
-
"version": "1.7.
|
|
4
|
-
"description": "A modern and
|
|
3
|
+
"version": "1.7.2",
|
|
4
|
+
"description": "A modern and accessible rich text editor shipped as a single Web Component. Immutable state, transaction-based architecture, and a plugin system that powers every feature.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
const e = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
2
|
-
function r(r2) {
|
|
3
|
-
return e.test(r2);
|
|
4
|
-
}
|
|
5
|
-
const a = /^rgba?\(\s*(\d{1,3}%?\s*,\s*){2}\d{1,3}%?(\s*,\s*(0|1|0?\.\d+))?\s*\)$/, l = /^hsla?\(\s*\d{1,3}\s*,\s*\d{1,3}%\s*,\s*\d{1,3}%(\s*,\s*(0|1|0?\.\d+))?\s*\)$/, t = /* @__PURE__ */ new Set(["aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", "gold", "goldenrod", "gray", "green", "greenyellow", "grey", "honeydew", "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink", "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", "teal", "thistle", "tomato", "transparent", "turquoise", "violet", "wheat", "white", "whitesmoke", "yellow", "yellowgreen"]);
|
|
6
|
-
function n(r2) {
|
|
7
|
-
if (!r2) return false;
|
|
8
|
-
const n2 = r2.trim().toLowerCase();
|
|
9
|
-
return !!n2 && (e.test(n2) || a.test(n2) || l.test(n2) || t.has(n2));
|
|
10
|
-
}
|
|
11
|
-
function i(e2, a2, l2) {
|
|
12
|
-
if (!e2 || 0 === e2.length) return a2;
|
|
13
|
-
const t2 = e2.filter((e3) => !r(e3));
|
|
14
|
-
if (t2.length > 0) throw new Error(`${l2}: invalid hex color(s): ${t2.join(", ")}. Expected format: #RGB or #RRGGBB.`);
|
|
15
|
-
const n2 = /* @__PURE__ */ new Set(), i2 = [];
|
|
16
|
-
for (const r2 of e2) {
|
|
17
|
-
const e3 = r2.toLowerCase();
|
|
18
|
-
n2.has(e3) || (n2.add(e3), i2.push(e3));
|
|
19
|
-
}
|
|
20
|
-
return i2;
|
|
21
|
-
}
|
|
22
|
-
const f = /* @__PURE__ */ new Map([["#000000", "Black"], ["#434343", "Dark Gray 4"], ["#666666", "Dark Gray 3"], ["#999999", "Dark Gray 2"], ["#b7b7b7", "Dark Gray 1"], ["#cccccc", "Light Gray 3"], ["#d9d9d9", "Light Gray 2"], ["#efefef", "Light Gray 1"], ["#f3f3f3", "Near White"], ["#ffffff", "White"], ["#980000", "Dark Red Berry"], ["#ff0000", "Red"], ["#ff9900", "Orange"], ["#ffff00", "Yellow"], ["#00ff00", "Green"], ["#00ffff", "Cyan"], ["#4a86e8", "Cornflower Blue"], ["#0000ff", "Blue"], ["#9900ff", "Purple"], ["#ff00ff", "Magenta"], ["#e6b8af", "Light Red Berry 3"], ["#f4cccc", "Light Red 3"], ["#fce5cd", "Light Orange 3"], ["#fff2cc", "Light Yellow 3"], ["#d9ead3", "Light Green 3"], ["#d0e0e3", "Light Cyan 3"], ["#c9daf8", "Light Cornflower Blue 3"], ["#cfe2f3", "Light Blue 3"], ["#d9d2e9", "Light Purple 3"], ["#ead1dc", "Light Magenta 3"], ["#dd7e6b", "Light Red Berry 2"], ["#ea9999", "Light Red 2"], ["#f9cb9c", "Light Orange 2"], ["#ffe599", "Light Yellow 2"], ["#b6d7a8", "Light Green 2"], ["#a2c4c9", "Light Cyan 2"], ["#a4c2f4", "Light Cornflower Blue 2"], ["#9fc5e8", "Light Blue 2"], ["#b4a7d6", "Light Purple 2"], ["#d5a6bd", "Light Magenta 2"], ["#cc4125", "Light Red Berry 1"], ["#e06666", "Light Red 1"], ["#f6b26b", "Light Orange 1"], ["#ffd966", "Light Yellow 1"], ["#93c47d", "Light Green 1"], ["#76a5af", "Light Cyan 1"], ["#6d9eeb", "Light Cornflower Blue 1"], ["#6fa8dc", "Light Blue 1"], ["#8e7cc3", "Light Purple 1"], ["#c27ba0", "Light Magenta 1"], ["#a61c00", "Dark Red Berry 1"], ["#cc0000", "Dark Red 1"], ["#e69138", "Dark Orange 1"], ["#f1c232", "Dark Yellow 1"], ["#6aa84f", "Dark Green 1"], ["#45818e", "Dark Cyan 1"], ["#3c78d8", "Dark Cornflower Blue 1"], ["#3d85c6", "Dark Blue 1"], ["#674ea7", "Dark Purple 1"], ["#a64d79", "Dark Magenta 1"], ["#85200c", "Dark Red Berry 2"], ["#990000", "Dark Red 2"], ["#b45f06", "Dark Orange 2"], ["#bf9000", "Dark Yellow 2"], ["#38761d", "Dark Green 2"], ["#134f5c", "Dark Cyan 2"], ["#1155cc", "Dark Cornflower Blue 2"], ["#0b5394", "Dark Blue 2"], ["#351c75", "Dark Purple 2"], ["#741b47", "Dark Magenta 2"], ["#fff176", "Bright Yellow"], ["#aed581", "Light Green"], ["#4dd0e1", "Bright Cyan"], ["#64b5f6", "Sky Blue"], ["#ce93d8", "Lavender"], ["#f48fb1", "Pink"], ["#ffab91", "Peach"], ["#ff8a65", "Coral"], ["#e6ee9c", "Lime"], ["#80cbc4", "Teal"], ["#fff9c4", "Pale Yellow"], ["#dcedc8", "Pale Green"], ["#e0f7fa", "Pale Cyan"], ["#e3f2fd", "Pale Blue"], ["#f3e5f5", "Pale Purple"], ["#fce4ec", "Pale Pink"], ["#fff3e0", "Pale Orange"], ["#fbe9e7", "Pale Red"], ["#f9fbe7", "Pale Lime"], ["#e0f2f1", "Pale Teal"], ["#fff59d", "Soft Yellow"], ["#c5e1a5", "Soft Green"], ["#80deea", "Soft Cyan"], ["#90caf9", "Soft Blue"], ["#e1bee7", "Soft Purple"], ["#f8bbd0", "Soft Pink"], ["#ffcc80", "Soft Orange"], ["#a5d6a7", "Mint"], ["#ffee58", "Vivid Yellow"], ["#9ccc65", "Vivid Green"], ["#26c6da", "Vivid Cyan"], ["#42a5f5", "Vivid Blue"], ["#ab47bc", "Vivid Purple"], ["#ec407a", "Vivid Pink"], ["#ffa726", "Vivid Orange"], ["#ff7043", "Red Orange"], ["#d4e157", "Vivid Lime"], ["#66bb6a", "Emerald"], ["#fafafa", "Almost White"], ["#f5f5f5", "Lightest Gray"], ["#eeeeee", "Very Light Gray"], ["#e0e0e0", "Silver"], ["#bdbdbd", "Medium Gray"], ["#e8eaf6", "Lavender Gray"], ["#efebe9", "Warm Gray"], ["#eceff1", "Cool Gray"]]);
|
|
23
|
-
function o(e2) {
|
|
24
|
-
return f.get(e2.toLowerCase()) || (function(e3) {
|
|
25
|
-
const r2 = g(e3), a2 = Number.parseInt(r2.slice(1, 3), 16) / 255, l2 = Number.parseInt(r2.slice(3, 5), 16) / 255, t2 = Number.parseInt(r2.slice(5, 7), 16) / 255, n2 = Math.max(a2, l2, t2), i2 = Math.min(a2, l2, t2), f2 = (n2 + i2) / 2, o2 = n2 - i2;
|
|
26
|
-
if (o2 < 0.05) return f2 < 0.15 ? "Black" : f2 < 0.35 ? "Dark Gray" : f2 < 0.65 ? "Gray" : f2 < 0.85 ? "Light Gray" : "Near White";
|
|
27
|
-
let d2 = 0;
|
|
28
|
-
d2 = n2 === a2 ? 60 * ((l2 - t2) / o2 + (l2 < t2 ? 6 : 0)) : n2 === l2 ? 60 * ((t2 - a2) / o2 + 2) : 60 * ((a2 - l2) / o2 + 4);
|
|
29
|
-
let c2 = "Red";
|
|
30
|
-
for (const [e4, r3] of s) if (d2 < e4) {
|
|
31
|
-
c2 = r3;
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
return f2 < 0.25 ? `Very Dark ${c2}` : f2 < 0.4 ? `Dark ${c2}` : f2 > 0.8 ? `Very Light ${c2}` : f2 > 0.65 ? `Light ${c2}` : c2;
|
|
35
|
-
})(e2);
|
|
36
|
-
}
|
|
37
|
-
function d(e2) {
|
|
38
|
-
const r2 = (function(e3) {
|
|
39
|
-
const r3 = g(e3);
|
|
40
|
-
return 0.2126 * c(Number.parseInt(r3.slice(1, 3), 16) / 255) + 0.7152 * c(Number.parseInt(r3.slice(3, 5), 16) / 255) + 0.0722 * c(Number.parseInt(r3.slice(5, 7), 16) / 255);
|
|
41
|
-
})(e2);
|
|
42
|
-
return r2 > 0.3;
|
|
43
|
-
}
|
|
44
|
-
function g(e2) {
|
|
45
|
-
const r2 = e2.toLowerCase();
|
|
46
|
-
return 4 === r2.length ? `#${r2[1]}${r2[1]}${r2[2]}${r2[2]}${r2[3]}${r2[3]}` : r2;
|
|
47
|
-
}
|
|
48
|
-
function c(e2) {
|
|
49
|
-
return e2 <= 0.03928 ? e2 / 12.92 : ((e2 + 0.055) / 1.055) ** 2.4;
|
|
50
|
-
}
|
|
51
|
-
const s = [[15, "Red"], [45, "Orange"], [65, "Yellow"], [150, "Green"], [190, "Cyan"], [250, "Blue"], [290, "Purple"], [330, "Pink"], [361, "Red"]];
|
|
52
|
-
export {
|
|
53
|
-
d as a,
|
|
54
|
-
r as b,
|
|
55
|
-
o as g,
|
|
56
|
-
n as i,
|
|
57
|
-
i as r
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=ColorNames-BdsHwA2f.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ColorNames-BdsHwA2f.mjs","sources":["../../src/plugins/shared/ColorValidation.ts","../../src/plugins/shared/ColorNames.ts"],"sourcesContent":["/**\n * Shared color validation and normalization utilities\n * for color-based mark plugins (TextColor, Highlight).\n */\n\nconst HEX_COLOR_PATTERN: RegExp = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/** Returns `true` when the value is a valid `#RGB` or `#RRGGBB` hex color. */\nexport function isValidHexColor(value: string): boolean {\n\treturn HEX_COLOR_PATTERN.test(value);\n}\n\n// --- CSS Color Validation (broad format support for paste / API input) ---\n\n/** Matches `rgb(r, g, b)` and `rgba(r, g, b, a)` with integer or percentage values. */\nconst RGB_PATTERN: RegExp =\n\t/^rgba?\\(\\s*(\\d{1,3}%?\\s*,\\s*){2}\\d{1,3}%?(\\s*,\\s*(0|1|0?\\.\\d+))?\\s*\\)$/;\n\n/** Matches `hsl(h, s%, l%)` and `hsla(h, s%, l%, a)`. */\nconst HSL_PATTERN: RegExp =\n\t/^hsla?\\(\\s*\\d{1,3}\\s*,\\s*\\d{1,3}%\\s*,\\s*\\d{1,3}%(\\s*,\\s*(0|1|0?\\.\\d+))?\\s*\\)$/;\n\n/**\n * Complete set of CSS Level 4 named colors (including `transparent`).\n * Used as an allowlist — unknown names are rejected.\n */\nconst CSS_NAMED_COLORS: ReadonlySet<string> = new Set([\n\t'aliceblue',\n\t'antiquewhite',\n\t'aqua',\n\t'aquamarine',\n\t'azure',\n\t'beige',\n\t'bisque',\n\t'black',\n\t'blanchedalmond',\n\t'blue',\n\t'blueviolet',\n\t'brown',\n\t'burlywood',\n\t'cadetblue',\n\t'chartreuse',\n\t'chocolate',\n\t'coral',\n\t'cornflowerblue',\n\t'cornsilk',\n\t'crimson',\n\t'cyan',\n\t'darkblue',\n\t'darkcyan',\n\t'darkgoldenrod',\n\t'darkgray',\n\t'darkgreen',\n\t'darkgrey',\n\t'darkkhaki',\n\t'darkmagenta',\n\t'darkolivegreen',\n\t'darkorange',\n\t'darkorchid',\n\t'darkred',\n\t'darksalmon',\n\t'darkseagreen',\n\t'darkslateblue',\n\t'darkslategray',\n\t'darkslategrey',\n\t'darkturquoise',\n\t'darkviolet',\n\t'deeppink',\n\t'deepskyblue',\n\t'dimgray',\n\t'dimgrey',\n\t'dodgerblue',\n\t'firebrick',\n\t'floralwhite',\n\t'forestgreen',\n\t'fuchsia',\n\t'gainsboro',\n\t'ghostwhite',\n\t'gold',\n\t'goldenrod',\n\t'gray',\n\t'green',\n\t'greenyellow',\n\t'grey',\n\t'honeydew',\n\t'hotpink',\n\t'indianred',\n\t'indigo',\n\t'ivory',\n\t'khaki',\n\t'lavender',\n\t'lavenderblush',\n\t'lawngreen',\n\t'lemonchiffon',\n\t'lightblue',\n\t'lightcoral',\n\t'lightcyan',\n\t'lightgoldenrodyellow',\n\t'lightgray',\n\t'lightgreen',\n\t'lightgrey',\n\t'lightpink',\n\t'lightsalmon',\n\t'lightseagreen',\n\t'lightskyblue',\n\t'lightslategray',\n\t'lightslategrey',\n\t'lightsteelblue',\n\t'lightyellow',\n\t'lime',\n\t'limegreen',\n\t'linen',\n\t'magenta',\n\t'maroon',\n\t'mediumaquamarine',\n\t'mediumblue',\n\t'mediumorchid',\n\t'mediumpurple',\n\t'mediumseagreen',\n\t'mediumslateblue',\n\t'mediumspringgreen',\n\t'mediumturquoise',\n\t'mediumvioletred',\n\t'midnightblue',\n\t'mintcream',\n\t'mistyrose',\n\t'moccasin',\n\t'navajowhite',\n\t'navy',\n\t'oldlace',\n\t'olive',\n\t'olivedrab',\n\t'orange',\n\t'orangered',\n\t'orchid',\n\t'palegoldenrod',\n\t'palegreen',\n\t'paleturquoise',\n\t'palevioletred',\n\t'papayawhip',\n\t'peachpuff',\n\t'peru',\n\t'pink',\n\t'plum',\n\t'powderblue',\n\t'purple',\n\t'rebeccapurple',\n\t'red',\n\t'rosybrown',\n\t'royalblue',\n\t'saddlebrown',\n\t'salmon',\n\t'sandybrown',\n\t'seagreen',\n\t'seashell',\n\t'sienna',\n\t'silver',\n\t'skyblue',\n\t'slateblue',\n\t'slategray',\n\t'slategrey',\n\t'snow',\n\t'springgreen',\n\t'steelblue',\n\t'tan',\n\t'teal',\n\t'thistle',\n\t'tomato',\n\t'transparent',\n\t'turquoise',\n\t'violet',\n\t'wheat',\n\t'white',\n\t'whitesmoke',\n\t'yellow',\n\t'yellowgreen',\n]);\n\n/**\n * Returns `true` when `value` is a safe CSS color value.\n * Accepts hex (`#RGB`, `#RRGGBB`), `rgb()`, `rgba()`, `hsl()`, `hsla()`,\n * and CSS named colors. Rejects anything else — defense against CSS injection\n * via manipulated color values in `style` attributes.\n */\nexport function isValidCSSColor(value: string): boolean {\n\tif (!value) return false;\n\tconst trimmed: string = value.trim().toLowerCase();\n\tif (!trimmed) return false;\n\n\treturn (\n\t\tHEX_COLOR_PATTERN.test(trimmed) ||\n\t\tRGB_PATTERN.test(trimmed) ||\n\t\tHSL_PATTERN.test(trimmed) ||\n\t\tCSS_NAMED_COLORS.has(trimmed)\n\t);\n}\n\n/**\n * Validates, deduplicates, and normalizes a user-supplied color list.\n * Returns `fallbackPalette` when no custom colors are provided.\n *\n * @throws {Error} if any value is not a valid hex color code.\n */\nexport function resolveColors(\n\tcolors: readonly string[] | undefined,\n\tfallbackPalette: readonly string[],\n\tpluginName: string,\n): readonly string[] {\n\tif (!colors || colors.length === 0) return fallbackPalette;\n\n\tconst invalid: string[] = colors.filter((c) => !isValidHexColor(c));\n\tif (invalid.length > 0) {\n\t\tthrow new Error(\n\t\t\t`${pluginName}: invalid hex color(s): ${invalid.join(', ')}. Expected format: #RGB or #RRGGBB.`,\n\t\t);\n\t}\n\n\tconst seen: Set<string> = new Set();\n\tconst unique: string[] = [];\n\tfor (const color of colors) {\n\t\tconst normalized: string = color.toLowerCase();\n\t\tif (!seen.has(normalized)) {\n\t\t\tseen.add(normalized);\n\t\t\tunique.push(normalized);\n\t\t}\n\t}\n\treturn unique;\n}\n","/**\n * Human-readable color name lookup for accessibility.\n *\n * Provides descriptive names for color swatches so screen readers\n * announce \"Red\" instead of \"#ff0000\". Covers all default palette\n * colors with a fallback algorithm for custom hex values.\n */\n\n// ---------------------------------------------------------------------------\n// Static name map — covers every default palette color\n// ---------------------------------------------------------------------------\n\nconst COLOR_NAME_MAP: ReadonlyMap<string, string> = new Map([\n\t// ── TextColor palette (70 colors) ──────────────────────────────────────\n\n\t// Row 1 — Grays\n\t['#000000', 'Black'],\n\t['#434343', 'Dark Gray 4'],\n\t['#666666', 'Dark Gray 3'],\n\t['#999999', 'Dark Gray 2'],\n\t['#b7b7b7', 'Dark Gray 1'],\n\t['#cccccc', 'Light Gray 3'],\n\t['#d9d9d9', 'Light Gray 2'],\n\t['#efefef', 'Light Gray 1'],\n\t['#f3f3f3', 'Near White'],\n\t['#ffffff', 'White'],\n\n\t// Row 2 — Vivid\n\t['#980000', 'Dark Red Berry'],\n\t['#ff0000', 'Red'],\n\t['#ff9900', 'Orange'],\n\t['#ffff00', 'Yellow'],\n\t['#00ff00', 'Green'],\n\t['#00ffff', 'Cyan'],\n\t['#4a86e8', 'Cornflower Blue'],\n\t['#0000ff', 'Blue'],\n\t['#9900ff', 'Purple'],\n\t['#ff00ff', 'Magenta'],\n\n\t// Row 3 — Light 3 (lightest tint)\n\t['#e6b8af', 'Light Red Berry 3'],\n\t['#f4cccc', 'Light Red 3'],\n\t['#fce5cd', 'Light Orange 3'],\n\t['#fff2cc', 'Light Yellow 3'],\n\t['#d9ead3', 'Light Green 3'],\n\t['#d0e0e3', 'Light Cyan 3'],\n\t['#c9daf8', 'Light Cornflower Blue 3'],\n\t['#cfe2f3', 'Light Blue 3'],\n\t['#d9d2e9', 'Light Purple 3'],\n\t['#ead1dc', 'Light Magenta 3'],\n\n\t// Row 4 — Light 2\n\t['#dd7e6b', 'Light Red Berry 2'],\n\t['#ea9999', 'Light Red 2'],\n\t['#f9cb9c', 'Light Orange 2'],\n\t['#ffe599', 'Light Yellow 2'],\n\t['#b6d7a8', 'Light Green 2'],\n\t['#a2c4c9', 'Light Cyan 2'],\n\t['#a4c2f4', 'Light Cornflower Blue 2'],\n\t['#9fc5e8', 'Light Blue 2'],\n\t['#b4a7d6', 'Light Purple 2'],\n\t['#d5a6bd', 'Light Magenta 2'],\n\n\t// Row 5 — Light 1\n\t['#cc4125', 'Light Red Berry 1'],\n\t['#e06666', 'Light Red 1'],\n\t['#f6b26b', 'Light Orange 1'],\n\t['#ffd966', 'Light Yellow 1'],\n\t['#93c47d', 'Light Green 1'],\n\t['#76a5af', 'Light Cyan 1'],\n\t['#6d9eeb', 'Light Cornflower Blue 1'],\n\t['#6fa8dc', 'Light Blue 1'],\n\t['#8e7cc3', 'Light Purple 1'],\n\t['#c27ba0', 'Light Magenta 1'],\n\n\t// Row 6 — Dark 1\n\t['#a61c00', 'Dark Red Berry 1'],\n\t['#cc0000', 'Dark Red 1'],\n\t['#e69138', 'Dark Orange 1'],\n\t['#f1c232', 'Dark Yellow 1'],\n\t['#6aa84f', 'Dark Green 1'],\n\t['#45818e', 'Dark Cyan 1'],\n\t['#3c78d8', 'Dark Cornflower Blue 1'],\n\t['#3d85c6', 'Dark Blue 1'],\n\t['#674ea7', 'Dark Purple 1'],\n\t['#a64d79', 'Dark Magenta 1'],\n\n\t// Row 7 — Dark 2\n\t['#85200c', 'Dark Red Berry 2'],\n\t['#990000', 'Dark Red 2'],\n\t['#b45f06', 'Dark Orange 2'],\n\t['#bf9000', 'Dark Yellow 2'],\n\t['#38761d', 'Dark Green 2'],\n\t['#134f5c', 'Dark Cyan 2'],\n\t['#1155cc', 'Dark Cornflower Blue 2'],\n\t['#0b5394', 'Dark Blue 2'],\n\t['#351c75', 'Dark Purple 2'],\n\t['#741b47', 'Dark Magenta 2'],\n\n\t// ── Highlight palette (50 colors, minus duplicates) ────────────────────\n\n\t// Row 1 — Classic highlighter (bright, vivid)\n\t['#fff176', 'Bright Yellow'],\n\t['#aed581', 'Light Green'],\n\t['#4dd0e1', 'Bright Cyan'],\n\t['#64b5f6', 'Sky Blue'],\n\t['#ce93d8', 'Lavender'],\n\t['#f48fb1', 'Pink'],\n\t['#ffab91', 'Peach'],\n\t['#ff8a65', 'Coral'],\n\t['#e6ee9c', 'Lime'],\n\t['#80cbc4', 'Teal'],\n\n\t// Row 2 — Light pastels\n\t['#fff9c4', 'Pale Yellow'],\n\t['#dcedc8', 'Pale Green'],\n\t['#e0f7fa', 'Pale Cyan'],\n\t['#e3f2fd', 'Pale Blue'],\n\t['#f3e5f5', 'Pale Purple'],\n\t['#fce4ec', 'Pale Pink'],\n\t['#fff3e0', 'Pale Orange'],\n\t['#fbe9e7', 'Pale Red'],\n\t['#f9fbe7', 'Pale Lime'],\n\t['#e0f2f1', 'Pale Teal'],\n\n\t// Row 3 — Medium pastels\n\t['#fff59d', 'Soft Yellow'],\n\t['#c5e1a5', 'Soft Green'],\n\t['#80deea', 'Soft Cyan'],\n\t['#90caf9', 'Soft Blue'],\n\t['#e1bee7', 'Soft Purple'],\n\t['#f8bbd0', 'Soft Pink'],\n\t['#ffcc80', 'Soft Orange'],\n\t// #ffab91 duplicate → Peach (already mapped)\n\t// #e6ee9c duplicate → Lime (already mapped)\n\t['#a5d6a7', 'Mint'],\n\n\t// Row 4 — Bold pastels\n\t['#ffee58', 'Vivid Yellow'],\n\t['#9ccc65', 'Vivid Green'],\n\t['#26c6da', 'Vivid Cyan'],\n\t['#42a5f5', 'Vivid Blue'],\n\t['#ab47bc', 'Vivid Purple'],\n\t['#ec407a', 'Vivid Pink'],\n\t['#ffa726', 'Vivid Orange'],\n\t['#ff7043', 'Red Orange'],\n\t['#d4e157', 'Vivid Lime'],\n\t['#66bb6a', 'Emerald'],\n\n\t// Row 5 — Grays and neutral highlights\n\t// #ffffff duplicate → White (already mapped)\n\t['#fafafa', 'Almost White'],\n\t['#f5f5f5', 'Lightest Gray'],\n\t['#eeeeee', 'Very Light Gray'],\n\t['#e0e0e0', 'Silver'],\n\t['#bdbdbd', 'Medium Gray'],\n\t['#e8eaf6', 'Lavender Gray'],\n\t['#efebe9', 'Warm Gray'],\n\t['#eceff1', 'Cool Gray'],\n\t// #fafafa duplicate → Almost White (already mapped)\n]);\n\n// ---------------------------------------------------------------------------\n// Public API\n// ---------------------------------------------------------------------------\n\n/**\n * Returns a human-readable name for a hex color.\n *\n * Checks the static map first, then falls back to a computed\n * description based on hue, saturation, and lightness.\n */\nexport function getColorName(hex: string): string {\n\tconst name: string | undefined = COLOR_NAME_MAP.get(hex.toLowerCase());\n\tif (name) return name;\n\treturn describeColor(hex);\n}\n\n/**\n * Determines whether a color is light enough to need a visible\n * border when rendered on a white background (WCAG 1.4.11).\n *\n * Uses a contrast-ratio threshold of 3:1 against white.\n */\nexport function isLightColor(hex: string): boolean {\n\tconst luminance: number = relativeLuminance(hex);\n\t// Contrast ratio against white: (1.05) / (L + 0.05) < 3\n\t// ⟹ L > 1.05/3 − 0.05 = 0.3\n\tconst LIGHT_THRESHOLD = 0.3;\n\treturn luminance > LIGHT_THRESHOLD;\n}\n\n// ---------------------------------------------------------------------------\n// Internal helpers\n// ---------------------------------------------------------------------------\n\n/** Expands `#RGB` to `#RRGGBB` and lowercases. */\nfunction normalizeHex(hex: string): string {\n\tconst h: string = hex.toLowerCase();\n\tif (h.length === 4) {\n\t\treturn `#${h[1]}${h[1]}${h[2]}${h[2]}${h[3]}${h[3]}`;\n\t}\n\treturn h;\n}\n\n/** Applies sRGB linearization to a single channel value (0–1). */\nfunction linearize(channel: number): number {\n\treturn channel <= 0.03928 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4;\n}\n\n/** Computes WCAG relative luminance from a hex color. */\nfunction relativeLuminance(hex: string): number {\n\tconst normalized: string = normalizeHex(hex);\n\tconst r: number = linearize(Number.parseInt(normalized.slice(1, 3), 16) / 255);\n\tconst g: number = linearize(Number.parseInt(normalized.slice(3, 5), 16) / 255);\n\tconst b: number = linearize(Number.parseInt(normalized.slice(5, 7), 16) / 255);\n\treturn 0.2126 * r + 0.7152 * g + 0.0722 * b;\n}\n\n/** Hue boundary table: upper bound (degrees) → name. */\nconst HUE_NAMES: readonly (readonly [number, string])[] = [\n\t[15, 'Red'],\n\t[45, 'Orange'],\n\t[65, 'Yellow'],\n\t[150, 'Green'],\n\t[190, 'Cyan'],\n\t[250, 'Blue'],\n\t[290, 'Purple'],\n\t[330, 'Pink'],\n\t[361, 'Red'],\n];\n\n/**\n * Generates a descriptive name from a hex color using HSL analysis.\n * Produces names like \"Dark Blue\", \"Light Green\", or \"Gray\".\n */\nfunction describeColor(hex: string): string {\n\tconst normalized: string = normalizeHex(hex);\n\tconst rRaw: number = Number.parseInt(normalized.slice(1, 3), 16) / 255;\n\tconst gRaw: number = Number.parseInt(normalized.slice(3, 5), 16) / 255;\n\tconst bRaw: number = Number.parseInt(normalized.slice(5, 7), 16) / 255;\n\n\tconst max: number = Math.max(rRaw, gRaw, bRaw);\n\tconst min: number = Math.min(rRaw, gRaw, bRaw);\n\tconst lightness: number = (max + min) / 2;\n\tconst delta: number = max - min;\n\n\t// Achromatic\n\tif (delta < 0.05) {\n\t\tif (lightness < 0.15) return 'Black';\n\t\tif (lightness < 0.35) return 'Dark Gray';\n\t\tif (lightness < 0.65) return 'Gray';\n\t\tif (lightness < 0.85) return 'Light Gray';\n\t\treturn 'Near White';\n\t}\n\n\t// Compute hue in degrees\n\tlet hue = 0;\n\tif (max === rRaw) {\n\t\thue = ((gRaw - bRaw) / delta + (gRaw < bRaw ? 6 : 0)) * 60;\n\t} else if (max === gRaw) {\n\t\thue = ((bRaw - rRaw) / delta + 2) * 60;\n\t} else {\n\t\thue = ((rRaw - gRaw) / delta + 4) * 60;\n\t}\n\n\t// Look up hue name\n\tlet hueName = 'Red';\n\tfor (const [threshold, name] of HUE_NAMES) {\n\t\tif (hue < threshold) {\n\t\t\thueName = name;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Lightness modifier\n\tif (lightness < 0.25) return `Very Dark ${hueName}`;\n\tif (lightness < 0.4) return `Dark ${hueName}`;\n\tif (lightness > 0.8) return `Very Light ${hueName}`;\n\tif (lightness > 0.65) return `Light ${hueName}`;\n\treturn hueName;\n}\n"],"names":["HEX_COLOR_PATTERN","isValidHexColor","value","test","RGB_PATTERN","HSL_PATTERN","CSS_NAMED_COLORS","Set","isValidCSSColor","trimmed","trim","toLowerCase","has","resolveColors","colors","fallbackPalette","pluginName","length","invalid","filter","c","Error","join","seen","unique","color","normalized","add","push","COLOR_NAME_MAP","Map","getColorName","hex","get","normalizeHex","rRaw","Number","parseInt","slice","gRaw","bRaw","max","Math","min","lightness","delta","hue","hueName","threshold","name","HUE_NAMES","isLightColor","luminance","linearize","h","channel"],"mappings":"AAKA,MAAMA,IAA4B;AAG3B,SAASC,EAAgBC;AAC/B,SAAOF,EAAkBG,KAAKD,EAAAA;AAC/B;AAKA,MAAME,IACL,0EAGKC,IACL,iFAMKC,wBAA4CC,IAAI,CACrD,aACA,gBACA,QACA,cACA,SACA,SACA,UACA,SACA,kBACA,QACA,cACA,SACA,aACA,aACA,cACA,aACA,SACA,kBACA,YACA,WACA,QACA,YACA,YACA,iBACA,YACA,aACA,YACA,aACA,eACA,kBACA,cACA,cACA,WACA,cACA,gBACA,iBACA,iBACA,iBACA,iBACA,cACA,YACA,eACA,WACA,WACA,cACA,aACA,eACA,eACA,WACA,aACA,cACA,QACA,aACA,QACA,SACA,eACA,QACA,YACA,WACA,aACA,UACA,SACA,SACA,YACA,iBACA,aACA,gBACA,aACA,cACA,aACA,wBACA,aACA,cACA,aACA,aACA,eACA,iBACA,gBACA,kBACA,kBACA,kBACA,eACA,QACA,aACA,SACA,WACA,UACA,oBACA,cACA,gBACA,gBACA,kBACA,mBACA,qBACA,mBACA,mBACA,gBACA,aACA,aACA,YACA,eACA,QACA,WACA,SACA,aACA,UACA,aACA,UACA,iBACA,aACA,iBACA,iBACA,cACA,aACA,QACA,QACA,QACA,cACA,UACA,iBACA,OACA,aACA,aACA,eACA,UACA,cACA,YACA,YACA,UACA,UACA,WACA,aACA,aACA,aACA,QACA,eACA,aACA,OACA,QACA,WACA,UACA,eACA,aACA,UACA,SACA,SACA,cACA,UACA;AASM,SAASC,EAAgBN,IAAAA;AAC/B,MAAA,CAAKA,GAAO,QAAA;AACZ,QAAMO,KAAkBP,GAAMQ,KAAAA,EAAOC,YAAAA;AACrC,SAAA,CAAA,CAAKF,OAGJT,EAAkBG,KAAKM,EAAAA,KACvBL,EAAYD,KAAKM,EAAAA,KACjBJ,EAAYF,KAAKM,EAAAA,KACjBH,EAAiBM,IAAIH,EAAAA;AAEvB;AAQO,SAASI,EACfC,IACAC,IACAC,IAAAA;AAEA,MAAA,CAAKF,MAA4B,MAAlBA,GAAOG,OAAc,QAAOF;AAE3C,QAAMG,KAAoBJ,GAAOK,OAAQC,CAAAA,OAAAA,CAAOnB,EAAgBmB,EAAAA,CAAAA;AAChE,MAAIF,GAAQD,SAAS,EACpB,OAAM,IAAII,MACT,GAAGL,6BAAqCE,GAAQI,KAAK,IAAA,CAAA,qCAAA;AAIvD,QAAMC,yBAAwBhB,OACxBiB,KAAmB,CAAA;AACzB,aAAWC,MAASX,IAAQ;AAC3B,UAAMY,KAAqBD,GAAMd,YAAAA;AAC5BY,IAAAA,GAAKX,IAAIc,QACbH,GAAKI,IAAID,KACTF,GAAOI,KAAKF;EAEd;AACA,SAAOF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