@harbour-enterprises/superdoc 0.23.0-next.25 → 0.23.0-next.26

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 (29) hide show
  1. package/dist/chunks/{PdfViewer-CYMwWMP6.cjs → PdfViewer-Ba9s5reX.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-D5j64OT4.es.js → PdfViewer-D_3AuXzb.es.js} +1 -1
  3. package/dist/chunks/{index-CIz8zQ3h.cjs → index-A1XH4hzI.cjs} +2 -2
  4. package/dist/chunks/{index-ePxDRT3A.es.js → index-CZ9iIRr8.es.js} +2 -2
  5. package/dist/chunks/{super-editor.es-BhyobyII.es.js → super-editor.es-CcuilWh0.es.js} +120 -24
  6. package/dist/chunks/{super-editor.es-DZWnc89F.cjs → super-editor.es-DhxK40cW.cjs} +120 -24
  7. package/dist/super-editor/ai-writer.es.js +2 -2
  8. package/dist/super-editor/chunks/{converter-CL8NqbzP.js → converter-B2Y-pDXk.js} +120 -24
  9. package/dist/super-editor/chunks/{docx-zipper-Ab__pf6Y.js → docx-zipper-bhLh8OB6.js} +1 -1
  10. package/dist/super-editor/chunks/{editor-DDXA7n3I.js → editor-GN9xFFdh.js} +2 -2
  11. package/dist/super-editor/chunks/{toolbar-BkZURoPS.js → toolbar-UX3FTiEj.js} +2 -2
  12. package/dist/super-editor/converter.es.js +1 -1
  13. package/dist/super-editor/docx-zipper.es.js +2 -2
  14. package/dist/super-editor/editor.es.js +3 -3
  15. package/dist/super-editor/file-zipper.es.js +1 -1
  16. package/dist/super-editor/super-editor/src/core/super-converter/field-references/fld-preprocessors/num-pages-preprocessor.d.ts +1 -3
  17. package/dist/super-editor/super-editor/src/core/super-converter/field-references/fld-preprocessors/page-preprocessor.d.ts +1 -3
  18. package/dist/super-editor/super-editor/src/core/super-converter/field-references/fld-preprocessors/page-ref-preprocessor.d.ts +1 -2
  19. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pict/helpers/handle-shape-textbox-import.d.ts +1 -1
  20. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/pict/helpers/handle-v-rect-import.d.ts +1 -1
  21. package/dist/super-editor/super-editor.es.js +6 -6
  22. package/dist/super-editor/toolbar.es.js +2 -2
  23. package/dist/super-editor.cjs +1 -1
  24. package/dist/super-editor.es.js +1 -1
  25. package/dist/superdoc.cjs +2 -2
  26. package/dist/superdoc.es.js +2 -2
  27. package/dist/superdoc.umd.js +120 -24
  28. package/dist/superdoc.umd.js.map +1 -1
  29. package/package.json +1 -1
