@superdoc-dev/cli 0.7.0-next.26 → 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 +35 -13
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -205572,7 +205572,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
205572
205572
  init_remark_gfm_BhnWr3yf_es();
205573
205573
  });
205574
205574
 
205575
- // ../../packages/superdoc/dist/chunks/src-BMZqLwoU.es.js
205575
+ // ../../packages/superdoc/dist/chunks/src-Bul2ihF9.es.js
205576
205576
  function deleteProps(obj, propOrProps) {
205577
205577
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
205578
205578
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -248666,8 +248666,10 @@ function layoutParagraphBlock(ctx$1, anchors) {
248666
248666
  state.trailingSpacing = 0;
248667
248667
  continue;
248668
248668
  }
248669
- if (neededSpacingBefore > 0)
248669
+ if (neededSpacingBefore > 0) {
248670
248670
  state.cursorY += neededSpacingBefore;
248671
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
248672
+ }
248671
248673
  state.trailingSpacing = 0;
248672
248674
  appliedSpacingBefore = true;
248673
248675
  }
@@ -248731,6 +248733,7 @@ function layoutParagraphBlock(ctx$1, anchors) {
248731
248733
  }
248732
248734
  state.page.fragments.push(fragment2);
248733
248735
  state.cursorY += borderExpansion.top + fragmentHeight + borderExpansion.bottom;
248736
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
248734
248737
  lastState = state;
248735
248738
  fromLine = slice2.toLine;
248736
248739
  }
@@ -248741,8 +248744,10 @@ function layoutParagraphBlock(ctx$1, anchors) {
248741
248744
  if (targetState.cursorY + spacingAfter > targetState.contentBottom) {
248742
248745
  targetState = advanceColumn(targetState);
248743
248746
  appliedSpacingAfter = 0;
248744
- } else
248747
+ } else {
248745
248748
  targetState.cursorY += spacingAfter;
248749
+ targetState.maxCursorY = Math.max(targetState.maxCursorY, targetState.cursorY);
248750
+ }
248746
248751
  targetState.trailingSpacing = appliedSpacingAfter;
248747
248752
  } else
248748
248753
  lastState.trailingSpacing = 0;
@@ -248802,6 +248807,7 @@ function layoutImageBlock({ block, measure, columns, ensurePage, advanceColumn,
248802
248807
  };
248803
248808
  state.page.fragments.push(fragment2);
248804
248809
  state.cursorY += requiredHeight;
248810
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
248805
248811
  }
248806
248812
  function layoutDrawingBlock({ block, measure, columns, ensurePage, advanceColumn, columnX }) {
248807
248813
  if (block.anchor?.isAnchored)
@@ -248861,6 +248867,7 @@ function layoutDrawingBlock({ block, measure, columns, ensurePage, advanceColumn
248861
248867
  };
248862
248868
  state.page.fragments.push(fragment2);
248863
248869
  state.cursorY += requiredHeight;
248870
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
248864
248871
  }
248865
248872
  function describeCellRenderBlocks(cellMeasure, cellBlock, cellPadding) {
248866
248873
  const measuredBlocks = cellMeasure.blocks;
@@ -249609,6 +249616,7 @@ function layoutMonolithicTable(context) {
249609
249616
  applyTableFragmentPmRange(fragment2, context.block, context.measure);
249610
249617
  state.page.fragments.push(fragment2);
249611
249618
  state.cursorY += height;
249619
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
249612
249620
  }
249613
249621
  function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColumn, columnX }) {
249614
249622
  let treatAsInline = false;
@@ -249684,6 +249692,7 @@ function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColu
249684
249692
  applyTableFragmentPmRange(fragment2, block, measure);
249685
249693
  state.page.fragments.push(fragment2);
249686
249694
  state.cursorY += height;
249695
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
249687
249696
  return;
249688
249697
  }
249689
249698
  const borderCollapse = block.attrs?.borderCollapse ?? (block.attrs?.cellSpacing != null ? "separate" : "collapse");
@@ -249755,6 +249764,7 @@ function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColu
249755
249764
  applyTableFragmentPmRange(fragment$1, block, measure);
249756
249765
  state.page.fragments.push(fragment$1);
249757
249766
  state.cursorY += fragmentHeight$1;
249767
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
249758
249768
  }
