@harbour-enterprises/superdoc 1.0.0-beta.67 → 1.0.0-beta.69

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 (29) hide show
  1. package/dist/chunks/{PdfViewer-P0cvxvjh.es.js → PdfViewer-CA6KnM59.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-DTK306FZ.cjs → PdfViewer-YwKMy4mI.cjs} +1 -1
  3. package/dist/chunks/{index-Cixgd5bX-39fIJYpL.es.js → index-CC3dvvOE-CPwuLkRH.es.js} +1 -1
  4. package/dist/chunks/{index-Cixgd5bX-ByqITVZq.cjs → index-CC3dvvOE-tWbS-E8c.cjs} +1 -1
  5. package/dist/chunks/{index-U-bzTPNb.es.js → index-DZxdd1Mx.es.js} +3 -3
  6. package/dist/chunks/{index-BNGG0zf5.cjs → index-wDz6wmGQ.cjs} +3 -3
  7. package/dist/chunks/{super-editor.es-CIPQg4rG.es.js → super-editor.es-BRW6zqaK.es.js} +55 -4
  8. package/dist/chunks/{super-editor.es-DKbuo7ju.cjs → super-editor.es-CnIBUAWl.cjs} +55 -4
  9. package/dist/packages/superdoc/src/core/types/index.d.ts +14 -15
  10. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-BLNx019v.js → converter-AB0x3k9L.js} +1 -1
  13. package/dist/super-editor/chunks/{docx-zipper-BfQBQQz_.js → docx-zipper-Dd08HgnT.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-5RSp-DNd.js → editor-CWl_StDm.js} +56 -5
  15. package/dist/super-editor/chunks/{index-Cixgd5bX.js → index-CC3dvvOE.js} +1 -1
  16. package/dist/super-editor/chunks/{toolbar-Db_-z4Fa.js → toolbar-Dzq7iMj-.js} +2 -2
  17. package/dist/super-editor/converter.es.js +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/file-zipper.es.js +1 -1
  21. package/dist/super-editor/super-editor.es.js +6 -6
  22. package/dist/super-editor/toolbar.es.js +2 -2
  23. package/dist/super-editor.cjs +1 -1
  24. package/dist/super-editor.es.js +1 -1
  25. package/dist/superdoc.cjs +2 -2
  26. package/dist/superdoc.es.js +2 -2
  27. package/dist/superdoc.umd.js +57 -6
  28. package/dist/superdoc.umd.js.map +1 -1
  29. package/package.json +1 -1
@@ -42327,7 +42327,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42327
42327
  static getStoredSuperdocVersion(docx) {
42328
42328
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42329
42329
  }
42330
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.67") {
42330
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.69") {
42331
42331
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42332
42332
  }
42333
42333
  /**
@@ -67373,7 +67373,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67373
67373
  const shouldSkipNodeView = (editor) => {
67374
67374
  return isHeadless(editor);
67375
67375
  };
67376
- const summaryVersion = "1.0.0-beta.67";
67376
+ const summaryVersion = "1.0.0-beta.69";
67377
67377
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
67378
67378
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
67379
67379
  function mapAttributes(attrs) {
@@ -68162,7 +68162,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68162
68162
  { default: remarkStringify2 },
68163
68163
  { default: remarkGfm2 }
68164
68164
  ] = await Promise.all([
68165
- Promise.resolve().then(() => indexCixgd5bX),
68165
+ Promise.resolve().then(() => indexCC3dvvOE),
68166
68166
  Promise.resolve().then(() => indexDRCvimau),
68167
68167
  Promise.resolve().then(() => indexC_x_N6Uh),
68168
68168
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -68367,7 +68367,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68367
68367
  * Process collaboration migrations
68368
68368
  */
68369
68369
  processCollaborationMigrations() {
68370
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.67");
68370
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.69");
68371
68371
  if (!this.options.ydoc) return;
68372
68372
  const metaMap = this.options.ydoc.getMap("meta");
68373
68373
  let docVersion = metaMap.get("version");
@@ -97760,6 +97760,46 @@ ${l}
97760
97760
  }
