@harbour-enterprises/superdoc 1.0.0-beta.98 → 1.0.0-beta.99

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 (28) hide show
  1. package/dist/chunks/{PdfViewer-D1Ot32kX.cjs → PdfViewer-BtuTHUW7.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-1_KffD-j.es.js → PdfViewer-DF-v5Yrr.es.js} +1 -1
  3. package/dist/chunks/{index-Dg_sTYZK-DYDzxoXL.cjs → index-BB0msI45-CPU6Ak2R.cjs} +1 -1
  4. package/dist/chunks/{index-Dg_sTYZK-D20z8mus.es.js → index-BB0msI45-DUPBw4Bh.es.js} +1 -1
  5. package/dist/chunks/{index-CUO7gEi8.cjs → index-BBu9BBvp.cjs} +5 -14
  6. package/dist/chunks/{index-CP2_WwLA.es.js → index-CJy3FxL7.es.js} +5 -14
  7. package/dist/chunks/{super-editor.es-3dJOUw65.es.js → super-editor.es-BiaFIbw-.es.js} +133 -13
  8. package/dist/chunks/{super-editor.es-DN_dgBH0.cjs → super-editor.es-C04sFzVD.cjs} +133 -13
  9. package/dist/style.css +6 -6
  10. package/dist/super-editor/ai-writer.es.js +2 -2
  11. package/dist/super-editor/chunks/{converter-Oj-eTB79.js → converter-B_cVJPnh.js} +1 -1
  12. package/dist/super-editor/chunks/{docx-zipper-Dl188zQ3.js → docx-zipper-fPWx7kV0.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-DBXoaaWP.js → editor-DS9z42Je.js} +134 -14
  14. package/dist/super-editor/chunks/{index-Dg_sTYZK.js → index-BB0msI45.js} +1 -1
  15. package/dist/super-editor/chunks/{toolbar-PlGGj0Ew.js → toolbar-aIFlIr6h.js} +2 -2
  16. package/dist/super-editor/converter.es.js +1 -1
  17. package/dist/super-editor/docx-zipper.es.js +2 -2
  18. package/dist/super-editor/editor.es.js +3 -3
  19. package/dist/super-editor/file-zipper.es.js +1 -1
  20. package/dist/super-editor/super-editor.es.js +6 -6
  21. package/dist/super-editor/toolbar.es.js +2 -2
  22. package/dist/super-editor.cjs +1 -1
  23. package/dist/super-editor.es.js +1 -1
  24. package/dist/superdoc.cjs +2 -2
  25. package/dist/superdoc.es.js +2 -2
  26. package/dist/superdoc.umd.js +137 -26
  27. package/dist/superdoc.umd.js.map +1 -1
  28. package/package.json +1 -1
@@ -42422,7 +42422,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42422
42422
  static getStoredSuperdocVersion(docx) {
42423
42423
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42424
42424
  }
42425
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.98") {
42425
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.99") {
42426
42426
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42427
42427
  }
42428
42428
  /**
@@ -67497,7 +67497,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67497
67497
  const shouldSkipNodeView = (editor) => {
67498
67498
  return isHeadless(editor);
67499
67499
  };
67500
- const summaryVersion = "1.0.0-beta.98";
67500
+ const summaryVersion = "1.0.0-beta.99";
67501
67501
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
67502
67502
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
67503
67503
  function mapAttributes(attrs) {
@@ -68286,7 +68286,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68286
68286
  { default: remarkStringify2 },
68287
68287
  { default: remarkGfm2 }
68288
68288
  ] = await Promise.all([
68289
- Promise.resolve().then(() => indexDg_sTYZK),
68289
+ Promise.resolve().then(() => indexBB0msI45),
68290
68290
  Promise.resolve().then(() => indexDRCvimau),
68291
68291
  Promise.resolve().then(() => indexC_x_N6Uh),
68292
68292
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -68491,7 +68491,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68491
68491
  * Process collaboration migrations
68492
68492
  */
68493
68493
  processCollaborationMigrations() {
68494
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.98");
68494
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.99");
68495
68495
  if (!this.options.ydoc) return;
68496
68496
  const metaMap = this.options.ydoc.getMap("meta");
68497
68497
  let docVersion = metaMap.get("version");
@@ -82282,6 +82282,61 @@ ${l}
82282
82282
  doc2.head?.appendChild(styleEl);
82283
82283
  rulerStylesInjected = true;
82284
82284
  }