249759
249769
  if (!hasRemainingLinesAfterContinuation) {
249760
249770
  currentRow = rowIndex + 1;
@@ -249809,6 +249819,7 @@ function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColu
249809
249819
  applyTableFragmentPmRange(fragment$1, block, measure);
249810
249820
  state.page.fragments.push(fragment$1);
249811
249821
  state.cursorY += fragmentHeight$1;
249822
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
249812
249823
  pendingPartialRow = forcedPartialRow;
249813
249824
  samePagePartialContinuation = true;
249814
249825
  isTableContinuation = true;
@@ -249836,6 +249847,7 @@ function layoutTableBlock({ block, measure, columnWidth, ensurePage, advanceColu
249836
249847
  applyTableFragmentPmRange(fragment2, block, measure);
249837
249848
  state.page.fragments.push(fragment2);
249838
249849
  state.cursorY += fragmentHeight;
249850
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
249839
249851
  if (partialRow && !partialRow.isLastPart) {
249840
249852
  pendingPartialRow = partialRow;
249841
249853
  currentRow = partialRow.rowIndex;
@@ -250075,7 +250087,8 @@ function createPaginator(opts) {
250075
250087
  activeConstraintIndex: -1,
250076
250088
  trailingSpacing: 0,
250077
250089
  lastParagraphStyleId: undefined,
250078
- lastParagraphContextualSpacing: false
250090
+ lastParagraphContextualSpacing: false,
250091
+ maxCursorY: topMargin
250079
250092
  };
250080
250093
  states.push(state);
250081
250094
  pages.push(state.page);
@@ -250092,6 +250105,7 @@ function createPaginator(opts) {
250092
250105
  const advanceColumn = (state) => {
250093
250106
  const activeCols = getActiveColumnsForState(state);
250094
250107
  if (state.columnIndex < activeCols.count - 1) {
250108
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
250095
250109
  state.columnIndex += 1;
250096
250110
  if (state.activeConstraintIndex >= 0 && state.constraintBoundaries[state.activeConstraintIndex])
250097
250111
  state.cursorY = state.constraintBoundaries[state.activeConstraintIndex].y;
@@ -251116,8 +251130,11 @@ function layoutDocument(blocks2, measures, options = {}) {
251116
251130
  const columnX = paginator.columnX;
251117
251131
  const advanceColumn = paginator.advanceColumn;
251118
251132
  const startMidPageRegion = (state, newColumns) => {
251133
+ const regionStartY = Math.max(state.cursorY, state.maxCursorY);
251134
+ state.cursorY = regionStartY;
251135
+ state.maxCursorY = regionStartY;
251119
251136
  const boundary = {
251120
- y: state.cursorY,
251137
+ y: regionStartY,
251121
251138
  columns: newColumns
251122
251139
  };
251123
251140
  state.constraintBoundaries.push(boundary);
@@ -251126,7 +251143,7 @@ function layoutDocument(blocks2, measures, options = {}) {
251126
251143
  layoutLog(`[Layout] *** COLUMNS CHANGED MID-PAGE ***`);
251127
251144
  layoutLog(` OLD activeColumns: ${JSON.stringify(activeColumns)}`);
251128
251145
  layoutLog(` NEW activeColumns: ${JSON.stringify(newColumns)}`);
251129
- layoutLog(` Current page: ${state.page.number}, cursorY: ${state.cursorY}`);
251146
+ layoutLog(` Current page: ${state.page.number}, cursorY: ${state.cursorY}, maxCursorY: ${state.maxCursorY}`);
251130
251147
  activeColumns = cloneColumnLayout(newColumns);
251131
251148
  cachedColumnsState.state = null;
251132
251149
  const contentWidth = activePageSize.w - (activeLeftMargin + activeRightMargin);
@@ -251514,6 +251531,7 @@ function layoutDocument(blocks2, measures, options = {}) {
251514
251531
  }
251515
251532
  }
251516
251533
  state.cursorY = tableBottomY;
251534
+ state.maxCursorY = Math.max(state.maxCursorY, state.cursorY);
251517
251535
  }
251518
251536
  continue;
251519
251537
  }
@@ -260962,7 +260980,8 @@ async function measureParagraphBlock(block, maxWidth) {
260962
260980
  toRun: runIndex,
260963
260981
  toChar: 1,
260964
260982
  width: 0,
260965
- maxFontSize: 12,
260983
+ maxFontSize: lastFontSize,
260984
+ maxFontInfo: hasSeenTextRun ? undefined : fallbackFontInfo,
260966
260985
  maxWidth: getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : bodyContentWidth),
260967
260986
  segments: [],
260968
260987
  spaceCount: 0
@@ -260977,7 +260996,7 @@ async function measureParagraphBlock(block, maxWidth) {
260977
260996
  const tabAdvance = Math.max(0, clampedTarget - absCurrentX);
260978
260997
  currentLine.width = roundValue(currentLine.width + tabAdvance);
260979
260998
  run2.width = tabAdvance;
260980
- currentLine.maxFontSize = Math.max(currentLine.maxFontSize, 12);
260999
+ currentLine.maxFontSize = Math.max(currentLine.maxFontSize, lastFontSize);
260981
261000
  currentLine.toRun = runIndex;
260982
261001
  currentLine.toChar = 1;
260983
261002
  let currentLeader = null;
@@ -276999,7 +277018,7 @@ var Node$13 = class Node$14 {
276999
277018
  missingBoth: s2.missingBoth
277000
277019
  });
277001
277020
  }
277002
- }, 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) => {
277003
277022
  const merged = {
277004
277023
  ...DEFAULT_PAGE_STYLES,
277005
277024
  ...overrides || {}
@@ -277020,6 +277039,7 @@ var Node$13 = class Node$14 {
277020
277039
  }, fragmentStyles, lineStyles = (lineHeight) => ({
277021
277040
  lineHeight: `${lineHeight}px`,
277022
277041
  height: `${lineHeight}px`,
277042
+ fontSize: "0",
277023
277043
  position: "relative",
277024
277044
  display: "block",
277025
277045
  whiteSpace: "pre",
@@ -289575,7 +289595,7 @@ var Node$13 = class Node$14 {
289575
289595
  return;
289576
289596
  console.log(...args$1);
289577
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;
289578
- var init_src_BMZqLwoU_es = __esm(() => {
289598
+ var init_src_Bul2ihF9_es = __esm(() => {
289579
289599
  init_rolldown_runtime_Bg48TavK_es();
289580
289600
  init_SuperConverter_CpoUNyba_es();
289581
289601
  init_jszip_C49i9kUs_es();
@@ -317973,6 +317993,7 @@ function print() { __p += __j.call(arguments, '') }
317973
317993
  wrapper.style.verticalAlign = "middle";
317974
317994
  wrapper.style.minWidth = `${run2.width}px`;
317975
317995
  wrapper.style.minHeight = `${run2.height}px`;
317996
+ wrapper.style.fontSize = BROWSER_DEFAULT_FONT_SIZE;
317976
317997
  wrapper.dataset.layoutEpoch = String(this.layoutEpoch ?? 0);
317977
317998
  const mathEl = convertOmmlToMathml(run2.ommlJson, this.doc);
317978
317999
  if (mathEl)
@@ -318255,8 +318276,8 @@ function print() { __p += __j.call(arguments, '') }
318255
318276
  }
318256
318277
  if (run2.fontFamily)
318257
318278
  annotation.style.fontFamily = run2.fontFamily;
318258
- if (run2.fontSize) {
318259
- 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;
318260
318281
  annotation.style.fontSize = fontSize;
318261
318282
  }
318262
318283
  if (run2.textColor)
@@ -318383,6 +318404,7 @@ function print() { __p += __j.call(arguments, '') }
318383
318404
  span.dataset.pmStart = String(lineRange.pmStart);
318384
318405
  if (lineRange.pmEnd != null)
318385
318406
  span.dataset.pmEnd = String(lineRange.pmEnd);
318407
+ span.style.fontSize = `${line.lineHeight}px`;
318386
318408
  span.innerHTML = "&nbsp;";
318387
318409
  el.appendChild(span);
318388
318410
  }
@@ -324395,7 +324417,7 @@ var init_zipper_DbkgrypV_es = __esm(() => {
324395
324417
 
324396
324418
  // ../../packages/superdoc/dist/super-editor.es.js
324397
324419
  var init_super_editor_es = __esm(() => {
324398
- init_src_BMZqLwoU_es();
324420
+ init_src_Bul2ihF9_es();
324399
324421
  init_SuperConverter_CpoUNyba_es();
324400
324422
  init_jszip_C49i9kUs_es();
324401
324423
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.7.0-next.26",
3
+ "version": "0.7.0-next.27",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -26,19 +26,19 @@
26
26
  "typescript": "^5.9.2",
27
27
  "@superdoc/document-api": "0.0.1",
28
28
  "@superdoc/super-editor": "0.0.1",
29
- "superdoc": "1.26.0",
30
- "@superdoc/pm-adapter": "0.0.0"
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.26",
38
- "@superdoc-dev/cli-linux-x64": "0.7.0-next.26",
39
- "@superdoc-dev/cli-darwin-x64": "0.7.0-next.26",
40
- "@superdoc-dev/cli-windows-x64": "0.7.0-next.26",
41
- "@superdoc-dev/cli-linux-arm64": "0.7.0-next.26"
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",