@harbour-enterprises/superdoc 1.0.0-beta.86 → 1.0.0-beta.87

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-SI3BgkBA.cjs → PdfViewer-Cwmc4rak.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-CykepcoV.es.js → PdfViewer-DAayAt76.es.js} +1 -1
  3. package/dist/chunks/{index-BpJVC0Wc.es.js → index-BV2SxVfK.es.js} +3 -3
  4. package/dist/chunks/{index-xfoqV3U-.cjs → index-huIbWXSg.cjs} +3 -3
  5. package/dist/chunks/{index-DeSyD44U-Dxv0c3H-.cjs → index-rv7o9043-DD5SvBoC.cjs} +1 -1
  6. package/dist/chunks/{index-DeSyD44U-BKmM9Hn7.es.js → index-rv7o9043-DVlRSGhv.es.js} +1 -1
  7. package/dist/chunks/{super-editor.es-CEmkebDF.es.js → super-editor.es-BuujpqOr.es.js} +92 -6
  8. package/dist/chunks/{super-editor.es-DLa6Nlsi.cjs → super-editor.es-C43B4f8Z.cjs} +92 -6
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-B25GbVbB.js → converter-G519mwN2.js} +1 -1
  11. package/dist/super-editor/chunks/{docx-zipper-ROb6hWD8.js → docx-zipper-CHfjJ_h-.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-C2fZMnwi.js → editor-BQsR9BR1.js} +93 -7
  13. package/dist/super-editor/chunks/{index-DeSyD44U.js → index-rv7o9043.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-CzcKT6WT.js → toolbar-DNfQq2Cl.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 +94 -8
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -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-xfoqV3U-.cjs");
4
+ const superdoc = require("./index-huIbWXSg.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -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-BpJVC0Wc.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-BV2SxVfK.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -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-CEmkebDF.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-BuujpqOr.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-CykepcoV.es.js"));
17254
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-DAayAt76.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.86";
18143
+ this.version = "1.0.0-beta.87";
18144
18144
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18145
18145
  this.superdocId = config.superdocId || v4();
18146
18146
  this.colors = this.config.colors;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-DLa6Nlsi.cjs");
2
+ const superEditor_es = require("./super-editor.es-C43B4f8Z.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-SI3BgkBA.cjs")));
17271
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-Cwmc4rak.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.86";
18160
+ this.version = "1.0.0-beta.87";
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-DLa6Nlsi.cjs");
3
+ const superEditor_es = require("./super-editor.es-C43B4f8Z.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-CEmkebDF.es.js";
1
+ import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-BuujpqOr.es.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG-CvBqQJbG.es.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -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.86") {
42383
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.87") {
42384
42384
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42385
42385
  }
42386
42386
  /**
@@ -56546,6 +56546,23 @@ const findTrackedMarkBetween = ({
56546
56546
  };
56547
56547
  }
56548
56548
  });
56549
+ const nodeAtEndPosition = doc2.nodeAt(endPos);
56550
+ if (nodeAtEndPosition?.type?.name === "run") {
56551
+ const node = nodeAtEndPosition.content?.content?.[0];
56552
+ const isTextNode = node?.type?.name === "text";
56553
+ if (isTextNode) {
56554
+ const mark = node.marks.find(
56555
+ (mark2) => mark2.type.name === markName && Object.keys(attrs).every((attr) => mark2.attrs[attr] === attrs[attr])
56556
+ );
56557
+ if (mark && !markFound) {
56558
+ markFound = {
56559
+ from: endPos,
56560
+ to: endPos + node.nodeSize,
56561
+ mark
56562
+ };
56563
+ }
56564
+ }
56565
+ }
56549
56566
  return markFound;
56550
56567
  };
56551
56568
  const markInsertion = ({ tr, from: from2, to, user, date }) => {
@@ -59569,7 +59586,7 @@ const isHeadless = (editor) => {
59569
59586
  const shouldSkipNodeView = (editor) => {
59570
59587
  return isHeadless(editor);
59571
59588
  };
59572
- const summaryVersion = "1.0.0-beta.86";
59589
+ const summaryVersion = "1.0.0-beta.87";
59573
59590
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
59574
59591
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
59575
59592
  function mapAttributes(attrs) {
@@ -60358,7 +60375,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60358
60375
  { default: remarkStringify },
60359
60376
  { default: remarkGfm }
60360
60377
  ] = await Promise.all([
60361
- import("./index-DeSyD44U-BKmM9Hn7.es.js"),
60378
+ import("./index-rv7o9043-DVlRSGhv.es.js"),
60362
60379
  import("./index-DRCvimau-Cw339678.es.js"),
60363
60380
  import("./index-C_x_N6Uh-DJn8hIEt.es.js"),
60364
60381
  import("./index-D_sWOSiG-DE96TaT5.es.js"),
@@ -60563,7 +60580,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60563
60580
  * Process collaboration migrations
60564
60581
  */
