@harbour-enterprises/superdoc 0.19.0-next.3 → 0.19.0-next.5

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 (65) hide show
  1. package/dist/chunks/{PdfViewer-e5Sqf3uK.es.js → PdfViewer-C2898kqZ.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-BXpR6HYz.cjs → PdfViewer-DaZtoNpm.cjs} +1 -1
  3. package/dist/chunks/{index-Bgbca9Qo.es.js → index-CkJ5hnvC.es.js} +107 -7
  4. package/dist/chunks/{index-Dg8DEGbE.cjs → index-Di9R4Aas.cjs} +107 -7
  5. package/dist/chunks/{super-editor.es-BbN2QJLe.cjs → super-editor.es-DG-S6GN9.cjs} +503 -208
  6. package/dist/chunks/{super-editor.es-Dga1v3zZ.es.js → super-editor.es-kuaVTS8t.es.js} +503 -208
  7. package/dist/core/SuperDoc.d.ts +6 -6
  8. package/dist/core/SuperDoc.d.ts.map +1 -1
  9. package/dist/core/helpers/file.d.ts +44 -0
  10. package/dist/core/helpers/file.d.ts.map +1 -0
  11. package/dist/stores/superdoc-store.d.ts.map +1 -1
  12. package/dist/style.css +9 -9
  13. package/dist/super-editor/ai-writer.es.js +2 -2
  14. package/dist/super-editor/chunks/{converter-CMajoq-M.js → converter-CrJvpQ8J.js} +456 -203
  15. package/dist/super-editor/chunks/{docx-zipper-C5rg6GNf.js → docx-zipper-CHHaFCfj.js} +1 -1
  16. package/dist/super-editor/chunks/{editor-CH3sE8Fq.js → editor-DlzGbfD-.js} +45 -3
  17. package/dist/super-editor/chunks/{toolbar-BHnLBr61.js → toolbar-DeKOVf4h.js} +2 -2
  18. package/dist/super-editor/converter.es.js +1 -1
  19. package/dist/super-editor/docx-zipper.es.js +2 -2
  20. package/dist/super-editor/editor.es.js +3 -3
  21. package/dist/super-editor/file-zipper.es.js +1 -1
  22. package/dist/super-editor/src/core/Editor.d.ts +3 -3
  23. package/dist/super-editor/src/core/super-converter/exporter.d.ts +0 -7
  24. package/dist/super-editor/src/core/super-converter/v2/importer/tableImporter.d.ts +0 -22
  25. package/dist/super-editor/src/core/super-converter/v3/handlers/utils.d.ts +37 -0
  26. package/dist/super-editor/src/core/super-converter/v3/handlers/w/cantSplit/cantSplit-translator.d.ts +6 -0
  27. package/dist/super-editor/src/core/super-converter/v3/handlers/w/cantSplit/index.d.ts +1 -0
  28. package/dist/super-editor/src/core/super-converter/v3/handlers/w/cnfStyle/cnfStyle-translator.d.ts +7 -0
  29. package/dist/super-editor/src/core/super-converter/v3/handlers/w/cnfStyle/index.d.ts +1 -0
  30. package/dist/super-editor/src/core/super-converter/v3/handlers/w/divId/divId-translator.d.ts +6 -0
  31. package/dist/super-editor/src/core/super-converter/v3/handlers/w/divId/index.d.ts +1 -0
  32. package/dist/super-editor/src/core/super-converter/v3/handlers/w/gridAfter/gridAfter-translator.d.ts +6 -0
  33. package/dist/super-editor/src/core/super-converter/v3/handlers/w/gridAfter/index.d.ts +1 -0
  34. package/dist/super-editor/src/core/super-converter/v3/handlers/w/gridBefore/gridBefore-translator.d.ts +6 -0
  35. package/dist/super-editor/src/core/super-converter/v3/handlers/w/gridBefore/index.d.ts +1 -0
  36. package/dist/super-editor/src/core/super-converter/v3/handlers/w/hidden/hidden-translator.d.ts +6 -0
  37. package/dist/super-editor/src/core/super-converter/v3/handlers/w/hidden/index.d.ts +1 -0
  38. package/dist/super-editor/src/core/super-converter/v3/handlers/w/jc/index.d.ts +1 -0
  39. package/dist/super-editor/src/core/super-converter/v3/handlers/w/jc/jc-translator.d.ts +6 -0
  40. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblCellSpacing/index.d.ts +1 -0
  41. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblCellSpacing/tblCellSpacing-translator.d.ts +6 -0
  42. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblHeader/index.d.ts +1 -0
  43. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tblHeader/tblHeader-translator.d.ts +6 -0
  44. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tr/index.d.ts +1 -0
  45. package/dist/super-editor/src/core/super-converter/v3/handlers/w/tr/tr-translator.d.ts +7 -0
  46. package/dist/super-editor/src/core/super-converter/v3/handlers/w/trHeight/index.d.ts +1 -0
  47. package/dist/super-editor/src/core/super-converter/v3/handlers/w/trHeight/trHeight-translator.d.ts +6 -0
  48. package/dist/super-editor/src/core/super-converter/v3/handlers/w/trPr/index.d.ts +1 -0
  49. package/dist/super-editor/src/core/super-converter/v3/handlers/w/trPr/trPr-translator.d.ts +5 -0
  50. package/dist/super-editor/src/core/super-converter/v3/handlers/w/wAfter/index.d.ts +1 -0
  51. package/dist/super-editor/src/core/super-converter/v3/handlers/w/wAfter/wAfter-translator.d.ts +6 -0
  52. package/dist/super-editor/src/core/super-converter/v3/handlers/w/wBefore/index.d.ts +1 -0
  53. package/dist/super-editor/src/core/super-converter/v3/handlers/w/wBefore/wBefore-translator.d.ts +6 -0
  54. package/dist/super-editor/src/core/super-converter/v3/node-translator/node-translator.d.ts +2 -1
  55. package/dist/super-editor/src/extensions/table-row/table-row.d.ts +149 -0
  56. package/dist/super-editor/style.css +6 -6
  57. package/dist/super-editor/super-editor.es.js +8 -8
  58. package/dist/super-editor/toolbar.es.js +2 -2
  59. package/dist/super-editor.cjs +1 -1
  60. package/dist/super-editor.es.js +1 -1
  61. package/dist/superdoc.cjs +2 -2
  62. package/dist/superdoc.es.js +2 -2
  63. package/dist/superdoc.umd.js +608 -213
  64. package/dist/superdoc.umd.js.map +1 -1
  65. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { p as process$1, aw as commonjsGlobal, B as Buffer, ax as getDefaultExportFromCjs, ay as getContentTypesFromXml, az as xmljs } from "./converter-CMajoq-M.js";
