superdoc 1.12.0 → 1.13.0-next.2

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.
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-V8_mQ0Vh.cjs");
3
+ const index = require("./chunks/index-hbNHS8kg.cjs");
4
4
  const superEditor_docxZipper = require("./super-editor/docx-zipper.cjs");
5
5
  const superEditor_fileZipper = require("./super-editor/file-zipper.cjs");
6
6
  const vue = require("./chunks/vue-BkoOkkmT.cjs");
7
- const superEditor_converter = require("./chunks/SuperConverter-DESqBxka.cjs");
7
+ const superEditor_converter = require("./chunks/SuperConverter-7up5TKGC.cjs");
8
8
  function isNodeType(node, name) {
9
9
  return node.type.name === name;
10
10
  }
@@ -1,9 +1,9 @@
1
- import { N as Node, M as Mark } from "./chunks/index-C7RA8HvC.es.js";
2
- import { A, a, C, E, b, P, S, _, c, d, e, T, f, i, g, h, j, k, l, m, n } from "./chunks/index-C7RA8HvC.es.js";
1
+ import { N as Node, M as Mark } from "./chunks/index-Dz85Qhsj.es.js";
2
+ import { A, a, C, E, b, P, S, _, c, d, e, T, f, i, g, h, j, k, l, m, n } from "./chunks/index-Dz85Qhsj.es.js";
3
3
  import { default as default2 } from "./super-editor/docx-zipper.es.js";
4
4
  import { createZip } from "./super-editor/file-zipper.es.js";
5
5
  import { d as defineComponent, o as openBlock, c as createElementBlock, a as createBaseVNode } from "./chunks/vue-DiPLN5sT.es.js";
6
- import { S as S2, r } from "./chunks/SuperConverter-BaWIrAD1.es.js";
6
+ import { S as S2, r } from "./chunks/SuperConverter-CdatvpcH.es.js";
7
7
  function isNodeType(node, name) {
8
8
  return node.type.name === name;
9
9
  }
package/dist/superdoc.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-V8_mQ0Vh.cjs");
4
- const superdoc = require("./chunks/index-DEDNPvEb.cjs");
3
+ const index = require("./chunks/index-hbNHS8kg.cjs");
4
+ const superdoc = require("./chunks/index-BgR2i-Ql.cjs");
5
5
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
6
- const superEditor_converter = require("./chunks/SuperConverter-DESqBxka.cjs");
6
+ const superEditor_converter = require("./chunks/SuperConverter-7up5TKGC.cjs");
7
7
  const superEditor_fileZipper = require("./super-editor/file-zipper.cjs");
8
8
  require("./chunks/helpers-OFep8CYR.cjs");
9
9
  require("./chunks/jszip.min-oAFpNMh5.cjs");
@@ -1,7 +1,7 @@
1
- import { a, E, b, S, i, ay, k, m, n } from "./chunks/index-C7RA8HvC.es.js";
2
- import { D, H, P, S as S2, c, g } from "./chunks/index-bTZWCMRz.es.js";
1
+ import { a, E, b, S, i, ay, k, m, n } from "./chunks/index-Dz85Qhsj.es.js";
2
+ import { D, H, P, S as S2, c, g } from "./chunks/index-DmWJqwCi.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
- import { S as S3, r } from "./chunks/SuperConverter-BaWIrAD1.es.js";
4
+ import { S as S3, r } from "./chunks/SuperConverter-CdatvpcH.es.js";
5
5
  import { createZip } from "./super-editor/file-zipper.es.js";
6
6
  import "./chunks/helpers-BqdwtJE0.es.js";
7
7
  import "./chunks/jszip.min-BCZQ7Wq2.es.js";
@@ -34378,7 +34378,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34378
34378
  const COMMUNITY_LICENSE_KEY = "community-and-eval-agplv3";
34379
34379
  function getSuperdocVersion() {
34380
34380
  try {
34381
- return true ? "1.12.0" : "unknown";
34381
+ return true ? "1.13.0-next.2" : "unknown";
34382
34382
  } catch {
34383
34383
  return "unknown";
34384
34384
  }
@@ -37650,7 +37650,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
37650
37650
  static getStoredSuperdocVersion(docx) {
37651
37651
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
37652
37652
  }
37653
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.12.0") {
37653
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.13.0-next.2") {
37654
37654
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
37655
37655
  }
