@harbour-enterprises/superdoc 0.17.3 → 0.18.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.
Files changed (98) hide show
  1. package/dist/chunks/{PdfViewer-B5bEH-lD.cjs → PdfViewer-DKOAmiXw.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-P3OSs9iX.es.js → PdfViewer-OIo9wAyq.es.js} +1 -1
  3. package/dist/chunks/{index-CHQbeTTv.es.js → index-DEONStGL.es.js} +4 -3
  4. package/dist/chunks/{index-LZjTD5KG.cjs → index-cCWdcGrV.cjs} +4 -3
  5. package/dist/chunks/{super-editor.es-C-nn3bMY.es.js → super-editor.es-Cx5l8JEt.es.js} +4350 -3412
  6. package/dist/chunks/{super-editor.es-D8CRzfwC.cjs → super-editor.es-DyAWPYYh.cjs} +4349 -3411
  7. package/dist/core/SuperDoc.d.ts.map +1 -1
  8. package/dist/index.d.ts +2 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/super-editor/ai-writer.es.js +2 -2
  11. package/dist/super-editor/chunks/{converter-Bcg2-svq.js → converter-5WOzOHZb.js} +4396 -3862
  12. package/dist/super-editor/chunks/{docx-zipper-X-fYIxPZ.js → docx-zipper-CP-vEy49.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-D4fBb3em.js → editor-CCOqTxyv.js} +454 -42
  14. package/dist/super-editor/chunks/{toolbar-C6KdVRS2.js → toolbar-DjjHAttK.js} +2 -2
  15. package/dist/super-editor/converter.es.js +3 -2
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/src/core/commands/insertContent.d.ts +4 -4
  20. package/dist/super-editor/src/core/helpers/contentProcessor.d.ts +13 -0
  21. package/dist/super-editor/src/core/helpers/htmlSanitizer.d.ts +8 -0
  22. package/dist/super-editor/src/core/helpers/importHtml.d.ts +3 -2
  23. package/dist/super-editor/src/core/helpers/importMarkdown.d.ts +2 -1
  24. package/dist/super-editor/src/core/helpers/index.d.ts +1 -0
  25. package/dist/super-editor/src/core/super-converter/docx-helpers/get-default-style-definition.d.ts +1 -0
  26. package/dist/super-editor/src/core/super-converter/docx-helpers/index.d.ts +1 -0
  27. package/dist/super-editor/src/core/super-converter/exporter.d.ts +19 -2
  28. package/dist/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +2 -1
  29. package/dist/super-editor/src/core/super-converter/v2/importer/index.d.ts +2 -0
  30. package/dist/super-editor/src/core/super-converter/v2/importer/lineBreakImporter.d.ts +3 -5
  31. package/dist/super-editor/src/core/super-converter/v2/importer/paragraphNodeImporter.d.ts +3 -63
  32. package/dist/super-editor/src/core/super-converter/v2/importer/tabImporter.d.ts +2 -1
  33. package/dist/super-editor/src/core/super-converter/v2/importer/tableImporter.d.ts +17 -6
  34. package/dist/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +73 -0
  35. package/dist/super-editor/src/core/super-converter/v2/types/index.d.ts +8 -0
  36. package/dist/super-editor/src/core/super-converter/v3/handlers/index.d.ts +9 -0
  37. package/dist/super-editor/src/core/super-converter/v3/handlers/w/br/attributes/index.d.ts +2 -0
  38. package/dist/super-editor/src/core/super-converter/v3/handlers/w/br/attributes/w-clear.d.ts +4 -0
  39. package/dist/super-editor/src/core/super-converter/v3/handlers/w/br/attributes/w-line-break-type.d.ts +4 -0
  40. package/dist/super-editor/src/core/super-converter/v3/handlers/w/br/br-translator.d.ts +7 -0
  41. package/dist/super-editor/src/core/super-converter/v3/handlers/w/br/index.d.ts +1 -0
  42. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/index.d.ts +2 -0
  43. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w-rsid-del.d.ts +4 -0
  44. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w-rsid-p.d.ts +4 -0
  45. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w-rsid-r-default.d.ts +4 -0
  46. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w-rsid-r-pr.d.ts +4 -0
  47. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w-rsid-r.d.ts +4 -0
  48. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w14-para-id.d.ts +4 -0
  49. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/attributes/w14-text-id.d.ts +4 -0
  50. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/index.d.ts +1 -0
  51. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/legacy-handle-paragraph-node.d.ts +1 -0
  52. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/helpers/w-p-helpers.d.ts +6 -0
  53. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/index.d.ts +1 -0
  54. package/dist/super-editor/src/core/super-converter/v3/handlers/w/p/p-translator.d.ts +7 -0
  55. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/index.d.ts +2 -0
  56. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/w-tab-leader.d.ts +4 -0
  57. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/w-tab-pos.d.ts +4 -0
  58. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/attributes/w-tab-size.d.ts +4 -0
  59. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/index.d.ts +1 -0
  60. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tab/tab-translator.d.ts +7 -0
  61. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tc/helpers/legacy-handle-table-cell-node.d.ts +9 -0
  62. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tc/helpers/translate-table-cell.d.ts +17 -0
  63. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tc/index.d.ts +1 -0
  64. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tc/tc-translator.d.ts +6 -0
  65. package/dist/super-editor/src/core/super-converter/v3/node-translator/index.d.ts +1 -0
  66. package/dist/super-editor/src/core/super-converter/v3/node-translator/node-translator.d.ts +203 -0
  67. package/dist/super-editor/src/extensions/block-node/block-node.d.ts +27 -4
  68. package/dist/super-editor/src/extensions/color/color.d.ts +1 -1
  69. package/dist/super-editor/src/extensions/dropcursor/dropcursor.d.ts +5 -0
  70. package/dist/super-editor/src/extensions/gapcursor/gapcursor.d.ts +5 -0
  71. package/dist/super-editor/src/extensions/image/image.d.ts +5 -0
  72. package/dist/super-editor/src/extensions/image/imageHelpers/getFileOpener.d.ts +1 -1
  73. package/dist/super-editor/src/extensions/image/imageHelpers/handleImageUpload.d.ts +1 -1
  74. package/dist/super-editor/src/extensions/image/imageHelpers/imagePlaceholderPlugin.d.ts +2 -3
  75. package/dist/super-editor/src/extensions/image/imageHelpers/imagePositionPlugin.d.ts +1 -2
  76. package/dist/super-editor/src/extensions/image/imageHelpers/processUploadedImage.d.ts +2 -5
  77. package/dist/super-editor/src/extensions/image/imageHelpers/startImageUpload.d.ts +18 -3
  78. package/dist/super-editor/src/extensions/linked-styles/helpers.d.ts +4 -6
  79. package/dist/super-editor/src/extensions/linked-styles/linked-styles.d.ts +29 -0
  80. package/dist/super-editor/src/extensions/linked-styles/plugin.d.ts +4 -2
  81. package/dist/super-editor/src/extensions/paragraph/paragraph.d.ts +2 -2
  82. package/dist/super-editor/src/extensions/text-align/text-align.d.ts +9 -0
  83. package/dist/super-editor/src/extensions/text-indent/text-indent.d.ts +19 -0
  84. package/dist/super-editor/src/extensions/text-transform/text-transform.d.ts +5 -0
  85. package/dist/super-editor/src/index.d.ts +2 -1
  86. package/dist/super-editor/src/tests/export/export-helpers/export-helpers.d.ts +1 -0
  87. package/dist/super-editor/super-editor.es.js +24 -18
  88. package/dist/super-editor/toolbar.es.js +2 -2
  89. package/dist/super-editor.cjs +2 -1
  90. package/dist/super-editor.es.js +2 -1
  91. package/dist/superdoc.cjs +3 -2
  92. package/dist/superdoc.es.js +3 -2
  93. package/dist/superdoc.umd.js +4488 -3549
  94. package/dist/superdoc.umd.js.map +1 -1
  95. package/package.json +1 -1
  96. package/dist/super-editor/src/core/super-converter/v2/handlers/index.d.ts +0 -1
  97. package/dist/super-editor/src/extensions/field-annotation/field-annotation-marks-impl.d.ts +0 -5
  98. /package/dist/super-editor/src/{extensions/document-attributes → core/super-converter/v3/handlers/types}/index.d.ts +0 -0
