@harbour-enterprises/superdoc 0.12.0-RC1 → 0.12.0-RC3

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.
Files changed (89) hide show
  1. package/dist/chunks/{eventemitter3-CRfwKE7Z.es.js → eventemitter3-C9iBZY5R.es.js} +1 -1
  2. package/dist/chunks/{eventemitter3-D38HWRLP.cjs → eventemitter3-Cj9ZwxFw.cjs} +1 -1
  3. package/dist/chunks/{index-CPZ-IxHT.es.js → index-27P7yLl7.es.js} +2 -2
  4. package/dist/chunks/{index-Y7BlAr93.es.js → index-2fgTY0gr.es.js} +4 -4
  5. package/dist/chunks/{index-CqRwYOdx.cjs → index-C-M7zT_5.cjs} +1 -1
  6. package/dist/chunks/{index-BXKGjuVW.cjs → index-UCzTj2iK.cjs} +1 -1
  7. package/dist/chunks/{jszip-ChlzEvf9.cjs → jszip-D9YbjC4E.cjs} +1 -1
  8. package/dist/chunks/{jszip-DO3il9iI.es.js → jszip-OpmRHhd4.es.js} +1 -1
  9. package/dist/chunks/{super-editor.es-jxkEOua-.es.js → super-editor.es-Co0MUfbd.es.js} +16646 -15939
  10. package/dist/chunks/super-editor.es-DPkbZzNG.cjs +457 -0
  11. package/dist/chunks/{url-6Xu7gR4T.cjs → url-Bd_xvDLH.cjs} +1 -1
  12. package/dist/chunks/{url-t15h9onH.es.js → url-CEWFyxj1.es.js} +2 -2
  13. package/dist/chunks/vue-BQCc2YbW.cjs +13 -0
  14. package/dist/chunks/{vue-DXpzqXur.es.js → vue-DKS68Dra.es.js} +1159 -1140
  15. package/dist/chunks/xml-js-BBSyOdPv.cjs +10 -0
  16. package/dist/chunks/{xml-js-kwrvzyhm.es.js → xml-js-BH5W8vwP.es.js} +744 -762
  17. package/dist/components/CommentsLayer/commentsList/super-comments-list.d.ts +1 -2
  18. package/dist/components/CommentsLayer/commentsList/super-comments-list.d.ts.map +1 -1
  19. package/dist/core/SuperDoc.d.ts +264 -41
  20. package/dist/core/SuperDoc.d.ts.map +1 -1
  21. package/dist/stores/superdoc-store.d.ts +6 -744
  22. package/dist/stores/superdoc-store.d.ts.map +1 -1
  23. package/dist/style.css +29 -29
  24. package/dist/super-editor/ai-writer.es.js +208 -121
  25. package/dist/super-editor/chunks/{converter-B_CnsyBe.js → converter-Vjysuk1c.js} +2188 -2054
  26. package/dist/super-editor/chunks/{docx-zipper-CmQ11kAl.js → docx-zipper-BFgGqpdr.js} +749 -763
  27. package/dist/super-editor/chunks/{editor-D_W26AM3.js → editor-CvkW6Gqh.js} +11589 -11256
  28. package/dist/super-editor/chunks/{toolbar-DgpDtH5C.js → toolbar-C1jMelI-.js} +132 -132
  29. package/dist/super-editor/components/toolbar/ai-helpers.d.ts +12 -0
  30. package/dist/super-editor/components/toolbar/ai-helpers.d.ts.map +1 -1
  31. package/dist/super-editor/components/toolbar/super-toolbar.d.ts +460 -84
  32. package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
  33. package/dist/super-editor/converter.es.js +1 -1
  34. package/dist/super-editor/core/DocxZipper.d.ts.map +1 -1
  35. package/dist/super-editor/core/Editor.d.ts +507 -48
  36. package/dist/super-editor/core/Editor.d.ts.map +1 -1
  37. package/dist/super-editor/core/helpers/annotator.d.ts +10 -3
  38. package/dist/super-editor/core/helpers/annotator.d.ts.map +1 -1
  39. package/dist/super-editor/core/helpers/getActiveFormatting.d.ts.map +1 -1
  40. package/dist/super-editor/core/index.d.ts +3 -3
  41. package/dist/super-editor/core/super-converter/SuperConverter.d.ts +1 -1
  42. package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
  43. package/dist/super-editor/core/super-converter/constants.d.ts +2 -0
  44. package/dist/super-editor/core/super-converter/constants.d.ts.map +1 -0
  45. package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
  46. package/dist/super-editor/core/super-converter/helpers.d.ts +1 -1
  47. package/dist/super-editor/core/super-converter/helpers.d.ts.map +1 -1
  48. package/dist/super-editor/core/super-converter/v2/importer/annotationImporter.d.ts.map +1 -1
  49. package/dist/super-editor/core/super-converter/v2/importer/docxImporter.d.ts.map +1 -1
  50. package/dist/super-editor/core/super-converter/v2/importer/listImporter.d.ts +25 -0
  51. package/dist/super-editor/core/super-converter/v2/importer/listImporter.d.ts.map +1 -1
  52. package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.d.ts.map +1 -1
  53. package/dist/super-editor/core/super-converter/v2/importer/structuredDocumentNodeImporter.d.ts +9 -0
  54. package/dist/super-editor/core/super-converter/v2/importer/structuredDocumentNodeImporter.d.ts.map +1 -0
  55. package/dist/super-editor/docx-zipper.es.js +2 -2
  56. package/dist/super-editor/editor.es.js +3 -3
  57. package/dist/super-editor/extensions/field-annotation/field-annotation.d.ts.map +1 -1
  58. package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/trackFieldAnnotationsDeletion.d.ts.map +1 -1
  59. package/dist/super-editor/extensions/index.d.ts +2 -1
  60. package/dist/super-editor/extensions/index.d.ts.map +1 -1
  61. package/dist/super-editor/extensions/linked-styles/linked-styles.d.ts.map +1 -1
  62. package/dist/super-editor/extensions/list-item/ListItemNodeView.d.ts +56 -0
  63. package/dist/super-editor/extensions/list-item/ListItemNodeView.d.ts.map +1 -0
  64. package/dist/super-editor/extensions/list-item/list-item.d.ts +0 -11
  65. package/dist/super-editor/extensions/list-item/list-item.d.ts.map +1 -1
  66. package/dist/super-editor/extensions/structured-content/index.d.ts +2 -0
  67. package/dist/super-editor/extensions/structured-content/index.d.ts.map +1 -0
  68. package/dist/super-editor/extensions/structured-content/structured-content.d.ts +2 -0
  69. package/dist/super-editor/extensions/structured-content/structured-content.d.ts.map +1 -0
  70. package/dist/super-editor/extensions/table/table.d.ts.map +1 -1
  71. package/dist/super-editor/file-zipper.es.js +1 -1
  72. package/dist/super-editor/style.css +1 -1
  73. package/dist/super-editor/super-editor.es.js +768 -557
  74. package/dist/super-editor/tests/editor/listItemHelpers.test.d.ts +2 -0
  75. package/dist/super-editor/tests/editor/listItemHelpers.test.d.ts.map +1 -0
  76. package/dist/super-editor/tests/import/sdt-nodes/structuredDocumentNodeTests.test.d.ts +2 -0
  77. package/dist/super-editor/tests/import/sdt-nodes/structuredDocumentNodeTests.test.d.ts.map +1 -0
  78. package/dist/super-editor/toolbar.es.js +2 -2
  79. package/dist/super-editor.cjs +1 -1
  80. package/dist/super-editor.d.ts +3 -0
  81. package/dist/super-editor.es.js +7 -7
  82. package/dist/superdoc.cjs +26 -26
  83. package/dist/superdoc.es.js +1114 -1011
  84. package/dist/superdoc.umd.js +16735 -15894
  85. package/dist/superdoc.umd.js.map +1 -1
  86. package/package.json +3 -2
  87. package/dist/chunks/super-editor.es-D2_UqVSP.cjs +0 -452
  88. package/dist/chunks/vue-Ckf0DkDN.cjs +0 -13
  89. package/dist/chunks/xml-js-zhwNEV5e.cjs +0 -10
