@superdoc-dev/cli 0.13.0-next.12 → 0.13.0-next.13

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 +38 -13
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -220410,7 +220410,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
220410
220410
  init_remark_gfm_BhnWr3yf_es();
220411
220411
  });
220412
220412
 
220413
- // ../../packages/superdoc/dist/chunks/src-UhA9uMm0.es.js
220413
+ // ../../packages/superdoc/dist/chunks/src-D659h75w.es.js
220414
220414
  function deleteProps(obj, propOrProps) {
220415
220415
  const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
220416
220416
  const removeNested = (target, pathParts, index2 = 0) => {
@@ -222336,27 +222336,52 @@ function normalizeYjsFragmentEventsForSchema(events, fallbackFragment) {
222336
222336
  function stripSchemaAtomChildren(parent) {
222337
222337
  if (!isTraversableYjsXml(parent))
222338
222338
  return false;
222339
- if (parent instanceof YXmlElement && SCHEMA_ATOM_NODE_NAMES.has(parent.nodeName)) {
222340
- if (parent.length === 0)
222341
- return false;
222342
- parent.delete(0, parent.length);
222343
- return true;
222344
- }
222339
+ if (parent instanceof YXmlElement && SCHEMA_ATOM_NODE_NAMES.has(parent.nodeName))
222340
+ return normalizeSchemaAtomElement(parent);
222345
222341
  let changed = false;
222346
222342
  for (const child of parent.toArray()) {
222347
222343
  if (!(child instanceof YXmlElement))
222348
222344
  continue;
222349
222345
  if (SCHEMA_ATOM_NODE_NAMES.has(child.nodeName)) {
222350
- if (child.length > 0) {
222351
- child.delete(0, child.length);
222352
- changed = true;
222353
- }
222346
+ changed = normalizeSchemaAtomElement(child) || changed;
222354
222347
  continue;
222355
222348
  }
222356
222349
  changed = stripSchemaAtomChildren(child) || changed;
222357
222350
  }
222358
222351
  return changed;
222359
222352
  }
222353
+ function normalizeSchemaAtomElement(element3) {
222354
+ let changed = false;
222355
+ if (isEmptyResolvedText(element3.getAttribute("resolvedText"))) {
222356
+ const visibleText = extractVisibleXmlText(element3);
222357
+ if (visibleText.length > 0) {
222358
+ element3.setAttribute("resolvedText", visibleText);
222359
+ changed = true;
222360
+ }
222361
+ }
222362
+ if (element3.length > 0) {
222363
+ element3.delete(0, element3.length);
222364
+ changed = true;
222365
+ }
222366
+ return changed;
222367
+ }
222368
+ function isEmptyResolvedText(value) {
222369
+ return typeof value !== "string" || value.length === 0;
222370
+ }
222371
+ function extractVisibleXmlText(parent) {
222372
+ let text5 = "";
222373
+ for (const child of parent.toArray())
222374
+ if (child instanceof YXmlText)
222375
+ text5 += extractVisibleTextFromXmlText(child);
222376
+ else if (child instanceof YXmlElement)
222377
+ text5 += extractVisibleXmlText(child);
222378
+ return text5;
222379
+ }
222380
+ function extractVisibleTextFromXmlText(textNode) {
222381
+ return textNode.toDelta().reduce((visibleText, op) => {
222382
+ return typeof op.insert === "string" ? visibleText + op.insert : visibleText;
222383
+ }, "");
222384
+ }
222360
222385
  function findNormalizableEventTarget(target) {
222361
222386
  let current = target;
222362
222387
  while (current) {
@@ -313220,7 +313245,7 @@ menclose::after {
313220
313245
  return;
313221
313246
  console.log(...args$1);
313222
313247
  }, 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;
313223
- var init_src_UhA9uMm0_es = __esm(() => {
313248
+ var init_src_D659h75w_es = __esm(() => {
313224
313249
  init_rolldown_runtime_Bg48TavK_es();
313225
313250
  init_SuperConverter_qtmGhHOJ_es();
313226
313251
  init_jszip_C49i9kUs_es();
@@ -351299,7 +351324,7 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
351299
351324
 
351300
351325
  // ../../packages/superdoc/dist/super-editor.es.js
351301
351326
  var init_super_editor_es = __esm(() => {
351302
- init_src_UhA9uMm0_es();
351327
+ init_src_D659h75w_es();
351303
351328
  init_SuperConverter_qtmGhHOJ_es();
351304
351329
  init_jszip_C49i9kUs_es();
351305
351330
  init_xml_js_CqGKpaft_es();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superdoc-dev/cli",
3
- "version": "0.13.0-next.12",
3
+ "version": "0.13.0-next.13",
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": "1.35.0",
27
28
  "@superdoc/document-api": "0.0.1",
28
- "@superdoc/pm-adapter": "0.0.0",
29
29
  "@superdoc/super-editor": "0.0.1",
30
- "superdoc": "1.35.0"
30
+ "@superdoc/pm-adapter": "0.0.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.13.0-next.12",
38
- "@superdoc-dev/cli-darwin-x64": "0.13.0-next.12",
39
- "@superdoc-dev/cli-linux-x64": "0.13.0-next.12",
40
- "@superdoc-dev/cli-linux-arm64": "0.13.0-next.12",
41
- "@superdoc-dev/cli-windows-x64": "0.13.0-next.12"
37
+ "@superdoc-dev/cli-darwin-arm64": "0.13.0-next.13",
38
+ "@superdoc-dev/cli-darwin-x64": "0.13.0-next.13",
39
+ "@superdoc-dev/cli-linux-x64": "0.13.0-next.13",
40
+ "@superdoc-dev/cli-linux-arm64": "0.13.0-next.13",
41
+ "@superdoc-dev/cli-windows-x64": "0.13.0-next.13"
42
42
  },
43
43
  "scripts": {
44
44
  "predev": "node scripts/ensure-superdoc-build.js",