@superdoc-dev/cli 0.7.0-next.25 → 0.7.0-next.27

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 +139 -38
  2. package/package.json +9 -9
package/dist/index.js CHANGED
@@ -65501,7 +65501,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
65501
65501
  emptyOptions2 = {};
65502
65502
  });
65503
65503
 
65504
- // ../../packages/superdoc/dist/chunks/SuperConverter-B4pTwmbr.es.js
65504
+ // ../../packages/superdoc/dist/chunks/SuperConverter-CpoUNyba.es.js
65505
65505
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
65506
65506
  const fieldValue = extension$1.config[field];
65507
65507
  if (typeof fieldValue === "function")
@@ -95578,6 +95578,9 @@ function parseColumnGap(gapTwips) {
95578
95578
  const gap = Number(gapTwips);
95579
95579
  return Number.isFinite(gap) ? gap / TWIPS_PER_INCH : DEFAULT_COLUMN_GAP_INCHES;
95580
95580
  }
95581
+ function parseColumnSeparator(rawValue) {
95582
+ return rawValue === "1" || rawValue === "true" || rawValue === "on" || rawValue === 1;
95583
+ }
95581
95584
  function extractNormalizedMargins(attrs) {
95582
95585
  const sectionMargins = attrs.sectionMargins;
95583
95586
  return {
@@ -95668,6 +95671,7 @@ function extractColumns(elements) {
95668
95671
  if (!cols?.attributes)
95669
95672
  return;
95670
95673
  const count2 = parseColumnCount(cols.attributes["w:num"]);
95674
+ const withSeparator = parseColumnSeparator(cols.attributes["w:sep"]);
95671
95675
  const equalWidthRaw = cols.attributes["w:equalWidth"];
95672
95676
  const equalWidth = equalWidthRaw === "0" || equalWidthRaw === 0 || equalWidthRaw === false ? false : equalWidthRaw === "1" || equalWidthRaw === 1 || equalWidthRaw === true ? true : undefined;
95673
95677
  const columnChildren = Array.isArray(cols.elements) ? cols.elements.filter((child) => child?.name === "w:col") : [];
@@ -95676,6 +95680,7 @@ function extractColumns(elements) {
95676
95680
  return {
95677
95681
  count: count2,
95678
95682
  gap: gapInches * PX_PER_INCH,
95683
+ withSeparator,
95679
95684
  ...widths.length > 0 ? { widths } : {},
95680
95685
  ...equalWidth !== undefined ? { equalWidth } : {}
95681
95686
  };
@@ -117250,7 +117255,7 @@ var isRegExp = (value) => {
117250
117255
  state.kern = kernNode.attributes["w:val"];
117251
117256
  }
117252
117257
  }, SuperConverter;
117253
- var init_SuperConverter_B4pTwmbr_es = __esm(() => {
117258
+ var init_SuperConverter_CpoUNyba_es = __esm(() => {
117254
117259
  init_rolldown_runtime_Bg48TavK_es();
117255
117260
  init_jszip_C49i9kUs_es();
117256
117261
  init_xml_js_CqGKpaft_es();
@@ -154530,7 +154535,7 @@ var init_SuperConverter_B4pTwmbr_es = __esm(() => {
154530
154535
  };
154531
154536
  });
154532
154537
 
154533
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-C636gY8A.es.js
154538
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-Dp1bWeQT.es.js
154534
154539
  function parseSizeUnit(val = "0") {
154535
154540
  const length3 = val.toString() || "0";
154536
154541
  const value = Number.parseFloat(length3);
@@ -157122,8 +157127,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
157122
157127
  }
157123
157128
  };
157124
157129
  };
157125
- var init_create_headless_toolbar_C636gY8A_es = __esm(() => {
157126
- init_SuperConverter_B4pTwmbr_es();
157130
+ var init_create_headless_toolbar_Dp1bWeQT_es = __esm(() => {
157131
+ init_SuperConverter_CpoUNyba_es();
157127
157132
  init_constants_CGhJRd87_es();
157128
157133
  init_dist_B8HfvhaK_es();
157129
157134
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -205567,7 +205572,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
205567
205572
  init_remark_gfm_BhnWr3yf_es();
205568
205573
  });
205569
205574
 
205570
- // ../../packages/superdoc/dist/chunks/src-DmdTSOpy.es.js
205575
+ // ../../packages/superdoc/dist/chunks/src-Bul2ihF9.es.js
205571
205576
  function deleteProps(obj, propOrProps) {
205572
205577
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
205573
205578
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -205979,7 +205984,8 @@ function cloneColumnLayout(columns) {
205979
205984
  count: columns.count,
205980
205985
  gap: columns.gap,
205981
205986
  ...Array.isArray(columns.widths) ? { widths: [...columns.widths] } : {},
205982
- ...columns.equalWidth !== undefined ? { equalWidth: columns.equalWidth } : {}
205987
+ ...columns.equalWidth !== undefined ? { equalWidth: columns.equalWidth } : {},
205988
+ ...columns.withSeparator !== undefined ? { withSeparator: columns.withSeparator } : {}
205983
205989
  } : {
205984
205990
  count: 1,
205985
205991
  gap: 0
@@ -206007,13 +206013,15 @@ function normalizeColumnLayout(input2, contentWidth, epsilon = 0.0001) {
206007
206013
  return {
206008
206014
  count: 1,
206009
206015
  gap: 0,
206010
- width: Math.max(0, contentWidth)
206016
+ width: Math.max(0, contentWidth),
206017
+ ...input2?.withSeparator !== undefined ? { withSeparator: input2.withSeparator } : {}
206011
206018
  };
206012
206019
  return {
206013
206020
  count: count2,
206014
206021
  gap,
206015
206022
  ...widths.length > 0 ? { widths } : {},
206016
206023
  ...input2?.equalWidth !== undefined ? { equalWidth: input2.equalWidth } : {},
206024
+ ...input2?.withSeparator !== undefined ? { withSeparator: input2.withSeparator } : {},
206017
206025
  width
206018
206026
  };
206019
206027
  }
@@ -248115,7 +248123,8 @@ function computeNextSectionPropsAtBreak(blocks2) {
248115
248123
  if (source.columns)
248116
248124
  props.columns = {
248117
248125
  count: source.columns.count,
248118
- gap: source.columns.gap
248126
+ gap: source.columns.gap,
248127
+ withSeparator: source.columns.withSeparator
248119
248128
  };
248120
248129
  if (source.orientation)
248121
248130
  props.orientation = source.orientation;
@@ -248136,8 +248145,8 @@ function getColumnConfig(blockColumns) {
248136
248145
  }
248137
248146
  function isColumnConfigChanging(blockColumns, activeColumns) {
248138
248147
  if (blockColumns)
248139
- return blockColumns.count !== activeColumns.count || blockColumns.gap !== activeColumns.gap || blockColumns.equalWidth !== activeColumns.equalWidth || !widthsEqual(blockColumns.widths, activeColumns.widths);
248140
- return activeColumns.count > 1;
248148
+ return blockColumns.count !== activeColumns.count || blockColumns.gap !== activeColumns.gap || Boolean(blockColumns.withSeparator) !== Boolean(activeColumns.withSeparator) || blockColumns.equalWidth !== activeColumns.equalWidth || !widthsEqual(blockColumns.widths, activeColumns.widths);
248149
+ return activeColumns.count > 1 || Boolean(activeColumns.withSeparator);
248141
248150
  }
248142
248151
  function scheduleSectionBreak(block, state, baseMargins, maxHeaderContentHeight = 0, maxFooterContentHeight = 0) {
248143
248152
  const next2 = { ...state };
@@ -248657,8 +248666,10 @@ function layoutParagraphBlock(ctx$1, anchors) {
248657
248666
  state.trailingSpacing = 0;
248658
248667
  continue;
248659
248668
  }
248660
- if (neededSpacingBefore > 0)
248669
+ if (neededSpacingBefore > 0) {
248661
248670
  state.cursorY += neededSpacingBefore;
248671
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
248672
+ }
248662
248673
  state.trailingSpacing = 0;
248663
248674
  appliedSpacingBefore = true;
248664
248675
  }
@@ -248722,6 +248733,7 @@ function layoutParagraphBlock(ctx$1, anchors) {
248722
248733
  }
248723
248734
  state.page.fragments.push(fragment2);
248724
248735
  state.cursorY += borderExpansion.top + fragmentHeight + borderExpansion.bottom;
248736
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
248725
248737
  lastState = state;
248726
248738
  fromLine = slice2.toLine;
248727
248739
  }
@@ -248732,8 +248744,10 @@ function layoutParagraphBlock(ctx$1, anchors) {
248732
248744
  if (targetState.cursorY + spacingAfter > targetState.contentBottom) {
248733
248745
  targetState = advanceColumn(targetState);
248734
248746
  appliedSpacingAfter = 0;
248735
- } else
248747
+ } else {
248736
248748
  targetState.cursorY += spacingAfter;
248749
+ targetState.maxCursorY = Math.max(targetState.maxCursorY, targetState.cursorY);
248750
+ }
248737
248751
  targetState.trailingSpacing = appliedSpacingAfter;
248738
248752
  } else
248739
248753
  lastState.trailingSpacing = 0;
@@ -248793,6 +248807,7 @@ function layoutImageBlock({ block, measure, columns, ensurePage, advanceColumn,
248793
248807
  };
248794
248808
  state.page.fragments.push(fragment2);
248795
248809
  state.cursorY += requiredHeight;
248810
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
248796
248811
  }
248797
248812
  function layoutDrawingBlock({ block, measure, columns, ensurePage, advanceColumn, columnX }) {
248798
248813
  if (block.anchor?.isAnchored)
@@ -248852,6 +248867,7 @@ function layoutDrawingBlock({ block, measure, columns, ensurePage, advanceColumn
248852
248867
  };
248853
248868
  state.page.fragments.push(fragment2);
248854
248869
  state.cursorY += requiredHeight;
248870
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
248855
248871
  }
248856
248872
  function describeCellRenderBlocks(cellMeasure, cellBlock, cellPadding) {
248857
248873
  const measuredBlocks = cellMeasure.blocks;
@@ -249600,6 +249616,7 @@ function layoutMonolithicTable(context) {
249600
249616
  applyTableFragmentPmRange(fragment2, context.block, context.measure);
249601
249617
  state.page.fragments.push(fragment2);
249602
249618
  state.cursorY += height;
249619
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
249603
249620
  }
249604
249621
  function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColumn, columnX }) {
249605
249622
  let treatAsInline = false;
@@ -249675,6 +249692,7 @@ function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColu
249675
249692
  applyTableFragmentPmRange(fragment2, block, measure);
249676
249693
  state.page.fragments.push(fragment2);
249677
249694
  state.cursorY += height;
249695
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
249678
249696
  return;
249679
249697
  }
249680
249698
  const borderCollapse = block.attrs?.borderCollapse ?? (block.attrs?.cellSpacing != null ? "separate" : "collapse");
@@ -249746,6 +249764,7 @@ function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColu
249746
249764
  applyTableFragmentPmRange(fragment$1, block, measure);
249747
249765
  state.page.fragments.push(fragment$1);
249748
249766
  state.cursorY += fragmentHeight$1;
249767
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
249749
249768
  }
249750
249769
  if (!hasRemainingLinesAfterContinuation) {
249751
249770
  currentRow = rowIndex + 1;
@@ -249800,6 +249819,7 @@ function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColu
249800
249819
  applyTableFragmentPmRange(fragment$1, block, measure);
249801
249820
  state.page.fragments.push(fragment$1);
249802
249821
  state.cursorY += fragmentHeight$1;
249822
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
249803
249823
  pendingPartialRow = forcedPartialRow;
249804
249824
  samePagePartialContinuation = true;
249805
249825
  isTableContinuation = true;
@@ -249827,6 +249847,7 @@ function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColu
249827
249847
  applyTableFragmentPmRange(fragment2, block, measure);
249828
249848
  state.page.fragments.push(fragment2);
249829
249849
  state.cursorY += fragmentHeight;
249850
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
249830
249851
  if (partialRow && !partialRow.isLastPart) {
249831
249852
  pendingPartialRow = partialRow;
249832
249853
  currentRow = partialRow.rowIndex;
@@ -250066,7 +250087,8 @@ function createPaginator(opts) {
250066
250087
  activeConstraintIndex: -1,
250067
250088
  trailingSpacing: 0,
250068
250089
  lastParagraphStyleId: undefined,
250069
- lastParagraphContextualSpacing: false
250090
+ lastParagraphContextualSpacing: false,
250091
+ maxCursorY: topMargin
250070
250092
  };
250071
250093
  states.push(state);
250072
250094
  pages.push(state.page);
@@ -250083,6 +250105,7 @@ function createPaginator(opts) {
250083
250105
  const advanceColumn = (state) => {
250084
250106
  const activeCols = getActiveColumnsForState(state);
250085
250107
  if (state.columnIndex < activeCols.count - 1) {
250108
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
250086
250109
  state.columnIndex += 1;
250087
250110
  if (state.activeConstraintIndex >= 0 && state.constraintBoundaries[state.activeConstraintIndex])
250088
250111
  state.cursorY = state.constraintBoundaries[state.activeConstraintIndex].y;
@@ -250784,7 +250807,7 @@ function layoutDocument(blocks2, measures, options = {}) {
250784
250807
  if (block.orientation)
250785
250808
  next2.pendingOrientation = block.orientation;
250786
250809
  const sectionType = block.type ?? "continuous";
250787
- const isColumnsChanging = block.columns && (block.columns.count !== next2.activeColumns.count || block.columns.gap !== next2.activeColumns.gap || block.columns.equalWidth !== next2.activeColumns.equalWidth || !widthsEqual(block.columns.widths, next2.activeColumns.widths)) || !block.columns && next2.activeColumns.count > 1;
250810
+ const isColumnsChanging = block.columns && (block.columns.count !== next2.activeColumns.count || block.columns.gap !== next2.activeColumns.gap || Boolean(block.columns.withSeparator) !== Boolean(next2.activeColumns.withSeparator) || block.columns.equalWidth !== next2.activeColumns.equalWidth || !widthsEqual(block.columns.widths, next2.activeColumns.widths)) || !block.columns && (next2.activeColumns.count > 1 || Boolean(next2.activeColumns.withSeparator));
250788
250811
  const sectionIndexRaw = block.attrs?.sectionIndex;
250789
250812
  const metadataIndex = typeof sectionIndexRaw === "number" ? sectionIndexRaw : Number(sectionIndexRaw ?? NaN);
250790
250813
  if (Number.isFinite(metadataIndex))
@@ -250873,6 +250896,12 @@ function layoutDocument(blocks2, measures, options = {}) {
250873
250896
  page.size = pageSizeOverride;
250874
250897
  if (activeOrientation)
250875
250898
  page.orientation = activeOrientation;
250899
+ if (activeColumns.count > 1)
250900
+ page.columns = {
250901
+ count: activeColumns.count,
250902
+ gap: activeColumns.gap,
250903
+ withSeparator: activeColumns.withSeparator
250904
+ };
250876
250905
  if (activeVAlign && activeVAlign !== "top") {
250877
250906
  page.vAlign = activeVAlign;
250878
250907
  page.baseMargins = {
@@ -251101,8 +251130,11 @@ function layoutDocument(blocks2, measures, options = {}) {
251101
251130
  const columnX = paginator.columnX;
251102
251131
  const advanceColumn = paginator.advanceColumn;
251103
251132
  const startMidPageRegion = (state, newColumns) => {
251133
+ const regionStartY = Math.max(state.cursorY, state.maxCursorY);
251134
+ state.cursorY = regionStartY;
251135
+ state.maxCursorY = regionStartY;
251104
251136
  const boundary = {
251105
- y: state.cursorY,
251137
+ y: regionStartY,
251106
251138
  columns: newColumns
251107
251139
  };
251108
251140
  state.constraintBoundaries.push(boundary);
@@ -251111,7 +251143,7 @@ function layoutDocument(blocks2, measures, options = {}) {
251111
251143
  layoutLog(`[Layout] *** COLUMNS CHANGED MID-PAGE ***`);
251112
251144
  layoutLog(` OLD activeColumns: ${JSON.stringify(activeColumns)}`);
251113
251145
  layoutLog(` NEW activeColumns: ${JSON.stringify(newColumns)}`);
251114
- layoutLog(` Current page: ${state.page.number}, cursorY: ${state.cursorY}`);
251146
+ layoutLog(` Current page: ${state.page.number}, cursorY: ${state.cursorY}, maxCursorY: ${state.maxCursorY}`);
251115
251147
  activeColumns = cloneColumnLayout(newColumns);
251116
251148
  cachedColumnsState.state = null;
251117
251149
  const contentWidth = activePageSize.w - (activeLeftMargin + activeRightMargin);
@@ -251499,6 +251531,7 @@ function layoutDocument(blocks2, measures, options = {}) {
251499
251531
  }
251500
251532
  }
251501
251533
  state.cursorY = tableBottomY;
251534
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
251502
251535
  }
251503
251536
  continue;
251504
251537
  }
@@ -251744,12 +251777,38 @@ function layoutDocument(blocks2, measures, options = {}) {
251744
251777
  }
251745
251778
  }
251746
251779
  }
251780
+ for (const state of states) {
251781
+ const boundaries = state.constraintBoundaries;
251782
+ if (boundaries.length === 0)
251783
+ continue;
251784
+ const regions = [];
251785
+ const firstRegionColumns = state.page.columns ?? {
251786
+ count: 1,
251787
+ gap: 0
251788
+ };
251789
+ regions.push({
251790
+ yStart: state.topMargin,
251791
+ yEnd: boundaries[0].y,
251792
+ columns: firstRegionColumns
251793
+ });
251794
+ for (let i4 = 0;i4 < boundaries.length; i4++) {
251795
+ const start$1 = boundaries[i4];
251796
+ const end$1 = boundaries[i4 + 1];
251797
+ regions.push({
251798
+ yStart: start$1.y,
251799
+ yEnd: end$1 ? end$1.y : state.contentBottom,
251800
+ columns: start$1.columns
251801
+ });
251802
+ }
251803
+ state.page.columnRegions = regions;
251804
+ }
251747
251805
  return {
251748
251806
  pageSize,
251749
251807
  pages,
251750
251808
  columns: activeColumns.count > 1 ? {
251751
251809
  count: activeColumns.count,
251752
- gap: activeColumns.gap
251810
+ gap: activeColumns.gap,
251811
+ withSeparator: activeColumns.withSeparator
251753
251812
  } : undefined
251754
251813
  };
251755
251814
  }
@@ -253444,10 +253503,7 @@ async function incrementalLayout(previousBlocks, _previousLayout, nextBlocks, op
253444
253503
  const marginLeft = normalizeMargin(page.margins.left, normalizeMargin(options.margins?.left, DEFAULT_MARGINS$1.left));
253445
253504
  const marginRight = normalizeMargin(page.margins.right, normalizeMargin(options.margins?.right, DEFAULT_MARGINS$1.right));
253446
253505
  const pageContentWidth = pageSize.w - (marginLeft + marginRight);
253447
- const fallbackColumns = normalizeColumnsForFootnotes(options.columns ?? {
253448
- count: 1,
253449
- gap: 0
253450
- }, pageContentWidth);
253506
+ const fallbackColumns = normalizeColumnsForFootnotes(options.columns ?? SINGLE_COLUMN_DEFAULT, pageContentWidth);
253451
253507
  const columns = pageColumns$1.get(pageIndex) ?? {
253452
253508
  ...fallbackColumns,
253453
253509
  left: marginLeft,
@@ -255514,7 +255570,8 @@ function parseColumns(raw) {
255514
255570
  return;
255515
255571
  return {
255516
255572
  count: Math.max(1, Math.floor(rawCount)),
255517
- gap: inchesToPx(columnSource.space ?? columnSource.gap) ?? 0
255573
+ gap: inchesToPx(columnSource.space ?? columnSource.gap) ?? 0,
255574
+ withSeparator: typeof columnSource.withSeparator === "boolean" ? columnSource.withSeparator : false
255518
255575
  };
255519
255576
  }
255520
255577
  function createLayoutMetrics(perf, startMark, layout, blocks2) {
@@ -260923,7 +260980,8 @@ async function measureParagraphBlock(block, maxWidth) {
260923
260980
  toRun: runIndex,
260924
260981
  toChar: 1,
260925
260982
  width: 0,
260926
- maxFontSize: 12,
260983
+ maxFontSize: lastFontSize,
260984
+ maxFontInfo: hasSeenTextRun ? undefined : fallbackFontInfo,
260927
260985
  maxWidth: getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : bodyContentWidth),
260928
260986
  segments: [],
260929
260987
  spaceCount: 0
@@ -260938,7 +260996,7 @@ async function measureParagraphBlock(block, maxWidth) {
260938
260996
  const tabAdvance = Math.max(0, clampedTarget - absCurrentX);
260939
260997
  currentLine.width = roundValue(currentLine.width + tabAdvance);
260940
260998
  run2.width = tabAdvance;
260941
- currentLine.maxFontSize = Math.max(currentLine.maxFontSize, 12);
260999
+ currentLine.maxFontSize = Math.max(currentLine.maxFontSize, lastFontSize);
260942
261000
  currentLine.toRun = runIndex;
260943
261001
  currentLine.toChar = 1;
260944
261002
  let currentLeader = null;
@@ -276960,7 +277018,7 @@ var Node$13 = class Node$14 {
276960
277018
  missingBoth: s2.missingBoth
276961
277019
  });
276962
277020
  }
276963
- }, globalValidationStats, DEFAULT_PPI = 96, DEFAULT_RULER_HEIGHT = 25, TICK_SPACING_PX, RULER_CLASS_NAMES, RULER_STYLES, rulerStylesInjected = false, CLASS_NAMES$1, DEFAULT_PAGE_STYLES, containerStyles, containerStylesHorizontal, spreadStyles, pageStyles = (width, height, overrides) => {
277021
+ }, globalValidationStats, DEFAULT_PPI = 96, DEFAULT_RULER_HEIGHT = 25, TICK_SPACING_PX, RULER_CLASS_NAMES, RULER_STYLES, rulerStylesInjected = false, BROWSER_DEFAULT_FONT_SIZE = "16px", CLASS_NAMES$1, DEFAULT_PAGE_STYLES, containerStyles, containerStylesHorizontal, spreadStyles, pageStyles = (width, height, overrides) => {
276964
277022
  const merged = {
276965
277023
  ...DEFAULT_PAGE_STYLES,
276966
277024
  ...overrides || {}
@@ -276981,6 +277039,7 @@ var Node$13 = class Node$14 {
276981
277039
  }, fragmentStyles, lineStyles = (lineHeight) => ({
276982
277040
  lineHeight: `${lineHeight}px`,
276983
277041
  height: `${lineHeight}px`,
277042
+ fontSize: "0",
276984
277043
  position: "relative",
276985
277044
  display: "block",
276986
277045
  whiteSpace: "pre",
@@ -281916,10 +281975,7 @@ var Node$13 = class Node$14 {
281916
281975
  const marginRight = normalizeMargin(page.margins?.right, normalizeMargin(options.margins?.right, DEFAULT_MARGINS$1.right));
281917
281976
  const contentWidth = pageSize.w - (marginLeft + marginRight);
281918
281977
  const sectionIndex = page.sectionIndex ?? 0;
281919
- const normalized = normalizeColumnsForFootnotes(sectionColumns.get(sectionIndex) ?? options.columns ?? {
281920
- count: 1,
281921
- gap: 0
281922
- }, contentWidth);
281978
+ const normalized = normalizeColumnsForFootnotes(sectionColumns.get(sectionIndex) ?? options.columns ?? SINGLE_COLUMN_DEFAULT, contentWidth);
281923
281979
  result.set(pageIndex, {
281924
281980
  ...normalized,
281925
281981
  left: marginLeft,
@@ -289539,12 +289595,12 @@ var Node$13 = class Node$14 {
289539
289595
  return;
289540
289596
  console.log(...args$1);
289541
289597
  }, 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;
289542
- var init_src_DmdTSOpy_es = __esm(() => {
289598
+ var init_src_Bul2ihF9_es = __esm(() => {
289543
289599
  init_rolldown_runtime_Bg48TavK_es();
289544
- init_SuperConverter_B4pTwmbr_es();
289600
+ init_SuperConverter_CpoUNyba_es();
289545
289601
  init_jszip_C49i9kUs_es();
289546
289602
  init_uuid_qzgm05fK_es();
289547
- init_create_headless_toolbar_C636gY8A_es();
289603
+ init_create_headless_toolbar_Dp1bWeQT_es();
289548
289604
  init_constants_CGhJRd87_es();
289549
289605
  init_dist_B8HfvhaK_es();
289550
289606
  init_unified_Dsuw2be5_es();
@@ -315994,6 +316050,7 @@ function print() { __p += __j.call(arguments, '') }
315994
316050
  el.appendChild(this.renderFragment(fragment2, contextBase, sdtBoundary, betweenBorderFlags.get(index2), resolvedItem));
315995
316051
  });
315996
316052
  this.renderDecorationsForPage(el, page, pageIndex);
316053
+ this.renderColumnSeparators(el, page, width, height);
315997
316054
  return el;
315998
316055
  }
315999
316056
  renderPageRuler(pageWidthPx, page) {
@@ -316041,6 +316098,47 @@ function print() { __p += __j.call(arguments, '') }
316041
316098
  return null;
316042
316099
  }
316043
316100
  }
316101
+ renderColumnSeparators(pageEl, page, pageWidth, pageHeight) {
316102
+ if (!this.doc)
316103
+ return;
316104
+ if (!page.margins)
316105
+ return;
316106
+ const leftMargin = page.margins.left ?? 0;
316107
+ const rightMargin = page.margins.right ?? 0;
316108
+ const topMargin = page.margins.top ?? 0;
316109
+ const bottomMargin = page.margins.bottom ?? 0;
316110
+ const contentWidth = pageWidth - leftMargin - rightMargin;
316111
+ const regions = page.columnRegions ?? (page.columns ? [{
316112
+ yStart: topMargin,
316113
+ yEnd: pageHeight - bottomMargin,
316114
+ columns: page.columns
316115
+ }] : []);
316116
+ for (const region of regions) {
316117
+ const { columns, yStart, yEnd } = region;
316118
+ if (!columns.withSeparator)
316119
+ continue;
316120
+ if (columns.count <= 1)
316121
+ continue;
316122
+ const columnWidth = (contentWidth - columns.gap * (columns.count - 1)) / columns.count;
316123
+ if (columnWidth <= 1)
316124
+ continue;
316125
+ const regionHeight = yEnd - yStart;
316126
+ if (regionHeight <= 0)
316127
+ continue;
316128
+ for (let i4 = 0;i4 < columns.count - 1; i4++) {
316129
+ const separatorX = leftMargin + (i4 + 1) * columnWidth + i4 * columns.gap + columns.gap / 2;
316130
+ const separatorEl = this.doc.createElement("div");
316131
+ separatorEl.style.position = "absolute";
316132
+ separatorEl.style.left = `${separatorX}px`;
316133
+ separatorEl.style.top = `${yStart}px`;
316134
+ separatorEl.style.height = `${regionHeight}px`;
316135
+ separatorEl.style.width = "1px";
316136
+ separatorEl.style.backgroundColor = "#000000";
316137
+ separatorEl.style.pointerEvents = "none";
316138
+ pageEl.appendChild(separatorEl);
316139
+ }
316140
+ }
316141
+ }
316044
316142
  renderDecorationsForPage(pageEl, page, pageIndex) {
316045
316143
  if (this.isSemanticFlow)
316046
316144
  return;
@@ -316375,6 +316473,7 @@ function print() { __p += __j.call(arguments, '') }
316375
316473
  };
316376
316474
  });
316377
316475
  this.renderDecorationsForPage(el, page, pageIndex);
316476
+ this.renderColumnSeparators(el, page, pageSize.w, pageSize.h);
316378
316477
  return {
316379
316478
  element: el,
316380
316479
  fragments: fragmentStates
@@ -317894,6 +317993,7 @@ function print() { __p += __j.call(arguments, '') }
317894
317993
  wrapper.style.verticalAlign = "middle";
317895
317994
  wrapper.style.minWidth = `${run2.width}px`;
317896
317995
  wrapper.style.minHeight = `${run2.height}px`;
317996
+ wrapper.style.fontSize = BROWSER_DEFAULT_FONT_SIZE;
317897
317997
  wrapper.dataset.layoutEpoch = String(this.layoutEpoch ?? 0);
317898
317998
  const mathEl = convertOmmlToMathml(run2.ommlJson, this.doc);
317899
317999
  if (mathEl)
@@ -318176,8 +318276,8 @@ function print() { __p += __j.call(arguments, '') }
318176
318276
  }
318177
318277
  if (run2.fontFamily)
318178
318278
  annotation.style.fontFamily = run2.fontFamily;
318179
- if (run2.fontSize) {
318180
- const fontSize = typeof run2.fontSize === "number" ? `${run2.fontSize}pt` : run2.fontSize;
318279
+ {
318280
+ const fontSize = run2.fontSize ? typeof run2.fontSize === "number" ? `${run2.fontSize}pt` : run2.fontSize : BROWSER_DEFAULT_FONT_SIZE;
318181
318281
  annotation.style.fontSize = fontSize;
318182
318282
  }
318183
318283
  if (run2.textColor)
@@ -318304,6 +318404,7 @@ function print() { __p += __j.call(arguments, '') }
318304
318404
  span.dataset.pmStart = String(lineRange.pmStart);
318305
318405
  if (lineRange.pmEnd != null)
318306
318406
  span.dataset.pmEnd = String(lineRange.pmEnd);
318407
+ span.style.fontSize = `${line.lineHeight}px`;
318307
318408
  span.innerHTML = "&nbsp;";
318308
318409
  el.appendChild(span);
318309
318410
  }
@@ -324316,11 +324417,11 @@ var init_zipper_DbkgrypV_es = __esm(() => {
324316
324417
 
324317
324418
  // ../../packages/superdoc/dist/super-editor.es.js
324318
324419
  var init_super_editor_es = __esm(() => {
324319
- init_src_DmdTSOpy_es();
324320
- init_SuperConverter_B4pTwmbr_es();
324420
+ init_src_Bul2ihF9_es();
324421
+ init_SuperConverter_CpoUNyba_es();
324321
324422
  init_jszip_C49i9kUs_es();
324322
324423
  init_xml_js_CqGKpaft_es();
324323
- init_create_headless_toolbar_C636gY8A_es();
324424
+ init_create_headless_toolbar_Dp1bWeQT_es();
324324
324425
  init_constants_CGhJRd87_es();
324325
324426
  init_dist_B8HfvhaK_es();
324326
324427
  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.25",
3
+ "version": "0.7.0-next.27",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -24,21 +24,21 @@
24
24
  "@types/node": "22.19.2",
25
25
  "@types/ws": "^8.5.13",
26
26
  "typescript": "^5.9.2",
27
- "@superdoc/pm-adapter": "0.0.0",
27
+ "@superdoc/document-api": "0.0.1",
28
28
  "@superdoc/super-editor": "0.0.1",
29
- "superdoc": "1.26.0",
30
- "@superdoc/document-api": "0.0.1"
29
+ "@superdoc/pm-adapter": "0.0.0",
30
+ "superdoc": "1.26.0"
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.25",
38
- "@superdoc-dev/cli-darwin-x64": "0.7.0-next.25",
39
- "@superdoc-dev/cli-linux-x64": "0.7.0-next.25",
40
- "@superdoc-dev/cli-linux-arm64": "0.7.0-next.25",
41
- "@superdoc-dev/cli-windows-x64": "0.7.0-next.25"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.7.0-next.27",
38
+ "@superdoc-dev/cli-darwin-x64": "0.7.0-next.27",
39
+ "@superdoc-dev/cli-linux-x64": "0.7.0-next.27",
40
+ "@superdoc-dev/cli-windows-x64": "0.7.0-next.27",
41
+ "@superdoc-dev/cli-linux-arm64": "0.7.0-next.27"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",