@superdoc-dev/cli 0.7.0-next.2 → 0.7.0-next.4

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 +91 -43
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -65352,7 +65352,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
65352
65352
  emptyOptions2 = {};
65353
65353
  });
65354
65354
 
65355
- // ../../packages/superdoc/dist/chunks/SuperConverter-DdDUYAlC.es.js
65355
+ // ../../packages/superdoc/dist/chunks/SuperConverter-H0ERuAZY.es.js
65356
65356
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
65357
65357
  const fieldValue = extension$1.config[field];
65358
65358
  if (typeof fieldValue === "function")
@@ -110976,13 +110976,19 @@ var isRegExp = (value) => {
110976
110976
  const runType = newState.schema.nodes.run;
110977
110977
  if (!runType)
110978
110978
  return null;
110979
- const isAcceptReject = transactions.some((t) => t.getMeta("inputType") === "acceptReject");
110980
- const removedMarkTypes = /* @__PURE__ */ new Set;
110979
+ const removedKeys = /* @__PURE__ */ new Set;
110981
110980
  transactions.forEach((t) => {
110982
110981
  t.steps.forEach((step$1) => {
110983
110982
  const jsonStep = step$1.toJSON?.();
110984
- if (jsonStep?.stepType === "removeMark" && jsonStep.mark?.type)
110985
- removedMarkTypes.add(jsonStep.mark.type);
110983
+ if (jsonStep?.stepType !== "removeMark" || !jsonStep.mark?.type)
110984
+ return;
110985
+ if (jsonStep.mark.type === "textStyle")
110986
+ Object.entries(jsonStep.mark.attrs || {}).forEach(([key, value]) => {
110987
+ if (value != null)
110988
+ removedKeys.add(key);
110989
+ });
110990
+ else
110991
+ removedKeys.add(jsonStep.mark.type);
110986
110992
  });
110987
110993
  });
110988
110994
  const preservedDerivedKeys = /* @__PURE__ */ new Set;
@@ -111046,14 +111052,14 @@ var isRegExp = (value) => {
111046
111052
  const hadInlineKeys = Array.isArray(runNode.attrs?.runPropertiesInlineKeys) && runNode.attrs.runPropertiesInlineKeys.length > 0;
111047
111053
  if (JSON.stringify(runProperties) === JSON.stringify(runNode.attrs.runProperties) && hadInlineKeys)
111048
111054
  return;
111049
- if (hadInlineKeys && !isAcceptReject) {
111055
+ if (hadInlineKeys) {
111050
111056
  const computedKeys = new Set(runProperties ? Object.keys(runProperties) : []);
111051
111057
  const lostKeys = existingInlineKeys.filter((k) => !computedKeys.has(k));
111052
111058
  if (lostKeys.length > 0) {
111053
111059
  if (!runProperties)
111054
111060
  runProperties = {};
111055
111061
  lostKeys.forEach((k) => {
111056
- if (removedMarkTypes.has(k))
111062
+ if (removedKeys.has(k))
111057
111063
  return;
111058
111064
  if (runNode.attrs?.runProperties?.[k] !== undefined)
111059
111065
  runProperties[k] = runNode.attrs.runProperties[k];
@@ -117037,7 +117043,7 @@ var isRegExp = (value) => {
117037
117043
  state.kern = kernNode.attributes["w:val"];
117038
117044
  }
117039
117045
  }, SuperConverter;
117040
- var init_SuperConverter_DdDUYAlC_es = __esm(() => {
117046
+ var init_SuperConverter_H0ERuAZY_es = __esm(() => {
117041
117047
  init_rolldown_runtime_Bg48TavK_es();
117042
117048
  init_jszip_C49i9kUs_es();
117043
117049
  init_xml_js_CqGKpaft_es();
@@ -154233,7 +154239,7 @@ var init_SuperConverter_DdDUYAlC_es = __esm(() => {
154233
154239
  };
154234
154240
  });
154235
154241
 
154236
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-BX6lNsQC.es.js
154242
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DqiJg0qo.es.js
154237
154243
  function parseSizeUnit(val = "0") {
154238
154244
  const length3 = val.toString() || "0";
154239
154245
  const value = Number.parseFloat(length3);
@@ -155844,8 +155850,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
155844
155850
  return false;
155845
155851
  return Boolean(checker(attrs));
155846
155852
  };
155847
- var init_create_headless_toolbar_BX6lNsQC_es = __esm(() => {
155848
- init_SuperConverter_DdDUYAlC_es();
155853
+ var init_create_headless_toolbar_DqiJg0qo_es = __esm(() => {
155854
+ init_SuperConverter_H0ERuAZY_es();
155849
155855
  init_constants_CGhJRd87_es();
155850
155856
  init_dist_B8HfvhaK_es();
155851
155857
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -204283,7 +204289,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
204283
204289
  init_remark_gfm_BhnWr3yf_es();
204284
204290
  });
204285
204291
 
204286
- // ../../packages/superdoc/dist/chunks/src-DrQirVNk.es.js
204292
+ // ../../packages/superdoc/dist/chunks/src-DtoTLJe0.es.js
204287
204293
  function deleteProps(obj, propOrProps) {
204288
204294
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
204289
204295
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -204571,6 +204577,16 @@ function shouldApplyJustify(params$1) {
204571
204577
  return false;
204572
204578
  return true;
204573
204579
  }
204580
+ function getFirstLineIndentOffset(indent2, suppressFirstLineIndent) {
204581
+ if (suppressFirstLineIndent)
204582
+ return 0;
204583
+ return (indent2?.firstLine ?? 0) - (indent2?.hanging ?? 0);
204584
+ }
204585
+ function adjustAvailableWidthForTextIndent(availableWidth, textIndentOffset, lineMaxWidth) {
204586
+ if (textIndentOffset !== 0 && (textIndentOffset < 0 || lineMaxWidth == null))
204587
+ return Math.max(0, availableWidth - textIndentOffset);
204588
+ return availableWidth;
204589
+ }
204574
204590
  function calculateJustifySpacing(params$1) {
204575
204591
  const { lineWidth, availableWidth, spaceCount, shouldJustify } = params$1;
204576
204592
  if (!shouldJustify)
@@ -245933,6 +245949,7 @@ function resolveParagraphContent(fragment2, block, measure) {
245933
245949
  if (!hasExplicitSegmentPositioning)
245934
245950
  textIndentPx = firstLineOffset;
245935
245951
  }
245952
+ availableWidth = adjustAvailableWidthForTextIndent(availableWidth, textIndentPx, line.maxWidth);
245936
245953
  const indentLeft = paraIndent?.left ?? 0;
245937
245954
  const firstLine = paraIndent?.firstLine ?? 0;
245938
245955
  const hanging = paraIndent?.hanging ?? 0;
@@ -250913,11 +250930,11 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
250913
250930
  const indentRight = Math.max(0, rawIndentRight);
250914
250931
  const indentFirstLine = Math.max(0, indent2?.firstLine ?? 0);
250915
250932
  const indentHanging = Math.max(0, indent2?.hanging ?? 0);
250916
- const baseFirstLineOffset = firstLineIndent || indentFirstLine - indentHanging;
250917
- const rawFirstLineOffset = baseFirstLineOffset;
250933
+ const baseFirstLineOffset = attrs?.suppressFirstLineIndent === true ? 0 : firstLineIndent || indentFirstLine - indentHanging;
250918
250934
  const clampedFirstLineOffset = Math.max(0, baseFirstLineOffset);
250919
- const hasNegativeIndent = rawIndentLeft < 0 || rawIndentRight < 0;
250920
- const effectiveFirstLineOffset = !wordLayout?.marker && !hasNegativeIndent && baseFirstLineOffset < 0 ? baseFirstLineOffset : clampedFirstLineOffset;
250935
+ const hasNegativeLeftIndent = rawIndentLeft < 0;
250936
+ const allowNegativeFirstLineOffset = !wordLayout?.marker && !hasNegativeLeftIndent && baseFirstLineOffset < 0;
250937
+ const effectiveFirstLineOffset = wordLayout?.marker ? 0 : allowNegativeFirstLineOffset ? baseFirstLineOffset : clampedFirstLineOffset;
250921
250938
  const contentWidth = Math.max(1, maxWidth - indentLeft - indentRight);
250922
250939
  const textStartPx = wordLayout?.textStartPx;
250923
250940
  let measuredMarkerTextWidth;
@@ -250939,7 +250956,7 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
250939
250956
  while (currentRun < runs2.length) {
250940
250957
  const isFirstLine = lines.length === 0;
250941
250958
  const effectiveMaxWidth = Math.max(1, isFirstLine ? firstLineWidth : contentWidth);
250942
- const effectiveIndent = isFirstLine ? indentLeft + rawFirstLineOffset : indentLeft;
250959
+ const effectiveIndent = isFirstLine ? indentLeft + baseFirstLineOffset : indentLeft;
250943
250960
  const startRun = currentRun;
250944
250961
  const startChar = currentChar;
250945
250962
  let width = 0;
@@ -251117,7 +251134,7 @@ function remeasureParagraph(block, maxWidth, firstLineIndent = 0) {
251117
251134
  const hasTabRun = runs2.some((run2) => run2?.kind === "tab");
251118
251135
  const hasTextTab = runs2.some((run2) => run2?.kind === "text" && typeof run2.text === "string" && run2.text.includes("\t"));
251119
251136
  if (hasTabRun || hasTextTab)
251120
- applyTabLayoutToLines(lines, runs2, tabStops, decimalSeparator, indentLeft, rawFirstLineOffset);
251137
+ applyTabLayoutToLines(lines, runs2, tabStops, decimalSeparator, indentLeft, baseFirstLineOffset);
251121
251138
  const totalHeight = lines.reduce((s2, l) => s2 + l.lineHeight, 0);
251122
251139
  const marker = wordLayout?.marker;
251123
251140
  return {
@@ -252471,10 +252488,16 @@ function clickToPositionGeometry(layout, blocks2, measures, containerPoint, opti
252471
252488
  const indentLeft = typeof block.attrs?.indent?.left === "number" ? block.attrs.indent.left : 0;
252472
252489
  const indentRight = typeof block.attrs?.indent?.right === "number" ? block.attrs.indent.right : 0;
252473
252490
  const totalIndent = (Number.isFinite(indentLeft) ? indentLeft : 0) + (Number.isFinite(indentRight) ? indentRight : 0);
252474
- const availableWidth = Math.max(0, fragment2.width - totalIndent);
252491
+ let availableWidth = Math.max(0, fragment2.width - totalIndent);
252475
252492
  if (totalIndent > fragment2.width)
252476
252493
  console.warn(`[clickToPosition] Paragraph indents (${totalIndent}px) exceed fragment width (${fragment2.width}px) for block ${fragment2.blockId}. This may indicate a layout miscalculation. Available width clamped to 0.`);
252477
252494
  const isListItem$1 = (fragment2.markerWidth ?? measure.marker?.markerWidth ?? 0) > 0;
252495
+ const hasRenderedMarkerText = isListItem$1 && Boolean(fragment2.markerTextWidth);
252496
+ if (lineIndex === 0 && !fragment2.continuesFromPrev && !hasRenderedMarkerText) {
252497
+ const suppressFLI = block.attrs?.suppressFirstLineIndent === true;
252498
+ const firstLineOffset = getFirstLineIndentOffset(block.attrs?.indent, suppressFLI);
252499
+ availableWidth = adjustAvailableWidthForTextIndent(availableWidth, firstLineOffset, line.maxWidth);
252500
+ }
252478
252501
  const isJustified = block.attrs?.alignment === "justify";
252479
252502
  const alignmentOverride = isListItem$1 && !isJustified ? "left" : undefined;
252480
252503
  const pos = mapPointToPm(block, line, pageRelativePoint.x - fragment2.x, isRTL, availableWidth, alignmentOverride);
@@ -252515,10 +252538,17 @@ function clickToPositionGeometry(layout, blocks2, measures, containerPoint, opti
252515
252538
  const indentLeft = typeof cellBlock.attrs?.indent?.left === "number" ? cellBlock.attrs.indent.left : 0;
252516
252539
  const indentRight = typeof cellBlock.attrs?.indent?.right === "number" ? cellBlock.attrs.indent.right : 0;
252517
252540
  const totalIndent = (Number.isFinite(indentLeft) ? indentLeft : 0) + (Number.isFinite(indentRight) ? indentRight : 0);
252518
- const availableWidth = Math.max(0, tableHit.fragment.width - totalIndent);
252541
+ let availableWidth = Math.max(0, tableHit.fragment.width - totalIndent);
252519
252542
  if (totalIndent > tableHit.fragment.width)
252520
252543
  console.warn(`[clickToPosition:table] Paragraph indents (${totalIndent}px) exceed fragment width (${tableHit.fragment.width}px) for block ${tableHit.fragment.blockId}. This may indicate a layout miscalculation. Available width clamped to 0.`);
252521
252544
  const isListItem$1 = (cellMeasure.marker?.markerWidth ?? 0) > 0;
252545
+ const cellLineStart = tableHit.fragment.partialRow?.fromLineByCell?.[tableHit.cellColIndex] ?? 0;
252546
+ const localStartLine = Math.max(0, cellLineStart - tableHit.blockStartGlobal);
252547
+ if (lineIndex === 0 && localStartLine === 0 && !isListItem$1) {
252548
+ const suppressFLI = cellBlock.attrs?.suppressFirstLineIndent === true;
252549
+ const firstLineOffset = getFirstLineIndentOffset(cellBlock.attrs?.indent, suppressFLI);
252550
+ availableWidth = adjustAvailableWidthForTextIndent(availableWidth, firstLineOffset, line.maxWidth);
252551
+ }
252522
252552
  const isJustified = cellBlock.attrs?.alignment === "justify";
252523
252553
  const pos = mapPointToPm(cellBlock, line, localX, isRTL, availableWidth, isListItem$1 && !isJustified ? "left" : undefined);
252524
252554
  if (pos != null)
@@ -252594,15 +252624,17 @@ function selectionToRects(layout, blocks2, measures, from$1, to, geometryHelper)
252594
252624
  const isListItemFlag = isListItem2(markerWidth, block);
252595
252625
  const isJustified = block.attrs?.alignment === "justify";
252596
252626
  const alignmentOverride = isListItemFlag && !isJustified ? "left" : undefined;
252597
- const startX = mapPmToX(block, line, charOffsetFrom, fragment2.width, alignmentOverride);
252598
- const endX = mapPmToX(block, line, charOffsetTo, fragment2.width, alignmentOverride);
252627
+ const isFirstLine = index2 === fragment2.fromLine && !fragment2.continuesFromPrev;
252628
+ const fragmentMarkerTextWidth = fragment2.markerTextWidth ?? measure.marker?.markerTextWidth ?? undefined;
252629
+ const startX = mapPmToX(block, line, charOffsetFrom, fragment2.width, alignmentOverride, isFirstLine, fragmentMarkerTextWidth);
252630
+ const endX = mapPmToX(block, line, charOffsetTo, fragment2.width, alignmentOverride, isFirstLine, fragmentMarkerTextWidth);
252599
252631
  const indent2 = extractParagraphIndent(block.attrs?.indent);
252600
252632
  const wordLayout = getWordLayoutConfig(block);
252601
252633
  const indentAdjust = calculateTextStartIndent({
252602
- isFirstLine: index2 === fragment2.fromLine,
252634
+ isFirstLine,
252603
252635
  isListItem: isListItemFlag,
252604
252636
  markerWidth,
252605
- markerTextWidth: fragment2.markerTextWidth ?? measure.marker?.markerTextWidth ?? undefined,
252637
+ markerTextWidth: fragmentMarkerTextWidth,
252606
252638
  paraIndentLeft: indent2.left,
252607
252639
  firstLineIndent: indent2.firstLine,
252608
252640
  hangingIndent: indent2.hanging,
@@ -252766,13 +252798,15 @@ function selectionToRects(layout, blocks2, measures, from$1, to, geometryHelper)
252766
252798
  const charOffsetFrom = pmPosToCharOffset(info.block, line, sliceFrom);
252767
252799
  const charOffsetTo = pmPosToCharOffset(info.block, line, sliceTo);
252768
252800
  const availableWidth = Math.max(1, cellMeasure.width - padding.left - padding.right);
252769
- const startX = mapPmToX(info.block, line, charOffsetFrom, availableWidth, alignmentOverride);
252770
- const endX = mapPmToX(info.block, line, charOffsetTo, availableWidth, alignmentOverride);
252801
+ const isFirstLine = index2 === 0;
252802
+ const cellMarkerTextWidth = info.measure?.marker?.markerTextWidth ?? undefined;
252803
+ const startX = mapPmToX(info.block, line, charOffsetFrom, availableWidth, alignmentOverride, isFirstLine, cellMarkerTextWidth);
252804
+ const endX = mapPmToX(info.block, line, charOffsetTo, availableWidth, alignmentOverride, isFirstLine, cellMarkerTextWidth);
252771
252805
  const textIndentAdjust = calculateTextStartIndent({
252772
- isFirstLine: index2 === info.startLine,
252806
+ isFirstLine,
252773
252807
  isListItem: cellIsListItem,
252774
252808
  markerWidth: paragraphMarkerWidth,
252775
- markerTextWidth: info.measure?.marker?.markerTextWidth ?? undefined,
252809
+ markerTextWidth: cellMarkerTextWidth,
252776
252810
  paraIndentLeft: cellIndent.left,
252777
252811
  firstLineIndent: cellIndent.firstLine,
252778
252812
  hangingIndent: cellIndent.hanging,
@@ -258855,7 +258889,7 @@ async function measureParagraphBlock(block, maxWidth) {
258855
258889
  const hanging = indent2?.hanging ?? 0;
258856
258890
  const isWordLayoutList = Boolean(wordLayout?.marker);
258857
258891
  const rawFirstLineOffset = block.attrs?.suppressFirstLineIndent === true ? 0 : firstLine - hanging;
258858
- const firstLineOffset = isWordLayoutList ? 0 : !isWordLayoutList && !(indentLeft < 0 || indentRight < 0) && rawFirstLineOffset < 0 ? rawFirstLineOffset : Math.max(0, rawFirstLineOffset);
258892
+ const firstLineOffset = isWordLayoutList ? 0 : !isWordLayoutList && !(indentLeft < 0) && rawFirstLineOffset < 0 ? rawFirstLineOffset : Math.max(0, rawFirstLineOffset);
258859
258893
  const contentWidth = Math.max(1, maxWidth - indentLeft - indentRight);
258860
258894
  const bodyContentWidth = contentWidth;
258861
258895
  let initialAvailableWidth;
@@ -277289,7 +277323,7 @@ var Node$13 = class Node$14 {
277289
277323
  const radicand = elements.find((e) => e.name === "m:e");
277290
277324
  const degHideEl = radPr?.elements?.find((e) => e.name === "m:degHide");
277291
277325
  const degHideVal = degHideEl?.attributes?.["m:val"];
277292
- if (degHideEl !== undefined && degHideVal !== "0" && degHideVal !== "false" || !deg) {
277326
+ if (degHideEl !== undefined && degHideVal !== "0" && degHideVal !== "false" && degHideVal !== "off" || !deg || (deg.elements ?? []).length === 0) {
277293
277327
  const msqrt = doc$12.createElementNS(MATHML_NS$1, "msqrt");
277294
277328
  const radicandRow$1 = doc$12.createElementNS(MATHML_NS$1, "mrow");
277295
277329
  radicandRow$1.appendChild(convertChildren(radicand?.elements ?? []));
@@ -280609,6 +280643,7 @@ var Node$13 = class Node$14 {
280609
280643
  const rawMeasures = cellMeasure.blocks ?? (cellMeasure.paragraph ? [cellMeasure.paragraph] : []);
280610
280644
  const cellBlockMeasures = (Array.isArray(rawMeasures) ? rawMeasures : []).filter((m$1) => m$1 != null && typeof m$1 === "object" && ("kind" in m$1));
280611
280645
  let blockStartY = 0;
280646
+ let blockStartGlobalLines = 0;
280612
280647
  const getBlockHeight = (m$1) => {
280613
280648
  if (!m$1)
280614
280649
  return 0;
@@ -280652,10 +280687,12 @@ var Node$13 = class Node$14 {
280652
280687
  cellBlock: paragraphBlock,
280653
280688
  cellMeasure: paragraphMeasure,
280654
280689
  localX: Math.max(0, cellLocalX),
280655
- localY: Math.max(0, localYWithinBlock)
280690
+ localY: Math.max(0, localYWithinBlock),
280691
+ blockStartGlobal: blockStartGlobalLines
280656
280692
  };
280657
280693
  }
280658
280694
  blockStartY = blockEndY;
280695
+ blockStartGlobalLines += paragraphMeasure.lines.length;
280659
280696
  }
280660
280697
  }
280661
280698
  return null;
@@ -280701,29 +280738,38 @@ var Node$13 = class Node$14 {
280701
280738
  for (let i4 = 0;i4 < absoluteLineIndex; i4 += 1)
280702
280739
  height += measure.lines[i4]?.lineHeight ?? 0;
280703
280740
  return height;
280704
- }, mapPmToX = (block, line, offset$1, fragmentWidth, alignmentOverride) => {
280741
+ }, mapPmToX = (block, line, offset$1, fragmentWidth, alignmentOverride, isFirstLine, markerTextWidth) => {
280705
280742
  if (fragmentWidth <= 0 || line.width <= 0)
280706
280743
  return 0;
280707
280744
  let paraIndentLeft = 0;
280708
280745
  let paraIndentRight = 0;
280709
280746
  let effectiveLeft = 0;
280747
+ let isListParagraph = false;
280748
+ let wl;
280710
280749
  if (block.kind === "paragraph") {
280711
280750
  const indentLeft = typeof block.attrs?.indent?.left === "number" ? block.attrs.indent.left : 0;
280712
280751
  const indentRight = typeof block.attrs?.indent?.right === "number" ? block.attrs.indent.right : 0;
280713
280752
  paraIndentLeft = Number.isFinite(indentLeft) ? indentLeft : 0;
280714
280753
  paraIndentRight = Number.isFinite(indentRight) ? indentRight : 0;
280715
280754
  effectiveLeft = paraIndentLeft;
280716
- const wl = getWordLayoutConfig(block);
280717
- if (Boolean(block.attrs?.numberingProperties) || Boolean(wl?.marker)) {
280755
+ wl = getWordLayoutConfig(block);
280756
+ isListParagraph = Boolean(block.attrs?.numberingProperties) || Boolean(wl?.marker);
280757
+ if (isListParagraph) {
280718
280758
  const explicitTextStart = typeof wl?.marker?.textStartX === "number" && Number.isFinite(wl.marker.textStartX) ? wl.marker.textStartX : typeof wl?.textStartPx === "number" && Number.isFinite(wl.textStartPx) ? wl.textStartPx : undefined;
280719
280759
  if (typeof explicitTextStart === "number" && explicitTextStart > paraIndentLeft)
280720
280760
  effectiveLeft = explicitTextStart;
280721
280761
  }
280722
280762
  }
280723
280763
  const totalIndent = effectiveLeft + paraIndentRight;
280724
- const availableWidth = Math.max(0, fragmentWidth - totalIndent);
280764
+ let availableWidth = Math.max(0, fragmentWidth - totalIndent);
280725
280765
  if (totalIndent > fragmentWidth)
280726
280766
  console.warn(`[mapPmToX] Paragraph indents (${totalIndent}px) exceed fragment width (${fragmentWidth}px) for block ${block.id}. This may indicate a layout miscalculation. Available width clamped to 0.`);
280767
+ const hasRenderedMarkerText = isListParagraph && (markerTextWidth ?? 0) > 0;
280768
+ if (isFirstLine && block.kind === "paragraph" && !hasRenderedMarkerText) {
280769
+ const suppressFLI = block.attrs?.suppressFirstLineIndent === true;
280770
+ const firstLineOffset = getFirstLineIndentOffset(block.attrs?.indent, suppressFLI);
280771
+ availableWidth = adjustAvailableWidthForTextIndent(availableWidth, firstLineOffset, line.maxWidth);
280772
+ }
280727
280773
  return measureCharacterX(block, line, offset$1, availableWidth, alignmentOverride);
280728
280774
  }, WORD_CHARACTER_REGEX, EpochPositionMapper = class {
280729
280775
  #currentEpoch = 0;
@@ -287407,12 +287453,12 @@ var Node$13 = class Node$14 {
287407
287453
  return;
287408
287454
  console.log(...args$1);
287409
287455
  }, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions;
287410
- var init_src_DrQirVNk_es = __esm(() => {
287456
+ var init_src_DtoTLJe0_es = __esm(() => {
287411
287457
  init_rolldown_runtime_Bg48TavK_es();
287412
- init_SuperConverter_DdDUYAlC_es();
287458
+ init_SuperConverter_H0ERuAZY_es();
287413
287459
  init_jszip_C49i9kUs_es();
287414
287460
  init_uuid_qzgm05fK_es();
287415
- init_create_headless_toolbar_BX6lNsQC_es();
287461
+ init_create_headless_toolbar_DqiJg0qo_es();
287416
287462
  init_constants_CGhJRd87_es();
287417
287463
  init_dist_B8HfvhaK_es();
287418
287464
  init_unified_Dsuw2be5_es();
@@ -314583,10 +314629,12 @@ function print() { __p += __j.call(arguments, '') }
314583
314629
  let availableWidthOverride = line.maxWidth != null ? Math.min(line.maxWidth, fallbackAvailableWidth) : fallbackAvailableWidth;
314584
314630
  if (shouldUseResolvedListTextStart)
314585
314631
  availableWidthOverride = fragment2.width - listFirstLineTextStartPx - Math.max(0, paraIndentRight);
314632
+ const isFirstLine = index2 === 0 && !fragment2.continuesFromPrev;
314633
+ const isListFirstLine = Boolean(hasListFirstLineMarker && fragment2.markerTextWidth);
314634
+ if (isFirstLine && !isListFirstLine && !hasExplicitSegmentPositioning)
314635
+ availableWidthOverride = adjustAvailableWidthForTextIndent(availableWidthOverride, firstLineOffset, line.maxWidth);
314586
314636
  const shouldSkipJustifyForLastLine = index2 === lines.length - 1 && !fragment2.continuesOnNext && !paragraphEndsWithLineBreak;
314587
314637
  const lineEl = this.renderLine(block, line, context, availableWidthOverride, fragment2.fromLine + index2, shouldSkipJustifyForLastLine, shouldUseResolvedListTextStart ? listFirstLineTextStartPx : undefined);
314588
- const isListFirstLine = Boolean(hasListFirstLineMarker && fragment2.markerTextWidth);
314589
- const isFirstLine = index2 === 0 && !fragment2.continuesFromPrev;
314590
314638
  if (!isListFirstLine) {
314591
314639
  if (hasExplicitSegmentPositioning) {
314592
314640
  if (isFirstLine && firstLineOffset !== 0) {
@@ -322134,11 +322182,11 @@ var init_zipper_DbkgrypV_es = __esm(() => {
322134
322182
 
322135
322183
  // ../../packages/superdoc/dist/super-editor.es.js
322136
322184
  var init_super_editor_es = __esm(() => {
322137
- init_src_DrQirVNk_es();
322138
- init_SuperConverter_DdDUYAlC_es();
322185
+ init_src_DtoTLJe0_es();
322186
+ init_SuperConverter_H0ERuAZY_es();
322139
322187
  init_jszip_C49i9kUs_es();
322140
322188
  init_xml_js_CqGKpaft_es();
322141
- init_create_headless_toolbar_BX6lNsQC_es();
322189
+ init_create_headless_toolbar_DqiJg0qo_es();
322142
322190
  init_constants_CGhJRd87_es();
322143
322191
  init_dist_B8HfvhaK_es();
322144
322192
  init_unified_Dsuw2be5_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.7.0-next.2",
3
+ "version": "0.7.0-next.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -25,20 +25,20 @@
25
25
  "@types/ws": "^8.5.13",
26
26
  "typescript": "^5.9.2",
27
27
  "@superdoc/document-api": "0.0.1",
28
- "@superdoc/super-editor": "0.0.1",
29
28
  "@superdoc/pm-adapter": "0.0.0",
30
- "superdoc": "1.25.0"
29
+ "superdoc": "1.25.0",
30
+ "@superdoc/super-editor": "0.0.1"
31
31
  },
32
32
  "module": "src/index.ts",
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
36
  "optionalDependencies": {
37
- "@superdoc-dev/cli-darwin-arm64": "0.7.0-next.2",
38
- "@superdoc-dev/cli-darwin-x64": "0.7.0-next.2",
39
- "@superdoc-dev/cli-linux-x64": "0.7.0-next.2",
40
- "@superdoc-dev/cli-linux-arm64": "0.7.0-next.2",
41
- "@superdoc-dev/cli-windows-x64": "0.7.0-next.2"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.7.0-next.4",
38
+ "@superdoc-dev/cli-darwin-x64": "0.7.0-next.4",
39
+ "@superdoc-dev/cli-linux-arm64": "0.7.0-next.4",
40
+ "@superdoc-dev/cli-windows-x64": "0.7.0-next.4",
41
+ "@superdoc-dev/cli-linux-x64": "0.7.0-next.4"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",