97761
97761
  return { left: left2, top: top2 };
97762
97762
  }
97763
+ function findContainingBlockAncestor(element2) {
97764
+ if (!element2) return null;
97765
+ let current = element2.parentElement;
97766
+ while (current && current !== document.body && current !== document.documentElement) {
97767
+ try {
97768
+ const style2 = window.getComputedStyle(current);
97769
+ const transform = style2.transform;
97770
+ const filter = style2.filter;
97771
+ const backdropFilter = style2.backdropFilter || style2.webkitBackdropFilter;
97772
+ const perspective = style2.perspective;
97773
+ const willChange = style2.willChange;
97774
+ const contain = style2.contain;
97775
+ if (transform && transform !== "none") {
97776
+ return current;
97777
+ }
97778
+ if (filter && filter !== "none") {
97779
+ return current;
97780
+ }
97781
+ if (backdropFilter && backdropFilter !== "none") {
97782
+ return current;
97783
+ }
97784
+ if (perspective && perspective !== "none") {
97785
+ return current;
97786
+ }
97787
+ if (willChange && willChange !== "auto") {
97788
+ const values = willChange.split(",").map((v2) => v2.trim());
97789
+ if (values.includes("transform") || values.includes("perspective")) {
97790
+ return current;
97791
+ }
97792
+ }
97793
+ if (contain && /paint|layout|strict|content/.test(contain)) {
97794
+ return current;
97795
+ }
97796
+ } catch (error) {
97797
+ console.warn("SlashMenu: Failed to get computed style for element", current, error);
97798
+ }
97799
+ current = current.parentElement;
97800
+ }
97801
+ return null;
97802
+ }
97763
97803
  const SlashMenuPluginKey = new PluginKey("slashMenu");
97764
97804
  const MENU_OFFSET_X = 100;
97765
97805
  const MENU_OFFSET_Y = 28;
@@ -97851,6 +97891,17 @@ ${l}
97851
97891
  }
97852
97892
  }
97853
97893
  }
97894
+ const menuSurface = editor.presentationEditor?.element ?? editor.view?.dom ?? editor.options?.element;
97895
+ const containingBlock = findContainingBlockAncestor(menuSurface);
97896
+ if (containingBlock) {
97897
+ try {
97898
+ const cbRect = containingBlock.getBoundingClientRect();
97899
+ left2 -= cbRect.left;
97900
+ top2 -= cbRect.top;
97901
+ } catch (error) {
97902
+ console.warn("SlashMenu: Failed to adjust for containing block", error);
97903
+ }
97904
+ }
97854
97905
  const offsetX = isContextMenu ? CONTEXT_MENU_OFFSET_X : MENU_OFFSET_X;
97855
97906
  const offsetY = isContextMenu ? CONTEXT_MENU_OFFSET_Y : MENU_OFFSET_Y;
97856
97907
  const menuPosition = {
@@ -150109,7 +150160,7 @@ ${style2}
150109
150160
  this.config.colors = shuffleArray(this.config.colors);
150110
150161
  this.userColorMap = /* @__PURE__ */ new Map();
150111
150162
  this.colorIndex = 0;
150112
- this.version = "1.0.0-beta.67";
150163
+ this.version = "1.0.0-beta.69";
150113
150164
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
150114
150165
  this.superdocId = config2.superdocId || v4();
150115
150166
  this.colors = this.config.colors;
@@ -152581,7 +152632,7 @@ ${style2}
152581
152632
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
152582
152633
  );
152583
152634
  }
152584
- const indexCixgd5bX = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
152635
+ const indexCC3dvvOE = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
152585
152636
  __proto__: null,
152586
152637
  unified
152587
152638
  }, Symbol.toStringTag, { value: "Module" }));