@superdoc-dev/cli 0.3.0-next.22 → 0.3.0-next.24

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 (2) hide show
  1. package/dist/index.js +136 -43
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -1884,8 +1884,8 @@ var init_operation_definitions = __esm(() => {
1884
1884
  },
1885
1885
  "styles.paragraph.setStyle": {
1886
1886
  memberPath: "styles.paragraph.setStyle",
1887
- description: "Set the paragraph style reference (w:pStyle) on a paragraph-like block.",
1888
- expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the style already matches.",
1887
+ description: "Apply a paragraph style (w:pStyle) to a paragraph-like block, clearing direct run formatting while preserving character-style references.",
1888
+ expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the style already matches. When the style changes, direct run formatting is cleared while character-style references are preserved.",
1889
1889
  requiresDocumentContext: true,
1890
1890
  metadata: mutationOperation({
1891
1891
  idempotency: "conditional",
@@ -39004,7 +39004,7 @@ var init_remark_gfm_z_sDF4ss_es = __esm(() => {
39004
39004
  emptyOptions2 = {};
39005
39005
  });
39006
39006
 
39007
- // ../../packages/superdoc/dist/chunks/SuperConverter-BtAhXvns.es.js
39007
+ // ../../packages/superdoc/dist/chunks/SuperConverter-CeLq_cTU.es.js
39008
39008
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
39009
39009
  const fieldValue = extension$1.config[field];
39010
39010
  if (typeof fieldValue === "function")
@@ -55277,13 +55277,13 @@ function extractTableInfo($pos, depth) {
55277
55277
  return fallbackInfo;
55278
55278
  }
55279
55279
  }
55280
- function segmentRunByInlineProps(runNode, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys) {
55280
+ function segmentRunByInlineProps(runNode, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys, preferExistingKeys) {
55281
55281
  const segments = [];
55282
55282
  let lastKey = null;
55283
55283
  let boundaryCounter = 0;
55284
55284
  runNode.forEach((child) => {
55285
55285
  if (child.isText) {
55286
- const { inlineProps: inlineProps$1, inlineKey: inlineKey$1 } = computeInlineRunProps(child.marks, runNode.attrs?.runProperties, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys);
55286
+ const { inlineProps: inlineProps$1, inlineKey: inlineKey$1 } = computeInlineRunProps(child.marks, runNode.attrs?.runProperties, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys, preferExistingKeys);
55287
55287
  const last = segments[segments.length - 1];
55288
55288
  if (last && inlineKey$1 === lastKey)
55289
55289
  last.content.push(child);
@@ -55311,24 +55311,36 @@ function segmentRunByInlineProps(runNode, paragraphNode, tableInfo, $pos, editor
55311
55311
  firstInlineProps: segments[0]?.inlineProps ?? null
55312
55312
  };
55313
55313
  }
55314
- function computeInlineRunProps(marks, existingRunProperties, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys) {
55314
+ function computeInlineRunProps(marks, existingRunProperties, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys, preferExistingKeys) {
55315
55315
  const runPropertiesFromMarks = decodeRPrFromMarks(marks);
55316
55316
  const paragraphProperties = getResolvedParagraphProperties(paragraphNode) || calculateResolvedParagraphProperties(editor, paragraphNode, $pos);
55317
55317
  const inlineRunProperties = getInlineRunProperties(runPropertiesFromMarks, resolveRunProperties({
55318
55318
  translatedNumbering: editor.converter?.translatedNumbering ?? {},
55319
55319
  translatedLinkedStyles: editor.converter?.translatedLinkedStyles ?? {}
55320
- }, existingRunProperties?.styleId != null ? { styleId: existingRunProperties?.styleId } : {}, paragraphProperties, tableInfo, false, Boolean(paragraphNode.attrs.paragraphProperties?.numberingProperties)), existingRunProperties, editor, preservedDerivedKeys);
55320
+ }, existingRunProperties?.styleId != null ? { styleId: existingRunProperties?.styleId } : {}, paragraphProperties, tableInfo, false, Boolean(paragraphNode.attrs.paragraphProperties?.numberingProperties)), existingRunProperties, editor, preservedDerivedKeys, preferExistingKeys);
55321
55321
  const inlineProps = Object.keys(inlineRunProperties).length ? inlineRunProperties : null;
55322
55322
  return {
55323
55323
  inlineProps,
55324
55324
  inlineKey: stableStringifyInlineProps(inlineProps)
55325
55325
  };
55326
55326
  }
55327
- function getInlineRunProperties(runPropertiesFromMarks, runPropertiesFromStyles, existingRunProperties, editor, preservedDerivedKeys = /* @__PURE__ */ new Set) {
55327
+ function getInlineRunProperties(runPropertiesFromMarks, runPropertiesFromStyles, existingRunProperties, editor, preservedDerivedKeys = /* @__PURE__ */ new Set, preferExistingKeys = /* @__PURE__ */ new Set) {
55328
55328
  const inlineRunProperties = {};
55329
55329
  for (const key in runPropertiesFromMarks) {
55330
- if (preservedDerivedKeys.has(key))
55330
+ if (preservedDerivedKeys.has(key)) {
55331
+ const fromMarks = runPropertiesFromMarks[key];
55332
+ const existing = existingRunProperties?.[key];
55333
+ if (preferExistingKeys.has(key) && existing != null)
55334
+ inlineRunProperties[key] = existing;
55335
+ else if (fromMarks != null && existing != null && typeof fromMarks === "object" && typeof existing === "object")
55336
+ inlineRunProperties[key] = {
55337
+ ...existing,
55338
+ ...fromMarks
55339
+ };
55340
+ else if (fromMarks !== undefined)
55341
+ inlineRunProperties[key] = fromMarks;
55331
55342
  continue;
55343
+ }
55332
55344
  const valueFromMarks = runPropertiesFromMarks[key];
55333
55345
  const valueFromStyles = runPropertiesFromStyles[key];
55334
55346
  if (JSON.stringify(valueFromMarks) !== JSON.stringify(valueFromStyles))
@@ -76788,13 +76800,19 @@ var isRegExp = (value) => {
76788
76800
  if (!runType)
76789
76801
  return null;
76790
76802
  const preservedDerivedKeys = /* @__PURE__ */ new Set;
76803
+ const preferExistingKeys = /* @__PURE__ */ new Set;
76791
76804
  transactions.forEach((transaction) => {
76792
- const keys$1 = transaction.getMeta(RUN_PROPERTY_PRESERVE_META_KEY);
76793
- if (!Array.isArray(keys$1))
76805
+ const entries = transaction.getMeta(RUN_PROPERTY_PRESERVE_META_KEY);
76806
+ if (!Array.isArray(entries))
76794
76807
  return;
76795
- keys$1.forEach((key) => {
76796
- if (typeof key === "string" && key.length > 0)
76797
- preservedDerivedKeys.add(key);
76808
+ entries.forEach((entry) => {
76809
+ if (typeof entry === "string" && entry.length > 0)
76810
+ preservedDerivedKeys.add(entry);
76811
+ else if (entry && typeof entry === "object" && typeof entry.key === "string") {
76812
+ preservedDerivedKeys.add(entry.key);
76813
+ if (entry.preferExisting)
76814
+ preferExistingKeys.add(entry.key);
76815
+ }
76798
76816
  });
76799
76817
  });
76800
76818
  const changedRanges = collectChangedRangesThroughTransactions(transactions, newState.doc.content.size);
@@ -76817,7 +76835,7 @@ var isRegExp = (value) => {
76817
76835
  const { paragraphNode, paragraphPos, tableInfo } = getRunContext($pos);
76818
76836
  if (!paragraphNode || paragraphPos === undefined)
76819
76837
  return;
76820
- const { segments, firstInlineProps } = segmentRunByInlineProps(runNode, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys);
76838
+ const { segments, firstInlineProps } = segmentRunByInlineProps(runNode, paragraphNode, tableInfo, $pos, editor, preservedDerivedKeys, preferExistingKeys);
76821
76839
  const runProperties = firstInlineProps ?? null;
76822
76840
  if (segments.length === 1) {
76823
76841
  if (JSON.stringify(runProperties) === JSON.stringify(runNode.attrs.runProperties))
@@ -81775,11 +81793,10 @@ var isRegExp = (value) => {
81775
81793
  converter.footerIds[sectionType] = rId;
81776
81794
  });
81777
81795
  }, findSectPr = (obj, result = []) => {
81778
- for (const key in obj)
81779
- if (obj[key] === "w:sectPr")
81780
- result.push(obj);
81781
- else if (typeof obj[key] === "object")
81782
- findSectPr(obj[key], result);
81796
+ if (obj && obj.name === "w:sectPr")
81797
+ result.push(obj);
81798
+ if (obj.elements)
81799
+ obj.elements.forEach((el) => findSectPr(el, result));
81783
81800
  return result;
81784
81801
  }, getHeaderFooterSectionData = (sectionData, docx) => {
81785
81802
  const rId = sectionData.attributes.Id;
@@ -82437,7 +82454,7 @@ var isRegExp = (value) => {
82437
82454
  }],
82438
82455
  media: footnoteMedia
82439
82456
  };
82440
- }, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", DEFAULT_XML_DECLARATION, API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.19.0", collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
82457
+ }, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", DEFAULT_XML_DECLARATION, API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.20.0", collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
82441
82458
  if (!runProps?.elements?.length || !state)
82442
82459
  return;
82443
82460
  const fontsNode = runProps.elements.find((el) => el.name === "w:rFonts");
@@ -82471,7 +82488,7 @@ var isRegExp = (value) => {
82471
82488
  state.kern = kernNode.attributes["w:val"];
82472
82489
  }
82473
82490
  }, SuperConverter;
82474
- var init_SuperConverter_BtAhXvns_es = __esm(() => {
82491
+ var init_SuperConverter_CeLq_cTU_es = __esm(() => {
82475
82492
  init_rolldown_runtime_B2q5OVn9_es();
82476
82493
  init_jszip_ChlR43oI_es();
82477
82494
  init_xml_js_BtmJ6bNs_es();
@@ -86185,8 +86202,8 @@ var init_SuperConverter_BtAhXvns_es = __esm(() => {
86185
86202
  },
86186
86203
  "styles.paragraph.setStyle": {
86187
86204
  memberPath: "styles.paragraph.setStyle",
86188
- description: "Set the paragraph style reference (w:pStyle) on a paragraph-like block.",
86189
- expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the style already matches.",
86205
+ description: "Apply a paragraph style (w:pStyle) to a paragraph-like block, clearing direct run formatting while preserving character-style references.",
86206
+ expectedResult: "Returns a ParagraphMutationResult; reports NO_OP if the style already matches. When the style changes, direct run formatting is cleared while character-style references are preserved.",
86190
86207
  requiresDocumentContext: true,
86191
86208
  metadata: mutationOperation2({
86192
86209
  idempotency: "conditional",
@@ -144335,7 +144352,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
144335
144352
  init_remark_gfm_z_sDF4ss_es();
144336
144353
  });
144337
144354
 
144338
- // ../../packages/superdoc/dist/chunks/src-DMxoYkrw.es.js
144355
+ // ../../packages/superdoc/dist/chunks/src-C2IEw9pT.es.js
144339
144356
  function deleteProps(obj, propOrProps) {
144340
144357
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
144341
144358
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -144415,7 +144432,7 @@ function prosemirrorToYXmlFragment(doc$12, xmlFragment) {
144415
144432
  }
144416
144433
  function getSuperdocVersion() {
144417
144434
  try {
144418
- return "1.19.0";
144435
+ return "1.20.0";
144419
144436
  } catch {
144420
144437
  return "unknown";
144421
144438
  }
@@ -155708,7 +155725,10 @@ function applyRunAttributePatch(tr, runType, absFrom, absTo, updates) {
155708
155725
  if (overlappingRuns.length === 0)
155709
155726
  return false;
155710
155727
  if (Object.prototype.hasOwnProperty.call(updates, "fontFamily"))
155711
- tr.setMeta(PRESERVE_RUN_PROPERTIES_META_KEY, ["fontFamily"]);
155728
+ tr.setMeta(PRESERVE_RUN_PROPERTIES_META_KEY, [{
155729
+ key: "fontFamily",
155730
+ preferExisting: true
155731
+ }]);
155712
155732
  let changed = false;
155713
155733
  for (const run2 of overlappingRuns) {
155714
155734
  const runPos = tr.mapping.map(run2.pos, 1);
@@ -155791,6 +155811,8 @@ function applyInlinePatchToRange(editor, tr, absFrom, absTo, inline) {
155791
155811
  textStylePatch[key$1] = inline[key$1];
155792
155812
  if (inline.caps !== undefined)
155793
155813
  textStylePatch.textTransform = capsToTextTransform(inline.caps ?? null);
155814
+ if (textStylePatch.fontFamily != null)
155815
+ tr.setMeta(PRESERVE_RUN_PROPERTIES_META_KEY, ["fontFamily"]);
155794
155816
  if (applyTextStylePatch(tr, schema.marks.textStyle, absFrom, absTo, textStylePatch))
155795
155817
  changed = true;
155796
155818
  const runAttributeUpdates = buildRunAttributeUpdates(inline);
@@ -159467,7 +159489,48 @@ function noOpResult(operation) {
159467
159489
  }
159468
159490
  };
159469
159491
  }
159470
- function mutateParagraphProperties(editor, candidate, operation, target, transform, options) {
159492
+ function getPreservedCharacterStyleAttrs(mark2) {
159493
+ const styleId = mark2.attrs?.[TEXT_STYLE_CHARACTER_STYLE_ATTR];
159494
+ if (typeof styleId !== "string" || styleId.length === 0)
159495
+ return null;
159496
+ return { [TEXT_STYLE_CHARACTER_STYLE_ATTR]: styleId };
159497
+ }
159498
+ function hasTextStyleDirectFormatting(mark2) {
159499
+ return Object.entries(mark2.attrs ?? {}).some(([key$1, value]) => key$1 !== TEXT_STYLE_CHARACTER_STYLE_ATTR && value != null);
159500
+ }
159501
+ function clearTextStyleDirectFormatting(tr, from$1, to, mark2) {
159502
+ const preservedCharacterStyle = getPreservedCharacterStyleAttrs(mark2);
159503
+ const hadDirectFormatting = hasTextStyleDirectFormatting(mark2);
159504
+ if (!hadDirectFormatting && preservedCharacterStyle)
159505
+ return false;
159506
+ tr.removeMark?.(from$1, to, mark2);
159507
+ if (hadDirectFormatting && preservedCharacterStyle && mark2.type?.create && tr.addMark)
159508
+ tr.addMark(from$1, to, mark2.type.create(preservedCharacterStyle));
159509
+ return true;
159510
+ }
159511
+ function clearDirectFormattingInBlock(tr, pos, nodeSize2) {
159512
+ if (!tr.doc?.nodesBetween || !tr.removeMark || nodeSize2 <= 2)
159513
+ return false;
159514
+ let changed = false;
159515
+ tr.doc.nodesBetween(pos + 1, pos + nodeSize2 - 1, (node3, nodePos) => {
159516
+ if (!node3.isText || !Array.isArray(node3.marks) || node3.marks.length === 0 || typeof node3.nodeSize !== "number")
159517
+ return true;
159518
+ node3.marks.forEach((mark2) => {
159519
+ const markName = mark2?.type?.name;
159520
+ if (!markName || !DIRECT_FORMATTING_MARK_NAMES.has(markName))
159521
+ return;
159522
+ if (markName === "textStyle") {
159523
+ changed = clearTextStyleDirectFormatting(tr, nodePos, nodePos + node3.nodeSize, mark2) || changed;
159524
+ return;
159525
+ }
159526
+ tr.removeMark(nodePos, nodePos + node3.nodeSize, mark2);
159527
+ changed = true;
159528
+ });
159529
+ return true;
159530
+ });
159531
+ return changed;
159532
+ }
159533
+ function mutateParagraphProperties(editor, candidate, operation, target, transform, options, extras) {
159471
159534
  if (options?.dryRun)
159472
159535
  return successResult(target);
159473
159536
  if (executeDomainCommand(editor, () => {
@@ -159479,6 +159542,8 @@ function mutateParagraphProperties(editor, candidate, operation, target, transfo
159479
159542
  if (JSON.stringify(existing) === JSON.stringify(updated))
159480
159543
  return false;
159481
159544
  const tr = editor.state.tr;
159545
+ if (extras?.clearDirectFormatting)
159546
+ clearDirectFormattingInBlock(tr, candidate.pos, node3.nodeSize);
159482
159547
  tr.setNodeMarkup(candidate.pos, undefined, {
159483
159548
  ...node3.attrs,
159484
159549
  paragraphProperties: updated
@@ -159524,7 +159589,7 @@ function paragraphsSetStyleWrapper(editor, input2, options) {
159524
159589
  return mutateParagraphProperties(editor, resolveParagraphBlock(editor, input2.target), "styles.paragraph.setStyle", input2.target, (pPr) => ({
159525
159590
  ...pPr,
159526
159591
  styleId: input2.styleId
159527
- }), options);
159592
+ }), options, { clearDirectFormatting: true });
159528
159593
  }
159529
159594
  function paragraphsClearStyleWrapper(editor, input2, options) {
159530
159595
  rejectTrackedMode("styles.paragraph.clearStyle", options);
@@ -162653,6 +162718,23 @@ function addColSpan2(attrs, pos, n = 1) {
162653
162718
  }
162654
162719
  return result;
162655
162720
  }
162721
+ function isHeaderColumn(tableNode, map$12, col) {
162722
+ for (let row2 = 0;row2 < map$12.height; row2++) {
162723
+ const cell2 = tableNode.nodeAt(map$12.map[col + row2 * map$12.width]);
162724
+ if (!cell2 || cell2.type.name !== "tableHeader")
162725
+ return false;
162726
+ }
162727
+ return true;
162728
+ }
162729
+ function resolveInsertedColumnCellType(tableNode, map$12, index2, col) {
162730
+ let refColumn = col > 0 ? -1 : 0;
162731
+ if (isHeaderColumn(tableNode, map$12, col + refColumn))
162732
+ refColumn = col === 0 || col === map$12.width ? null : 0;
162733
+ if (refColumn == null)
162734
+ return tableNode.type.schema.nodes.tableCell ?? null;
162735
+ const refPos = map$12.map[index2 + refColumn];
162736
+ return refPos != null ? tableNode.nodeAt(refPos)?.type ?? null : null;
162737
+ }
162656
162738
  function addColumnToTable(tr, tablePos, col) {
162657
162739
  const tableNode = tr.doc.nodeAt(tablePos);
162658
162740
  if (!tableNode || tableNode.type.name !== "table")
@@ -162662,18 +162744,19 @@ function addColumnToTable(tr, tablePos, col) {
162662
162744
  const mapStart = tr.mapping.maps.length;
162663
162745
  for (let row2 = 0;row2 < map$12.height; row2++) {
162664
162746
  const index2 = row2 * map$12.width + col;
162665
- const pos = map$12.map[index2];
162666
- const cell2 = tableNode.nodeAt(pos);
162667
- if (!cell2)
162668
- continue;
162669
- if (col > 0 && map$12.map[index2 - 1] === pos) {
162747
+ if (col > 0 && col < map$12.width && map$12.map[index2 - 1] === map$12.map[index2]) {
162748
+ const pos = map$12.map[index2];
162749
+ const cell2 = tableNode.nodeAt(pos);
162750
+ if (!cell2)
162751
+ continue;
162670
162752
  tr.setNodeMarkup(tr.mapping.slice(mapStart).map(tableStart + pos), null, addColSpan2(cell2.attrs, col - map$12.colCount(pos)));
162671
162753
  row2 += (cell2.attrs.rowspan || 1) - 1;
162672
162754
  } else {
162673
- const refType = col > 0 ? tableNode.nodeAt(map$12.map[index2 - 1])?.type ?? cell2.type : cell2.type;
162755
+ const refType = resolveInsertedColumnCellType(tableNode, map$12, index2, col);
162756
+ if (!refType)
162757
+ continue;
162674
162758
  const cellPos = map$12.positionAt(row2, col, tableNode);
162675
162759
  tr.insert(tr.mapping.slice(mapStart).map(tableStart + cellPos), refType.createAndFill());
162676
- row2 += (cell2.attrs?.rowspan || 1) - 1;
162677
162760
  }
162678
162761
  }
162679
162762
  }
@@ -205643,7 +205726,7 @@ var Node$13 = class Node$14 {
205643
205726
  domAvailabilityCache = false;
205644
205727
  return false;
205645
205728
  }
205646
- }, summaryVersion = "1.19.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
205729
+ }, summaryVersion = "1.20.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
205647
205730
  const container = document.createElement("div");
205648
205731
  container.innerHTML = html3;
205649
205732
  const result = [];
@@ -205971,7 +206054,7 @@ var Node$13 = class Node$14 {
205971
206054
  return;
205972
206055
  const candidate = run2.pmEnd;
205973
206056
  return typeof candidate === "number" ? candidate : undefined;
205974
- }, engines_exports, DEFAULT_HEADER_FOOTER_MARGIN_PX = 0, LINK_MARK_NAME = "link", COMMENT_MARK_NAME, SUPPORTED_INLINE_TYPES, cacheByEditor, OBJECT_REPLACEMENT_CHAR = "", LINE_NUMBER_RESTART_VALUES, PAGE_NUMBER_FORMAT_VALUES, SECTION_ORIENTATION_VALUES, SECTION_VERTICAL_ALIGN_VALUES, readSectPrHeaderFooterRefs, PIXELS_PER_INCH$2 = 96, BULLET_FORMATS$1, LOCK_MODE_TO_SDT_LOCK, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, SNIPPET_PADDING = 30, DUAL_KIND_TYPES, KNOWN_BLOCK_PM_NODE_TYPES, KNOWN_INLINE_PM_NODE_TYPES, MAX_PATTERN_LENGTH = 1024, TOGGLE_MARK_SPECS, CORE_MARK_NAMES, METADATA_MARK_NAMES, CSS_NAMED_COLORS, HEADING_STYLE_DEPTH, BULLET_FORMATS, MARK_PRIORITY, remarkProcessor, DEFAULT_UNFLATTEN_LISTS = true, DERIVED_ID_LENGTH = 24, groupedCache, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, registry, VALID_CREATE_POSITIONS, REF_HANDLERS, STEP_INTERACTION_MATRIX, MATRIX_EXEMPT_OPS, DEFAULT_INLINE_POLICY, CORE_SET_MARK_KEYS, BOOLEAN_INLINE_MARK_KEYS, TEXT_STYLE_KEYS, PRESERVE_RUN_PROPERTIES_META_KEY = "sdPreserveRunPropertiesKeys", CONTENT_CAPABILITIES, INLINE_CAPABILITIES, SDT_LOCK_TO_LOCK_MODE, STUB_WHERE, EMPTY_RESOLUTION, CONTAINER_NODE_TYPES, VALID_EDGE_NODE_TYPES3, FALLBACK_STORE_KEY = "__documentApiComments", STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, PARAGRAPH_NODE_TYPES, ALIGNMENT_TO_JUSTIFICATION, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES, DOCX_HEX_ID_LENGTH = 8, SETTINGS_PART_PATH = "word/settings.xml", POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART = "word/settings.xml", TABLE_ADAPTER_DISPATCH, ROW_OPS, TABLE_SCOPED_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS$1 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, DOCUMENT_RELS_PATH$1 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", WORDPROCESSINGML_XMLNS = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", OFFICE_DOCUMENT_RELS_XMLNS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships", RELATIONSHIP_ID_PATTERN, HEADER_FILE_PATTERN$1, FOOTER_FILE_PATTERN$1, HISTORY_UNSAFE_OPS, IGNORED_ATTRIBUTE_KEYS, TRACK_CHANGE_MARK_NAMES, TRACK_CHANGE_IGNORED_ATTRIBUTE_KEYS, VOLATILE_PARAGRAPH_ATTRS, VOLATILE_IMAGE_ORIGINAL_ATTR_KEYS, SIMILARITY_THRESHOLD = 0.65, MIN_LENGTH_FOR_SIMILARITY = 4, COMMENT_ATTRS_DIFF_IGNORED_KEYS, setNestedValue = (target, path2, value) => {
206057
+ }, engines_exports, DEFAULT_HEADER_FOOTER_MARGIN_PX = 0, LINK_MARK_NAME = "link", COMMENT_MARK_NAME, SUPPORTED_INLINE_TYPES, cacheByEditor, OBJECT_REPLACEMENT_CHAR = "", LINE_NUMBER_RESTART_VALUES, PAGE_NUMBER_FORMAT_VALUES, SECTION_ORIENTATION_VALUES, SECTION_VERTICAL_ALIGN_VALUES, readSectPrHeaderFooterRefs, PIXELS_PER_INCH$2 = 96, BULLET_FORMATS$1, LOCK_MODE_TO_SDT_LOCK, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, SNIPPET_PADDING = 30, DUAL_KIND_TYPES, KNOWN_BLOCK_PM_NODE_TYPES, KNOWN_INLINE_PM_NODE_TYPES, MAX_PATTERN_LENGTH = 1024, TOGGLE_MARK_SPECS, CORE_MARK_NAMES, METADATA_MARK_NAMES, CSS_NAMED_COLORS, HEADING_STYLE_DEPTH, BULLET_FORMATS, MARK_PRIORITY, remarkProcessor, DEFAULT_UNFLATTEN_LISTS = true, DERIVED_ID_LENGTH = 24, groupedCache, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, REQUIRED_COMMANDS, VALID_CAPABILITY_REASON_CODES, REQUIRED_HELPERS, SCHEMA_NODE_GATES, schemaGatedIds, SUPPORTED_NON_UNIFORM_STRATEGIES, SUPPORTED_SET_MARKS, REGEX_MAX_PATTERN_LENGTH = 1024, registry, VALID_CREATE_POSITIONS, REF_HANDLERS, STEP_INTERACTION_MATRIX, MATRIX_EXEMPT_OPS, DEFAULT_INLINE_POLICY, CORE_SET_MARK_KEYS, BOOLEAN_INLINE_MARK_KEYS, TEXT_STYLE_KEYS, PRESERVE_RUN_PROPERTIES_META_KEY = "sdPreserveRunPropertiesKeys", CONTENT_CAPABILITIES, INLINE_CAPABILITIES, SDT_LOCK_TO_LOCK_MODE, STUB_WHERE, EMPTY_RESOLUTION, CONTAINER_NODE_TYPES, VALID_EDGE_NODE_TYPES3, FALLBACK_STORE_KEY = "__documentApiComments", STYLES_PART = "word/styles.xml", PROPERTIES_KEY_BY_CHANNEL, XML_PATH_BY_CHANNEL2, UNDERLINE_API_TO_STORAGE, UNDERLINE_STORAGE_TO_API, HEX_SUBKEYS_BY_PROPERTY, PARAGRAPH_NODE_TYPES, TEXT_STYLE_CHARACTER_STYLE_ATTR = "styleId", DIRECT_FORMATTING_MARK_NAMES, ALIGNMENT_TO_JUSTIFICATION, SUPPORTED_DELETE_NODE_TYPES3, REJECTED_DELETE_NODE_TYPES3, TEXT_PREVIEW_MAX_LENGTH = 80, RANGE_DELETE_SAFE_NODE_TYPES, INDENT_PER_LEVEL_TWIPS = 720, HANGING_INDENT_TWIPS = 360, ORDERED_PRESET_CONFIG, BULLET_PRESET_CONFIG, PRESET_TEMPLATES, LevelFormattingHelpers, NUMBERING_PART = "word/numbering.xml", DEFAULT_PRESET_FOR_KIND, PREVIEW_TEXT_MAX_LENGTH = 2000, BLOCK_PREVIEW_MAX_LENGTH = 200, EDGE_NODE_TYPES, DOCX_HEX_ID_LENGTH = 8, SETTINGS_PART_PATH = "word/settings.xml", POINTS_TO_PIXELS, POINTS_TO_TWIPS = 20, PIXELS_TO_TWIPS, DEFAULT_TABLE_GRID_WIDTH_TWIPS = 1500, SETTINGS_PART = "word/settings.xml", TABLE_ADAPTER_DISPATCH, ROW_OPS, TABLE_SCOPED_OPS, registered = false, STYLES_PART_ID = "word/styles.xml", stylesPartDescriptor, settingsPartDescriptor, RELS_PART_ID2 = "word/_rels/document.xml.rels", RELS_XMLNS$1 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", relsPartDescriptor, DOCUMENT_RELS_PATH$1 = "word/_rels/document.xml.rels", RELS_XMLNS2 = "http://schemas.openxmlformats.org/package/2006/relationships", HEADER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE$1 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", WORDPROCESSINGML_XMLNS = "http://schemas.openxmlformats.org/wordprocessingml/2006/main", OFFICE_DOCUMENT_RELS_XMLNS = "http://schemas.openxmlformats.org/officeDocument/2006/relationships", RELATIONSHIP_ID_PATTERN, HEADER_FILE_PATTERN$1, FOOTER_FILE_PATTERN$1, HISTORY_UNSAFE_OPS, IGNORED_ATTRIBUTE_KEYS, TRACK_CHANGE_MARK_NAMES, TRACK_CHANGE_IGNORED_ATTRIBUTE_KEYS, VOLATILE_PARAGRAPH_ATTRS, VOLATILE_IMAGE_ORIGINAL_ATTR_KEYS, SIMILARITY_THRESHOLD = 0.65, MIN_LENGTH_FOR_SIMILARITY = 4, COMMENT_ATTRS_DIFF_IGNORED_KEYS, setNestedValue = (target, path2, value) => {
205975
206058
  if (!path2.includes(".")) {
205976
206059
  target[path2] = value;
205977
206060
  return;
@@ -206584,7 +206667,7 @@ var Node$13 = class Node$14 {
206584
206667
  candidate = String(parseInt(hex, 16));
206585
206668
  } while (!candidate || existingIds.has(candidate));
206586
206669
  return candidate;
206587
- }, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN, FOOTER_FILE_PATTERN, SPECIAL_NOTE_TYPES, FOOTNOTES_PART_ID = "word/footnotes.xml", ENDNOTES_PART_ID = "word/endnotes.xml", FOOTNOTES_CONFIG, ENDNOTES_CONFIG, NOTES_XMLNS, footnotesPartDescriptor, endnotesPartDescriptor, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, FIELD_NODE_TYPES, TOA_LEADER_REVERSE_MAP, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.19.0", PIXELS_PER_INCH$1 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, Editor, ContextMenuPluginKey, MENU_OFFSET_X = 0, MENU_OFFSET_Y = 28, CONTEXT_MENU_OFFSET_X = 10, CONTEXT_MENU_OFFSET_Y = 10, SLASH_COOLDOWN_MS = 5000, ContextMenu, SearchQuery = class {
206670
+ }, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN, FOOTER_FILE_PATTERN, SPECIAL_NOTE_TYPES, FOOTNOTES_PART_ID = "word/footnotes.xml", ENDNOTES_PART_ID = "word/endnotes.xml", FOOTNOTES_CONFIG, ENDNOTES_CONFIG, NOTES_XMLNS, footnotesPartDescriptor, endnotesPartDescriptor, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, FIELD_NODE_TYPES, TOA_LEADER_REVERSE_MAP, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.20.0", PIXELS_PER_INCH$1 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, Editor, ContextMenuPluginKey, MENU_OFFSET_X = 0, MENU_OFFSET_Y = 28, CONTEXT_MENU_OFFSET_X = 10, CONTEXT_MENU_OFFSET_Y = 10, SLASH_COOLDOWN_MS = 5000, ContextMenu, SearchQuery = class {
206588
206671
  constructor(config2) {
206589
206672
  this.search = config2.search;
206590
206673
  this.caseSensitive = !!config2.caseSensitive;
@@ -224996,9 +225079,9 @@ var Node$13 = class Node$14 {
224996
225079
  return false;
224997
225080
  return Boolean(checker(attrs));
224998
225081
  }, SuperToolbar, ICONS, TEXTS, tableActionsOptions;
224999
- var init_src_DMxoYkrw_es = __esm(() => {
225082
+ var init_src_C2IEw9pT_es = __esm(() => {
225000
225083
  init_rolldown_runtime_B2q5OVn9_es();
225001
- init_SuperConverter_BtAhXvns_es();
225084
+ init_SuperConverter_CeLq_cTU_es();
225002
225085
  init_jszip_ChlR43oI_es();
225003
225086
  init_uuid_qzgm05fK_es();
225004
225087
  init_constants_ep1_Gwqi_es();
@@ -232896,6 +232979,16 @@ function print() { __p += __j.call(arguments, '') }
232896
232979
  "heading",
232897
232980
  "listItem"
232898
232981
  ]);
232982
+ DIRECT_FORMATTING_MARK_NAMES = new Set([
232983
+ "textStyle",
232984
+ "bold",
232985
+ "italic",
232986
+ "underline",
232987
+ "strike",
232988
+ "subscript",
232989
+ "superscript",
232990
+ "highlight"
232991
+ ]);
232899
232992
  ALIGNMENT_TO_JUSTIFICATION = {
232900
232993
  left: "left",
232901
232994
  center: "center",
@@ -258085,8 +258178,8 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
258085
258178
 
258086
258179
  // ../../packages/superdoc/dist/super-editor.es.js
258087
258180
  var init_super_editor_es = __esm(() => {
258088
- init_src_DMxoYkrw_es();
258089
- init_SuperConverter_BtAhXvns_es();
258181
+ init_src_C2IEw9pT_es();
258182
+ init_SuperConverter_CeLq_cTU_es();
258090
258183
  init_jszip_ChlR43oI_es();
258091
258184
  init_xml_js_BtmJ6bNs_es();
258092
258185
  init_constants_ep1_Gwqi_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.3.0-next.22",
3
+ "version": "0.3.0-next.24",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -20,21 +20,21 @@
20
20
  "@types/bun": "^1.3.8",
21
21
  "@types/node": "22.19.2",
22
22
  "typescript": "^5.9.2",
23
- "@superdoc/document-api": "0.0.1",
23
+ "@superdoc/pm-adapter": "0.0.0",
24
24
  "@superdoc/super-editor": "0.0.1",
25
- "superdoc": "1.19.0",
26
- "@superdoc/pm-adapter": "0.0.0"
25
+ "@superdoc/document-api": "0.0.1",
26
+ "superdoc": "1.20.0"
27
27
  },
28
28
  "module": "src/index.ts",
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
32
  "optionalDependencies": {
33
- "@superdoc-dev/cli-darwin-arm64": "0.3.0-next.22",
34
- "@superdoc-dev/cli-darwin-x64": "0.3.0-next.22",
35
- "@superdoc-dev/cli-linux-x64": "0.3.0-next.22",
36
- "@superdoc-dev/cli-linux-arm64": "0.3.0-next.22",
37
- "@superdoc-dev/cli-windows-x64": "0.3.0-next.22"
33
+ "@superdoc-dev/cli-darwin-arm64": "0.3.0-next.24",
34
+ "@superdoc-dev/cli-darwin-x64": "0.3.0-next.24",
35
+ "@superdoc-dev/cli-linux-arm64": "0.3.0-next.24",
36
+ "@superdoc-dev/cli-windows-x64": "0.3.0-next.24",
37
+ "@superdoc-dev/cli-linux-x64": "0.3.0-next.24"
38
38
  },
39
39
  "scripts": {
40
40
  "predev": "node scripts/ensure-superdoc-build.js",