37656
37656
  /**
@@ -52562,8 +52562,17 @@ ${err.toString()}`);
52562
52562
  });
52563
52563
  let nodesToUse;
52564
52564
  if (isDeletionInsertion) {
52565
- const allNodes = [...nodesWithMark, ...nodes, ...deletionNodes || []];
52566
- nodesToUse = Array.from(new Set(allNodes));
52565
+ const hasInsertNode = nodesWithMark.some(
52566
+ (node3) => node3.marks.find((nodeMark) => nodeMark.type.name === TrackInsertMarkName)
52567
+ );
52568
+ const hasDeleteNode = nodesWithMark.some(
52569
+ (node3) => node3.marks.find((nodeMark) => nodeMark.type.name === TrackDeleteMarkName)
52570
+ );
52571
+ const fallbackNodes = [
52572
+ ...!hasInsertNode && nodes?.length ? nodes : [],
52573
+ ...!hasDeleteNode && deletionNodes?.length ? deletionNodes : []
52574
+ ];
52575
+ nodesToUse = Array.from(/* @__PURE__ */ new Set([...nodesWithMark, ...fallbackNodes]));
52567
52576
  } else {
52568
52577
  nodesToUse = nodesWithMark.length ? nodesWithMark : node2 ? [node2] : [];
52569
52578
  }
@@ -65151,7 +65160,7 @@ ${err.toString()}`);
65151
65160
  return false;
65152
65161
  }
65153
65162
  };
65154
- const summaryVersion = "1.12.0";
65163
+ const summaryVersion = "1.13.0-next.2";
65155
65164
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
65156
65165
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
65157
65166
  function mapAttributes(attrs) {
@@ -65800,7 +65809,7 @@ ${err.toString()}`);
65800
65809
  // License key (defaults to community license)
65801
65810
  licenseKey: COMMUNITY_LICENSE_KEY,
65802
65811
  // Telemetry configuration
65803
- telemetry: null
65812
+ telemetry: { enabled: true }
65804
65813
  };
65805
65814
  const resolvedOptions = { ...options };
65806
65815
  const domAvailable = canUseDOM();
@@ -65889,6 +65898,9 @@ ${err.toString()}`);
65889
65898
  */
65890
65899
  #initTelemetry() {
65891
65900
  const { telemetry: telemetryConfig, licenseKey } = this.options;
65901
+ if (typeof define_process_default$9 !== "undefined" && (define_process_default$9.env?.VITEST || define_process_default$9.env?.NODE_ENV === "test")) {
65902
+ return;
65903
+ }
65892
65904
  if (!telemetryConfig?.enabled) {
65893
65905
  console.debug("[super-editor] Telemetry: disabled");
65894
65906
  return;
@@ -67956,7 +67968,7 @@ ${err.toString()}`);
67956
67968
  * Process collaboration migrations
67957
67969
  */
67958
67970
  processCollaborationMigrations() {
67959
- console.debug("[checkVersionMigrations] Current editor version", "1.12.0");
67971
+ console.debug("[checkVersionMigrations] Current editor version", "1.13.0-next.2");
67960
67972
  if (!this.options.ydoc) return;
67961
67973
  const metaMap = this.options.ydoc.getMap("meta");
67962
67974
  let docVersion = metaMap.get("version");
@@ -171784,8 +171796,7 @@ js: import "konva/skia-backend";
171784
171796
  // License key for organization identification (defaults to community key)
171785
171797
  licenseKey: COMMUNITY_LICENSE_KEY,
171786
171798
  // Telemetry settings
171787
- telemetry: { enabled: false },
171788
- // Enable to track document opens
171799
+ telemetry: { enabled: true },
171789
171800
  title: "SuperDoc",
171790
171801
  conversations: [],
171791
171802
  isInternal: false,
@@ -171902,7 +171913,7 @@ js: import "konva/skia-backend";
171902
171913
  this.config.colors = shuffleArray(this.config.colors);
171903
171914
  this.userColorMap = /* @__PURE__ */ new Map();
171904
171915
  this.colorIndex = 0;
171905
- this.version = "1.12.0";
171916
+ this.version = "1.13.0-next.2";
171906
171917
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
171907
171918
  this.superdocId = config2.superdocId || v4();
171908
171919
  this.colors = this.config.colors;