@@ -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 { H as process$1 } from "./converter-Bcg2-svq.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-D4fBb3em.js";
2
+ import { I as process$1 } from "./converter-5WOzOHZb.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CCOqTxyv.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,5 @@
1
- import { a4 } from "./chunks/converter-Bcg2-svq.js";
1
+ import { a5 } from "./chunks/converter-5WOzOHZb.js";
2
+ import "vue";
2
3
  export {
3
- a4 as SuperConverter
4
+ a5 as SuperConverter
4
5
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-Bcg2-svq.js";
2
- import { D } from "./chunks/docx-zipper-X-fYIxPZ.js";
1
+ import "./chunks/converter-5WOzOHZb.js";
2
+ import { D } from "./chunks/docx-zipper-CP-vEy49.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-D4fBb3em.js";
2
- import "./chunks/converter-Bcg2-svq.js";
3
- import "./chunks/docx-zipper-X-fYIxPZ.js";
1
+ import { E } from "./chunks/editor-CCOqTxyv.js";
2
+ import "./chunks/converter-5WOzOHZb.js";
3
+ import "./chunks/docx-zipper-CP-vEy49.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-X-fYIxPZ.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-CP-vEy49.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -1,4 +1,4 @@
1
- export function insertContent(value: any, options: any): ({ tr, commands }: {
2
- tr: any;
3
- commands: any;
4
- }) => any;
1
+ export function insertContent(value: string | any, options?: {
2
+ contentType?: string;
3
+ parseOptions?: boolean;
4
+ }): Function;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Unified content processor that handles all content types
3
+ * @param {Object} params
4
+ * @param {string} params.content - The content to process
5
+ * @param {string} params.type - Content type: 'html', 'markdown', 'text', 'schema'
6
+ * @param {Object} params.schema - ProseMirror schema
7
+ * @returns {Object} Processed ProseMirror document
8
+ */
9
+ export function processContent({ content, type, schema }: {
10
+ content: string;
11
+ type: string;
12
+ schema: any;
13
+ }): any;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Strip all inline styles and non-semantic attributes from HTML
3
+ * Preserves structure while removing presentation
4
+ *
5
+ * @param {string} html - Raw HTML string
6
+ * @returns {string} Clean HTML with semantic structure only
7
+ */
8
+ export function stripHtmlStyles(html: string): string;
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Create a document from HTML content
3
- * @private
4
3
  * @param {string} content - HTML content
4
+ * @param {Object} schema - ProseMirror schema
5
+ * @param {Object} [options={}] - Import options
5
6
  * @returns {Object} Document node
6
7
  */
7
- export function createDocFromHTML(content: string, schema: any): any;
8
+ export function createDocFromHTML(content: string, schema: any, options?: any): any;
@@ -2,9 +2,10 @@
2
2
  * Create a ProseMirror document from Markdown content
3
3
  * @param {string} markdown - Markdown content
4
4
  * @param {Object} schema - ProseMirror schema
5
+ * @param {Object} [options={}] - Import options
5
6
  * @returns {Object} Document node
6
7
  */
7
- export function createDocFromMarkdown(markdown: string, schema: any): any;
8
+ export function createDocFromMarkdown(markdown: string, schema: any, options?: any): any;
8
9
  /**
9
10
  * Convert Markdown to HTML with SuperDoc/DOCX compatibility
10
11
  * @param {string} markdown - Markdown content
@@ -26,3 +26,4 @@ export * from "./findMark.js";
26
26
  export * from "./isInTable.js";
27
27
  export * from "./importHtml.js";
28
28
  export * from "./importMarkdown.js";
29
+ export * from "./contentProcessor.js";
@@ -0,0 +1 @@
1
+ export function getDefaultStyleDefinition(defaultStyleId: string, docx: any): any;
@@ -1,2 +1,3 @@
1
1
  export * from "./docx-helpers.js";
2
2
  export * from "./docx-constants.js";
3
+ export * from "./get-default-style-definition.js";
@@ -15,7 +15,7 @@
15
15
  * @typedef {Object} XmlReadyNode
16
16
  * @property {string} name The XML tag name
17
17
  * @property {Array<XmlReadyNode>} elements The child nodes
18
- * @property {Object} attributes The node attributes
18
+ * @property {Object} [attributes] The node attributes
19
19
  */
20
20
  /**
21
21
  * @typedef {Object.<string, *>} SchemaAttributes
@@ -44,6 +44,23 @@ export function exportSchemaToJson(params: ExportParams): XmlReadyNode;
44
44
  * @returns {XmlReadyNode} JSON of the XML-ready paragraph node
45
45
  */
46
46
  export function translateParagraphNode(params: any): XmlReadyNode;
47
+ /**
48
+ * Generate a w:rPr node (run properties) from marks
49
+ *
50
+ * @param {Object[]} marks The marks to add to the run properties
51
+ * @returns
52
+ */
53
+ export function generateRunProps(marks?: any[]): {
54
+ name: string;
55
+ elements: any[];
56
+ };
57
+ /**
58
+ * Get all marks as a list of MarkType objects
59
+ *
60
+ * @param {MarkType[]} marks
61
+ * @returns
62
+ */
63
+ export function processOutputMarks(marks?: MarkType[]): any[];
47
64
  /**
48
65
  * Main translation function for a table row
49
66
  *
@@ -111,7 +128,7 @@ export type XmlReadyNode = {
111
128
  /**
112
129
  * The node attributes
113
130
  */
114
- attributes: any;
131
+ attributes?: any;
115
132
  };
