@harbour-enterprises/superdoc 0.28.3 → 0.28.5

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 (55) hide show
  1. package/dist/chunks/{PdfViewer-DUpLlOgk.es.js → PdfViewer-AB0GJT3F.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-QTV3RJM1.cjs → PdfViewer-CRZ7Hh_Z.cjs} +1 -1
  3. package/dist/chunks/{index-DKtyoTAq.es.js → index-B-LWb6SW.es.js} +3 -3
  4. package/dist/chunks/{index-CuXB3dyN.cjs → index-CjMfOK2T.cjs} +3 -3
  5. package/dist/chunks/{index-B3rVM2bJ-BgYPFhrh.cjs → index-CsxQB3Ha-BK7VKq_C.cjs} +1 -1
  6. package/dist/chunks/{index-B3rVM2bJ-B62R9mgx.es.js → index-CsxQB3Ha-BvrAYbCk.es.js} +1 -1
  7. package/dist/chunks/{super-editor.es-BKCxu5-_.cjs → super-editor.es-B0-g-Yu6.cjs} +67 -21
  8. package/dist/chunks/{super-editor.es-BjTZa-cJ.es.js → super-editor.es-D2xi8g4o.es.js} +67 -21
  9. package/dist/core/types/index.d.ts.map +1 -1
  10. package/dist/images/altText_add.svg +3 -0
  11. package/dist/images/altText_disclaimer.svg +3 -0
  12. package/dist/images/altText_done.svg +3 -0
  13. package/dist/images/altText_spinner.svg +30 -0
  14. package/dist/images/altText_warning.svg +3 -0
  15. package/dist/images/annotation-check.svg +11 -0
  16. package/dist/images/annotation-comment.svg +16 -0
  17. package/dist/images/annotation-help.svg +26 -0
  18. package/dist/images/annotation-insert.svg +10 -0
  19. package/dist/images/annotation-key.svg +11 -0
  20. package/dist/images/annotation-newparagraph.svg +11 -0
  21. package/dist/images/annotation-noicon.svg +7 -0
  22. package/dist/images/annotation-note.svg +42 -0
  23. package/dist/images/annotation-paperclip.svg +6 -0
  24. package/dist/images/annotation-paragraph.svg +16 -0
  25. package/dist/images/annotation-pushpin.svg +7 -0
  26. package/dist/images/cursor-editorFreeHighlight.svg +6 -0
  27. package/dist/images/cursor-editorFreeText.svg +3 -0
  28. package/dist/images/cursor-editorInk.svg +4 -0
  29. package/dist/images/cursor-editorTextHighlight.svg +8 -0
  30. package/dist/images/editor-toolbar-delete.svg +5 -0
  31. package/dist/images/loading-icon.gif +0 -0
  32. package/dist/images/messageBar_closingButton.svg +3 -0
  33. package/dist/images/messageBar_warning.svg +3 -0
  34. package/dist/images/toolbarButton-editorHighlight.svg +6 -0
  35. package/dist/images/toolbarButton-menuArrow.svg +3 -0
  36. package/dist/super-editor/ai-writer.es.js +2 -2
  37. package/dist/super-editor/chunks/{converter-CMtyH2w0.js → converter-Xq_CNQ6-.js} +54 -19
  38. package/dist/super-editor/chunks/{docx-zipper-Pgf9i5kI.js → docx-zipper-D5oQWM4V.js} +1 -1
  39. package/dist/super-editor/chunks/{editor-C3KgN3zx.js → editor-ChUZBhy8.js} +15 -4
  40. package/dist/super-editor/chunks/{index-B3rVM2bJ.js → index-CsxQB3Ha.js} +1 -1
  41. package/dist/super-editor/chunks/{toolbar-TXkIPPvk.js → toolbar-Z1FPQLN_.js} +2 -2
  42. package/dist/super-editor/converter.es.js +1 -1
  43. package/dist/super-editor/docx-zipper.es.js +2 -2
  44. package/dist/super-editor/editor.es.js +3 -3
  45. package/dist/super-editor/file-zipper.es.js +1 -1
  46. package/dist/super-editor/super-editor/src/core/super-converter/relationship-helpers.d.ts +2 -0
  47. package/dist/super-editor/super-editor.es.js +6 -6
  48. package/dist/super-editor/toolbar.es.js +2 -2
  49. package/dist/super-editor.cjs +1 -1
  50. package/dist/super-editor.es.js +1 -1
  51. package/dist/superdoc.cjs +2 -2
  52. package/dist/superdoc.es.js +2 -2
  53. package/dist/superdoc.umd.js +69 -23
  54. package/dist/superdoc.umd.js.map +1 -1
  55. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns="http://www.w3.org/2000/svg"
