@harbour-enterprises/superdoc 1.9.0-next.7 → 1.9.0-next.8

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.
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-De9wkgLl.cjs");
4
- const superdoc = require("./index-DpIslX8P.cjs");
5
- const index = require("./index-D_mW5sHE.cjs");
4
+ const superdoc = require("./index-C2RREn1V.cjs");
5
+ const index = require("./index-Csi-o7LB.cjs");
6
6
  function self(vars) {
7
7
  const {
8
8
  opacityDisabled,
@@ -1,6 +1,6 @@
1
1
  import { d as defineComponent, h, T as Transition, p as process$1, w as watchEffect, b as computed, r as ref, e as onMounted, f as onUnmounted, c as createElementBlock, o as openBlock, a as createBaseVNode, g as createCommentVNode, i as createVNode, u as unref } from "./vue-DI6_Tcq0.es.js";
2
- import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-CBLQj1bs.es.js";
3
- import { o as derived, p as c, q as cB, r as fadeInTransition, s as cM, w as warnOnce, u as useConfig, t as useTheme, v as pxfy, x as createKey, y as useThemeClass, z as useCompitable, B as _export_sfc } from "./index-BzLRnseZ.es.js";
2
+ import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-DKysVv9w.es.js";
3
+ import { o as derived, p as c, q as cB, r as fadeInTransition, s as cM, w as warnOnce, u as useConfig, t as useTheme, v as pxfy, x as createKey, y as useThemeClass, z as useCompitable, B as _export_sfc } from "./index-DDRJO_Xi.es.js";
4
4
  function self(vars) {
5
5
  const {
6
6
  opacityDisabled,
@@ -33575,7 +33575,7 @@ class SuperConverter {
33575
33575
  static getStoredSuperdocVersion(docx) {
33576
33576
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
33577
33577
  }
33578
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.9.0-next.7") {
33578
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.9.0-next.8") {
33579
33579
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
33580
33580
  }
33581
33581
  /**
@@ -33574,7 +33574,7 @@ class SuperConverter {
33574
33574
  static getStoredSuperdocVersion(docx) {
33575
33575
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
33576
33576
  }
33577
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.9.0-next.7") {
33577
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.9.0-next.8") {
33578
33578
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
33579
33579
  }
33580
33580
  /**
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
- const index = require("./index-D_mW5sHE.cjs");
2
+ const index = require("./index-Csi-o7LB.cjs");
3
3
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
4
4
  require("./jszip-C8_CqJxM.cjs");
5
5
  require("./helpers-C7_u3NNJ.cjs");
6
- require("./SuperConverter-BiqgDWL2.cjs");
6
+ require("./SuperConverter-C7eV0QZK.cjs");
7
7
  const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
8
8
  const vue = require("./vue-De9wkgLl.cjs");
9
9
  require("./jszip.min-BPh2MMAa.cjs");
@@ -7709,7 +7709,7 @@ const _sfc_main = {
7709
7709
  __name: "SuperDoc",
7710
7710
  emits: ["selection-update"],
7711
7711
  setup(__props, { emit: __emit }) {
7712
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-Dl-CdtHH.cjs")));
7712
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-9AVyz1uT.cjs")));
7713
7713
  const superdocStore = useSuperdocStore();
7714
7714
  const commentsStore = useCommentsStore();
7715
7715
  const {
@@ -8694,7 +8694,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
8694
8694
  this.config.colors = shuffleArray(this.config.colors);
8695
8695
  this.userColorMap = /* @__PURE__ */ new Map();
8696
8696
  this.colorIndex = 0;
8697
- this.version = "1.9.0-next.7";
8697
+ this.version = "1.9.0-next.8";
8698
8698
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
8699
8699
  this.superdocId = config.superdocId || uuid.v4();
8700
8700
  this.colors = this.config.colors;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_converter = require("./SuperConverter-BiqgDWL2.cjs");
2
+ const superEditor_converter = require("./SuperConverter-C7eV0QZK.cjs");
3
3
  const jszip = require("./jszip-C8_CqJxM.cjs");
4
4
  const helpers$1 = require("./helpers-C7_u3NNJ.cjs");
5
5
  const vue = require("./vue-De9wkgLl.cjs");
@@ -14879,6 +14879,16 @@ function findRemovedFieldAnnotations(tr) {
14879
14879
  });
14880
14880
  }
14881
14881
  });
