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

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 (32) hide show
  1. package/dist/chunks/{index-BrSjd1Id.es.js → index-Bt9T0ivx.es.js} +1 -1
  2. package/dist/chunks/{index-CMBtuT02.cjs → index-C9VoBmK2.cjs} +1 -1
  3. package/dist/chunks/{index-B1MhwjTC.cjs → index-CZ7uYk9v.cjs} +2 -2
  4. package/dist/chunks/{index-SKpROzLW.es.js → index-WlcT4qSb.es.js} +2 -2
  5. package/dist/chunks/{super-editor.es-aBzjShYE.cjs → super-editor.es-D5ju1Vy3.cjs} +38 -5
  6. package/dist/chunks/{super-editor.es-B-Ph0oqq.es.js → super-editor.es-DSQJ1jVu.es.js} +38 -5
  7. package/dist/chunks/{url-CAZQTNP3.es.js → url-B8943xnh.es.js} +1 -1
  8. package/dist/chunks/{url-DuggQ5JR.cjs → url-ITkRdlXj.cjs} +1 -1
  9. package/dist/chunks/{xml-js-B7Vccv2s.cjs → xml-js-DUY8aVjn.cjs} +21 -7
  10. package/dist/chunks/{xml-js-BV-kCPOA.es.js → xml-js-O0pGoXNk.es.js} +21 -7
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-C5gjeYUR.js → converter-C_7uxiuz.js} +12 -4
  13. package/dist/super-editor/chunks/{docx-zipper-BepmAdiY.js → docx-zipper-DVTlb3Bj.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-DNTrx0IA.js → editor-BBDvpLkh.js} +28 -3
  15. package/dist/super-editor/chunks/{toolbar-CJjamz6y.js → toolbar-DFbQdspg.js} +2 -2
  16. package/dist/super-editor/converter.es.js +1 -1
  17. package/dist/super-editor/core/helpers/annotator.d.ts.map +1 -1
  18. package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
  19. package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.d.ts +3 -3
  20. package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.d.ts.map +1 -1
  21. package/dist/super-editor/docx-zipper.es.js +2 -2
  22. package/dist/super-editor/editor.es.js +3 -3
  23. package/dist/super-editor/file-zipper.es.js +1 -1
  24. package/dist/super-editor/super-editor.es.js +6 -6
  25. package/dist/super-editor/toolbar.es.js +2 -2
  26. package/dist/super-editor.cjs +1 -1
  27. package/dist/super-editor.es.js +1 -1
  28. package/dist/superdoc.cjs +5 -5
  29. package/dist/superdoc.es.js +6 -6
  30. package/dist/superdoc.umd.js +39 -6
  31. package/dist/superdoc.umd.js.map +1 -1
  32. package/package.json +1 -1
@@ -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-B-Ph0oqq.es.js";
2
- import { a, S, i, n } from "./chunks/super-editor.es-B-Ph0oqq.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-DSQJ1jVu.es.js";
2
+ import { a, S, i, n } from "./chunks/super-editor.es-DSQJ1jVu.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-SKpROzLW.es.js"
23174
+ "./chunks/index-WlcT4qSb.es.js"
23175
23175
  ).then((n2) => n2.i), https = await import(
23176
23176
  /*webpackIgnore: true*/
23177
- "./chunks/index-BrSjd1Id.es.js"
23177
+ "./chunks/index-Bt9T0ivx.es.js"
23178
23178
  ).then((n2) => n2.i), url = await import(
23179
23179
  /*webpackIgnore: true*/
23180
- "./chunks/url-CAZQTNP3.es.js"
23180
+ "./chunks/url-B8943xnh.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.2";
46573
+ this.version = "0.12.36-next.4";
46574
46574
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
46575
46575
  this.superdocId = config.superdocId || v4();
46576
46576
  this.colors = this.config.colors;
@@ -26661,7 +26661,10 @@
26661
26661
  if (Array.isArray(outputNode)) {
26662
26662
  const mapped = [];
26663
26663
  outputNode.forEach((el, index22) => {
26664
- mapped.push(...el.elements);
26664
+ el.elements.forEach((element) => {
26665
+ if (element.name === "w:pPr") return;
26666
+ mapped.push(element);
26667
+ });
26665
26668
  if (index22 < outputNode.length - 1) mapped.push({ name: "w:br", type: "element" });
26666
26669
  });
26667
26670
  mapped.unshift(carbonCopy(pPr));
@@ -29415,7 +29418,12 @@
29415
29418
  return indent;
29416
29419
  };
29417
29420
  const getParagraphSpacing = (node2, docx, styleId = "", marks = []) => {
29418
- const spacing = {};
29421
+ const spacing = {
29422
+ lineSpaceAfter: 0,
29423
+ lineSpaceBefore: 0,
29424
+ line: 0,
29425
+ lineRule: null
29426
+ };
29419
29427
  const { spacing: pDefaultSpacing = {} } = getDefaultParagraphStyle(docx, styleId);
29420
29428
  let lineSpaceAfter, lineSpaceBefore, line, lineRuleStyle;
29421
29429
  const pPr = node2.elements?.find((el) => el.name === "w:pPr");
@@ -30664,7 +30672,7 @@
30664
30672
  return;
30665
30673
  }
30666
30674
  }