@@ -62,4 +62,16 @@ export function rewrite(text: string, prompt?: string, options?: {
62
62
  url: string;
63
63
  config: any;
64
64
  }): Promise<string>;
65
+ /**
66
+ * Converts markdown-style formatting in the document text to ProseMirror's native formatting.
67
+ * Uses a node-aware approach that safely handles formatting across node boundaries.
68
+ *
69
+ * This function processes the entire document content and applies formatting rules defined in formatRegistry.
70
+ * It handles cases where formatting markers (like **bold**) span across multiple text nodes by tracking
71
+ * node positions and boundaries. The function works from the end of the document to the start to avoid
72
+ * position shifts when making replacements.
73
+ *
74
+ * @param {Object} editor - The ProseMirror editor instance containing the document state and view
75
+ */
76
+ export function formatDocument(editor: any): void;
65
77
  //# sourceMappingURL=ai-helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ai-helpers.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/ai-helpers.js"],"names":[],"mappings":"AAuJA;;;;;;;;;;GAUG;AACH,uCATW,MAAM,WAEd;IAAwB,OAAO,EAAvB,MAAM;IACU,WAAW,EAA3B,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,MAAM;CAC9B,mCACU,OAAO,CAAC,MAAM,CAAC,CA6B3B;AAED;;;;;;;;;GASG;AACH,8BARW,MAAM,YAEd;IAAwB,OAAO,EAAvB,MAAM;IACU,WAAW,EAA3B,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,MAAM;CAC9B,GAAU,OAAO,CAAC,MAAM,CAAC,CAsB3B;AAED;;;;;;;;;;GAUG;AACH,uCATW,MAAM,UACN,MAAM,WAEd;IAAwB,WAAW,EAA3B,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,MAAM;CAC9B,mCACU,OAAO,CAAC,MAAM,CAAC,CA4B3B;AAED;;;;;;;;;GASG;AACH,8BARW,MAAM,WACN,MAAM,YAEd;IAAwB,WAAW,EAA3B,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,MAAM;CAC9B,GAAU,OAAO,CAAC,MAAM,CAAC,CA0B3B"}