82285
+ const hashParagraphBorder$1 = (border) => {
82286
+ const parts = [];
82287
+ if (border.style !== void 0) parts.push(`s:${border.style}`);
82288
+ if (border.width !== void 0) parts.push(`w:${border.width}`);
82289
+ if (border.color !== void 0) parts.push(`c:${border.color}`);
82290
+ if (border.space !== void 0) parts.push(`sp:${border.space}`);
82291
+ return parts.join(",");
82292
+ };
82293
+ const hashParagraphBorders$1 = (borders) => {
82294
+ const parts = [];
82295
+ if (borders.top) parts.push(`t:[${hashParagraphBorder$1(borders.top)}]`);
82296
+ if (borders.right) parts.push(`r:[${hashParagraphBorder$1(borders.right)}]`);
82297
+ if (borders.bottom) parts.push(`b:[${hashParagraphBorder$1(borders.bottom)}]`);
82298
+ if (borders.left) parts.push(`l:[${hashParagraphBorder$1(borders.left)}]`);
82299
+ return parts.join(";");
82300
+ };
82301
+ const hasStringProp = (run2, prop) => {
82302
+ return prop in run2 && typeof run2[prop] === "string";
82303
+ };
82304
+ const hasNumberProp = (run2, prop) => {
82305
+ return prop in run2 && typeof run2[prop] === "number";
82306
+ };
82307
+ const hasBooleanProp = (run2, prop) => {
82308
+ return prop in run2 && typeof run2[prop] === "boolean";
82309
+ };
82310
+ const getRunStringProp = (run2, prop) => {
82311
+ if (hasStringProp(run2, prop)) {
82312
+ return run2[prop];
82313
+ }
82314
+ return "";
82315
+ };
82316
+ const getRunNumberProp = (run2, prop) => {
82317
+ if (hasNumberProp(run2, prop)) {
82318
+ return run2[prop];
82319
+ }
82320
+ return 0;
82321
+ };
82322
+ const getRunBooleanProp = (run2, prop) => {
82323
+ if (hasBooleanProp(run2, prop)) {
82324
+ return run2[prop];
82325
+ }
82326
+ return false;
82327
+ };
82328
+ const getRunUnderlineStyle = (run2) => {
82329
+ if ("underline" in run2 && run2.underline && typeof run2.underline === "object") {
82330
+ return run2.underline.style ?? "";
82331
+ }
82332
+ return "";
82333
+ };
82334
+ const getRunUnderlineColor = (run2) => {
82335
+ if ("underline" in run2 && run2.underline && typeof run2.underline === "object") {
82336
+ return run2.underline.color ?? "";
82337
+ }
82338
+ return "";
82339
+ };
82285
82340
  function isMinimalWordLayout(value) {
82286
82341
  if (typeof value !== "object" || value === null) {
82287
82342
  return false;
@@ -85361,7 +85416,7 @@ ${l}
85361
85416
  attrs.indent?.right ?? "",
85362
85417
  attrs.indent?.firstLine ?? "",
85363
85418
  attrs.indent?.hanging ?? "",
85364
- attrs.borders ? JSON.stringify(attrs.borders) : "",
85419
+ attrs.borders ? hashParagraphBorders$1(attrs.borders) : "",
85365
85420
  attrs.shading?.fill ?? "",
85366
85421
  attrs.shading?.color ?? "",
85367
85422
  attrs.direction ?? "",
@@ -85450,14 +85505,43 @@ ${l}
85450
85505
  for (const cellBlock of cellBlocks) {
85451
85506
  hash2 = hashString(hash2, cellBlock?.kind ?? "unknown");
85452
85507
  if (cellBlock?.kind === "paragraph") {
85453
- const runs2 = cellBlock.runs ?? [];
85508
+ const paragraphBlock = cellBlock;
85509
+ const runs2 = paragraphBlock.runs ?? [];
85454
85510
  hash2 = hashNumber(hash2, runs2.length);
85511
+ const attrs = paragraphBlock.attrs;
85512
+ if (attrs) {
85513
+ hash2 = hashString(hash2, attrs.alignment ?? "");
85514
+ hash2 = hashNumber(hash2, attrs.spacing?.before ?? 0);
85515
+ hash2 = hashNumber(hash2, attrs.spacing?.after ?? 0);
85516
+ hash2 = hashNumber(hash2, attrs.spacing?.line ?? 0);
85517
+ hash2 = hashString(hash2, attrs.spacing?.lineRule ?? "");
85518
+ hash2 = hashNumber(hash2, attrs.indent?.left ?? 0);
85519
+ hash2 = hashNumber(hash2, attrs.indent?.right ?? 0);
85520
+ hash2 = hashNumber(hash2, attrs.indent?.firstLine ?? 0);
85521
+ hash2 = hashNumber(hash2, attrs.indent?.hanging ?? 0);
85522
+ hash2 = hashString(hash2, attrs.shading?.fill ?? "");
85523
+ hash2 = hashString(hash2, attrs.shading?.color ?? "");
85524
+ hash2 = hashString(hash2, attrs.direction ?? "");
85525
+ hash2 = hashString(hash2, attrs.rtl ? "1" : "");
85526
+ if (attrs.borders) {
85527
+ hash2 = hashString(hash2, hashParagraphBorders$1(attrs.borders));
85528
+ }
85529
+ }
85455
85530
  for (const run2 of runs2) {
85456
85531
  if ("text" in run2 && typeof run2.text === "string") {
85457
85532
  hash2 = hashString(hash2, run2.text);
85458
85533
  }
85459
85534
  hash2 = hashNumber(hash2, run2.pmStart ?? -1);
85460
85535
  hash2 = hashNumber(hash2, run2.pmEnd ?? -1);
85536
+ hash2 = hashString(hash2, getRunStringProp(run2, "color"));
85537
+ hash2 = hashString(hash2, getRunStringProp(run2, "highlight"));
85538
+ hash2 = hashString(hash2, getRunBooleanProp(run2, "bold") ? "1" : "");
85539
+ hash2 = hashString(hash2, getRunBooleanProp(run2, "italic") ? "1" : "");
85540
+ hash2 = hashNumber(hash2, getRunNumberProp(run2, "fontSize"));
85541
+ hash2 = hashString(hash2, getRunStringProp(run2, "fontFamily"));
85542
+ hash2 = hashString(hash2, getRunUnderlineStyle(run2));
85543
+ hash2 = hashString(hash2, getRunUnderlineColor(run2));
85544
+ hash2 = hashString(hash2, getRunBooleanProp(run2, "strike") ? "1" : "");
85461
85545
  }
85462
85546
  }
85463
85547
  }
@@ -89155,10 +89239,6 @@ ${l}
89155
89239
  }
89156
89240
  return attrs.trackedChangesEnabled !== false;
89157
89241
  };
