@superdoc-dev/cli 0.17.0-next.45 → 0.17.0-next.46

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 +20 -18
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -2055,7 +2055,7 @@ More content with **bold** and *italic*.`
2055
2055
  },
2056
2056
  "blocks.list": {
2057
2057
  memberPath: "blocks.list",
2058
- description: "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Supports pagination via offset/limit, optional nodeType filtering, and single-story scoping via `in: <StoryLocator>`.",
2058
+ description: "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Text, previews, lengths, and formatting hints use the VISIBLE model: pending tracked deletions are excluded (matching how edit refs resolve), and inline atoms render as a single placeholder character. Supports pagination via offset/limit, optional nodeType filtering, and single-story scoping via `in: <StoryLocator>`.",
2059
2059
  expectedResult: "Returns a BlocksListResult with total block count, an ordered array of block entries (ordinal, nodeId, nodeType, textPreview, optional text, isEmpty), and the current document revision.",
2060
2060
  requiresDocumentContext: true,
2061
2061
  metadata: readOperation({
@@ -165831,7 +165831,7 @@ var init_SuperConverter_DlrS7cQT_es = __esm(() => {
165831
165831
  };
165832
165832
  });
165833
165833
 
165834
- // ../../packages/superdoc/dist/chunks/create-headless-toolbar-Bm-c7KZd.es.js
165834
+ // ../../packages/superdoc/dist/chunks/create-headless-toolbar-0mIJ8-xU.es.js
165835
165835
  function parseSizeUnit(val = "0") {
165836
165836
  const length3 = val.toString() || "0";
165837
165837
  const value = Number.parseFloat(length3);
@@ -175037,7 +175037,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, MARK_KEYS, STEP_OP_CATALOG_UNFROZEN2, P
175037
175037
  init() {
175038
175038
  if (!editor.converter || editor.options.mode !== "docx")
175039
175039
  return {};
175040
- if (editor.presentationEditor)
175040
+ if (editor.presentationEditor || editor.options?.isHeadless)
175041
175041
  return {
175042
175042
  styles: editor.converter?.linkedStyles || [],
175043
175043
  decorations: DecorationSet.empty
@@ -175051,7 +175051,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, MARK_KEYS, STEP_OP_CATALOG_UNFROZEN2, P
175051
175051
  apply(tr, prev, oldEditorState, newEditorState) {
175052
175052
  if (!editor.converter || editor.options.mode !== "docx")
175053
175053
  return { ...prev };
175054
- if (editor.presentationEditor)
175054
+ if (editor.presentationEditor || editor.options?.isHeadless)
175055
175055
  return {
175056
175056
  ...prev,
175057
175057
  decorations: DecorationSet.empty
@@ -176652,7 +176652,7 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, MARK_KEYS, STEP_OP_CATALOG_UNFROZEN2, P
176652
176652
  }
176653
176653
  };
176654
176654
  };
176655
- var init_create_headless_toolbar_Bm_c7KZd_es = __esm(() => {
176655
+ var init_create_headless_toolbar_0mIJ8_xU_es = __esm(() => {
176656
176656
  init_rolldown_runtime_Bg48TavK_es();
176657
176657
  init_SuperConverter_DlrS7cQT_es();
176658
176658
  init_jszip_C49i9kUs_es();
@@ -226747,7 +226747,7 @@ var init_remark_gfm_DCND_V_3_es = __esm(() => {
226747
226747
  init_remark_gfm_BUJjZJLy_es();
226748
226748
  });
226749
226749
 
226750
- // ../../packages/superdoc/dist/chunks/src-CVmBLxZV.es.js
226750
+ // ../../packages/superdoc/dist/chunks/src-Dra6R0wc.es.js
226751
226751
  function deleteProps(obj, propOrProps) {
226752
226752
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
226753
226753
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -248515,7 +248515,7 @@ function createHeadingWrapper(editor, input2, options) {
248515
248515
  function extractTextPreview(node3) {
248516
248516
  if (!node3.isTextblock)
248517
248517
  return null;
248518
- const text5 = node3.textContent;
248518
+ const text5 = textContentInBlock(node3, { textModel: "visible" });
248519
248519
  if (text5.length <= TEXT_PREVIEW_MAX_LENGTH)
248520
248520
  return text5;
248521
248521
  return text5.slice(0, TEXT_PREVIEW_MAX_LENGTH);
@@ -248523,7 +248523,7 @@ function extractTextPreview(node3) {
248523
248523
  function extractBlockText$1(node3) {
248524
248524
  if (!node3.isTextblock)
248525
248525
  return null;
248526
- return node3.textContent;
248526
+ return textContentInBlock(node3, { textModel: "visible" });
248527
248527
  }
248528
248528
  function buildStyleContext(editor) {
248529
248529
  const styleProps = readTranslatedLinkedStyles(editor);
@@ -248592,6 +248592,8 @@ function extractBlockFormatting(node3, styleCtx) {
248592
248592
  const marks = child.marks ?? [];
248593
248593
  if (!child.isText || marks.length === 0)
248594
248594
  return;
248595
+ if (marks.some((mark2) => mark2.type.name === "trackDelete"))
248596
+ return;
248595
248597
  for (const mark2 of marks) {
248596
248598
  const markName = mark2.type.name;
248597
248599
  const attrs = mark2.attrs;
@@ -248701,7 +248703,7 @@ function blocksListWrapper(editor, input2) {
248701
248703
  return {
248702
248704
  total,
248703
248705
  blocks: paged.map((candidate, i3) => {
248704
- const textLength = computeTextContentLength(candidate.node);
248706
+ const textLength = computeTextContentLength(candidate.node, { textModel: "visible" });
248705
248707
  const fullText = input2?.includeText ? extractBlockText$1(candidate.node) : undefined;
248706
248708
  const numbering = extractBlockNumbering(candidate.node);
248707
248709
  const ref$1 = textLength > 0 ? encodeV4Ref({
@@ -327865,13 +327867,13 @@ menclose::after {
327865
327867
  return;
327866
327868
  console.log(...args$1);
327867
327869
  }, 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, TRACKED_MARK_NAMES;
327868
- var init_src_CVmBLxZV_es = __esm(() => {
327870
+ var init_src_Dra6R0wc_es = __esm(() => {
327869
327871
  init_rolldown_runtime_Bg48TavK_es();
327870
327872
  init_SuperConverter_DlrS7cQT_es();
327871
327873
  init_jszip_C49i9kUs_es();
327872
327874
  init_xml_js_CqGKpaft_es();
327873
327875
  init_uuid_B2wVPhPi_es();
327874
- init_create_headless_toolbar_Bm_c7KZd_es();
327876
+ init_create_headless_toolbar_0mIJ8_xU_es();
327875
327877
  init_constants_D9qj59G2_es();
327876
327878
  init_unified_BDuVPlMu_es();
327877
327879
  init_remark_gfm_BUJjZJLy_es();
@@ -328300,7 +328302,7 @@ var init_src_CVmBLxZV_es = __esm(() => {
328300
328302
  },
328301
328303
  "blocks.list": {
328302
328304
  memberPath: "blocks.list",
328303
- description: "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Supports pagination via offset/limit, optional nodeType filtering, and single-story scoping via `in: <StoryLocator>`.",
328305
+ description: "List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Text, previews, lengths, and formatting hints use the VISIBLE model: pending tracked deletions are excluded (matching how edit refs resolve), and inline atoms render as a single placeholder character. Supports pagination via offset/limit, optional nodeType filtering, and single-story scoping via `in: <StoryLocator>`.",
328304
328306
  expectedResult: "Returns a BlocksListResult with total block count, an ordered array of block entries (ordinal, nodeId, nodeType, textPreview, optional text, isEmpty), and the current document revision.",
328305
328307
  requiresDocumentContext: true,
328306
328308
  metadata: readOperation2({ throws: ["INVALID_INPUT", ...T_STORY2] }),
@@ -371178,11 +371180,11 @@ function print() { __p += __j.call(arguments, '') }
371178
371180
  ]);
371179
371181
  });
371180
371182
 
371181
- // ../../packages/superdoc/dist/chunks/create-super-doc-ui-D2qFX5i6.es.js
371183
+ // ../../packages/superdoc/dist/chunks/create-super-doc-ui-BNkolmSw.es.js
371182
371184
  var DEFAULT_TEXT_ALIGN_OPTIONS, DEFAULT_LINE_HEIGHT_OPTIONS, DEFAULT_ZOOM_OPTIONS, DEFAULT_DOCUMENT_MODE_OPTIONS, DEFAULT_FONT_SIZE_OPTIONS, headlessToolbarConstants, MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS, FONT_SIZE_OPTIONS;
371183
- var init_create_super_doc_ui_D2qFX5i6_es = __esm(() => {
371185
+ var init_create_super_doc_ui_BNkolmSw_es = __esm(() => {
371184
371186
  init_SuperConverter_DlrS7cQT_es();
371185
- init_create_headless_toolbar_Bm_c7KZd_es();
371187
+ init_create_headless_toolbar_0mIJ8_xU_es();
371186
371188
  DEFAULT_TEXT_ALIGN_OPTIONS = [
371187
371189
  {
371188
371190
  label: "Left",
@@ -371473,15 +371475,15 @@ var init_zipper_BxRAi0_5_es = __esm(() => {
371473
371475
 
371474
371476
  // ../../packages/superdoc/dist/super-editor.es.js
371475
371477
  var init_super_editor_es = __esm(() => {
371476
- init_src_CVmBLxZV_es();
371478
+ init_src_Dra6R0wc_es();
371477
371479
  init_SuperConverter_DlrS7cQT_es();
371478
371480
  init_jszip_C49i9kUs_es();
371479
371481
  init_xml_js_CqGKpaft_es();
371480
- init_create_headless_toolbar_Bm_c7KZd_es();
371482
+ init_create_headless_toolbar_0mIJ8_xU_es();
371481
371483
  init_constants_D9qj59G2_es();
371482
371484
  init_unified_BDuVPlMu_es();
371483
371485
  init_DocxZipper_BzS208BW_es();
371484
- init_create_super_doc_ui_D2qFX5i6_es();
371486
+ init_create_super_doc_ui_BNkolmSw_es();
371485
371487
  init_ui_CGB3qmy3_es();
371486
371488
  init_eventemitter3_UwU_CLPU_es();
371487
371489
  init_errors_C_DoKMoN_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.17.0-next.45",
3
+ "version": "0.17.0-next.46",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "superdoc": "./dist/index.js"
@@ -26,20 +26,20 @@
26
26
  "lib0": "^0.2.114",
27
27
  "typescript": "^5.9.2",
28
28
  "y-protocols": "^1.0.6",
29
- "superdoc": "1.43.1",
29
+ "@superdoc/super-editor": "0.0.1",
30
30
  "@superdoc/document-api": "0.1.0-alpha.0",
31
- "@superdoc/super-editor": "0.0.1"
31
+ "superdoc": "1.43.1"
32
32
  },
33
33
  "module": "src/index.ts",
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
37
  "optionalDependencies": {
38
- "@superdoc-dev/cli-darwin-arm64": "0.17.0-next.45",
39
- "@superdoc-dev/cli-darwin-x64": "0.17.0-next.45",
40
- "@superdoc-dev/cli-linux-x64": "0.17.0-next.45",
41
- "@superdoc-dev/cli-linux-arm64": "0.17.0-next.45",
42
- "@superdoc-dev/cli-windows-x64": "0.17.0-next.45"
38
+ "@superdoc-dev/cli-darwin-arm64": "0.17.0-next.46",
39
+ "@superdoc-dev/cli-darwin-x64": "0.17.0-next.46",
40
+ "@superdoc-dev/cli-linux-x64": "0.17.0-next.46",
41
+ "@superdoc-dev/cli-linux-arm64": "0.17.0-next.46",
42
+ "@superdoc-dev/cli-windows-x64": "0.17.0-next.46"
43
43
  },
44
44
  "scripts": {
45
45
  "predev": "node scripts/ensure-superdoc-build.js",