@harbour-enterprises/superdoc 0.21.1 → 0.21.3

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 (39) hide show
  1. package/dist/chunks/{PdfViewer-B507M2sz.cjs → PdfViewer-65ZP0swI.cjs} +2 -2
  2. package/dist/chunks/{PdfViewer-DCKxnML6.es.js → PdfViewer-CZqsbBTY.es.js} +2 -2
  3. package/dist/chunks/{eventemitter3-CZv6vEhA.es.js → eventemitter3-CR2eBWft.es.js} +1 -1
  4. package/dist/chunks/{eventemitter3-B_kO1Pxm.cjs → eventemitter3-DSRogsNq.cjs} +1 -1
  5. package/dist/chunks/{index-djqw1MEc.cjs → index-D2LskHSS.cjs} +6 -6
  6. package/dist/chunks/{index-DWR8syta.es.js → index-DK8WZbrv.es.js} +6 -6
  7. package/dist/chunks/{jszip-b7l8QkfH.cjs → jszip-B4LDL19y.cjs} +1 -1
  8. package/dist/chunks/{jszip-B8KIZSNe.es.js → jszip-DAXEPCUv.es.js} +1 -1
  9. package/dist/chunks/{super-editor.es-D__G4K0i.es.js → super-editor.es-DH3SY8p3.es.js} +22 -24
  10. package/dist/chunks/{super-editor.es-HekVJogH.cjs → super-editor.es-qo57gD5K.cjs} +22 -24
  11. package/dist/chunks/{vue-DWle4Cai.cjs → vue-DKMj1I9B.cjs} +39 -42
  12. package/dist/chunks/{vue-CXxsqYcP.es.js → vue-ZWZLQtoU.es.js} +39 -42
  13. package/dist/chunks/xml-js-Bbc0NeKa.es.js +2 -0
  14. package/dist/chunks/xml-js-CWV8R-ek.cjs +3 -0
  15. package/dist/core/types/index.d.ts.map +1 -1
  16. package/dist/style.css +15 -0
  17. package/dist/super-editor/ai-writer.es.js +2 -2
  18. package/dist/super-editor/chunks/{converter-B_pO-5Ls.js → converter-BrLR9C8w.js} +18 -20
  19. package/dist/super-editor/chunks/{docx-zipper-WaO3WaIz.js → docx-zipper-j3g5CahY.js} +1 -1
  20. package/dist/super-editor/chunks/{editor-DInvq7gF.js → editor-BCwaQpiF.js} +5 -5
  21. package/dist/super-editor/chunks/{toolbar-C15EomPB.js → toolbar-CExvA6pn.js} +2 -2
  22. package/dist/super-editor/converter.es.js +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/src/core/Attribute.d.ts +2 -2
  27. package/dist/super-editor/src/core/Schema.d.ts +2 -2
  28. package/dist/super-editor/style.css +15 -0
  29. package/dist/super-editor/super-editor.es.js +6 -6
  30. package/dist/super-editor/toolbar.es.js +2 -2
  31. package/dist/super-editor.cjs +2 -2
  32. package/dist/super-editor.es.js +2 -2
  33. package/dist/superdoc.cjs +4 -4
  34. package/dist/superdoc.es.js +4 -4
  35. package/dist/superdoc.umd.js +56 -58
  36. package/dist/superdoc.umd.js.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/chunks/xml-js-CX8FH0He.cjs +0 -3
  39. package/dist/chunks/xml-js-D0tLGmKu.es.js +0 -2
@@ -20,7 +20,7 @@
20
20
  }
21
21
  const Y__namespace = /* @__PURE__ */ _interopNamespaceDefault(Y);
22
22
  /**
23
- * @vue/shared v3.5.21
23
+ * @vue/shared v3.5.22
24
24
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
25
25
  * @license MIT
26
26
  **/
@@ -915,7 +915,7 @@
915
915
  iter._next = iter.next;
