@harbour-enterprises/superdoc 0.22.0-next.1 → 0.22.0-next.11
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-BpwMPbUj.es.js → PdfViewer-CS3pY_UR.es.js} +1 -1
- package/dist/chunks/{PdfViewer-B3KmcDup.cjs → PdfViewer-Cz3fT1qt.cjs} +1 -1
- package/dist/chunks/{index-Cw4YywoD.es.js → index-Bbqhu9ev.es.js} +53 -26
- package/dist/chunks/{index-BOf6E2I4.cjs → index-p73XAt11.cjs} +53 -26
- package/dist/chunks/{super-editor.es-DHDx2fsy.cjs → super-editor.es-CFD0lcOY.cjs} +3201 -2009
- package/dist/chunks/{super-editor.es-vfoWxyZL.es.js → super-editor.es-DK3l03fz.es.js} +3201 -2009
- package/dist/core/SuperDoc.d.ts +5 -0
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/core/types/index.d.ts +4 -4
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/stores/comments-store.d.ts +4 -1
- package/dist/stores/comments-store.d.ts.map +1 -1
- package/dist/style.css +51 -44
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-BcqEfCTg.js → converter-DFDRdFEB.js} +1880 -1169
- package/dist/super-editor/chunks/{docx-zipper-DZ9ph0iQ.js → docx-zipper-CplUdgI9.js} +73 -12
- package/dist/super-editor/chunks/{editor-BC2sSIVa.js → editor-BnpIdTLI.js} +1492 -1061
- package/dist/super-editor/chunks/{toolbar-DNTo5DDf.js → toolbar-5h-ljJ_h.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/DocxZipper.d.ts +1 -1
- package/dist/super-editor/src/core/helpers/generateDocxRandomId.d.ts +5 -0
- package/dist/super-editor/src/core/super-converter/SuperConverter.d.ts +1 -13
- package/dist/super-editor/src/core/super-converter/exporter.d.ts +5 -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/helpers/tableFallbackHelpers.d.ts +24 -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/custom-selection/custom-selection.d.ts +5 -1
- 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/src/utils/contextmenu-helpers.d.ts +24 -0
- package/dist/super-editor/style.css +7 -0
- package/dist/super-editor/super-editor.es.js +11 -17
- 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 +3245 -2026
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/super-editor/src/components/slash-menu/contextmenu-helpers.d.ts +0 -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-DFDRdFEB.js";
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BnpIdTLI.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-BnpIdTLI.js";
|
|
2
|
+
import "./chunks/converter-DFDRdFEB.js";
|
|
3
|
+
import "./chunks/docx-zipper-CplUdgI9.js";
|
|
4
4
|
export {
|
|
5
5
|
E as Editor
|
|
6
6
|
};
|
|
@@ -33,7 +33,7 @@ declare class DocxZipper {
|
|
|
33
33
|
/**
|
|
34
34
|
* Update [Content_Types].xml with extensions of new Image annotations
|
|
35
35
|
*/
|
|
36
|
-
updateContentTypes(docx: any, media: any, fromJson: any): Promise<any>;
|
|
36
|
+
updateContentTypes(docx: any, media: any, fromJson: any, updatedDocs?: {}): Promise<any>;
|
|
37
37
|
unzip(file: any): Promise<any>;
|
|
38
38
|
updateZip({ docx, updatedDocs, originalDocxFile, media, fonts, isHeadless }: {
|
|
39
39
|
docx: any;
|
|
@@ -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;
|
|
@@ -98,19 +98,7 @@ export class SuperConverter {
|
|
|
98
98
|
get docxHelpers(): any;
|
|
99
99
|
parseFromXml(): void;
|
|
100
100
|
parseXmlToJson(xml: any): any;
|
|
101
|
-
getDocumentDefaultStyles(): {
|
|
102
|
-
fontSizePt?: undefined;
|
|
103
|
-
kern?: undefined;
|
|
104
|
-
typeface?: undefined;
|
|
105
|
-
panose?: undefined;
|
|
106
|
-
fontFamilyCss?: undefined;
|
|
107
|
-
} | {
|
|
108
|
-
fontSizePt: number;
|
|
109
|
-
kern: any;
|
|
110
|
-
typeface: any;
|
|
111
|
-
panose: any;
|
|
112
|
-
fontFamilyCss: any;
|
|
113
|
-
};
|
|
101
|
+
getDocumentDefaultStyles(): {};
|
|
114
102
|
getDocumentFonts(): string;
|
|
115
103
|
getDocumentInternalId(): void;
|
|
116
104
|
createDocumentIdElement(): {
|
|
@@ -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
|
|
@@ -103,6 +103,7 @@ export function translateHardBreak(params: any): {
|
|
|
103
103
|
};
|
|
104
104
|
}[];
|
|
105
105
|
};
|
|
106
|
+
export function ensureSectionLayoutDefaults(sectPr: any, converter: any): any;
|
|
106
107
|
export function isLineBreakOnlyRun(node: any): any;
|
|
107
108
|
export class DocxExporter {
|
|
108
109
|
constructor(converter: any);
|
|
@@ -118,11 +119,11 @@ export type ExportParams = {
|
|
|
118
119
|
/**
|
|
119
120
|
* The stored body node to restore, if available
|
|
120
121
|
*/
|
|
121
|
-
bodyNode
|
|
122
|
+
bodyNode?: any;
|
|
122
123
|
/**
|
|
123
124
|
* The relationships to add to the document
|
|
124
125
|
*/
|
|
125
|
-
relationships
|
|
126
|
+
relationships?: any[];
|
|
126
127
|
};
|
|
127
128
|
export type SchemaNode = {
|
|
128
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
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const DEFAULT_PAGE_WIDTH_TWIPS: 12240;
|
|
2
|
+
export const DEFAULT_PAGE_MARGIN_TWIPS: 1440;
|
|
3
|
+
export const DEFAULT_CONTENT_WIDTH_TWIPS: number;
|
|
4
|
+
export const MIN_COLUMN_WIDTH_TWIPS: number;
|
|
5
|
+
export function pctToPercent(value: any): number;
|
|
6
|
+
export function resolveContentWidthTwips(): number;
|
|
7
|
+
export function resolveMeasurementWidthPx(measurement: any): number;
|
|
8
|
+
export function countColumnsInRow(row: any): any;
|
|
9
|
+
export function buildFallbackGridForTable({ params, rows, tableWidth, tableWidthMeasurement }: {
|
|
10
|
+
params: Partial<import("@translator").SCDecoderConfig>;
|
|
11
|
+
rows: any[];
|
|
12
|
+
tableWidth?: {
|
|
13
|
+
width?: number | null;
|
|
14
|
+
};
|
|
15
|
+
tableWidthMeasurement?: {
|
|
16
|
+
value?: number;
|
|
17
|
+
type?: string;
|
|
18
|
+
};
|
|
19
|
+
}): {
|
|
20
|
+
grid: Array<{
|
|
21
|
+
col: number;
|
|
22
|
+
}>;
|
|
23
|
+
columnWidths: number[];
|
|
24
|
+
} | null;
|
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;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @property {boolean} focused - Whether editor is focused
|
|
5
5
|
* @property {Object|null} preservedSelection - Stored selection
|
|
6
6
|
* @property {boolean} showVisualSelection - Whether to show selection decoration
|
|
7
|
+
* @property {boolean} skipFocusReset - Whether to skip clearing selection on next focus
|
|
7
8
|
*/
|
|
8
9
|
/**
|
|
9
10
|
* Configuration options for CustomSelection
|
|
@@ -22,7 +23,6 @@
|
|
|
22
23
|
* @private
|
|
23
24
|
*/
|
|
24
25
|
export const CustomSelectionPluginKey: PluginKey<any>;
|
|
25
|
-
export function shouldAllowNativeContextMenu(event: MouseEvent): boolean;
|
|
26
26
|
/**
|
|
27
27
|
* @module CustomSelection
|
|
28
28
|
* @sidebarTitle Custom Selection
|
|
@@ -45,6 +45,10 @@ export type SelectionState = {
|
|
|
45
45
|
* - Whether to show selection decoration
|
|
46
46
|
*/
|
|
47
47
|
showVisualSelection: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* - Whether to skip clearing selection on next focus
|
|
50
|
+
*/
|
|
51
|
+
skipFocusReset: boolean;
|
|
48
52
|
};
|
|
49
53
|
/**
|
|
50
54
|
* Configuration options for CustomSelection
|
|
@@ -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";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determine if the native context menu should be allowed to appear.
|
|
3
|
+
* We bypass the custom menu when the user explicitly requests the system menu
|
|
4
|
+
* via modifier keys or when the event originated from a keyboard invocation.
|
|
5
|
+
* @param {MouseEvent} event
|
|
6
|
+
* @returns {boolean}
|
|
7
|
+
*/
|
|
8
|
+
export function shouldBypassContextMenu(event: MouseEvent): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Determine if the native context menu should be allowed to appear.
|
|
11
|
+
* We bypass the custom menu when the user explicitly requests the system menu
|
|
12
|
+
* via modifier keys or when the event originated from a keyboard invocation.
|
|
13
|
+
* @param {MouseEvent} event
|
|
14
|
+
* @returns {boolean}
|
|
15
|
+
*/
|
|
16
|
+
export function shouldUseNativeContextMenu(event: MouseEvent): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Determine if the native context menu should be allowed to appear.
|
|
19
|
+
* We bypass the custom menu when the user explicitly requests the system menu
|
|
20
|
+
* via modifier keys or when the event originated from a keyboard invocation.
|
|
21
|
+
* @param {MouseEvent} event
|
|
22
|
+
* @returns {boolean}
|
|
23
|
+
*/
|
|
24
|
+
export function shouldAllowNativeContextMenu(event: MouseEvent): boolean;
|
|
@@ -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
|
|
@@ -717,6 +720,9 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
|
|
|
717
720
|
z-index: -1;
|
|
718
721
|
}
|
|
719
722
|
.ProseMirror div[data-horizontal-rule='true'] {
|
|
723
|
+
position: relative;
|
|
724
|
+
z-index: auto;
|
|
725
|
+
display: block;
|
|
720
726
|
margin-top: auto;
|
|
721
727
|
align-self: flex-end;
|
|
722
728
|
}
|
|
@@ -1141,6 +1147,7 @@ on the right if it is inside shape textbox.
|
|
|
1141
1147
|
border-bottom: none;
|
|
1142
1148
|
border-radius: 6px 6px 0 0;
|
|
1143
1149
|
background-color: #629be7dd;
|
|
1150
|
+
box-sizing: border-box;
|
|
1144
1151
|
z-index: 10;
|
|
1145
1152
|
cursor: grab;
|
|
1146
1153
|
display: none;
|