@harbour-enterprises/superdoc 0.6.16 → 0.6.17

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 (23) hide show
  1. package/dist/chunks/{super-editor.es-d-Yqwndw.js → super-editor.es-gzwV8MKs.js} +26 -9
  2. package/dist/chunks/{super-editor.es-d-Yqwndw.js.map → super-editor.es-gzwV8MKs.js.map} +1 -1
  3. package/dist/super-editor/chunks/{converter-DQwniUOI.js → converter-CY8XCpse.js} +25 -8
  4. package/dist/super-editor/chunks/{converter-DQwniUOI.js.map → converter-CY8XCpse.js.map} +1 -1
  5. package/dist/super-editor/chunks/{docx-zipper-Dwm-YSyG.js → docx-zipper-CXCVs3Qx.js} +2 -2
  6. package/dist/super-editor/chunks/{docx-zipper-Dwm-YSyG.js.map → docx-zipper-CXCVs3Qx.js.map} +1 -1
  7. package/dist/super-editor/chunks/{editor-BKJSAjPb.js → editor-DAjFASYa.js} +4 -4
  8. package/dist/super-editor/chunks/{editor-BKJSAjPb.js.map → editor-DAjFASYa.js.map} +1 -1
  9. package/dist/super-editor/chunks/{toolbar-BPtppK60.js → toolbar-DiYLEYrn.js} +3 -3
  10. package/dist/super-editor/chunks/{toolbar-BPtppK60.js.map → toolbar-DiYLEYrn.js.map} +1 -1
  11. package/dist/super-editor/converter.es.js +1 -1
  12. package/dist/super-editor/core/super-converter/v2/importer/docxImporter.d.ts.map +1 -1
  13. package/dist/super-editor/core/super-converter/v2/importer/listImporter.d.ts.map +1 -1
  14. package/dist/super-editor/docx-zipper.es.js +2 -2
  15. package/dist/super-editor/editor.es.js +3 -3
  16. package/dist/super-editor/file-zipper.es.js +1 -1
  17. package/dist/super-editor/super-editor.es.js +6 -6
  18. package/dist/super-editor/tests/import/listImporterMissingItemsExample.test.d.ts +2 -0
  19. package/dist/super-editor/tests/import/listImporterMissingItemsExample.test.d.ts.map +1 -0
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.es.js +1 -1
  22. package/dist/superdoc.es.js +3 -3
  23. package/package.json +1 -1
@@ -52542,12 +52542,27 @@ const getListNumIdFromStyleRef = (styleId, docx) => {
52542
52542
  const style2 = styleTags.find((tag) => tag.attributes["w:styleId"] === styleId) || {};
52543
52543
  const pPr = style2?.elements?.find((style22) => style22.name === "w:pPr");
52544
52544
  if (!pPr) return null;
52545
- const numPr = pPr?.elements?.find((style22) => style22.name === "w:numPr");
52545
+ let numPr = pPr?.elements?.find((style22) => style22.name === "w:numPr");
52546
52546
  if (!numPr) return null;
52547
- const numIdTag = numPr?.elements?.find((style22) => style22.name === "w:numId") || {};
52548
- const numId = numIdTag?.attributes["w:val"];
52549
- const ilvlTag = numPr?.elements?.find((style22) => style22.name === "w:ilvl");
52550
- const ilvl = ilvlTag?.attributes["w:val"];
52547
+ let numIdTag = numPr?.elements?.find((style22) => style22.name === "w:numId") || {};
52548
+ let numId = numIdTag?.attributes?.["w:val"];
52549
+ let ilvlTag = numPr?.elements?.find((style22) => style22.name === "w:ilvl");
52550
+ let ilvl = ilvlTag?.attributes?.["w:val"];
52551
+ const basedOnTag = style2?.elements?.find((style22) => style22.name === "w:basedOn");
52552
+ const basedOnId = basedOnTag?.attributes?.["w:val"];
52553
+ let loopCount = 0;
52554
+ while (numPr && !numId && loopCount < 10) {
52555
+ const basedOnStyle = styleTags.find((tag) => tag.attributes["w:styleId"] === basedOnId) || {};
52556
+ const basedOnPPr = basedOnStyle?.elements?.find((style22) => style22.name === "w:pPr");
52557
+ numPr = basedOnPPr?.elements?.find((style22) => style22.name === "w:numPr");
52558
+ numIdTag = numPr?.elements?.find((style22) => style22.name === "w:numId") || {};
52559
+ numId = numIdTag?.attributes?.["w:val"];
52560
+ if (!ilvlTag) {
52561
+ ilvlTag = numPr?.elements?.find((style22) => style22.name === "w:ilvl");
52562
+ ilvl = ilvlTag?.attributes?.["w:val"];
52563
+ }
52564
+ loopCount++;
52565
+ }
52551
52566
  return { numId, ilvl };
52552
52567
  };
52553
52568
  const getListLevelDefinitionTag = (numId, level, pStyleId, docx) => {
@@ -53359,6 +53374,7 @@ const createNodeListHandler = (nodeHandlers) => {
53359
53374
  });
53360
53375
  }
53361
53376
  } catch (error2) {
53377
+ console.debug("Import error", error2);
53362
53378
  editor?.emit("exception", { error: error2 });
53363
53379
  converter?.telemetry?.trackStatistic("error", {
53364
53380
  type: "processing_error",
@@ -53371,6 +53387,7 @@ const createNodeListHandler = (nodeHandlers) => {
53371
53387
  }
53372
53388
  return processedElements;
53373
53389
  } catch (error2) {
53390
+ console.debug("Error during import", error2);
53374
53391
  editor?.emit("exception", { error: error2 });
53375
53392
  converter?.telemetry?.trackStatistic("error", {
53376
53393
  type: "fatal_error",
@@ -53565,7 +53582,7 @@ const _SuperConverter = class _SuperConverter2 {
53565
53582
  return;
53566
53583
  }
53567
53584
  }
53568
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.16") {
53585
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.17") {
53569
53586
  const customLocation = "docProps/custom.xml";
53570
53587
  if (!docx[customLocation]) {
53571
53588
  docx[customLocation] = generateCustomXml();
@@ -53806,7 +53823,7 @@ function storeSuperdocVersion(docx) {
53806
53823
  function generateCustomXml() {
53807
53824
  return DEFAULT_CUSTOM_XML;
53808
53825
  }
53809
- function generateSuperdocVersion(version2 = "0.6.16") {
53826
+ function generateSuperdocVersion(version2 = "0.6.17") {
53810
53827
  return {
53811
53828
  type: "element",
53812
53829
  name: "property",
@@ -67631,7 +67648,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
67631
67648
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
67632
67649
  */
67633
67650
  processCollaborationMigrations() {
67634
- console.debug("[checkVersionMigrations] Current editor version", "0.6.16");
67651
+ console.debug("[checkVersionMigrations] Current editor version", "0.6.17");
67635
67652
  if (!this.options.ydoc) return;
67636
67653
  const metaMap = this.options.ydoc.getMap("meta");
67637
67654
  let docVersion = metaMap.get("version");
@@ -87993,4 +88010,4 @@ export {
87993
88010
  helpers as k,
87994
88011
  index as l
87995
88012
  };
87996
- //# sourceMappingURL=super-editor.es-d-Yqwndw.js.map
88013
+ //# sourceMappingURL=super-editor.es-gzwV8MKs.js.map