14882
+ if (removedNodes.length) {
14883
+ const removedNodesIds = removedNodes.map((item) => item.node.attrs.fieldId);
14884
+ const found = findChildren$5(
14885
+ tr.doc,
14886
+ (node) => node.type.name === "fieldAnnotation" && removedNodesIds.includes(node.attrs.fieldId)
14887
+ );
14888
+ const foundSet = new Set(found.map((item) => item.node.attrs.fieldId));
14889
+ const removedNodesFiltered = removedNodes.filter((item) => !foundSet.has(item.node.attrs.fieldId));
14890
+ removedNodes = removedNodesFiltered;
14891
+ }
14882
14892
  return removedNodes;
14883
14893
  }
14884
14894
  function transactionDeletedAnything(tr) {
@@ -15805,7 +15815,7 @@ const canUseDOM = () => {
15805
15815
  return false;
15806
15816
  }
15807
15817
  };
15808
- const summaryVersion = "1.9.0-next.7";
15818
+ const summaryVersion = "1.9.0-next.8";
15809
15819
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
15810
15820
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
15811
15821
  function mapAttributes(attrs) {
@@ -18553,7 +18563,7 @@ class Editor extends EventEmitter {
18553
18563
  * Process collaboration migrations
18554
18564
  */
18555
18565
  processCollaborationMigrations() {
18556
- console.debug("[checkVersionMigrations] Current editor version", "1.9.0-next.7");
18566
+ console.debug("[checkVersionMigrations] Current editor version", "1.9.0-next.8");
18557
18567
  if (!this.options.ydoc) return;
18558
18568
  const metaMap = this.options.ydoc.getMap("meta");
18559
18569
  let docVersion = metaMap.get("version");
@@ -28949,9 +28959,35 @@ class DomPainter {
28949
28959
  annotation.dataset.pmEnd = String(run.pmEnd);
28950
28960
  }
28951
28961
  annotation.dataset.layoutEpoch = String(this.layoutEpoch);
28962
+ this.appendAnnotationCaretAnchor(annotation, run);
28952
28963
  this.applySdtDataset(annotation, run.sdt);
28953
28964
  return annotation;
28954
28965
  }
28966
+ /**
28967
+ * Adds a hidden DOM anchor at pmEnd so caret placement after the annotation is correct.
28968
+ */
28969
+ appendAnnotationCaretAnchor(annotation, run) {
28970
+ if (!this.doc || run.pmEnd == null) return;
28971
+ const caretAnchor = this.doc.createElement("span");
28972
+ caretAnchor.dataset.pmStart = String(run.pmEnd);
28973
+ caretAnchor.dataset.pmEnd = String(run.pmEnd);
28974
+ caretAnchor.dataset.layoutEpoch = String(this.layoutEpoch);
28975
+ caretAnchor.classList.add("annotation-caret-anchor");
28976
+ caretAnchor.style.position = "absolute";
28977
+ caretAnchor.style.left = "100%";
28978
+ caretAnchor.style.top = "0";
28979
+ caretAnchor.style.width = "0";
28980
+ caretAnchor.style.height = "1em";
28981
+ caretAnchor.style.overflow = "hidden";
28982
+ caretAnchor.style.pointerEvents = "none";
28983
+ caretAnchor.style.userSelect = "none";
28984
+ caretAnchor.style.opacity = "0";
28985
+ caretAnchor.textContent = "​";
28986
+ if (!annotation.style.position) {
28987
+ annotation.style.position = "relative";
28988
+ }
28989
+ annotation.appendChild(caretAnchor);
28990
+ }
28955
28991
  /**
28956
28992
  * Renders a single line of a paragraph block.
28957
28993
  *
@@ -31896,7 +31932,8 @@ const ATOMIC_INLINE_TYPES = /* @__PURE__ */ new Set([
31896
31932
  "tab",
31897
31933
  "footnoteReference",
31898
31934
  "passthroughInline",
31899
- "bookmarkEnd"
31935
+ "bookmarkEnd",
31936
+ "fieldAnnotation"
31900
31937
  ]);
31901
31938
  const TOKEN_INLINE_TYPES = /* @__PURE__ */ new Map([
31902
31939
  ["page-number", "pageNumber"],
@@ -61963,7 +62000,9 @@ class ParagraphNodeView {
61963
62000
  nodeViewMap.set(this.node, this);
61964
62001
  superEditor_converter.calculateResolvedParagraphProperties(this.editor, this.node, this.editor.state.doc.resolve(this.getPos()));
61965
62002
  this.dom = document.createElement("p");
61966
- this.contentDOM = document.createElement("span");
62003
+ const contentEl = document.createElement("span");
62004
+ contentEl.classList.add("sd-paragraph-content");
62005
+ this.contentDOM = contentEl;
61967
62006
  this.dom.appendChild(this.contentDOM);
61968
62007
  if (this.#checkIsList()) {
61969
62008
  this.#initList(node.attrs.listRendering);
@@ -62469,6 +62508,37 @@ function createNumberingPlugin(editor) {
62469
62508
  }
62470
62509
  });
62471
62510
  }
62511
+ const shouldAddLeadingCaret = (node) => {
62512
+ if (node.type.name !== "paragraph") return false;
62513
+ if (node.childCount === 0) return false;
62514
+ const first2 = node.child(0);
62515
+ if (first2.type.name === "fieldAnnotation") return true;
62516
+ if (first2.type.name !== "run") return false;
62517
+ if (first2.childCount === 0) return false;
62518
+ return first2.child(0).type.name === "fieldAnnotation";
62519
+ };
62520
+ function createLeadingCaretPlugin() {
62521
+ const leadingCaretPlugin = new superEditor_converter.Plugin({
62522
+ props: {
62523
+ decorations(state) {
62524
+ if (typeof document === "undefined") return null;
62525
+ const decorations = [];
62526
+ state.doc.descendants((node, pos) => {
62527
+ if (!shouldAddLeadingCaret(node)) return true;
62528
+ const widgetPos = pos + 1;
62529
+ const deco = Decoration.widget(widgetPos, () => document.createTextNode("​"), {
62530
+ key: `sd-leading-caret-${pos}`,
62531
+ side: -1
62532
+ });
62533
+ decorations.push(deco);
62534
+ return false;
62535
+ });
62536
+ return decorations.length ? DecorationSet.create(state.doc, decorations) : null;
62537
+ }
62538
+ }
62539
+ });
62540
+ return leadingCaretPlugin;
62541
+ }
62472
62542
  function createDropcapPlugin(editor) {
62473
62543
  const { view } = editor;
62474
62544
  const dropcapWidthCache = /* @__PURE__ */ new Map();
@@ -62845,7 +62915,7 @@ const Paragraph = OxmlNode.create({
62845
62915
  }
62846
62916
  }
62847
62917
  });
62848
- return [dropcapPlugin, numberingPlugin, listEmptyInputPlugin];
62918
+ return [dropcapPlugin, numberingPlugin, listEmptyInputPlugin, createLeadingCaretPlugin()];
62849
62919
  }
62850
62920
  });