4
+ width="40"
5
+ height="40"
6
+ viewBox="0 0 40 40">
7
+ <rect
8
+ width="33.76017"
9
+ height="33.76017"
10
+ x="3.119915"
11
+ y="3.119915"
12
+ style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
13
+ <path
14
+ d="m 17.692678,34.50206 0,-16.182224 c -1.930515,-0.103225 -3.455824,-0.730383 -4.57593,-1.881473 -1.12011,-1.151067 -1.680164,-2.619596 -1.680164,-4.405591 0,-1.992435 0.621995,-3.5796849 1.865988,-4.7617553 1.243989,-1.1820288 3.06352,-1.7730536 5.458598,-1.7730764 l 9.802246,0 0,2.6789711 -2.229895,0 0,26.3251486 -2.632515,0 0,-26.3251486 -3.45324,0 0,26.3251486 z"
15
+ style="font-size:29.42051125px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:1.07795751;stroke-opacity:1;font-family:Arial;-inkscape-font-specification:Arial" />
16
+ </svg>
@@ -0,0 +1,7 @@
1
+ <!-- This Source Code Form is subject to the terms of the Mozilla Public
2
+ - License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
4
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" height="40" width="40">
5
+ <path d="M8.156 12.5a.99.99 0 0 0 .707-.294l.523-2.574L10.5 8.499l1.058-1.04 2.65-.601a.996.996 0 0 0 0-1.414l-3.657-3.658a.996.996 0 0 0-1.414 0l-.523 2.576L7.5 5.499 6.442 6.535l-2.65.6a.996.996 0 0 0 0 1.413l3.657 3.658a.999.999 0 0 0 .707.295z"/>
6
+ <path d="M9.842.996c-.386 0-.77.146-1.06.44a.5.5 0 0 0-.136.251l-.492 2.43-1.008 1.03-.953.933-2.511.566a.5.5 0 0 0-.243.133 1.505 1.505 0 0 0-.002 2.123l1.477 1.477-2.768 2.767a.5.5 0 0 0 0 .707.5.5 0 0 0 .708 0l2.767-2.767 1.475 1.474a1.494 1.494 0 0 0 2.123-.002.5.5 0 0 0 .135-.254l.492-2.427 1.008-1.024.953-.937 2.511-.57a.5.5 0 0 0 .243-.132c.586-.58.583-1.543.002-2.125l-3.659-3.656A1.501 1.501 0 0 0 9.842.996Zm.05 1.025a.394.394 0 0 1 .305.12l3.658 3.657c.18.18.141.432.002.627l-2.41.545a.5.5 0 0 0-.24.131L10.15 8.142a.5.5 0 0 0-.007.006L9.029 9.283a.5.5 0 0 0-.133.25l-.48 2.36c-.082.053-.165.109-.26.109a.492.492 0 0 1-.353-.149L4.145 8.195c-.18-.18-.141-.432-.002-.627l2.41-.545a.5.5 0 0 0 .238-.13L7.85 5.857a.5.5 0 0 0 .007-.008l1.114-1.138a.5.5 0 0 0 .133-.25l.472-2.323a.619.619 0 0 1 .317-.117Z"/>
7
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12.2 3.09C12.28 3.01 12.43 3 12.43 3C12.48 3 12.58 3.02 12.66 3.1L14.45 4.89C14.58 5.02 14.58 5.22 14.45 5.35L11.7713 8.02872L9.51628 5.77372L12.2 3.09ZM13.2658 5.12L11.7713 6.6145L10.9305 5.77372L12.425 4.27921L13.2658 5.12Z" fill="#FBFBFE"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M5.98 9.32L8.23 11.57L10.7106 9.08938L8.45562 6.83438L5.98 9.31V9.32ZM8.23 10.1558L9.29641 9.08938L8.45562 8.24859L7.38921 9.315L8.23 10.1558Z" fill="#FBFBFE"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M10.1526 13.1816L16.2125 7.1217C16.7576 6.58919 17.05 5.8707 17.05 5.12C17.05 4.36931 16.7576 3.65084 16.2126 3.11834L14.4317 1.33747C13.8992 0.79242 13.1807 0.5 12.43 0.5C11.6643 0.5 10.9529 0.812929 10.4329 1.33289L3.68289 8.08289C3.04127 8.72452 3.00459 9.75075 3.57288 10.4363L1.29187 12.7239C1.09186 12.9245 0.990263 13.1957 1.0007 13.4685L1 14.5C0.447715 14.5 0 14.9477 0 15.5V17.5C0 18.0523 0.447715 18.5 1 18.5H16C16.5523 18.5 17 18.0523 17 17.5V15.5C17 14.9477 16.5523 14.5 16 14.5H10.2325C9.83594 14.5 9.39953 13.9347 10.1526 13.1816ZM4.39 9.85L4.9807 10.4407L2.39762 13.0312H6.63877L7.10501 12.565L7.57125 13.0312H8.88875L15.51 6.41C15.86 6.07 16.05 5.61 16.05 5.12C16.05 4.63 15.86 4.17 15.51 3.83L13.72 2.04C13.38 1.69 12.92 1.5 12.43 1.5C11.94 1.5 11.48 1.7 11.14 2.04L4.39 8.79C4.1 9.08 4.1 9.56 4.39 9.85ZM16 17.5V15.5H1V17.5H16Z" fill="#FBFBFE"/>
5
+ <path d="M15.1616 6.05136L15.1616 6.05132L15.1564 6.05645L8.40645 12.8064C8.35915 12.8537 8.29589 12.88 8.23 12.88C8.16411 12.88 8.10085 12.8537 8.05355 12.8064L7.45857 12.2115L7.10501 11.8579L6.75146 12.2115L6.03289 12.93H3.20465L5.33477 10.7937L5.6873 10.4402L5.33426 10.0871L4.74355 9.49645C4.64882 9.40171 4.64882 9.23829 4.74355 9.14355L11.4936 2.39355C11.7436 2.14354 12.0779 2 12.43 2C12.7883 2 13.1179 2.13776 13.3614 2.38839L13.3613 2.38843L13.3664 2.39355L15.1564 4.18355L15.1564 4.18359L15.1616 4.18864C15.4122 4.43211 15.55 4.76166 15.55 5.12C15.55 5.47834 15.4122 5.80789 15.1616 6.05136ZM7.87645 11.9236L8.23 12.2771L8.58355 11.9236L11.0642 9.44293L11.4177 9.08938L11.0642 8.73582L8.80918 6.48082L8.45562 6.12727L8.10207 6.48082L5.62645 8.95645L5.48 9.10289V9.31V9.32V9.52711L5.62645 9.67355L7.87645 11.9236ZM11.4177 8.38227L11.7713 8.73582L12.1248 8.38227L14.8036 5.70355C15.1288 5.37829 15.1288 4.86171 14.8036 4.53645L13.0136 2.74645C12.8186 2.55146 12.5792 2.5 12.43 2.5H12.4134L12.3967 2.50111L12.43 3C12.3967 2.50111 12.3966 2.50112 12.3965 2.50112L12.3963 2.50114L12.3957 2.50117L12.3947 2.50125L12.3924 2.50142L12.387 2.50184L12.3732 2.50311C12.3628 2.50416 12.3498 2.50567 12.3346 2.50784C12.3049 2.51208 12.2642 2.51925 12.2178 2.53146C12.1396 2.55202 11.9797 2.60317 11.8464 2.73645L9.16273 5.42016L8.80918 5.77372L9.16273 6.12727L11.4177 8.38227ZM1.5 16H15.5V17H1.5V16Z" stroke="#15141A"/>
6
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M12 2.75H12.5V2.25V1V0.5H12H10.358C9.91165 0.5 9.47731 0.625661 9.09989 0.860442L9.09886 0.861087L8 1.54837L6.89997 0.860979L6.89911 0.860443C6.5218 0.625734 6.08748 0.5 5.642 0.5H4H3.5V1V2.25V2.75H4H5.642C5.66478 2.75 5.6885 2.75641 5.71008 2.76968C5.71023 2.76977 5.71038 2.76986 5.71053 2.76995L6.817 3.461C6.81704 3.46103 6.81709 3.46105 6.81713 3.46108C6.81713 3.46108 6.81713 3.46108 6.81714 3.46109C6.8552 3.48494 6.876 3.52285 6.876 3.567V8V12.433C6.876 12.4771 6.85523 12.515 6.81722 12.5389C6.81715 12.5389 6.81707 12.539 6.817 12.539L5.70953 13.23C5.70941 13.2301 5.70929 13.2302 5.70917 13.2303C5.68723 13.2438 5.6644 13.25 5.641 13.25H4H3.5V13.75V15V15.5H4H5.642C6.08835 15.5 6.52269 15.3743 6.90011 15.1396L6.90086 15.1391L8 14.4526L9.10003 15.14L9.10089 15.1406C9.47831 15.3753 9.91265 15.501 10.359 15.501H12H12.5V15.001V13.751V13.251H12H10.358C10.3352 13.251 10.3115 13.2446 10.2899 13.2313C10.2897 13.2312 10.2896 13.2311 10.2895 13.231L9.183 12.54C9.18298 12.54 9.18295 12.54 9.18293 12.54C9.18291 12.5399 9.18288 12.5399 9.18286 12.5399C9.14615 12.5169 9.125 12.4797 9.125 12.434V8V3.567C9.125 3.52266 9.14603 3.48441 9.18364 3.4606C9.18377 3.46052 9.1839 3.46043 9.18404 3.46035L10.2895 2.76995C10.2896 2.76985 10.2898 2.76975 10.2899 2.76966C10.3119 2.75619 10.3346 2.75 10.358 2.75H12Z" fill="black" stroke="white"/>
3
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M0.0189877 13.6645L0.612989 10.4635C0.687989 10.0545 0.884989 9.6805 1.18099 9.3825L9.98199 0.5805C10.756 -0.1925 12.015 -0.1945 12.792 0.5805L14.42 2.2085C15.194 2.9835 15.194 4.2435 14.42 5.0185L5.61599 13.8215C5.31999 14.1165 4.94599 14.3125 4.53799 14.3875L1.33599 14.9815C1.26599 14.9935 1.19799 15.0005 1.12999 15.0005C0.832989 15.0005 0.544988 14.8835 0.330988 14.6695C0.0679874 14.4055 -0.0490122 14.0305 0.0189877 13.6645Z" fill="white"/>
3
+ <path d="M0.0189877 13.6645L0.612989 10.4635C0.687989 10.0545 0.884989 9.6805 1.18099 9.3825L9.98199 0.5805C10.756 -0.1925 12.015 -0.1945 12.792 0.5805L14.42 2.2085C15.194 2.9835 15.194 4.2435 14.42 5.0185L5.61599 13.8215C5.31999 14.1165 4.94599 14.3125 4.53799 14.3875L1.33599 14.9815C1.26599 14.9935 1.19799 15.0005 1.12999 15.0005C0.832989 15.0005 0.544988 14.8835 0.330988 14.6695C0.0679874 14.4055 -0.0490122 14.0305 0.0189877 13.6645ZM12.472 5.1965L13.632 4.0365L13.631 3.1885L11.811 1.3675L10.963 1.3685L9.80299 2.5285L12.472 5.1965ZM4.31099 13.1585C4.47099 13.1285 4.61799 13.0515 4.73399 12.9345L11.587 6.0815L8.91899 3.4135L2.06599 10.2655C1.94899 10.3835 1.87199 10.5305 1.84099 10.6915L1.36699 13.2485L1.75199 13.6335L4.31099 13.1585Z" fill="black"/>
4
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg width="29" height="32" viewBox="0 0 29 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M28 16.75C28.2761 16.75 28.5 16.5261 28.5 16.25V15C28.5 14.7239 28.2761 14.5 28 14.5H26.358C25.9117 14.5 25.4773 14.6257 25.0999 14.8604L25.0989 14.8611L24 15.5484L22.9 14.861L22.8991 14.8604C22.5218 14.6257 22.0875 14.5 21.642 14.5H20C19.7239 14.5 19.5 14.7239 19.5 15V16.25C19.5 16.5261 19.7239 16.75 20 16.75H21.642C21.6648 16.75 21.6885 16.7564 21.7101 16.7697C21.7102 16.7698 21.7104 16.7699 21.7105 16.77L22.817 17.461C22.817 17.461 22.8171 17.4611 22.8171 17.4611C22.8171 17.4611 22.8171 17.4611 22.8171 17.4611C22.8552 17.4849 22.876 17.5229 22.876 17.567V22.625V27.683C22.876 27.7271 22.8552 27.765 22.8172 27.7889C22.8171 27.7889 22.8171 27.789 22.817 27.789L21.7095 28.48C21.7094 28.4801 21.7093 28.4802 21.7092 28.4803C21.6872 28.4938 21.6644 28.5 21.641 28.5H20C19.7239 28.5 19.5 28.7239 19.5 29V30.25C19.5 30.5261 19.7239 30.75 20 30.75H21.642C22.0883 30.75 22.5227 30.6243 22.9001 30.3896L22.9009 30.3891L24 29.7026L25.1 30.39L25.1009 30.3906C25.4783 30.6253 25.9127 30.751 26.359 30.751H28C28.2761 30.751 28.5 30.5271 28.5 30.251V29.001C28.5 28.7249 28.2761 28.501 28 28.501H26.358C26.3352 28.501 26.3115 28.4946 26.2899 28.4813C26.2897 28.4812 26.2896 28.4811 26.2895 28.481L25.183 27.79C25.183 27.79 25.183 27.79 25.1829 27.79C25.1829 27.7899 25.1829 27.7899 25.1829 27.7899C25.1462 27.7669 25.125 27.7297 25.125 27.684V22.625V17.567C25.125 17.5227 25.146 17.4844 25.1836 17.4606C25.1838 17.4605 25.1839 17.4604 25.184 17.4603L26.2895 16.77C26.2896 16.7699 26.2898 16.7698 26.2899 16.7697C26.3119 16.7562 26.3346 16.75 26.358 16.75H28Z" fill="black" stroke="#FBFBFE" stroke-linejoin="round"/>
3
+ <path d="M24.625 17.567C24.625 17.35 24.735 17.152 24.918 17.037L26.026 16.345C26.126 16.283 26.24 16.25 26.358 16.25H28V15H26.358C26.006 15 25.663 15.099 25.364 15.285L24.256 15.978C24.161 16.037 24.081 16.113 24 16.187C23.918 16.113 23.839 16.037 23.744 15.978L22.635 15.285C22.336 15.099 21.993 15 21.642 15H20V16.25H21.642C21.759 16.25 21.874 16.283 21.974 16.345L23.082 17.037C23.266 17.152 23.376 17.35 23.376 17.567V22.625V27.683C23.376 27.9 23.266 28.098 23.082 28.213L21.973 28.905C21.873 28.967 21.759 29 21.641 29H20V30.25H21.642C21.994 30.25 22.337 30.151 22.636 29.965L23.744 29.273C23.84 29.213 23.919 29.137 24 29.064C24.081 29.137 24.161 29.213 24.256 29.273L25.365 29.966C25.664 30.152 26.007 30.251 26.359 30.251H28V29.001H26.358C26.241 29.001 26.126 28.968 26.026 28.906L24.918 28.214C24.734 28.099 24.625 27.901 24.625 27.684V22.625V17.567Z" fill="black"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12.2 2.59C12.28 2.51 12.43 2.5 12.43 2.5C12.48 2.5 12.58 2.52 12.66 2.6L14.45 4.39C14.58 4.52 14.58 4.72 14.45 4.85L11.7713 7.52872L9.51628 5.27372L12.2 2.59ZM13.2658 4.62L11.7713 6.1145L10.9305 5.27372L12.425 3.77921L13.2658 4.62Z" fill="#FBFBFE"/>
5
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M5.98 8.82L8.23 11.07L10.7106 8.58938L8.45562 6.33438L5.98 8.81V8.82ZM8.23 9.65579L9.29641 8.58938L8.45562 7.74859L7.38921 8.815L8.23 9.65579Z" fill="#FBFBFE"/>
6
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M10.1526 12.6816L16.2125 6.6217C16.7576 6.08919 17.05 5.3707 17.05 4.62C17.05 3.86931 16.7576 3.15084 16.2126 2.61834L14.4317 0.837474C13.8992 0.29242 13.1807 0 12.43 0C11.6643 0 10.9529 0.312929 10.4329 0.832893L3.68289 7.58289C3.04127 8.22452 3.00459 9.25075 3.57288 9.93634L1.29187 12.2239C1.09186 12.4245 0.990263 12.6957 1.0007 12.9685L1 14C0.447715 14 0 14.4477 0 15V17C0 17.5523 0.447715 18 1 18H16C16.5523 18 17 17.5523 17 17V15C17 14.4477 16.5523 14 16 14H10.2325C9.83594 14 9.39953 13.4347 10.1526 12.6816ZM4.39 9.35L4.9807 9.9407L2.39762 12.5312H6.63877L7.10501 12.065L7.57125 12.5312H8.88875L15.51 5.91C15.86 5.57 16.05 5.11 16.05 4.62C16.05 4.13 15.86 3.67 15.51 3.33L13.72 1.54C13.38 1.19 12.92 1 12.43 1C11.94 1 11.48 1.2 11.14 1.54L4.39 8.29C4.1 8.58 4.1 9.06 4.39 9.35ZM16 17V15H1V17H16Z" fill="#FBFBFE"/>
7
+ <path d="M15.1616 5.55136L15.1616 5.55132L15.1564 5.55645L8.40645 12.3064C8.35915 12.3537 8.29589 12.38 8.23 12.38C8.16411 12.38 8.10085 12.3537 8.05355 12.3064L7.45857 11.7115L7.10501 11.3579L6.75146 11.7115L6.03289 12.43H3.20465L5.33477 10.2937L5.6873 9.94019L5.33426 9.58715L4.74355 8.99645C4.64882 8.90171 4.64882 8.73829 4.74355 8.64355L11.4936 1.89355C11.7436 1.64354 12.0779 1.5 12.43 1.5C12.7883 1.5 13.1179 1.63776 13.3614 1.88839L13.3613 1.88843L13.3664 1.89355L15.1564 3.68355L15.1564 3.68359L15.1616 3.68864C15.4122 3.93211 15.55 4.26166 15.55 4.62C15.55 4.97834 15.4122 5.30789 15.1616 5.55136ZM5.48 8.82V9.02711L5.62645 9.17355L7.87645 11.4236L8.23 11.7771L8.58355 11.4236L11.0642 8.94293L11.4177 8.58938L11.0642 8.23582L8.80918 5.98082L8.45562 5.62727L8.10207 5.98082L5.62645 8.45645L5.48 8.60289V8.81V8.82ZM11.4177 7.88227L11.7713 8.23582L12.1248 7.88227L14.8036 5.20355C15.1288 4.87829 15.1288 4.36171 14.8036 4.03645L13.0136 2.24645C12.8186 2.05146 12.5792 2 12.43 2H12.4134L12.3967 2.00111L12.43 2.5C12.3967 2.00111 12.3966 2.00112 12.3965 2.00112L12.3963 2.00114L12.3957 2.00117L12.3947 2.00125L12.3924 2.00142L12.387 2.00184L12.3732 2.00311C12.3628 2.00416 12.3498 2.00567 12.3346 2.00784C12.3049 2.01208 12.2642 2.01925 12.2178 2.03146C12.1396 2.05202 11.9797 2.10317 11.8464 2.23645L9.16273 4.92016L8.80918 5.27372L9.16273 5.62727L11.4177 7.88227ZM1.5 16.5V15.5H15.5V16.5H1.5Z" stroke="#15141A"/>
8
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd"
3
+ d="M11 3H13.6C14 3 14.3 3.3 14.3 3.6C14.3 3.9 14 4.2 13.7 4.2H13.3V14C13.3 15.1 12.4 16 11.3 16H4.80005C3.70005 16 2.80005 15.1 2.80005 14V4.2H2.40005C2.00005 4.2 1.80005 4 1.80005 3.6C1.80005 3.2 2.00005 3 2.40005 3H5.00005V2C5.00005 0.9 5.90005 0 7.00005 0H9.00005C10.1 0 11 0.9 11 2V3ZM6.90005 1.2L6.30005 1.8V3H9.80005V1.8L9.20005 1.2H6.90005ZM11.4 14.7L12 14.1V4.2H4.00005V14.1L4.60005 14.7H11.4ZM7.00005 12.4C7.00005 12.7 6.70005 13 6.40005 13C6.10005 13 5.80005 12.7 5.80005 12.4V7.6C5.70005 7.3 6.00005 7 6.40005 7C6.80005 7 7.00005 7.3 7.00005 7.6V12.4ZM10.2001 12.4C10.2001 12.7 9.90006 13 9.60006 13C9.30006 13 9.00006 12.7 9.00006 12.4V7.6C9.00006 7.3 9.30006 7 9.60006 7C9.90006 7 10.2001 7.3 10.2001 7.6V12.4Z"
4
+ fill="black" />
5
+ </svg>
Binary file
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7.85822 8.84922L4.85322 11.8542C4.75891 11.9453 4.63261 11.9957 4.50151 11.9946C4.37042 11.9934 4.24501 11.9408 4.15231 11.8481C4.0596 11.7554 4.00702 11.63 4.00588 11.4989C4.00474 11.3678 4.05514 11.2415 4.14622 11.1472L7.15122 8.14222V7.85922L4.14622 4.85322C4.05514 4.75891 4.00474 4.63261 4.00588 4.50151C4.00702 4.37042 4.0596 4.24501 4.15231 4.15231C4.24501 4.0596 4.37042 4.00702 4.50151 4.00588C4.63261 4.00474 4.75891 4.05514 4.85322 4.14622L7.85822 7.15122H8.14122L11.1462 4.14622C11.2405 4.05514 11.3668 4.00474 11.4979 4.00588C11.629 4.00702 11.7544 4.0596 11.8471 4.15231C11.9398 4.24501 11.9924 4.37042 11.9936 4.50151C11.9947 4.63261 11.9443 4.75891 11.8532 4.85322L8.84822 7.85922V8.14222L11.8532 11.1472C11.9443 11.2415 11.9947 11.3678 11.9936 11.4989C11.9924 11.63 11.9398 11.7554 11.8471 11.8481C11.7544 11.9408 11.629 11.9934 11.4979 11.9946C11.3668 11.9957 11.2405 11.9453 11.1462 11.8542L8.14122 8.84922L8.14222 8.85022L7.85822 8.84922Z" fill="black"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14.8748 12.037L9.37782 2.037C8.99682 1.346 8.31082 1 7.62482 1C6.93882 1 6.25282 1.346 5.87282 2.037L0.375823 12.037C-0.358177 13.37 0.606823 15 2.12782 15H13.1228C14.6428 15 15.6078 13.37 14.8748 12.037ZM8.24982 11.75L7.99982 12H7.24982L6.99982 11.75V11L7.24982 10.75H7.99982L8.24982 11V11.75ZM8.24982 9.062C8.24982 9.22776 8.18398 9.38673 8.06677 9.50394C7.94955 9.62115 7.79058 9.687 7.62482 9.687C7.45906 9.687 7.30009 9.62115 7.18288 9.50394C7.06567 9.38673 6.99982 9.22776 6.99982 9.062V5.625C6.99982 5.45924 7.06567 5.30027 7.18288 5.18306C7.30009 5.06585 7.45906 5 7.62482 5C7.79058 5 7.94955 5.06585 8.06677 5.18306C8.18398 5.30027 8.24982 5.45924 8.24982 5.625V9.062Z" fill="black"/>
3
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M7.10918 11.66C7.24918 11.8 7.43918 11.88 7.63918 11.88C7.83918 11.88 8.02918 11.8 8.16918 11.66L14.9192 4.91C15.2692 4.57 15.4592 4.11 15.4592 3.62C15.4592 3.13 15.2692 2.67 14.9192 2.33L13.1292 0.54C12.7892 0.19 12.3292 0 11.8392 0C11.3492 0 10.8892 0.2 10.5492 0.54L3.79918 7.29C3.50918 7.58 3.50918 8.06 3.79918 8.35L4.38988 8.9407L1.40918 11.93H5.64918L6.51419 11.065L7.10918 11.66ZM7.63918 10.07L5.38918 7.82V7.81L7.8648 5.33438L10.1198 7.58938L7.63918 10.07ZM11.1805 6.52872L13.8592 3.85C13.9892 3.72 13.9892 3.52 13.8592 3.39L12.0692 1.6C11.9892 1.52 11.8892 1.5 11.8392 1.5C11.8392 1.5 11.6892 1.51 11.6092 1.59L8.92546 4.27372L11.1805 6.52872Z" fill="#000"/>
4
+ <path d="M0.40918 14H15.4092V16H0.40918V14Z" fill="#000"/>
5
+ </g>
6
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.23336 10.4664L11.8474 6.85339C11.894 6.8071 11.931 6.75203 11.9563 6.69136C11.9816 6.63069 11.9946 6.56562 11.9946 6.49989C11.9946 6.43417 11.9816 6.3691 11.9563 6.30843C11.931 6.24776 11.894 6.19269 11.8474 6.14639C11.7536 6.05266 11.6264 6 11.4939 6C11.3613 6 11.2341 6.05266 11.1404 6.14639L7.99236 9.29339L4.84736 6.14739C4.75305 6.05631 4.62675 6.00592 4.49566 6.00706C4.36456 6.0082 4.23915 6.06078 4.14645 6.15348C4.05374 6.24619 4.00116 6.37159 4.00002 6.50269C3.99888 6.63379 4.04928 6.76009 4.14036 6.85439L7.75236 10.4674L8.23336 10.4664Z" fill="black"/>
3
+ </svg>
@@ -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-CMtyH2w0.js";
3
- import { _ as _export_sfc } from "./chunks/editor-C3KgN3zx.js";
2
+ import { T as TextSelection } from "./chunks/converter-Xq_CNQ6-.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-ChUZBhy8.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 = {}) {
@@ -28793,7 +28793,16 @@ const translateImageNode = (params) => {
28793
28793
  const { width: w2, height: h2 } = resizeKeepAspectRatio(size.w, size.h, maxWidthEmu);
28794
28794
  if (w2 && h2) size = { w: w2, h: h2 };
28795
28795
  }