116
133
  /**
117
134
  * Key value pairs representing the node attributes from prose mirror
@@ -29,7 +29,7 @@ export function createDocumentJson(docx: ParsedDocx, converter: SuperConverter,
29
29
  pageStyles: any;
30
30
  } | null;
31
31
  export function defaultNodeListHandler(): {
32
- handler: ({ nodes: elements, docx, insideTrackChange, converter, editor, filename, parentStyleId, lists, }: {
32
+ handler: ({ nodes: elements, docx, insideTrackChange, converter, editor, filename, parentStyleId, lists, path, }: {
33
33
  nodes: any;
34
34
  docx: any;
35
35
  insideTrackChange: any;
@@ -38,6 +38,7 @@ export function defaultNodeListHandler(): {
38
38
  filename: any;
39
39
  parentStyleId: any;
40
40
  lists: any;
41
+ path?: any[];
41
42
  }) => any[];
42
43
  handlerEntities: any[];
43
44
  };
@@ -0,0 +1,2 @@
1
+ export * from "./mergeTextNodes.js";
2
+ export * from "./markImporter.js";
@@ -1,8 +1,6 @@
1
+ export function handler(params: import("../../v3/node-translator").SCEncoderConfig): any;
1
2
  /**
2
- * @type {import("docxImporter").NodeHandler}
3
- */
4
- export const handleLineBreakNode: any;
5
- /**
6
- * @type {import("docxImporter").NodeHandlerEntry}
3
+ * Line break node handler entity
4
+ * @type {Object} Handler entity
7
5
  */