62851
62921
  const Heading = Extension.create({
@@ -1,4 +1,4 @@
1
- import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, F as Fragment, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName, O as TrackInsertMarkName, Q as TrackFormatMarkName, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as resolveParagraphProperties, a0 as resolveDocxFontFamily, a1 as _getReferencedTableStyles, a2 as decodeRPrFromMarks, a3 as calculateResolvedParagraphProperties, a4 as encodeCSSFromPPr, a5 as encodeCSSFromRPr, a6 as generateOrderedListIndex, a7 as docxNumberingHelpers, a8 as InputRule, a9 as insertNewRelationship, aa as kebabCase$1, ab as getUnderlineCssString } from "./SuperConverter-CP-qo1gS.es.js";
1
+ import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, F as Fragment, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName, O as TrackInsertMarkName, Q as TrackFormatMarkName, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as resolveParagraphProperties, a0 as resolveDocxFontFamily, a1 as _getReferencedTableStyles, a2 as decodeRPrFromMarks, a3 as calculateResolvedParagraphProperties, a4 as encodeCSSFromPPr, a5 as encodeCSSFromRPr, a6 as generateOrderedListIndex, a7 as docxNumberingHelpers, a8 as InputRule, a9 as insertNewRelationship, aa as kebabCase$1, ab as getUnderlineCssString } from "./SuperConverter-DJ6a6-Fz.es.js";
2
2
  import { B as Buffer$2 } from "./jszip-BjHgpFjf.es.js";
3
3
  import { j as twipsToInches, m as inchesToTwips, p as ptToTwips, d as linesToTwips, f as twipsToLines, k as pixelsToTwips, z as resolveOpcTargetPath, C as getArrayBufferFromUrl, h as halfPointToPoints, c as twipsToPixels$2, D as convertSizeToCSS, E as inchesToPixels } from "./helpers-BsvIMOxu.es.js";
4
4
  import { p as process$1, r as ref, J as global$1, b as computed, c as createElementBlock, F as Fragment$1, U as renderList, P as withModifiers, o as openBlock, Q as normalizeClass, g as createCommentVNode, L as toDisplayString, a as createBaseVNode, V as createApp, e as onMounted, f as onUnmounted, S as withDirectives, u as unref, Y as vModelText, E as nextTick, N as normalizeStyle, C as watch, Z as withKeys, _ as createTextVNode, i as createVNode, h as h$1, $ as readonly, B as getCurrentInstance, l as onBeforeUnmount, s as reactive, m as onBeforeMount, j as inject, a0 as onActivated, a1 as onDeactivated, a2 as Comment, d as defineComponent, k as provide, q as Teleport, t as toRef, a3 as renderSlot, a4 as isVNode, K as shallowRef, w as watchEffect, T as Transition, a5 as mergeProps, a6 as vShow, a7 as cloneVNode, a8 as Text$2, x as markRaw, O as createBlock, M as withCtx, a9 as useCssVars, W as resolveDynamicComponent, aa as normalizeProps, ab as guardReactiveProps } from "./vue-DI6_Tcq0.es.js";