28796
- if (params.node.type === "image" && !imageId) {
28796
+ if (imageId) {
28797
+ const docx = params.converter?.convertedXml || {};
28798
+ const rels = docx["word/_rels/document.xml.rels"];
28799
+ const relsTag = rels?.elements?.find((el) => el.name === "Relationships");
28800
+ const hasRelation = relsTag?.elements.find((el) => el.attributes.Id === imageId);
28801
+ const path = src?.split("word/")[1];
28802
+ if (!hasRelation) {
28803
+ addImageRelationshipForId(params, imageId, path);
28804
+ }
28805
+ } else if (params.node.type === "image" && !imageId) {
28797
28806
  const path = src?.split("word/")[1];
28798
28807
  imageId = addNewImageRelationship(params, path);
28799
28808
  } else if (params.node.type === "fieldAnnotation" && !imageId) {
@@ -29017,6 +29026,18 @@ function addNewImageRelationship(params, imagePath) {
29017
29026
  params.relationships.push(newRel);
29018
29027
  return newId;
29019
29028
  }
29029
+ function addImageRelationshipForId(params, id, imagePath) {
29030
+ const newRel = {
29031
+ type: "element",
29032
+ name: "Relationship",
29033
+ attributes: {
29034
+ Id: id,
29035
+ Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
29036
+ Target: imagePath
29037
+ }
29038
+ };
29039
+ params.relationships.push(newRel);
29040
+ }
29020
29041
  function translateVectorShape(params) {
29021
29042
  const { node } = params;
29022
29043
  const { drawingContent } = node.attrs;
@@ -35306,6 +35327,36 @@ const prepareCommentsXmlFilesForExport = ({ convertedXml, defs, commentsWithPara
35306
35327
  };
35307
35328
  const HYPERLINK_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
35308
35329
  const HEADER_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header";
35330
+ const FOOTER_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";
35331
+ const REL_ID_NUMERIC_PATTERN = /rId|mi/g;
35332
+ const getLargestRelationshipId = (relationships = []) => {
35333
+ const numericIds = relationships.map((rel) => Number(String(rel?.attributes?.Id ?? "").replace(REL_ID_NUMERIC_PATTERN, ""))).filter((value) => Number.isFinite(value));
35334
+ return numericIds.length ? Math.max(...numericIds) : 0;
35335
+ };
35336
+ const mergeRelationshipElements = (existingRelationships = [], newRelationships = []) => {
35337
+ if (!newRelationships?.length) return existingRelationships;
35338
+ let largestId = getLargestRelationshipId(existingRelationships);
35339
+ const seenIds = new Set(existingRelationships.map((rel) => rel?.attributes?.Id).filter(Boolean));
35340
+ const additions = [];
35341
+ newRelationships.forEach((rel) => {
35342
+ if (!rel?.attributes) return;
35343
+ const attributes = rel.attributes;
35344
+ const currentId = attributes.Id || "";
35345
+ attributes.Target = attributes?.Target?.replace(/&/g, "&amp;");
35346
+ const existingTarget = existingRelationships.find((el) => el.attributes.Target === attributes.Target);
35347
+ attributes.Target?.startsWith("media/");
35348
+ const isNewHyperlink = attributes.Type === HYPERLINK_RELATIONSHIP_TYPE && currentId.length > 6;
35349
+ const isNewHeadFoot = (attributes.Type === HEADER_RELATIONSHIP_TYPE || attributes.Type === FOOTER_RELATIONSHIP_TYPE) && currentId.length > 6;
35350
+ const hasSeenId = currentId && seenIds.has(currentId);
35351
+ if (!isNewHyperlink && !isNewHeadFoot && existingTarget) return;
35352
+ if (!currentId || hasSeenId) {
35353
+ attributes.Id = `rId${++largestId}`;
35354
+ }
35355
+ seenIds.add(attributes.Id);
35356
+ additions.push(rel);
35357
+ });
35358
+ return additions.length ? [...existingRelationships, ...additions] : existingRelationships;
35359
+ };
35309
35360
  const FONT_FAMILY_FALLBACKS = Object.freeze({
35310
35361
  swiss: "Arial, sans-serif",
35311
35362
  roman: "Times New Roman, serif",
@@ -35514,7 +35565,7 @@ const _SuperConverter = class _SuperConverter {
35514
35565
  static getStoredSuperdocVersion(docx) {
35515
35566
  return _SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
35516
35567
  }
35517
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.28.2") {
35568
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "0.28.5") {
35518
35569
  return _SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
35519
35570
  }
35520
35571
  /**
@@ -36023,23 +36074,7 @@ exportProcessHeadersFooters_fn = function({ isFinalDoc = false }) {
36023
36074
  exportProcessNewRelationships_fn = function(rels = []) {
36024
36075
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
36025
36076
  const relationships = relsData.elements.find((x) => x.name === "Relationships");
36026
- const newRels = [];
36027
- const regex = /rId|mi/g;
36028
- let largestId = Math.max(...relationships.elements.map((el) => Number(el.attributes.Id.replace(regex, ""))));
36029
- rels.forEach((rel) => {
36030
- const existingId = rel.attributes.Id;
36031
- const existingTarget = relationships.elements.find((el) => el.attributes.Target === rel.attributes.Target);
36032
- const isNewMedia = rel.attributes.Target?.startsWith("media/") && existingId.length > 6;
36033
- const isNewHyperlink = rel.attributes.Type === HYPERLINK_RELATIONSHIP_TYPE && existingId.length > 6;
36034
- const isNewHeadFoot = rel.attributes.Type === HEADER_RELATIONSHIP_TYPE && existingId.length > 6;
36035
- if (existingTarget && !isNewMedia && !isNewHyperlink && !isNewHeadFoot) {
36036
- return;
36037
- }
36038
- rel.attributes.Target = rel.attributes?.Target?.replace(/&/g, "&amp;");
36039
- rel.attributes.Id = existingId.length > 6 ? existingId : `rId${++largestId}`;
36040
- newRels.push(rel);
36041
- });
36042
- relationships.elements = [...relationships.elements, ...newRels];
36077
+ relationships.elements = mergeRelationshipElements(relationships.elements, rels);
36043
36078
  };
36044
36079
  exportProcessMediaFiles_fn = async function(media = {}) {
36045
36080
  const processedData = {
@@ -1,4 +1,4 @@
1
- import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-CMtyH2w0.js";
1
+ import { p as process$1, az as commonjsGlobal, B as Buffer, aA as getDefaultExportFromCjs, aB as getContentTypesFromXml, aC as xmljs } from "./converter-Xq_CNQ6-.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
  }
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, applyIndentStyling_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberingHelpers, ap as parseIndentElement, aq as combineIndents, ar as twipsToPixels, as as PIXELS_PER_INCH, at as SelectionRange, au as Transform, av as isInTable$1, aw as generateDocxRandomId, ax as insertNewRelationship, ay as inchesToPixels } from "./converter-CMtyH2w0.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as ReplaceStep, E as NodeRange, G as findWrapping, L as ListHelpers, H as findParentNode, I as isMacOS, J as isIOS, K as getSchemaTypeByName, O as inputRulesPlugin, Q as TrackDeleteMarkName, U as TrackInsertMarkName, V as v4, W as TrackFormatMarkName, X as comments_module_events, Y as findMark, Z as objectIncludes, _ as AddMarkStep, $ as RemoveMarkStep, a0 as twipsToLines, a1 as pixelsToTwips, a2 as helpers, a3 as posToDOMRect, a4 as CommandService, a5 as SuperConverter, a6 as createDocument, a7 as createDocFromMarkdown, a8 as createDocFromHTML, a9 as EditorState, aa as hasSomeParentWithClass, ab as isActive, ac as unflattenListsInHtml, ad as parseSizeUnit, ae as minMax, af as getLineHeightValueString, ag as updateDOMAttributes, ah as findChildren$5, ai as htmlHandler, aj as generateRandomSigned32BitIntStrId, ak as InputRule, al as kebabCase, am as findParentNodeClosestToPos, an as getListItemStyleDefinitions, ao as docxNumberingHelpers, ap as parseIndentElement, aq as combineIndents, ar as twipsToPixels, as as PIXELS_PER_INCH, at as SelectionRange, au as Transform, av as isInTable$1, aw as generateDocxRandomId, ax as insertNewRelationship, ay as inchesToPixels } from "./converter-Xq_CNQ6-.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-Pgf9i5kI.js";
17
+ import { D as DocxZipper } from "./docx-zipper-D5oQWM4V.js";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
20
20
  };
@@ -11662,6 +11662,7 @@ const getHighlightColor = ({ activeThreadId, threadId, isInternal, editor }) =>
11662
11662
  const updateYdocDocxData = async (editor, ydoc) => {
11663
11663
  ydoc = ydoc || editor.options.ydoc;
11664
11664
  if (!ydoc) return;
11665
+ if (!editor || editor.isDestroyed) return;
11665
11666
  const metaMap = ydoc.getMap("meta");
11666
11667
  const docxValue = metaMap.get("docx");
11667
11668
  let docx = [];
@@ -13153,6 +13154,16 @@ const Collaboration = Extension.create({
13153
13154
  });
13154
13155
  });
13155
13156
  return [syncPlugin];
13157
+ },
13158
+ addCommands() {
13159
+ return {
13160
+ addImageToCollaboration: ({ mediaPath, fileData }) => () => {
13161
+ if (!this.options.ydoc || !mediaPath || !fileData) return false;
13162
+ const mediaMap = this.options.ydoc.getMap("media");
13163
+ mediaMap.set(mediaPath, fileData);
13164
+ return true;
13165
+ }
13166
+ };
13156
13167
  }
13157
13168
  });
13158
13169
  const createSyncPlugin = (ydoc, editor) => {
@@ -15052,7 +15063,7 @@ const _Editor = class _Editor extends EventEmitter {
15052
15063
  { default: remarkStringify },
15053
15064
  { default: remarkGfm }
15054
15065
  ] = await Promise.all([
15055
- import("./index-B3rVM2bJ.js"),
15066
+ import("./index-CsxQB3Ha.js"),
15056
15067
  import("./index-DRCvimau.js"),
15057
15068
  import("./index-C_x_N6Uh.js"),
15058
15069
  import("./index-D_sWOSiG.js"),
@@ -15270,7 +15281,7 @@ const _Editor = class _Editor extends EventEmitter {
15270
15281
  * @returns {Object | void} Migration results
15271
15282
  */
15272
15283
  processCollaborationMigrations() {
15273
- console.debug("[checkVersionMigrations] Current editor version", "0.28.2");
15284
+ console.debug("[checkVersionMigrations] Current editor version", "0.28.5");
15274
15285
  if (!this.options.ydoc) return;
15275
15286
  const metaMap = this.options.ydoc.getMap("meta");
15276
15287
  let docVersion = metaMap.get("version");
@@ -1,4 +1,4 @@
1
- import { aA as getDefaultExportFromCjs } from "./converter-CMtyH2w0.js";
1
+ import { aA as getDefaultExportFromCjs } from "./converter-Xq_CNQ6-.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { p as process$1 } from "./converter-CMtyH2w0.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-C3KgN3zx.js";
2
+ import { p as process$1 } from "./converter-Xq_CNQ6-.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-ChUZBhy8.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { a5 } from "./chunks/converter-CMtyH2w0.js";
1
+ import { a5 } from "./chunks/converter-Xq_CNQ6-.js";
2
2
  import "vue";
3
3
  export {
4
4
  a5 as SuperConverter
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-CMtyH2w0.js";
2
- import { D } from "./chunks/docx-zipper-Pgf9i5kI.js";
1
+ import "./chunks/converter-Xq_CNQ6-.js";
2
+ import { D } from "./chunks/docx-zipper-D5oQWM4V.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-C3KgN3zx.js";
2
- import "./chunks/converter-CMtyH2w0.js";
3
- import "./chunks/docx-zipper-Pgf9i5kI.js";
1
+ import { E } from "./chunks/editor-ChUZBhy8.js";
2
+ import "./chunks/converter-Xq_CNQ6-.js";
3
+ import "./chunks/docx-zipper-D5oQWM4V.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-Pgf9i5kI.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-D5oQWM4V.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -0,0 +1,2 @@
1
+ export function getLargestRelationshipId(relationships?: any[]): number;
2
+ export function mergeRelationshipElements(existingRelationships?: any[], newRelationships?: any[]): any[];
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn;
12
- import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-CMtyH2w0.js";
13
- import { c1, a5, i, a2 } from "./chunks/converter-CMtyH2w0.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as collectTargetListItemPositions, d as getFileOpener, e as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, f as uploadAndInsertImage, h as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, j as undoDepth, k as redoDepth, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, m as getStarterExtensions, P as Placeholder, n as getRichTextExtensions, D as DecorationSet, o as Decoration, M as Mark, p as Extension, A as Attribute, N as Node } from "./chunks/editor-C3KgN3zx.js";
15
- import { v, C, w, T, q, x, t } from "./chunks/editor-C3KgN3zx.js";
12
+ import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-Xq_CNQ6-.js";
13
+ import { c1, a5, i, a2 } from "./chunks/converter-Xq_CNQ6-.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as collectTargetListItemPositions, d as getFileOpener, e as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, f as uploadAndInsertImage, h as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, j as undoDepth, k as redoDepth, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, m as getStarterExtensions, P as Placeholder, n as getRichTextExtensions, D as DecorationSet, o as Decoration, M as Mark, p as Extension, A as Attribute, N as Node } from "./chunks/editor-ChUZBhy8.js";
15
+ import { v, C, w, T, q, x, t } from "./chunks/editor-ChUZBhy8.js";
16
16
  import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-TXkIPPvk.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-Z1FPQLN_.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-Pgf9i5kI.js";
19
+ import { D } from "./chunks/docx-zipper-D5oQWM4V.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-TXkIPPvk.js";
3
- import "./chunks/editor-C3KgN3zx.js";
2
+ import { T } from "./chunks/toolbar-Z1FPQLN_.js";
3
+ import "./chunks/editor-ChUZBhy8.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-BKCxu5-_.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-B0-g-Yu6.cjs");
4
4
  require("./chunks/vue-DKMj1I9B.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,4 +1,4 @@
1
- import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-BjTZa-cJ.es.js";
1
+ import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-D2xi8g4o.es.js";
2
2
  import "./chunks/vue-ZWZLQtoU.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-BKCxu5-_.cjs");
4
- const superdoc = require("./chunks/index-CuXB3dyN.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-B0-g-Yu6.cjs");
4
+ const superdoc = require("./chunks/index-CjMfOK2T.cjs");
5
5
  require("./chunks/vue-DKMj1I9B.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
7
7
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-BjTZa-cJ.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-DKtyoTAq.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-D2xi8g4o.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-B-LWb6SW.es.js";
3
3
  import "./chunks/vue-ZWZLQtoU.es.js";
4
4
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
5
5
  export {
@@ -36528,7 +36528,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36528
36528
  const { width: w2, height: h2 } = resizeKeepAspectRatio(size2.w, size2.h, maxWidthEmu);
36529
36529
  if (w2 && h2) size2 = { w: w2, h: h2 };
36530
36530
  }
36531
- if (params2.node.type === "image" && !imageId) {
36531
+ if (imageId) {
36532
+ const docx = params2.converter?.convertedXml || {};
36533
+ const rels = docx["word/_rels/document.xml.rels"];
36534
+ const relsTag = rels?.elements?.find((el) => el.name === "Relationships");
36535
+ const hasRelation = relsTag?.elements.find((el) => el.attributes.Id === imageId);
36536
+ const path2 = src?.split("word/")[1];
36537
+ if (!hasRelation) {
36538
+ addImageRelationshipForId(params2, imageId, path2);
36539
+ }
36540
+ } else if (params2.node.type === "image" && !imageId) {
36532
36541
  const path2 = src?.split("word/")[1];
36533
36542
  imageId = addNewImageRelationship(params2, path2);
36534
36543
  } else if (params2.node.type === "fieldAnnotation" && !imageId) {
@@ -36752,6 +36761,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36752
36761
  params2.relationships.push(newRel);
36753
36762
  return newId;
36754
36763
  }
36764
+ function addImageRelationshipForId(params2, id, imagePath) {
36765
+ const newRel = {
36766
+ type: "element",
36767
+ name: "Relationship",
36768
+ attributes: {
36769
+ Id: id,
36770
+ Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
36771
+ Target: imagePath
36772
+ }
36773
+ };
36774
+ params2.relationships.push(newRel);
36775
+ }
36755
36776
  function translateVectorShape(params2) {
36756
36777
  const { node: node2 } = params2;
36757
36778
  const { drawingContent } = node2.attrs;
@@ -43014,6 +43035,36 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43014
43035
  };
43015
43036
  const HYPERLINK_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink";
43016
43037
  const HEADER_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header";
43038
+ const FOOTER_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";
43039
+ const REL_ID_NUMERIC_PATTERN = /rId|mi/g;
43040
+ const getLargestRelationshipId = (relationships = []) => {
43041
+ const numericIds = relationships.map((rel) => Number(String(rel?.attributes?.Id ?? "").replace(REL_ID_NUMERIC_PATTERN, ""))).filter((value) => Number.isFinite(value));
43042
+ return numericIds.length ? Math.max(...numericIds) : 0;
43043
+ };
43044
+ const mergeRelationshipElements = (existingRelationships = [], newRelationships = []) => {
43045
+ if (!newRelationships?.length) return existingRelationships;
43046
+ let largestId = getLargestRelationshipId(existingRelationships);
43047
+ const seenIds = new Set(existingRelationships.map((rel) => rel?.attributes?.Id).filter(Boolean));
43048
+ const additions = [];
43049
+ newRelationships.forEach((rel) => {
43050
+ if (!rel?.attributes) return;
43051
+ const attributes = rel.attributes;
43052
+ const currentId = attributes.Id || "";
43053
+ attributes.Target = attributes?.Target?.replace(/&/g, "&amp;");
43054
+ const existingTarget = existingRelationships.find((el) => el.attributes.Target === attributes.Target);
43055
+ attributes.Target?.startsWith("media/");
43056
+ const isNewHyperlink = attributes.Type === HYPERLINK_RELATIONSHIP_TYPE && currentId.length > 6;
43057
+ const isNewHeadFoot = (attributes.Type === HEADER_RELATIONSHIP_TYPE || attributes.Type === FOOTER_RELATIONSHIP_TYPE) && currentId.length > 6;
43058
+ const hasSeenId = currentId && seenIds.has(currentId);
43059
+ if (!isNewHyperlink && !isNewHeadFoot && existingTarget) return;
43060
+ if (!currentId || hasSeenId) {
43061
+ attributes.Id = `rId${++largestId}`;
43062
+ }
43063
+ seenIds.add(attributes.Id);
43064
+ additions.push(rel);
43065
+ });
43066
+ return additions.length ? [...existingRelationships, ...additions] : existingRelationships;
43067
+ };
43017
43068
  const FONT_FAMILY_FALLBACKS = Object.freeze({
43018
43069
  swiss: "Arial, sans-serif",
43019
43070
  roman: "Times New Roman, serif",
@@ -43222,7 +43273,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43222
43273
  static getStoredSuperdocVersion(docx) {
43223
43274
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
43224
43275
  }
43225
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.28.2") {
43276
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "0.28.5") {
43226
43277
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
43227
43278
  }
43228
43279
  /**
@@ -43728,23 +43779,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
43728
43779
  exportProcessNewRelationships_fn = function(rels = []) {
43729
43780
  const relsData = this.convertedXml["word/_rels/document.xml.rels"];
43730
43781
  const relationships = relsData.elements.find((x) => x.name === "Relationships");
43731
- const newRels = [];
43732
- const regex = /rId|mi/g;
43733
- let largestId = Math.max(...relationships.elements.map((el) => Number(el.attributes.Id.replace(regex, ""))));
43734
- rels.forEach((rel) => {
43735
- const existingId = rel.attributes.Id;
43736
- const existingTarget = relationships.elements.find((el) => el.attributes.Target === rel.attributes.Target);
43737
- const isNewMedia = rel.attributes.Target?.startsWith("media/") && existingId.length > 6;
43738
- const isNewHyperlink = rel.attributes.Type === HYPERLINK_RELATIONSHIP_TYPE && existingId.length > 6;
43739
- const isNewHeadFoot = rel.attributes.Type === HEADER_RELATIONSHIP_TYPE && existingId.length > 6;
43740
- if (existingTarget && !isNewMedia && !isNewHyperlink && !isNewHeadFoot) {
43741
- return;
43742
- }
43743
- rel.attributes.Target = rel.attributes?.Target?.replace(/&/g, "&amp;");
43744
- rel.attributes.Id = existingId.length > 6 ? existingId : `rId${++largestId}`;
43745
- newRels.push(rel);
43746
- });
43747
- relationships.elements = [...relationships.elements, ...newRels];
43782
+ relationships.elements = mergeRelationshipElements(relationships.elements, rels);
43748
43783
  };
43749
43784
  exportProcessMediaFiles_fn = async function(media2 = {}) {
43750
43785
  const processedData = {
@@ -58064,6 +58099,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
58064
58099
  const updateYdocDocxData = async (editor, ydoc) => {
58065
58100
  ydoc = ydoc || editor.options.ydoc;
58066
58101
  if (!ydoc) return;
58102
+ if (!editor || editor.isDestroyed) return;
58067
58103
  const metaMap = ydoc.getMap("meta");
58068
58104
  const docxValue = metaMap.get("docx");
58069
58105
  let docx = [];
@@ -59555,6 +59591,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
59555
59591
  });
59556
59592
  });
59557
59593
  return [syncPlugin];
59594
+ },
59595
+ addCommands() {
59596
+ return {
59597
+ addImageToCollaboration: ({ mediaPath, fileData }) => () => {
59598
+ if (!this.options.ydoc || !mediaPath || !fileData) return false;
59599
+ const mediaMap = this.options.ydoc.getMap("media");
59600
+ mediaMap.set(mediaPath, fileData);
59601
+ return true;
59602
+ }
59603
+ };
59558
59604
  }
59559
59605
  });
59560
59606
  const createSyncPlugin = (ydoc, editor) => {
@@ -61407,7 +61453,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61407
61453
  { default: remarkStringify2 },
61408
61454
  { default: remarkGfm2 }
61409
61455
  ] = await Promise.all([
61410
- Promise.resolve().then(() => indexB3rVM2bJ),
61456
+ Promise.resolve().then(() => indexCsxQB3Ha),
61411
61457
  Promise.resolve().then(() => indexDRCvimau),
61412
61458
  Promise.resolve().then(() => indexC_x_N6Uh),
61413
61459
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -61625,7 +61671,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61625
61671
  * @returns {Object | void} Migration results
61626
61672
  */
61627
61673
  processCollaborationMigrations() {
61628
- console.debug("[checkVersionMigrations] Current editor version", "0.28.2");
61674
+ console.debug("[checkVersionMigrations] Current editor version", "0.28.5");
61629
61675
  if (!this.options.ydoc) return;
61630
61676
  const metaMap = this.options.ydoc.getMap("meta");
61631
61677
  let docVersion = metaMap.get("version");
@@ -117523,7 +117569,7 @@ ${style2}
117523
117569
  this.config.colors = shuffleArray(this.config.colors);
117524
117570
  this.userColorMap = /* @__PURE__ */ new Map();
117525
117571
  this.colorIndex = 0;
117526
- this.version = "0.28.2";
117572
+ this.version = "0.28.5";
117527
117573
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
117528
117574
  this.superdocId = config2.superdocId || v4();
117529
117575
  this.colors = this.config.colors;
@@ -119923,7 +119969,7 @@ ${style2}
119923
119969
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
119924
119970
  );
119925
119971
  }
119926
- const indexB3rVM2bJ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
119972
+ const indexCsxQB3Ha = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
119927
119973
  __proto__: null,
119928
119974
  unified
119929
119975
  }, Symbol.toStringTag, { value: "Module" }));