1
+ import { p as process$1, aw as commonjsGlobal, B as Buffer, ax as getDefaultExportFromCjs, ay as getContentTypesFromXml, az as xmljs } from "./converter-CrJvpQ8J.js";
2
2
  function commonjsRequire(path) {
3
3
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _ListItemNodeView_instances, init_fn2, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _DocumentSectionView_instances, init_fn3, addToolTip_fn;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as InputRule, ah as kebabCase, ai as findParentNodeClosestToPos, aj as getListItemStyleDefinitions, ak as docxNumberigHelpers, al as parseIndentElement, am as combineIndents, an as StepMap, ao as getColStyleDeclaration, ap as SelectionRange, aq as Transform, ar as isInTable$1, as as createColGroup, at as generateDocxRandomId, au as insertNewRelationship, av as htmlHandler } from "./converter-CMajoq-M.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as InputRule, ah as kebabCase, ai as findParentNodeClosestToPos, aj as getListItemStyleDefinitions, ak as docxNumberigHelpers, al as parseIndentElement, am as combineIndents, an as StepMap, ao as getColStyleDeclaration, ap as SelectionRange, aq as Transform, ar as isInTable$1, as as createColGroup, at as generateDocxRandomId, au as insertNewRelationship, av as htmlHandler } from "./converter-CrJvpQ8J.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-C5rg6GNf.js";
17
+ import { D as DocxZipper } from "./docx-zipper-CHHaFCfj.js";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
20
20
  };