@@ -14862,6 +14862,16 @@ function findRemovedFieldAnnotations(tr) {
14862
14862
  });
14863
14863
  }
14864
14864
  });
14865
+ if (removedNodes.length) {
14866
+ const removedNodesIds = removedNodes.map((item) => item.node.attrs.fieldId);
14867
+ const found = findChildren$5(
14868
+ tr.doc,
14869
+ (node) => node.type.name === "fieldAnnotation" && removedNodesIds.includes(node.attrs.fieldId)
14870
+ );
14871
+ const foundSet = new Set(found.map((item) => item.node.attrs.fieldId));
14872
+ const removedNodesFiltered = removedNodes.filter((item) => !foundSet.has(item.node.attrs.fieldId));
14873
+ removedNodes = removedNodesFiltered;
14874
+ }
14865
14875
  return removedNodes;
14866
14876
  }
14867
14877
  function transactionDeletedAnything(tr) {
@@ -15788,7 +15798,7 @@ const canUseDOM = () => {
15788
15798
  return false;
15789
15799
  }
15790
15800
  };
15791
- const summaryVersion = "1.9.0-next.7";
15801
+ const summaryVersion = "1.9.0-next.8";
15792
15802
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
15793
15803
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
15794
15804
  function mapAttributes(attrs) {
@@ -18536,7 +18546,7 @@ class Editor extends EventEmitter {
18536
18546
  * Process collaboration migrations
18537
18547
  */
18538
18548
  processCollaborationMigrations() {
18539
- console.debug("[checkVersionMigrations] Current editor version", "1.9.0-next.7");
18549
+ console.debug("[checkVersionMigrations] Current editor version", "1.9.0-next.8");
18540
18550
  if (!this.options.ydoc) return;
18541
18551
  const metaMap = this.options.ydoc.getMap("meta");
18542
18552
  let docVersion = metaMap.get("version");
@@ -28932,9 +28942,35 @@ class DomPainter {
28932
28942
  annotation.dataset.pmEnd = String(run.pmEnd);
28933
28943
  }
28934
28944
  annotation.dataset.layoutEpoch = String(this.layoutEpoch);
28945
+ this.appendAnnotationCaretAnchor(annotation, run);
28935
28946
  this.applySdtDataset(annotation, run.sdt);
28936
28947
  return annotation;
28937
28948
  }
28949
+ /**
28950
+ * Adds a hidden DOM anchor at pmEnd so caret placement after the annotation is correct.
28951
+ */
28952
+ appendAnnotationCaretAnchor(annotation, run) {
28953
+ if (!this.doc || run.pmEnd == null) return;
28954
+ const caretAnchor = this.doc.createElement("span");
28955
+ caretAnchor.dataset.pmStart = String(run.pmEnd);
28956
+ caretAnchor.dataset.pmEnd = String(run.pmEnd);
28957
+ caretAnchor.dataset.layoutEpoch = String(this.layoutEpoch);
28958
+ caretAnchor.classList.add("annotation-caret-anchor");
28959
+ caretAnchor.style.position = "absolute";
28960
+ caretAnchor.style.left = "100%";
28961
+ caretAnchor.style.top = "0";
28962
+ caretAnchor.style.width = "0";
28963
+ caretAnchor.style.height = "1em";
28964
+ caretAnchor.style.overflow = "hidden";
28965
+ caretAnchor.style.pointerEvents = "none";
28966
+ caretAnchor.style.userSelect = "none";
28967
+ caretAnchor.style.opacity = "0";
28968
+ caretAnchor.textContent = "​";
28969
+ if (!annotation.style.position) {
28970
+ annotation.style.position = "relative";
28971
+ }
28972
+ annotation.appendChild(caretAnchor);
28973
+ }
28938
28974
  /**
28939
28975
  * Renders a single line of a paragraph block.
28940
28976
  *
@@ -31879,7 +31915,8 @@ const ATOMIC_INLINE_TYPES = /* @__PURE__ */ new Set([
31879
31915
  "tab",
31880
31916
  "footnoteReference",
31881
31917
  "passthroughInline",
31882
- "bookmarkEnd"
31918
+ "bookmarkEnd",
31919
+ "fieldAnnotation"
31883
31920
  ]);
31884
31921
  const TOKEN_INLINE_TYPES = /* @__PURE__ */ new Map([
31885
31922
  ["page-number", "pageNumber"],
@@ -61946,7 +61983,9 @@ class ParagraphNodeView {
61946
61983
  nodeViewMap.set(this.node, this);
61947
61984
  calculateResolvedParagraphProperties(this.editor, this.node, this.editor.state.doc.resolve(this.getPos()));
61948
61985
  this.dom = document.createElement("p");
61949
- this.contentDOM = document.createElement("span");
61986
+ const contentEl = document.createElement("span");
61987
+ contentEl.classList.add("sd-paragraph-content");
61988
+ this.contentDOM = contentEl;
61950
61989
  this.dom.appendChild(this.contentDOM);
61951
61990
  if (this.#checkIsList()) {
61952
61991
  this.#initList(node.attrs.listRendering);
@@ -62452,6 +62491,37 @@ function createNumberingPlugin(editor) {
62452
62491
  }
62453
62492
  });
62454
62493
  }
62494
+ const shouldAddLeadingCaret = (node) => {
62495
+ if (node.type.name !== "paragraph") return false;
62496
+ if (node.childCount === 0) return false;
62497
+ const first2 = node.child(0);
62498
+ if (first2.type.name === "fieldAnnotation") return true;
62499
+ if (first2.type.name !== "run") return false;
62500
+ if (first2.childCount === 0) return false;
62501
+ return first2.child(0).type.name === "fieldAnnotation";
62502
+ };
62503
+ function createLeadingCaretPlugin() {
62504
+ const leadingCaretPlugin = new Plugin({
62505
+ props: {
62506
+ decorations(state) {
62507
+ if (typeof document === "undefined") return null;
62508
+ const decorations = [];
62509
+ state.doc.descendants((node, pos) => {
62510
+ if (!shouldAddLeadingCaret(node)) return true;
62511
+ const widgetPos = pos + 1;
62512
+ const deco = Decoration.widget(widgetPos, () => document.createTextNode("​"), {
62513
+ key: `sd-leading-caret-${pos}`,
62514
+ side: -1
62515
+ });
62516
+ decorations.push(deco);
62517
+ return false;
62518
+ });
62519
+ return decorations.length ? DecorationSet.create(state.doc, decorations) : null;
62520
+ }
62521
+ }
62522
+ });
62523
+ return leadingCaretPlugin;
62524
+ }
62455
62525
  function createDropcapPlugin(editor) {
62456
62526
  const { view } = editor;
62457
62527
  const dropcapWidthCache = /* @__PURE__ */ new Map();
@@ -62828,7 +62898,7 @@ const Paragraph = OxmlNode.create({
62828
62898
  }
62829
62899
  }
62830
62900
  });
62831
- return [dropcapPlugin, numberingPlugin, listEmptyInputPlugin];
62901
+ return [dropcapPlugin, numberingPlugin, listEmptyInputPlugin, createLeadingCaretPlugin()];
62832
62902
  }
62833
62903
  });