916
916
  iter.next = () => {
917
917
  const result = iter._next();
918
- if (result.value) {
918
+ if (!result.done) {
919
919
  result.value = wrapValue(result.value);
920
920
  }
921
921
  return result;
@@ -1041,7 +1041,8 @@
1041
1041
  return res;
1042
1042
  }
1043
1043
  if (isRef(res)) {
1044
- return targetIsArray && isIntegerKey(key2) ? res : res.value;
1044
+ const value = targetIsArray && isIntegerKey(key2) ? res : res.value;
1045
+ return isReadonly2 && isObject$3(value) ? readonly(value) : value;
1045
1046
  }
1046
1047
  if (isObject$3(res)) {
1047
1048
  return isReadonly2 ? readonly(res) : reactive(res);
@@ -2214,9 +2215,6 @@
2214
2215
  insert(mainAnchor, container, anchor);
2215
2216
  const mount2 = (container2, anchor2) => {
2216
2217
  if (shapeFlag & 16) {
2217
- if (parentComponent && parentComponent.isCE) {
2218
- parentComponent.ce._teleportTarget = container2;
2219
- }
2220
2218
  mountChildren(
2221
2219
  children,
2222
2220
  container2,
@@ -2238,6 +2236,9 @@
2238
2236
  } else if (namespace2 !== "mathml" && isTargetMathML(target)) {
2239
2237
  namespace2 = "mathml";
2240
2238
  }
2239
+ if (parentComponent && parentComponent.isCE) {
2240
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
2241
+ }
2241
2242
  if (!disabled) {
2242
2243
  mount2(target, targetAnchor);
2243
2244
  updateCssVars(n2, false);
@@ -3326,11 +3327,12 @@
3326
3327
  }
3327
3328
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
3328
3329
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
3330
+ const hasProps = Object.keys(props).length > 0;
3329
3331
  return openBlock(), createBlock(
3330
3332
  Fragment$1,
3331
3333
  null,
3332
3334
  [createVNode("slot", props, fallback)],
3333
- 64
3335
+ hasProps ? -2 : 64
3334
3336
  );
3335
3337
  }
3336
3338
  let slot = slots[name];
@@ -6720,34 +6722,31 @@
6720
6722
  return c2;
6721
6723
  };
6722
6724
  function h$1(type2, propsOrChildren, children) {
6723
- const doCreateVNode = (type22, props, children2) => {
6725
+ try {
6724
6726
  setBlockTracking(-1);
6725
- try {
6726
- return createVNode(type22, props, children2);
6727
- } finally {
6728
- setBlockTracking(1);
6729
- }
6730
- };
6731
- const l = arguments.length;
6732
- if (l === 2) {
6733
- if (isObject$3(propsOrChildren) && !isArray$3(propsOrChildren)) {
6734
- if (isVNode(propsOrChildren)) {
6735
- return doCreateVNode(type2, null, [propsOrChildren]);
6727
+ const l = arguments.length;
6728
+ if (l === 2) {
6729
+ if (isObject$3(propsOrChildren) && !isArray$3(propsOrChildren)) {
6730
+ if (isVNode(propsOrChildren)) {
6731
+ return createVNode(type2, null, [propsOrChildren]);
6732
+ }
6733
+ return createVNode(type2, propsOrChildren);
6734
+ } else {
6735
+ return createVNode(type2, null, propsOrChildren);
6736
6736
  }
6737
- return doCreateVNode(type2, propsOrChildren);
6738
6737
  } else {
6739
- return doCreateVNode(type2, null, propsOrChildren);
6740
- }
6741
- } else {
6742
- if (l > 3) {
6743
- children = Array.prototype.slice.call(arguments, 2);
6744
- } else if (l === 3 && isVNode(children)) {
6745
- children = [children];
6738
+ if (l > 3) {
6739
+ children = Array.prototype.slice.call(arguments, 2);
6740
+ } else if (l === 3 && isVNode(children)) {
6741
+ children = [children];
6742
+ }
6743
+ return createVNode(type2, propsOrChildren, children);
6746
6744
  }
6747
- return doCreateVNode(type2, propsOrChildren, children);
6745
+ } finally {
6746
+ setBlockTracking(1);
6748
6747
  }
6749
6748
  }
6750
- const version$1 = "3.5.21";
6749
+ const version$1 = "3.5.22";
6751
6750
  let policy = void 0;
6752
6751
  const tt = typeof window !== "undefined" && window.trustedTypes;
6753
6752
  if (tt) {
@@ -6953,11 +6952,11 @@
6953
6952
  const resolve2 = () => finishLeave(el, done);
6954
6953
  addTransitionClass(el, leaveFromClass);
6955
6954
  if (!el._enterCancelled) {
6956
- forceReflow();
6955
+ forceReflow(el);
6957
6956
  addTransitionClass(el, leaveActiveClass);
6958
6957
  } else {
6959
6958
  addTransitionClass(el, leaveActiveClass);
6960
- forceReflow();
6959
+ forceReflow(el);
6961
6960
  }
6962
6961
  nextFrame(() => {
6963
6962
  if (!el._isLeaving) {
@@ -7100,8 +7099,9 @@
7100
7099
  if (s === "auto") return 0;
7101
7100
  return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
7102
7101
  }
7103
- function forceReflow() {
7104
- return document.body.offsetHeight;
7102
+ function forceReflow(el) {
7103
+ const targetDocument = el ? el.ownerDocument : document;
7104
+ return targetDocument.body.offsetHeight;
7105
7105
  }
7106
7106
  function patchClass(el, value, isSVG2) {
7107
7107
  const transitionClasses = el[vtcKey];
@@ -7487,7 +7487,7 @@
7487
7487
  prevChildren.forEach(callPendingCbs);
7488
7488
  prevChildren.forEach(recordPosition);
7489
7489
  const movedChildren = prevChildren.filter(applyTranslation);
7490
- forceReflow();
7490
+ forceReflow(instance.vnode.el);
7491
7491
  movedChildren.forEach((c2) => {
7492
7492
  const el = c2.el;
7493
7493
  const style2 = el.style;
@@ -12836,6 +12836,19 @@
12836
12836
  };
12837
12837
  return safeRegexTest;
12838
12838
  }
12839
+ var generatorFunction;
12840
+ var hasRequiredGeneratorFunction;
12841
+ function requireGeneratorFunction() {
12842
+ if (hasRequiredGeneratorFunction) return generatorFunction;
12843
+ hasRequiredGeneratorFunction = 1;
12844
+ const cached = (
12845
+ /** @type {GeneratorFunctionConstructor} */
12846
+ function* () {
12847
+ }.constructor
12848
+ );
12849
+ generatorFunction = () => cached;
12850
+ return generatorFunction;
12851
+ }
12839
12852
  var isGeneratorFunction;
12840
12853
  var hasRequiredIsGeneratorFunction;
12841
12854
  function requireIsGeneratorFunction() {
@@ -12848,16 +12861,7 @@
12848
12861
  var getProto2 = requireGetProto();
12849
12862
  var toStr = callBound2("Object.prototype.toString");
12850
12863
  var fnToStr = callBound2("Function.prototype.toString");
12851
- var getGeneratorFunc = function() {
12852
- if (!hasToStringTag) {
12853
- return false;
12854
- }
12855
- try {
12856
- return Function("return function*() {}")();
12857
- } catch (e) {
12858
- }
12859
- };
12860
- var GeneratorFunction;
12864
+ var getGeneratorFunction = /* @__PURE__ */ requireGeneratorFunction();
12861
12865
  isGeneratorFunction = function isGeneratorFunction2(fn) {
12862
12866
  if (typeof fn !== "function") {
12863
12867
  return false;
@@ -12872,14 +12876,8 @@
12872
12876
  if (!getProto2) {
12873
12877
  return false;
12874
12878
  }
12875
- if (typeof GeneratorFunction === "undefined") {
12876
- var generatorFunc = getGeneratorFunc();
12877
- GeneratorFunction = generatorFunc ? (
12878
- /** @type {GeneratorFunctionConstructor} */
12879
- getProto2(generatorFunc)
12880
- ) : false;
12881
- }
12882
- return getProto2(fn) === GeneratorFunction;
12879
+ var GeneratorFunction = getGeneratorFunction();
12880
+ return GeneratorFunction && getProto2(fn) === GeneratorFunction.prototype;
12883
12881
  };
12884
12882
  return isGeneratorFunction;
12885
12883
  }
@@ -41155,7 +41153,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41155
41153
  return;
41156
41154
  }
41157
41155
  }
41158
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.21.1") {
41156
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.21.3") {
41159
41157
  const customLocation = "docProps/custom.xml";
41160
41158
  if (!docx[customLocation]) {
41161
41159
  docx[customLocation] = generateCustomXml();
@@ -41644,7 +41642,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41644
41642
  function generateCustomXml() {
41645
41643
  return DEFAULT_CUSTOM_XML;
41646
41644
  }
41647
- function generateSuperdocVersion(pid = 2, version2 = "0.21.1") {
41645
+ function generateSuperdocVersion(pid = 2, version2 = "0.21.3") {
41648
41646
  return {
41649
41647
  type: "element",
41650
41648
  name: "property",
@@ -49306,8 +49304,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
49306
49304
  let $to = parse.doc.resolveNoCache(change.endB - parse.from);
49307
49305
  let $fromA = doc2.resolve(change.start);
49308
49306
  let inlineChange = $from.sameParent($to) && $from.parent.inlineContent && $fromA.end() >= change.endA;
49309
- let nextSel;
49310
- if ((ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some((n) => n.nodeName == "DIV" || n.nodeName == "P")) || !inlineChange && $from.pos < parse.doc.content.size && (!$from.sameParent($to) || !$from.parent.inlineContent) && !/\S/.test(parse.doc.textBetween($from.pos, $to.pos, "", "")) && (nextSel = Selection.findFrom(parse.doc.resolve($from.pos + 1), 1, true)) && nextSel.head > $from.pos) && view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")))) {
49307
+ if ((ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some((n) => n.nodeName == "DIV" || n.nodeName == "P")) || !inlineChange && $from.pos < parse.doc.content.size && (!$from.sameParent($to) || !$from.parent.inlineContent) && $from.pos < $to.pos && !/\S/.test(parse.doc.textBetween($from.pos, $to.pos, "", ""))) && view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")))) {
49311
49308
  view.input.lastIOSEnter = 0;
49312
49309
  return;
49313
49310
  }
@@ -59101,7 +59098,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
59101
59098
  * @returns {Object | void} Migration results
59102
59099
  */
59103
59100
  processCollaborationMigrations() {
59104
- console.debug("[checkVersionMigrations] Current editor version", "0.21.1");
59101
+ console.debug("[checkVersionMigrations] Current editor version", "0.21.3");
59105
59102
  if (!this.options.ydoc) return;
59106
59103
  const metaMap = this.options.ydoc.getMap("meta");
59107
59104
  let docVersion = metaMap.get("version");
@@ -76942,6 +76939,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
76942
76939
  return actualBreak;
76943
76940
  }
76944
76941
  const onImageLoad = (editor) => {
76942
+ if (typeof requestAnimationFrame !== "function") return;
76945
76943
  requestAnimationFrame(() => {
76946
76944
  const newTr = editor.view.state.tr;
76947
76945
  newTr.setMeta("forceUpdatePagination", true);
@@ -110775,7 +110773,7 @@ ${style2}
110775
110773
  this.config.colors = shuffleArray(this.config.colors);
110776
110774
  this.userColorMap = /* @__PURE__ */ new Map();
110777
110775
  this.colorIndex = 0;
110778
- this.version = "0.21.1";
110776
+ this.version = "0.21.3";
110779
110777
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
110780
110778
  this.superdocId = config2.superdocId || v4();
110781
110779
  this.colors = this.config.colors;