@@ -28078,9 +28078,10 @@ function handleAnnotationNode(params) {
28078
28078
  const tagValue = tag?.attributes["w:val"];
28079
28079
  const shouldProcessAsJson = tagValue?.startsWith("{") && tagValue?.endsWith("}");
28080
28080
  let attrs = {};
28081
+ const aliasLabel = getSafeString(alias?.attributes?.["w:val"]);
28081
28082
  if (shouldProcessAsJson) {
28082
28083
  const parsedAttrs = parseTagValueJSON(tagValue);
28083
- const attrsFromJSON = {
28084
+ attrs = {
28084
28085
  type: parsedAttrs.fieldTypeShort,
28085
28086
  fieldId: parsedAttrs.fieldId,
28086
28087
  displayLabel: parsedAttrs.displayLabel,
@@ -28094,10 +28095,27 @@ function handleAnnotationNode(params) {
28094
28095
  textHighlight: parsedAttrs.fieldTextHighlight,
28095
28096
  hash: parsedAttrs.hash
28096
28097
  };
28097
- attrs = attrsFromJSON;
28098
28098
  } else {
28099
- const attrsFromElements = getAttrsFromElements({ sdtPr, tag, alias, sdtId });
28100
- attrs = attrsFromElements;
28099
+ attrs = getAttrsFromElements({ sdtPr, tag, alias, sdtId });
28100
+ }
28101
+ const initialDisplayLabel = getSafeString(attrs.displayLabel);
28102
+ const extractedContent = getTextFromSdtContent(sdtContent);
28103
+ if (!attrs.defaultDisplayLabel) {
28104
+ if (initialDisplayLabel) {
28105
+ attrs.defaultDisplayLabel = initialDisplayLabel;
28106
+ } else if (aliasLabel) {
28107
+ attrs.defaultDisplayLabel = aliasLabel;
28108
+ }
28109
+ }
28110
+ const placeholderLabel = getPlaceholderLabel(attrs, aliasLabel);
28111
+ const placeholderText = ensurePlaceholderFormat(placeholderLabel);
28112
+ const isAnnotationsEnabled = Boolean(params.editor?.options?.annotations);
28113
+ const contentIsDistinct = shouldUseSdtContent(extractedContent, placeholderText);
28114
+ const shouldUseContent = !isAnnotationsEnabled && contentIsDistinct && (hasMoustache(extractedContent) || !placeholderText);
28115
+ if (contentIsDistinct) {
28116
+ attrs.displayLabel = extractedContent;
28117
+ } else if (!attrs.displayLabel && placeholderLabel) {
28118
+ attrs.displayLabel = placeholderLabel;
28101
28119
  }
28102
28120
  const { attrs: marksAsAttrs, marks } = parseAnnotationMarks(sdtContent);
28103
28121
  const allAttrs = { ...attrs, ...marksAsAttrs };
@@ -28105,13 +28123,14 @@ function handleAnnotationNode(params) {
28105
28123
  if (!attrs.fieldId || !attrs.type) {
28106
28124
  return null;
28107
28125
  }
28126
+ const textContent = shouldUseContent ? extractedContent : placeholderText;
28108
28127
  let result = {
28109
28128
  type: "text",
28110
- text: `{{${attrs.displayLabel}}}`,
28129
+ text: textContent,
28111
28130
  attrs: allAttrs,
28112
28131
  marks
28113
28132
  };
28114
- if (params.editor.options.annotations) {
28133
+ if (isAnnotationsEnabled) {
28115
28134
  result = {
28116
28135
  type: "fieldAnnotation",
28117
28136
  attrs: allAttrs
@@ -28172,6 +28191,84 @@ function getAttrsFromElements({ sdtPr, tag, alias, sdtId }) {
28172
28191
  };
28173
28192
  return attrs;
28174
28193
  }
28194
+ function getTextFromSdtContent(sdtContent) {
28195
+ if (!sdtContent?.elements?.length) return "";
28196
+ const chunks = [];
28197
+ collectTextChunks(sdtContent.elements, chunks);
28198
+ if (chunks.length && chunks[chunks.length - 1] === "\n") {
28199
+ chunks.pop();
28200
+ }
28201
+ const text = chunks.join("");
28202
+ return text.replace(/\u00a0/g, " ");
28203
+ }
28204
+ function getPlaceholderLabel(attrs, aliasValue) {
28205
+ const displayLabel = trimSafeString(attrs.displayLabel);
28206
+ if (displayLabel) return displayLabel;
28207
+ const defaultLabel = trimSafeString(attrs.defaultDisplayLabel);
28208
+ if (defaultLabel) return defaultLabel;
28209
+ return trimSafeString(aliasValue);
28210
+ }
28211
+ function shouldUseSdtContent(extractedContent, placeholderText) {
28212
+ const normalizedContent = normalizePlaceholderText(extractedContent);
28213
+ if (!normalizedContent) return false;
28214
+ const normalizedPlaceholder = normalizePlaceholderText(placeholderText);
28215
+ return normalizedContent !== normalizedPlaceholder;
28216
+ }
28217
+ function ensurePlaceholderFormat(label) {
28218
+ const trimmed = trimSafeString(label);
28219
+ if (!trimmed) return "";
28220
+ if (trimmed.startsWith("{{") && trimmed.endsWith("}}")) {
28221
+ return trimmed;
28222
+ }
28223
+ return `{{${trimmed}}}`;
28224
+ }
28225
+ function normalizePlaceholderText(value = "") {
28226
+ const trimmed = trimSafeString(value);
28227
+ if (!trimmed) return "";
28228
+ return stripPlaceholderBraces(trimmed).toLowerCase();
28229
+ }
28230
+ function stripPlaceholderBraces(value = "") {
28231
+ if (value.startsWith("{{") && value.endsWith("}}")) {
28232
+ return trimSafeString(value.slice(2, -2));
28233
+ }
28234
+ return value;
28235
+ }
28236
+ function hasMoustache(value = "") {
28237
+ return /\{\{\s*.+?\s*\}\}/.test(getSafeString(value));
28238
+ }
28239
+ function collectTextChunks(elements, chunks) {
28240
+ if (!elements) return;
28241
+ elements.forEach((element) => {
28242
+ if (!element) return;
28243
+ if (element.type === "text") {
28244
+ chunks.push(element.text || "");
28245
+ return;
28246
+ }
28247
+ if (element.name === "w:tab") {
28248
+ chunks.push(" ");
28249
+ return;
28250
+ }
28251
+ if (element.name === "w:br") {
28252
+ chunks.push("\n");
28253
+ return;
28254
+ }
28255
+ const isParagraph = element.name === "w:p";
28256
+ const initialLength = chunks.length;
28257
+ if (element.elements?.length) {
28258
+ collectTextChunks(element.elements, chunks);
28259
+ }
28260
+ if (isParagraph && chunks.length > initialLength) {
28261
+ chunks.push("\n");
28262
+ }
28263
+ });
28264
+ }
28265
+ function getSafeString(value) {
28266
+ if (typeof value !== "string") return "";
28267
+ return value;
28268
+ }
28269
+ function trimSafeString(value) {
28270
+ return getSafeString(value).replace(/\u00a0/g, " ").trim();
28271
+ }
28175
28272
  function handleDocPartObj(params) {
28176
28273
  const { nodes } = params;
28177
28274
  if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
@@ -30831,7 +30928,7 @@ const attrConfig = Object.freeze({
30831
30928
  });
30832
30929
  const XML_NODE_NAME$4 = "w:commentRange";
30833
30930
  const SD_NODE_NAME$4 = "commentRange";
30834
- const decode$4 = (params, decodedAttrs) => {
30931
+ const decode$4 = (params) => {
30835
30932
  const { node, comments, commentsExportType, exportedCommentDefs } = params;
30836
30933
  if (!node) return;
30837
30934
  if (!comments) return;
@@ -30886,7 +30983,7 @@ const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
30886
30983
  const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
30887
30984
  const XML_NODE_NAME$3 = "sd:pageReference";
30888
30985
  const SD_NODE_NAME$3 = "pageReference";
30889
- const encode$3 = (params, _2) => {
30986
+ const encode$3 = (params) => {
30890
30987
  const { nodes = [], nodeListHandler } = params || {};
30891
30988
  const node = nodes[0];
30892
30989
  const processedText = nodeListHandler.handler({
@@ -30903,7 +31000,7 @@ const encode$3 = (params, _2) => {
30903
31000
  };
30904
31001
  return processedNode;
30905
31002
  };
30906
- const decode$3 = (params, _2) => {
31003
+ const decode$3 = (params) => {
30907
31004
  const { node } = params;
30908
31005
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
30909
31006
  const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params, node: n }));
@@ -30986,7 +31083,7 @@ const config$3 = {
30986
31083
  const translator$3 = NodeTranslator.from(config$3);
30987
31084
  const XML_NODE_NAME$2 = "sd:tableOfContents";
30988
31085
  const SD_NODE_NAME$2 = "tableOfContents";
30989
- const encode$2 = (params, _2) => {
31086
+ const encode$2 = (params) => {
30990
31087
  const { nodes = [], nodeListHandler } = params || {};
30991
31088
  const node = nodes[0];
30992
31089
  const processedContent = nodeListHandler.handler({
@@ -31002,7 +31099,7 @@ const encode$2 = (params, _2) => {
31002
31099
  };
31003
31100
  return processedNode;
31004
31101
  };
31005
- const decode$2 = (params, _2) => {
31102
+ const decode$2 = (params) => {
31006
31103
  const { node } = params;
31007
31104
  const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params, node: n }));
31008
31105
  const tocBeginElements = [
@@ -31065,7 +31162,7 @@ function parseInlineStyles(styleString) {
31065
31162
  return acc;
31066
31163
  }, {});
31067
31164
  }
31068
- function handleVRectImport({ params, pNode, pict }) {
31165
+ function handleVRectImport({ pNode, pict }) {
31069
31166
  const rect = pict.elements?.find((el) => el.name === "v:rect");
31070
31167
  const schemaAttrs = {};
31071
31168
  const rectAttrs = rect.attributes || {};
@@ -32071,7 +32168,7 @@ const tabNodeEntityHandler = {
32071
32168
  handler: handleTabNode
32072
32169
  };
32073
32170
  const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$2);
32074
- function preProcessPageInstruction(nodesToCombine, _2, __) {
32171
+ function preProcessPageInstruction(nodesToCombine) {
32075
32172
  const pageNumNode = {
32076
32173
  name: "sd:autoPageNumber",
32077
32174
  type: "element"
@@ -32082,7 +32179,7 @@ function preProcessPageInstruction(nodesToCombine, _2, __) {
32082
32179
  });
32083
32180
  return [pageNumNode];
32084
32181
  }
32085
- function preProcessNumPagesInstruction(nodesToCombine, _2, __) {
32182
+ function preProcessNumPagesInstruction(nodesToCombine) {
32086
32183
  const totalPageNumNode = {
32087
32184
  name: "sd:totalPageNumber",
32088
32185
  type: "element"
@@ -32093,7 +32190,7 @@ function preProcessNumPagesInstruction(nodesToCombine, _2, __) {
32093
32190
  });
32094
32191
  return [totalPageNumNode];
32095
32192
  }
32096
- function preProcessPageRefInstruction(nodesToCombine, instrText, _2) {
32193
+ function preProcessPageRefInstruction(nodesToCombine, instrText) {
32097
32194
  const pageRefNode = {
32098
32195
  name: "sd:pageReference",
32099
32196
  type: "element",
@@ -32129,15 +32226,14 @@ function preProcessHyperlinkInstruction(nodesToCombine, instruction, docx) {
32129
32226
  }
32130
32227
  } else {
32131
32228
  const availableSwitches = {
32132
- "w:anchor": `l "(?<value>[^"]+)"`,
32133
- new_window: `
32134
- `,
32135
- "w:tgtFrame": ` "(?<value>[^"]+)"`,
32136
- "w:tooltip": `o "(?<value>[^"]+)"`
32229
+ "w:anchor": /(?:\\)?l "(?<value>[^"]+)"/,
32230
+ new_window: /(?:\\n|\n)/,
32231
+ "w:tgtFrame": /(?:\\t|\t) "(?<value>[^"]+)"/,
32232
+ "w:tooltip": /(?:\\)?o "(?<value>[^"]+)"/
32137
32233
  };
32138
32234
  const parsedSwitches = {};
32139
- for (const [key, regex] of Object.entries(availableSwitches)) {
32140
- const match = instruction.match(new RegExp(regex));
32235
+ for (const [key, pattern] of Object.entries(availableSwitches)) {
32236
+ const match = instruction.match(pattern);
32141
32237
  if (match) {
32142
32238
  parsedSwitches[key] = match.groups?.value || true;
32143
32239
  }
@@ -32301,7 +32397,7 @@ const createDocumentJson = (docx, converter, editor) => {
32301
32397
  } else {
32302
32398
  trackStructure(identifierResult);
32303
32399
  }
32304
- } catch (error) {
32400
+ } catch {
32305
32401
  trackStructure();
32306
32402
  }
32307
32403
  }
@@ -32779,7 +32875,7 @@ const isAlternatingHeadersOddEven = (docx) => {
32779
32875
  const evenOdd = elements.find((el) => el.name === "w:evenAndOddHeaders");
32780
32876
  return !!evenOdd;
32781
32877
  };
32782
- function handleShapeTextboxImport({ params, pNode, pict }) {
32878
+ function handleShapeTextboxImport({ params, pict }) {
32783
32879
  const shape = pict.elements?.find((el) => el.name === "v:shape");
32784
32880
  const schemaAttrs = {};
32785
32881
  const schemaTextboxAttrs = {};
@@ -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-CL8NqbzP.js";
1
+ import { p as process$1, aw as commonjsGlobal, B as Buffer, ax as getDefaultExportFromCjs, ay as getContentTypesFromXml, az as xmljs } from "./converter-B2Y-pDXk.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, registerCopyHandler_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, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_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 updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberigHelpers, ap as parseIndentElement, aq as combineIndents, ar as SelectionRange, as as Transform, at as isInTable$1, au as generateDocxRandomId, av as insertNewRelationship } from "./converter-CL8NqbzP.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 updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberigHelpers, ap as parseIndentElement, aq as combineIndents, ar as SelectionRange, as as Transform, at as isInTable$1, au as generateDocxRandomId, av as insertNewRelationship } from "./converter-B2Y-pDXk.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-Ab__pf6Y.js";
17
+ import { D as DocxZipper } from "./docx-zipper-bhLh8OB6.js";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
20
20
  };
@@ -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-CL8NqbzP.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-DDXA7n3I.js";
2
+ import { p as process$1 } from "./converter-B2Y-pDXk.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-GN9xFFdh.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-CL8NqbzP.js";
1
+ import { a5 } from "./chunks/converter-B2Y-pDXk.js";
2
2
  import "vue";
3
3
  export {
4
4
  a5 as SuperConverter
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-CL8NqbzP.js";
2
- import { D } from "./chunks/docx-zipper-Ab__pf6Y.js";
1
+ import "./chunks/converter-B2Y-pDXk.js";
2
+ import { D } from "./chunks/docx-zipper-bhLh8OB6.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-DDXA7n3I.js";
2
- import "./chunks/converter-CL8NqbzP.js";
3
- import "./chunks/docx-zipper-Ab__pf6Y.js";
1
+ import { E } from "./chunks/editor-GN9xFFdh.js";
2
+ import "./chunks/converter-B2Y-pDXk.js";
3
+ import "./chunks/docx-zipper-bhLh8OB6.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-Ab__pf6Y.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-bhLh8OB6.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -1,9 +1,7 @@
1
1
  /**
2
2
  * Processes a NUMPAGES instruction and creates a `sd:totalPageNumber` node.
3
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
4
  * @returns {import('../../v2/types/index.js').OpenXmlNode[]}
7
5
  * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 1233
8
6
  */
9
- export function preProcessNumPagesInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[], _: string, __?: any): import("../../v2/types/index.js").OpenXmlNode[];
7
+ export function preProcessNumPagesInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[]): import("../../v2/types/index.js").OpenXmlNode[];
@@ -1,9 +1,7 @@
1
1
  /**
2
2
  * Processes a PAGE instruction and creates a `sd:autoPageNumber` node.
3
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
4
  * @returns {import('../../v2/types/index.js').OpenXmlNode[]}
7
5
  * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 1234
8
6
  */
9
- export function preProcessPageInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[], _: string, __?: any): import("../../v2/types/index.js").OpenXmlNode[];
7
+ export function preProcessPageInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[]): import("../../v2/types/index.js").OpenXmlNode[];
@@ -2,8 +2,7 @@
2
2
  * Processes a PAGEREF instruction and creates a `sd:pageReference` node.
3
3
  * @param {import('../../v2/types/index.js').OpenXmlNode[]} nodesToCombine The nodes to combine.
4
4
  * @param {string} instrText The instruction text.
5
- * @param {import('../v2/docxHelper').ParsedDocx} [__] - The docx object.
6
5
  * @returns {import('../../v2/types/index.js').OpenXmlNode[]}
7
6
  * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 1234
8
7
  */
9
- export function preProcessPageRefInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[], instrText: string, _: any): import("../../v2/types/index.js").OpenXmlNode[];
8
+ export function preProcessPageRefInstruction(nodesToCombine: import("../../v2/types/index.js").OpenXmlNode[], instrText: string): import("../../v2/types/index.js").OpenXmlNode[];
@@ -2,4 +2,4 @@
2
2
  * @param {Object} options
3
3
  * @returns {Object}
4
4
  */
5
- export function handleShapeTextboxImport({ params, pNode, pict }: any): any;
5
+ export function handleShapeTextboxImport({ params, pict }: any): any;
@@ -3,7 +3,7 @@
3
3
  * @param {Object} options
4
4
  * @returns {Object}
5
5
  */
6
- export function handleVRectImport({ params, pNode, pict }: any): any;
6
+ export function handleVRectImport({ pNode, pict }: any): any;
7
7
  export function parsePointsToPixels(value: any): any;
8
8
  /**
9
9
  * @param {Object} styleObject
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, runCommandWithArgumentOnly_fn;
12
- import { ax as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aA as vClickOutside, H as findParentNode, aB as getActiveFormatting, at as isInTable, aC as readFromClipboard, aD as handleClipboardPaste, aE as getFileObject, aF as runPropertyTranslators, aG as commentRangeEndTranslator, aH as commentRangeStartTranslator, aI as translator, aJ as translator$1, aK as translator$2, aL as translator$3, aM as translator$4, aN as translator$5, aO as translator$6, aP as translator$7, aQ as translator$8, aR as translator$9, aS as translator$a, aT as translator$b, aU as translator$c, aV as translator$d, aW as translator$e, aX as translator$f, aY as translator$g, aZ as translator$h, a_ as translator$i, a$ as translator$j, b0 as translator$k, b1 as translator$l, b2 as translator$m, b3 as translator$n, b4 as translator$o, b5 as translator$p, b6 as translator$q, b7 as translator$r, b8 as translator$s, b9 as translator$t, ba as translator$u, bb as translator$v, bc as translator$w, bd as translator$x, be as translator$y, bf as translator$z, bg as translator$A, bh as translator$B, bi as translator$C, bj as translator$D, bk as translator$E, bl as translator$F, bm as translator$G, bn as translator$H, bo as translator$I, bp as translator$J, bq as translator$K, br as translator$L, bs as translator$M, bt as translator$N, bu as translator$O, bv as translator$P, bw as translator$Q, bx as translator$R, by as translator$S, bz as translator$T, bA as translator$U, bB as translator$V, bC as translator$W, bD as translator$X, bE as translator$Y, bF as translator$Z, bG as translator$_, bH as translator$$, bI as translator$10, bJ as translator$11, bK as translator$12, a as Plugin } from "./chunks/converter-CL8NqbzP.js";
13
- import { bL, a5, i, a2 } from "./chunks/converter-CL8NqbzP.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-DDXA7n3I.js";
15
- import { n, C, o, T, l, p, m } from "./chunks/editor-DDXA7n3I.js";
12
+ import { ax as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aA as vClickOutside, H as findParentNode, aB as getActiveFormatting, at as isInTable, aC as readFromClipboard, aD as handleClipboardPaste, aE as getFileObject, aF as runPropertyTranslators, aG as commentRangeEndTranslator, aH as commentRangeStartTranslator, aI as translator, aJ as translator$1, aK as translator$2, aL as translator$3, aM as translator$4, aN as translator$5, aO as translator$6, aP as translator$7, aQ as translator$8, aR as translator$9, aS as translator$a, aT as translator$b, aU as translator$c, aV as translator$d, aW as translator$e, aX as translator$f, aY as translator$g, aZ as translator$h, a_ as translator$i, a$ as translator$j, b0 as translator$k, b1 as translator$l, b2 as translator$m, b3 as translator$n, b4 as translator$o, b5 as translator$p, b6 as translator$q, b7 as translator$r, b8 as translator$s, b9 as translator$t, ba as translator$u, bb as translator$v, bc as translator$w, bd as translator$x, be as translator$y, bf as translator$z, bg as translator$A, bh as translator$B, bi as translator$C, bj as translator$D, bk as translator$E, bl as translator$F, bm as translator$G, bn as translator$H, bo as translator$I, bp as translator$J, bq as translator$K, br as translator$L, bs as translator$M, bt as translator$N, bu as translator$O, bv as translator$P, bw as translator$Q, bx as translator$R, by as translator$S, bz as translator$T, bA as translator$U, bB as translator$V, bC as translator$W, bD as translator$X, bE as translator$Y, bF as translator$Z, bG as translator$_, bH as translator$$, bI as translator$10, bJ as translator$11, bK as translator$12, a as Plugin } from "./chunks/converter-B2Y-pDXk.js";
13
+ import { bL, a5, i, a2 } from "./chunks/converter-B2Y-pDXk.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, y as yUndoPluginKey, f as undoDepth, h as redoDepth, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, i as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-GN9xFFdh.js";
15
+ import { n, C, o, T, l, p, m } from "./chunks/editor-GN9xFFdh.js";
16
16
  import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-BkZURoPS.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-UX3FTiEj.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-Ab__pf6Y.js";
19
+ import { D } from "./chunks/docx-zipper-bhLh8OB6.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-BkZURoPS.js";
3
- import "./chunks/editor-DDXA7n3I.js";
2
+ import { T } from "./chunks/toolbar-UX3FTiEj.js";
3
+ import "./chunks/editor-GN9xFFdh.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-DZWnc89F.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-DhxK40cW.cjs");
4
4
  require("./chunks/vue-DKMj1I9B.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,4 +1,4 @@
1
- import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-BhyobyII.es.js";
1
+ import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-CcuilWh0.es.js";
2
2
  import "./chunks/vue-ZWZLQtoU.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-DZWnc89F.cjs");
4
- const superdoc = require("./chunks/index-CIz8zQ3h.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-DhxK40cW.cjs");
4
+ const superdoc = require("./chunks/index-A1XH4hzI.cjs");
5
5
  require("./chunks/vue-DKMj1I9B.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
7
7
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-BhyobyII.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-ePxDRT3A.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-CcuilWh0.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-CZ9iIRr8.es.js";
3
3
  import "./chunks/vue-ZWZLQtoU.es.js";
4
4
  import { B } from "./chunks/blank-docx-iwdyG9RH.es.js";
5
5
  export {