62834
62904
  const Heading = Extension.create({
@@ -1,8 +1,8 @@
1
- import { D as BIT8, F as MAX_SAFE_INTEGER, G as create, H as BITS7, I as utf8TextDecoder, J as create$1, K as setIfUndefined, L as create$2, O as from, Q as floor$1, R as equalityDeep, U as writeVarUint, V as writeVarString, W as toUint8Array, X as createEncoder, Y as createInjectionKey, Z as toString, $ as throwError, a0 as useSsrAdapter, a1 as configProviderInjectionKey, a2 as cssrAnchorMetaName, a3 as globalStyle, q as cB, p as c, a4 as isMounted, a5 as commonVariables$2, s as cM, a6 as cNotM, a7 as cE, o as derived, a8 as changeColor, a9 as insideModal, aa as insidePopover, ab as resolveWrappedSlot, ac as on, w as warnOnce, u as useConfig, ad as useMergedState, ae as useMemo, t as useTheme, af as useRtl, x as createKey, y as useThemeClass, ag as createId, ah as call, ai as render, aj as messageProviderInjectionKey, ak as messageApiInjectionKey, j as getStarterExtensions, k as getRichTextExtensions, E as Editor, al as fromBase64, am as onChange, an as varStorage, ao as toBase64, ap as createUint8ArrayFromArrayBuffer, aq as offChange, ar as writeVarUint8Array, as as map, at as length, au as isNode, av as min, aw as pow, ax as comments_module_events, ay as getFileObject, az as getTrackChanges, C as CommentsPluginKey, n as TrackChangesBasePluginKey, aA as ellipsisVerticalSvg, aB as xmarkIconSvg, aC as checkIconSvg, aD as caretDownIconSvg, aE as commentIconSvg, B as _export_sfc, aF as NDropdown, b as SuperInput, aG as vClickOutside, P as PresentationEditor, a as SuperEditor, A as AIWriter, aH as NConfigProvider, S as SuperToolbar } from "./index-BzLRnseZ.es.js";
1
+ import { D as BIT8, F as MAX_SAFE_INTEGER, G as create, H as BITS7, I as utf8TextDecoder, J as create$1, K as setIfUndefined, L as create$2, O as from, Q as floor$1, R as equalityDeep, U as writeVarUint, V as writeVarString, W as toUint8Array, X as createEncoder, Y as createInjectionKey, Z as toString, $ as throwError, a0 as useSsrAdapter, a1 as configProviderInjectionKey, a2 as cssrAnchorMetaName, a3 as globalStyle, q as cB, p as c, a4 as isMounted, a5 as commonVariables$2, s as cM, a6 as cNotM, a7 as cE, o as derived, a8 as changeColor, a9 as insideModal, aa as insidePopover, ab as resolveWrappedSlot, ac as on, w as warnOnce, u as useConfig, ad as useMergedState, ae as useMemo, t as useTheme, af as useRtl, x as createKey, y as useThemeClass, ag as createId, ah as call, ai as render, aj as messageProviderInjectionKey, ak as messageApiInjectionKey, j as getStarterExtensions, k as getRichTextExtensions, E as Editor, al as fromBase64, am as onChange, an as varStorage, ao as toBase64, ap as createUint8ArrayFromArrayBuffer, aq as offChange, ar as writeVarUint8Array, as as map, at as length, au as isNode, av as min, aw as pow, ax as comments_module_events, ay as getFileObject, az as getTrackChanges, C as CommentsPluginKey, n as TrackChangesBasePluginKey, aA as ellipsisVerticalSvg, aB as xmarkIconSvg, aC as checkIconSvg, aD as caretDownIconSvg, aE as commentIconSvg, B as _export_sfc, aF as NDropdown, b as SuperInput, aG as vClickOutside, P as PresentationEditor, a as SuperEditor, A as AIWriter, aH as NConfigProvider, S as SuperToolbar } from "./index-DDRJO_Xi.es.js";
2
2
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
3
3
  import "./jszip-BjHgpFjf.es.js";
4
4
  import "./helpers-BsvIMOxu.es.js";
5
- import "./SuperConverter-CP-qo1gS.es.js";
5
+ import "./SuperConverter-DJ6a6-Fz.es.js";
6
6
  import { E as EventEmitter } from "./eventemitter3-B9iqx_uA.es.js";
7
7
  import { j as inject, k as provide, b as computed, l as onBeforeUnmount, p as process$1, m as onBeforeMount, d as defineComponent, h, t as toRef, T as Transition, n as TransitionGroup, w as watchEffect, r as ref, e as onMounted, q as Teleport, F as Fragment, s as reactive, v as effectScope, x as markRaw, y as toRaw, z as isRef, A as isReactive, B as getCurrentInstance, C as watch, u as unref, D as hasInjectionContext, E as nextTick, G as getCurrentScope, H as onScopeDispose, I as toRefs, J as global, K as shallowRef, c as createElementBlock, o as openBlock, L as toDisplayString, i as createVNode, M as withCtx, a as createBaseVNode, N as normalizeStyle, g as createCommentVNode, O as createBlock, P as withModifiers, Q as normalizeClass, R as resolveDirective, S as withDirectives, U as renderList, V as createApp, W as resolveDynamicComponent, X as defineAsyncComponent } from "./vue-DI6_Tcq0.es.js";
8
8
  import "./jszip.min-BWx74pG_.es.js";
@@ -7692,7 +7692,7 @@ const _sfc_main = {
7692
7692
  __name: "SuperDoc",
7693
7693
  emits: ["selection-update"],
7694
7694
  setup(__props, { emit: __emit }) {
7695
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-Cp5pTd_t.es.js"));
7695
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-AEjGhT7a.es.js"));
7696
7696
  const superdocStore = useSuperdocStore();
7697
7697
  const commentsStore = useCommentsStore();
7698
7698
  const {
@@ -8677,7 +8677,7 @@ class SuperDoc extends EventEmitter {
8677
8677
  this.config.colors = shuffleArray(this.config.colors);
8678
8678
  this.userColorMap = /* @__PURE__ */ new Map();
8679
8679
  this.colorIndex = 0;
8680
- this.version = "1.9.0-next.7";
8680
+ this.version = "1.9.0-next.8";
8681
8681
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
8682
8682
  this.superdocId = config.superdocId || v4();
8683
8683
  this.colors = this.config.colors;
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("../chunks/jszip-C8_CqJxM.cjs");
4
4
  require("../chunks/helpers-C7_u3NNJ.cjs");
5
- const superEditor_converter = require("../chunks/SuperConverter-BiqgDWL2.cjs");
5
+ const superEditor_converter = require("../chunks/SuperConverter-C7eV0QZK.cjs");
6
6
  require("../chunks/uuid-R7L08bOx.cjs");
7
7
  exports.SuperConverter = superEditor_converter.SuperConverter;
@@ -1,6 +1,6 @@
1
1
  import "../chunks/jszip-BjHgpFjf.es.js";
2
2
  import "../chunks/helpers-BsvIMOxu.es.js";
3
- import { S } from "../chunks/SuperConverter-CP-qo1gS.es.js";
3
+ import { S } from "../chunks/SuperConverter-DJ6a6-Fz.es.js";
4
4
  import "../chunks/uuid-CjlX8hrF.es.js";
5
5
  export {
6
6
  S as SuperConverter
@@ -1,3 +1,3 @@
1
- export const testSchema: Schema<"text" | "doc" | "paragraph" | "tab" | "orderedList" | "bulletList" | "listItem", never>;
1
+ export const testSchema: Schema<"text" | "doc" | "paragraph" | "tab" | "listItem" | "orderedList" | "bulletList", never>;
2
2
  import { Schema } from 'prosemirror-model';
3
3
  //# sourceMappingURL=test-schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"findRemovedFieldAnnotations.d.ts","sourceRoot":"","sources":["../../../../src/extensions/field-annotation/fieldAnnotationHelpers/findRemovedFieldAnnotations.js"],"names":[],"mappings":"AAEA,4DAmCC"}
1
+ {"version":3,"file":"findRemovedFieldAnnotations.d.ts","sourceRoot":"","sources":["../../../../src/extensions/field-annotation/fieldAnnotationHelpers/findRemovedFieldAnnotations.js"],"names":[],"mappings":"AAGA,4DA8CC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ParagraphNodeView.d.ts","sourceRoot":"","sources":["../../../src/extensions/paragraph/ParagraphNodeView.js"],"names":[],"mappings":"AAaA;;;;GAIG;AACH;IACE;;;;;;OAMG;IACH,kBANW,OAAO,mBAAmB,EAAE,IAAI,UAChC,OAAO,mBAAmB,EAAE,MAAM,UAClC,MAAM,MAAM,eACZ,OAAO,kBAAkB,EAAE,UAAU,EAAE,kBACvC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EA4BjC;IAzBC,uCAAgB;IAChB,wCAAoB;IACpB,cAPe,MAAM,CAOD;IACpB,qDAA8B;IAC9B,wCAAoC;IACpC,4BAAkC;IAClC,uBAA4B;IAK5B,0BAAsC;IACtC,4BAAgD;IAelD;;;;;;OAMG;IACH,aANW,OAAO,mBAAmB,EAAE,IAAI,eAChC,OAAO,kBAAkB,EAAE,UAAU,EAAE,oBACvC,OAAO,kBAAkB,EAAE,UAAU,EAAE,gBACvC,OAAO,GACL,OAAO,CAiCnB;IAtBC,0DAAwC;IAwK1C;;OAEG;IACH,yBAFW,cAAc,WA+BxB;IAmBG,wBAA4C;IAe1C,kCAA+C;IA+LrD,gBAKC;;CACF"}
1
+ {"version":3,"file":"ParagraphNodeView.d.ts","sourceRoot":"","sources":["../../../src/extensions/paragraph/ParagraphNodeView.js"],"names":[],"mappings":"AAaA;;;;GAIG;AACH;IACE;;;;;;OAMG;IACH,kBANW,OAAO,mBAAmB,EAAE,IAAI,UAChC,OAAO,mBAAmB,EAAE,MAAM,UAClC,MAAM,MAAM,eACZ,OAAO,kBAAkB,EAAE,UAAU,EAAE,kBACvC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EA+BjC;IA5BC,uCAAgB;IAChB,wCAAoB;IACpB,cAPe,MAAM,CAOD;IACpB,qDAA8B;IAC9B,wCAAoC;IACpC,4BAAkC;IAClC,uBAA4B;IAK5B,0BAAsC;IAItC,4BAA2B;IAe7B;;;;;;OAMG;IACH,aANW,OAAO,mBAAmB,EAAE,IAAI,eAChC,OAAO,kBAAkB,EAAE,UAAU,EAAE,oBACvC,OAAO,kBAAkB,EAAE,UAAU,EAAE,gBACvC,OAAO,GACL,OAAO,CAiCnB;IAtBC,0DAAwC;IAwK1C;;OAEG;IACH,yBAFW,cAAc,WA+BxB;IAmBG,wBAA4C;IAe1C,kCAA+C;IA+LrD,gBAKC;;CACF"}
@@ -0,0 +1,3 @@
1
+ export function createLeadingCaretPlugin(): Plugin<any>;
2
+ import { Plugin } from 'prosemirror-state';
3
+ //# sourceMappingURL=leadingCaretPlugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leadingCaretPlugin.d.ts","sourceRoot":"","sources":["../../../src/extensions/paragraph/leadingCaretPlugin.js"],"names":[],"mappings":"AAaA,wDAqBC;uBAlCsB,mBAAmB"}
@@ -1 +1 @@
1
- {"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../src/extensions/paragraph/paragraph.js"],"names":[],"mappings":"AA4BA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;GAIG;AACH,wGAgQG;;;;;;;;;yBA/TiC,gBAAgB"}
1
+ {"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../src/extensions/paragraph/paragraph.js"],"names":[],"mappings":"AA6BA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;GAIG;AACH,wGAgQG;;;;;;;;;yBAhUiC,gBAAgB"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-D_mW5sHE.cjs");
3
+ const index = require("./chunks/index-Csi-o7LB.cjs");
4
4
  const superEditor_docxZipper = require("./super-editor/docx-zipper.cjs");
5
5
  const superEditor_fileZipper = require("./super-editor/file-zipper.cjs");
6
6
  const vue = require("./chunks/vue-De9wkgLl.cjs");
7
- const superEditor_converter = require("./chunks/SuperConverter-BiqgDWL2.cjs");
7
+ const superEditor_converter = require("./chunks/SuperConverter-C7eV0QZK.cjs");
8
8
  function isNodeType(node, name) {
9
9
  return node.type.name === name;
10
10
  }
@@ -1,9 +1,9 @@
1
- import { N as Node, M as Mark } from "./chunks/index-BzLRnseZ.es.js";
2
- import { A, d, C, E, m, P, e, _, a, b, S, T, n, i, f, l, g, k, j, h, c } from "./chunks/index-BzLRnseZ.es.js";
1
+ import { N as Node, M as Mark } from "./chunks/index-DDRJO_Xi.es.js";
2
+ import { A, d, C, E, m, P, e, _, a, b, S, T, n, i, f, l, g, k, j, h, c } from "./chunks/index-DDRJO_Xi.es.js";
3
3
  import { default as default2 } from "./super-editor/docx-zipper.es.js";
4
4
  import { createZip } from "./super-editor/file-zipper.es.js";
5
5
  import { d as defineComponent, c as createElementBlock, o as openBlock, a as createBaseVNode } from "./chunks/vue-DI6_Tcq0.es.js";
6
- import { S as S2, r } from "./chunks/SuperConverter-CP-qo1gS.es.js";
6
+ import { S as S2, r } from "./chunks/SuperConverter-DJ6a6-Fz.es.js";
7
7
  function isNodeType(node, name) {
8
8
  return node.type.name === name;
9
9
  }
package/dist/superdoc.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-D_mW5sHE.cjs");
4
- const superdoc = require("./chunks/index-DpIslX8P.cjs");
3
+ const index = require("./chunks/index-Csi-o7LB.cjs");
4
+ const superdoc = require("./chunks/index-C2RREn1V.cjs");
5
5
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
6
- const superEditor_converter = require("./chunks/SuperConverter-BiqgDWL2.cjs");
6
+ const superEditor_converter = require("./chunks/SuperConverter-C7eV0QZK.cjs");
7
7
  require("./chunks/jszip-C8_CqJxM.cjs");
8
8
  require("./chunks/helpers-C7_u3NNJ.cjs");
9
9
  require("./chunks/jszip.min-BPh2MMAa.cjs");
@@ -1,7 +1,7 @@
1
- import { d, E, m, e, i, ay, k, h, c } from "./chunks/index-BzLRnseZ.es.js";
2
- import { D, H, P, S, c as c2, g } from "./chunks/index-CBLQj1bs.es.js";
1
+ import { d, E, m, e, i, ay, k, h, c } from "./chunks/index-DDRJO_Xi.es.js";
2
+ import { D, H, P, S, c as c2, g } from "./chunks/index-DKysVv9w.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
- import { S as S2, r } from "./chunks/SuperConverter-CP-qo1gS.es.js";
4
+ import { S as S2, r } from "./chunks/SuperConverter-DJ6a6-Fz.es.js";
5
5
  import "./chunks/jszip-BjHgpFjf.es.js";
6
6
  import "./chunks/helpers-BsvIMOxu.es.js";
7
7
  import "./chunks/jszip.min-BWx74pG_.es.js";