@harbour-enterprises/superdoc 0.22.0-next.9 → 0.23.0-next.1
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-DyWe33pN.cjs → PdfViewer-C9SGNZr6.cjs} +1 -1
- package/dist/chunks/{PdfViewer-HN-tp5RN.es.js → PdfViewer-D9atA783.es.js} +1 -1
- package/dist/chunks/{index-ir6efMuz.es.js → index-C8q6lenv.es.js} +3 -3
- package/dist/chunks/{index-BeVpZc19.cjs → index-CIbe1VMu.cjs} +3 -3
- package/dist/chunks/{super-editor.es-BwqYS285.es.js → super-editor.es-Dj6Sxtr7.es.js} +2891 -2008
- package/dist/chunks/{super-editor.es-CKfdmK-8.cjs → super-editor.es-DxScE0ep.cjs} +2891 -2008
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/style.css +4 -0
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-BgedUNCW.js → converter-C08GQjNi.js} +1536 -1056
- package/dist/super-editor/chunks/{docx-zipper-ByLK3trM.js → docx-zipper-C3-uf2tI.js} +1 -1
- package/dist/super-editor/chunks/{editor-CFqh_xBx.js → editor-C2IwVkIp.js} +1251 -846
- package/dist/super-editor/chunks/{toolbar-DdfyWgZF.js → toolbar-De8G_9NV.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/src/core/helpers/generateDocxRandomId.d.ts +5 -0
- package/dist/super-editor/src/core/super-converter/exporter.d.ts +4 -4
- package/dist/super-editor/src/core/super-converter/field-references/fld-preprocessors/hyperlink-preprocessor.d.ts +9 -0
- package/dist/super-editor/src/core/super-converter/field-references/fld-preprocessors/index.d.ts +2 -0
- package/dist/super-editor/src/core/super-converter/field-references/fld-preprocessors/num-pages-preprocessor.d.ts +9 -0
- package/dist/super-editor/src/core/super-converter/field-references/fld-preprocessors/page-preprocessor.d.ts +9 -0
- package/dist/super-editor/src/core/super-converter/field-references/fld-preprocessors/page-ref-preprocessor.d.ts +9 -0
- package/dist/super-editor/src/core/super-converter/field-references/fld-preprocessors/toc-preprocessor.d.ts +8 -0
- package/dist/super-editor/src/core/super-converter/field-references/index.d.ts +1 -0
- package/dist/super-editor/src/core/super-converter/field-references/preProcessNodesForFldChar.d.ts +21 -0
- package/dist/super-editor/src/core/super-converter/v2/exporter/helpers/translateChildNodes.d.ts +3 -3
- package/dist/super-editor/src/core/super-converter/v2/importer/pageReferenceImporter.d.ts +4 -0
- package/dist/super-editor/src/core/super-converter/v2/importer/tableOfContentsImporter.d.ts +4 -0
- package/dist/super-editor/src/core/super-converter/v2/types/index.d.ts +7 -1
- package/dist/super-editor/src/core/super-converter/v3/handlers/sd/pageReference/index.d.ts +1 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/sd/pageReference/pageReference-translator.d.ts +7 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/sd/tableOfContents/index.d.ts +1 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/sd/tableOfContents/tableOfContents-translator.d.ts +10 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/caps/caps-translator.d.ts +7 -0
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/w-p-helpers.d.ts +0 -2
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/handle-doc-part-obj.d.ts +9 -1
- package/dist/super-editor/src/core/super-converter/v3/handlers/w/sdt/helpers/translate-document-part-obj.d.ts +6 -0
- package/dist/super-editor/src/core/super-converter/v3/node-translator/node-translator.d.ts +2 -2
- package/dist/super-editor/src/extensions/index.d.ts +2 -1
- package/dist/super-editor/src/extensions/page-reference/index.d.ts +1 -0
- package/dist/super-editor/src/extensions/page-reference/page-reference.d.ts +2 -0
- package/dist/super-editor/src/extensions/structured-content/document-part-object.d.ts +2 -0
- package/dist/super-editor/src/extensions/structured-content/index.d.ts +2 -0
- package/dist/super-editor/src/extensions/structured-content/structured-content-commands.d.ts +67 -0
- package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentBlockTags.d.ts +6 -0
- package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentInlineTags.d.ts +6 -0
- package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentTags.d.ts +6 -0
- package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/getStructuredContentTagsById.d.ts +7 -0
- package/dist/super-editor/src/extensions/structured-content/structuredContentHelpers/index.d.ts +4 -0
- package/dist/super-editor/src/extensions/tab/helpers/tabDecorations.d.ts +2 -2
- package/dist/super-editor/src/extensions/table-of-contents/index.d.ts +1 -0
- package/dist/super-editor/src/extensions/table-of-contents/table-of-contents.d.ts +2 -0
- package/dist/super-editor/style.css +4 -0
- package/dist/super-editor/super-editor.es.js +10 -8
- 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 +2892 -2009
- 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-C08GQjNi.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-C2IwVkIp.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-C2IwVkIp.js";
|
|
2
|
+
import "./chunks/converter-C08GQjNi.js";
|
|
3
|
+
import "./chunks/docx-zipper-C3-uf2tI.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -3,4 +3,9 @@
|
|
|
3
3
|
* @returns {string} - 8 character random string
|
|
4
4
|
*/
|
|
5
5
|
export function generateDocxRandomId(length?: number): string;
|
|
6
|
+
/**
|
|
7
|
+
* Generate a random signed 32-bit integer as a string.
|
|
8
|
+
* @returns {string} A random signed 32-bit integer as a string
|
|
9
|
+
*/
|
|
10
|
+
export function generateRandomSigned32BitIntStrId(): string;
|
|
6
11
|
export function generateRandom32BitHex(): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @typedef {Object} ExportParams
|
|
3
3
|
* @property {Object} node JSON node to translate (from PM schema)
|
|
4
|
-
* @property {Object} bodyNode The stored body node to restore, if available
|
|
5
|
-
* @property {Object[]} relationships The relationships to add to the document
|
|
4
|
+
* @property {Object} [bodyNode] The stored body node to restore, if available
|
|
5
|
+
* @property {Object[]} [relationships] The relationships to add to the document
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* @typedef {Object} SchemaNode
|
|
@@ -119,11 +119,11 @@ export type ExportParams = {
|
|
|
119
119
|
/**
|
|
120
120
|
* The stored body node to restore, if available
|
|
121
121
|
*/
|
|
122
|
-
bodyNode
|
|
122
|
+
bodyNode?: any;
|
|
123
123
|
/**
|
|
124
124
|
* The relationships to add to the document
|
|
125
125
|
*/
|
|
126
|
-
relationships
|
|
126
|
+
relationships?: any[];
|
|
127
127
|
};
|
|
128
128
|
export type SchemaNode = {
|
|
129
129
|
/**
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Processes a HYPERLINK instruction and creates a `w:hyperlink` node.
|
|
3
|
+
* @param {import('../../v2/types/index.js').OpenXmlNode[]} nodesToCombine The nodes to combine.
|
|
4
|
+
* @param {string} instruction The instruction text.
|
|
5
|
+
* @param {import('../../v2/docxHelper').ParsedDocx} [docx] - The docx object.
|
|
6
|
+
* @returns {import('../../v2/types/index.js').OpenXmlNode[]}
|
|
7
|
+
* @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 1216
|
|
8
|
+
*/
|
|
9
|
+
export function preProcessHyperlinkInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[], instruction: string, docx?: import("../../v2/docxHelper").ParsedDocx): import("../../v2/types/index.js").OpenXmlNode[];
|
package/dist/super-editor/src/core/super-converter/field-references/fld-preprocessors/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export function getInstructionPreProcessor(instruction: string): InstructionPreProcessor | null;
|
|
2
|
+
export type InstructionPreProcessor = (nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[], instruction: string, docx?: import("../../v2/docxHelper").ParsedDocx) => import("../../v2/types/index.js").OpenXmlNode[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Processes a NUMPAGES instruction and creates a `sd:totalPageNumber` node.
|
|
3
|
+
* @param {import('../../v2/types/index.js').OpenXmlNode[]} nodesToCombine The nodes to combine.
|
|
4
|
+
* @param {string} _ The instruction text (unused).
|
|
5
|
+
* @param {import('../v2/docxHelper').ParsedDocx} [__] - The docx object.
|
|
6
|
+
* @returns {import('../../v2/types/index.js').OpenXmlNode[]}
|
|
7
|
+
* @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 1233
|
|
8
|
+
*/
|
|
9
|
+
export function preProcessNumPagesInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[], _: string, __?: any): import("../../v2/types/index.js").OpenXmlNode[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Processes a PAGE instruction and creates a `sd:autoPageNumber` node.
|
|
3
|
+
* @param {import('../../v2/types/index.js').OpenXmlNode[]} nodesToCombine The nodes to combine.
|
|
4
|
+
* @param {string} _ The instruction text (unused).
|
|
5
|
+
* @param {import('../v2/docxHelper').ParsedDocx} [__] - The docx object.
|
|
6
|
+
* @returns {import('../../v2/types/index.js').OpenXmlNode[]}
|
|
7
|
+
* @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 1234
|
|
8
|
+
*/
|
|
9
|
+
export function preProcessPageInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[], _: string, __?: any): import("../../v2/types/index.js").OpenXmlNode[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Processes a PAGEREF instruction and creates a `sd:pageReference` node.
|
|
3
|
+
* @param {import('../../v2/types/index.js').OpenXmlNode[]} nodesToCombine The nodes to combine.
|
|
4
|
+
* @param {string} instrText The instruction text.
|
|
5
|
+
* @param {import('../v2/docxHelper').ParsedDocx} [__] - The docx object.
|
|
6
|
+
* @returns {import('../../v2/types/index.js').OpenXmlNode[]}
|
|
7
|
+
* @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 1234
|
|
8
|
+
*/
|
|
9
|
+
export function preProcessPageRefInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[], instrText: string, _: any): import("../../v2/types/index.js").OpenXmlNode[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Processes a TOC instruction and creates a `sd:tableOfContents` node.
|
|
3
|
+
* @param {import('../../v2/types/index.js').OpenXmlNode[]} nodesToCombine The nodes to combine.
|
|
4
|
+
* @param {string} instrText The instruction text.
|
|
5
|
+
* @returns {import('../../v2/types/index.js').OpenXmlNode[]}
|
|
6
|
+
* @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 1251
|
|
7
|
+
*/
|
|
8
|
+
export function preProcessTocInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[], instrText: string): import("../../v2/types/index.js").OpenXmlNode[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./preProcessNodesForFldChar.js";
|
package/dist/super-editor/src/core/super-converter/field-references/preProcessNodesForFldChar.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export function preProcessNodesForFldChar(nodes?: OpenXmlNode[], docx?: import("../v2/docxHelper").ParsedDocx): FldCharProcessResult;
|
|
2
|
+
export type OpenXmlNode = import("../v2/types/index.js").OpenXmlNode;
|
|
3
|
+
export type FldCharProcessResult = {
|
|
4
|
+
/**
|
|
5
|
+
* - The list of nodes after processing.
|
|
6
|
+
*/
|
|
7
|
+
processedNodes: OpenXmlNode[];
|
|
8
|
+
/**
|
|
9
|
+
* - If a field 'begin' was found without a matching 'end'. Contains the current field data.
|
|
10
|
+
*/
|
|
11
|
+
unpairedBegin: Array<{
|
|
12
|
+
nodes: OpenXmlNode[];
|
|
13
|
+
fieldInfo: {
|
|
14
|
+
instrText: string;
|
|
15
|
+
};
|
|
16
|
+
}> | null;
|
|
17
|
+
/**
|
|
18
|
+
* - If a field 'end' was found without a matching 'begin'.
|
|
19
|
+
*/
|
|
20
|
+
unpairedEnd: boolean | null;
|
|
21
|
+
};
|
package/dist/super-editor/src/core/super-converter/v2/exporter/helpers/translateChildNodes.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Process child nodes, ignoring any that are not valid
|
|
3
3
|
*
|
|
4
|
-
* @param {SchemaNode[]} nodes The input nodes
|
|
5
|
-
* @returns {XmlReadyNode[]} The processed child nodes
|
|
4
|
+
* @param {import('@converter/exporter').SchemaNode[]} nodes The input nodes
|
|
5
|
+
* @returns {import('@converter/exporter').XmlReadyNode[]} The processed child nodes
|
|
6
6
|
*/
|
|
7
|
-
export function translateChildNodes(params: any): XmlReadyNode[];
|
|
7
|
+
export function translateChildNodes(params: any): import("@converter/exporter").XmlReadyNode[];
|
|
@@ -5,4 +5,10 @@ export type SuperDocNode = any;
|
|
|
5
5
|
/**
|
|
6
6
|
* Represents a node in the Open XML document structure.
|
|
7
7
|
*/
|
|
8
|
-
export type OpenXmlNode =
|
|
8
|
+
export type OpenXmlNode = {
|
|
9
|
+
name: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
attributes?: object;
|
|
12
|
+
elements?: OpenXmlNode[];
|
|
13
|
+
text?: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./pageReference-translator.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @type {import('@translator').NodeTranslatorConfig} */
|
|
2
|
+
export const config: import("@translator").NodeTranslatorConfig;
|
|
3
|
+
/**
|
|
4
|
+
* The NodeTranslator instance for the passthrough element.
|
|
5
|
+
* @type {import('@translator').NodeTranslator}
|
|
6
|
+
*/
|
|
7
|
+
export const translator: import("@translator").NodeTranslator;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./tableOfContents-translator.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @type {import('@translator').NodeTranslatorConfig} */
|
|
2
|
+
export const config: import("@translator").NodeTranslatorConfig;
|
|
3
|
+
/**
|
|
4
|
+
* The NodeTranslator instance for the sd:tableOfContents element.
|
|
5
|
+
* This element represents a table of contents in a document and is added during
|
|
6
|
+
* preprocessing of w:fldChar elements
|
|
7
|
+
* @type {import('@translator').NodeTranslator}
|
|
8
|
+
* @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 1251
|
|
9
|
+
*/
|
|
10
|
+
export const translator: import("@translator").NodeTranslator;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @type {import('@translator').NodeTranslatorConfig} */
|
|
2
|
+
export const config: import("@translator").NodeTranslatorConfig;
|
|
3
|
+
/**
|
|
4
|
+
* The NodeTranslator instance for the w:caps element.
|
|
5
|
+
* @type {import('@translator').NodeTranslator}
|
|
6
|
+
*/
|
|
7
|
+
export const translator: import("@translator").NodeTranslator;
|
|
@@ -2,5 +2,3 @@ export function parseParagraphBorders(pBdr: any): {};
|
|
|
2
2
|
export function getParagraphIndent(node: any, docx: any, styleId?: string): any;
|
|
3
3
|
export function getParagraphSpacing(node: any, docx: any, styleId?: string, marks?: any[], options?: {}): any;
|
|
4
4
|
export function getDefaultParagraphStyle(docx: any, styleId?: string): any;
|
|
5
|
-
export function preProcessNodesForFldChar(nodes?: any[]): any[];
|
|
6
|
-
export function processCombinedNodesForFldChar(nodesToCombine?: any[]): any[];
|
|
@@ -3,4 +3,12 @@
|
|
|
3
3
|
* @returns {Array|null}
|
|
4
4
|
*/
|
|
5
5
|
export function handleDocPartObj(params: any): any[] | null;
|
|
6
|
-
export function tableOfContentsHandler(params: any):
|
|
6
|
+
export function tableOfContentsHandler(params: any): {
|
|
7
|
+
type: string;
|
|
8
|
+
content: any;
|
|
9
|
+
attrs: {
|
|
10
|
+
id: any;
|
|
11
|
+
docPartGallery: string;
|
|
12
|
+
docPartUnique: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translate a document part object node to its XML representation.
|
|
3
|
+
* @param {Object} params - The parameters for translation.
|
|
4
|
+
* @returns {Object} The XML representation of the structured content block.
|
|
5
|
+
*/
|
|
6
|
+
export function translateDocumentPartObj(params: any): any;
|
|
@@ -40,7 +40,7 @@ export const TranslatorTypes: Readonly<{
|
|
|
40
40
|
* @callback NodeTranslatorDecodeFn
|
|
41
41
|
* @param {SCDecoderConfig} params
|
|
42
42
|
* @param {DecodedAttributes} [decodedAttrs]
|
|
43
|
-
* @returns {import('../../v2/types').OpenXmlNode}
|
|
43
|
+
* @returns {import('../../v2/types').OpenXmlNode | import('../../v2/types').OpenXmlNode[]}
|
|
44
44
|
*/
|
|
45
45
|
/** @callback MatchesEncodeFn @param {any[]} nodes @param {any} [ctx] @returns {boolean} */
|
|
46
46
|
/** @callback MatchesDecodeFn @param {any} node @param {any} [ctx] @returns {boolean} */
|
|
@@ -170,7 +170,7 @@ export type SCDecoderResult = {
|
|
|
170
170
|
elements: any[];
|
|
171
171
|
};
|
|
172
172
|
export type NodeTranslatorEncodeFn = (params: SCEncoderConfig, encodedAttrs?: EncodedAttributes) => import("../../v2/types").SuperDocNode;
|
|
173
|
-
export type NodeTranslatorDecodeFn = (params: SCDecoderConfig, decodedAttrs?: DecodedAttributes) => import("../../v2/types").OpenXmlNode;
|
|
173
|
+
export type NodeTranslatorDecodeFn = (params: SCDecoderConfig, decodedAttrs?: DecodedAttributes) => import("../../v2/types").OpenXmlNode | import("../../v2/types").OpenXmlNode[];
|
|
174
174
|
export type MatchesEncodeFn = (nodes: any[], ctx?: any) => boolean;
|
|
175
175
|
export type MatchesDecodeFn = (node: any, ctx?: any) => boolean;
|
|
176
176
|
export type EncodedAttributes = any;
|
|
@@ -59,8 +59,9 @@ import { AiPlugin } from './ai/index.js';
|
|
|
59
59
|
import { Search } from './search/index.js';
|
|
60
60
|
import { StructuredContent } from './structured-content/index.js';
|
|
61
61
|
import { StructuredContentBlock } from './structured-content/index.js';
|
|
62
|
+
import { StructuredContentCommands } from './structured-content/index.js';
|
|
62
63
|
import { DocumentSection } from './structured-content/index.js';
|
|
63
64
|
import { NodeResizer } from './noderesizer/index.js';
|
|
64
65
|
import { CustomSelection } from './custom-selection/index.js';
|
|
65
66
|
import { TextTransform } from './text-transform/index.js';
|
|
66
|
-
export { History, Heading, Document, Text, Run, BulletList, OrderedList, ListItem, Paragraph, CommentRangeStart, CommentRangeEnd, CommentReference, TabNode, LineBreak, HardBreak, Bold, Italic, Underline, Highlight, Strike, Color, FontFamily, FontSize, TextAlign, TextIndent, TextStyle, LineHeight, FormatCommands, CommentsPlugin, Gapcursor, Table, TableRow, TableCell, TableHeader, Placeholder, DropCursor, BlockNode, FieldAnnotation, fieldAnnotationHelpers, Image, BookmarkStart, BookmarkEnd, PopoverPlugin, Mention, Collaboration, CollaborationCursor, TrackChanges, TrackInsert, TrackDelete, TrackFormat, CommentsMark, trackChangesHelpers, AiMark, AiAnimationMark, AiLoaderNode, AiPlugin, Search, StructuredContent, StructuredContentBlock, DocumentSection, NodeResizer, CustomSelection, TextTransform };
|
|
67
|
+
export { History, Heading, Document, Text, Run, BulletList, OrderedList, ListItem, Paragraph, CommentRangeStart, CommentRangeEnd, CommentReference, TabNode, LineBreak, HardBreak, Bold, Italic, Underline, Highlight, Strike, Color, FontFamily, FontSize, TextAlign, TextIndent, TextStyle, LineHeight, FormatCommands, CommentsPlugin, Gapcursor, Table, TableRow, TableCell, TableHeader, Placeholder, DropCursor, BlockNode, FieldAnnotation, fieldAnnotationHelpers, Image, BookmarkStart, BookmarkEnd, PopoverPlugin, Mention, Collaboration, CollaborationCursor, TrackChanges, TrackInsert, TrackDelete, TrackFormat, CommentsMark, trackChangesHelpers, AiMark, AiAnimationMark, AiLoaderNode, AiPlugin, Search, StructuredContent, StructuredContentBlock, StructuredContentCommands, DocumentSection, NodeResizer, CustomSelection, TextTransform };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./page-reference.js";
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} StructuredContentInlineInsert
|
|
3
|
+
* @property {string} [text] - Text content to insert
|
|
4
|
+
* @property {Object} [json] - ProseMirror JSON
|
|
5
|
+
* @property {Object} [attrs] - Node attributes
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {Object} StructuredContentBlockInsert
|
|
9
|
+
* @property {string} [html] - HTML content to insert
|
|
10
|
+
* @property {Object} [json] - ProseMirror JSON
|
|
11
|
+
* @property {Object} [attrs] - Node attributes
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* @typedef {Object} StructuredContentUpdate
|
|
15
|
+
* @property {string} [text] - Replace content with text (only for structured content inline)
|
|
16
|
+
* @property {string} [html] - Replace content with HTML (only for structured content block)
|
|
17
|
+
* @property {Object} [json] - Replace content with ProseMirror JSON (overrides html)
|
|
18
|
+
* @property {Object} [attrs] - Update attributes only (preserves content)
|
|
19
|
+
*/
|
|
20
|
+
export const StructuredContentCommands: Extension;
|
|
21
|
+
export type StructuredContentInlineInsert = {
|
|
22
|
+
/**
|
|
23
|
+
* - Text content to insert
|
|
24
|
+
*/
|
|
25
|
+
text?: string;
|
|
26
|
+
/**
|
|
27
|
+
* - ProseMirror JSON
|
|
28
|
+
*/
|
|
29
|
+
json?: any;
|
|
30
|
+
/**
|
|
31
|
+
* - Node attributes
|
|
32
|
+
*/
|
|
33
|
+
attrs?: any;
|
|
34
|
+
};
|
|
35
|
+
export type StructuredContentBlockInsert = {
|
|
36
|
+
/**
|
|
37
|
+
* - HTML content to insert
|
|
38
|
+
*/
|
|
39
|
+
html?: string;
|
|
40
|
+
/**
|
|
41
|
+
* - ProseMirror JSON
|
|
42
|
+
*/
|
|
43
|
+
json?: any;
|
|
44
|
+
/**
|
|
45
|
+
* - Node attributes
|
|
46
|
+
*/
|
|
47
|
+
attrs?: any;
|
|
48
|
+
};
|
|
49
|
+
export type StructuredContentUpdate = {
|
|
50
|
+
/**
|
|
51
|
+
* - Replace content with text (only for structured content inline)
|
|
52
|
+
*/
|
|
53
|
+
text?: string;
|
|
54
|
+
/**
|
|
55
|
+
* - Replace content with HTML (only for structured content block)
|
|
56
|
+
*/
|
|
57
|
+
html?: string;
|
|
58
|
+
/**
|
|
59
|
+
* - Replace content with ProseMirror JSON (overrides html)
|
|
60
|
+
*/
|
|
61
|
+
json?: any;
|
|
62
|
+
/**
|
|
63
|
+
* - Update attributes only (preserves content)
|
|
64
|
+
*/
|
|
65
|
+
attrs?: any;
|
|
66
|
+
};
|
|
67
|
+
import { Extension } from '@core/index';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets structured content tags by ID in the state.
|
|
3
|
+
* @param {string | string[]} idOrIds
|
|
4
|
+
* @param {import('prosemirror-state').EditorState} state Editor state.
|
|
5
|
+
* @returns {Array}
|
|
6
|
+
*/
|
|
7
|
+
export function getStructuredContentTagsById(idOrIds: string | string[], state: import("prosemirror-state").EditorState): any[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function getParagraphContext($pos: any, cache: any): any;
|
|
1
|
+
export function getParagraphContext($pos: any, cache: any, helpers: any): any;
|
|
2
2
|
export function flattenParagraph(paragraph: any, paragraphStartPos: any): any[];
|
|
3
3
|
export function findNextTabIndex(flattened: any, fromIndex: any): any;
|
|
4
4
|
export function findDecimalBreakPos(flattened: any, startIndex: any, breakChar: any): any;
|
|
@@ -9,4 +9,4 @@ export function getLeftCoord(view: any, pos: any): any;
|
|
|
9
9
|
export function calcTabHeight(pos: any): string;
|
|
10
10
|
export const defaultTabDistance: 48;
|
|
11
11
|
export const defaultLineLength: 816;
|
|
12
|
-
export function getTabDecorations(doc: any, view: any, from?: number, to?: any): any[];
|
|
12
|
+
export function getTabDecorations(doc: any, view: any, helpers: any, from?: number, to?: any): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./table-of-contents.js";
|
|
@@ -422,6 +422,9 @@ to {
|
|
|
422
422
|
a {
|
|
423
423
|
text-decoration: auto;
|
|
424
424
|
}
|
|
425
|
+
.super-editor a {
|
|
426
|
+
color: initial;
|
|
427
|
+
}
|
|
425
428
|
/**
|
|
426
429
|
* Basic ProseMirror styles.
|
|
427
430
|
* https://github.com/ProseMirror/prosemirror-view/blob/master/style/prosemirror.css
|
|
@@ -1144,6 +1147,7 @@ on the right if it is inside shape textbox.
|
|
|
1144
1147
|
border-bottom: none;
|
|
1145
1148
|
border-radius: 6px 6px 0 0;
|
|
1146
1149
|
background-color: #629be7dd;
|
|
1150
|
+
box-sizing: border-box;
|
|
1147
1151
|
z-index: 10;
|
|
1148
1152
|
cursor: grab;
|
|
1149
1153
|
display: none;
|
|
@@ -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, runCommandWithArgumentOnly_fn;
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { n, C, o, T, l, p, m } from "./chunks/editor-
|
|
12
|
+
import { ax as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aA as vClickOutside, H as findParentNode, aB as getActiveFormatting, at as isInTable, aC as readFromClipboard, aD as handleClipboardPaste, aE as getFileObject, aF as runPropertyTranslators, aG as translator, aH as translator$1, aI as translator$2, aJ as translator$3, aK as translator$4, aL as translator$5, aM as translator$6, aN as translator$7, aO as translator$8, aP as translator$9, aQ as translator$a, aR as translator$b, aS as translator$c, aT as translator$d, aU as translator$e, aV as translator$f, aW as translator$g, aX as translator$h, aY as translator$i, aZ as translator$j, a_ as translator$k, a$ as translator$l, b0 as translator$m, b1 as translator$n, b2 as translator$o, b3 as translator$p, b4 as translator$q, b5 as translator$r, b6 as translator$s, b7 as translator$t, b8 as translator$u, b9 as translator$v, ba as translator$w, bb as translator$x, bc as translator$y, bd as translator$z, be as translator$A, bf as translator$B, bg as translator$C, bh as translator$D, bi as translator$E, bj as translator$F, bk as translator$G, bl as translator$H, bm as translator$I, bn as translator$J, bo as translator$K, bp as translator$L, bq as translator$M, br as translator$N, bs as translator$O, bt as translator$P, bu as translator$Q, bv as translator$R, bw as translator$S, bx as translator$T, by as translator$U, bz as translator$V, bA as translator$W, bB as translator$X, bC as translator$Y, bD as translator$Z, bE as translator$_, bF as translator$$, bG as translator$10, bH as translator$11, bI as translator$12, a as Plugin } from "./chunks/converter-C08GQjNi.js";
|
|
13
|
+
import { bJ, a5, i, a2 } from "./chunks/converter-C08GQjNi.js";
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-C2IwVkIp.js";
|
|
15
|
+
import { n, C, o, T, l, p, m } from "./chunks/editor-C2IwVkIp.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, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-De8G_9NV.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
|
-
import { D } from "./chunks/docx-zipper-
|
|
19
|
+
import { D } from "./chunks/docx-zipper-C3-uf2tI.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
21
21
|
var eventemitter3 = { exports: {} };
|
|
22
22
|
var hasRequiredEventemitter3;
|
|
@@ -4915,7 +4915,9 @@ const _sfc_main = {
|
|
|
4915
4915
|
};
|
|
4916
4916
|
const SuperInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4d5cff52"]]);
|
|
4917
4917
|
const additionalHandlers = Object.freeze({
|
|
4918
|
-
"mc:AlternateContent": translator$
|
|
4918
|
+
"mc:AlternateContent": translator$12,
|
|
4919
|
+
"sd:pageReference": translator$11,
|
|
4920
|
+
"sd:tableOfContents": translator$10,
|
|
4919
4921
|
"w:b": translator$$,
|
|
4920
4922
|
"w:bidiVisual": translator$_,
|
|
4921
4923
|
"w:bookmarkEnd": translator$Z,
|
|
@@ -4996,7 +4998,7 @@ const Extensions = {
|
|
|
4996
4998
|
export {
|
|
4997
4999
|
AIWriter,
|
|
4998
5000
|
n as AnnotatorHelpers,
|
|
4999
|
-
|
|
5001
|
+
bJ as BasicUpload,
|
|
5000
5002
|
C as CommentsPluginKey,
|
|
5001
5003
|
D as DocxZipper,
|
|
5002
5004
|
Editor,
|
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-DxScE0ep.cjs");
|
|
4
4
|
require("./chunks/vue-DWle4Cai.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-Dj6Sxtr7.es.js";
|
|
2
2
|
import "./chunks/vue-CXxsqYcP.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-DxScE0ep.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-CIbe1VMu.cjs");
|
|
5
5
|
require("./chunks/vue-DWle4Cai.cjs");
|
|
6
6
|
require("./chunks/jszip-b7l8QkfH.cjs");
|
|
7
7
|
const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
|
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-Dj6Sxtr7.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-C8q6lenv.es.js";
|
|
3
3
|
import "./chunks/vue-CXxsqYcP.es.js";
|
|
4
4
|
import "./chunks/jszip-B8KIZSNe.es.js";
|
|
5
5
|
import { B } from "./chunks/blank-docx-iwdyG9RH.es.js";
|