89158
- const MAX_CACHE_SIZE$1 = 1e4;
89159
- const BYTES_PER_ENTRY_ESTIMATE = 5e3;
89160
- const NORMALIZED_WHITESPACE = /\s+/g;
89161
- const normalizeText = (text2) => text2.replace(NORMALIZED_WHITESPACE, " ");
89162
89242
  const hashParagraphBorder = (border) => {
89163
89243
  const parts = [];
89164
89244
  if (border.style !== void 0) parts.push(`s:${border.style}`);
@@ -89175,6 +89255,10 @@ ${l}
89175
89255
  if (borders.left) parts.push(`l:[${hashParagraphBorder(borders.left)}]`);
89176
89256
  return parts.join(";");
89177
89257
  };
89258
+ const MAX_CACHE_SIZE$1 = 1e4;
89259
+ const BYTES_PER_ENTRY_ESTIMATE = 5e3;
89260
+ const NORMALIZED_WHITESPACE = /\s+/g;
89261
+ const normalizeText = (text2) => text2.replace(NORMALIZED_WHITESPACE, " ");
89178
89262
  const hashParagraphFrame = (frame) => {
89179
89263
  const parts = [];
89180
89264
  if (frame.wrap !== void 0) parts.push(`w:${frame.wrap}`);
@@ -89211,12 +89295,14 @@ ${l}
89211
89295
  const color2 = "color" in run2 ? run2.color : void 0;
89212
89296
  const fontSize2 = "fontSize" in run2 ? run2.fontSize : void 0;
89213
89297
  const fontFamily2 = "fontFamily" in run2 ? run2.fontFamily : void 0;
89298
+ const highlight = "highlight" in run2 ? run2.highlight : void 0;
89214
89299
  const marks = [
89215
89300
  bold ? "b" : "",
89216
89301
  italic ? "i" : "",
89217
89302
  color2 ?? "",
89218
89303
  fontSize2 !== void 0 ? `fs:${fontSize2}` : "",
89219
- fontFamily2 ? `ff:${fontFamily2}` : ""
89304
+ fontFamily2 ? `ff:${fontFamily2}` : "",
89305
+ highlight ? `hl:${highlight}` : ""
89220
89306
  ].join("");
89221
89307
  let trackedKey = "";
89222
89308
  if (hasTrackedChange(run2)) {
@@ -89227,6 +89313,38 @@ ${l}
89227
89313
  }
89228
89314
  cellHashes.push(`${text2}:${marks}${trackedKey}`);
89229
89315
  }