1
+ {"version":3,"file":"ai-helpers.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/ai-helpers.js"],"names":[],"mappings":"AAuJA;;;;;;;;;;GAUG;AACH,uCATW,MAAM,WAEd;IAAwB,OAAO,EAAvB,MAAM;IACU,WAAW,EAA3B,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,MAAM;CAC9B,mCACU,OAAO,CAAC,MAAM,CAAC,CA6B3B;AAED;;;;;;;;;GASG;AACH,8BARW,MAAM,YAEd;IAAwB,OAAO,EAAvB,MAAM;IACU,WAAW,EAA3B,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,MAAM;CAC9B,GAAU,OAAO,CAAC,MAAM,CAAC,CAsB3B;AAED;;;;;;;;;;GAUG;AACH,uCATW,MAAM,UACN,MAAM,WAEd;IAAwB,WAAW,EAA3B,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,MAAM;CAC9B,mCACU,OAAO,CAAC,MAAM,CAAC,CA4B3B;AAED;;;;;;;;;GASG;AACH,8BARW,MAAM,WACN,MAAM,YAEd;IAAwB,WAAW,EAA3B,MAAM;IACU,GAAG,EAAnB,MAAM;IACU,MAAM;CAC9B,GAAU,OAAO,CAAC,MAAM,CAAC,CA0B3B;AAqBD;;;;;;;;;;GAUG;AACH,kDAgIC"}
@@ -1,115 +1,491 @@
1
+ /**
2
+ * @typedef {Object} ToolbarConfig
3
+ * @property {string} [selector] - CSS selector for the toolbar container
4
+ * @property {string[]} [toolbarGroups=['left', 'center', 'right']] - Groups to organize toolbar items
5
+ * @property {string} [role='editor'] - Role of the toolbar ('editor' or 'viewer')
6
+ * @property {boolean} [pagination=false] - Whether pagination is enabled
7
+ * @property {Object} [icons] - Custom icons for toolbar items
8
+ * @property {string} [mode='docx'] - Editor mode
9
+ * @property {string[]} [excludeItems=[]] - Items to exclude from the toolbar
10
+ * @property {Object} [groups=null] - Custom groups configuration
11
+ * @property {Object} [editor=null] - The editor instance
12
+ * @property {string} [aiApiKey=null] - API key for AI integration
13
+ * @property {string} [aiEndpoint=null] - Endpoint for AI integration
14
+ * @property {ToolbarItem[]} [customButtons=[]] - Custom buttons to add to the toolbar
15
+ */
16
+ /**
17
+ * @typedef {Object} ToolbarItem
18
+ * @property {Object} id - The unique ID of the toolbar item
19
+ * @property {string} id.value - The value of the ID
20
+ * @property {Object} name - The name of the toolbar item
21
+ * @property {string} name.value - The value of the name
22
+ * @property {string} type - The type of toolbar item (button, options, separator, dropdown, overflow)
23
+ * @property {Object} group - The group the item belongs to
24
+ * @property {string} group.value - The value of the group
25
+ * @property {string} command - The command to execute
26
+ * @property {string} [noArgumentCommand] - The command to execute when no argument is provided
27
+ * @property {Object} icon - The icon for the item
28
+ * @property {*} icon.value - The value of the icon
29
+ * @property {Object} tooltip - The tooltip for the item
30
+ * @property {*} tooltip.value - The value of the tooltip
31
+ * @property {Object} attributes - Additional attributes for the item
32
+ * @property {Object} attributes.value - The value of the attributes
33
+ * @property {Object} disabled - Whether the item is disabled
34
+ * @property {boolean} disabled.value - The value of disabled
35
+ * @property {Object} active - Whether the item is active
36
+ * @property {boolean} active.value - The value of active
37
+ * @property {Object} expand - Whether the item is expanded
38
+ * @property {boolean} expand.value - The value of expand
39
+ * @property {Object} nestedOptions - Nested options for the item
40
+ * @property {Array} nestedOptions.value - The array of nested options
41
+ * @property {Object} style - Custom style for the item
42
+ * @property {*} style.value - The value of the style
43
+ * @property {Object} isNarrow - Whether the item has narrow styling
44
+ * @property {boolean} isNarrow.value - The value of isNarrow
45
+ * @property {Object} isWide - Whether the item has wide styling
46
+ * @property {boolean} isWide.value - The value of isWide
47
+ * @property {Object} minWidth - Minimum width of the item
48
+ * @property {*} minWidth.value - The value of minWidth
49
+ * @property {Object} argument - The argument to pass to the command
50
+ * @property {*} argument.value - The value of the argument
51
+ * @property {Object} parentItem - The parent of this item if nested
52
+ * @property {*} parentItem.value - The value of parentItem
53
+ * @property {Object} childItem - The child of this item if it has one
54
+ * @property {*} childItem.value - The value of childItem
55
+ * @property {Object} iconColor - The color of the icon
56
+ * @property {*} iconColor.value - The value of iconColor
57
+ * @property {Object} hasCaret - Whether the item has a dropdown caret
58
+ * @property {boolean} hasCaret.value - The value of hasCaret
59
+ * @property {Object} dropdownStyles - Custom styles for dropdown
60
+ * @property {*} dropdownStyles.value - The value of dropdownStyles
61
+ * @property {Object} tooltipVisible - Whether the tooltip is visible
62
+ * @property {boolean} tooltipVisible.value - The value of tooltipVisible
63
+ * @property {Object} tooltipTimeout - Timeout for the tooltip
64
+ * @property {*} tooltipTimeout.value - The value of tooltipTimeout
65
+ * @property {Object} defaultLabel - The default label for the item
66
+ * @property {*} defaultLabel.value - The value of the default label
67
+ * @property {Object} label - The label for the item
68
+ * @property {*} label.value - The value of the label
69
+ * @property {Object} hideLabel - Whether to hide the label
70
+ * @property {boolean} hideLabel.value - The value of hideLabel
71
+ * @property {Object} inlineTextInputVisible - Whether inline text input is visible
72
+ * @property {boolean} inlineTextInputVisible.value - The value of inlineTextInputVisible
73
+ * @property {Object} hasInlineTextInput - Whether the item has inline text input
74
+ * @property {boolean} hasInlineTextInput.value - The value of hasInlineTextInput
75
+ * @property {Object} markName - The name of the mark
76
+ * @property {*} markName.value - The value of markName
77
+ * @property {Object} labelAttr - The attribute for the label
78
+ * @property {*} labelAttr.value - The value of labelAttr
79
+ * @property {Object} allowWithoutEditor - Whether the item can be used without an editor
80
+ * @property {boolean} allowWithoutEditor.value - The value of allowWithoutEditor
81
+ * @property {Object} dropdownValueKey - The key for dropdown value
82
+ * @property {*} dropdownValueKey.value - The value of dropdownValueKey
83
+ * @property {Object} selectedValue - The selected value for the item
84
+ * @property {*} selectedValue.value - The value of the selected value
85
+ * @property {Object} inputRef - Reference to an input element
86
+ * @property {*} inputRef.value - The value of inputRef
87
+ * @property {Function} unref - Function to get unreferenced values
88
+ * @property {Function} activate - Function to activate the item
89
+ * @property {Function} deactivate - Function to deactivate the item
90
+ * @property {Function} setDisabled - Function to set the disabled state
91
+ * @property {Function} resetDisabled - Function to reset the disabled state
92
+ * @property {Function} onActivate - Function called when the item is activated
93
+ * @property {Function} onDeactivate - Function called when the item is deactivated
94
+ */
95
+ /**
96
+ * @typedef {Object} CommandItem
97
+ * @property {ToolbarItem} item - The toolbar item
98
+ * @property {*} [argument] - The argument to pass to the command
99
+ */
100
+ /**
101
+ * A customizable toolbar for the Super Editor
102
+ * @class
103
+ * @extends EventEmitter
104
+ */
1
105
  export class SuperToolbar extends EventEmitter<string | symbol, any> {
2
- constructor(config: any);
3
- config: {
4
- selector: any;
5
- toolbarGroups: string[];
6
- role: string;
7
- pagination: boolean;
8
- icons: {
9
- undo: any;
10
- redo: any;
11
- bold: any;
12
- italic: any;
13
- underline: any;
14
- color: any;
15
- link: any;
16
- image: any;
17
- alignLeft: any;
18
- alignRight: any;
19
- alignCenter: any;
20
- alignJustify: any;
21
- bulletList: any;
22
- numberedList: any;
23
- indentLeft: any;
24
- indentRight: any;
25
- pageBreak: any;
26
- copyFormat: any;
27
- clearFormatting: any;
28
- trackChanges: any;
29
- trackChangesFinal: any;
30
- trackChangesOriginal: any;
31
- trackChangesAccept: any;
32
- trackChangesReject: any;
33
- documentMode: any;
34
- documentEditingMode: any;
35
- documentSuggestingMode: any;
36
- documentViewingMode: any;
37
- colorOption: any;
38
- colorOptionCheck: any;
39
- linkInput: any;
40
- removeLink: any;
41
- openLink: any;
42
- overflow: any;
43
- dropdownCaretUp: any;
44
- dropdownCaretDown: any;
45
- ruler: any;
46
- paintbrush: any;
47
- highlight: any;
48
- ai: any;
49
- table: any;
50
- tableActions: any;
51
- splitCell: any;
52
- mergeCells: any;
53
- addRowBefore: any;
54
- addRowAfter: any;
55
- addColumnBefore: any;
56
- addColumnAfter: any;
57
- deleteRow: any;
58
- deleteColumn: any;
59
- deleteTable: any;
60
- deleteBorders: any;
61
- fixTables: any;
62
- lineHeight: any;
63
- search: any;
64
- };
65
- mode: string;
66
- excludeItems: any[];
67
- groups: any;
68
- editor: any;
69
- aiApiKey: any;
70
- aiEndpoint: any;
71
- };
106
+ /**
107
+ * Creates a new SuperToolbar instance
108
+ * @param {ToolbarConfig} config - The configuration for the toolbar
109
+ * @returns {void}
110
+ */
111
+ constructor(config: ToolbarConfig);
112
+ /**
113
+ * Default configuration for the toolbar
114
+ * @type {ToolbarConfig}
115
+ */
116
+ config: ToolbarConfig;
72
117
  toolbarItems: any[];
73
118
  overflowItems: any[];
74
119
  documentMode: any;
75
120
  isDev: any;
76
121
  superdoc: any;
77
- role: any;
122
+ role: string;
78
123
  app: import("vue").App<Element>;
79
124
  toolbar: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}, {}, {}, string, import("vue").ComponentProvideOptions>, {}, {}, "", {}, any>;
