@harbour-enterprises/superdoc 0.28.0-next.1 → 0.28.0-next.10
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-Jb55JUCS.cjs → PdfViewer-BnsPYL5w.cjs} +1 -1
- package/dist/chunks/{PdfViewer-9z5hlRyt.es.js → PdfViewer-DBL2mtV7.es.js} +1 -1
- package/dist/chunks/{index-DqP-8_tO.es.js → index-B5RApJzM.es.js} +2 -2
- package/dist/chunks/{index-D0UvyM8m.cjs → index-Bn2uXv1T.cjs} +2 -2
- package/dist/chunks/{super-editor.es-BBJIKdhr.es.js → super-editor.es-BZcjzGbD.es.js} +25770 -7923
- package/dist/chunks/{super-editor.es-Ca5D3ZTW.cjs → super-editor.es-C2gjIEyc.cjs} +25680 -7833
- package/dist/core/types/index.d.ts +7 -6
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/images/altText_add.svg +3 -0
- package/dist/images/altText_disclaimer.svg +3 -0
- package/dist/images/altText_done.svg +3 -0
- package/dist/images/altText_spinner.svg +30 -0
- package/dist/images/altText_warning.svg +3 -0
- package/dist/images/annotation-check.svg +11 -0
- package/dist/images/annotation-comment.svg +16 -0
- package/dist/images/annotation-help.svg +26 -0
- package/dist/images/annotation-insert.svg +10 -0
- package/dist/images/annotation-key.svg +11 -0
- package/dist/images/annotation-newparagraph.svg +11 -0
- package/dist/images/annotation-noicon.svg +7 -0
- package/dist/images/annotation-note.svg +42 -0
- package/dist/images/annotation-paperclip.svg +6 -0
- package/dist/images/annotation-paragraph.svg +16 -0
- package/dist/images/annotation-pushpin.svg +7 -0
- package/dist/images/cursor-editorFreeHighlight.svg +6 -0
- package/dist/images/cursor-editorFreeText.svg +3 -0
- package/dist/images/cursor-editorInk.svg +4 -0
- package/dist/images/cursor-editorTextHighlight.svg +8 -0
- package/dist/images/editor-toolbar-delete.svg +5 -0
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/messageBar_closingButton.svg +3 -0
- package/dist/images/messageBar_warning.svg +3 -0
- package/dist/images/toolbarButton-editorHighlight.svg +6 -0
- package/dist/images/toolbarButton-menuArrow.svg +3 -0
- package/dist/stores/comments-store.d.ts +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-AR-76siZ.js → converter-DJPby8Vf.js} +1347 -1259
- package/dist/super-editor/chunks/{docx-zipper-DVb-VGgt.js → docx-zipper-BES4h7U3.js} +1 -1
- package/dist/super-editor/chunks/{editor-mK_uimq6.js → editor-DS_Pp30R.js} +21568 -3813
- package/dist/super-editor/chunks/{toolbar-ByoNwr7x.js → toolbar-BrhEM0st.js} +2 -2
- package/dist/super-editor/converter.es.js +2 -2
- 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/Editor.d.ts +7 -1
- package/dist/super-editor/super-editor/src/core/commands/decreaseListIndent.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/commands/increaseListIndent.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/commands/list-helpers/list-indent-helpers.d.ts +3 -0
- package/dist/super-editor/super-editor/src/core/super-converter/exporter.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/translate-structured-content.d.ts +2 -2
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/t-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/node-translator/node-translator.d.ts +2 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content-block.d.ts +8 -6
- package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content.d.ts +8 -1
- package/dist/super-editor/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentBlockTags.d.ts +11 -4
- package/dist/super-editor/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentInlineTags.d.ts +11 -4
- package/dist/super-editor/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentTablesById.d.ts +8 -4
- package/dist/super-editor/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentTags.d.ts +11 -4
- package/dist/super-editor/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentTagsById.d.ts +12 -5
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts +7 -6
- package/dist/super-editor/super-editor.es.js +31 -31
- 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 +26292 -8445
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
|
-
import { p as process$1 } from "./converter-
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
2
|
+
import { p as process$1 } from "./converter-DJPby8Vf.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-DS_Pp30R.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E } from "./chunks/editor-
|
|
2
|
-
import "./chunks/converter-
|
|
3
|
-
import "./chunks/docx-zipper-
|
|
1
|
+
import { E } from "./chunks/editor-DS_Pp30R.js";
|
|
2
|
+
import "./chunks/converter-DJPby8Vf.js";
|
|
3
|
+
import "./chunks/docx-zipper-BES4h7U3.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -328,8 +328,9 @@ export class Editor extends EventEmitter {
|
|
|
328
328
|
/**
|
|
329
329
|
* Set the document mode
|
|
330
330
|
* @param {string} documentMode - The document mode ('editing', 'viewing', 'suggesting')
|
|
331
|
+
* @param {string} caller - Calling context
|
|
331
332
|
*/
|
|
332
|
-
setDocumentMode(documentMode: string): void;
|
|
333
|
+
setDocumentMode(documentMode: string, caller: string): void;
|
|
333
334
|
/**
|
|
334
335
|
* Export the yjs binary from the current state.
|
|
335
336
|
* @returns {Promise<Uint8Array>} The exported yjs binary
|
|
@@ -478,6 +479,11 @@ export class Editor extends EventEmitter {
|
|
|
478
479
|
getHTML({ unflattenLists }?: {
|
|
479
480
|
unflattenLists?: boolean;
|
|
480
481
|
}): string;
|
|
482
|
+
/**
|
|
483
|
+
* Get the editor content as Markdown
|
|
484
|
+
* @returns {string} Editor content as Markdown
|
|
485
|
+
*/
|
|
486
|
+
getMarkdown(): string;
|
|
481
487
|
/**
|
|
482
488
|
* Get the document version from the converter
|
|
483
489
|
* @returns {string|null} The SuperDoc version stored in the document
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function decreaseListIndent(): Function;
|
|
1
|
+
export function decreaseListIndent(_targetPositions?: any[]): Function;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert SDT child elements into Word run elements.
|
|
3
|
+
* @param {Array<Object>|Object} elements
|
|
4
|
+
* @returns {Array<Object>}
|
|
5
|
+
*/
|
|
6
|
+
export function convertSdtContentToRuns(elements: Array<any> | any): Array<any>;
|
|
1
7
|
/**
|
|
2
8
|
* @typedef {Object} ExportParams
|
|
3
9
|
* @property {Object} node JSON node to translate (from PM schema)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @param {Object} params - The parameters for translation.
|
|
3
|
-
* @returns {Object} The XML representation.
|
|
3
|
+
* @returns {Object|Array|Object[]} The XML representation.
|
|
4
4
|
*/
|
|
5
|
-
export function translateStructuredContent(params: any): any;
|
|
5
|
+
export function translateStructuredContent(params: any): any | any[] | any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./t-translator.js";
|
package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/t-translator.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @type {import('@translator').NodeTranslatorConfig} */
|
|
2
|
+
export const config: import("@translator").NodeTranslatorConfig;
|
|
3
|
+
/**
|
|
4
|
+
* The NodeTranslator instance for the <w:t> element.
|
|
5
|
+
* @type {import('@translator').NodeTranslator}
|
|
6
|
+
*/
|
|
7
|
+
export const translator: import("@translator").NodeTranslator;
|
|
@@ -23,7 +23,7 @@ export const TranslatorTypes: Readonly<{
|
|
|
23
23
|
/** @typedef {import('../../v2/types').SuperDocNode} SCEncoderResult */
|
|
24
24
|
/**
|
|
25
25
|
* @typedef {Object} SCDecoderConfig
|
|
26
|
-
* @property {{ attrs?: any, marks?: any[], type: string, content?: any[] }} node
|
|
26
|
+
* @property {{ attrs?: any, marks?: any[], type: string, content?: any[], text?: string }} node
|
|
27
27
|
* @property {any[]} [children]
|
|
28
28
|
* @property {any[]} [relationships]
|
|
29
29
|
* @property {import('../../../../../../superdoc/src/components/CommentsLayer/types').Comment[]} [comments]
|
|
@@ -161,6 +161,7 @@ export type SCDecoderConfig = {
|
|
|
161
161
|
marks?: any[];
|
|
162
162
|
type: string;
|
|
163
163
|
content?: any[];
|
|
164
|
+
text?: string;
|
|
164
165
|
};
|
|
165
166
|
children?: any[];
|
|
166
167
|
relationships?: any[];
|
|
@@ -11,12 +11,14 @@ export const structuredContentInnerClass: "sd-structured-content-block__content"
|
|
|
11
11
|
* Attributes for structured content block nodes
|
|
12
12
|
* @typedef {Object} StructuredContentBlockAttributes
|
|
13
13
|
* @category Attributes
|
|
14
|
-
* @property {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* @
|
|
18
|
-
* @
|
|
19
|
-
*
|
|
14
|
+
* @property {string} [id] Unique identifier for the structured content block
|
|
15
|
+
* @property {string} [tag] Content control tag (e.g., 'block_table_sdt')
|
|
16
|
+
* @property {string} [alias] Display name for the block (falls back to 'Structured content' when omitted)
|
|
17
|
+
* @property {Object} [sdtPr] @internal Internal structured document tag properties
|
|
18
|
+
* @example
|
|
19
|
+
* // Get attributes from a structured content block
|
|
20
|
+
* const attrs = editor.getAttributes('structuredContentBlock')
|
|
21
|
+
* console.log(attrs.id, attrs.alias)
|
|
20
22
|
*/
|
|
21
23
|
export const StructuredContentBlock: Node;
|
|
22
24
|
/**
|
package/dist/super-editor/super-editor/src/extensions/structured-content/structured-content.d.ts
CHANGED
|
@@ -11,7 +11,14 @@ export const structuredContentInnerClass: "sd-structured-content__content";
|
|
|
11
11
|
* Attributes for structured content nodes
|
|
12
12
|
* @typedef {Object} StructuredContentAttributes
|
|
13
13
|
* @category Attributes
|
|
14
|
-
* @property {
|
|
14
|
+
* @property {string} [id] Unique identifier for the structured content field
|
|
15
|
+
* @property {string} [tag] Content control tag (e.g., 'inline_text_sdt')
|
|
16
|
+
* @property {string} [alias] Display name for the field (falls back to 'Structured content' when omitted)
|
|
17
|
+
* @property {Object} [sdtPr] @internal Internal structured document tag properties
|
|
18
|
+
* @example
|
|
19
|
+
* // Get attributes from a structured content field
|
|
20
|
+
* const attrs = editor.getAttributes('structuredContent')
|
|
21
|
+
* console.log(attrs.id, attrs.alias)
|
|
15
22
|
*/
|
|
16
23
|
/**
|
|
17
24
|
* @module StructuredContent
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
4
|
-
* @
|
|
2
|
+
* Get all block-level structured content tags in the document
|
|
3
|
+
* @category Helper
|
|
4
|
+
* @param {import('prosemirror-state').EditorState} state Editor state
|
|
5
|
+
* @returns {Array<{ node: import('prosemirror-model').Node, pos: number }>} All structured content block nodes
|
|
6
|
+
* @example
|
|
7
|
+
* const blocks = editor.helpers.getStructuredContentBlockTags(editor.state)
|
|
8
|
+
* console.log(`Found ${blocks.length} structured content blocks`)
|
|
5
9
|
*/
|
|
6
|
-
export function getStructuredContentBlockTags(state: import("prosemirror-state").EditorState):
|
|
10
|
+
export function getStructuredContentBlockTags(state: import("prosemirror-state").EditorState): Array<{
|
|
11
|
+
node: import("prosemirror-model").Node;
|
|
12
|
+
pos: number;
|
|
13
|
+
}>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
4
|
-
* @
|
|
2
|
+
* Get all inline structured content tags in the document
|
|
3
|
+
* @category Helper
|
|
4
|
+
* @param {import('prosemirror-state').EditorState} state Editor state
|
|
5
|
+
* @returns {Array<{ node: import('prosemirror-model').Node, pos: number }>} All inline structured content nodes
|
|
6
|
+
* @example
|
|
7
|
+
* const inlines = editor.helpers.getStructuredContentInlineTags(editor.state)
|
|
8
|
+
* console.log(`Found ${inlines.length} inline fields`)
|
|
5
9
|
*/
|
|
6
|
-
export function getStructuredContentInlineTags(state: import("prosemirror-state").EditorState):
|
|
10
|
+
export function getStructuredContentInlineTags(state: import("prosemirror-state").EditorState): Array<{
|
|
11
|
+
node: import("prosemirror-model").Node;
|
|
12
|
+
pos: number;
|
|
13
|
+
}>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Find all tables inside a structured content block
|
|
3
|
-
* @
|
|
4
|
-
* @param {
|
|
5
|
-
* @
|
|
2
|
+
* Find all tables inside a structured content block by ID
|
|
3
|
+
* @category Helper
|
|
4
|
+
* @param {string} id Structured content block ID
|
|
5
|
+
* @param {import('prosemirror-state').EditorState} state Editor state
|
|
6
|
+
* @returns {Array<{ node: import('prosemirror-model').Node, pos: number }>} Tables with absolute positions
|
|
7
|
+
* @example
|
|
8
|
+
* const tables = editor.helpers.getStructuredContentTablesById('block-123', editor.state)
|
|
9
|
+
* console.log(`Block contains ${tables.length} table(s)`)
|
|
6
10
|
*/
|
|
7
11
|
export function getStructuredContentTablesById(id: string, state: import("prosemirror-state").EditorState): Array<{
|
|
8
12
|
node: import("prosemirror-model").Node;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
4
|
-
* @
|
|
2
|
+
* Get all structured content tags (inline and block) in the document
|
|
3
|
+
* @category Helper
|
|
4
|
+
* @param {import('prosemirror-state').EditorState} state Editor state
|
|
5
|
+
* @returns {Array<{ node: import('prosemirror-model').Node, pos: number }>} All structured content nodes with positions
|
|
6
|
+
* @example
|
|
7
|
+
* const allTags = editor.helpers.getStructuredContentTags(editor.state)
|
|
8
|
+
* console.log(`Found ${allTags.length} structured content elements`)
|
|
5
9
|
*/
|
|
6
|
-
export function getStructuredContentTags(state: import("prosemirror-state").EditorState):
|
|
10
|
+
export function getStructuredContentTags(state: import("prosemirror-state").EditorState): Array<{
|
|
11
|
+
node: import("prosemirror-model").Node;
|
|
12
|
+
pos: number;
|
|
13
|
+
}>;
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @
|
|
4
|
-
* @param {
|
|
5
|
-
* @
|
|
2
|
+
* Get structured content tag(s) by ID
|
|
3
|
+
* @category Helper
|
|
4
|
+
* @param {string | string[]} idOrIds Single ID or array of IDs to find
|
|
5
|
+
* @param {import('prosemirror-state').EditorState} state Editor state
|
|
6
|
+
* @returns {Array<{ node: import('prosemirror-model').Node, pos: number }>} Matching structured content nodes
|
|
7
|
+
* @example
|
|
8
|
+
* const field = editor.helpers.getStructuredContentTagsById('field-123', editor.state)
|
|
9
|
+
* if (field.length) console.log('Found field:', field[0].node.attrs)
|
|
6
10
|
*/
|
|
7
|
-
export function getStructuredContentTagsById(idOrIds: string | string[], state: import("prosemirror-state").EditorState):
|
|
11
|
+
export function getStructuredContentTagsById(idOrIds: string | string[], state: import("prosemirror-state").EditorState): Array<{
|
|
12
|
+
node: import("prosemirror-model").Node;
|
|
13
|
+
pos: number;
|
|
14
|
+
}>;
|
|
@@ -23,10 +23,10 @@ export function isTrackedChangeActionAllowed({ editor, action, trackedChanges }:
|
|
|
23
23
|
get users(): Array<User>;
|
|
24
24
|
chain(): any;
|
|
25
25
|
can(): any;
|
|
26
|
-
setDocumentMode(documentMode: string): void;
|
|
26
|
+
setDocumentMode(documentMode: string, caller: string): void;
|
|
27
27
|
generateCollaborationUpdate(): Promise<Uint8Array>;
|
|
28
28
|
initializeCollaborationData(): void;
|
|
29
|
-
replaceContent(
|
|
29
|
+
replaceContent(content2: any): void;
|
|
30
30
|
setOptions(options?: EditorOptions): void;
|
|
31
31
|
options: any;
|
|
32
32
|
setEditable(editable?: boolean, emitUpdate?: boolean): void;
|
|
@@ -34,9 +34,9 @@ export function isTrackedChangeActionAllowed({ editor, action, trackedChanges }:
|
|
|
34
34
|
unregisterPlugin(nameOrPluginKey: string | any): void;
|
|
35
35
|
createNodeViews(): void;
|
|
36
36
|
getMaxContentSize(): any;
|
|
37
|
-
updateEditorStyles(
|
|
38
|
-
initDefaultStyles(
|
|
39
|
-
initMobileStyles(
|
|
37
|
+
updateEditorStyles(element2: any, proseMirror: any, hasPaginationEnabled?: boolean): void;
|
|
38
|
+
initDefaultStyles(element2?: HTMLElement, isPaginationEnabled?: boolean): void;
|
|
39
|
+
initMobileStyles(element2: any): void;
|
|
40
40
|
getDocumentIdentifier(): Promise<string>;
|
|
41
41
|
getDocumentGuid(): string | null;
|
|
42
42
|
isDocumentModified(): boolean;
|
|
@@ -58,6 +58,7 @@ export function isTrackedChangeActionAllowed({ editor, action, trackedChanges }:
|
|
|
58
58
|
getHTML({ unflattenLists }?: {
|
|
59
59
|
unflattenLists?: boolean;
|
|
60
60
|
}): string;
|
|
61
|
+
getMarkdown(): string;
|
|
61
62
|
getDocumentVersion(): string | null;
|
|
62
63
|
createChildEditor(options: EditorOptions): {
|
|
63
64
|
new (options: EditorOptions): /*elided*/ any;
|
|
@@ -87,7 +88,7 @@ export function isTrackedChangeActionAllowed({ editor, action, trackedChanges }:
|
|
|
87
88
|
getInternalXmlFile(name: string, type?: string): any | string;
|
|
88
89
|
updateInternalXmlFile(name: string, updatedContent: string): void;
|
|
89
90
|
getNodesOfType(type: string): any[];
|
|
90
|
-
replaceNodeWithHTML(targetNode: any,
|
|
91
|
+
replaceNodeWithHTML(targetNode: any, html2: any): void;
|
|
91
92
|
prepareForAnnotations(annotationValues?: FieldValue[]): void;
|
|
92
93
|
migrateParagraphFields(annotationValues?: FieldValue[]): Promise<FieldValue[]>;
|
|
93
94
|
annotate(annotationValues?: FieldValue[], hiddenIds?: string[], removeEmptyFields?: boolean): void;
|
|
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
|
|
|
9
9
|
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
10
10
|
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
11
11
|
var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn;
|
|
12
|
-
import {
|
|
13
|
-
import { c1,
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as
|
|
15
|
-
import {
|
|
12
|
+
import { K as getDefaultExportFromCjs, W as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, aE as getActiveFormatting, aw as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-DJPby8Vf.js";
|
|
13
|
+
import { c1, a6, i, a3 } from "./chunks/converter-DJPby8Vf.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as collectTargetListItemPositions, d as getFileOpener, e as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, f as uploadAndInsertImage, h as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, j as undoDepth, k as redoDepth, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, m as getStarterExtensions, P as Placeholder, n as getRichTextExtensions, D as DecorationSet, o as Decoration, M as Mark, p as Extension, A as Attribute, N as Node } from "./chunks/editor-DS_Pp30R.js";
|
|
15
|
+
import { v, C, w, T, q, x, t } from "./chunks/editor-DS_Pp30R.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-BrhEM0st.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-BES4h7U3.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
|
@@ -80,7 +80,7 @@ function requireEventemitter3() {
|
|
|
80
80
|
if (listeners.fn) return 1;
|
|
81
81
|
return listeners.length;
|
|
82
82
|
};
|
|
83
|
-
EventEmitter2.prototype.emit = function emit(event, a1,
|
|
83
|
+
EventEmitter2.prototype.emit = function emit(event, a1, a2, a32, a4, a5) {
|
|
84
84
|
var evt = prefix ? prefix + event : event;
|
|
85
85
|
if (!this._events[evt]) return false;
|
|
86
86
|
var listeners = this._events[evt], len = arguments.length, args, i2;
|
|
@@ -92,13 +92,13 @@ function requireEventemitter3() {
|
|
|
92
92
|
case 2:
|
|
93
93
|
return listeners.fn.call(listeners.context, a1), true;
|
|
94
94
|
case 3:
|
|
95
|
-
return listeners.fn.call(listeners.context, a1,
|
|
95
|
+
return listeners.fn.call(listeners.context, a1, a2), true;
|
|
96
96
|
case 4:
|
|
97
|
-
return listeners.fn.call(listeners.context, a1,
|
|
97
|
+
return listeners.fn.call(listeners.context, a1, a2, a32), true;
|
|
98
98
|
case 5:
|
|
99
|
-
return listeners.fn.call(listeners.context, a1,
|
|
99
|
+
return listeners.fn.call(listeners.context, a1, a2, a32, a4), true;
|
|
100
100
|
case 6:
|
|
101
|
-
return listeners.fn.call(listeners.context, a1,
|
|
101
|
+
return listeners.fn.call(listeners.context, a1, a2, a32, a4, a5), true;
|
|
102
102
|
}
|
|
103
103
|
for (i2 = 1, args = new Array(len - 1); i2 < len; i2++) {
|
|
104
104
|
args[i2 - 1] = arguments[i2];
|
|
@@ -116,10 +116,10 @@ function requireEventemitter3() {
|
|
|
116
116
|
listeners[i2].fn.call(listeners[i2].context, a1);
|
|
117
117
|
break;
|
|
118
118
|
case 3:
|
|
119
|
-
listeners[i2].fn.call(listeners[i2].context, a1,
|
|
119
|
+
listeners[i2].fn.call(listeners[i2].context, a1, a2);
|
|
120
120
|
break;
|
|
121
121
|
case 4:
|
|
122
|
-
listeners[i2].fn.call(listeners[i2].context, a1,
|
|
122
|
+
listeners[i2].fn.call(listeners[i2].context, a1, a2, a32);
|
|
123
123
|
break;
|
|
124
124
|
default:
|
|
125
125
|
if (!args) for (j = 1, args = new Array(len - 1); j < len; j++) {
|
|
@@ -2726,11 +2726,11 @@ class SuperToolbar extends EventEmitter {
|
|
|
2726
2726
|
* @returns {void}
|
|
2727
2727
|
*/
|
|
2728
2728
|
increaseTextIndent: ({ item, argument }) => {
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
if (
|
|
2733
|
-
return this.activeEditor.commands.increaseListIndent();
|
|
2729
|
+
const command = item.command;
|
|
2730
|
+
const { state } = this.activeEditor;
|
|
2731
|
+
const listItemsInSelection = collectTargetListItemPositions(state);
|
|
2732
|
+
if (listItemsInSelection.length) {
|
|
2733
|
+
return this.activeEditor.commands.increaseListIndent(listItemsInSelection);
|
|
2734
2734
|
}
|
|
2735
2735
|
if (command in this.activeEditor.commands) {
|
|
2736
2736
|
this.activeEditor.commands[command](argument);
|
|
@@ -2746,9 +2746,9 @@ class SuperToolbar extends EventEmitter {
|
|
|
2746
2746
|
decreaseTextIndent: ({ item, argument }) => {
|
|
2747
2747
|
let command = item.command;
|
|
2748
2748
|
let { state } = this.activeEditor;
|
|
2749
|
-
|
|
2750
|
-
if (
|
|
2751
|
-
return this.activeEditor.commands.decreaseListIndent();
|
|
2749
|
+
const listItemsInSelection = collectTargetListItemPositions(state);
|
|
2750
|
+
if (listItemsInSelection.length) {
|
|
2751
|
+
return this.activeEditor.commands.decreaseListIndent(listItemsInSelection);
|
|
2752
2752
|
}
|
|
2753
2753
|
if (command in this.activeEditor.commands) {
|
|
2754
2754
|
this.activeEditor.commands[command](argument);
|
|
@@ -3266,7 +3266,7 @@ runCommandWithArgumentOnly_fn = function({ item, argument, noArgumentCallback =
|
|
|
3266
3266
|
};
|
|
3267
3267
|
const onMarginClickCursorChange = (event, editor) => {
|
|
3268
3268
|
const y = event.clientY;
|
|
3269
|
-
const
|
|
3269
|
+
const x2 = event.clientX;
|
|
3270
3270
|
const { view } = editor;
|
|
3271
3271
|
const editorRect = view.dom.getBoundingClientRect();
|
|
3272
3272
|
let coords = {
|
|
@@ -3274,10 +3274,10 @@ const onMarginClickCursorChange = (event, editor) => {
|
|
|
3274
3274
|
top: y
|
|
3275
3275
|
};
|
|
3276
3276
|
let isRightMargin = false;
|
|
3277
|
-
if (
|
|
3277
|
+
if (x2 > editorRect.right) {
|
|
3278
3278
|
coords.left = editorRect.left + editorRect.width - 1;
|
|
3279
3279
|
isRightMargin = true;
|
|
3280
|
-
} else if (
|
|
3280
|
+
} else if (x2 < editorRect.left) {
|
|
3281
3281
|
coords.left = editorRect.left;
|
|
3282
3282
|
}
|
|
3283
3283
|
const pos = view.posAtCoords(coords)?.pos;
|
|
@@ -5188,28 +5188,28 @@ const Extensions = {
|
|
|
5188
5188
|
};
|
|
5189
5189
|
export {
|
|
5190
5190
|
AIWriter,
|
|
5191
|
-
|
|
5191
|
+
v as AnnotatorHelpers,
|
|
5192
5192
|
c1 as BasicUpload,
|
|
5193
5193
|
C as CommentsPluginKey,
|
|
5194
5194
|
D as DocxZipper,
|
|
5195
5195
|
Editor,
|
|
5196
5196
|
Extensions,
|
|
5197
|
-
|
|
5197
|
+
w as SectionHelpers,
|
|
5198
5198
|
_sfc_main$4 as SlashMenu,
|
|
5199
|
-
|
|
5199
|
+
a6 as SuperConverter,
|
|
5200
5200
|
SuperEditor,
|
|
5201
5201
|
SuperInput,
|
|
5202
5202
|
SuperToolbar,
|
|
5203
5203
|
Toolbar,
|
|
5204
5204
|
T as TrackChangesBasePluginKey,
|
|
5205
5205
|
createZip,
|
|
5206
|
-
|
|
5206
|
+
q as fieldAnnotationHelpers,
|
|
5207
5207
|
getActiveFormatting,
|
|
5208
|
-
|
|
5208
|
+
x as getAllowedImageDimensions,
|
|
5209
5209
|
i as getMarksFromSelection,
|
|
5210
5210
|
getRichTextExtensions,
|
|
5211
5211
|
getStarterExtensions,
|
|
5212
|
-
|
|
5212
|
+
a3 as helpers,
|
|
5213
5213
|
registeredHandlers,
|
|
5214
|
-
|
|
5214
|
+
t as trackChangesHelpers
|
|
5215
5215
|
};
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-C2gjIEyc.cjs");
|
|
4
4
|
require("./chunks/vue-DKMj1I9B.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-BZcjzGbD.es.js";
|
|
2
2
|
import "./chunks/vue-ZWZLQtoU.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-C2gjIEyc.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-Bn2uXv1T.cjs");
|
|
5
5
|
require("./chunks/vue-DKMj1I9B.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
7
7
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-BZcjzGbD.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-B5RApJzM.es.js";
|
|
3
3
|
import "./chunks/vue-ZWZLQtoU.es.js";
|
|
4
4
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
5
5
|
export {
|