89316
+ if (paragraphBlock.attrs) {
89317
+ const attrs = paragraphBlock.attrs;
89318
+ const parts = [];
89319
+ if (attrs.alignment) parts.push(`al:${attrs.alignment}`);
89320
+ if (attrs.spacing) {
89321
+ const s2 = attrs.spacing;
89322
+ if (s2.before !== void 0) parts.push(`sb:${s2.before}`);
89323
+ if (s2.after !== void 0) parts.push(`sa:${s2.after}`);
89324
+ if (s2.line !== void 0) parts.push(`sl:${s2.line}`);
89325
+ if (s2.lineRule) parts.push(`sr:${s2.lineRule}`);
89326
+ }
89327
+ if (attrs.indent) {
89328
+ const ind = attrs.indent;
89329
+ if (ind.left !== void 0) parts.push(`il:${ind.left}`);
89330
+ if (ind.right !== void 0) parts.push(`ir:${ind.right}`);
89331
+ if (ind.firstLine !== void 0) parts.push(`if:${ind.firstLine}`);
89332
+ if (ind.hanging !== void 0) parts.push(`ih:${ind.hanging}`);
89333
+ }
89334
+ if (attrs.borders) {
89335
+ parts.push(`br:${hashParagraphBorders(attrs.borders)}`);
89336
+ }
89337
+ if (attrs.shading) {
89338
+ const sh = attrs.shading;
89339
+ if (sh.fill) parts.push(`shf:${sh.fill}`);
89340
+ if (sh.color) parts.push(`shc:${sh.color}`);
89341
+ }
89342
+ if (attrs.direction) parts.push(`dir:${attrs.direction}`);
89343
+ if (attrs.rtl) parts.push("rtl");
89344
+ if (parts.length > 0) {
89345
+ cellHashes.push(`pa:${parts.join(":")}`);
89346
+ }
89347
+ }
89230
89348
  }
89231
89349
  }
89232
89350
  }
@@ -89250,12 +89368,14 @@ ${l}
89250
89368
  const color2 = "color" in run2 ? run2.color : void 0;
89251
89369
  const fontSize2 = "fontSize" in run2 ? run2.fontSize : void 0;
89252
89370
  const fontFamily2 = "fontFamily" in run2 ? run2.fontFamily : void 0;
89371
+ const highlight = "highlight" in run2 ? run2.highlight : void 0;
89253
89372
  const marks = [
89254
89373
  bold ? "b" : "",
89255
89374
  italic ? "i" : "",
89256
89375
  color2 ?? "",
89257
89376
  fontSize2 !== void 0 ? `fs:${fontSize2}` : "",
89258
- fontFamily2 ? `ff:${fontFamily2}` : ""
89377
+ fontFamily2 ? `ff:${fontFamily2}` : "",
89378
+ highlight ? `hl:${highlight}` : ""
89259
89379
  ].join("");
89260
89380
  let trackedKey = "";