8
6
  export const lineBreakNodeHandlerEntity: any;
@@ -1,66 +1,6 @@
1
+ export function handleParagraphNode(params: import("../../v3/node-translator").SCEncoderConfig): any;
1
2
  /**
2
- * @param {string} defaultStyleId
3
- * @param {ParsedDocx} docx
4
- */
5
- export function getDefaultStyleDefinition(defaultStyleId: string, docx: ParsedDocx): {
6
- lineSpaceBefore: any;
7
- lineSpaceAfter: any;
8
- } | {
9
- attrs: {
10
- name: any;
11
- qFormat: boolean;
12
- keepNext: boolean;
13
- keepLines: boolean;
14
- outlineLevel: number;
15
- pageBreakBefore: boolean;
16
- pageBreakAfter: boolean;
17
- basedOn: any;
18
- };
19
- styles: {
20
- spacing: {
21
- lineSpaceAfter: number;
22
- lineSpaceBefore: number;
23
- line: number;
24
- };
25
- textAlign: any;
26
- indent: {
27
- leftIndent: number;
28
- rightIndent: number;
29
- firstLine: number;
30
- };
31
- };
32
- };
33
- /**
34
- * We need to pre-process nodes in a paragraph to combine nodes together where necessary ie: links
35
- * TODO: Likely will find more w:fldChar to deal with.
36
- *
37
- * @param {XmlNode[]} nodes
38
- * @returns
39
- */
40
- export function preProcessNodesForFldChar(nodes?: XmlNode[]): any[];
41
- /**
42
- * Special cases of w:p based on paragraph properties
43
- *
44
- * If we detect a list node, we need to get all nodes that are also lists and process them together
45
- * in order to combine list item nodes into list nodes.
46
- *
47
- * @type {import("docxImporter").NodeHandler}
48
- */
49
- export const handleParagraphNode: any;
50
- export function getParagraphIndent(node: any, docx: any, styleId?: string): {
51
- left: number;
52
- right: number;
53
- firstLine: number;
54
- hanging: number;
55
- textIndent: number;
56
- };
57
- export function getParagraphSpacing(node: any, docx: any, styleId?: string, marks?: any[]): {
58
- line: string | number;
59
- lineRule: any;
60
- lineSpaceBefore: number;
61
- lineSpaceAfter: number;
62
- };
63
- /**
64
- * @type {import("docxImporter").NodeHandlerEntry}
3
+ * Paragraph node handler entity
4
+ * @type {Object} Handler entity
65
5
  */