60565
60582
  processCollaborationMigrations() {
60566
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.86");
60583
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.87");
60567
60584
  if (!this.options.ydoc) return;
60568
60585
  const metaMap = this.options.ydoc.getMap("meta");
60569
60586
  let docVersion = metaMap.get("version");
@@ -63639,7 +63656,9 @@ function hydrateImageBlocks(blocks, mediaFiles) {
63639
63656
  let cellsChanged = false;
63640
63657
  const newCells = row.cells.map((cell) => {
63641
63658
  let cellChanged = false;
63642
- const hydratedBlocks = (cell.blocks ?? (cell.paragraph ? [cell.paragraph] : [])).map((cb) => hydrateBlock(cb));
63659
+ const hydratedBlocks = (cell.blocks ?? (cell.paragraph ? [cell.paragraph] : [])).map(
63660
+ (cb) => hydrateBlock(cb)
63661
+ );
63643
63662
  if (cell.blocks && hydratedBlocks !== cell.blocks) {
63644
63663
  cellChanged = true;
63645
63664
  }
@@ -63674,6 +63693,40 @@ function hydrateImageBlocks(blocks, mediaFiles) {
63674
63693
  }
63675
63694
  return blk;
63676
63695
  }
63696
+ if (blk.kind === "drawing") {
63697
+ const drawingBlock = blk;
63698
+ if (drawingBlock.drawingKind !== "shapeGroup") {
63699
+ return blk;
63700
+ }
63701
+ const shapeGroupBlock = drawingBlock;
63702
+ if (!shapeGroupBlock.shapes || shapeGroupBlock.shapes.length === 0) {
63703
+ return blk;
63704
+ }
63705
+ let shapesChanged = false;
63706
+ const hydratedShapes = shapeGroupBlock.shapes.map((shape) => {
63707
+ if (shape.shapeType !== "image") {
63708
+ return shape;
63709
+ }
63710
+ const imageChild = shape;
63711
+ const src = imageChild.attrs?.src;
63712
+ if (!src || src.startsWith("data:")) {
63713
+ return shape;
63714
+ }
63715
+ const resolvedSrc = resolveImageSrc(src);
63716
+ if (resolvedSrc) {
63717
+ shapesChanged = true;
63718
+ return {
63719
+ ...imageChild,
63720
+ attrs: { ...imageChild.attrs, src: resolvedSrc }
63721
+ };
63722
+ }
63723
+ return shape;
63724
+ });
63725
+ if (shapesChanged) {
63726
+ return { ...shapeGroupBlock, shapes: hydratedShapes };
63727
+ }
63728
+ return blk;
63729
+ }
63677
63730
  return blk;
63678
63731
  };
63679
63732
  return hydrateBlock(block);
@@ -73237,6 +73290,7 @@ const renderTableCell = (deps) => {
73237
73290
  cell,
73238
73291
  borders,
73239
73292
  renderLine,
73293
+ renderDrawingContent,
73240
73294
  context,
73241
73295
  applySdtDataset,
73242
73296
  fromLine,
@@ -73379,6 +73433,11 @@ const renderTableCell = (deps) => {
73379
73433
  img.style.height = "100%";
73380
73434
  img.style.objectFit = block.objectFit ?? "contain";
73381
73435
  drawingInner.appendChild(img);
73436
+ } else if (renderDrawingContent) {
73437
+ const drawingContent = renderDrawingContent(block);
73438
+ drawingContent.style.width = "100%";
73439
+ drawingContent.style.height = "100%";
73440
+ drawingInner.appendChild(drawingContent);
73382
73441
  } else {
73383
73442
  const placeholder = doc2.createElement("div");
73384
73443
  placeholder.style.width = "100%";
@@ -73504,6 +73563,7 @@ const renderTableRow = (deps) => {
73504
73563
  allRowHeights,
73505
73564
  context,
73506
73565
  renderLine,
73566
+ renderDrawingContent,
73507
73567
  applySdtDataset,
73508
73568
  continuesFromPrev,
73509
73569
  continuesOnNext,
@@ -73600,6 +73660,7 @@ const renderTableRow = (deps) => {
73600
73660
  cell,
73601
73661
  borders: resolvedBorders,
73602
73662
  renderLine,
73663
+ renderDrawingContent,
73603
73664
  context,
73604
73665
  applySdtDataset,
73605
73666
  fromLine,
@@ -73653,7 +73714,17 @@ function applySdtContainerStyling(doc2, container, sdt, containerSdt) {
73653
73714
  container.appendChild(labelEl);
73654
73715
  }
73655
73716
  const renderTableFragment = (deps) => {
73656
- const { doc: doc2, fragment, blockLookup, context, renderLine, applyFragmentFrame, applySdtDataset, applyStyles: applyStyles2 } = deps;
73717
+ const {
73718
+ doc: doc2,
73719
+ fragment,
73720
+ blockLookup,
73721
+ context,
73722
+ renderLine,
73723
+ renderDrawingContent,
73724
+ applyFragmentFrame,
73725
+ applySdtDataset,
73726
+ applyStyles: applyStyles2
73727
+ } = deps;
73657
73728
  if (!doc2) {
73658
73729
  console.error("DomPainter: document is not available");
73659
73730
  if (typeof document !== "undefined") {
@@ -73783,6 +73854,7 @@ const renderTableFragment = (deps) => {
73783
73854
  allRowHeights,
73784
73855
  context,
73785
73856
  renderLine,
73857
+ renderDrawingContent,
73786
73858
  applySdtDataset,
73787
73859
  // Headers are always rendered as-is (no border suppression)
73788
73860
  continuesFromPrev: false,
@@ -73812,6 +73884,7 @@ const renderTableFragment = (deps) => {
73812
73884
  allRowHeights,
73813
73885
  context,
73814
73886
  renderLine,
73887
+ renderDrawingContent,
73815
73888
  applySdtDataset,
73816
73889
  // Draw top border if table continues from previous fragment (MS Word behavior)
73817
73890
  continuesFromPrev: isFirstRenderedBodyRow && fragment.continuesFromPrev === true,
@@ -76054,12 +76127,25 @@ const _DomPainter = class _DomPainter2 {
76054
76127
  const renderLineForTableCell = (block, line, ctx2) => {
76055
76128
  return this.renderLine(block, line, ctx2, void 0, void 0, true);
76056
76129
  };
76130
+ const renderDrawingContentForTableCell = (block) => {
76131
+ if (block.drawingKind === "image") {
76132
+ return this.createDrawingImageElement(block);
76133
+ }
76134
+ if (block.drawingKind === "shapeGroup") {
76135
+ return this.createShapeGroupElement(block);
76136
+ }
76137
+ if (block.drawingKind === "vectorShape") {
76138
+ return this.createVectorShapeElement(block, block.geometry, false);
76139
+ }
76140
+ return this.createDrawingPlaceholder();
76141
+ };
76057
76142
  return renderTableFragment({
76058
76143
  doc: this.doc,
76059
76144
  fragment,
76060
76145
  context,
76061
76146
  blockLookup: this.blockLookup,
76062
76147
  renderLine: renderLineForTableCell,
76148
+ renderDrawingContent: renderDrawingContentForTableCell,
76063
76149
  applyFragmentFrame: applyFragmentFrameWithSection,
76064
76150
  applySdtDataset: this.applySdtDataset.bind(this),
76065
76151
  applyStyles: applyStyles$2
@@ -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.86") {
42400
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.87") {
42401
42401
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42402
42402
  }
42403
42403
  /**
@@ -56563,6 +56563,23 @@ const findTrackedMarkBetween = ({
56563
56563
  };
56564
56564
  }
56565
56565
  });
56566
+ const nodeAtEndPosition = doc2.nodeAt(endPos);
56567
+ if (nodeAtEndPosition?.type?.name === "run") {
56568
+ const node = nodeAtEndPosition.content?.content?.[0];
56569
+ const isTextNode = node?.type?.name === "text";
56570
+ if (isTextNode) {
56571
+ const mark = node.marks.find(
56572
+ (mark2) => mark2.type.name === markName && Object.keys(attrs).every((attr) => mark2.attrs[attr] === attrs[attr])
56573
+ );
56574
+ if (mark && !markFound) {
56575
+ markFound = {
56576
+ from: endPos,
56577
+ to: endPos + node.nodeSize,
56578
+ mark
56579
+ };
56580
+ }
56581
+ }
56582
+ }
56566
56583
  return markFound;
56567
56584
  };
56568
56585
  const markInsertion = ({ tr, from: from2, to, user, date }) => {
@@ -59586,7 +59603,7 @@ const isHeadless = (editor) => {
59586
59603
  const shouldSkipNodeView = (editor) => {
59587
59604
  return isHeadless(editor);
59588
59605
  };
59589
- const summaryVersion = "1.0.0-beta.86";
59606
+ const summaryVersion = "1.0.0-beta.87";
59590
59607
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
59591
59608
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
59592
59609
  function mapAttributes(attrs) {
@@ -60375,7 +60392,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60375
60392
  { default: remarkStringify },
60376
60393
  { default: remarkGfm }
60377
60394
  ] = await Promise.all([
60378
- Promise.resolve().then(() => require("./index-DeSyD44U-Dxv0c3H-.cjs")),
60395
+ Promise.resolve().then(() => require("./index-rv7o9043-DD5SvBoC.cjs")),
60379
60396
  Promise.resolve().then(() => require("./index-DRCvimau-H4Ck3S9a.cjs")),
60380
60397
  Promise.resolve().then(() => require("./index-C_x_N6Uh-Db3CUJMX.cjs")),
60381
60398
  Promise.resolve().then(() => require("./index-D_sWOSiG-BtDZzJ6I.cjs")),
@@ -60580,7 +60597,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60580
60597
  * Process collaboration migrations
60581
60598
  */
60582
60599
  processCollaborationMigrations() {
60583
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.86");
60600
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.87");
60584
60601
  if (!this.options.ydoc) return;
60585
60602
  const metaMap = this.options.ydoc.getMap("meta");
60586
60603
  let docVersion = metaMap.get("version");
@@ -63656,7 +63673,9 @@ function hydrateImageBlocks(blocks, mediaFiles) {
63656
63673
  let cellsChanged = false;
63657
63674
  const newCells = row.cells.map((cell) => {
63658
63675
  let cellChanged = false;
63659
- const hydratedBlocks = (cell.blocks ?? (cell.paragraph ? [cell.paragraph] : [])).map((cb) => hydrateBlock(cb));
63676
+ const hydratedBlocks = (cell.blocks ?? (cell.paragraph ? [cell.paragraph] : [])).map(
63677
+ (cb) => hydrateBlock(cb)
63678
+ );
63660
63679
  if (cell.blocks && hydratedBlocks !== cell.blocks) {
63661
63680
  cellChanged = true;
63662
63681
  }
@@ -63691,6 +63710,40 @@ function hydrateImageBlocks(blocks, mediaFiles) {
63691
63710
  }
63692
63711
  return blk;
63693
63712
  }
63713
+ if (blk.kind === "drawing") {
63714
+ const drawingBlock = blk;
63715
+ if (drawingBlock.drawingKind !== "shapeGroup") {
63716
+ return blk;
63717
+ }
63718
+ const shapeGroupBlock = drawingBlock;
63719
+ if (!shapeGroupBlock.shapes || shapeGroupBlock.shapes.length === 0) {
63720
+ return blk;
63721
+ }
63722
+ let shapesChanged = false;
63723
+ const hydratedShapes = shapeGroupBlock.shapes.map((shape) => {
63724
+ if (shape.shapeType !== "image") {
63725
+ return shape;
63726
+ }
63727
+ const imageChild = shape;
63728
+ const src = imageChild.attrs?.src;
63729
+ if (!src || src.startsWith("data:")) {
63730
+ return shape;
63731
+ }
63732
+ const resolvedSrc = resolveImageSrc(src);
63733
+ if (resolvedSrc) {
63734
+ shapesChanged = true;
63735
+ return {
63736
+ ...imageChild,
63737
+ attrs: { ...imageChild.attrs, src: resolvedSrc }
63738
+ };
63739
+ }
63740
+ return shape;
63741
+ });
63742
+ if (shapesChanged) {
63743
+ return { ...shapeGroupBlock, shapes: hydratedShapes };
63744
+ }
63745
+ return blk;
63746
+ }
63694
63747
  return blk;
63695
63748
  };
63696
63749
  return hydrateBlock(block);
@@ -73254,6 +73307,7 @@ const renderTableCell = (deps) => {
73254
73307
  cell,
73255
73308
  borders,
73256
73309
  renderLine,
73310
+ renderDrawingContent,
73257
73311
  context,
73258
73312
  applySdtDataset,
73259
73313
  fromLine,
@@ -73396,6 +73450,11 @@ const renderTableCell = (deps) => {
73396
73450
  img.style.height = "100%";
73397
73451
  img.style.objectFit = block.objectFit ?? "contain";
73398
73452
  drawingInner.appendChild(img);
73453
+ } else if (renderDrawingContent) {
73454
+ const drawingContent = renderDrawingContent(block);
73455
+ drawingContent.style.width = "100%";
73456
+ drawingContent.style.height = "100%";
73457
+ drawingInner.appendChild(drawingContent);
73399
73458
  } else {
73400
73459
  const placeholder = doc2.createElement("div");
73401
73460
  placeholder.style.width = "100%";
@@ -73521,6 +73580,7 @@ const renderTableRow = (deps) => {
73521
73580
  allRowHeights,
73522
73581
  context,
73523
73582
  renderLine,
73583
+ renderDrawingContent,
73524
73584
  applySdtDataset,
73525
73585
  continuesFromPrev,
73526
73586
  continuesOnNext,
@@ -73617,6 +73677,7 @@ const renderTableRow = (deps) => {
73617
73677
  cell,
73618
73678
  borders: resolvedBorders,
73619
73679
  renderLine,
73680
+ renderDrawingContent,
73620
73681
  context,
73621
73682
  applySdtDataset,
73622
73683
  fromLine,
@@ -73670,7 +73731,17 @@ function applySdtContainerStyling(doc2, container, sdt, containerSdt) {
73670
73731
  container.appendChild(labelEl);
73671
73732
  }
73672
73733
  const renderTableFragment = (deps) => {
73673
- const { doc: doc2, fragment, blockLookup, context, renderLine, applyFragmentFrame, applySdtDataset, applyStyles: applyStyles2 } = deps;
73734
+ const {
73735
+ doc: doc2,
73736
+ fragment,
73737
+ blockLookup,
73738
+ context,
73739
+ renderLine,
73740
+ renderDrawingContent,
73741
+ applyFragmentFrame,
73742
+ applySdtDataset,
73743
+ applyStyles: applyStyles2
73744
+ } = deps;
73674
73745
  if (!doc2) {
73675
73746
  console.error("DomPainter: document is not available");
73676
73747
  if (typeof document !== "undefined") {
@@ -73800,6 +73871,7 @@ const renderTableFragment = (deps) => {
73800
73871
  allRowHeights,
73801
73872
  context,
73802
73873
  renderLine,
73874
+ renderDrawingContent,
73803
73875
  applySdtDataset,
73804
73876
  // Headers are always rendered as-is (no border suppression)
73805
73877
  continuesFromPrev: false,
@@ -73829,6 +73901,7 @@ const renderTableFragment = (deps) => {
73829
73901
  allRowHeights,
73830
73902
  context,
73831
73903
  renderLine,
73904
+ renderDrawingContent,
73832
73905
  applySdtDataset,
73833
73906
  // Draw top border if table continues from previous fragment (MS Word behavior)
73834
73907
  continuesFromPrev: isFirstRenderedBodyRow && fragment.continuesFromPrev === true,
@@ -76071,12 +76144,25 @@ const _DomPainter = class _DomPainter2 {
76071
76144
  const renderLineForTableCell = (block, line, ctx2) => {
76072
76145
  return this.renderLine(block, line, ctx2, void 0, void 0, true);
76073
76146
  };
76147
+ const renderDrawingContentForTableCell = (block) => {
76148
+ if (block.drawingKind === "image") {
76149
+ return this.createDrawingImageElement(block);
76150
+ }
76151
+ if (block.drawingKind === "shapeGroup") {
76152
+ return this.createShapeGroupElement(block);
76153
+ }
76154
+ if (block.drawingKind === "vectorShape") {
76155
+ return this.createVectorShapeElement(block, block.geometry, false);
76156
+ }
76157
+ return this.createDrawingPlaceholder();
76158
+ };
76074
76159
  return renderTableFragment({
76075
76160
  doc: this.doc,
76076
76161
  fragment,
76077
76162
  context,
76078
76163
  blockLookup: this.blockLookup,
76079
76164
  renderLine: renderLineForTableCell,
76165
+ renderDrawingContent: renderDrawingContentForTableCell,
76080
76166
  applyFragmentFrame: applyFragmentFrameWithSection,
76081
76167
  applySdtDataset: this.applySdtDataset.bind(this),
76082
76168
  applyStyles: applyStyles$2
@@ -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-B25GbVbB.js";
3
- import { _ as _export_sfc } from "./chunks/editor-C2fZMnwi.js";
2
+ import { T as TextSelection } from "./chunks/converter-G519mwN2.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-BQsR9BR1.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.86") {
42700
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.0.0-beta.87") {
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-B25GbVbB.js";
1
+ import { p as process$1, aJ as commonjsGlobal, B as Buffer, aK as getDefaultExportFromCjs, aL as getContentTypesFromXml, aM as xmljs } from "./converter-G519mwN2.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
  }