@harbour-enterprises/superdoc 0.12.27 → 0.12.29

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 (31) hide show
  1. package/dist/chunks/{index-DzkFuLTl.cjs → index-B1MhwjTC.cjs} +2 -2
  2. package/dist/chunks/{index-YysPbdmM.es.js → index-BrSjd1Id.es.js} +1 -1
  3. package/dist/chunks/{index-XDxZpazE.cjs → index-CMBtuT02.cjs} +1 -1
  4. package/dist/chunks/{index-CkiRwUSq.es.js → index-SKpROzLW.es.js} +2 -2
  5. package/dist/chunks/{super-editor.es-DSWfBKJb.es.js → super-editor.es-DiznnaH9.es.js} +27 -9
  6. package/dist/chunks/{super-editor.es-U9Gs2Zjo.cjs → super-editor.es-DnY3YVQy.cjs} +27 -9
  7. package/dist/chunks/{url-b6qOBs1t.es.js → url-CAZQTNP3.es.js} +1 -1
  8. package/dist/chunks/{url-eMPgRWh1.cjs → url-DuggQ5JR.cjs} +1 -1
  9. package/dist/chunks/{xml-js-535HsQKh.cjs → xml-js-B7Vccv2s.cjs} +4 -11
  10. package/dist/chunks/{xml-js-CcZSY2B4.es.js → xml-js-BV-kCPOA.es.js} +4 -11
  11. package/dist/super-editor/ai-writer.es.js +20 -2
  12. package/dist/super-editor/chunks/{converter-Dhv-IEqn.js → converter-C3avHVhj.js} +2 -2
  13. package/dist/super-editor/chunks/{docx-zipper-CVm1djJd.js → docx-zipper-CmhOMHgz.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-C6NQ-D1P.js → editor-BXIiZe6R.js} +3 -3
  15. package/dist/super-editor/chunks/{toolbar-DxBEAvF7.js → toolbar-D53fQfyS.js} +2 -2
  16. package/dist/super-editor/components/toolbar/ai-helpers.d.ts.map +1 -1
  17. package/dist/super-editor/components/toolbar/super-toolbar.d.ts +1 -1
  18. package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
  19. package/dist/super-editor/converter.es.js +1 -1
  20. package/dist/super-editor/docx-zipper.es.js +2 -2
  21. package/dist/super-editor/editor.es.js +3 -3
  22. package/dist/super-editor/file-zipper.es.js +1 -1
  23. package/dist/super-editor/super-editor.es.js +12 -12
  24. package/dist/super-editor/toolbar.es.js +2 -2
  25. package/dist/super-editor.cjs +1 -1
  26. package/dist/super-editor.es.js +1 -1
  27. package/dist/superdoc.cjs +5 -5
  28. package/dist/superdoc.es.js +6 -6
  29. package/dist/superdoc.umd.js +28 -10
  30. package/dist/superdoc.umd.js.map +1 -1
  31. package/package.json +1 -1
@@ -30667,7 +30667,7 @@
30667
30667
  return;
30668
30668
  }
30669
30669
  }
30670
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.27") {
30670
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.29") {
30671
30671
  const customLocation = "docProps/custom.xml";