66
6
  export const paragraphNodeHandlerEntity: any;
@@ -1,4 +1,5 @@
1
1
  /**
2
- * @type {import("docxImporter").NodeHandlerEntry}
2
+ * Tab node handler entity
3
+ * @type {Object} Handler entity
3
4
  */
4
5
  export const tabNodeEntityHandler: any;
@@ -16,18 +16,28 @@ export function handleTableNode(node: XmlNode, params: any): {
16
16
  };
17
17
  };
18
18
  /**
19
- *
20
- * @param node
21
- * @param {ParsedDocx} docx
22
- * @param {NodeListHandler} nodeListHandler
23
- * @param {boolean} insideTrackChange
19
+ * @param {Object} options
24
20
  * @returns {{type: string, content: (*|*[]), attrs: {}}}
25
21
  */
26
- export function handleTableCellNode(node: any, row: any, table: any, rowBorders: any, columnWidth: any, styleTag: any, params: any, columnIndex: any): {
22
+ export function handleTableCellNode({ params, node, table, row, rowBorders, styleTag, columnIndex, columnWidth, }: any): {
27
23
  type: string;
28
24
  content: (any | any[]);
29
25
  attrs: {};
30
26
  };
27
+ /**
28
+ *
29
+ * @param tblStyleTag
30
+ * @param {ParsedDocx} docx
31
+ * @param {NodeListHandler} nodeListHandler
32
+ * @returns {{uiPriotity: *, borders: {}, name: *, rowBorders: {}, basedOn: *}|null}
33
+ */
34
+ export function getReferencedTableStyles(tblStyleTag: any, docx: ParsedDocx): {
35
+ uiPriotity: any;
36
+ borders: {};
37
+ name: any;
38
+ rowBorders: {};
39
+ basedOn: any;
40
+ } | null;
31
41
  /**
32
42
  * Process a table row node
33
43
  * @param node
@@ -49,3 +59,4 @@ export const handleAllTableNodes: any;
49
59
  * @type {import("docxImporter").NodeHandlerEntry}
50
60
  */
51
61
  export const tableNodeHandlerEntity: any;
62
+ export function getGridColumnWidths(tableNode: any): any;
@@ -0,0 +1,73 @@
1
+ export type NodeHandlerParams = {
2
+ /**
3
+ * - The array of nodes to process.
4
+ */
5
+ nodes: any[];
6
+ /**
7
+ * - The parsed DOCX object.
8
+ */
9
+ docx: any;
10
+ /**
11
+ * - Indicates if the processing is inside a track change.
12
+ */
13
+ insideTrackChange: boolean;
14
+ /**
15
+ * - The node list handler.
16
+ */
17
+ nodeListHandler: NodeListHandler;
18
+ /**
19
+ * - The converter object.
20
+ */
21
+ converter: any;
22
+ /**
23
+ * - The editor object.
24
+ */
25
+ editor: import("../../../../Editor").Editor;
26
+ /**
27
+ * - The name of the file being processed.
28
+ */
29
+ filename?: string;
30
+ /**
31
+ * - The ID of the parent style.
32
+ */
33
+ parentStyleId?: string;
34
+ /**
35
+ * - The imported lists object
36
+ */
37
+ lists?: any;
38
+ /**
39
+ * - The path of nodes leading to the current node.
40
+ */
41
+ path?: any[];
42
+ /**
43
+ * - The extra params.
44
+ */
45
+ extraParams?: Record<string, any>;
46
+ };
47
+ export type XmlNode = any;
48
+ export type PmNodeJson = {
49
+ type: string;
50
+ content: any;
51
+ attrs: {};
52
+ sdNodeOrKeyName: string;
53
+ };
54
+ export type PmMarkJson = {
55
+ type: string;
56
+ attrs: {};
57
+ };
58
+ export type ParsedDocx = any;
59
+ export type NodeListHandler = {
60
+ handler: NodeListHandlerFn;
61
+ handlerEntities: NodeHandlerEntry[];
62
+ };
63
+ export type NodeListHandlerFn = (params: NodeHandlerParams) => PmNodeJson[];
64
+ export type NodeHandler = (params: NodeHandlerParams) => {
65
+ nodes: PmNodeJson[];
66
+ consumed: number;
67
+ };
68
+ export type NodeHandlerEntry = {
69
+ handlerName: string;
70
+ handler: NodeHandler;
71
+ };
72
+ export type SuperConverter = any;
73
+ export type Editor = any;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Represents a node in the SuperDoc document structure.
3
+ */
4
+ export type SuperDocNode = any;
5
+ /**
6
+ * Represents a node in the Open XML document structure.
7
+ */
8
+ export type OpenXmlNode = any;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @typedef {Object} RegisteredHandlers
3
+ */
4
+ export const registeredHandlers: Readonly<{
5
+ 'w:br': import("../node-translator/node-translator.js").NodeTranslator;
6
+ 'w:tab': import("../node-translator/node-translator.js").NodeTranslator;
7
+ 'w:p': import("../node-translator/node-translator.js").NodeTranslator;
8
+ }>;
9
+ export type RegisteredHandlers = any;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@translator").AttrConfig[];
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -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 "./br-translator.js";
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@translator").AttrConfig[];
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1 @@
1
+ export * from "./w-p-helpers.js";
@@ -0,0 +1 @@
1
+ export function handleParagraphNode(params: import("@translator").SCEncoderConfig): any;
@@ -0,0 +1,6 @@
1
+ export function parseParagraphBorders(pBdr: any): {};
2
+ export function getParagraphIndent(node: any, docx: any, styleId?: string): any;
3
+ export function getParagraphSpacing(node: any, docx: any, styleId?: string, marks?: any[]): any;
4
+ export function getDefaultParagraphStyle(docx: any, styleId?: string): any;
5
+ export function preProcessNodesForFldChar(nodes?: any[]): any[];
6
+ export function processCombinedNodesForFldChar(nodesToCombine?: any[]): any[];
@@ -0,0 +1 @@
1
+ export * from "./p-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 <w:p> element.
5
+ * @type {import('@translator').NodeTranslator}
6
+ */
7
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("@translator").AttrConfig[];
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1,4 @@
1
+ export function encode(attributes: any): string | undefined;
2
+ export function decode(attrs: any): string | undefined;
3
+ /** @type {import('@translator').AttrConfig} */
4
+ export const attrConfig: import("@translator").AttrConfig;
@@ -0,0 +1 @@
1
+ export * from "./tab-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 <w:tab> element.
5
+ * @type {import('@translator').NodeTranslator}
6
+ */
7
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @param {Object} options
3
+ * @returns {{type: string, content: (*|*[]), attrs: {}}}
4
+ */
5
+ export function handleTableCellNode({ params, node, table, row, rowBorders, styleTag, columnIndex, columnWidth, }: any): {
6
+ type: string;
7
+ content: (any | any[]);
8
+ attrs: {};
9
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Main translation function for a table cell.
3
+ * @param {import('@converter/exporter').ExportParams} params
4
+ * @returns {import('@converter/exporter').XmlReadyNode}
5
+ */
6
+ export function translateTableCell(params: import("@converter/exporter").ExportParams): import("@converter/exporter").XmlReadyNode;
7
+ /**
8
+ * Generate w:tcPr properties node for a table cell
9
+ * @param {import('@converter/exporter').SchemaNode} node
10
+ * @returns {import('@converter/exporter').XmlReadyNode}
11
+ */
12
+ export function generateTableCellProperties(node: import("@converter/exporter").SchemaNode): import("@converter/exporter").XmlReadyNode;
13
+ /**
14
+ * @param {Object} cellMargins
15
+ * @returns {Array}
16
+ */
17
+ export function generateCellMargins(cellMargins: any): any[];
@@ -0,0 +1 @@
1
+ export * from "./tc-translator";
@@ -0,0 +1,6 @@
1
+ /** @type {import('@translator').NodeTranslatorConfig} */
2
+ export const config: import("@translator").NodeTranslatorConfig;
3
+ /**
4
+ * @type {import('@translator').NodeTranslator}
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./node-translator.js";