@harbour-enterprises/superdoc 0.14.0-next.7 → 0.14.0-next.9

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 (35) hide show
  1. package/dist/chunks/{index-DHn8sl2L.es.js → index-BqLFjUHn.es.js} +1 -1
  2. package/dist/chunks/{index-DGsxwjB4.cjs → index-CweAXNfB.cjs} +1 -1
  3. package/dist/chunks/{index-CW9fKHgN.es.js → index-DS3W0eVB.es.js} +2 -2
  4. package/dist/chunks/{index-CE6UNfC5.cjs → index-kOMfCfBT.cjs} +2 -2
  5. package/dist/chunks/{super-editor.es-B1co-x-F.es.js → super-editor.es-C52tIwAG.es.js} +18 -5
  6. package/dist/chunks/{super-editor.es-BrUIfwuC.cjs → super-editor.es-Dj9Bqj95.cjs} +18 -5
  7. package/dist/chunks/{url-CUv5CLO-.cjs → url-B8LY3nwf.cjs} +1 -1
  8. package/dist/chunks/{url-CZOvt3H8.es.js → url-Bq00tGvm.es.js} +1 -1
  9. package/dist/chunks/{xml-js-D5Licdr-.es.js → xml-js-1F0lia4t.es.js} +202 -258
  10. package/dist/chunks/{xml-js-tHwLFq2w.cjs → xml-js-BuAdLsHD.cjs} +202 -258
  11. package/dist/helpers/floor.d.ts +2 -0
  12. package/dist/helpers/floor.d.ts.map +1 -0
  13. package/dist/stores/hrbr-fields-store.d.ts.map +1 -1
  14. package/dist/style.css +15 -3
  15. package/dist/super-editor/ai-writer.es.js +2 -2
  16. package/dist/super-editor/chunks/{converter-Cq8A38P6.js → converter-nBwtKyxm.js} +16 -3
  17. package/dist/super-editor/chunks/{docx-zipper-DOtI6fZj.js → docx-zipper-CEnVdoZN.js} +1 -1
  18. package/dist/super-editor/chunks/{editor-DiMXpjJM.js → editor-BvqbdvsW.js} +4 -4
  19. package/dist/super-editor/chunks/{toolbar-CE2dEw2j.js → toolbar-DeTpiBc3.js} +2 -2
  20. package/dist/super-editor/converter.es.js +1 -1
  21. package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
  22. package/dist/super-editor/core/super-converter/v2/importer/hyperlinkImporter.d.ts.map +1 -1
  23. package/dist/super-editor/docx-zipper.es.js +2 -2
  24. package/dist/super-editor/editor.es.js +3 -3
  25. package/dist/super-editor/file-zipper.es.js +1 -1
  26. package/dist/super-editor/style.css +3 -0
  27. package/dist/super-editor/super-editor.es.js +6 -6
  28. package/dist/super-editor/toolbar.es.js +2 -2
  29. package/dist/super-editor.cjs +1 -1
  30. package/dist/super-editor.es.js +1 -1
  31. package/dist/superdoc.cjs +61 -36
  32. package/dist/superdoc.es.js +62 -37
  33. package/dist/superdoc.umd.js +89 -51
  34. package/dist/superdoc.umd.js.map +1 -1
  35. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { g as getDefaultExportFromCjs } from "./jszip-Cl3s9njw.es.js";
2
- import { s as streamHttp, r as require$$1 } from "./index-CW9fKHgN.es.js";
2
+ import { s as streamHttp, r as require$$1 } from "./index-DS3W0eVB.es.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  for (var i = 0; i < m.length; i++) {
5
5
  const e = m[i];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const jszip = require("./jszip-9bCX1h2W.cjs");
3
- const index$2 = require("./index-CE6UNfC5.cjs");
3
+ const index$2 = require("./index-kOMfCfBT.cjs");
4
4
  function _mergeNamespaces(n, m) {
5
5
  for (var i = 0; i < m.length; i++) {
6
6
  const e = m[i];
@@ -1,7 +1,7 @@
1
1
  import { c as commonjsGlobal, B as Buffer, a as getAugmentedNamespace, g as getDefaultExportFromCjs } from "./jszip-Cl3s9njw.es.js";
2
2
  import { p as process$1 } from "./vue-BBJVqxjL.es.js";
3
- import { e as eventsExports, r as require$$2, u as util, i as inherits_browserExports, b as browser$1, a as requireString_decoder } from "./xml-js-D5Licdr-.es.js";
4
- import { u as url } from "./url-CZOvt3H8.es.js";
3
+ import { e as eventsExports, r as require$$2, u as util, i as inherits_browserExports, b as browser$1, a as requireString_decoder } from "./xml-js-1F0lia4t.es.js";
4
+ import { u as url } from "./url-Bq00tGvm.es.js";
5
5
  function _mergeNamespaces(n, m) {
6
6
  for (var i = 0; i < m.length; i++) {
7
7
  const e = m[i];
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  const jszip = require("./jszip-9bCX1h2W.cjs");
3
3
  const vue = require("./vue-BBjMeYfo.cjs");
4
- const xmlJs = require("./xml-js-tHwLFq2w.cjs");
5
- const url = require("./url-CUv5CLO-.cjs");
4
+ const xmlJs = require("./xml-js-BuAdLsHD.cjs");
5
+ const url = require("./url-B8LY3nwf.cjs");
6
6
  function _mergeNamespaces(n, m) {
7
7
  for (var i = 0; i < m.length; i++) {
8
8
  const e = m[i];
@@ -19781,13 +19781,21 @@ function processLinkContentNode(node2) {
19781
19781
  name: "w:color",
19782
19782
  attributes: { "w:val": "467886" }
19783
19783
  };
19784
+ const underline = {
19785
+ name: "w:u",
19786
+ attributes: {
19787
+ "w:val": "none"
19788
+ }
19789
+ };
19784
19790
  if (contentNode.name === "w:r") {
19785
19791
  const runProps = contentNode.elements.find((el) => el.name === "w:rPr");
19786
19792
  if (runProps) {
19787
19793
  const foundColor = runProps.elements.find((el) => el.name === "w:color");
19788
19794
  const foundHyperlinkStyle = runProps.elements.find((el) => el.name === "w:rStyle");
19795
+ const underlineMark = runProps.elements.find((el) => el.name === "w:u");
19789
19796
  if (!foundColor) runProps.elements.unshift(color);
19790
19797
  if (!foundHyperlinkStyle) runProps.elements.unshift(hyperlinkStyle);
19798
+ if (!underlineMark) runProps.elements.unshift(underline);
19791
19799
  } else {
19792
19800
  const runProps2 = {
19793
19801
  name: "w:rPr",
@@ -21809,7 +21817,12 @@ const handleHyperlinkNode = (params2) => {
21809
21817
  const styleElements = elements2.filter((el) => el.name === "w:style");
21810
21818
  const style2 = styleElements.find((el) => el.attributes["w:styleId"] === "Hyperlink");
21811
21819
  const styleRpr = style2?.elements?.find((el) => el.name === "w:rPr");
21812
- if (styleRpr) runNode.elements.unshift(styleRpr);
21820
+ if (styleRpr) {
21821
+ styleRpr.elements.forEach((styleEl) => {
21822
+ const hasElInRPr = rPr.elements.find((el) => el.name === styleEl.name);
21823
+ if (!hasElInRPr) rPr.elements.push(styleEl);
21824
+ });
21825
+ }
21813
21826
  }
21814
21827
  }
21815
21828
  }
@@ -24235,7 +24248,7 @@ const _SuperConverter = class _SuperConverter2 {
24235
24248
  return;
24236
24249
  }
24237
24250
  }
24238
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.0-next.7") {
24251
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.0-next.9") {
24239
24252
  const customLocation = "docProps/custom.xml";
24240
24253
  if (!docx[customLocation]) {
24241
24254
  docx[customLocation] = generateCustomXml();
@@ -24703,7 +24716,7 @@ function storeSuperdocVersion(docx) {
24703
24716
  function generateCustomXml() {
24704
24717
  return DEFAULT_CUSTOM_XML;
24705
24718
  }
24706
- function generateSuperdocVersion(pid = 2, version2 = "0.14.0-next.7") {
24719
+ function generateSuperdocVersion(pid = 2, version2 = "0.14.0-next.9") {
24707
24720
  return {
24708
24721
  type: "element",
24709
24722
  name: "property",
@@ -41924,7 +41937,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
41924
41937
  * @returns {Object | void} Migration results
41925
41938
  */
41926
41939
  processCollaborationMigrations() {
41927
- console.debug("[checkVersionMigrations] Current editor version", "0.14.0-next.7");
41940
+ console.debug("[checkVersionMigrations] Current editor version", "0.14.0-next.9");
41928
41941
  if (!this.options.ydoc) return;
41929
41942
  const metaMap = this.options.ydoc.getMap("meta");
41930
41943
  let docVersion = metaMap.get("version");
@@ -50504,7 +50517,7 @@ const Link = Mark2.create({
50504
50517
  addCommands() {
50505
50518
  return {
50506
50519
  setLink: ({ href }) => ({ chain }) => {
50507
- return chain().setMark(this.name, { href }).run();
50520
+ return chain().setMark("underline").setMark(this.name, { href }).run();
50508
50521
  },
50509
50522
  unsetLink: () => ({ chain }) => {
50510
50523
  return chain().unsetMark("underline").unsetColor().unsetMark(this.name, { extendEmptyMarkRange: true }).run();
@@ -19798,13 +19798,21 @@ function processLinkContentNode(node2) {
19798
19798
  name: "w:color",
19799
19799
  attributes: { "w:val": "467886" }
19800
19800
  };
19801
+ const underline = {
19802
+ name: "w:u",
19803
+ attributes: {
19804
+ "w:val": "none"
19805
+ }
19806
+ };
19801
19807
  if (contentNode.name === "w:r") {
19802
19808
  const runProps = contentNode.elements.find((el) => el.name === "w:rPr");
19803
19809
  if (runProps) {
19804
19810
  const foundColor = runProps.elements.find((el) => el.name === "w:color");
19805
19811
  const foundHyperlinkStyle = runProps.elements.find((el) => el.name === "w:rStyle");
19812
+ const underlineMark = runProps.elements.find((el) => el.name === "w:u");
19806
19813
  if (!foundColor) runProps.elements.unshift(color);
19807
19814
  if (!foundHyperlinkStyle) runProps.elements.unshift(hyperlinkStyle);
19815
+ if (!underlineMark) runProps.elements.unshift(underline);
19808
19816
  } else {
19809
19817
  const runProps2 = {
19810
19818
  name: "w:rPr",
@@ -21826,7 +21834,12 @@ const handleHyperlinkNode = (params2) => {
21826
21834
  const styleElements = elements2.filter((el) => el.name === "w:style");
21827
21835
  const style2 = styleElements.find((el) => el.attributes["w:styleId"] === "Hyperlink");
21828
21836
  const styleRpr = style2?.elements?.find((el) => el.name === "w:rPr");
21829
- if (styleRpr) runNode.elements.unshift(styleRpr);
21837
+ if (styleRpr) {
21838
+ styleRpr.elements.forEach((styleEl) => {
21839
+ const hasElInRPr = rPr.elements.find((el) => el.name === styleEl.name);
21840
+ if (!hasElInRPr) rPr.elements.push(styleEl);
21841
+ });
21842
+ }
21830
21843
  }
21831
21844
  }
21832
21845
  }
@@ -24252,7 +24265,7 @@ const _SuperConverter = class _SuperConverter2 {
24252
24265
  return;
24253
24266
  }
24254
24267
  }
24255
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.0-next.7") {
24268
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.0-next.9") {
24256
24269
  const customLocation = "docProps/custom.xml";
24257
24270
  if (!docx[customLocation]) {
24258
24271
  docx[customLocation] = generateCustomXml();
@@ -24720,7 +24733,7 @@ function storeSuperdocVersion(docx) {
24720
24733
  function generateCustomXml() {
24721
24734
  return DEFAULT_CUSTOM_XML;
24722
24735
  }
24723
- function generateSuperdocVersion(pid = 2, version2 = "0.14.0-next.7") {
24736
+ function generateSuperdocVersion(pid = 2, version2 = "0.14.0-next.9") {
24724
24737
  return {
24725
24738
  type: "element",
24726
24739
  name: "property",
@@ -41941,7 +41954,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
41941
41954
  * @returns {Object | void} Migration results
41942
41955
  */
41943
41956
  processCollaborationMigrations() {
41944
- console.debug("[checkVersionMigrations] Current editor version", "0.14.0-next.7");
41957
+ console.debug("[checkVersionMigrations] Current editor version", "0.14.0-next.9");
41945
41958
  if (!this.options.ydoc) return;
41946
41959
  const metaMap = this.options.ydoc.getMap("meta");
41947
41960
  let docVersion = metaMap.get("version");
@@ -50521,7 +50534,7 @@ const Link = Mark2.create({
50521
50534
  addCommands() {
50522
50535
  return {
50523
50536
  setLink: ({ href }) => ({ chain }) => {
50524
- return chain().setMark(this.name, { href }).run();
50537
+ return chain().setMark("underline").setMark(this.name, { href }).run();
50525
50538
  },
50526
50539
  unsetLink: () => ({ chain }) => {
50527
50540
  return chain().unsetMark("underline").unsetColor().unsetMark(this.name, { extendEmptyMarkRange: true }).run();
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const jszip = require("./jszip-9bCX1h2W.cjs");
3
- const xmlJs = require("./xml-js-tHwLFq2w.cjs");
3
+ const xmlJs = require("./xml-js-BuAdLsHD.cjs");
4
4
  const __viteBrowserExternal = require("./__vite-browser-external-DWbQq7bv.cjs");
5
5
  var punycode$1 = { exports: {} };
6
6
  /*! https://mths.be/punycode v1.4.1 by @mathias */
@@ -1,5 +1,5 @@
1
1
  import { c as commonjsGlobal, g as getDefaultExportFromCjs, a as getAugmentedNamespace } from "./jszip-Cl3s9njw.es.js";
2
- import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-D5Licdr-.es.js";
2
+ import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-1F0lia4t.es.js";
3
3
  import { _ as __viteBrowserExternal } from "./__vite-browser-external-CURh0WXD.es.js";
4
4
  var punycode$1 = { exports: {} };
5
5
  /*! https://mths.be/punycode v1.4.1 by @mathias */