80
125
  activeEditor: any;
126
+ /**
127
+ * Log debug information to the console
128
+ * @param {...*} args - Arguments to log
129
+ * @returns {void}
130
+ */
81
131
  log(...args: any[]): void;
82
- setZoom(percent_int: any): void;
132
+ /**
133
+ * Set the zoom level
134
+ * @param {number} percent_int - The zoom percentage as an integer
135
+ * @returns {void}
136
+ */
137
+ setZoom(percent_int: number): void;
83
138
  /**
84
139
  * The toolbar expects an active Super Editor instance.
85
- * @param {*} editor
140
+ * @param {Object} editor - The editor instance to attach to the toolbar
141
+ * @returns {void}
86
142
  */
87
143
  setActiveEditor(editor: any): void;
88
- getToolbarItemByGroup(groupName: any): any[];
89
- getToolbarItemByName(name: any): any;
90
144
  /**
91
- * Update the toolbar state. Expects a list of marks in the form: { name, attrs }
92
- * @param {Object} marks
145
+ * Get toolbar items by group name
146
+ * @param {string} groupName - The name of the group
147
+ * @returns {ToolbarItem[]} An array of toolbar items in the specified group
148
+ */
149
+ getToolbarItemByGroup(groupName: string): ToolbarItem[];
150
+ /**
151
+ * Get a toolbar item by name
152
+ * @param {string} name - The name of the toolbar item
153
+ * @returns {ToolbarItem|undefined} The toolbar item with the specified name or undefined if not found
154
+ */
155
+ getToolbarItemByName(name: string): ToolbarItem | undefined;
156
+ /**
157
+ * Update the toolbar state based on the current editor state
158
+ * Updates active/inactive state of all toolbar items
159
+ * @returns {void}
93
160
  */