@@ -22342,7 +22342,49 @@ const TableRow = Node$1.create({
22342
22342
  if (!cantSplit) return {};
22343
22343
  return { "data-cant-split": "true" };
22344
22344
  }
22345
- }
22345
+ },
22346
+ /**
22347
+ * @category Attribute
22348
+ * @param {TableRowProperties} [tableRowProperties] - Properties for the table row.
22349
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 377-482
22350
+ */
22351
+ tableRowProperties: { rendered: false },
22352
+ /**
22353
+ * @category Attribute
22354
+ * @param {string} [rsidDel] - Unique identifier used to track the editing session when the row was deleted from the main document.
22355
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 472
22356
+ */
22357
+ rsidDel: { rendered: false },
22358
+ /**
22359
+ * @category Attribute
22360
+ * @param {string} [rsidR] - Unique identifier used to track the editing session when the table row was added to the main document.
22361
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 472
22362
+ */
22363
+ rsidR: { rendered: false },
22364
+ /**
22365
+ * @category Attribute
22366
+ * @param {string} [rsidRPr] - Unique identifier used to track the editing session when the glyph character representing the table row mark was last modified in the main document.
22367
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 473
22368
+ */
22369
+ rsidRPr: { rendered: false },
22370
+ /**
22371
+ * @category Attribute
22372
+ * @param {string} [rsidTr] - Unique identifier used to track the editing session when the table row's properties were last modified in this document.
22373
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 473
22374
+ */
22375
+ rsidTr: { rendered: false },
22376
+ /**
22377
+ * @category Attribute
22378
+ * @param {string} [paraId] - A randomly generated unique identifier for the table row.
22379
+ * @see {@link https://learn.microsoft.com/en-us/openspecs/office_standards/ms-docx/a0e7d2e2-2246-44c6-96e8-1cf009823615}
22380
+ */
22381
+ paraId: { rendered: false },
22382
+ /**
22383
+ * @category Attribute
22384
+ * @param {string} [textId] - A randomly generated unique identifier for the text of the table row.
22385
+ * @see {@link https://learn.microsoft.com/en-us/openspecs/office_standards/ms-docx/b7eeddec-7c50-47fb-88b6-1feec3ed832c}
22386
+ */
22387
+ textId: { rendered: false }
22346
22388
  };
22347
22389
  },