30672
30672
  if (!docx[customLocation]) {
30673
30673
  docx[customLocation] = generateCustomXml();
@@ -31133,7 +31133,7 @@
31133
31133
  function generateCustomXml() {
31134
31134
  return DEFAULT_CUSTOM_XML;
31135
31135
  }
31136
- function generateSuperdocVersion(pid = 2, version2 = "0.12.27") {
31136
+ function generateSuperdocVersion(pid = 2, version2 = "0.12.29") {
31137
31137
  return {
31138
31138
  type: "element",
31139
31139
  name: "property",
@@ -48316,7 +48316,7 @@
48316
48316
  * @returns {Object | void} Migration results
48317
48317
  */
48318
48318
  processCollaborationMigrations() {
48319
- console.debug("[checkVersionMigrations] Current editor version", "0.12.27");
48319
+ console.debug("[checkVersionMigrations] Current editor version", "0.12.29");
48320
48320
  if (!this.options.ydoc) return;
48321
48321
  const metaMap = this.options.ydoc.getMap("meta");
48322
48322
  let docVersion = metaMap.get("version");
@@ -70856,6 +70856,24 @@ ${style2}
70856
70856
  marks: [{ type: "bold" }],
70857
70857
  text: content
70858
70858
  })
70859
+ },
70860
+ {
70861
+ name: "italic",
70862
+ pattern: /\*(.*?)\*/g,
70863
+ transform: (_match, content, _editor) => ({
70864
+ type: "text",
70865
+ marks: [{ type: "italic" }],
70866
+ text: content
70867
+ })
70868
+ },
70869
+ {
70870
+ name: "underline",
70871
+ pattern: /<(?:u|ins)>(.*?)<\/(?:u|ins)>/g,
70872
+ transform: (_match, content, _editor) => ({
70873
+ type: "text",
70874
+ marks: [{ type: "underline" }],
70875
+ text: content
70876
+ })
70859
70877
  }
70860
70878
  ]
70861
70879
  };
@@ -73657,10 +73675,7 @@ ${style2}
73657
73675
  if (!this.config.selector && this.config.element) {
73658
73676
  this.config.selector = this.config.element;
73659
73677
  }
73660
- this.toolbarContainer = this.getElementBySelector(this.config.selector);
73661
- if (!this.toolbarContainer) {
73662
- return;
73663
- }
73678
+ this.toolbarContainer = this.findElementBySelector(this.config.selector);
73664
73679
  __privateMethod(this, _SuperToolbar_instances, initToolbarGroups_fn).call(this);
73665
73680
  __privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
73666
73681
  superToolbar: this,
@@ -73670,6 +73685,9 @@ ${style2}
73670
73685
  hideButtons: this.config.hideButtons,
73671
73686
  isDev: config.isDev
73672
73687
  });
73688
+ if (this.config.selector && !this.toolbarContainer) {
73689
+ return;
73690
+ }
73673
73691
  this.app = createApp(Toolbar);
73674
73692
  this.app.directive("click-outside", vClickOutside$1);
73675
73693
  this.app.config.globalProperties.$toolbar = this;
@@ -73679,7 +73697,7 @@ ${style2}
73679
73697
  this.activeEditor = config.editor || null;
73680
73698
  this.updateToolbarState();
73681
73699
  }
73682
- getElementBySelector(selector) {
73700
+ findElementBySelector(selector) {
73683
73701
  let el = null;
73684
73702
  if (selector) {
73685
73703
  if (selector.startsWith("#") || selector.startsWith(".")) {
@@ -73848,7 +73866,7 @@ ${style2}
73848
73866
  isDev = false
73849
73867
  } = {}) {
73850
73868
  const documentWidth = document.documentElement.clientWidth;
73851
- const containerWidth = this.toolbarContainer.offsetWidth;
73869
+ const containerWidth = this.toolbarContainer?.offsetWidth ?? 0;
73852
73870
  const availableWidth = this.config.responsiveToContainer ? containerWidth : documentWidth;
73853
73871
  const { defaultItems, overflowItems } = makeDefaultItems({
73854
73872
  superToolbar,
@@ -89495,7 +89513,7 @@ ${style2}
89495
89513
  this.config.colors = shuffleArray(this.config.colors);
89496
89514
  this.userColorMap = /* @__PURE__ */ new Map();
89497
89515
  this.colorIndex = 0;
89498
- this.version = "0.12.27";
89516
+ this.version = "0.12.29";
89499
89517
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
89500
89518
  this.superdocId = config.superdocId || v4();
89501
89519
  this.colors = this.config.colors;