94
161
  updateToolbarState(): void;
162
+ /**
163
+ * Handler for toolbar resize events
164
+ * @returns {void}
165
+ */
95
166
  onToolbarResize: () => void;
96
167
  undoDepth: any;
97
168
  redoDepth: any;
98
169
  /**
99
170
  * React to editor transactions. Might want to debounce this.
171
+ * @param {Object} params - Transaction parameters
172
+ * @param {Object} params.editor - The editor instance (not used)
173
+ * @param {Object} params.transaction - The transaction object
174
+ * @returns {void}
100
175
  */
101
176
  onEditorTransaction({ editor, transaction }: {
102
177
  editor: any;
103
178
  transaction: any;
104
179
  }): void;
105
180
  /**
106
- * Main handler for toolbar commands.
107
- *
108
- * @param {Object} item is an instance of the useToolbarItem composable
109
- * @param {Object} argument is the argument passed to the command
110
- */
111
- emitCommand({ item, argument }: any): any;
181
+ * Main handler for toolbar commands
182
+ * @param {CommandItem} params - Command parameters
183
+ * @param {ToolbarItem} params.item - An instance of the useToolbarItem composable
184
+ * @param {*} [params.argument] - The argument passed to the command
185
+ * @returns {*} The result of the executed command, undefined if no result is returned
186
+ */
187
+ emitCommand({ item, argument, option }: CommandItem): any;
112
188
  #private;
