@superdoc-dev/cli 0.5.0-next.76 → 0.5.0-next.77

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 +30 -27
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -65886,7 +65886,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
65886
65886
  emptyOptions2 = {};
65887
65887
  });
65888
65888
 
65889
- // ../../packages/superdoc/dist/chunks/SuperConverter-DKPcCGTm.es.js
65889
+ // ../../packages/superdoc/dist/chunks/SuperConverter--qnhRLCa.es.js
65890
65890
  function getExtensionConfigField(extension$1, field, context = { name: "" }) {
65891
65891
  const fieldValue = extension$1.config[field];
65892
65892
  if (typeof fieldValue === "function")
@@ -114722,16 +114722,20 @@ var isRegExp = (value) => {
114722
114722
  }, config$13, translator$21, XML_NODE_NAME$12 = "sd:tableOfContents", SD_NODE_NAME$10 = "tableOfContents", encode$16 = (params3) => {
114723
114723
  const { nodes = [], nodeListHandler } = params3 || {};
114724
114724
  const node3 = nodes[0];
114725
- const processedContent = nodeListHandler.handler({
114725
+ let processedContent = nodeListHandler.handler({
114726
114726
  ...params3,
114727
114727
  nodes: node3.elements || []
114728
114728
  });
114729
+ if (!(processedContent || []).some((child) => child?.type === "paragraph"))
114730
+ processedContent = [{
114731
+ type: "paragraph",
114732
+ content: processedContent.filter((child) => Boolean(child && child.type))
114733
+ }];
114734
+ const attrs = { instruction: node3.attributes?.instruction || "" };
114735
+ attrs.rightAlignPageNumbers = deriveRightAlignPageNumbers(processedContent);
114729
114736
  return {
114730
114737
  type: "tableOfContents",
114731
- attrs: {
114732
- instruction: node3.attributes?.instruction || "",
114733
- rightAlignPageNumbers: deriveRightAlignPageNumbers(processedContent)
114734
- },
114738
+ attrs,
114735
114739
  content: processedContent
114736
114740
  };
114737
114741
  }, decode$16 = (params3) => {
@@ -117503,7 +117507,7 @@ var isRegExp = (value) => {
117503
117507
  state.kern = kernNode.attributes["w:val"];
117504
117508
  }
117505
117509
  }, SuperConverter;
117506
- var init_SuperConverter_DKPcCGTm_es = __esm(() => {
117510
+ var init_SuperConverter_qnhRLCa_es = __esm(() => {
117507
117511
  init_rolldown_runtime_Bg48TavK_es();
117508
117512
  init_jszip_C49i9kUs_es();
117509
117513
  init_xml_js_CqGKpaft_es();
@@ -154595,7 +154599,7 @@ var init_SuperConverter_DKPcCGTm_es = __esm(() => {
154595
154599
  };
154596
154600
  });
154597
154601
 
154598
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-BTSQjUTS.es.js
154602
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-DSyaYMVl.es.js
154599
154603
  function parseSizeUnit(val = "0") {
154600
154604
  const length3 = val.toString() || "0";
154601
154605
  const value = Number.parseFloat(length3);
@@ -156206,8 +156210,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, Extension = class Extension2 {
156206
156210
  return false;
156207
156211
  return Boolean(checker(attrs));
156208
156212
  };
156209
- var init_create_headless_toolbar_BTSQjUTS_es = __esm(() => {
156210
- init_SuperConverter_DKPcCGTm_es();
156213
+ var init_create_headless_toolbar_DSyaYMVl_es = __esm(() => {
156214
+ init_SuperConverter_qnhRLCa_es();
156211
156215
  init_constants_CGhJRd87_es();
156212
156216
  init_dist_B8HfvhaK_es();
156213
156217
  CSS_DIMENSION_REGEX = /[\d-.]+(\w+)$/;
@@ -204645,7 +204649,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
204645
204649
  init_remark_gfm_BhnWr3yf_es();
204646
204650
  });
204647
204651
 
204648
- // ../../packages/superdoc/dist/chunks/src-osCd4WFE.es.js
204652
+ // ../../packages/superdoc/dist/chunks/src-CFXu8Kfm.es.js
204649
204653
  function deleteProps(obj, propOrProps) {
204650
204654
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
204651
204655
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -222912,11 +222916,15 @@ function resolveStructuralRangeRewrite(doc$12, absFrom, absTo, step3) {
222912
222916
  });
222913
222917
  return null;
222914
222918
  }
222915
- const replacementBlocks = payload.blocks;
222919
+ const effectiveBlocks = [...payload.blocks];
222920
+ if (payload.splitBefore)
222921
+ effectiveBlocks.unshift("");
222922
+ if (payload.splitAfter)
222923
+ effectiveBlocks.push("");
222916
222924
  if (replacesEntireTextblock) {
222917
- if (replacementBlocks.length <= 1) {
222925
+ if (effectiveBlocks.length <= 1) {
222918
222926
  debugTextRewrite("structural rewrite skipped: whole-textblock rewrite resolved to one block", {
222919
- replacementBlocks,
222927
+ replacementBlocks: effectiveBlocks,
222920
222928
  stepId: step3.id
222921
222929
  });
222922
222930
  return null;
@@ -222931,13 +222939,13 @@ function resolveStructuralRangeRewrite(doc$12, absFrom, absTo, step3) {
222931
222939
  inlineRange,
222932
222940
  replaceFrom,
222933
222941
  replaceTo,
222934
- replacementBlockCount: replacementBlocks.length,
222942
+ replacementBlockCount: effectiveBlocks.length,
222935
222943
  openStart: 0,
222936
222944
  openEnd: 0,
222937
222945
  stepId: step3.id
222938
222946
  });
222939
222947
  return {
222940
- replacementBlocks,
222948
+ replacementBlocks: effectiveBlocks,
222941
222949
  paragraphAttrs: stripIdentityAttrs($from.node(textblockDepth).attrs),
222942
222950
  replaceFrom,
222943
222951
  replaceTo,
@@ -222949,11 +222957,6 @@ function resolveStructuralRangeRewrite(doc$12, absFrom, absTo, step3) {
222949
222957
  }
222950
222958
  const leadingWrappers = resolveInlineWrapperChainAt(doc$12, absFrom, textblockDepth);
222951
222959
  const trailingWrappers = resolveInlineWrapperChainAt(doc$12, absTo, textblockDepth);
222952
- const effectiveBlocks = [...replacementBlocks];
222953
- if (payload.splitBefore)
222954
- effectiveBlocks.unshift("");
222955
- if (payload.splitAfter)
222956
- effectiveBlocks.push("");
222957
222960
  const openStart = 1 + leadingWrappers.length;
222958
222961
  const openEnd = 1 + trailingWrappers.length;
222959
222962
  debugTextRewrite("structural rewrite enabled", {
@@ -287704,12 +287707,12 @@ var Node$13 = class Node$14 {
287704
287707
  return;
287705
287708
  console.log(...args$1);
287706
287709
  }, 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;
287707
- var init_src_osCd4WFE_es = __esm(() => {
287710
+ var init_src_CFXu8Kfm_es = __esm(() => {
287708
287711
  init_rolldown_runtime_Bg48TavK_es();
287709
- init_SuperConverter_DKPcCGTm_es();
287712
+ init_SuperConverter_qnhRLCa_es();
287710
287713
  init_jszip_C49i9kUs_es();
287711
287714
  init_uuid_qzgm05fK_es();
287712
- init_create_headless_toolbar_BTSQjUTS_es();
287715
+ init_create_headless_toolbar_DSyaYMVl_es();
287713
287716
  init_constants_CGhJRd87_es();
287714
287717
  init_dist_B8HfvhaK_es();
287715
287718
  init_unified_Dsuw2be5_es();
@@ -322279,11 +322282,11 @@ var init_zipper_DbkgrypV_es = __esm(() => {
322279
322282
 
322280
322283
  // ../../packages/superdoc/dist/super-editor.es.js
322281
322284
  var init_super_editor_es = __esm(() => {
322282
- init_src_osCd4WFE_es();
322283
- init_SuperConverter_DKPcCGTm_es();
322285
+ init_src_CFXu8Kfm_es();
322286
+ init_SuperConverter_qnhRLCa_es();
322284
322287
  init_jszip_C49i9kUs_es();
322285
322288
  init_xml_js_CqGKpaft_es();
322286
- init_create_headless_toolbar_BTSQjUTS_es();
322289
+ init_create_headless_toolbar_DSyaYMVl_es();
322287
322290
  init_constants_CGhJRd87_es();
322288
322291
  init_dist_B8HfvhaK_es();
322289
322292
  init_unified_Dsuw2be5_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.5.0-next.76",
3
+ "version": "0.5.0-next.77",
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/pm-adapter": "0.0.0",
29
- "@superdoc/super-editor": "0.0.1",
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.5.0-next.76",
38
- "@superdoc-dev/cli-darwin-x64": "0.5.0-next.76",
39
- "@superdoc-dev/cli-linux-x64": "0.5.0-next.76",
40
- "@superdoc-dev/cli-linux-arm64": "0.5.0-next.76",
41
- "@superdoc-dev/cli-windows-x64": "0.5.0-next.76"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.5.0-next.77",
38
+ "@superdoc-dev/cli-darwin-x64": "0.5.0-next.77",
39
+ "@superdoc-dev/cli-linux-arm64": "0.5.0-next.77",
40
+ "@superdoc-dev/cli-linux-x64": "0.5.0-next.77",
41
+ "@superdoc-dev/cli-windows-x64": "0.5.0-next.77"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",