22348
22390
  parseDOM() {
@@ -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-CMajoq-M.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CH3sE8Fq.js";
2
+ import { p as process$1 } from "./converter-CrJvpQ8J.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-DlzGbfD-.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { a5 } from "./chunks/converter-CMajoq-M.js";
1
+ import { a5 } from "./chunks/converter-CrJvpQ8J.js";
2
2
  import "vue";
3
3
  export {
4
4
  a5 as SuperConverter
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-CMajoq-M.js";
2
- import { D } from "./chunks/docx-zipper-C5rg6GNf.js";
1
+ import "./chunks/converter-CrJvpQ8J.js";
2
+ import { D } from "./chunks/docx-zipper-CHHaFCfj.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-CH3sE8Fq.js";
2
- import "./chunks/converter-CMajoq-M.js";
3
- import "./chunks/docx-zipper-C5rg6GNf.js";
1
+ import { E } from "./chunks/editor-DlzGbfD-.js";
2
+ import "./chunks/converter-CrJvpQ8J.js";
3
+ import "./chunks/docx-zipper-CHHaFCfj.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-C5rg6GNf.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-CHHaFCfj.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -45,7 +45,7 @@
45
45
  * @property {string} [role='editor'] - User role ('editor', 'viewer', 'suggester')
46
46
  * @property {Array} [colors=[]] - Available colors
47
47
  * @property {Object} [converter] - Document converter
48
- * @property {Object} [fileSource] - Source of the file
48
+ * @property {File|Blob|Buffer} [fileSource] - Source of the file (File/Blob in browser, Buffer in Node.js)
49
49
  * @property {Object} [initialState] - Initial editor state
50
50
  * @property {string} [documentId] - Unique document identifier
51
51
  * @property {Array} [extensions=[]] - Editor extensions
@@ -647,9 +647,9 @@ export type EditorOptions = {
647
647
  */
648
648
  converter?: any;
649
649
  /**
650
- * - Source of the file
650
+ * - Source of the file (File/Blob in browser, Buffer in Node.js)
651
651
  */
652
- fileSource?: any;
652
+ fileSource?: File | Blob | Buffer;
653
653
  /**
654
654
  * - Initial editor state
655
655
  */
@@ -61,13 +61,6 @@ export function generateRunProps(marks?: any[]): {
61
61
  * @returns
62
62
  */
63
63
  export function processOutputMarks(marks?: MarkType[]): any[];
64
- /**
65
- * Main translation function for a table row
66
- *
67
- * @param {ExportParams} params
68
- * @returns {XmlReadyNode} The translated table row node
69
- */
70
- export function translateTableRow(params: ExportParams): XmlReadyNode;
71
64
  export function translateHardBreak(params: any): {
72
65
  name: string;
73
66
  elements: {
@@ -15,15 +15,6 @@ export function handleTableNode(node: XmlNode, params: any): {
15
15
  tableWidthType: any;
16
16
  };
17
17
  };
18
- /**
19
- * @param {Object} options
20
- * @returns {{type: string, content: (*|*[]), attrs: {}}}
21
- */
22
- export function handleTableCellNode({ params, node, table, row, rowBorders, styleTag, columnIndex, columnWidth, }: any): {
23
- type: string;
24
- content: (any | any[]);
25
- attrs: {};
26
- };
27
18
  /**
28
19
  *
29
20
  * @param tblStyleTag
@@ -38,19 +29,6 @@ export function getReferencedTableStyles(tblStyleTag: any, docx: ParsedDocx): {
38
29
  rowBorders: {};
39
30
  basedOn: any;
40
31
  } | null;
41
- /**
42
- * Process a table row node
43
- * @param node
44
- * @param {undefined | null | {insideH?: *, insideV?: *}} rowBorders
45
- * @param {ParsedDocx} docx
46
- * @param {NodeListHandler} nodeListHandler
47
- * @param {boolean} insideTrackChange
48
- * @returns {*}
49
- */
50
- export function handleTableRowNode(node: any, table: any, rowBorders: undefined | null | {
51
- insideH?: any;
52
- insideV?: any;
53
- }, styleTag: any, params: any): any;
54
32
  /**
55
33
  * @type {import("docxImporter").NodeHandler}
56
34
  */
@@ -1 +1,38 @@
1
+ /**
2
+ * Helper to create simple property handlers with one-to-one mapping for properties with a single attribute (eg: 'w:val')
3
+ * @param {string} xmlName The XML attribute name (with namespace).
4
+ * @param {string|null} sdName The SuperDoc attribute name (without namespace). If null, it will be derived from xmlName.
5
+ * @param {string} [attrName='w:val'] The specific attribute name to map to/from. Default is 'w:val'.
6
+ * @param {function} [transformEncode=(v) => v] Optional transformation function to apply during encoding.
7
+ * @param {function} [transformDecode=(v) => v] Optional transformation function to apply during decoding.
8
+ * @returns {import('@translator').NodeTranslatorConfig} The attribute handler config with xmlName, sdName, encode, and decode functions.
9
+ */
10
+ export function createSingleAttrPropertyHandler(xmlName: string, sdName?: string | null, attrName?: string, transformEncode?: Function, transformDecode?: Function): import("@translator").NodeTranslatorConfig;
11
+ /**
12
+ * Helper to create property handlers for measurement attributes (w:w and w:type)
13
+ * @param {string} xmlName The XML attribute name (with namespace).
14
+ * @param {string|null} sdName The SuperDoc attribute name (without namespace). If null, it will be derived from xmlName.
15
+ * @returns {import('@translator').NodeTranslatorConfig} The attribute handler config with xmlName, sdName, encode, and decode functions.
16
+ */
17
+ export function createMeasurementPropertyHandler(xmlName: string, sdName?: string | null): import("@translator").NodeTranslatorConfig;
18
+ /**
19
+ * Encodes properties of a node using provided translators and adds them to the attributes object.
20
+ * @param {object} [node] The node containing elements to be encoded.
21
+ * @param {object} [translatorsByXmlName] A mapping of XML names to their corresponding translators.
22
+ * @param {boolean} [asArray=false] If true, encodes attributes as an array of objects; otherwise, as a single object.
23
+ * @returns {object|Array} The encoded attributes as an object or array based on the asArray flag.
24
+ */
25
+ export function encodeProperties(node?: object, translatorsByXmlName?: object, asArray?: boolean): object | any[];
26
+ /** Decodes properties from a given properties object using provided translators and adds them to the elements array.
27
+ * @param {object} [node] The node being processed.
28
+ * @param {object} [translatorsBySdName] A mapping of SuperDoc names to their corresponding translators.
29
+ * @param {object} [properties] The properties object containing attributes to be decoded.
30
+ * @returns {Array} An array of decoded elements.
31
+ */
32
+ export function decodeProperties(translatorsBySdName?: object, properties?: object): any[];
1
33
  export function generateV2HandlerEntity(handlerName: string, translator: import("../node-translator/").NodeTranslator): import("../../v2/importer/docxImporter").NodeHandlerEntry;
34
+ export function createAttributeHandler(xmlName?: string, sdName?: string | null, transformEncode?: any, transformDecode?: any): import("@translator").AttrConfig;
35
+ export function parseBoolean(value: string): boolean;
36
+ export function booleanToString(value: boolean): string;
37
+ export function parseInteger(value: any): number | undefined;
38
+ export function integerToString(value: any): string | undefined;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the cantSplit element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 377
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./cantSplit-translator.js";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The NodeTranslator instance for the cnfStyle element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 379
5
+ *
6
+ */
7
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./cnfStyle-translator.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the divId element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 391
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./divId-translator.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the gridAfter element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 395
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./gridAfter-translator.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the gridBefore element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 396
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./gridBefore-translator.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the hidden element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 405
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./hidden-translator.js";
@@ -0,0 +1 @@
1
+ export * from "./jc-translator.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the jc element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 411
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./tblCellSpacing-translator.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the tblCellSpacing element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 427
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./tblHeader-translator.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the tblHeader element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 433
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./tr-translator";
@@ -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 "./trHeight-translator.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the trHeight element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 474
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./trPr-translator.js";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The NodeTranslator instance for the w:trPr element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ */
5
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./wAfter-translator.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the wAfter element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 481
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -0,0 +1 @@
1
+ export * from "./wBefore-translator.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The NodeTranslator instance for the wBefore element.
3
+ * @type {import('@translator').NodeTranslator}
4
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 482
5
+ */
6
+ export const translator: import("@translator").NodeTranslator;
@@ -22,7 +22,7 @@ export const TranslatorTypes: Readonly<{
22
22
  /** @typedef {import('../../v2/importer/types').NodeHandlerParams} SCEncoderConfig */
23
23
  /** @typedef {import('../../v2/types').SuperDocNode} SCEncoderResult */
24
24
  /** @typedef {{ node: { attrs?: any, marks?: any[], type: string }, children?: any[], relationships?: any[] }} SCDecoderConfig */
25
- /** @typedef {{ name: string, elements: any[] }} SCDecoderResult */
25
+ /** @typedef {{ name: string, attributes?: any, elements: any[] }} SCDecoderResult */
26
26
  /**
27
27
  * @callback NodeTranslatorEncodeFn
28
28
  * @param {SCEncoderConfig} params
@@ -156,6 +156,7 @@ export type SCDecoderConfig = {
156
156
  };
157
157
  export type SCDecoderResult = {
158
158
  name: string;
159
+ attributes?: any;
159
160
  elements: any[];
160
161
  };
161
162
  export type NodeTranslatorEncodeFn = (params: SCEncoderConfig, encodedAttrs?: EncodedAttributes) => import("../../v2/types").SuperDocNode;
@@ -1,7 +1,156 @@
1
+ /**
2
+ * @typedef {Object} CnfStyle
3
+ * @property {boolean} [evenHBand] Specifies that the object has inherited the conditional properties applied to the even numbered horizontal bands of the parent object.
4
+ * @property {boolean} [evenVBand] Specifies that the object has inherited the conditional properties applied to the even numbered vertical bands of the parent object.
5
+ * @property {boolean} [firstColumn] Specifies that the object has inherited the conditional properties applied to the first column of the parent object.
6
+ * @property {boolean} [firstRow] Specifies that the object has inherited the conditional properties applied to the first row of the parent object.
7
+ * @property {boolean} [firstRowFirstColumn] Specifies that the object has inherited the conditional properties applied to the cell that is in the first row and first column of the parent object.
8
+ * @property {boolean} [firstRowLastColumn] Specifies that the object has inherited the conditional properties applied to the cell that is in the first row and last column of the parent object.
9
+ * @property {boolean} [lastColumn] Specifies that the object has inherited the conditional properties
10
+ * applied to the last column of the parent object.
11
+ * @property {boolean} [lastRow] Specifies that the object has inherited the conditional properties
12
+ * applied to the last row of the parent object.
13
+ * @property {boolean} [lastRowFirstColumn] Specifies that the object has inherited the conditional properties applied to the cell that is in the last row and first column of the parent object.
14
+ * @property {boolean} [lastRowLastColumn] Specifies that the object has inherited the conditional properties applied to the cell that is in the last row and last column of the parent object.
15
+ * @property {boolean} [oddHBand] Specifies that the object has inherited the conditional properties applied to the odd numbered horizontal bands of the parent object.
16
+ * @property {boolean} [oddVBand] Specifies that the object has inherited the conditional properties applied to the odd numbered vertical bands of the parent object.
17
+ */
18
+ /**
19
+ * @typedef {Object} TableRowProperties
20
+ * @property {boolean} [cantSplit] Indicates that this row should not be split across pages when paginating/exporting.
21
+ * @property {CnfStyle} [cnfStyle] - Specifies the set of conditional table style formatting properties which have been applied to this row
22
+ * @property {string} [divId] - Specifies the HTML div information which is associated with this row.
23
+ * @property {number} [gridAfter] - Specifies the number of grid columns to be that should be left empty after the last cell in this row.
24
+ * @property {number} [gridBefore] - Specifies the number of grid columns that should be skipped before the first cell in this row.
25
+ * @property {boolean} [hidden] - Specifies that the glyph representing the end character of current table row shall not be displayed in the current document.
26
+ * @property {"center" | "end" | "left" | "right" | "start"} [jc] - Specifies the overall justification of the contents of this row.
27
+ * @property {Object} [tblCellSpacing] - Specifies the amount of spacing that shall be applied between the cells in this row.
28
+ * @property {number} [tblCellSpacing.value] - The size of the spacing in twenieths of a point (1/1440 of an inch).
29
+ * @property {"auto" | "dxa" | "nil" | "pct"} [tblCellSpacing.type] - The type of spacing.
30
+ * @property {boolean} [repeatHeader] - Specifies that this row is to be repeated as a header row at the top of each page on which the table is displayed.
31
+ * @property {"atLeast" | "exact" | "auto"} [rowHeight.rule] - The rule for the row height.
32
+ * @property {Object} [wAfter] - Specifies the preferred width for the total number of grid columns after this table row.
33
+ * @property {number} [wAfter.value] - The width in twenieths of a point (1/1440 of an inch).
34
+ * @property {"auto" | "dxa" | "nil" | "pct"} [wAfter.type] - The type of width.
35
+ * @property {Object} [wBefore] - Specifies the preferred width for the total number of grid columns before this table row.
36
+ * @property {number} [wBefore.value] - The width in twenieths of a point (1/1440 of an inch).
37
+ * @property {"auto" | "dxa" | "nil" | "pct"} [wBefore.type] - The type of width.
38
+ */
1
39
  /**
2
40
  * @module TableRow
3
41
  * @sidebarTitle Table Row
4
42
  * @snippetPath /snippets/extensions/table-row.mdx
5
43
  */
6
44
  export const TableRow: Node;
45
+ export type CnfStyle = {
46
+ /**
47
+ * Specifies that the object has inherited the conditional properties applied to the even numbered horizontal bands of the parent object.
48
+ */
49
+ evenHBand?: boolean;
50
+ /**
51
+ * Specifies that the object has inherited the conditional properties applied to the even numbered vertical bands of the parent object.
52
+ */
53
+ evenVBand?: boolean;
54
+ /**
55
+ * Specifies that the object has inherited the conditional properties applied to the first column of the parent object.
56
+ */
57
+ firstColumn?: boolean;
58
+ /**
59
+ * Specifies that the object has inherited the conditional properties applied to the first row of the parent object.
60
+ */
61
+ firstRow?: boolean;
62
+ /**
63
+ * Specifies that the object has inherited the conditional properties applied to the cell that is in the first row and first column of the parent object.
64
+ */
65
+ firstRowFirstColumn?: boolean;
66
+ /**
67
+ * Specifies that the object has inherited the conditional properties applied to the cell that is in the first row and last column of the parent object.
68
+ */
69
+ firstRowLastColumn?: boolean;
70
+ /**
71
+ * Specifies that the object has inherited the conditional properties
72
+ * applied to the last column of the parent object.
73
+ */
74
+ lastColumn?: boolean;
75
+ /**
76
+ * Specifies that the object has inherited the conditional properties
77
+ * applied to the last row of the parent object.
78
+ */
79
+ lastRow?: boolean;
80
+ /**
81
+ * Specifies that the object has inherited the conditional properties applied to the cell that is in the last row and first column of the parent object.
82
+ */
83
+ lastRowFirstColumn?: boolean;
84
+ /**
85
+ * Specifies that the object has inherited the conditional properties applied to the cell that is in the last row and last column of the parent object.
86
+ */
87
+ lastRowLastColumn?: boolean;
88
+ /**
89
+ * Specifies that the object has inherited the conditional properties applied to the odd numbered horizontal bands of the parent object.
90
+ */
91
+ oddHBand?: boolean;
92
+ /**
93
+ * Specifies that the object has inherited the conditional properties applied to the odd numbered vertical bands of the parent object.
94
+ */
95
+ oddVBand?: boolean;
96
+ };
97
+ export type TableRowProperties = {
98
+ /**
99
+ * Indicates that this row should not be split across pages when paginating/exporting.
100
+ */
101
+ cantSplit?: boolean;
102
+ /**
103
+ * - Specifies the set of conditional table style formatting properties which have been applied to this row
104
+ */
105
+ cnfStyle?: CnfStyle;
106
+ /**
107
+ * - Specifies the HTML div information which is associated with this row.
108
+ */
109
+ divId?: string;
110
+ /**
111
+ * - Specifies the number of grid columns to be that should be left empty after the last cell in this row.
112
+ */
113
+ gridAfter?: number;
114
+ /**
115
+ * - Specifies the number of grid columns that should be skipped before the first cell in this row.
116
+ */
117
+ gridBefore?: number;
118
+ /**
119
+ * - Specifies that the glyph representing the end character of current table row shall not be displayed in the current document.
120
+ */
121
+ hidden?: boolean;
122
+ /**
123
+ * - Specifies the overall justification of the contents of this row.
124
+ */
125
+ jc?: "center" | "end" | "left" | "right" | "start";
126
+ /**
127
+ * - Specifies the amount of spacing that shall be applied between the cells in this row.
128
+ */
129
+ tblCellSpacing?: {
130
+ value?: number;
131
+ type?: "auto" | "dxa" | "nil" | "pct";
132
+ };
133
+ /**
134
+ * - Specifies that this row is to be repeated as a header row at the top of each page on which the table is displayed.
135
+ */
136
+ repeatHeader?: boolean;
137
+ /**
138
+ * - The rule for the row height.
139
+ */
140
+ rule?: "atLeast" | "exact" | "auto";
141
+ /**
142
+ * - Specifies the preferred width for the total number of grid columns after this table row.
143
+ */
144
+ wAfter?: {
145
+ value?: number;
146
+ type?: "auto" | "dxa" | "nil" | "pct";
147
+ };
148
+ /**
149
+ * - Specifies the preferred width for the total number of grid columns before this table row.
150
+ */
151
+ wBefore?: {
152
+ value?: number;
153
+ type?: "auto" | "dxa" | "nil" | "pct";
154
+ };
155
+ };
7
156
  import { Node } from '@core/index.js';
@@ -1798,10 +1798,10 @@ on the right if it is inside shape textbox.
1798
1798
  min-height: 40px;
1799
1799
  }
1800
1800
 
1801
- .editor-element[data-v-dc9f9cb3] {
1801
+ .editor-element[data-v-8b2f8c17] {
1802
1802
  position: relative;
1803
1803
  }
1804
- .super-editor-container[data-v-dc9f9cb3] {
1804
+ .super-editor-container[data-v-8b2f8c17] {
1805
1805
  width: auto;
1806
1806
  height: auto;
1807
1807
  min-width: 8in;
@@ -1810,13 +1810,13 @@ on the right if it is inside shape textbox.
1810
1810
  display: flex;
1811
1811
  flex-direction: column;
1812
1812
  }
1813
- .ruler[data-v-dc9f9cb3] {
1813
+ .ruler[data-v-8b2f8c17] {
1814
1814
  margin-bottom: 2px;
1815
1815
  }
1816
- .super-editor[data-v-dc9f9cb3] {
1816
+ .super-editor[data-v-8b2f8c17] {
1817
1817
  color: initial;
1818
1818
  }
1819
- .placeholder-editor[data-v-dc9f9cb3] {
1819
+ .placeholder-editor[data-v-8b2f8c17] {
1820
1820
  position: absolute;
1821
1821
  top: 0;
1822
1822
  left: 0;
@@ -1828,7 +1828,7 @@ on the right if it is inside shape textbox.
1828
1828
  background-color: white;
1829
1829
  box-sizing: border-box;
1830
1830
  }
1831
- .placeholder-title[data-v-dc9f9cb3] {
1831
+ .placeholder-title[data-v-8b2f8c17] {
1832
1832
  display: flex;
1833
1833
  justify-content: center;
1834
1834
  margin-bottom: 40px;