30667
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.2") {
30675
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.36-next.4") {
30668
30676
  const customLocation = "docProps/custom.xml";
30669
30677
  if (!docx[customLocation]) {
30670
30678
  docx[customLocation] = generateCustomXml();
@@ -31131,7 +31139,7 @@
31131
31139
  function generateCustomXml() {
31132
31140
  return DEFAULT_CUSTOM_XML;
31133
31141
  }
31134
- function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.2") {
31142
+ function generateSuperdocVersion(pid = 2, version2 = "0.12.36-next.4") {
31135
31143
  return {
31136
31144
  type: "element",
31137
31145
  name: "property",
@@ -47604,6 +47612,31 @@
47604
47612
  (node22) => node22.type.name === "listItem"
47605
47613
  );
47606
47614
  if (!listItem) return;
47615
+ let remainingNodes = 0;
47616
+ listItem.node.descendants((node22) => {
47617
+ if (node22.type.name === "fieldAnnotation") {
47618
+ remainingNodes += 1;
47619
+ }
47620
+ });
47621
+ let matchingNodesFound = 0;
47622
+ let hasOtherNodes = false;
47623
+ listItem.node.children.forEach((child, index2) => {
47624
+ const { type: type2 } = child;
47625
+ if (type2.name !== "paragraph" && type2.name !== "fieldAnnotation") return;
47626
+ child.children.forEach((inline) => {
47627
+ const isFieldToDelete = fieldsToDelete.includes(inline.attrs.fieldId);
47628
+ const isMatchingField = inline.type.name === "fieldAnnotation" && isFieldToDelete;
47629
+ const isEmpty2 = inline.childCount === 0;
47630
+ if (!isEmpty2 && !isMatchingField) hasOtherNodes = true;
47631
+ if (isMatchingField) matchingNodesFound += 1;
47632
+ });
47633
+ });
47634
+ if (!hasOtherNodes && matchingNodesFound > 0) {
47635
+ remainingNodes -= matchingNodesFound;
47636
+ }
47637
+ if (remainingNodes > 0) {
47638
+ return;
47639
+ }
47607
47640
  let { pos, node: node2, depth } = listItem;
47608
47641
  let $pos = doc2.resolve(pos);
47609
47642
  while (depth > 0) {
@@ -48446,7 +48479,7 @@
48446
48479
  * @returns {Object | void} Migration results
48447
48480
  */
48448
48481
  processCollaborationMigrations() {
48449
- console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.2");
48482
+ console.debug("[checkVersionMigrations] Current editor version", "0.12.36-next.4");
48450
48483
  if (!this.options.ydoc) return;
48451
48484
  const metaMap = this.options.ydoc.getMap("meta");
48452
48485
  let docVersion = metaMap.get("version");
@@ -89998,7 +90031,7 @@ ${style2}
89998
90031
  this.config.colors = shuffleArray(this.config.colors);
89999
90032
  this.userColorMap = /* @__PURE__ */ new Map();
90000
90033
  this.colorIndex = 0;
90001
- this.version = "0.12.36-next.2";
90034
+ this.version = "0.12.36-next.4";
90002
90035
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
90003
90036
  this.superdocId = config.superdocId || v4();
90004
90037
  this.colors = this.config.colors;