superdoc 0.31.0-next.1 → 0.31.0-next.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/dist/chunks/{PdfViewer-CSZtzevK.cjs → PdfViewer-K3AvhcPe.cjs} +1 -1
- package/dist/chunks/{PdfViewer-DYfpBL2P.es.js → PdfViewer-SNmZ-cFQ.es.js} +1 -1
- package/dist/chunks/{index-0zP7LFOd-CQ5IRTwG.es.js → index-BYoh4bTC-CvwLNvhw.es.js} +1 -1
- package/dist/chunks/{index-0zP7LFOd-PDPveafF.cjs → index-BYoh4bTC-D3KgbMGN.cjs} +1 -1
- package/dist/chunks/{index-BiYSI2c3.es.js → index-B_y8k48i.es.js} +3 -3
- package/dist/chunks/{index-9j37gBmK.cjs → index-BhTmqYMI.cjs} +3 -3
- package/dist/chunks/{super-editor.es-BzhuUuJx.es.js → super-editor.es-2s47mdgM.es.js} +196 -255
- package/dist/chunks/{super-editor.es-D8j9E-4h.cjs → super-editor.es-qzNK-dCq.cjs} +196 -255
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts +132 -52
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts +132 -52
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-B3mE6WPB.js → converter-B9P9VS_X.js} +10 -7
- package/dist/super-editor/chunks/{docx-zipper-FgUekv4g.js → docx-zipper-CrHein3w.js} +1 -1
- package/dist/super-editor/chunks/{editor-B0PiO07g.js → editor-uhFrEJtT.js} +200 -326
- package/dist/super-editor/chunks/{index-0zP7LFOd.js → index-BYoh4bTC.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-Bj9E8rmT.js → toolbar-BnD2JDA6.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor/src/core/Attribute.d.ts +75 -29
- package/dist/super-editor/super-editor/src/core/Attribute.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/CommandService.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/CommandService.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Editor.d.ts +136 -673
- package/dist/super-editor/super-editor/src/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/EventEmitter.d.ts +23 -14
- package/dist/super-editor/super-editor/src/core/EventEmitter.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Extension.d.ts +25 -11
- package/dist/super-editor/super-editor/src/core/Extension.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/ExtensionService.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/ExtensionService.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Mark.d.ts +28 -12
- package/dist/super-editor/super-editor/src/core/Mark.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/Node.d.ts +87 -25
- package/dist/super-editor/super-editor/src/core/Node.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/OxmlNode.d.ts +20 -13
- package/dist/super-editor/super-editor/src/core/OxmlNode.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/commands/types/index.d.ts +11 -89
- package/dist/super-editor/super-editor/src/core/commands/types/index.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/commands.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/commands.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/editable.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/editable.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/editorFocus.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/editorFocus.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/keymap.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/extensions/keymap.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/helpers/annotator.d.ts +3 -2
- package/dist/super-editor/super-editor/src/core/helpers/annotator.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/helpers/getExtensionConfigField.d.ts +12 -5
- package/dist/super-editor/super-editor/src/core/helpers/getExtensionConfigField.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/helpers/isList.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/helpers/isList.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/helpers/list-numbering-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/index.d.ts +18 -13
- package/dist/super-editor/super-editor/src/core/index.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/markImporter.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/types/ChainedCommands.d.ts +118 -0
- package/dist/super-editor/super-editor/src/core/types/ChainedCommands.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/types/EditorConfig.d.ts +265 -0
- package/dist/super-editor/super-editor/src/core/types/EditorConfig.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/types/EditorEvents.d.ts +144 -0
- package/dist/super-editor/super-editor/src/core/types/EditorEvents.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/types/EditorTypes.d.ts +73 -0
- package/dist/super-editor/super-editor/src/core/types/EditorTypes.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/types/__tests__/command-types.d.ts +2 -0
- package/dist/super-editor/super-editor/src/core/types/__tests__/command-types.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/core/utilities/callOrGet.d.ts +6 -2
- package/dist/super-editor/super-editor/src/core/utilities/callOrGet.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/core/utilities/isIOS.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/ai/ai-marks.d.ts +8 -2
- package/dist/super-editor/super-editor/src/extensions/ai/ai-marks.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/ai/ai-nodes.d.ts +7 -1
- package/dist/super-editor/super-editor/src/extensions/ai/ai-nodes.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/ai/ai-plugin.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/ai/ai-plugin.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/block-node/block-node.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/block-node/block-node.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/bold/bold.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/bold/bold.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/bookmarks/bookmark-end.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/bookmarks/bookmark-end.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/bookmarks/bookmark-start.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/bookmarks/bookmark-start.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration/collaboration.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration/collaboration.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration-cursor/collaboration-cursor.d.ts +9 -1
- package/dist/super-editor/super-editor/src/extensions/collaboration-cursor/collaboration-cursor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/color/color.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/color/color.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comment.d.ts +18 -3
- package/dist/super-editor/super-editor/src/extensions/comment/comment.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comments-marks.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comments-marks.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comments-plugin.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/comment/comments-plugin.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/content-block/content-block.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/content-block/content-block.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/custom-selection/custom-selection.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/custom-selection/custom-selection.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/document/document.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/document/document.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/dropcursor/dropcursor.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/dropcursor/dropcursor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/field-annotation/field-annotation.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/field-annotation/field-annotation.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/font-family/font-family.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/font-family/font-family.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/font-size/font-size.d.ts +9 -1
- package/dist/super-editor/super-editor/src/extensions/font-size/font-size.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/format-commands/format-commands.d.ts +7 -1
- package/dist/super-editor/super-editor/src/extensions/format-commands/format-commands.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/gapcursor/gapcursor.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/gapcursor/gapcursor.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/heading/heading.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/heading/heading.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/highlight/highlight.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/highlight/highlight.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/history/history.d.ts +4 -1
- package/dist/super-editor/super-editor/src/extensions/history/history.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/image/image.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/image/image.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/index.d.ts +22 -2
- package/dist/super-editor/super-editor/src/extensions/index.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/italic/italic.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/italic/italic.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/line-break/line-break.d.ts +2 -2
- package/dist/super-editor/super-editor/src/extensions/line-break/line-break.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/line-height/line-height.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/line-height/line-height.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/link/link.d.ts +9 -1
- package/dist/super-editor/super-editor/src/extensions/link/link.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/linked-styles/linked-styles.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/linked-styles/linked-styles.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/mention/mention.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/mention/mention.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/noderesizer/noderesizer.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/noderesizer/noderesizer.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/page-number/page-number.d.ts +2 -2
- package/dist/super-editor/super-editor/src/extensions/page-number/page-number.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/page-reference/page-reference.d.ts +8 -1
- package/dist/super-editor/super-editor/src/extensions/page-reference/page-reference.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/pagination/pagination.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/pagination/pagination.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/paragraph/paragraph.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/paragraph/paragraph.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/placeholder/placeholder.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/placeholder/placeholder.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/popover-plugin/popover-plugin.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/popover-plugin/popover-plugin.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/run/run.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/run/run.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/search/search.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/search/search.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/shape-container/shape-container.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/shape-container/shape-container.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/shape-group/shape-group.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/shape-group/shape-group.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/shape-textbox/shape-textbox.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/shape-textbox/shape-textbox.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/slash-menu/slash-menu.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/slash-menu/slash-menu.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/strike/strike.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/strike/strike.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/document-part-object.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/document-part-object.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/document-section.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/document-section.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-block.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-block.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-commands.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-commands.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/tab/tab.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/tab/tab.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table/table.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/table/table.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table-cell/table-cell.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/table-cell/table-cell.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table-header/table-header.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/table-header/table-header.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table-of-contents/table-of-contents.d.ts +6 -1
- package/dist/super-editor/super-editor/src/extensions/table-of-contents/table-of-contents.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/table-row/table-row.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/table-row/table-row.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/text/text.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/text/text.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/text-align/text-align.d.ts +4 -1
- package/dist/super-editor/super-editor/src/extensions/text-align/text-align.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/text-indent/text-indent.d.ts +7 -1
- package/dist/super-editor/super-editor/src/extensions/text-indent/text-indent.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/text-style/text-style.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/text-style/text-style.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/text-transform/text-transform.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/text-transform/text-transform.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts +132 -52
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-changes.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-changes.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-delete.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-delete.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-format.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-format.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-insert.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/track-insert.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/trackChangesHelpers/trackedTransaction.d.ts +5 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/trackChangesHelpers/trackedTransaction.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/types/formatting-commands.d.ts +40 -0
- package/dist/super-editor/super-editor/src/extensions/types/formatting-commands.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/types/history-link-table-commands.d.ts +57 -0
- package/dist/super-editor/super-editor/src/extensions/types/history-link-table-commands.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/types/specialized-commands.d.ts +83 -0
- package/dist/super-editor/super-editor/src/extensions/types/specialized-commands.d.ts.map +1 -0
- package/dist/super-editor/super-editor/src/extensions/underline/underline.d.ts +3 -1
- package/dist/super-editor/super-editor/src/extensions/underline/underline.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/extensions/vector-shape/vector-shape.d.ts +1 -1
- package/dist/super-editor/super-editor/src/extensions/vector-shape/vector-shape.d.ts.map +1 -1
- package/dist/super-editor/super-editor/src/tests/export/export-helpers/export-helpers.d.ts +1 -1
- package/dist/super-editor/super-editor/src/tests/export/export-helpers/export-helpers.d.ts.map +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +198 -257
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base interface for extensions with a config object.
|
|
3
|
+
*/
|
|
4
|
+
export interface ExtensionLike {
|
|
5
|
+
config: Record<string, any>;
|
|
6
|
+
}
|
|
1
7
|
/**
|
|
2
8
|
* Get extension config field.
|
|
3
|
-
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
6
|
-
* @
|
|
9
|
+
* If the field is a function, it will be bound to the provided context.
|
|
10
|
+
* @param extension The Editor extension.
|
|
11
|
+
* @param field The config field name.
|
|
12
|
+
* @param context The context object to bind to function.
|
|
13
|
+
* @returns The config field value or bound function.
|
|
7
14
|
*/
|
|
8
|
-
export function getExtensionConfigField(extension:
|
|
15
|
+
export declare function getExtensionConfigField<T = any>(extension: ExtensionLike, field: string, context?: Record<string, any>): T;
|
|
9
16
|
//# sourceMappingURL=getExtensionConfigField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getExtensionConfigField.d.ts","sourceRoot":"","sources":["../../../../../src/core/helpers/getExtensionConfigField.
|
|
1
|
+
{"version":3,"file":"getExtensionConfigField.d.ts","sourceRoot":"","sources":["../../../../../src/core/helpers/getExtensionConfigField.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,GAAG,GAAG,EAC7C,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAChC,CAAC,CASH"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export function isList(name: any, extensions: any):
|
|
1
|
+
export function isList(name: any, extensions: any): any;
|
|
2
2
|
//# sourceMappingURL=isList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isList.d.ts","sourceRoot":"","sources":["../../../../../src/core/helpers/isList.js"],"names":[],"mappings":"AAQO,
|
|
1
|
+
{"version":3,"file":"isList.d.ts","sourceRoot":"","sources":["../../../../../src/core/helpers/isList.js"],"names":[],"mappings":"AAQO,wDAcN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-numbering-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/core/helpers/list-numbering-helpers.js"],"names":[],"mappings":"AAoBO,gGATJ;IAAuB,KAAK,EAApB,MAAM;IACS,QAAQ;IACP,KAAK,GAArB,MAAM;IACU,KAAK,GAArB,MAAM;IACU,IAAI,GAApB,MAAM;IACU,GAAG,GAAnB,MAAM;IAC6B,MAAM,EAAzC,OAAO,WAAW,EAAE,MAAM;CAClC,
|
|
1
|
+
{"version":3,"file":"list-numbering-helpers.d.ts","sourceRoot":"","sources":["../../../../../src/core/helpers/list-numbering-helpers.js"],"names":[],"mappings":"AAoBO,gGATJ;IAAuB,KAAK,EAApB,MAAM;IACS,QAAQ;IACP,KAAK,GAArB,MAAM;IACU,KAAK,GAArB,MAAM;IACU,IAAI,GAApB,MAAM;IACU,GAAG,GAAnB,MAAM;IAC6B,MAAM,EAAzC,OAAO,WAAW,EAAE,MAAM;CAClC,OAmFF;AAEM,+EAYN;AAUM,+CANI,MA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WM,+DANJ;IAAuB,EAAE;IACF,IAAI,EAAnB,MAAM;IACS,EAAE,EAAjB,MAAM;IACO,OAAO,EAApB,IAAI;CACZ,GAAU,IAAI,CAIhB;;;;;;;;;;;;;;;;;mCAjekD,uBAAuB;+BAAvB,uBAAuB"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * as
|
|
11
|
-
export * as
|
|
12
|
-
export *
|
|
13
|
-
export { default as DocxZipper } from
|
|
1
|
+
export * from './Node.js';
|
|
2
|
+
export * from './Mark.js';
|
|
3
|
+
export * from './Schema.js';
|
|
4
|
+
export * from './Attribute.js';
|
|
5
|
+
export * from './CommandService.js';
|
|
6
|
+
export * from './Extension.js';
|
|
7
|
+
export * from './super-converter/SuperConverter.js';
|
|
8
|
+
export * from './OxmlNode.js';
|
|
9
|
+
export * as coreExtensions from './extensions/index.js';
|
|
10
|
+
export * as helpers from './helpers/index.js';
|
|
11
|
+
export * as utilities from './utilities/index.js';
|
|
12
|
+
export * from './Editor.js';
|
|
13
|
+
export { default as DocxZipper } from './DocxZipper.js';
|
|
14
|
+
export type * from './types/EditorConfig.js';
|
|
15
|
+
export type * from './types/EditorTypes.js';
|
|
16
|
+
export type * from './types/EditorEvents.js';
|
|
17
|
+
export type * from './EventEmitter.js';
|
|
18
|
+
export type { ChainedCommand, ChainableCommandObject, CanCommand, CanCommands, CanObject, CoreCommands, ExtensionCommands, EditorCommands, CommandProps, Command, CommandServiceOptions, } from './types/ChainedCommands.js';
|
|
14
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qCAAqC,CAAC;AACpD,cAAc,eAAe,CAAC;AAE9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAGlD,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGxD,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,wBAAwB,CAAC;AAC5C,mBAAmB,yBAAyB,CAAC;AAC7C,mBAAmB,mBAAmB,CAAC;AAGvC,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,UAAU,EACV,WAAW,EACX,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,OAAO,EACP,qBAAqB,GACtB,MAAM,4BAA4B,CAAC"}
|
package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/markImporter.d.ts
CHANGED
|
@@ -39,5 +39,5 @@ export function getFontFamilyValue(attributes: any, docx: any): any;
|
|
|
39
39
|
export function getIndentValue(attributes: any): string;
|
|
40
40
|
export function getLineHeightValue(attributes: any): string;
|
|
41
41
|
export function getHighLightValue(attributes: any): string;
|
|
42
|
-
export function getStrikeValue(attributes: any): "
|
|
42
|
+
export function getStrikeValue(attributes: any): "0" | "1";
|
|
43
43
|
//# sourceMappingURL=markImporter.d.ts.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import type { Transaction, EditorState } from 'prosemirror-state';
|
|
2
|
+
import type { EditorView } from 'prosemirror-view';
|
|
3
|
+
import type { Editor } from '../Editor.js';
|
|
4
|
+
/**
|
|
5
|
+
* Map of built-in command names to their parameter signatures.
|
|
6
|
+
* Extensions can augment this interface to add more precise types.
|
|
7
|
+
* Currently empty because built-in focus/blur are exposed directly on Editor,
|
|
8
|
+
* not via `editor.commands`. Populate here when core commands are added.
|
|
9
|
+
*/
|
|
10
|
+
export interface CoreCommandMap {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Map of extension command names to their parameter signatures.
|
|
14
|
+
* Each extension should augment this interface when adding typed commands.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Map of extension command names to their parameter signatures.
|
|
18
|
+
* Extensions should augment this interface via module augmentation, e.g.:
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* declare module '@core/types/ChainedCommands.js' {
|
|
22
|
+
* interface ExtensionCommandMap {
|
|
23
|
+
* setFontSize: (fontSize: string | number) => boolean;
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export interface ExtensionCommandMap {
|
|
29
|
+
}
|
|
30
|
+
type AnyCommand = (...args: unknown[]) => unknown;
|
|
31
|
+
type RegisteredCommands = CoreCommandMap & ExtensionCommandMap;
|
|
32
|
+
type KnownCommandKey = keyof RegisteredCommands;
|
|
33
|
+
type UntypedCommandFallback<K extends PropertyKey> = (...args: unknown[]) => boolean;
|
|
34
|
+
type ExtractCommand<K extends PropertyKey> = K extends KnownCommandKey ? RegisteredCommands[K] : UntypedCommandFallback<K>;
|
|
35
|
+
type NormalizeCommand<F> = F extends (...args: infer A) => (props: CommandProps) => infer R ? (...args: A) => R : F;
|
|
36
|
+
type CommandForKey<K extends PropertyKey> = NormalizeCommand<ExtractCommand<K>>;
|
|
37
|
+
type CommandArgs<K extends PropertyKey> = Parameters<CommandForKey<K>>;
|
|
38
|
+
type CommandResult<K extends PropertyKey> = ReturnType<CommandForKey<K>>;
|
|
39
|
+
type KnownCommandRecord = {
|
|
40
|
+
[K in keyof RegisteredCommands]: CommandForKey<K>;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* A chainable version of an editor command keyed by command name.
|
|
44
|
+
*/
|
|
45
|
+
export type ChainedCommand<K extends string = string> = (...args: CommandArgs<K>) => ChainableCommandObject;
|
|
46
|
+
type KnownChainedCommands = {
|
|
47
|
+
[K in keyof RegisteredCommands]: (...args: CommandArgs<K>) => ChainableCommandObject;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Chainable command object returned by `createChain`.
|
|
51
|
+
* Has dynamic keys (one per command) and a `run()` method.
|
|
52
|
+
*/
|
|
53
|
+
export type ChainableCommandObject = {
|
|
54
|
+
run: () => boolean;
|
|
55
|
+
} & KnownChainedCommands & Record<string, (...args: unknown[]) => ChainableCommandObject>;
|
|
56
|
+
/**
|
|
57
|
+
* A command that can be checked for availability.
|
|
58
|
+
*/
|
|
59
|
+
export type CanCommand<K extends string = string> = (...args: CommandArgs<K>) => CommandResult<K>;
|
|
60
|
+
type KnownCanCommands = {
|
|
61
|
+
[K in keyof RegisteredCommands]: (...args: CommandArgs<K>) => CommandResult<K>;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Map of commands that can be checked.
|
|
65
|
+
*/
|
|
66
|
+
export type CanCommands = Record<string, CanCommand>;
|
|
67
|
+
/**
|
|
68
|
+
* Object returned by `createCan`: dynamic boolean commands + a `chain()` helper.
|
|
69
|
+
*/
|
|
70
|
+
export type CanObject = KnownCanCommands & Record<string, CanCommand> & {
|
|
71
|
+
chain: () => ChainableCommandObject;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Core editor commands available on all instances.
|
|
75
|
+
*/
|
|
76
|
+
export type CoreCommands = Pick<KnownCommandRecord, keyof CoreCommandMap>;
|
|
77
|
+
/**
|
|
78
|
+
* Commands added by extensions - populated via module augmentation.
|
|
79
|
+
*/
|
|
80
|
+
export type ExtensionCommands = Pick<KnownCommandRecord, keyof ExtensionCommandMap>;
|
|
81
|
+
/**
|
|
82
|
+
* All available editor commands
|
|
83
|
+
*/
|
|
84
|
+
export type EditorCommands = CoreCommands & ExtensionCommands & Record<string, AnyCommand>;
|
|
85
|
+
/**
|
|
86
|
+
* Command props made available to every command handler.
|
|
87
|
+
*/
|
|
88
|
+
export interface CommandProps {
|
|
89
|
+
/** The editor instance */
|
|
90
|
+
editor: Editor;
|
|
91
|
+
/** The ProseMirror transaction */
|
|
92
|
+
tr: Transaction;
|
|
93
|
+
/** The current editor state */
|
|
94
|
+
state: EditorState;
|
|
95
|
+
/** The active editor view */
|
|
96
|
+
view: EditorView;
|
|
97
|
+
/** Optional dispatcher */
|
|
98
|
+
dispatch?: (tr: Transaction) => void;
|
|
99
|
+
/** Helper to build command chains */
|
|
100
|
+
chain: () => ChainableCommandObject;
|
|
101
|
+
/** Helper to check command availability */
|
|
102
|
+
can: () => CanObject;
|
|
103
|
+
/** Lazy command map bound to current props */
|
|
104
|
+
commands: EditorCommands;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* A command handler invoked by the command service.
|
|
108
|
+
*/
|
|
109
|
+
export type Command = (props: CommandProps) => boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Command service options
|
|
112
|
+
*/
|
|
113
|
+
export interface CommandServiceOptions {
|
|
114
|
+
/** The editor instance */
|
|
115
|
+
editor: Editor;
|
|
116
|
+
}
|
|
117
|
+
export {};
|
|
118
|
+
//# sourceMappingURL=ChainedCommands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChainedCommands.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/ChainedCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C;;;;;GAKG;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AEG;AACH,MAAM,WAAW,YAAY;IAC3B,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IAEf,kCAAkC;IAClC,EAAE,EAAE,WAAW,CAAC;IAEhB,+BAA+B;IAC/B,KAAK,EAAE,WAAW,CAAC;IAEnB,6BAA6B;IAC7B,IAAI,EAAE,UAAU,CAAC;IAEjB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAC;IAErC,qCAAqC;IACrC,KAAK,EAAE,MAAM,sBAAsB,CAAC;IAEpC,2CAA2C;IAC3C,GAAG,EAAE,MAAM,SAAS,CAAC;IAErB,8CAA8C;IAC9C,QAAQ,EAAE,cAAc,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import type { EditorState, Transaction } from 'prosemirror-state';
|
|
2
|
+
import type { Doc as YDoc, XmlFragment as YXmlFragment } from 'yjs';
|
|
3
|
+
import type { Editor } from '../Editor.js';
|
|
4
|
+
import type { Extension } from '../Extension.js';
|
|
5
|
+
import type { Node as EditorNode } from '../Node.js';
|
|
6
|
+
import type { Mark as EditorMark } from '../Mark.js';
|
|
7
|
+
import type { FontsResolvedPayload, Comment, CommentsPayload, CommentLocationsPayload, PaginationPayload, ListDefinitionsPayload } from './EditorEvents.js';
|
|
8
|
+
import type { ProseMirrorJSON, TelemetryData } from './EditorTypes.js';
|
|
9
|
+
/**
|
|
10
|
+
* User information for collaboration
|
|
11
|
+
*/
|
|
12
|
+
export interface User {
|
|
13
|
+
/** The user's name */
|
|
14
|
+
name: string;
|
|
15
|
+
/** The user's email */
|
|
16
|
+
email: string;
|
|
17
|
+
/** The user's photo URL */
|
|
18
|
+
image: string | null;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Field value for document fields
|
|
22
|
+
*/
|
|
23
|
+
export interface FieldValue {
|
|
24
|
+
/** The id of the input field */
|
|
25
|
+
input_id: string;
|
|
26
|
+
/** The value to insert into the field */
|
|
27
|
+
input_value: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A JSON representation of a docx node
|
|
31
|
+
*/
|
|
32
|
+
export interface DocxNode {
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Single docx file entry extracted from the archive
|
|
37
|
+
*/
|
|
38
|
+
export interface DocxFileEntry {
|
|
39
|
+
name: string;
|
|
40
|
+
content: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Collaboration provider interface
|
|
44
|
+
*/
|
|
45
|
+
export interface CollaborationProvider {
|
|
46
|
+
on(event: string, handler: (...args: unknown[]) => void): void;
|
|
47
|
+
off(event: string, handler: (...args: unknown[]) => void): void;
|
|
48
|
+
connect?: () => void;
|
|
49
|
+
disconnect?: () => void;
|
|
50
|
+
destroy?: () => void;
|
|
51
|
+
synced?: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Any extension supported by the editor (node, mark, or extension)
|
|
55
|
+
*/
|
|
56
|
+
export type EditorExtension = Extension<any, any> | EditorNode<any, any> | EditorMark<any, any>;
|
|
57
|
+
/**
|
|
58
|
+
* Permission resolver parameters
|
|
59
|
+
*/
|
|
60
|
+
export interface PermissionParams {
|
|
61
|
+
permission: string;
|
|
62
|
+
role?: string;
|
|
63
|
+
isInternal?: boolean;
|
|
64
|
+
comment?: Comment | null;
|
|
65
|
+
trackedChange?: unknown | null;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Editor configuration options
|
|
69
|
+
*/
|
|
70
|
+
export interface EditorOptions {
|
|
71
|
+
/** The container element for the editor */
|
|
72
|
+
element?: HTMLElement | null;
|
|
73
|
+
/** CSS selector for the editor container */
|
|
74
|
+
selector?: string | null;
|
|
75
|
+
/** Whether the editor is running in headless mode */
|
|
76
|
+
isHeadless?: boolean;
|
|
77
|
+
/** Mock document for testing */
|
|
78
|
+
mockDocument?: Document | null;
|
|
79
|
+
/** Mock window for testing */
|
|
80
|
+
mockWindow?: Window | null;
|
|
81
|
+
/** XML/JSON/HTML content */
|
|
82
|
+
content?: string | DocxFileEntry[] | Record<string, unknown> | null;
|
|
83
|
+
/** Current user information */
|
|
84
|
+
user?: User | null;
|
|
85
|
+
/** List of users for collaboration */
|
|
86
|
+
users?: User[];
|
|
87
|
+
/** Media configuration */
|
|
88
|
+
media?: Record<string, unknown>;
|
|
89
|
+
/** Media files */
|
|
90
|
+
mediaFiles?: Record<string, unknown>;
|
|
91
|
+
/** Font configuration */
|
|
92
|
+
fonts?: Record<string, unknown>;
|
|
93
|
+
/** Document mode ('editing', 'viewing', 'suggesting') */
|
|
94
|
+
documentMode?: string;
|
|
95
|
+
/** Editor mode ('docx', 'text', 'html') */
|
|
96
|
+
mode?: 'docx' | 'text' | 'html';
|
|
97
|
+
/** User role ('editor', 'viewer', 'suggester') */
|
|
98
|
+
role?: string;
|
|
99
|
+
/** Available colors */
|
|
100
|
+
colors?: string[];
|
|
101
|
+
/** Document converter */
|
|
102
|
+
converter?: unknown | null;
|
|
103
|
+
/** Source of the file (File/Blob in browser, Buffer in Node.js) */
|
|
104
|
+
fileSource?: File | Blob | Buffer | null;
|
|
105
|
+
/** Initial editor state */
|
|
106
|
+
initialState?: EditorState | null;
|
|
107
|
+
/** Unique document identifier */
|
|
108
|
+
documentId?: string | null;
|
|
109
|
+
/** Editor extensions */
|
|
110
|
+
extensions?: EditorExtension[];
|
|
111
|
+
/** Whether the editor is editable */
|
|
112
|
+
editable?: boolean;
|
|
113
|
+
/** Editor properties */
|
|
114
|
+
editorProps?: Record<string, unknown>;
|
|
115
|
+
/** Parsing options */
|
|
116
|
+
parseOptions?: Record<string, unknown>;
|
|
117
|
+
/** Core extension options */
|
|
118
|
+
coreExtensionOptions?: Record<string, unknown>;
|
|
119
|
+
/** Whether to enable input rules */
|
|
120
|
+
enableInputRules?: boolean;
|
|
121
|
+
/** Whether comments are enabled */
|
|
122
|
+
isCommentsEnabled?: boolean;
|
|
123
|
+
/** Whether this is a new file */
|
|
124
|
+
isNewFile?: boolean;
|
|
125
|
+
/** Editor scale/zoom */
|
|
126
|
+
scale?: number;
|
|
127
|
+
/** Whether annotations are enabled */
|
|
128
|
+
annotations?: boolean;
|
|
129
|
+
/** Whether this is an internal editor */
|
|
130
|
+
isInternal?: boolean;
|
|
131
|
+
/** External extensions */
|
|
132
|
+
externalExtensions?: EditorExtension[];
|
|
133
|
+
/** Whether this editor runs as a linked child editor */
|
|
134
|
+
isChildEditor?: boolean;
|
|
135
|
+
/** Whether the document content was generated from schema */
|
|
136
|
+
loadFromSchema?: boolean;
|
|
137
|
+
/** Numbering configuration */
|
|
138
|
+
numbering?: Record<string, unknown>;
|
|
139
|
+
/** Whether this is a header or footer editor */
|
|
140
|
+
isHeaderOrFooter?: boolean;
|
|
141
|
+
/** Optional pagination metadata */
|
|
142
|
+
pagination?: Record<string, unknown> | null;
|
|
143
|
+
/** Last selection state */
|
|
144
|
+
lastSelection?: unknown | null;
|
|
145
|
+
/** Prevent default styles from being applied in docx mode */
|
|
146
|
+
suppressDefaultDocxStyles?: boolean;
|
|
147
|
+
/** Provided JSON to override content with */
|
|
148
|
+
jsonOverride?: ProseMirrorJSON | null;
|
|
149
|
+
/** HTML content to initialize the editor with */
|
|
150
|
+
html?: string;
|
|
151
|
+
/** Markdown content to initialize the editor with */
|
|
152
|
+
markdown?: string;
|
|
153
|
+
/** Whether to enable debug mode */
|
|
154
|
+
isDebug?: boolean;
|
|
155
|
+
/** Docx xml updated by User */
|
|
156
|
+
customUpdatedFiles?: Record<string, string>;
|
|
157
|
+
/** Whether header/footer has changed */
|
|
158
|
+
isHeaderFooterChanged?: boolean;
|
|
159
|
+
/** Whether custom XML has changed */
|
|
160
|
+
isCustomXmlChanged?: boolean;
|
|
161
|
+
/** Focus target element */
|
|
162
|
+
focusTarget?: HTMLElement | null;
|
|
163
|
+
/** Parent editor (for header/footer editors) */
|
|
164
|
+
parentEditor?: Editor | null;
|
|
165
|
+
/** Collaborative document reference */
|
|
166
|
+
ydoc?: YDoc | null;
|
|
167
|
+
/** Y.js XML fragment for collaborative editing */
|
|
168
|
+
fragment?: YXmlFragment | null;
|
|
169
|
+
/** Collaboration provider */
|
|
170
|
+
collaborationProvider?: CollaborationProvider | null;
|
|
171
|
+
/** Whether the collaboration provider finished syncing */
|
|
172
|
+
collaborationIsReady?: boolean;
|
|
173
|
+
/** Whether comments should be loaded after collaboration replace */
|
|
174
|
+
shouldLoadComments?: boolean;
|
|
175
|
+
/** Whether the current file was replaced */
|
|
176
|
+
replacedFile?: boolean;
|
|
177
|
+
/** Called before editor creation */
|
|
178
|
+
onBeforeCreate?: (params: {
|
|
179
|
+
editor: Editor;
|
|
180
|
+
}) => void;
|
|
181
|
+
/** Called after editor creation */
|
|
182
|
+
onCreate?: (params: {
|
|
183
|
+
editor: Editor;
|
|
184
|
+
}) => void;
|
|
185
|
+
/** Called when editor content updates */
|
|
186
|
+
onUpdate?: (params: {
|
|
187
|
+
editor: Editor;
|
|
188
|
+
transaction: Transaction;
|
|
189
|
+
}) => void;
|
|
190
|
+
/** Called when selection updates */
|
|
191
|
+
onSelectionUpdate?: (params: {
|
|
192
|
+
editor: Editor;
|
|
193
|
+
}) => void;
|
|
194
|
+
/** Called when a transaction is processed */
|
|
195
|
+
onTransaction?: (params: {
|
|
196
|
+
editor: Editor;
|
|
197
|
+
transaction: Transaction;
|
|
198
|
+
}) => void;
|
|
199
|
+
/** Called when editor gets focus */
|
|
200
|
+
onFocus?: (params: {
|
|
201
|
+
editor: Editor;
|
|
202
|
+
event: FocusEvent;
|
|
203
|
+
}) => void;
|
|
204
|
+
/** Called when editor loses focus */
|
|
205
|
+
onBlur?: (params: {
|
|
206
|
+
editor: Editor;
|
|
207
|
+
event: FocusEvent;
|
|
208
|
+
}) => void;
|
|
209
|
+
/** Called when editor is destroyed */
|
|
210
|
+
onDestroy?: () => void;
|
|
211
|
+
/** Called when there's a content error */
|
|
212
|
+
onContentError?: (params: {
|
|
213
|
+
editor: Editor;
|
|
214
|
+
error: Error;
|
|
215
|
+
}) => void;
|
|
216
|
+
/** Called when tracked changes update */
|
|
217
|
+
onTrackedChangesUpdate?: (params: {
|
|
218
|
+
changes: unknown;
|
|
219
|
+
}) => void;
|
|
220
|
+
/** Called when comments update */
|
|
221
|
+
onCommentsUpdate?: (params: CommentsPayload) => void;
|
|
222
|
+
/** Called when comments are loaded */
|
|
223
|
+
onCommentsLoaded?: (params: {
|
|
224
|
+
editor: Editor;
|
|
225
|
+
replacedFile?: boolean;
|
|
226
|
+
comments: Comment[];
|
|
227
|
+
}) => void;
|
|
228
|
+
/** Called when a comment is clicked */
|
|
229
|
+
onCommentClicked?: (params: {
|
|
230
|
+
commentId: string;
|
|
231
|
+
event?: MouseEvent;
|
|
232
|
+
}) => void;
|
|
233
|
+
/** Called when comment locations update */
|
|
234
|
+
onCommentLocationsUpdate?: (params: CommentLocationsPayload) => void;
|
|
235
|
+
/** Called when document is locked */
|
|
236
|
+
onDocumentLocked?: (params: {
|
|
237
|
+
locked: boolean;
|
|
238
|
+
lockedBy?: string;
|
|
239
|
+
}) => void;
|
|
240
|
+
/** Called on first render */
|
|
241
|
+
onFirstRender?: () => void;
|
|
242
|
+
/** Called when collaboration is ready */
|
|
243
|
+
onCollaborationReady?: (params: {
|
|
244
|
+
editor: Editor;
|
|
245
|
+
ydoc: unknown;
|
|
246
|
+
}) => void;
|
|
247
|
+
/** Called when pagination updates */
|
|
248
|
+
onPaginationUpdate?: (params: PaginationPayload) => void;
|
|
249
|
+
/** Called when an exception occurs */
|
|
250
|
+
onException?: (params: {
|
|
251
|
+
error: Error;
|
|
252
|
+
editor: Editor;
|
|
253
|
+
}) => void;
|
|
254
|
+
/** Called when list definitions change */
|
|
255
|
+
onListDefinitionsChange?: (params: ListDefinitionsPayload) => void;
|
|
256
|
+
/** Called when all fonts used in the document are determined */
|
|
257
|
+
onFontsResolved?: ((payload: FontsResolvedPayload) => void) | null;
|
|
258
|
+
/** Handler for image uploads - async (file) => url */
|
|
259
|
+
handleImageUpload?: ((file: File) => Promise<string>) | null;
|
|
260
|
+
/** Telemetry configuration */
|
|
261
|
+
telemetry?: TelemetryData | null;
|
|
262
|
+
/** Host-provided permission hook */
|
|
263
|
+
permissionResolver?: ((params: PermissionParams) => boolean | undefined) | null;
|
|
264
|
+
}
|
|
265
|
+
//# sourceMappingURL=EditorConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorConfig.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/EditorConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAU,MAAM,mBAAmB,CAAC;AAE1E,OAAO,KAAK,EAAE,GAAG,IAAI,IAAI,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,KAAK,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,KAAK,EACV,oBAAoB,EACpB,OAAO,EACP,eAAe,EACf,uBAAuB,EACvB,iBAAiB,EACjB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IAEb,u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AAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAEjC,oCAAoC;IACpC,kBAAkB,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,GAAG,SAAS,CAAC,GAAG,IAAI,CAAC;CACjF"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { Transaction } from 'prosemirror-state';
|
|
2
|
+
import type { Editor } from '../Editor.js';
|
|
3
|
+
import type { DefaultEventMap } from '../EventEmitter.js';
|
|
4
|
+
/**
|
|
5
|
+
* Payload for fonts-resolved events
|
|
6
|
+
*/
|
|
7
|
+
export interface FontsResolvedPayload {
|
|
8
|
+
documentFonts: string[];
|
|
9
|
+
unsupportedFonts: string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Comment data structure
|
|
13
|
+
*/
|
|
14
|
+
export interface Comment {
|
|
15
|
+
id: string;
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Payload for comment-related events
|
|
20
|
+
*/
|
|
21
|
+
export interface CommentsPayload {
|
|
22
|
+
comments?: Comment[];
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Payload for comment locations/positions
|
|
27
|
+
*/
|
|
28
|
+
export interface CommentLocationsPayload {
|
|
29
|
+
locations: Array<{
|
|
30
|
+
commentId: string;
|
|
31
|
+
position: {
|
|
32
|
+
top: number;
|
|
33
|
+
left: number;
|
|
34
|
+
height: number;
|
|
35
|
+
width: number;
|
|
36
|
+
};
|
|
37
|
+
[key: string]: unknown;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Payload for pagination events
|
|
42
|
+
*/
|
|
43
|
+
export interface PaginationPayload {
|
|
44
|
+
pages?: number;
|
|
45
|
+
currentPage?: number;
|
|
46
|
+
[key: string]: unknown;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Payload for list definitions change
|
|
50
|
+
*/
|
|
51
|
+
export interface ListDefinitionsPayload {
|
|
52
|
+
change: unknown;
|
|
53
|
+
numbering?: unknown;
|
|
54
|
+
editor?: unknown;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Event map for the Editor class
|
|
58
|
+
*/
|
|
59
|
+
export interface EditorEventMap extends DefaultEventMap {
|
|
60
|
+
/** Called before editor creation */
|
|
61
|
+
beforeCreate: [{
|
|
62
|
+
editor: Editor;
|
|
63
|
+
}];
|
|
64
|
+
/** Called after editor creation */
|
|
65
|
+
create: [{
|
|
66
|
+
editor: Editor;
|
|
67
|
+
}];
|
|
68
|
+
/** Called when editor content updates */
|
|
69
|
+
update: [{
|
|
70
|
+
editor: Editor;
|
|
71
|
+
transaction: Transaction;
|
|
72
|
+
}];
|
|
73
|
+
/** Called when selection updates */
|
|
74
|
+
selectionUpdate: [{
|
|
75
|
+
editor: Editor;
|
|
76
|
+
transaction: Transaction;
|
|
77
|
+
}];
|
|
78
|
+
/** Called when a transaction is processed */
|
|
79
|
+
transaction: [{
|
|
80
|
+
editor: Editor;
|
|
81
|
+
transaction: Transaction;
|
|
82
|
+
duration?: number;
|
|
83
|
+
}];
|
|
84
|
+
/** Called when editor gets focus */
|
|
85
|
+
focus: [{
|
|
86
|
+
editor: Editor;
|
|
87
|
+
event: FocusEvent;
|
|
88
|
+
transaction: Transaction;
|
|
89
|
+
}];
|
|
90
|
+
/** Called when editor loses focus */
|
|
91
|
+
blur: [{
|
|
92
|
+
editor: Editor;
|
|
93
|
+
event: FocusEvent;
|
|
94
|
+
transaction: Transaction;
|
|
95
|
+
}];
|
|
96
|
+
/** Called when editor is destroyed */
|
|
97
|
+
destroy: [];
|
|
98
|
+
/** Called when there's a content error */
|
|
99
|
+
contentError: [{
|
|
100
|
+
editor: Editor;
|
|
101
|
+
error: Error;
|
|
102
|
+
}];
|
|
103
|
+
/** Called when tracked changes update */
|
|
104
|
+
trackedChangesUpdate: [{
|
|
105
|
+
changes: unknown;
|
|
106
|
+
}];
|
|
107
|
+
/** Called when comments update */
|
|
108
|
+
commentsUpdate: [CommentsPayload];
|
|
109
|
+
/** Called when comments are loaded */
|
|
110
|
+
commentsLoaded: [{
|
|
111
|
+
editor: Editor;
|
|
112
|
+
replacedFile?: boolean;
|
|
113
|
+
comments: Comment[];
|
|
114
|
+
}];
|
|
115
|
+
/** Called when a comment is clicked */
|
|
116
|
+
commentClick: [{
|
|
117
|
+
commentId: string;
|
|
118
|
+
event?: MouseEvent;
|
|
119
|
+
}];
|
|
120
|
+
/** Called when comment locations update */
|
|
121
|
+
'comment-positions': [CommentLocationsPayload];
|
|
122
|
+
/** Called when document is locked */
|
|
123
|
+
locked: [{
|
|
124
|
+
locked: boolean;
|
|
125
|
+
lockedBy?: string;
|
|
126
|
+
}];
|
|
127
|
+
/** Called when collaboration is ready */
|
|
128
|
+
collaborationReady: [{
|
|
129
|
+
editor: Editor;
|
|
130
|
+
ydoc: unknown;
|
|
131
|
+
}];
|
|
132
|
+
/** Called when pagination updates */
|
|
133
|
+
paginationUpdate: [PaginationPayload];
|
|
134
|
+
/** Called when an exception occurs */
|
|
135
|
+
exception: [{
|
|
136
|
+
error: Error;
|
|
137
|
+
editor: Editor;
|
|
138
|
+
}];
|
|
139
|
+
/** Called when list definitions change */
|
|
140
|
+
'list-definitions-change': [ListDefinitionsPayload];
|
|
141
|
+
/** Called when all fonts used in the document are determined */
|
|
142
|
+
'fonts-resolved': [FontsResolvedPayload];
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=EditorEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorEvents.d.ts","sourceRoot":"","sources":["../../../../../src/core/types/EditorEvents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,EAAE,eAAe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