@superdoc-dev/cli 0.4.0-next.7 → 0.4.0-next.9

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 +52 -22
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -154597,7 +154597,7 @@ var init_remark_gfm_CjV8kaUy_es = __esm(() => {
154597
154597
  init_remark_gfm_z_sDF4ss_es();
154598
154598
  });
154599
154599
 
154600
- // ../../packages/superdoc/dist/chunks/src-Bfppcrj5.es.js
154600
+ // ../../packages/superdoc/dist/chunks/src-ej63VOXd.es.js
154601
154601
  function deleteProps(obj, propOrProps) {
154602
154602
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
154603
154603
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -165008,6 +165008,7 @@ async function measureParagraphBlock(block, maxWidth) {
165008
165008
  let hasSeenTextRun = false;
165009
165009
  let tabStopCursor = 0;
165010
165010
  let pendingTabAlignment = null;
165011
+ let pendingLeader = null;
165011
165012
  let pendingRunSpacing = 0;
165012
165013
  let lastAppliedTabAlign = null;
165013
165014
  const warnedTabVals = /* @__PURE__ */ new Set;
@@ -165040,12 +165041,17 @@ async function measureParagraphBlock(block, maxWidth) {
165040
165041
  startX = Math.max(0, target - segmentWidth / 2);
165041
165042
  else
165042
165043
  startX = Math.max(0, target);
165044
+ if (pendingLeader) {
165045
+ const effectiveIndent = lines.length === 0 ? indentLeft + rawFirstLineOffset : indentLeft;
165046
+ pendingLeader.to = startX + effectiveIndent;
165047
+ }
165043
165048
  currentLine.width = roundValue(startX);
165044
165049
  lastAppliedTabAlign = {
165045
165050
  target,
165046
165051
  val
165047
165052
  };
165048
165053
  pendingTabAlignment = null;
165054
+ pendingLeader = null;
165049
165055
  return startX;
165050
165056
  };
165051
165057
  const alignSegmentAtTab = (segmentText, font, runContext, segmentStartChar) => {
@@ -165148,6 +165154,7 @@ async function measureParagraphBlock(block, maxWidth) {
165148
165154
  }
165149
165155
  tabStopCursor = 0;
165150
165156
  pendingTabAlignment = null;
165157
+ pendingLeader = null;
165151
165158
  lastAppliedTabAlign = null;
165152
165159
  pendingRunSpacing = 0;
165153
165160
  continue;
@@ -165192,12 +165199,14 @@ async function measureParagraphBlock(block, maxWidth) {
165192
165199
  };
165193
165200
  tabStopCursor = 0;
165194
165201
  pendingTabAlignment = null;
165202
+ pendingLeader = null;
165195
165203
  lastAppliedTabAlign = null;
165196
165204
  pendingRunSpacing = 0;
165197
165205
  continue;
165198
165206
  }
165199
165207
  if (isTabRun$1(run2)) {
165200
165208
  activeTabGroup = null;
165209
+ pendingLeader = null;
165201
165210
  if (!currentLine)
165202
165211
  currentLine = {
165203
165212
  fromRun: runIndex,
@@ -165223,18 +165232,19 @@ async function measureParagraphBlock(block, maxWidth) {
165223
165232
  currentLine.maxFontSize = Math.max(currentLine.maxFontSize, 12);
165224
165233
  currentLine.toRun = runIndex;
165225
165234
  currentLine.toChar = 1;
165235
+ let currentLeader = null;
165226
165236
  if (stop && stop.leader && stop.leader !== "none") {
165227
165237
  const leaderStyle = stop.leader;
165228
- const relativeTarget = clampedTarget - effectiveIndent;
165229
- const from$1 = Math.min(originX, relativeTarget);
165230
- const to = Math.max(originX, relativeTarget);
165238
+ const from$1 = Math.min(originX + effectiveIndent, clampedTarget);
165239
+ const to = Math.max(originX + effectiveIndent, clampedTarget);
165231
165240
  if (!currentLine.leaders)
165232
165241
  currentLine.leaders = [];
165233
- currentLine.leaders.push({
165242
+ currentLeader = {
165234
165243
  from: from$1,
165235
165244
  to,
165236
165245
  style: leaderStyle
165237
- });
165246
+ };
165247
+ currentLine.leaders.push(currentLeader);
165238
165248
  }
165239
165249
  if (stop) {
165240
165250
  validateTabStopVal(stop);
@@ -165251,6 +165261,8 @@ async function measureParagraphBlock(block, maxWidth) {
165251
165261
  const beforeDecimal = groupMeasure.beforeDecimalWidth ?? groupMeasure.totalWidth;
165252
165262
  groupStartX = Math.max(0, relativeTarget - beforeDecimal);
165253
165263
  }
165264
+ if (currentLeader)
165265
+ currentLeader.to = groupStartX + effectiveIndent;
165254
165266
  activeTabGroup = {
165255
165267
  measure: groupMeasure,
165256
165268
  startX: groupStartX,
@@ -165261,13 +165273,16 @@ async function measureParagraphBlock(block, maxWidth) {
165261
165273
  currentLine.width = roundValue(groupStartX);
165262
165274
  }
165263
165275
  pendingTabAlignment = null;
165276
+ pendingLeader = null;
165264
165277
  } else
165265
165278
  pendingTabAlignment = {
165266
165279
  target: clampedTarget - effectiveIndent,
165267
165280
  val: stop.val
165268
165281
  };
165269
- } else
165282
+ } else {
165270
165283
  pendingTabAlignment = null;
165284
+ pendingLeader = null;
165285
+ }
165271
165286
  pendingRunSpacing = 0;
165272
165287
  continue;
165273
165288
  }
@@ -165320,6 +165335,7 @@ async function measureParagraphBlock(block, maxWidth) {
165320
165335
  lines.push(completedLine);
165321
165336
  tabStopCursor = 0;
165322
165337
  pendingTabAlignment = null;
165338
+ pendingLeader = null;
165323
165339
  lastAppliedTabAlign = null;
165324
165340
  activeTabGroup = null;
165325
165341
  currentLine = {
@@ -165419,6 +165435,7 @@ async function measureParagraphBlock(block, maxWidth) {
165419
165435
  lines.push(completedLine);
165420
165436
  tabStopCursor = 0;
165421
165437
  pendingTabAlignment = null;
165438
+ pendingLeader = null;
165422
165439
  lastAppliedTabAlign = null;
165423
165440
  currentLine = {
165424
165441
  fromRun: runIndex,
@@ -165507,6 +165524,7 @@ async function measureParagraphBlock(block, maxWidth) {
165507
165524
  lines.push(completedLine);
165508
165525
  tabStopCursor = 0;
165509
165526
  pendingTabAlignment = null;
165527
+ pendingLeader = null;
165510
165528
  lastAppliedTabAlign = null;
165511
165529
  currentLine = {
165512
165530
  fromRun: runIndex,
@@ -165593,6 +165611,7 @@ async function measureParagraphBlock(block, maxWidth) {
165593
165611
  lines.push(completedLine);
165594
165612
  tabStopCursor = 0;
165595
165613
  pendingTabAlignment = null;
165614
+ pendingLeader = null;
165596
165615
  lastAppliedTabAlign = null;
165597
165616
  activeTabGroup = null;
165598
165617
  currentLine = {
@@ -165649,6 +165668,7 @@ async function measureParagraphBlock(block, maxWidth) {
165649
165668
  lines.push(completedLine);
165650
165669
  tabStopCursor = 0;
165651
165670
  pendingTabAlignment = null;
165671
+ pendingLeader = null;
165652
165672
  currentLine = null;
165653
165673
  }
165654
165674
  const lineMaxWidth = getEffectiveWidth(lines.length === 0 ? initialAvailableWidth : contentWidth);
@@ -165693,6 +165713,7 @@ async function measureParagraphBlock(block, maxWidth) {
165693
165713
  lines.push(completedLine);
165694
165714
  tabStopCursor = 0;
165695
165715
  pendingTabAlignment = null;
165716
+ pendingLeader = null;
165696
165717
  currentLine = null;
165697
165718
  }
165698
165719
  } else if (isLastChunk) {
@@ -165812,6 +165833,7 @@ async function measureParagraphBlock(block, maxWidth) {
165812
165833
  lines.push(completedLine);
165813
165834
  tabStopCursor = 0;
165814
165835
  pendingTabAlignment = null;
165836
+ pendingLeader = null;
165815
165837
  currentLine = {
165816
165838
  fromRun: runIndex,
165817
165839
  fromChar: wordStartChar,
@@ -165864,6 +165886,7 @@ async function measureParagraphBlock(block, maxWidth) {
165864
165886
  lines.push(completedLine);
165865
165887
  tabStopCursor = 0;
165866
165888
  pendingTabAlignment = null;
165889
+ pendingLeader = null;
165867
165890
  currentLine = null;
165868
165891
  charPosInRun = wordEndNoSpace + 1;
165869
165892
  continue;
@@ -165901,6 +165924,7 @@ async function measureParagraphBlock(block, maxWidth) {
165901
165924
  }
165902
165925
  if (!isLastSegment) {
165903
165926
  pendingTabAlignment = null;
165927
+ pendingLeader = null;
165904
165928
  if (!currentLine)
165905
165929
  currentLine = {
165906
165930
  fromRun: runIndex,
@@ -165934,20 +165958,23 @@ async function measureParagraphBlock(block, maxWidth) {
165934
165958
  target: clampedTarget - effectiveIndent,
165935
165959
  val: stop.val
165936
165960
  };
165937
- } else
165961
+ } else {
165938
165962
  pendingTabAlignment = null;
165963
+ pendingLeader = null;
165964
+ }
165939
165965
  if (stop && stop.leader && stop.leader !== "none" && stop.leader !== "middleDot") {
165940
165966
  const leaderStyle = stop.leader;
165941
- const relativeTarget = clampedTarget - effectiveIndent;
165942
- const from$1 = Math.min(originX, relativeTarget);
165943
- const to = Math.max(originX, relativeTarget);
165967
+ const from$1 = Math.min(originX + effectiveIndent, clampedTarget);
165968
+ const to = Math.max(originX + effectiveIndent, clampedTarget);
165944
165969
  if (!currentLine.leaders)
165945
165970
  currentLine.leaders = [];
165946
- currentLine.leaders.push({
165971
+ const leader = {
165947
165972
  from: from$1,
165948
165973
  to,
165949
165974
  style: leaderStyle
165950
- });
165975
+ };
165976
+ currentLine.leaders.push(leader);
165977
+ pendingLeader = leader;
165951
165978
  }
165952
165979
  }
165953
165980
  }
@@ -229067,16 +229094,17 @@ var Node$13 = class Node$14 {
229067
229094
  const originX = cursorX;
229068
229095
  const { target, nextIndex, stop } = getNextTabStopPx(cursorX + effectiveIndent, tabStops, tabStopCursor);
229069
229096
  tabStopCursor = nextIndex;
229070
- const relativeTarget = (Number.isFinite(maxAbsWidth) ? Math.min(target, maxAbsWidth) : target) - effectiveIndent;
229097
+ const clampedTarget = Number.isFinite(maxAbsWidth) ? Math.min(target, maxAbsWidth) : target;
229098
+ const relativeTarget = clampedTarget - effectiveIndent;
229071
229099
  lineWidth = Math.max(lineWidth, relativeTarget);
229100
+ let currentLeader = null;
229072
229101
  if (stop?.leader && stop.leader !== "none") {
229073
- const from$1 = Math.min(originX, relativeTarget);
229074
- const to = Math.max(originX, relativeTarget);
229075
- leaders.push({
229076
- from: from$1,
229077
- to,
229102
+ currentLeader = {
229103
+ from: Math.min(originX + effectiveIndent, clampedTarget),
229104
+ to: Math.max(originX + effectiveIndent, clampedTarget),
229078
229105
  style: stop.leader
229079
- });
229106
+ };
229107
+ leaders.push(currentLeader);
229080
229108
  }
229081
229109
  const stopVal = stop?.val ?? "start";
229082
229110
  if (stopVal === "end" || stopVal === "center" || stopVal === "decimal") {
@@ -229091,6 +229119,8 @@ var Node$13 = class Node$14 {
229091
229119
  const beforeDecimal = groupMeasure.beforeDecimalWidth ?? groupMeasure.totalWidth;
229092
229120
  groupStartX = Math.max(0, relativeTarget - beforeDecimal);
229093
229121
  }
229122
+ if (currentLeader)
229123
+ currentLeader.to = groupStartX + effectiveIndent;
229094
229124
  pendingTabAlignStartX = groupStartX;
229095
229125
  } else
229096
229126
  cursorX = Math.max(cursorX, relativeTarget);
@@ -234175,7 +234205,7 @@ var Node$13 = class Node$14 {
234175
234205
  return;
234176
234206
  console.log(...args$1);
234177
234207
  }, 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;
234178
- var init_src_Bfppcrj5_es = __esm(() => {
234208
+ var init_src_ej63VOXd_es = __esm(() => {
234179
234209
  init_rolldown_runtime_B2q5OVn9_es();
234180
234210
  init_SuperConverter_Cqf2W6iO_es();
234181
234211
  init_jszip_ChlR43oI_es();
@@ -267494,7 +267524,7 @@ var init_zipper_DqXT7uTa_es = __esm(() => {
267494
267524
 
267495
267525
  // ../../packages/superdoc/dist/super-editor.es.js
267496
267526
  var init_super_editor_es = __esm(() => {
267497
- init_src_Bfppcrj5_es();
267527
+ init_src_ej63VOXd_es();
267498
267528
  init_SuperConverter_Cqf2W6iO_es();
267499
267529
  init_jszip_ChlR43oI_es();
267500
267530
  init_xml_js_40FWvL78_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.4.0-next.7",
3
+ "version": "0.4.0-next.9",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -22,19 +22,19 @@
22
22
  "typescript": "^5.9.2",
23
23
  "@superdoc/document-api": "0.0.1",
24
24
  "@superdoc/pm-adapter": "0.0.0",
25
- "superdoc": "1.21.0",
26
- "@superdoc/super-editor": "0.0.1"
25
+ "@superdoc/super-editor": "0.0.1",
26
+ "superdoc": "1.21.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.4.0-next.7",
34
- "@superdoc-dev/cli-darwin-x64": "0.4.0-next.7",
35
- "@superdoc-dev/cli-linux-x64": "0.4.0-next.7",
36
- "@superdoc-dev/cli-linux-arm64": "0.4.0-next.7",
37
- "@superdoc-dev/cli-windows-x64": "0.4.0-next.7"
33
+ "@superdoc-dev/cli-darwin-x64": "0.4.0-next.9",
34
+ "@superdoc-dev/cli-darwin-arm64": "0.4.0-next.9",
35
+ "@superdoc-dev/cli-linux-x64": "0.4.0-next.9",
36
+ "@superdoc-dev/cli-linux-arm64": "0.4.0-next.9",
37
+ "@superdoc-dev/cli-windows-x64": "0.4.0-next.9"
38
38
  },
39
39
  "scripts": {
40
40
  "predev": "node scripts/ensure-superdoc-build.js",