89261
89381
  if (hasTrackedChange(run2)) {
@@ -90382,7 +90502,7 @@ ${l}
90382
90502
  for (let i2 = 0; i2 < a2.runs.length; i2 += 1) {
90383
90503
  const runA = a2.runs[i2];
90384
90504
  const runB = b2.runs[i2];
90385
- if (("src" in runA || runA.kind === "lineBreak" || runA.kind === "break" || runA.kind === "fieldAnnotation" ? "" : runA.text) !== ("src" in runB || runB.kind === "lineBreak" || runB.kind === "break" || runB.kind === "fieldAnnotation" ? "" : runB.text) || ("bold" in runA ? runA.bold : false) !== ("bold" in runB ? runB.bold : false) || ("italic" in runA ? runA.italic : false) !== ("italic" in runB ? runB.italic : false) || ("color" in runA ? runA.color : void 0) !== ("color" in runB ? runB.color : void 0) || ("fontSize" in runA ? runA.fontSize : void 0) !== ("fontSize" in runB ? runB.fontSize : void 0) || ("fontFamily" in runA ? runA.fontFamily : void 0) !== ("fontFamily" in runB ? runB.fontFamily : void 0) || getTrackedChangeKey(runA) !== getTrackedChangeKey(runB)) {
90505
+ if (("src" in runA || runA.kind === "lineBreak" || runA.kind === "break" || runA.kind === "fieldAnnotation" ? "" : runA.text) !== ("src" in runB || runB.kind === "lineBreak" || runB.kind === "break" || runB.kind === "fieldAnnotation" ? "" : runB.text) || ("bold" in runA ? runA.bold : false) !== ("bold" in runB ? runB.bold : false) || ("italic" in runA ? runA.italic : false) !== ("italic" in runB ? runB.italic : false) || ("color" in runA ? runA.color : void 0) !== ("color" in runB ? runB.color : void 0) || ("fontSize" in runA ? runA.fontSize : void 0) !== ("fontSize" in runB ? runB.fontSize : void 0) || ("fontFamily" in runA ? runA.fontFamily : void 0) !== ("fontFamily" in runB ? runB.fontFamily : void 0) || ("highlight" in runA ? runA.highlight : void 0) !== ("highlight" in runB ? runB.highlight : void 0) || getTrackedChangeKey(runA) !== getTrackedChangeKey(runB)) {
90386
90506
  return false;
90387
90507
  }
90388
90508
  }
@@ -150458,19 +150578,10 @@ ${style2}
150458
150578
  measurementTimeoutId.value = null;
150459
150579
  }
150460
150580
  const totalComments = getFloatingComments.value.length;
150461
- const measuredComments = renderedSizes.value.length;
150462
150581
  if (totalComments === 0) {
150463
150582
  return;
150464
150583
  }
150465
- if (measuredComments === totalComments) {
150466
- nextTick(processLocations);
150467
- } else if (measuredComments > 0 && !firstGroupRendered.value) {
150468
- measurementTimeoutId.value = setTimeout(() => {
150469
- if (!firstGroupRendered.value && renderedSizes.value.length > 0) {
150470
- processLocations();
150471
- }
150472
- }, 100);
150473
- }
150584
+ nextTick(processLocations);
150474
150585
  });
150475
150586
  watch(activeComment, (newVal, oldVal) => {
150476
150587
  nextTick(() => {
@@ -150548,7 +150659,7 @@ ${style2}
150548
150659
  };
150549
150660
  }
150550
150661
  };
150551
- const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-eab6fbfa"]]);
150662
+ const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-6905dd07"]]);
150552
150663
  const _sfc_main$9 = {
150553
150664
  __name: "TextField",
150554
150665
  props: {
@@ -152065,7 +152176,7 @@ ${style2}
152065
152176
  this.config.colors = shuffleArray(this.config.colors);
152066
152177
  this.userColorMap = /* @__PURE__ */ new Map();
152067
152178
  this.colorIndex = 0;
152068
- this.version = "1.0.0-beta.98";
152179
+ this.version = "1.0.0-beta.99";
152069
152180
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
152070
152181
  this.superdocId = config2.superdocId || v4();
152071
152182
  this.colors = this.config.colors;
@@ -154537,7 +154648,7 @@ ${style2}
154537
154648
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
154538
154649
  );
154539
154650
  }
154540
- const indexDg_sTYZK = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
154651
+ const indexBB0msI45 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
154541
154652
  __proto__: null,
154542
154653
  unified
154543
154654
  }, Symbol.toStringTag, { value: "Module" }));