@harbour-enterprises/superdoc 0.15.6-next.2 → 0.15.6-next.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.
@@ -21033,9 +21033,7 @@ function getAbstractNumIdByNumId(numId, docx) {
21033
21033
  const { elements } = numbering;
21034
21034
  const listData = elements[0];
21035
21035
  const numberingElements = listData.elements || [];
21036
- const numDef = numberingElements.find(
21037
- (el) => el.name === "w:num" && el.attributes?.["w:numId"] === numId
21038
- );
21036
+ const numDef = numberingElements.find((el) => el.name === "w:num" && el.attributes?.["w:numId"] === numId);
21039
21037
  if (!numDef) return null;
21040
21038
  const abstractNumIdRef = numDef.elements?.find((el) => el.name === "w:abstractNumId");
21041
21039
  return abstractNumIdRef?.attributes?.["w:val"];
@@ -25668,17 +25666,27 @@ function translateList(params2) {
25668
25666
  }
25669
25667
  const collapsedParagraphNode = convertMultipleListItemsIntoSingleNode(listItem);
25670
25668
  let outputNode = exportSchemaToJson({ ...params2, node: collapsedParagraphNode });
25669
+ if (!outputNode) {
25670
+ console.warn("translateList: exportSchemaToJson returned null/undefined");
25671
+ return [
25672
+ {
25673
+ name: "w:p",
25674
+ elements: [
25675
+ { name: "w:pPr", elements: numPrTag ? [numPrTag] : [] },
25676
+ { name: "w:r", elements: [{ name: "w:t", elements: [{ text: "", type: "text" }] }] }
25677
+ ]
25678
+ }
25679
+ ];
25680
+ }
25671
25681
  let nodesToFlatten = [];
25672
25682
  if (Array.isArray(outputNode) && params2.isFinalDoc) {
25673
25683
  const parsedElements = [];
25674
25684
  outputNode?.forEach((node3, index2) => {
25675
25685
  if (node3?.elements) {
25676
- const runs = node3.elements?.filter((n) => n.name === "w:r");
25686
+ const runs = node3.elements?.filter((n) => n.name === "w:r") || [];
25677
25687
  parsedElements.push(...runs);
25678
25688
  if (node3.name === "w:p" && index2 < outputNode.length - 1) {
25679
- parsedElements.push({
25680
- name: "w:br"
25681
- });
25689
+ parsedElements.push({ name: "w:br" });
25682
25690
  }
25683
25691
  }
25684
25692
  });
@@ -25687,39 +25695,41 @@ function translateList(params2) {
25687
25695
  elements: [{ name: "w:pPr", elements: [] }, ...parsedElements]
25688
25696
  };
25689
25697
  }
25690
- const sdtNodes = outputNode.elements?.filter((n) => n.name === "w:sdt");
25691
- if (sdtNodes && sdtNodes.length > 0) {
25698
+ const sdtNodes = outputNode?.elements?.filter((n) => n.name === "w:sdt") || [];
25699
+ if (sdtNodes.length > 0) {
25692
25700
  nodesToFlatten = sdtNodes;
25693
25701
  nodesToFlatten?.forEach((sdtNode) => {
25694
- const sdtContent = sdtNode.elements.find((n) => n.name === "w:sdtContent");
25695
- if (sdtContent && sdtContent.elements) {
25702
+ const sdtContent = sdtNode.elements?.find((n) => n.name === "w:sdtContent");
25703
+ if (sdtContent?.elements) {
25696
25704
  const parsedElements = [];
25697
25705
  sdtContent.elements.forEach((element, index2) => {
25698
- const runs = element.elements?.filter((n) => n.name === "w:r");
25706
+ const runs = element.elements?.filter((n) => n.name === "w:r") || [];
25699
25707
  parsedElements.push(...runs);
25700
25708
  if (element.name === "w:p" && index2 < sdtContent.elements.length - 1) {
25701
- parsedElements.push({
25702
- name: "w:br"
25703
- });
25709
+ parsedElements.push({ name: "w:br" });
25704
25710
  }
25705
25711
  });
25706
25712
  sdtContent.elements = parsedElements;
25707
25713
  }
25708
25714
  });
25709
25715
  }
25710
- const pPr = outputNode.elements?.find((n) => n.name === "w:pPr");
25711
- if (pPr && pPr.elements && numPrTag) {
25716
+ const pPr = outputNode?.elements?.find((n) => n.name === "w:pPr");
25717
+ if (pPr?.elements && numPrTag) {
25712
25718
  pPr.elements.unshift(numPrTag);
25713
25719
  }
25714
25720
  const indentTag = restoreIndent(listItem.attrs.indent);
25715
- indentTag && pPr?.elements?.push(indentTag);
25716
- const runNode = outputNode.elements?.find((n) => n.name === "w:r");
25721
+ if (indentTag && pPr?.elements) {
25722
+ pPr.elements.push(indentTag);
25723
+ }
25724
+ const runNode = outputNode?.elements?.find((n) => n.name === "w:r");
25717
25725
  const rPr = runNode?.elements?.find((n) => n.name === "w:rPr");
25718
- if (rPr) pPr.elements.push(rPr);
25726
+ if (rPr && pPr?.elements) {
25727
+ pPr.elements.push(rPr);
25728
+ }
25719
25729
  if (listItem.attrs.numPrType !== "inline") {
25720
25730
  const numPrIndex = pPr?.elements?.findIndex((e) => e?.name === "w:numPr");
25721
- if (numPrIndex !== -1) {
25722
- pPr?.elements?.splice(numPrIndex, 1);
25731
+ if (numPrIndex !== -1 && pPr?.elements) {
25732
+ pPr.elements.splice(numPrIndex, 1);
25723
25733
  }
25724
25734
  }
25725
25735
  return [outputNode];
@@ -28783,7 +28793,7 @@ const _SuperConverter = class _SuperConverter2 {
28783
28793
  return;
28784
28794
  }
28785
28795
  }
28786
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.15.6-next.2") {
28796
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.15.6-next.3") {
28787
28797
  const customLocation = "docProps/custom.xml";
28788
28798
  if (!docx[customLocation]) {
28789
28799
  docx[customLocation] = generateCustomXml();
@@ -29262,7 +29272,7 @@ function storeSuperdocVersion(docx) {
29262
29272
  function generateCustomXml() {
29263
29273
  return DEFAULT_CUSTOM_XML;
29264
29274
  }
29265
- function generateSuperdocVersion(pid = 2, version2 = "0.15.6-next.2") {
29275
+ function generateSuperdocVersion(pid = 2, version2 = "0.15.6-next.3") {
29266
29276
  return {
29267
29277
  type: "element",
29268
29278
  name: "property",
@@ -45385,7 +45395,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
45385
45395
  * @returns {Object | void} Migration results
45386
45396
  */
45387
45397
  processCollaborationMigrations() {
45388
- console.debug("[checkVersionMigrations] Current editor version", "0.15.6-next.2");
45398
+ console.debug("[checkVersionMigrations] Current editor version", "0.15.6-next.3");
45389
45399
  if (!this.options.ydoc) return;
45390
45400
  const metaMap = this.options.ydoc.getMap("meta");
45391
45401
  let docVersion = metaMap.get("version");
@@ -21050,9 +21050,7 @@ function getAbstractNumIdByNumId(numId, docx) {
21050
21050
  const { elements } = numbering;
21051
21051
  const listData = elements[0];
21052
21052
  const numberingElements = listData.elements || [];
21053
- const numDef = numberingElements.find(
21054
- (el) => el.name === "w:num" && el.attributes?.["w:numId"] === numId
21055
- );
21053
+ const numDef = numberingElements.find((el) => el.name === "w:num" && el.attributes?.["w:numId"] === numId);
21056
21054
  if (!numDef) return null;
21057
21055
  const abstractNumIdRef = numDef.elements?.find((el) => el.name === "w:abstractNumId");
21058
21056
  return abstractNumIdRef?.attributes?.["w:val"];
@@ -25685,17 +25683,27 @@ function translateList(params2) {
25685
25683
  }
25686
25684
  const collapsedParagraphNode = convertMultipleListItemsIntoSingleNode(listItem);
25687
25685
  let outputNode = exportSchemaToJson({ ...params2, node: collapsedParagraphNode });
25686
+ if (!outputNode) {
25687
+ console.warn("translateList: exportSchemaToJson returned null/undefined");
25688
+ return [
25689
+ {
25690
+ name: "w:p",
25691
+ elements: [
25692
+ { name: "w:pPr", elements: numPrTag ? [numPrTag] : [] },
25693
+ { name: "w:r", elements: [{ name: "w:t", elements: [{ text: "", type: "text" }] }] }
25694
+ ]
25695
+ }
25696
+ ];
25697
+ }
25688
25698
  let nodesToFlatten = [];
25689
25699
  if (Array.isArray(outputNode) && params2.isFinalDoc) {
25690
25700
  const parsedElements = [];
25691
25701
  outputNode?.forEach((node3, index2) => {
25692
25702
  if (node3?.elements) {
25693
- const runs = node3.elements?.filter((n) => n.name === "w:r");
25703
+ const runs = node3.elements?.filter((n) => n.name === "w:r") || [];
25694
25704
  parsedElements.push(...runs);
25695
25705
  if (node3.name === "w:p" && index2 < outputNode.length - 1) {
25696
- parsedElements.push({
25697
- name: "w:br"
25698
- });
25706
+ parsedElements.push({ name: "w:br" });
25699
25707
  }
25700
25708
  }
25701
25709
  });
@@ -25704,39 +25712,41 @@ function translateList(params2) {
25704
25712
  elements: [{ name: "w:pPr", elements: [] }, ...parsedElements]
25705
25713
  };
25706
25714
  }
25707
- const sdtNodes = outputNode.elements?.filter((n) => n.name === "w:sdt");
25708
- if (sdtNodes && sdtNodes.length > 0) {
25715
+ const sdtNodes = outputNode?.elements?.filter((n) => n.name === "w:sdt") || [];
25716
+ if (sdtNodes.length > 0) {
25709
25717
  nodesToFlatten = sdtNodes;
25710
25718
  nodesToFlatten?.forEach((sdtNode) => {
25711
- const sdtContent = sdtNode.elements.find((n) => n.name === "w:sdtContent");
25712
- if (sdtContent && sdtContent.elements) {
25719
+ const sdtContent = sdtNode.elements?.find((n) => n.name === "w:sdtContent");
25720
+ if (sdtContent?.elements) {
25713
25721
  const parsedElements = [];
25714
25722
  sdtContent.elements.forEach((element, index2) => {
25715
- const runs = element.elements?.filter((n) => n.name === "w:r");
25723
+ const runs = element.elements?.filter((n) => n.name === "w:r") || [];
25716
25724
  parsedElements.push(...runs);
25717
25725
  if (element.name === "w:p" && index2 < sdtContent.elements.length - 1) {
25718
- parsedElements.push({
25719
- name: "w:br"
25720
- });
25726
+ parsedElements.push({ name: "w:br" });
25721
25727
  }
25722
25728
  });
25723
25729
  sdtContent.elements = parsedElements;
25724
25730
  }
25725
25731
  });
25726
25732
  }
25727
- const pPr = outputNode.elements?.find((n) => n.name === "w:pPr");
25728
- if (pPr && pPr.elements && numPrTag) {
25733
+ const pPr = outputNode?.elements?.find((n) => n.name === "w:pPr");
25734
+ if (pPr?.elements && numPrTag) {
25729
25735
  pPr.elements.unshift(numPrTag);
25730
25736
  }
25731
25737
  const indentTag = restoreIndent(listItem.attrs.indent);
25732
- indentTag && pPr?.elements?.push(indentTag);
25733
- const runNode = outputNode.elements?.find((n) => n.name === "w:r");
25738
+ if (indentTag && pPr?.elements) {
25739
+ pPr.elements.push(indentTag);
25740
+ }
25741
+ const runNode = outputNode?.elements?.find((n) => n.name === "w:r");
25734
25742
  const rPr = runNode?.elements?.find((n) => n.name === "w:rPr");
25735
- if (rPr) pPr.elements.push(rPr);
25743
+ if (rPr && pPr?.elements) {
25744
+ pPr.elements.push(rPr);
25745
+ }
25736
25746
  if (listItem.attrs.numPrType !== "inline") {
25737
25747
  const numPrIndex = pPr?.elements?.findIndex((e) => e?.name === "w:numPr");
25738
- if (numPrIndex !== -1) {
25739
- pPr?.elements?.splice(numPrIndex, 1);
25748
+ if (numPrIndex !== -1 && pPr?.elements) {
25749
+ pPr.elements.splice(numPrIndex, 1);
25740
25750
  }
25741
25751
  }
25742
25752
  return [outputNode];
@@ -28800,7 +28810,7 @@ const _SuperConverter = class _SuperConverter2 {
28800
28810
  return;
28801
28811
  }
28802
28812
  }
28803
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.15.6-next.2") {
28813
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.15.6-next.3") {
28804
28814
  const customLocation = "docProps/custom.xml";
28805
28815
  if (!docx[customLocation]) {
28806
28816
  docx[customLocation] = generateCustomXml();
@@ -29279,7 +29289,7 @@ function storeSuperdocVersion(docx) {
29279
29289
  function generateCustomXml() {
29280
29290
  return DEFAULT_CUSTOM_XML;
29281
29291
  }
29282
- function generateSuperdocVersion(pid = 2, version2 = "0.15.6-next.2") {
29292
+ function generateSuperdocVersion(pid = 2, version2 = "0.15.6-next.3") {
29283
29293
  return {
29284
29294
  type: "element",
29285
29295
  name: "property",
@@ -45402,7 +45412,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
45402
45412
  * @returns {Object | void} Migration results
45403
45413
  */
45404
45414
  processCollaborationMigrations() {
45405
- console.debug("[checkVersionMigrations] Current editor version", "0.15.6-next.2");
45415
+ console.debug("[checkVersionMigrations] Current editor version", "0.15.6-next.3");
45406
45416
  if (!this.options.ydoc) return;
45407
45417
  const metaMap = this.options.ydoc.getMap("meta");
45408
45418
  let docVersion = metaMap.get("version");
@@ -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-Inp5Jy0s.js";
3
- import { _ as _export_sfc } from "./chunks/editor-B9yd4rtv.js";
2
+ import { T as TextSelection } from "./chunks/converter-CF2Jr89_.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-CSQMVDjs.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 = {}) {
@@ -21031,9 +21031,7 @@ function getAbstractNumIdByNumId(numId, docx) {
21031
21031
  const { elements } = numbering;
21032
21032
  const listData = elements[0];
21033
21033
  const numberingElements = listData.elements || [];
21034
- const numDef = numberingElements.find(
21035
- (el) => el.name === "w:num" && el.attributes?.["w:numId"] === numId
21036
- );
21034
+ const numDef = numberingElements.find((el) => el.name === "w:num" && el.attributes?.["w:numId"] === numId);
21037
21035
  if (!numDef) return null;
21038
21036
  const abstractNumIdRef = numDef.elements?.find((el) => el.name === "w:abstractNumId");
21039
21037
  return abstractNumIdRef?.attributes?.["w:val"];
@@ -25666,17 +25664,27 @@ function translateList(params) {
25666
25664
  }
25667
25665
  const collapsedParagraphNode = convertMultipleListItemsIntoSingleNode(listItem);
25668
25666
  let outputNode = exportSchemaToJson({ ...params, node: collapsedParagraphNode });
25667
+ if (!outputNode) {
25668
+ console.warn("translateList: exportSchemaToJson returned null/undefined");
25669
+ return [
25670
+ {
25671
+ name: "w:p",
25672
+ elements: [
25673
+ { name: "w:pPr", elements: numPrTag ? [numPrTag] : [] },
25674
+ { name: "w:r", elements: [{ name: "w:t", elements: [{ text: "", type: "text" }] }] }
25675
+ ]
25676
+ }
25677
+ ];
25678
+ }
25669
25679
  let nodesToFlatten = [];
25670
25680
  if (Array.isArray(outputNode) && params.isFinalDoc) {
25671
25681
  const parsedElements = [];
25672
25682
  outputNode?.forEach((node3, index) => {
25673
25683
  if (node3?.elements) {
25674
- const runs = node3.elements?.filter((n) => n.name === "w:r");
25684
+ const runs = node3.elements?.filter((n) => n.name === "w:r") || [];
25675
25685
  parsedElements.push(...runs);
25676
25686
  if (node3.name === "w:p" && index < outputNode.length - 1) {
25677
- parsedElements.push({
25678
- name: "w:br"
25679
- });
25687
+ parsedElements.push({ name: "w:br" });
25680
25688
  }
25681
25689
  }
25682
25690
  });
@@ -25685,39 +25693,41 @@ function translateList(params) {
25685
25693
  elements: [{ name: "w:pPr", elements: [] }, ...parsedElements]
25686
25694
  };
25687
25695
  }
25688
- const sdtNodes = outputNode.elements?.filter((n) => n.name === "w:sdt");
25689
- if (sdtNodes && sdtNodes.length > 0) {
25696
+ const sdtNodes = outputNode?.elements?.filter((n) => n.name === "w:sdt") || [];
25697
+ if (sdtNodes.length > 0) {
25690
25698
  nodesToFlatten = sdtNodes;
25691
25699
  nodesToFlatten?.forEach((sdtNode) => {
25692
- const sdtContent = sdtNode.elements.find((n) => n.name === "w:sdtContent");
25693
- if (sdtContent && sdtContent.elements) {
25700
+ const sdtContent = sdtNode.elements?.find((n) => n.name === "w:sdtContent");
25701
+ if (sdtContent?.elements) {
25694
25702
  const parsedElements = [];
25695
25703
  sdtContent.elements.forEach((element, index) => {
25696
- const runs = element.elements?.filter((n) => n.name === "w:r");
25704
+ const runs = element.elements?.filter((n) => n.name === "w:r") || [];
25697
25705
  parsedElements.push(...runs);
25698
25706
  if (element.name === "w:p" && index < sdtContent.elements.length - 1) {
25699
- parsedElements.push({
25700
- name: "w:br"
25701
- });
25707
+ parsedElements.push({ name: "w:br" });
25702
25708
  }
25703
25709
  });
25704
25710
  sdtContent.elements = parsedElements;
25705
25711
  }
25706
25712
  });
25707
25713
  }
25708
- const pPr = outputNode.elements?.find((n) => n.name === "w:pPr");
25709
- if (pPr && pPr.elements && numPrTag) {
25714
+ const pPr = outputNode?.elements?.find((n) => n.name === "w:pPr");
25715
+ if (pPr?.elements && numPrTag) {
25710
25716
  pPr.elements.unshift(numPrTag);
25711
25717
  }
25712
25718
  const indentTag = restoreIndent(listItem.attrs.indent);
25713
- indentTag && pPr?.elements?.push(indentTag);
25714
- const runNode = outputNode.elements?.find((n) => n.name === "w:r");
25719
+ if (indentTag && pPr?.elements) {
25720
+ pPr.elements.push(indentTag);
25721
+ }
25722
+ const runNode = outputNode?.elements?.find((n) => n.name === "w:r");
25715
25723
  const rPr = runNode?.elements?.find((n) => n.name === "w:rPr");
25716
- if (rPr) pPr.elements.push(rPr);
25724
+ if (rPr && pPr?.elements) {
25725
+ pPr.elements.push(rPr);
25726
+ }
25717
25727
  if (listItem.attrs.numPrType !== "inline") {
25718
25728
  const numPrIndex = pPr?.elements?.findIndex((e) => e?.name === "w:numPr");
25719
- if (numPrIndex !== -1) {
25720
- pPr?.elements?.splice(numPrIndex, 1);
25729
+ if (numPrIndex !== -1 && pPr?.elements) {
25730
+ pPr.elements.splice(numPrIndex, 1);
25721
25731
  }
25722
25732
  }
25723
25733
  return [outputNode];
@@ -28781,7 +28791,7 @@ const _SuperConverter = class _SuperConverter {
28781
28791
  return;
28782
28792
  }
28783
28793
  }
28784
- static updateDocumentVersion(docx = this.convertedXml, version = "0.15.6-next.2") {
28794
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.15.6-next.3") {
28785
28795
  const customLocation = "docProps/custom.xml";
28786
28796
  if (!docx[customLocation]) {
28787
28797
  docx[customLocation] = generateCustomXml();
@@ -29263,7 +29273,7 @@ function storeSuperdocVersion(docx) {
29263
29273
  function generateCustomXml() {
29264
29274
  return DEFAULT_CUSTOM_XML;
29265
29275
  }
29266
- function generateSuperdocVersion(pid = 2, version = "0.15.6-next.2") {
29276
+ function generateSuperdocVersion(pid = 2, version = "0.15.6-next.3") {
29267
29277
  return {
29268
29278
  type: "element",
29269
29279
  name: "property",
@@ -1,4 +1,4 @@
1
- import { H as process$1, at as commonjsGlobal, I as Buffer, au as getDefaultExportFromCjs, av as getContentTypesFromXml, aw as xmljs } from "./converter-Inp5Jy0s.js";
1
+ import { H as process$1, at as commonjsGlobal, I as Buffer, au as getDefaultExportFromCjs, av as getContentTypesFromXml, aw as xmljs } from "./converter-CF2Jr89_.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, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _ListItemNodeView_instances, init_fn2, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _DocumentSectionView_instances, init_fn3, addToolTip_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, g as getExtensionConfigField, b as getMarkType, d as getMarksFromSelection, e as getNodeType, f as getSchemaTypeNameByName, S as Schema$1, h as cleanSchemaItem, T as TextSelection, i as canSplit, l as liftTarget, A as AllSelection, j as canJoin, k as joinPoint, N as NodeSelection, m as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, n as Slice, o as defaultBlockAt$1, p as isTextSelection, q as getMarkRange, s as isMarkActive, t as isNodeActive, u as deleteProps, D as DOMParser$1, v as ReplaceStep, w as NodeRange, x as findWrapping, y as findParentNode, L as ListHelpers, z as isMacOS, B as isIOS, C as DOMSerializer, E as Mark$1, G as dropPoint, H as process$1, I as Buffer2, J as getSchemaTypeByName, K as inputRulesPlugin, O as TrackDeleteMarkName, Q as TrackInsertMarkName, U as v4, V as TrackFormatMarkName, W as comments_module_events, X as findMark, Y as objectIncludes, Z as AddMarkStep, _ as RemoveMarkStep, $ as twipsToLines, a0 as pixelsToTwips, a1 as helpers, a2 as posToDOMRect, a3 as CommandService, a4 as SuperConverter, a5 as createDocument, a6 as EditorState, a7 as hasSomeParentWithClass, a8 as isActive, a9 as unflattenListsInHtml, aa as parseSizeUnit, ab as minMax, ac as getLineHeightValueString, ad as InputRule, ae as kebabCase, af as generateOrderedListIndex, ag as getListItemStyleDefinitions, ah as docxNumberigHelpers, ai as parseIndentElement, aj as combineIndents, ak as getColStyleDeclaration, al as SelectionRange, am as Transform, an as findParentNodeClosestToPos, ao as isInTable$1, ap as createColGroup, aq as generateDocxRandomId, ar as SectionHelpers, as as htmlHandler } from "./converter-Inp5Jy0s.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, g as getExtensionConfigField, b as getMarkType, d as getMarksFromSelection, e as getNodeType, f as getSchemaTypeNameByName, S as Schema$1, h as cleanSchemaItem, T as TextSelection, i as canSplit, l as liftTarget, A as AllSelection, j as canJoin, k as joinPoint, N as NodeSelection, m as Selection, r as replaceStep$1, F as Fragment, R as ReplaceAroundStep$1, n as Slice, o as defaultBlockAt$1, p as isTextSelection, q as getMarkRange, s as isMarkActive, t as isNodeActive, u as deleteProps, D as DOMParser$1, v as ReplaceStep, w as NodeRange, x as findWrapping, y as findParentNode, L as ListHelpers, z as isMacOS, B as isIOS, C as DOMSerializer, E as Mark$1, G as dropPoint, H as process$1, I as Buffer2, J as getSchemaTypeByName, K as inputRulesPlugin, O as TrackDeleteMarkName, Q as TrackInsertMarkName, U as v4, V as TrackFormatMarkName, W as comments_module_events, X as findMark, Y as objectIncludes, Z as AddMarkStep, _ as RemoveMarkStep, $ as twipsToLines, a0 as pixelsToTwips, a1 as helpers, a2 as posToDOMRect, a3 as CommandService, a4 as SuperConverter, a5 as createDocument, a6 as EditorState, a7 as hasSomeParentWithClass, a8 as isActive, a9 as unflattenListsInHtml, aa as parseSizeUnit, ab as minMax, ac as getLineHeightValueString, ad as InputRule, ae as kebabCase, af as generateOrderedListIndex, ag as getListItemStyleDefinitions, ah as docxNumberigHelpers, ai as parseIndentElement, aj as combineIndents, ak as getColStyleDeclaration, al as SelectionRange, am as Transform, an as findParentNodeClosestToPos, ao as isInTable$1, ap as createColGroup, aq as generateDocxRandomId, ar as SectionHelpers, as as htmlHandler } from "./converter-CF2Jr89_.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-DVIPDmtc.js";
17
+ import { D as DocxZipper } from "./docx-zipper-BNMQSjCb.js";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
20
20
  };
@@ -13625,7 +13625,7 @@ const _Editor = class _Editor extends EventEmitter {
13625
13625
  * @returns {Object | void} Migration results
13626
13626
  */
13627
13627
  processCollaborationMigrations() {
13628
- console.debug("[checkVersionMigrations] Current editor version", "0.15.6-next.2");
13628
+ console.debug("[checkVersionMigrations] Current editor version", "0.15.6-next.3");
13629
13629
  if (!this.options.ydoc) return;
13630
13630
  const metaMap = this.options.ydoc.getMap("meta");
13631
13631
  let docVersion = metaMap.get("version");
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { H as process$1 } from "./converter-Inp5Jy0s.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-B9yd4rtv.js";
2
+ import { H as process$1 } from "./converter-CF2Jr89_.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CSQMVDjs.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 { a4 } from "./chunks/converter-Inp5Jy0s.js";
1
+ import { a4 } from "./chunks/converter-CF2Jr89_.js";
2
2
  export {
3
3
  a4 as SuperConverter
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/exporter.js"],"names":[],"mappings":"AA0BA;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AACH,2CAHW,YAAY,GACV,YAAY,CAyCxB;AA+DD;;;;;GAKG;AACH,qDAFa,YAAY,CA2BxB;AAkmED;;;;;;;;;EAgBC;AAyFD;IACE,4BAEC;IADC,eAA0B;IAG5B,gDAGC;;CAsEF;;;;;;;;;;;;;mBAr8Ea,KAAQ;;;;;;UAKR,MAAM;;;;aACN,KAAK,CAAC,UAAU,CAAC;;;;;;;;;;;;;UAMjB,MAAM;;;;cACN,KAAK,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;UAgBnB,MAAM"}
1
+ {"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/exporter.js"],"names":[],"mappings":"AA0BA;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AACH,2CAHW,YAAY,GACV,YAAY,CAyCxB;AA+DD;;;;;GAKG;AACH,qDAFa,YAAY,CA2BxB;AA4mED;;;;;;;;;EAgBC;AAyFD;IACE,4BAEC;IADC,eAA0B;IAG5B,gDAGC;;CAsEF;;;;;;;;;;;;;mBA/8Ea,KAAQ;;;;;;UAKR,MAAM;;;;aACN,KAAK,CAAC,UAAU,CAAC;;;;;;;;;;;;;UAMjB,MAAM;;;;cACN,KAAK,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;UAgBnB,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"listImporter.d.ts","sourceRoot":"","sources":["../../../../../src/core/super-converter/v2/importer/listImporter.js"],"names":[],"mappings":"AAwLA;;;;;GAKG;AACH,kCAHW,OAAO,cACL,OAAO,CAwCnB;AAMD;;;;;;GAMG;AACH,gDAJW,MAAM,kBAahB;AAED;;;;;;;;;;;GAWG;AACH,+EAFa,MAAM,GAAC,IAAI,CAwBvB;AAoLD;;;;GAIG;AACH,8CAHW,MAAM,GACJ,MAAM,CAWlB;AAED;;;;;;;GAOG;AACH,6DAJW,GAAG,QACH,UAAU;;;;;;;;;;;;;;;;;;;;;;;;EAiDpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BC;AAwGD,kEAEC;AAED,qDAUC;AAED,yDAmBC;AAxrBD;;GAEG;AACH,iCAoBE;AAEF;;GAEG;AACH,oCAGE;AAyUK,kEAgCN;AAEM,sGAWN;AASM,iDALI,MAAM,SACN,MAAM,iCA8ChB"}
1
+ {"version":3,"file":"listImporter.d.ts","sourceRoot":"","sources":["../../../../../src/core/super-converter/v2/importer/listImporter.js"],"names":[],"mappings":"AAwLA;;;;;GAKG;AACH,kCAHW,OAAO,cACL,OAAO,CAwCnB;AAMD;;;;;;GAMG;AACH,gDAJW,MAAM,kBAahB;AAED;;;;;;;;;;;GAWG;AACH,+EAFa,MAAM,GAAC,IAAI,CAwBvB;AAoLD;;;;GAIG;AACH,8CAHW,MAAM,GACJ,MAAM,CAWlB;AAED;;;;;;;GAOG;AACH,6DAJW,GAAG,QACH,UAAU;;;;;;;;;;;;;;;;;;;;;;;;EAiDpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BC;AAoGD,kEAEC;AAED,qDAUC;AAED,yDAmBC;AAprBD;;GAEG;AACH,iCAoBE;AAEF;;GAEG;AACH,oCAGE;AAyUK,kEAgCN;AAEM,sGAWN;AASM,iDALI,MAAM,SACN,MAAM,iCA8ChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"markImporter.d.ts","sourceRoot":"","sources":["../../../../../src/core/super-converter/v2/importer/markImporter.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,6EAFa,UAAU,EAAE,CA4ExB;AAED;;;;;GAKG;AACH,4CAJW,OAAO,gBACP,UAAU,EAAE,GACV,UAAU,EAAE,CAiBxB;AAED;;;;GAIG;AACH,yCAHW,UAAU,EAAE,GACV,UAAU,EAAE,CAoBxB"}
1
+ {"version":3,"file":"markImporter.d.ts","sourceRoot":"","sources":["../../../../../src/core/super-converter/v2/importer/markImporter.js"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,6EAFa,UAAU,EAAE,CAyExB;AAED;;;;;GAKG;AACH,4CAJW,OAAO,gBACP,UAAU,EAAE,GACV,UAAU,EAAE,CAiBxB;AAED;;;;GAIG;AACH,yCAHW,UAAU,EAAE,GACV,UAAU,EAAE,CAoBxB"}
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-Inp5Jy0s.js";
2
- import { D } from "./chunks/docx-zipper-DVIPDmtc.js";
1
+ import "./chunks/converter-CF2Jr89_.js";
2
+ import { D } from "./chunks/docx-zipper-BNMQSjCb.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-B9yd4rtv.js";
2
- import "./chunks/converter-Inp5Jy0s.js";
3
- import "./chunks/docx-zipper-DVIPDmtc.js";
1
+ import { E } from "./chunks/editor-CSQMVDjs.js";
2
+ import "./chunks/converter-CF2Jr89_.js";
3
+ import "./chunks/docx-zipper-BNMQSjCb.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-DVIPDmtc.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-BNMQSjCb.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 { au as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, ax as vClickOutside, y as findParentNode, ay as getActiveFormatting, ao as isInTable, az as readFromClipboard, aA as handleClipboardPaste, a as Plugin } from "./chunks/converter-Inp5Jy0s.js";
13
- import { ar, a4, d, a1 } from "./chunks/converter-Inp5Jy0s.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-B9yd4rtv.js";
15
- import { k, C, T, i, l, j } from "./chunks/editor-B9yd4rtv.js";
12
+ import { au as getDefaultExportFromCjs, U as v4, T as TextSelection$1, q as getMarkRange, ax as vClickOutside, y as findParentNode, ay as getActiveFormatting, ao as isInTable, az as readFromClipboard, aA as handleClipboardPaste, a as Plugin } from "./chunks/converter-CF2Jr89_.js";
13
+ import { ar, a4, d, a1 } from "./chunks/converter-CF2Jr89_.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, s as startImageUpload, y as yUndoPluginKey, d as undoDepth, r as redoDepth, S as SlashMenuPluginKey, E as Editor, e as getStarterExtensions, P as Placeholder, f as getRichTextExtensions, M as Mark, h as Extension, A as Attribute, N as Node } from "./chunks/editor-CSQMVDjs.js";
15
+ import { k, C, T, i, l, j } from "./chunks/editor-CSQMVDjs.js";
16
16
  import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, N as NSkeleton } from "./chunks/toolbar-C7Xua-ob.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, m as magicWandIcon, p as plusIconSvg, a as trashIconSvg, l as linkIconSvg, b as tableIconSvg, c as scissorsIconSvg, d as copyIconSvg, e as pasteIconSvg, f as borderNoneIconSvg, g as arrowsToDotIconSvg, h as arrowsLeftRightIconSvg, w as wrenchIconSvg, N as NSkeleton } from "./chunks/toolbar-B0pGBlAD.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-DVIPDmtc.js";
19
+ import { D } from "./chunks/docx-zipper-BNMQSjCb.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-C7Xua-ob.js";
3
- import "./chunks/editor-B9yd4rtv.js";
2
+ import { T } from "./chunks/toolbar-B0pGBlAD.js";
3
+ import "./chunks/editor-CSQMVDjs.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-DmmC2s6r.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-DYUxiKR4.cjs");
4
4
  require("./chunks/vue-CfKg12kH.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, f, g, T, h, i, j, k, l, m, n, o, p, q } from "./chunks/super-editor.es-DfQKDYMX.es.js";
1
+ import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, q } from "./chunks/super-editor.es-CvCZlP2V.es.js";
2
2
  import "./chunks/vue-B_OPNNfX.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-DmmC2s6r.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-DYUxiKR4.cjs");
4
4
  const vue = require("./chunks/vue-CfKg12kH.cjs");
5
5
  const jszip = require("./chunks/jszip-DWfnW2xV.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
@@ -47847,7 +47847,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
47847
47847
  this.config.colors = shuffleArray(this.config.colors);
47848
47848
  this.userColorMap = /* @__PURE__ */ new Map();
47849
47849
  this.colorIndex = 0;
47850
- this.version = "0.15.6-next.2";
47850
+ this.version = "0.15.6-next.3";
47851
47851
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
47852
47852
  this.superdocId = config.superdocId || uuid.v4();
47853
47853
  this.colors = this.config.colors;
@@ -1,5 +1,5 @@
1
- import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./chunks/super-editor.es-DfQKDYMX.es.js";
2
- import { a, S, d, j, p } from "./chunks/super-editor.es-DfQKDYMX.es.js";
1
+ import { q as index$1, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./chunks/super-editor.es-CvCZlP2V.es.js";
2
+ import { a, S, d, j, p } from "./chunks/super-editor.es-CvCZlP2V.es.js";
3
3
  import { a0 as effectScope, r as ref, $ as markRaw, p as process$1, a1 as toRaw, a as computed, a2 as isRef, a3 as isReactive, D as toRef, i as inject, q as getCurrentInstance, l as watch, y as unref, a4 as hasInjectionContext, N as reactive, u as nextTick, a5 as getCurrentScope, a6 as onScopeDispose, a7 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, a8 as resolveDirective, d as renderList, c as createApp, X as onUnmounted, Y as resolveDynamicComponent } from "./chunks/vue-B_OPNNfX.es.js";
4
4
  import { B as Buffer$2 } from "./chunks/jszip-BwJb6_S5.es.js";
5
5
  import { B as BlankDOCX } from "./chunks/blank-docx-iwdyG9RH.es.js";
@@ -47830,7 +47830,7 @@ class SuperDoc extends EventEmitter {
47830
47830
  this.config.colors = shuffleArray(this.config.colors);
47831
47831
  this.userColorMap = /* @__PURE__ */ new Map();
47832
47832
  this.colorIndex = 0;
47833
- this.version = "0.15.6-next.2";
47833
+ this.version = "0.15.6-next.3";
47834
47834
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
47835
47835
  this.superdocId = config.superdocId || v4();
47836
47836
  this.colors = this.config.colors;