113
189
  }
114
- import EventEmitter from 'eventemitter3';
190
+ export type ToolbarConfig = {
191
+ /**
192
+ * - CSS selector for the toolbar container
193
+ */
194
+ selector?: string;
195
+ /**
196
+ * - Groups to organize toolbar items
197
+ */
198
+ toolbarGroups?: string[];
199
+ /**
200
+ * - Role of the toolbar ('editor' or 'viewer')
201
+ */
202
+ role?: string;
203
+ /**
204
+ * - Whether pagination is enabled
205
+ */
206
+ pagination?: boolean;
207
+ /**
208
+ * - Custom icons for toolbar items
209
+ */
210
+ icons?: any;
211
+ /**
212
+ * - Editor mode
213
+ */
214
+ mode?: string;
215
+ /**
216
+ * - Items to exclude from the toolbar
217
+ */
218
+ excludeItems?: string[];
219
+ /**
220
+ * - Custom groups configuration
221
+ */
222
+ groups?: any;
223
+ /**
224
+ * - The editor instance
225
+ */
226
+ editor?: any;
227
+ /**
228
+ * - API key for AI integration
229
+ */
230
+ aiApiKey?: string;
231
+ /**
232
+ * - Endpoint for AI integration
233
+ */
234
+ aiEndpoint?: string;
235
+ /**
236
+ * - Custom buttons to add to the toolbar
237
+ */
238
+ customButtons?: ToolbarItem[];
239
+ };
240
+ export type ToolbarItem = {
241
+ /**
242
+ * - The unique ID of the toolbar item
243
+ */
244
+ id: {
245
+ value: string;
246
+ };
247
+ /**
248
+ * - The name of the toolbar item
249
+ */
250
+ name: {
251
+ value: string;
252
+ };
253
+ /**
254
+ * - The type of toolbar item (button, options, separator, dropdown, overflow)
255
+ */
256
+ type: string;
257
+ /**
258
+ * - The group the item belongs to
259
+ */
260
+ group: {
261
+ value: string;
262
+ };
263
+ /**
264
+ * - The command to execute
265
+ */
266
+ command: string;
267
+ /**
268
+ * - The command to execute when no argument is provided
269
+ */
270
+ noArgumentCommand?: string;
271
+ /**
272
+ * - The icon for the item
273
+ */
274
+ icon: {
275
+ value: any;
276
+ };
277
+ /**
278
+ * - The tooltip for the item
279
+ */
280
+ tooltip: {
281
+ value: any;
282
+ };
283
+ /**
284
+ * - Additional attributes for the item
285
+ */
286
+ attributes: {
287
+ value: any;
288
+ };
289
+ /**
290
+ * - Whether the item is disabled
291
+ */
292
+ disabled: {
293
+ value: boolean;
294
+ };
295
+ /**
296
+ * - Whether the item is active
297
+ */
298
+ active: {
299
+ value: boolean;
300
+ };
301
+ /**
302
+ * - Whether the item is expanded
303
+ */
304
+ expand: {
305
+ value: boolean;
306
+ };
307
+ /**
308
+ * - Nested options for the item
309
+ */
310
+ nestedOptions: {
311
+ value: any[];
312
+ };
313
+ /**
314
+ * - Custom style for the item
315
+ */
316
+ style: {
317
+ value: any;
318
+ };
319
+ /**
320
+ * - Whether the item has narrow styling
321
+ */
322
+ isNarrow: {
323
+ value: boolean;
324
+ };
325
+ /**
326
+ * - Whether the item has wide styling
327
+ */
328
+ isWide: {
329
+ value: boolean;
330
+ };
331
+ /**
332
+ * - Minimum width of the item
333
+ */
334
+ minWidth: {
335
+ value: any;
336
+ };
337
+ /**
338
+ * - The argument to pass to the command
339
+ */
340
+ argument: {
341
+ value: any;
342
+ };
343
+ /**
344
+ * - The parent of this item if nested
345
+ */
346
+ parentItem: {
347
+ value: any;
348
+ };
349
+ /**
350
+ * - The child of this item if it has one
351
+ */
352
+ childItem: {
353
+ value: any;
354
+ };
355
+ /**
356
+ * - The color of the icon
357
+ */
358
+ iconColor: {
359
+ value: any;
360
+ };
361
+ /**
362
+ * - Whether the item has a dropdown caret
363
+ */
364
+ hasCaret: {
365
+ value: boolean;
366
+ };
367
+ /**
368
+ * - Custom styles for dropdown
369
+ */
370
+ dropdownStyles: {
371
+ value: any;
372
+ };
373
+ /**
374
+ * - Whether the tooltip is visible
375
+ */
376
+ tooltipVisible: {
377
+ value: boolean;
378
+ };
379
+ /**
380
+ * - Timeout for the tooltip
381
+ */
382
+ tooltipTimeout: {
383
+ value: any;
384
+ };
385
+ /**
386
+ * - The default label for the item
387
+ */
388
+ defaultLabel: {
389
+ value: any;
390
+ };
391
+ /**
392
+ * - The label for the item
393
+ */
394
+ label: {
395
+ value: any;
396
+ };
397
+ /**
398
+ * - Whether to hide the label
399
+ */
400
+ hideLabel: {
401
+ value: boolean;
402
+ };
403
+ /**
404
+ * - Whether inline text input is visible
405
+ */
406
+ inlineTextInputVisible: {
407
+ value: boolean;
408
+ };
409
+ /**
410
+ * - Whether the item has inline text input
411
+ */
412
+ hasInlineTextInput: {
413
+ value: boolean;
414
+ };
415
+ /**
416
+ * - The name of the mark
417
+ */
418
+ markName: {
419
+ value: any;
420
+ };
421
+ /**
422
+ * - The attribute for the label
423
+ */
424
+ labelAttr: {
425
+ value: any;
426
+ };
427
+ /**
428
+ * - Whether the item can be used without an editor
429
+ */
430
+ allowWithoutEditor: {
431
+ value: boolean;
432
+ };
433
+ /**
434
+ * - The key for dropdown value
435
+ */
436
+ dropdownValueKey: {
437
+ value: any;
438
+ };
439
+ /**
440
+ * - The selected value for the item
441
+ */
442
+ selectedValue: {
443
+ value: any;
444
+ };
445
+ /**
446
+ * - Reference to an input element
447
+ */
448
+ inputRef: {
449
+ value: any;
450
+ };
451
+ /**
452
+ * - Function to get unreferenced values
453
+ */
454
+ unref: Function;
455
+ /**
456
+ * - Function to activate the item
457
+ */
458
+ activate: Function;
459
+ /**
460
+ * - Function to deactivate the item
461
+ */
462
+ deactivate: Function;
463
+ /**
464
+ * - Function to set the disabled state
465
+ */
466
+ setDisabled: Function;
467
+ /**
468
+ * - Function to reset the disabled state
469
+ */
470
+ resetDisabled: Function;
471
+ /**
472
+ * - Function called when the item is activated
473
+ */
474
+ onActivate: Function;
475
+ /**
476
+ * - Function called when the item is deactivated
477
+ */
478
+ onDeactivate: Function;
479
+ };
480
+ export type CommandItem = {
481
+ /**
482
+ * - The toolbar item
483
+ */
484
+ item: ToolbarItem;
485
+ /**
486
+ * - The argument to pass to the command
487
+ */
488
+ argument?: any;
489
+ };
490
+ import { EventEmitter } from 'eventemitter3';
115
491
  //# sourceMappingURL=super-toolbar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"super-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/super-toolbar.js"],"names":[],"mappings":"AAeA;IAeE,yBA2CC;IAzDD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAYE;IAMA,oBAAsB;IACtB,qBAAuB;IACvB,kBAAoD;IACpD,WAAkC;IAClC,cAA+B;IAC/B,UAAmC;IA4BnC,gCAA6B;IAGrB,uQAAiC;IACzC,kBAAyC;IAoL3C,0BAEC;IAED,gCAIC;IAED;;;OAGG;IACH,wBAFW,GAAC,QAKX;IAED,6CAEC;IAED,qCAEC;IA2DD;;;OAGG;IACH,2BA+DC;IAED,4BAKE;IAaA,eAAmD;IACnD,eAAmD;IAGrD;;OAEG;IACH;;;aAGC;IAED;;;;;OAKG;IACH,0CAqBC;;CAoBF;yBAjewB,eAAe"}
