@harbour-enterprises/superdoc 1.0.0-beta.92 → 1.0.0-beta.93

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 (27) hide show
  1. package/dist/chunks/{PdfViewer-CrMwuKcn.es.js → PdfViewer-DDlUqq8s.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-BYKB8fT_.cjs → PdfViewer-DbMCgjlc.cjs} +1 -1
  3. package/dist/chunks/{index-BZloH4nq.cjs → index-CIyFPdjr.cjs} +3 -3
  4. package/dist/chunks/{index-CqnVFwjL-zbanjw1O.cjs → index-Cyp2JwAE-BDSzsvVr.cjs} +1 -1
  5. package/dist/chunks/{index-CqnVFwjL-DJT5AqWq.es.js → index-Cyp2JwAE-C4V2XscX.es.js} +1 -1
  6. package/dist/chunks/{index-CUUqzJ4M.es.js → index-D1G3HZnw.es.js} +3 -3
  7. package/dist/chunks/{super-editor.es-ALp2ApyE.es.js → super-editor.es-BLW0IRfr.es.js} +174 -6
  8. package/dist/chunks/{super-editor.es-DvpDTsC4.cjs → super-editor.es-CZ_EMz2h.cjs} +174 -6
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-CpOA_SSA.js → converter-CvPb50HR.js} +1 -1
  11. package/dist/super-editor/chunks/{docx-zipper-zilXqAq6.js → docx-zipper-BWUuyGDp.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-DvF9Gp0h.js → editor-CsWOz21v.js} +175 -7
  13. package/dist/super-editor/chunks/{index-CqnVFwjL.js → index-Cyp2JwAE.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-BVOTlKFf.js → toolbar-DjWypz4_.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor.es.js +6 -6
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.cjs +1 -1
  22. package/dist/super-editor.es.js +1 -1
  23. package/dist/superdoc.cjs +2 -2
  24. package/dist/superdoc.es.js +2 -2
  25. package/dist/superdoc.umd.js +176 -8
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { y as defineComponent, z as h, O as Transition, a0 as process$1, J as watchEffect, a as computed, r as ref, j as onMounted, W as onUnmounted, b as createElementBlock, o as openBlock, f as createBaseVNode, e as createCommentVNode, u as createVNode, v as unref } from "./vue-Dysv_7z5.es.js";
2
- import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-CUUqzJ4M.es.js";
2
+ import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-D1G3HZnw.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-jWLMl8Ts.cjs");
4
- const superdoc = require("./index-BZloH4nq.cjs");
4
+ const superdoc = require("./index-CIyFPdjr.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-DvpDTsC4.cjs");
2
+ const superEditor_es = require("./super-editor.es-CZ_EMz2h.cjs");
3
3
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
4
4
  const eventemitter3 = require("./eventemitter3-DQmQUge-.cjs");
5
5
  const provider = require("@hocuspocus/provider");
@@ -17268,7 +17268,7 @@ const _sfc_main = {
17268
17268
  __name: "SuperDoc",
17269
17269
  emits: ["selection-update"],
17270
17270
  setup(__props, { emit: __emit }) {
17271
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-BYKB8fT_.cjs")));
17271
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-DbMCgjlc.cjs")));
17272
17272
  const superdocStore = useSuperdocStore();
17273
17273
  const commentsStore = useCommentsStore();
17274
17274
  const {
@@ -18157,7 +18157,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
18157
18157
  this.config.colors = shuffleArray(this.config.colors);
18158
18158
  this.userColorMap = /* @__PURE__ */ new Map();
18159
18159
  this.colorIndex = 0;
18160
- this.version = "1.0.0-beta.92";
18160
+ this.version = "1.0.0-beta.93";
18161
18161
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18162
18162
  this.superdocId = config.superdocId || uuid.v4();
18163
18163
  this.colors = this.config.colors;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./super-editor.es-DvpDTsC4.cjs");
3
+ const superEditor_es = require("./super-editor.es-CZ_EMz2h.cjs");
4
4
  const indexCvBqQJbG = require("./index-CvBqQJbG-Dwm0THD7.cjs");
5
5
  function bail(error) {
6
6
  if (error) {
@@ -1,4 +1,4 @@
1
- import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-ALp2ApyE.es.js";
1
+ import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-BLW0IRfr.es.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG-CvBqQJbG.es.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,4 +1,4 @@
1
- import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-ALp2ApyE.es.js";
1
+ import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-BLW0IRfr.es.js";
2
2
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
3
3
  import { E as EventEmitter } from "./eventemitter3-CcXAdeql.es.js";
4
4
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
@@ -17251,7 +17251,7 @@ const _sfc_main = {
17251
17251
  __name: "SuperDoc",
17252
17252
  emits: ["selection-update"],
17253
17253
  setup(__props, { emit: __emit }) {
17254
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CrMwuKcn.es.js"));
17254
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-DDlUqq8s.es.js"));
17255
17255
  const superdocStore = useSuperdocStore();
17256
17256
  const commentsStore = useCommentsStore();
17257
17257
  const {
@@ -18140,7 +18140,7 @@ class SuperDoc extends EventEmitter {
18140
18140
  this.config.colors = shuffleArray(this.config.colors);
18141
18141
  this.userColorMap = /* @__PURE__ */ new Map();
18142
18142
  this.colorIndex = 0;
18143
- this.version = "1.0.0-beta.92";
18143
+ this.version = "1.0.0-beta.93";
18144
18144
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18145
18145
  this.superdocId = config.superdocId || v4();
18146
18146
  this.colors = this.config.colors;
@@ -42380,7 +42380,7 @@ const _SuperConverter = class _SuperConverter2 {
42380
42380
  static getStoredSuperdocVersion(docx) {
42381
42381
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42382
42382
  }
42383
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.92") {
42383
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.93") {
42384
42384
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42385
42385
  }
42386
42386
  /**
@@ -59586,7 +59586,7 @@ const isHeadless = (editor) => {
59586
59586
  const shouldSkipNodeView = (editor) => {
59587
59587
  return isHeadless(editor);
59588
59588
  };
59589
- const summaryVersion = "1.0.0-beta.92";
59589
+ const summaryVersion = "1.0.0-beta.93";
59590
59590
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
59591
59591
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
59592
59592
  function mapAttributes(attrs) {
@@ -60375,7 +60375,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60375
60375
  { default: remarkStringify },
60376
60376
  { default: remarkGfm }
60377
60377
  ] = await Promise.all([
60378
- import("./index-CqnVFwjL-DJT5AqWq.es.js"),
60378
+ import("./index-Cyp2JwAE-C4V2XscX.es.js"),
60379
60379
  import("./index-DRCvimau-Cw339678.es.js"),
60380
60380
  import("./index-C_x_N6Uh-DJn8hIEt.es.js"),
60381
60381
  import("./index-D_sWOSiG-DE96TaT5.es.js"),
@@ -60580,7 +60580,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60580
60580
  * Process collaboration migrations
60581
60581
  */
60582
60582
  processCollaborationMigrations() {
60583
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.92");
60583
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.93");
60584
60584
  if (!this.options.ydoc) return;
60585
60585
  const metaMap = this.options.ydoc.getMap("meta");
60586
60586
  let docVersion = metaMap.get("version");
@@ -77460,7 +77460,26 @@ const deriveBlockVersion = (block) => {
77460
77460
  textRun.token ?? ""
77461
77461
  ].join(",");
77462
77462
  }).join("|");
77463
- return markerVersion ? `${markerVersion}|${runsVersion}` : runsVersion;
77463
+ const attrs = block.attrs;
77464
+ const paragraphAttrsVersion = attrs ? [
77465
+ attrs.alignment ?? "",
77466
+ attrs.spacing?.before ?? "",
77467
+ attrs.spacing?.after ?? "",
77468
+ attrs.spacing?.line ?? "",
77469
+ attrs.spacing?.lineRule ?? "",
77470
+ attrs.indent?.left ?? "",
77471
+ attrs.indent?.right ?? "",
77472
+ attrs.indent?.firstLine ?? "",
77473
+ attrs.indent?.hanging ?? "",
77474
+ attrs.borders ? JSON.stringify(attrs.borders) : "",
77475
+ attrs.shading?.fill ?? "",
77476
+ attrs.shading?.color ?? "",
77477
+ attrs.direction ?? "",
77478
+ attrs.rtl ? "1" : "",
77479
+ attrs.tabs?.length ? JSON.stringify(attrs.tabs) : ""
77480
+ ].join(":") : "";
77481
+ const parts = [markerVersion, runsVersion, paragraphAttrsVersion].filter(Boolean);
77482
+ return parts.join("|");
77464
77483
  }
77465
77484
  if (block.kind === "list") {
77466
77485
  return block.items.map((item) => `${item.id}:${item.marker.text}:${deriveBlockVersion(item.paragraph)}`).join("|");
@@ -81207,6 +81226,33 @@ const MAX_CACHE_SIZE$1 = 1e4;
81207
81226
  const BYTES_PER_ENTRY_ESTIMATE = 5e3;
81208
81227
  const NORMALIZED_WHITESPACE = /\s+/g;
81209
81228
  const normalizeText = (text) => text.replace(NORMALIZED_WHITESPACE, " ");
81229
+ const hashParagraphBorder = (border) => {
81230
+ const parts = [];
81231
+ if (border.style !== void 0) parts.push(`s:${border.style}`);
81232
+ if (border.width !== void 0) parts.push(`w:${border.width}`);
81233
+ if (border.color !== void 0) parts.push(`c:${border.color}`);
81234
+ if (border.space !== void 0) parts.push(`sp:${border.space}`);
81235
+ return parts.join(",");
81236
+ };
81237
+ const hashParagraphBorders = (borders) => {
81238
+ const parts = [];
81239
+ if (borders.top) parts.push(`t:[${hashParagraphBorder(borders.top)}]`);
81240
+ if (borders.right) parts.push(`r:[${hashParagraphBorder(borders.right)}]`);
81241
+ if (borders.bottom) parts.push(`b:[${hashParagraphBorder(borders.bottom)}]`);
81242
+ if (borders.left) parts.push(`l:[${hashParagraphBorder(borders.left)}]`);
81243
+ return parts.join(";");
81244
+ };
81245
+ const hashParagraphFrame = (frame) => {
81246
+ const parts = [];
81247
+ if (frame.wrap !== void 0) parts.push(`w:${frame.wrap}`);
81248
+ if (frame.x !== void 0) parts.push(`x:${frame.x}`);
81249
+ if (frame.y !== void 0) parts.push(`y:${frame.y}`);
81250
+ if (frame.xAlign !== void 0) parts.push(`xa:${frame.xAlign}`);
81251
+ if (frame.yAlign !== void 0) parts.push(`ya:${frame.yAlign}`);
81252
+ if (frame.hAnchor !== void 0) parts.push(`ha:${frame.hAnchor}`);
81253
+ if (frame.vAnchor !== void 0) parts.push(`va:${frame.vAnchor}`);
81254
+ return parts.join(",");
81255
+ };
81210
81256
  const hashRuns = (block) => {
81211
81257
  if (block.kind === "table") {
81212
81258
  const tableBlock = block;
@@ -81302,7 +81348,59 @@ const hashRuns = (block) => {
81302
81348
  numberingKey = `|num:${np.numId ?? ""}:${np.ilvl ?? 0}:${markerTextKey}`;
81303
81349
  }
81304
81350
  }
81305
- return `${trackedMode}:${trackedEnabled ? "on" : "off"}|${runsHash}${numberingKey}`;
81351
+ let paragraphAttrsKey = "";
81352
+ if (block.attrs) {
81353
+ const attrs = block.attrs;
81354
+ const parts = [];
81355
+ if (attrs.alignment) parts.push(`al:${attrs.alignment}`);
81356
+ if (attrs.spacing) {
81357
+ const s2 = attrs.spacing;
81358
+ if (s2.before !== void 0) parts.push(`sb:${s2.before}`);
81359
+ if (s2.after !== void 0) parts.push(`sa:${s2.after}`);
81360
+ if (s2.line !== void 0) parts.push(`sl:${s2.line}`);
81361
+ if (s2.lineRule) parts.push(`sr:${s2.lineRule}`);
81362
+ }
81363
+ if (attrs.indent) {
81364
+ const ind = attrs.indent;
81365
+ if (ind.left !== void 0) parts.push(`il:${ind.left}`);
81366
+ if (ind.right !== void 0) parts.push(`ir:${ind.right}`);
81367
+ if (ind.firstLine !== void 0) parts.push(`if:${ind.firstLine}`);
81368
+ if (ind.hanging !== void 0) parts.push(`ih:${ind.hanging}`);
81369
+ }
81370
+ if (attrs.borders) {
81371
+ parts.push(`br:${hashParagraphBorders(attrs.borders)}`);
81372
+ }
81373
+ if (attrs.shading) {
81374
+ const sh = attrs.shading;
81375
+ if (sh.fill) parts.push(`shf:${sh.fill}`);
81376
+ if (sh.color) parts.push(`shc:${sh.color}`);
81377
+ }
81378
+ if (attrs.tabs && attrs.tabs.length > 0) {
81379
+ const tabsHash = attrs.tabs.map((t) => `${t.val ?? ""}:${t.pos ?? ""}:${t.leader ?? ""}`).join(",");
81380
+ parts.push(`tb:${tabsHash}`);
81381
+ }
81382
+ if (attrs.direction) parts.push(`dir:${attrs.direction}`);
81383
+ if (attrs.rtl) parts.push("rtl");
81384
+ if (attrs.keepNext) parts.push("kn");
81385
+ if (attrs.keepLines) parts.push("kl");
81386
+ if (attrs.floatAlignment) parts.push(`fa:${attrs.floatAlignment}`);
81387
+ if (attrs.contextualSpacing) parts.push("cs");
81388
+ if (attrs.suppressFirstLineIndent) parts.push("sfi");
81389
+ if (attrs.dropCap) parts.push(`dc:${attrs.dropCap}`);
81390
+ if (attrs.dropCapDescriptor) {
81391
+ const dcd = attrs.dropCapDescriptor;
81392
+ parts.push(`dcd:${dcd.mode ?? ""}:${dcd.lines ?? ""}`);
81393
+ }
81394
+ if (attrs.frame) {
81395
+ parts.push(`fr:${hashParagraphFrame(attrs.frame)}`);
81396
+ }
81397
+ if (attrs.tabIntervalTwips !== void 0) parts.push(`ti:${attrs.tabIntervalTwips}`);
81398
+ if (attrs.decimalSeparator) parts.push(`ds:${attrs.decimalSeparator}`);
81399
+ if (parts.length > 0) {
81400
+ paragraphAttrsKey = `|pa:${parts.join(":")}`;
81401
+ }
81402
+ }
81403
+ return `${trackedMode}:${trackedEnabled ? "on" : "off"}|${runsHash}${numberingKey}${paragraphAttrsKey}`;
81306
81404
  };
81307
81405
  const createStats = () => ({
81308
81406
  hits: 0,
@@ -82187,6 +82285,75 @@ const getTrackedChangeKey = (run2) => {
82187
82285
  }
82188
82286
  return "";
82189
82287
  };
82288
+ const paragraphSpacingEqual = (a, b2) => {
82289
+ if (a === b2) return true;
82290
+ if (!a || !b2) return !a && !b2;
82291
+ return a.before === b2.before && a.after === b2.after && a.line === b2.line && a.lineRule === b2.lineRule && a.beforeAutospacing === b2.beforeAutospacing && a.afterAutospacing === b2.afterAutospacing;
82292
+ };
82293
+ const paragraphIndentEqual = (a, b2) => {
82294
+ if (a === b2) return true;
82295
+ if (!a || !b2) return !a && !b2;
82296
+ return a.left === b2.left && a.right === b2.right && a.firstLine === b2.firstLine && a.hanging === b2.hanging;
82297
+ };
82298
+ const paragraphBorderEqual = (a, b2) => {
82299
+ if (a === b2) return true;
82300
+ if (!a || !b2) return !a && !b2;
82301
+ return a.style === b2.style && a.width === b2.width && a.color === b2.color && a.space === b2.space;
82302
+ };
82303
+ const paragraphBordersEqual = (a, b2) => {
82304
+ if (a === b2) return true;
82305
+ if (!a || !b2) return !a && !b2;
82306
+ return paragraphBorderEqual(a.top, b2.top) && paragraphBorderEqual(a.right, b2.right) && paragraphBorderEqual(a.bottom, b2.bottom) && paragraphBorderEqual(a.left, b2.left);
82307
+ };
82308
+ const paragraphShadingEqual = (a, b2) => {
82309
+ if (a === b2) return true;
82310
+ if (!a || !b2) return !a && !b2;
82311
+ return a.fill === b2.fill && a.color === b2.color && a.val === b2.val && a.themeColor === b2.themeColor && a.themeFill === b2.themeFill && a.themeFillShade === b2.themeFillShade && a.themeFillTint === b2.themeFillTint && a.themeShade === b2.themeShade && a.themeTint === b2.themeTint;
82312
+ };
82313
+ const tabStopEqual = (a, b2) => {
82314
+ return a.val === b2.val && a.pos === b2.pos && a.leader === b2.leader;
82315
+ };
82316
+ const tabStopsEqual = (a, b2) => {
82317
+ if (a === b2) return true;
82318
+ if (!a || !b2) return !a && !b2;
82319
+ if (a.length !== b2.length) return false;
82320
+ for (let i = 0; i < a.length; i += 1) {
82321
+ if (!tabStopEqual(a[i], b2[i])) return false;
82322
+ }
82323
+ return true;
82324
+ };
82325
+ const paragraphFrameEqual = (a, b2) => {
82326
+ if (a === b2) return true;
82327
+ if (!a || !b2) return !a && !b2;
82328
+ return a.wrap === b2.wrap && a.x === b2.x && a.y === b2.y && a.xAlign === b2.xAlign && a.yAlign === b2.yAlign && a.hAnchor === b2.hAnchor && a.vAnchor === b2.vAnchor;
82329
+ };
82330
+ const dropCapDescriptorEqual = (a, b2) => {
82331
+ if (a === b2) return true;
82332
+ if (!a || !b2) return !a && !b2;
82333
+ if (a.mode !== b2.mode || a.lines !== b2.lines) return false;
82334
+ const runA = a.run;
82335
+ const runB = b2.run;
82336
+ if (!runA || !runB) return !runA && !runB;
82337
+ if (runA.text !== runB.text || runA.fontFamily !== runB.fontFamily || runA.fontSize !== runB.fontSize || runA.bold !== runB.bold || runA.italic !== runB.italic || runA.color !== runB.color) {
82338
+ return false;
82339
+ }
82340
+ return true;
82341
+ };
82342
+ const paragraphAttrsEqual = (a, b2) => {
82343
+ if (a === b2) return true;
82344
+ if (!a || !b2) return !a && !b2;
82345
+ if (a.alignment !== b2.alignment || a.contextualSpacing !== b2.contextualSpacing || a.suppressFirstLineIndent !== b2.suppressFirstLineIndent || a.dropCap !== b2.dropCap || a.decimalSeparator !== b2.decimalSeparator || a.tabIntervalTwips !== b2.tabIntervalTwips || a.keepNext !== b2.keepNext || a.keepLines !== b2.keepLines || a.direction !== b2.direction || a.rtl !== b2.rtl || a.floatAlignment !== b2.floatAlignment) {
82346
+ return false;
82347
+ }
82348
+ if (!paragraphSpacingEqual(a.spacing, b2.spacing)) return false;
82349
+ if (!paragraphIndentEqual(a.indent, b2.indent)) return false;
82350
+ if (!paragraphBordersEqual(a.borders, b2.borders)) return false;
82351
+ if (!paragraphShadingEqual(a.shading, b2.shading)) return false;
82352
+ if (!tabStopsEqual(a.tabs, b2.tabs)) return false;
82353
+ if (!paragraphFrameEqual(a.frame, b2.frame)) return false;
82354
+ if (!dropCapDescriptorEqual(a.dropCapDescriptor, b2.dropCapDescriptor)) return false;
82355
+ return true;
82356
+ };
82190
82357
  const paragraphBlocksEqual = (a, b2) => {
82191
82358
  const aMode = a.attrs?.trackedChangesMode ?? "review";
82192
82359
  const bMode = b2.attrs?.trackedChangesMode ?? "review";
@@ -82194,6 +82361,7 @@ const paragraphBlocksEqual = (a, b2) => {
82194
82361
  const aEnabled = resolveTrackedChangesEnabled(a.attrs, true);
82195
82362
  const bEnabled = resolveTrackedChangesEnabled(b2.attrs, true);
82196
82363
  if (aEnabled !== bEnabled) return false;
82364
+ if (!paragraphAttrsEqual(a.attrs, b2.attrs)) return false;
82197
82365
  if (a.runs.length !== b2.runs.length) return false;
82198
82366
  for (let i = 0; i < a.runs.length; i += 1) {
82199
82367
  const runA = a.runs[i];
@@ -42397,7 +42397,7 @@ const _SuperConverter = class _SuperConverter2 {
42397
42397
  static getStoredSuperdocVersion(docx) {
42398
42398
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42399
42399
  }
42400
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.92") {
42400
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.93") {
42401
42401
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42402
42402
  }
42403
42403
  /**
@@ -59603,7 +59603,7 @@ const isHeadless = (editor) => {
59603
59603
  const shouldSkipNodeView = (editor) => {
59604
59604
  return isHeadless(editor);
59605
59605
  };
59606
- const summaryVersion = "1.0.0-beta.92";
59606
+ const summaryVersion = "1.0.0-beta.93";
59607
59607
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
59608
59608
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
59609
59609
  function mapAttributes(attrs) {
@@ -60392,7 +60392,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60392
60392
  { default: remarkStringify },
60393
60393
  { default: remarkGfm }
60394
60394
  ] = await Promise.all([
60395
- Promise.resolve().then(() => require("./index-CqnVFwjL-zbanjw1O.cjs")),
60395
+ Promise.resolve().then(() => require("./index-Cyp2JwAE-BDSzsvVr.cjs")),
60396
60396
  Promise.resolve().then(() => require("./index-DRCvimau-H4Ck3S9a.cjs")),
60397
60397
  Promise.resolve().then(() => require("./index-C_x_N6Uh-Db3CUJMX.cjs")),
60398
60398
  Promise.resolve().then(() => require("./index-D_sWOSiG-BtDZzJ6I.cjs")),
@@ -60597,7 +60597,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60597
60597
  * Process collaboration migrations
60598
60598
  */
60599
60599
  processCollaborationMigrations() {
60600
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.92");
60600
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.93");
60601
60601
  if (!this.options.ydoc) return;
60602
60602
  const metaMap = this.options.ydoc.getMap("meta");
60603
60603
  let docVersion = metaMap.get("version");
@@ -77477,7 +77477,26 @@ const deriveBlockVersion = (block) => {
77477
77477
  textRun.token ?? ""
77478
77478
  ].join(",");
77479
77479
  }).join("|");
77480
- return markerVersion ? `${markerVersion}|${runsVersion}` : runsVersion;
77480
+ const attrs = block.attrs;
77481
+ const paragraphAttrsVersion = attrs ? [
77482
+ attrs.alignment ?? "",
77483
+ attrs.spacing?.before ?? "",
77484
+ attrs.spacing?.after ?? "",
77485
+ attrs.spacing?.line ?? "",
77486
+ attrs.spacing?.lineRule ?? "",
77487
+ attrs.indent?.left ?? "",
77488
+ attrs.indent?.right ?? "",
77489
+ attrs.indent?.firstLine ?? "",
77490
+ attrs.indent?.hanging ?? "",
77491
+ attrs.borders ? JSON.stringify(attrs.borders) : "",
77492
+ attrs.shading?.fill ?? "",
77493
+ attrs.shading?.color ?? "",
77494
+ attrs.direction ?? "",
77495
+ attrs.rtl ? "1" : "",
77496
+ attrs.tabs?.length ? JSON.stringify(attrs.tabs) : ""
77497
+ ].join(":") : "";
77498
+ const parts = [markerVersion, runsVersion, paragraphAttrsVersion].filter(Boolean);
77499
+ return parts.join("|");
77481
77500
  }
77482
77501
  if (block.kind === "list") {
77483
77502
  return block.items.map((item) => `${item.id}:${item.marker.text}:${deriveBlockVersion(item.paragraph)}`).join("|");
@@ -81224,6 +81243,33 @@ const MAX_CACHE_SIZE$1 = 1e4;
81224
81243
  const BYTES_PER_ENTRY_ESTIMATE = 5e3;
81225
81244
  const NORMALIZED_WHITESPACE = /\s+/g;
81226
81245
  const normalizeText = (text) => text.replace(NORMALIZED_WHITESPACE, " ");
81246
+ const hashParagraphBorder = (border) => {
81247
+ const parts = [];
81248
+ if (border.style !== void 0) parts.push(`s:${border.style}`);
81249
+ if (border.width !== void 0) parts.push(`w:${border.width}`);
81250
+ if (border.color !== void 0) parts.push(`c:${border.color}`);
81251
+ if (border.space !== void 0) parts.push(`sp:${border.space}`);
81252
+ return parts.join(",");
81253
+ };
81254
+ const hashParagraphBorders = (borders) => {
81255
+ const parts = [];
81256
+ if (borders.top) parts.push(`t:[${hashParagraphBorder(borders.top)}]`);
81257
+ if (borders.right) parts.push(`r:[${hashParagraphBorder(borders.right)}]`);
81258
+ if (borders.bottom) parts.push(`b:[${hashParagraphBorder(borders.bottom)}]`);
81259
+ if (borders.left) parts.push(`l:[${hashParagraphBorder(borders.left)}]`);
81260
+ return parts.join(";");
81261
+ };
81262
+ const hashParagraphFrame = (frame) => {
81263
+ const parts = [];
81264
+ if (frame.wrap !== void 0) parts.push(`w:${frame.wrap}`);
81265
+ if (frame.x !== void 0) parts.push(`x:${frame.x}`);
81266
+ if (frame.y !== void 0) parts.push(`y:${frame.y}`);
81267
+ if (frame.xAlign !== void 0) parts.push(`xa:${frame.xAlign}`);
81268
+ if (frame.yAlign !== void 0) parts.push(`ya:${frame.yAlign}`);
81269
+ if (frame.hAnchor !== void 0) parts.push(`ha:${frame.hAnchor}`);
81270
+ if (frame.vAnchor !== void 0) parts.push(`va:${frame.vAnchor}`);
81271
+ return parts.join(",");
81272
+ };
81227
81273
  const hashRuns = (block) => {
81228
81274
  if (block.kind === "table") {
81229
81275
  const tableBlock = block;
@@ -81319,7 +81365,59 @@ const hashRuns = (block) => {
81319
81365
  numberingKey = `|num:${np.numId ?? ""}:${np.ilvl ?? 0}:${markerTextKey}`;
81320
81366
  }
81321
81367
  }
81322
- return `${trackedMode}:${trackedEnabled ? "on" : "off"}|${runsHash}${numberingKey}`;
81368
+ let paragraphAttrsKey = "";
81369
+ if (block.attrs) {
81370
+ const attrs = block.attrs;
81371
+ const parts = [];
81372
+ if (attrs.alignment) parts.push(`al:${attrs.alignment}`);
81373
+ if (attrs.spacing) {
81374
+ const s2 = attrs.spacing;
81375
+ if (s2.before !== void 0) parts.push(`sb:${s2.before}`);
81376
+ if (s2.after !== void 0) parts.push(`sa:${s2.after}`);
81377
+ if (s2.line !== void 0) parts.push(`sl:${s2.line}`);
81378
+ if (s2.lineRule) parts.push(`sr:${s2.lineRule}`);
81379
+ }
81380
+ if (attrs.indent) {
81381
+ const ind = attrs.indent;
81382
+ if (ind.left !== void 0) parts.push(`il:${ind.left}`);
81383
+ if (ind.right !== void 0) parts.push(`ir:${ind.right}`);
81384
+ if (ind.firstLine !== void 0) parts.push(`if:${ind.firstLine}`);
81385
+ if (ind.hanging !== void 0) parts.push(`ih:${ind.hanging}`);
81386
+ }
81387
+ if (attrs.borders) {
81388
+ parts.push(`br:${hashParagraphBorders(attrs.borders)}`);
81389
+ }
81390
+ if (attrs.shading) {
81391
+ const sh = attrs.shading;
81392
+ if (sh.fill) parts.push(`shf:${sh.fill}`);
81393
+ if (sh.color) parts.push(`shc:${sh.color}`);
81394
+ }
81395
+ if (attrs.tabs && attrs.tabs.length > 0) {
81396
+ const tabsHash = attrs.tabs.map((t) => `${t.val ?? ""}:${t.pos ?? ""}:${t.leader ?? ""}`).join(",");
81397
+ parts.push(`tb:${tabsHash}`);
81398
+ }
81399
+ if (attrs.direction) parts.push(`dir:${attrs.direction}`);
81400
+ if (attrs.rtl) parts.push("rtl");
81401
+ if (attrs.keepNext) parts.push("kn");
81402
+ if (attrs.keepLines) parts.push("kl");
81403
+ if (attrs.floatAlignment) parts.push(`fa:${attrs.floatAlignment}`);
81404
+ if (attrs.contextualSpacing) parts.push("cs");
81405
+ if (attrs.suppressFirstLineIndent) parts.push("sfi");
81406
+ if (attrs.dropCap) parts.push(`dc:${attrs.dropCap}`);
81407
+ if (attrs.dropCapDescriptor) {
81408
+ const dcd = attrs.dropCapDescriptor;
81409
+ parts.push(`dcd:${dcd.mode ?? ""}:${dcd.lines ?? ""}`);
81410
+ }
81411
+ if (attrs.frame) {
81412
+ parts.push(`fr:${hashParagraphFrame(attrs.frame)}`);
81413
+ }
81414
+ if (attrs.tabIntervalTwips !== void 0) parts.push(`ti:${attrs.tabIntervalTwips}`);
81415
+ if (attrs.decimalSeparator) parts.push(`ds:${attrs.decimalSeparator}`);
81416
+ if (parts.length > 0) {
81417
+ paragraphAttrsKey = `|pa:${parts.join(":")}`;
81418
+ }
81419
+ }
81420
+ return `${trackedMode}:${trackedEnabled ? "on" : "off"}|${runsHash}${numberingKey}${paragraphAttrsKey}`;
81323
81421
  };
81324
81422
  const createStats = () => ({
81325
81423
  hits: 0,
@@ -82204,6 +82302,75 @@ const getTrackedChangeKey = (run2) => {
82204
82302
  }
82205
82303
  return "";
82206
82304
  };
82305
+ const paragraphSpacingEqual = (a, b2) => {
82306
+ if (a === b2) return true;
82307
+ if (!a || !b2) return !a && !b2;
82308
+ return a.before === b2.before && a.after === b2.after && a.line === b2.line && a.lineRule === b2.lineRule && a.beforeAutospacing === b2.beforeAutospacing && a.afterAutospacing === b2.afterAutospacing;
82309
+ };
82310
+ const paragraphIndentEqual = (a, b2) => {
82311
+ if (a === b2) return true;
82312
+ if (!a || !b2) return !a && !b2;
82313
+ return a.left === b2.left && a.right === b2.right && a.firstLine === b2.firstLine && a.hanging === b2.hanging;
82314
+ };
82315
+ const paragraphBorderEqual = (a, b2) => {
82316
+ if (a === b2) return true;
82317
+ if (!a || !b2) return !a && !b2;
82318
+ return a.style === b2.style && a.width === b2.width && a.color === b2.color && a.space === b2.space;
82319
+ };
82320
+ const paragraphBordersEqual = (a, b2) => {
82321
+ if (a === b2) return true;
82322
+ if (!a || !b2) return !a && !b2;
82323
+ return paragraphBorderEqual(a.top, b2.top) && paragraphBorderEqual(a.right, b2.right) && paragraphBorderEqual(a.bottom, b2.bottom) && paragraphBorderEqual(a.left, b2.left);
82324
+ };
82325
+ const paragraphShadingEqual = (a, b2) => {
82326
+ if (a === b2) return true;
82327
+ if (!a || !b2) return !a && !b2;
82328
+ return a.fill === b2.fill && a.color === b2.color && a.val === b2.val && a.themeColor === b2.themeColor && a.themeFill === b2.themeFill && a.themeFillShade === b2.themeFillShade && a.themeFillTint === b2.themeFillTint && a.themeShade === b2.themeShade && a.themeTint === b2.themeTint;
82329
+ };
82330
+ const tabStopEqual = (a, b2) => {
82331
+ return a.val === b2.val && a.pos === b2.pos && a.leader === b2.leader;
82332
+ };
82333
+ const tabStopsEqual = (a, b2) => {
82334
+ if (a === b2) return true;
82335
+ if (!a || !b2) return !a && !b2;
82336
+ if (a.length !== b2.length) return false;
82337
+ for (let i = 0; i < a.length; i += 1) {
82338
+ if (!tabStopEqual(a[i], b2[i])) return false;
82339
+ }
82340
+ return true;
82341
+ };
82342
+ const paragraphFrameEqual = (a, b2) => {
82343
+ if (a === b2) return true;
82344
+ if (!a || !b2) return !a && !b2;
82345
+ return a.wrap === b2.wrap && a.x === b2.x && a.y === b2.y && a.xAlign === b2.xAlign && a.yAlign === b2.yAlign && a.hAnchor === b2.hAnchor && a.vAnchor === b2.vAnchor;
82346
+ };
82347
+ const dropCapDescriptorEqual = (a, b2) => {
82348
+ if (a === b2) return true;
82349
+ if (!a || !b2) return !a && !b2;
82350
+ if (a.mode !== b2.mode || a.lines !== b2.lines) return false;
82351
+ const runA = a.run;
82352
+ const runB = b2.run;
82353
+ if (!runA || !runB) return !runA && !runB;
82354
+ if (runA.text !== runB.text || runA.fontFamily !== runB.fontFamily || runA.fontSize !== runB.fontSize || runA.bold !== runB.bold || runA.italic !== runB.italic || runA.color !== runB.color) {
82355
+ return false;
82356
+ }
82357
+ return true;
82358
+ };
82359
+ const paragraphAttrsEqual = (a, b2) => {
82360
+ if (a === b2) return true;
82361
+ if (!a || !b2) return !a && !b2;
82362
+ if (a.alignment !== b2.alignment || a.contextualSpacing !== b2.contextualSpacing || a.suppressFirstLineIndent !== b2.suppressFirstLineIndent || a.dropCap !== b2.dropCap || a.decimalSeparator !== b2.decimalSeparator || a.tabIntervalTwips !== b2.tabIntervalTwips || a.keepNext !== b2.keepNext || a.keepLines !== b2.keepLines || a.direction !== b2.direction || a.rtl !== b2.rtl || a.floatAlignment !== b2.floatAlignment) {
82363
+ return false;
82364
+ }
82365
+ if (!paragraphSpacingEqual(a.spacing, b2.spacing)) return false;
82366
+ if (!paragraphIndentEqual(a.indent, b2.indent)) return false;
82367
+ if (!paragraphBordersEqual(a.borders, b2.borders)) return false;
82368
+ if (!paragraphShadingEqual(a.shading, b2.shading)) return false;
82369
+ if (!tabStopsEqual(a.tabs, b2.tabs)) return false;
82370
+ if (!paragraphFrameEqual(a.frame, b2.frame)) return false;
82371
+ if (!dropCapDescriptorEqual(a.dropCapDescriptor, b2.dropCapDescriptor)) return false;
82372
+ return true;
82373
+ };
82207
82374
  const paragraphBlocksEqual = (a, b2) => {
82208
82375
  const aMode = a.attrs?.trackedChangesMode ?? "review";
82209
82376
  const bMode = b2.attrs?.trackedChangesMode ?? "review";
@@ -82211,6 +82378,7 @@ const paragraphBlocksEqual = (a, b2) => {
82211
82378
  const aEnabled = resolveTrackedChangesEnabled(a.attrs, true);
82212
82379
  const bEnabled = resolveTrackedChangesEnabled(b2.attrs, true);
82213
82380
  if (aEnabled !== bEnabled) return false;
82381
+ if (!paragraphAttrsEqual(a.attrs, b2.attrs)) return false;
82214
82382
  if (a.runs.length !== b2.runs.length) return false;
82215
82383
  for (let i = 0; i < a.runs.length; i += 1) {
82216
82384
  const runA = a.runs[i];
@@ -1,6 +1,6 @@
1
1
  import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
2
- import { T as TextSelection } from "./chunks/converter-CpOA_SSA.js";
3
- import { _ as _export_sfc } from "./chunks/editor-DvF9Gp0h.js";
2
+ import { T as TextSelection } from "./chunks/converter-CvPb50HR.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-CsWOz21v.js";
4
4
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
5
5
  const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
6
6
  async function baseInsightsFetch(payload, options = {}) {
@@ -42697,7 +42697,7 @@ const _SuperConverter = class _SuperConverter {
42697
42697
  static getStoredSuperdocVersion(docx) {
42698
42698
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
42699
42699
  }
42700
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.92") {
42700
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.93") {
42701
42701
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
42702
42702
  }
42703
42703
  /**
@@ -1,4 +1,4 @@
1
- import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-CpOA_SSA.js";
1
+ import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-CvPb50HR.js";
2
2
  function commonjsRequire(path) {
3
3
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }