@harbour-enterprises/superdoc 0.12.36-next.4 → 0.12.36-next.6

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-CZ7uYk9v.cjs → index-B1MhwjTC.cjs} +2 -2
  2. package/dist/chunks/{index-Bt9T0ivx.es.js → index-BrSjd1Id.es.js} +1 -1
  3. package/dist/chunks/{index-C9VoBmK2.cjs → index-CMBtuT02.cjs} +1 -1
  4. package/dist/chunks/{index-WlcT4qSb.es.js → index-SKpROzLW.es.js} +2 -2
  5. package/dist/chunks/{super-editor.es-DSQJ1jVu.es.js → super-editor.es-C5YefmYN.es.js} +16 -8
  6. package/dist/chunks/{super-editor.es-D5ju1Vy3.cjs → super-editor.es-H72UDWQx.cjs} +16 -8
  7. package/dist/chunks/{url-B8943xnh.es.js → url-CAZQTNP3.es.js} +1 -1
  8. package/dist/chunks/{url-ITkRdlXj.cjs → url-DuggQ5JR.cjs} +1 -1
  9. package/dist/chunks/{xml-js-DUY8aVjn.cjs → xml-js-B7Vccv2s.cjs} +7 -21
  10. package/dist/chunks/{xml-js-O0pGoXNk.es.js → xml-js-BV-kCPOA.es.js} +7 -21
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-C_7uxiuz.js → converter-DY26Bu8a.js} +2 -3
  13. package/dist/super-editor/chunks/{docx-zipper-DVTlb3Bj.js → docx-zipper-B4BvVBcx.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-BBDvpLkh.js → editor-w6HF4T0Y.js} +16 -7
  15. package/dist/super-editor/chunks/{toolbar-DFbQdspg.js → toolbar-Ctfr_bH2.js} +2 -2
  16. package/dist/super-editor/converter.es.js +1 -1
  17. package/dist/super-editor/core/super-converter/helpers.d.ts.map +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/extensions/line-height/line-height.d.ts.map +1 -1
  21. package/dist/super-editor/extensions/paragraph/paragraph.d.ts.map +1 -1
  22. package/dist/super-editor/file-zipper.es.js +1 -1
  23. package/dist/super-editor/super-editor.es.js +6 -6
  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 +17 -9
  30. package/dist/superdoc.umd.js.map +1 -1
  31. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  const jszip = require("./jszip-Bwu_om3F.cjs");
3
3
  const vue = require("./vue-DPZkajuO.cjs");
4
- const xmlJs = require("./xml-js-DUY8aVjn.cjs");
5
- const url = require("./url-ITkRdlXj.cjs");
4
+ const xmlJs = require("./xml-js-B7Vccv2s.cjs");
5
+ const url = require("./url-DuggQ5JR.cjs");
6
6
  function _mergeNamespaces(n, m) {
7
7
  for (var i = 0; i < m.length; i++) {
8
8
  const e = m[i];
@@ -1,5 +1,5 @@
1
1
  import { g as getDefaultExportFromCjs } from "./jszip-BmWWPxfF.es.js";
2
- import { s as streamHttp, r as require$$1 } from "./index-WlcT4qSb.es.js";
2
+ import { s as streamHttp, r as require$$1 } from "./index-SKpROzLW.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-Bwu_om3F.cjs");
3
- const index$2 = require("./index-CZ7uYk9v.cjs");
3
+ const index$2 = require("./index-B1MhwjTC.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-BmWWPxfF.es.js";
2
2
  import { p as process$1 } from "./vue-IIIZMHTg.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-O0pGoXNk.es.js";
4
- import { u as url } from "./url-B8943xnh.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-BV-kCPOA.es.js";
4
+ import { u as url } from "./url-CAZQTNP3.es.js";
5
5
  function _mergeNamespaces(n, m) {
6
6
  for (var i = 0; i < m.length; i++) {
7
7
  const e = m[i];
@@ -16057,7 +16057,6 @@ const getLineHeightValueString = (lineHeight2, defaultUnit, lineRule = "", isObj
16057
16057
  if (Number.isNaN(value) || value === 0) return {};
16058
16058
  if (lineRule === "atLeast" && value < 1) return {};
16059
16059
  unit = unit ? unit : defaultUnit;
16060
- value += unit ? 4 : 0.2;
16061
16060
  return isObject2 ? { ["line-height"]: `${value}${unit}` } : `line-height: ${value}${unit}`;
16062
16061
  };
16063
16062
  const deobfuscateFont = (arrayBuffer, guidHex) => {
@@ -23295,7 +23294,7 @@ const _SuperConverter = class _SuperConverter2 {
23295
23294
  return;
23296
23295
  }
23297
23296
  }
23298
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.4") {
23297
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.6") {
23299
23298
  const customLocation = "docProps/custom.xml";
23300
23299
  if (!docx[customLocation]) {
23301
23300
  docx[customLocation] = generateCustomXml();
@@ -23762,7 +23761,7 @@ function storeSuperdocVersion(docx) {
23762
23761
  function generateCustomXml() {
23763
23762
  return DEFAULT_CUSTOM_XML;
23764
23763
  }
23765
- function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.4") {
23764
+ function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.6") {
23766
23765
  return {
23767
23766
  type: "element",
23768
23767
  name: "property",
@@ -39100,8 +39099,8 @@ const createHeaderFooterEditor = ({
39100
39099
  content: data,
39101
39100
  extensions: getStarterExtensions(),
39102
39101
  documentId: sectionId || "sectionId",
39103
- media: editor.options.media,
39104
- mediaFiles: editor.options.mediaFiles,
39102
+ media: editor.storage.image.media,
39103
+ mediaFiles: editor.storage.image.media,
39105
39104
  fonts: editor.options.fonts,
39106
39105
  isHeaderOrFooter: true,
39107
39106
  annotations: true,
@@ -41102,7 +41101,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
41102
41101
  * @returns {Object | void} Migration results
41103
41102
  */
41104
41103
  processCollaborationMigrations() {
41105
- console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.4");
41104
+ console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.6");
41106
41105
  if (!this.options.ydoc) return;
41107
41106
  const metaMap = this.options.ydoc.getMap("meta");
41108
41107
  let docVersion = metaMap.get("version");
@@ -41867,7 +41866,14 @@ const LineHeight = Extension.create({
41867
41866
  parseDOM: (el) => el.style.lineHeight,
41868
41867
  renderDOM: (attrs) => {
41869
41868
  if (!attrs.lineHeight) return {};
41870
- return { style: getLineHeightValueString(attrs.lineHeight, this.options.defaults.unit, attrs.spacing?.lineRule) };
41869
+ const lineHeightStyle = getLineHeightValueString(
41870
+ attrs.lineHeight,
41871
+ this.options.defaults.unit,
41872
+ attrs.spacing?.lineRule
41873
+ );
41874
+ return {
41875
+ style: `${lineHeightStyle}`
41876
+ };
41871
41877
  }
41872
41878
  }
41873
41879
  }
@@ -43792,7 +43798,9 @@ const Paragraph = Node$1.create({
43792
43798
  renderDOM: (attrs) => {
43793
43799
  const { spacing } = attrs;
43794
43800
  if (!spacing) return {};
43795
- const style2 = getSpacingStyleString(spacing);
43801
+ const spacingCopy = { ...spacing };
43802
+ if (attrs.lineHeight) delete spacingCopy.line;
43803
+ const style2 = getSpacingStyleString(spacingCopy);
43796
43804
  if (style2) return { style: style2 };
43797
43805
  return {};
43798
43806
  }
@@ -16074,7 +16074,6 @@ const getLineHeightValueString = (lineHeight2, defaultUnit, lineRule = "", isObj
16074
16074
  if (Number.isNaN(value) || value === 0) return {};
16075
16075
  if (lineRule === "atLeast" && value < 1) return {};
16076
16076
  unit = unit ? unit : defaultUnit;
16077
- value += unit ? 4 : 0.2;
16078
16077
  return isObject2 ? { ["line-height"]: `${value}${unit}` } : `line-height: ${value}${unit}`;
16079
16078
  };
16080
16079
  const deobfuscateFont = (arrayBuffer, guidHex) => {
@@ -23312,7 +23311,7 @@ const _SuperConverter = class _SuperConverter2 {
23312
23311
  return;
23313
23312
  }
23314
23313
  }
23315
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.4") {
23314
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.6") {
23316
23315
  const customLocation = "docProps/custom.xml";
23317
23316
  if (!docx[customLocation]) {
23318
23317
  docx[customLocation] = generateCustomXml();
@@ -23779,7 +23778,7 @@ function storeSuperdocVersion(docx) {
23779
23778
  function generateCustomXml() {
23780
23779
  return DEFAULT_CUSTOM_XML;
23781
23780
  }
23782
- function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.4") {
23781
+ function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.6") {
23783
23782
  return {
23784
23783
  type: "element",
23785
23784
  name: "property",
@@ -39117,8 +39116,8 @@ const createHeaderFooterEditor = ({
39117
39116
  content: data,
39118
39117
  extensions: getStarterExtensions(),
39119
39118
  documentId: sectionId || "sectionId",
39120
- media: editor.options.media,
39121
- mediaFiles: editor.options.mediaFiles,
39119
+ media: editor.storage.image.media,
39120
+ mediaFiles: editor.storage.image.media,
39122
39121
  fonts: editor.options.fonts,
39123
39122
  isHeaderOrFooter: true,
39124
39123
  annotations: true,
@@ -41119,7 +41118,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
41119
41118
  * @returns {Object | void} Migration results
41120
41119
  */
41121
41120
  processCollaborationMigrations() {
41122
- console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.4");
41121
+ console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.6");
41123
41122
  if (!this.options.ydoc) return;
41124
41123
  const metaMap = this.options.ydoc.getMap("meta");
41125
41124
  let docVersion = metaMap.get("version");
@@ -41884,7 +41883,14 @@ const LineHeight = Extension.create({
41884
41883
  parseDOM: (el) => el.style.lineHeight,
41885
41884
  renderDOM: (attrs) => {
41886
41885
  if (!attrs.lineHeight) return {};
41887
- return { style: getLineHeightValueString(attrs.lineHeight, this.options.defaults.unit, attrs.spacing?.lineRule) };
41886
+ const lineHeightStyle = getLineHeightValueString(
41887
+ attrs.lineHeight,
41888
+ this.options.defaults.unit,
41889
+ attrs.spacing?.lineRule
41890
+ );
41891
+ return {
41892
+ style: `${lineHeightStyle}`
41893
+ };
41888
41894
  }
41889
41895
  }
41890
41896
  }
@@ -43809,7 +43815,9 @@ const Paragraph = Node$1.create({
43809
43815
  renderDOM: (attrs) => {
43810
43816
  const { spacing } = attrs;
43811
43817
  if (!spacing) return {};
43812
- const style2 = getSpacingStyleString(spacing);
43818
+ const spacingCopy = { ...spacing };
43819
+ if (attrs.lineHeight) delete spacingCopy.line;
43820
+ const style2 = getSpacingStyleString(spacingCopy);
43813
43821
  if (style2) return { style: style2 };
43814
43822
  return {};
43815
43823
  }
@@ -1,5 +1,5 @@
1
1
  import { c as commonjsGlobal, g as getDefaultExportFromCjs, a as getAugmentedNamespace } from "./jszip-BmWWPxfF.es.js";
2
- import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-O0pGoXNk.es.js";
2
+ import { t as type, g as getIntrinsic, c as callBound$2 } from "./xml-js-BV-kCPOA.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 */
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const jszip = require("./jszip-Bwu_om3F.cjs");
3
- const xmlJs = require("./xml-js-DUY8aVjn.cjs");
3
+ const xmlJs = require("./xml-js-B7Vccv2s.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 */
@@ -514,23 +514,9 @@ function requireHasSymbols() {
514
514
  };
515
515
  return hasSymbols$1;
516
516
  }
517
- var Reflect_getPrototypeOf;
518
- var hasRequiredReflect_getPrototypeOf;
519
- function requireReflect_getPrototypeOf() {
520
- if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
521
- hasRequiredReflect_getPrototypeOf = 1;
522
- Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
523
- return Reflect_getPrototypeOf;
524
- }
525
- var Object_getPrototypeOf;
526
- var hasRequiredObject_getPrototypeOf;
527
- function requireObject_getPrototypeOf() {
528
- if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
529
- hasRequiredObject_getPrototypeOf = 1;
530
- var $Object2 = esObjectAtoms;
531
- Object_getPrototypeOf = $Object2.getPrototypeOf || null;
532
- return Object_getPrototypeOf;
533
- }
517
+ var Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
518
+ var $Object$2 = esObjectAtoms;
519
+ var Object_getPrototypeOf = $Object$2.getPrototypeOf || null;
534
520
  var implementation;
535
521
  var hasRequiredImplementation;
536
522
  function requireImplementation() {
@@ -672,8 +658,8 @@ var get = desc && typeof desc.get === "function" ? callBind$2([desc.get]) : type
672
658
  return $getPrototypeOf(value == null ? value : $Object$1(value));
673
659
  }
674
660
  ) : false;
675
- var reflectGetProto = requireReflect_getPrototypeOf();
676
- var originalGetProto = requireObject_getPrototypeOf();
661
+ var reflectGetProto = Reflect_getPrototypeOf;
662
+ var originalGetProto = Object_getPrototypeOf;
677
663
  var getDunderProto = get;
678
664
  var getProto$3 = reflectGetProto ? function getProto(O) {
679
665
  return reflectGetProto(O);
@@ -738,8 +724,8 @@ var ThrowTypeError = $gOPD ? function() {
738
724
  }() : throwTypeError;
739
725
  var hasSymbols2 = requireHasSymbols()();
740
726
  var getProto$2 = getProto$3;
741
- var $ObjectGPO = requireObject_getPrototypeOf();
742
- var $ReflectGPO = requireReflect_getPrototypeOf();
727
+ var $ObjectGPO = Object_getPrototypeOf;
728
+ var $ReflectGPO = Reflect_getPrototypeOf;
743
729
  var $apply$1 = requireFunctionApply();
744
730
  var $call = requireFunctionCall();
745
731
  var needsEval = {};
@@ -513,23 +513,9 @@ function requireHasSymbols() {
513
513
  };
514
514
  return hasSymbols$1;
515
515
  }
516
- var Reflect_getPrototypeOf;
517
- var hasRequiredReflect_getPrototypeOf;
518
- function requireReflect_getPrototypeOf() {
519
- if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
520
- hasRequiredReflect_getPrototypeOf = 1;
521
- Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
522
- return Reflect_getPrototypeOf;
523
- }
524
- var Object_getPrototypeOf;
525
- var hasRequiredObject_getPrototypeOf;
526
- function requireObject_getPrototypeOf() {
527
- if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
528
- hasRequiredObject_getPrototypeOf = 1;
529
- var $Object2 = esObjectAtoms;
530
- Object_getPrototypeOf = $Object2.getPrototypeOf || null;
531
- return Object_getPrototypeOf;
532
- }
516
+ var Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
517
+ var $Object$2 = esObjectAtoms;
518
+ var Object_getPrototypeOf = $Object$2.getPrototypeOf || null;
533
519
  var implementation;
534
520
  var hasRequiredImplementation;
535
521
  function requireImplementation() {
@@ -671,8 +657,8 @@ var get = desc && typeof desc.get === "function" ? callBind$2([desc.get]) : type
671
657
  return $getPrototypeOf(value == null ? value : $Object$1(value));
672
658
  }
673
659
  ) : false;
674
- var reflectGetProto = requireReflect_getPrototypeOf();
675
- var originalGetProto = requireObject_getPrototypeOf();
660
+ var reflectGetProto = Reflect_getPrototypeOf;
661
+ var originalGetProto = Object_getPrototypeOf;
676
662
  var getDunderProto = get;
677
663
  var getProto$3 = reflectGetProto ? function getProto(O) {
678
664
  return reflectGetProto(O);
@@ -737,8 +723,8 @@ var ThrowTypeError = $gOPD ? function() {
737
723
  }() : throwTypeError;
738
724
  var hasSymbols2 = requireHasSymbols()();
739
725
  var getProto$2 = getProto$3;
740
- var $ObjectGPO = requireObject_getPrototypeOf();
741
- var $ReflectGPO = requireReflect_getPrototypeOf();
726
+ var $ObjectGPO = Object_getPrototypeOf;
727
+ var $ReflectGPO = Reflect_getPrototypeOf;
742
728
  var $apply$1 = requireFunctionApply();
743
729
  var $call = requireFunctionCall();
744
730
  var needsEval = {};
@@ -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-C_7uxiuz.js";
3
- import { _ as _export_sfc } from "./chunks/editor-BBDvpLkh.js";
2
+ import { T as TextSelection } from "./chunks/converter-DY26Bu8a.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-w6HF4T0Y.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 = {}) {
@@ -16076,7 +16076,6 @@ const getLineHeightValueString = (lineHeight, defaultUnit, lineRule = "", isObje
16076
16076
  if (Number.isNaN(value) || value === 0) return {};
16077
16077
  if (lineRule === "atLeast" && value < 1) return {};
16078
16078
  unit = unit ? unit : defaultUnit;
16079
- value += unit ? 4 : 0.2;
16080
16079
  return isObject ? { ["line-height"]: `${value}${unit}` } : `line-height: ${value}${unit}`;
16081
16080
  };
16082
16081
  const deobfuscateFont = (arrayBuffer, guidHex) => {
@@ -23314,7 +23313,7 @@ const _SuperConverter = class _SuperConverter {
23314
23313
  return;
23315
23314
  }
23316
23315
  }
23317
- static updateDocumentVersion(docx = this.convertedXml, version = "0.12.36-next.4") {
23316
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.12.36-next.6") {
23318
23317
  const customLocation = "docProps/custom.xml";
23319
23318
  if (!docx[customLocation]) {
23320
23319
  docx[customLocation] = generateCustomXml();
@@ -23784,7 +23783,7 @@ function storeSuperdocVersion(docx) {
23784
23783
  function generateCustomXml() {
23785
23784
  return DEFAULT_CUSTOM_XML;
23786
23785
  }
23787
- function generateSuperdocVersion(pid = 2, version = "0.12.36-next.4") {
23786
+ function generateSuperdocVersion(pid = 2, version = "0.12.36-next.6") {
23788
23787
  return {
23789
23788
  type: "element",
23790
23789
  name: "property",
@@ -1,4 +1,4 @@
1
- import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-C_7uxiuz.js";
1
+ import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-DY26Bu8a.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, _commandService, _css, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createDocFromHTML_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_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, c as callOrGet, i as isEmptyObject, S as Schema$1, T as TextSelection, b as canSplit, l as liftTarget, A as AllSelection, d as canJoin, j as joinPoint, N as NodeSelection, r as replaceStep$1, e as Selection, F as Fragment, R as ReplaceAroundStep, f as Slice, o as objectIncludes, g as deleteProps, D as DOMParser$1, h as ReplaceStep, k as NodeRange, m as findWrapping, n as isMacOS, p as isIOS, q as generateDocxRandomId, s as minMax, t as generateRandom32BitHex, u as DOMSerializer, v as Mark$1, w as dropPoint, x as process$1, B as Buffer2, y as isRegExp, z as TrackDeleteMarkName, C as TrackInsertMarkName, E as v4, G as TrackFormatMarkName, H as comments_module_events, I as AddMarkStep, J as RemoveMarkStep, K as twipsToLines, L as pixelsToTwips, O as SuperConverter, Q as EditorState, U as hasSomeParentWithClass, V as parseSizeUnit, W as getLineHeightValueString, X as toKebabCase, Y as kebabCase, Z as getColStyleDeclaration, _ as SelectionRange, $ as Transform, a0 as createColGroup } from "./converter-C_7uxiuz.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, i as isEmptyObject, S as Schema$1, T as TextSelection, b as canSplit, l as liftTarget, A as AllSelection, d as canJoin, j as joinPoint, N as NodeSelection, r as replaceStep$1, e as Selection, F as Fragment, R as ReplaceAroundStep, f as Slice, o as objectIncludes, g as deleteProps, D as DOMParser$1, h as ReplaceStep, k as NodeRange, m as findWrapping, n as isMacOS, p as isIOS, q as generateDocxRandomId, s as minMax, t as generateRandom32BitHex, u as DOMSerializer, v as Mark$1, w as dropPoint, x as process$1, B as Buffer2, y as isRegExp, z as TrackDeleteMarkName, C as TrackInsertMarkName, E as v4, G as TrackFormatMarkName, H as comments_module_events, I as AddMarkStep, J as RemoveMarkStep, K as twipsToLines, L as pixelsToTwips, O as SuperConverter, Q as EditorState, U as hasSomeParentWithClass, V as parseSizeUnit, W as getLineHeightValueString, X as toKebabCase, Y as kebabCase, Z as getColStyleDeclaration, _ as SelectionRange, $ as Transform, a0 as createColGroup } from "./converter-DY26Bu8a.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-DVTlb3Bj.js";
17
+ import { D as DocxZipper } from "./docx-zipper-B4BvVBcx.js";
18
18
  function getMarksFromSelection(state) {
19
19
  const { from: from2, to, empty: empty2 } = state.selection;
20
20
  const marks = [];
@@ -12828,8 +12828,8 @@ const createHeaderFooterEditor = ({
12828
12828
  content: data,
12829
12829
  extensions: getStarterExtensions(),
12830
12830
  documentId: sectionId || "sectionId",
12831
- media: editor.options.media,
12832
- mediaFiles: editor.options.mediaFiles,
12831
+ media: editor.storage.image.media,
12832
+ mediaFiles: editor.storage.image.media,
12833
12833
  fonts: editor.options.fonts,
12834
12834
  isHeaderOrFooter: true,
12835
12835
  annotations: true,
@@ -14858,7 +14858,7 @@ const _Editor = class _Editor extends EventEmitter {
14858
14858
  * @returns {Object | void} Migration results
14859
14859
  */
14860
14860
  processCollaborationMigrations() {
14861
- console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.4");
14861
+ console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.6");
14862
14862
  if (!this.options.ydoc) return;
14863
14863
  const metaMap = this.options.ydoc.getMap("meta");
14864
14864
  let docVersion = metaMap.get("version");
@@ -15757,7 +15757,14 @@ const LineHeight = Extension.create({
15757
15757
  parseDOM: (el) => el.style.lineHeight,
15758
15758
  renderDOM: (attrs) => {
15759
15759
  if (!attrs.lineHeight) return {};
15760
- return { style: getLineHeightValueString(attrs.lineHeight, this.options.defaults.unit, attrs.spacing?.lineRule) };
15760
+ const lineHeightStyle = getLineHeightValueString(
15761
+ attrs.lineHeight,
15762
+ this.options.defaults.unit,
15763
+ attrs.spacing?.lineRule
15764
+ );
15765
+ return {
15766
+ style: `${lineHeightStyle}`
15767
+ };
15761
15768
  }
15762
15769
  }
15763
15770
  }
@@ -17682,7 +17689,9 @@ const Paragraph = Node$1.create({
17682
17689
  renderDOM: (attrs) => {
17683
17690
  const { spacing } = attrs;
17684
17691
  if (!spacing) return {};
17685
- const style = getSpacingStyleString(spacing);
17692
+ const spacingCopy = { ...spacing };
17693
+ if (attrs.lineHeight) delete spacingCopy.line;
17694
+ const style = getSpacingStyleString(spacingCopy);
17686
17695
  if (style) return { style };
17687
17696
  return {};
17688
17697
  }
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, nextTick, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { x as process$1 } from "./converter-C_7uxiuz.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BBDvpLkh.js";
2
+ import { x as process$1 } from "./converter-DY26Bu8a.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-w6HF4T0Y.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 { O } from "./chunks/converter-C_7uxiuz.js";
1
+ import { O } from "./chunks/converter-DY26Bu8a.js";
2
2
  export {
3
3
  O as SuperConverter
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/helpers.js"],"names":[],"mappings":"AAEA,mDAIC;AAED,kDAIC;AAED,kDAIC;AAED,mDAIC;AAED,iDAGC;AAED,iDAGC;AAED,2DAGC;AAOD,8CAKC;AAED,6CAIC;AAED,wDAGC;AArBD,2DAGC;AAoBD,8DAKC;AAED,yDAGC;AAYD,yFA6BC;AAED,uEAKC;AAED,kEAoBC;AAED,qDASC;AAOD,2CAKC;AAtFD,2CAGC;AARD,8CAGC;AA0FD;;;;EAUC;AAED,qEAwBC;AAED,0EAGC"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/helpers.js"],"names":[],"mappings":"AAEA,mDAIC;AAED,kDAIC;AAED,kDAIC;AAED,mDAIC;AAED,iDAGC;AAED,iDAGC;AAED,2DAGC;AAOD,8CAKC;AAED,6CAIC;AAED,wDAGC;AArBD,2DAGC;AAoBD,8DAKC;AAED,yDAGC;AAYD,yFA6BC;AAED,uEAKC;AAED,kEAoBC;AAED,qDASC;AAOD,2CAKC;AAtFD,2CAGC;AARD,8CAGC;AA0FD;;;;EAMC;AAED,qEAwBC;AAED,0EAGC"}
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-C_7uxiuz.js";
2
- import { D } from "./chunks/docx-zipper-DVTlb3Bj.js";
1
+ import "./chunks/converter-DY26Bu8a.js";
2
+ import { D } from "./chunks/docx-zipper-B4BvVBcx.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-BBDvpLkh.js";
2
- import "./chunks/converter-C_7uxiuz.js";
3
- import "./chunks/docx-zipper-DVTlb3Bj.js";
1
+ import { E } from "./chunks/editor-w6HF4T0Y.js";
2
+ import "./chunks/converter-DY26Bu8a.js";
3
+ import "./chunks/docx-zipper-B4BvVBcx.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"line-height.d.ts","sourceRoot":"","sources":["../../../src/extensions/line-height/line-height.js"],"names":[],"mappings":"AAGA,6BAoDG"}
1
+ {"version":3,"file":"line-height.d.ts","sourceRoot":"","sources":["../../../src/extensions/line-height/line-height.js"],"names":[],"mappings":"AAGA,6BA0DG"}
@@ -1 +1 @@
1
- {"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../src/extensions/paragraph/paragraph.js"],"names":[],"mappings":"AAMA,4BAkJG"}
1
+ {"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../src/extensions/paragraph/paragraph.js"],"names":[],"mappings":"AAMA,4BAmJG"}
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-DVTlb3Bj.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-B4BvVBcx.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -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, runCommandWithArgumentOnly_fn;
12
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, e as undoDepth, r as redoDepth, E as Editor, h as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-BBDvpLkh.js";
13
- import { o, C, T, m, p, l, n } from "./chunks/editor-BBDvpLkh.js";
14
- import { a2 as getDefaultExportFromCjs, E as v4, a5 as vClickOutside, T as TextSelection, a as Plugin } from "./chunks/converter-C_7uxiuz.js";
15
- import { O } from "./chunks/converter-C_7uxiuz.js";
12
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, I as ImagePlaceholderPluginKey, f as findPlaceholder, c as findParentNode, d as getActiveFormatting, i as isInTable, e as undoDepth, r as redoDepth, E as Editor, h as getStarterExtensions, P as Placeholder, j as getRichTextExtensions, M as Mark, k as Extension, A as Attribute, N as Node } from "./chunks/editor-w6HF4T0Y.js";
13
+ import { o, C, T, m, p, l, n } from "./chunks/editor-w6HF4T0Y.js";
14
+ import { a2 as getDefaultExportFromCjs, E as v4, a5 as vClickOutside, T as TextSelection, a as Plugin } from "./chunks/converter-DY26Bu8a.js";
15
+ import { O } from "./chunks/converter-DY26Bu8a.js";
16
16
  import { ref, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, getCurrentInstance, computed, watch, onMounted, createCommentVNode, withDirectives, withKeys, withModifiers, vModelText, createTextVNode, toDisplayString, Fragment, renderList, normalizeStyle, createVNode, h, createApp, reactive, onUnmounted, shallowRef, onBeforeUnmount, createBlock } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-DFbQdspg.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, N as NSkeleton } from "./chunks/toolbar-Ctfr_bH2.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-DVTlb3Bj.js";
19
+ import { D } from "./chunks/docx-zipper-B4BvVBcx.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  (function(module) {
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-DFbQdspg.js";
3
- import "./chunks/editor-BBDvpLkh.js";
2
+ import { T } from "./chunks/toolbar-Ctfr_bH2.js";
3
+ import "./chunks/editor-w6HF4T0Y.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-D5ju1Vy3.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-H72UDWQx.cjs");
4
4
  require("./chunks/vue-DPZkajuO.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, T, f, g, i, h, j, k, l, m, n, o } from "./chunks/super-editor.es-DSQJ1jVu.es.js";
1
+ import { A, a, _, C, D, E, b, S, c, d, e, T, f, g, i, h, j, k, l, m, n, o } from "./chunks/super-editor.es-C5YefmYN.es.js";
2
2
  import "./chunks/vue-IIIZMHTg.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -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-D5ju1Vy3.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-H72UDWQx.cjs");
4
4
  const vue = require("./chunks/vue-DPZkajuO.cjs");
5
5
  const jszip = require("./chunks/jszip-Bwu_om3F.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
@@ -23172,13 +23172,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
23172
23172
  "./chunks/empty-lth7LH78.cjs"
23173
23173
  )), http = await Promise.resolve().then(() => require(
23174
23174
  /*webpackIgnore: true*/
23175
- "./chunks/index-CZ7uYk9v.cjs"
23175
+ "./chunks/index-B1MhwjTC.cjs"
23176
23176
  )).then((n) => n.index), https = await Promise.resolve().then(() => require(
23177
23177
  /*webpackIgnore: true*/
23178
- "./chunks/index-C9VoBmK2.cjs"
23178
+ "./chunks/index-CMBtuT02.cjs"
23179
23179
  )).then((n) => n.index), url = await Promise.resolve().then(() => require(
23180
23180
  /*webpackIgnore: true*/
23181
- "./chunks/url-ITkRdlXj.cjs"
23181
+ "./chunks/url-DuggQ5JR.cjs"
23182
23182
  )).then((n) => n.url);
23183
23183
  let canvas, path2d;
23184
23184
  try {
@@ -46571,7 +46571,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
46571
46571
  this.config.colors = shuffleArray(this.config.colors);
46572
46572
  this.userColorMap = /* @__PURE__ */ new Map();
46573
46573
  this.colorIndex = 0;
46574
- this.version = "0.12.36-next.4";
46574
+ this.version = "0.12.36-next.6";
46575
46575
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
46576
46576
  this.superdocId = config.superdocId || uuid.v4();
46577
46577
  this.colors = this.config.colors;
@@ -1,5 +1,5 @@
1
- import { o as index$1, C as CommentsPluginKey, f as TrackChangesBasePluginKey, E as Editor, l as getRichTextExtensions, d as SuperInput, A as AIWriter, c as SuperEditor, e as SuperToolbar, g as createZip } from "./chunks/super-editor.es-DSQJ1jVu.es.js";
2
- import { a, S, i, n } from "./chunks/super-editor.es-DSQJ1jVu.es.js";
1
+ import { o as index$1, C as CommentsPluginKey, f as TrackChangesBasePluginKey, E as Editor, l as getRichTextExtensions, d as SuperInput, A as AIWriter, c as SuperEditor, e as SuperToolbar, g as createZip } from "./chunks/super-editor.es-C5YefmYN.es.js";
2
+ import { a, S, i, n } from "./chunks/super-editor.es-C5YefmYN.es.js";
3
3
  import { Y as effectScope, r as ref, Z as markRaw, p as process$1, _ as toRaw, a as computed, $ as isRef, a0 as isReactive, D as toRef, i as inject, q as getCurrentInstance, l as watch, y as unref, a1 as hasInjectionContext, N as reactive, u as nextTick, a2 as getCurrentScope, a3 as onScopeDispose, a4 as toRefs, g as global$1, K as shallowRef, O as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, s as onDeactivated, A as createTextVNode, F as Fragment, R as Comment, m as defineComponent, E as provide, I as withDirectives, C as h, V as Teleport, S as renderSlot, W as isVNode, J as watchEffect, P as Transition, G as mergeProps, Q as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, x as createVNode, z as withCtx, f as createBaseVNode, B as normalizeStyle, e as createCommentVNode, v as createBlock, w as withModifiers, n as normalizeClass, a5 as resolveDirective, d as renderList, c as createApp, X as onUnmounted, a6 as resolveDynamicComponent } from "./chunks/vue-IIIZMHTg.es.js";
4
4
  import { B as Buffer$2 } from "./chunks/jszip-BmWWPxfF.es.js";
5
5
  import { B as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.es.js";
@@ -23171,13 +23171,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
23171
23171
  "./chunks/empty-smM22Y5N.es.js"
23172
23172
  ), http = await import(
23173
23173
  /*webpackIgnore: true*/
23174
- "./chunks/index-WlcT4qSb.es.js"
23174
+ "./chunks/index-SKpROzLW.es.js"
23175
23175
  ).then((n2) => n2.i), https = await import(
23176
23176
  /*webpackIgnore: true*/
23177
- "./chunks/index-Bt9T0ivx.es.js"
23177
+ "./chunks/index-BrSjd1Id.es.js"
23178
23178
  ).then((n2) => n2.i), url = await import(
23179
23179
  /*webpackIgnore: true*/
23180
- "./chunks/url-B8943xnh.es.js"
23180
+ "./chunks/url-CAZQTNP3.es.js"
23181
23181
  ).then((n2) => n2.u);
23182
23182
  let canvas, path2d;
23183
23183
  try {
@@ -46570,7 +46570,7 @@ class SuperDoc extends EventEmitter {
46570
46570
  this.config.colors = shuffleArray(this.config.colors);
46571
46571
  this.userColorMap = /* @__PURE__ */ new Map();
46572
46572
  this.colorIndex = 0;
46573
- this.version = "0.12.36-next.4";
46573
+ this.version = "0.12.36-next.6";
46574
46574
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
46575
46575
  this.superdocId = config.superdocId || v4();
46576
46576
  this.colors = this.config.colors;