1
+ {"version":3,"file":"super-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/super-toolbar.js"],"names":[],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- import { O as o } from "./chunks/converter-B_CnsyBe.js";
1
+ import { O as o } from "./chunks/converter-Vjysuk1c.js";
2
2
  export {
3
3
  o as SuperConverter
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DocxZipper.d.ts","sourceRoot":"","sources":["../../src/core/DocxZipper.js"],"names":[],"mappings":";AAIA;;GAEG;AACH;IACE,yBAOC;IANC,WAAkC;IAClC,SAAsB;IACtB,aAAe;IACf,UAAe;IACf,eAAoB;IACpB,UAAe;IAGjB;;;;;;;;;;;;;;;;;SAiBK;IACL,yDA0CC;IAED,qCAEC;IAED;;OAEG;IACH,yDAgDC;IAED,+BAGC;IAED;;;;;;;qBAaC;IAED;;;;;OAKG;IACH,kFAFa,OAAO,CAAC,KAAK,CAAC,CA6B1B;IAED;;;;;;OAMG;IACH,yCAJW,IAAI,iCAEF,OAAO,CAAC,KAAK,CAAC,CAyB1B;CACF"}
1
+ {"version":3,"file":"DocxZipper.d.ts","sourceRoot":"","sources":["../../src/core/DocxZipper.js"],"names":[],"mappings":";AAKA;;GAEG;AACH;IACE,yBAOC;IANC,WAAkC;IAClC,SAAsB;IACtB,aAAe;IACf,UAAe;IACf,eAAoB;IACpB,UAAe;IAGjB;;;;;;;;;;;;;;;;;SAiBK;IACL,yDA0CC;IAED,qCAEC;IAED;;OAEG;IACH,yDAyDC;IAED,+BAGC;IAED;;;;;;;qBAaC;IAED;;;;;OAKG;IACH,kFAFa,OAAO,CAAC,KAAK,CAAC,CA6B1B;IAED;;;;;;OAMG;IACH,yCAJW,IAAI,iCAEF,OAAO,CAAC,KAAK,CAAC,CAyB1B;CACF"}