@harbour-enterprises/superdoc 0.7.8 → 0.7.10

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 (27) hide show
  1. package/dist/chunks/{super-editor.es-CTzrAWzW.js → super-editor.es-BFSqj6T6.js} +19 -9
  2. package/dist/chunks/super-editor.es-BFSqj6T6.js.map +1 -0
  3. package/dist/super-editor/chunks/{converter-mY5pgn5Z.js → converter-CRvLgvZt.js} +12 -6
  4. package/dist/super-editor/chunks/{converter-mY5pgn5Z.js.map → converter-CRvLgvZt.js.map} +1 -1
  5. package/dist/super-editor/chunks/{docx-zipper-BYdqGp39.js → docx-zipper-BMuukZkc.js} +2 -2
  6. package/dist/super-editor/chunks/{docx-zipper-BYdqGp39.js.map → docx-zipper-BMuukZkc.js.map} +1 -1
  7. package/dist/super-editor/chunks/{editor-Djp7oWm8.js → editor-BdLNLP9a.js} +10 -6
  8. package/dist/super-editor/chunks/editor-BdLNLP9a.js.map +1 -0
  9. package/dist/super-editor/chunks/{toolbar-Bxm1vX4B.js → toolbar-y0HedaTU.js} +3 -3
  10. package/dist/super-editor/chunks/{toolbar-Bxm1vX4B.js.map → toolbar-y0HedaTU.js.map} +1 -1
  11. package/dist/super-editor/converter.es.js +1 -1
  12. package/dist/super-editor/core/helpers/createDocument.d.ts +3 -1
  13. package/dist/super-editor/core/helpers/createDocument.d.ts.map +1 -1
  14. package/dist/super-editor/core/super-converter/v2/importer/annotationImporter.d.ts.map +1 -1
  15. package/dist/super-editor/core/super-converter/v2/importer/standardNodeImporter.d.ts.map +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor.es.js +6 -6
  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/dist/superdoc.umd.js +19 -9
  24. package/dist/superdoc.umd.js.map +1 -1
  25. package/package.json +1 -1
  26. package/dist/chunks/super-editor.es-CTzrAWzW.js.map +0 -1
  27. package/dist/super-editor/chunks/editor-Djp7oWm8.js.map +0 -1
@@ -19423,7 +19423,7 @@ function handleListNodes(listItems, params2, listLevel = 0, actualListLevel = 0,
19423
19423
  if (item.seen) continue;
19424
19424
  if (item.elements && !hasTextNode(item.elements)) {
19425
19425
  const n = handleStandardNode2({ ...params2, nodes: [item] }).nodes[0];
19426
- parsedListItems[parsedListItems.length - 1]?.content.push(n);
19426
+ if (n) parsedListItems[parsedListItems.length - 1]?.content.push(n);
19427
19427
  item.seen = true;
19428
19428
  continue;
19429
19429
  }
@@ -20037,6 +20037,9 @@ const handleAnnotationNode = (params2) => {
20037
20037
  fieldColor,
20038
20038
  multipleImage: isMultipleImage === "true"
20039
20039
  };
20040
+ if (!attrs.fieldId || !attrs.displayLabel) {
20041
+ return { nodes: [], consumed: 0 };
20042
+ }
20040
20043
  let result = {
20041
20044
  type: "text",
20042
20045
  text: `{{${attrs.displayLabel}}}`,
@@ -20094,6 +20097,9 @@ const handleStandardNode = (params2) => {
20094
20097
  const node2 = nodes[0];
20095
20098
  const { name } = node2;
20096
20099
  const { attributes, elements, marks = [] } = parseProperties(node2);
20100
+ if (name === "w:sdt") {
20101
+ return { nodes: [], consumed: 0 };
20102
+ }
20097
20103
  if (isPropertiesElement(node2)) {
20098
20104
  return {
20099
20105
  nodes: [{
@@ -20654,7 +20660,7 @@ const _SuperConverter = class _SuperConverter2 {
20654
20660
  return;
20655
20661
  }
20656
20662
  }
20657
- static updateDocumentVersion(docx = this.convertedXml, version = "0.7.8") {
20663
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.7.10") {
20658
20664
  const customLocation = "docProps/custom.xml";
20659
20665
  if (!docx[customLocation]) {
20660
20666
  docx[customLocation] = generateCustomXml();
@@ -20890,8 +20896,8 @@ __publicField$2(_SuperConverter, "markTypes", [
20890
20896
  { name: "w:ind", type: "textIndent", mark: "textStyle", property: "textIndent" },
20891
20897
  { name: "w:spacing", type: "lineHeight", mark: "textStyle", property: "lineHeight" },
20892
20898
  { name: "link", type: "link", mark: "link", property: "href" },
20893
- { name: "w:highlight", type: "highlight", mark: "highlight", property: "color" },
20894
- { name: "w:shd", type: "highlight", mark: "highlight", property: "color" }
20899
+ { name: "w:highlight", type: "highlight", mark: "highlight", property: "color" }
20900
+ // { name: 'w:shd', type: 'highlight', mark: 'highlight', property: 'color'}
20895
20901
  ]);
20896
20902
  __publicField$2(_SuperConverter, "propertyTypes", Object.freeze({
20897
20903
  "w:pPr": "paragraphProperties",
@@ -20927,7 +20933,7 @@ function storeSuperdocVersion(docx) {
20927
20933
  function generateCustomXml() {
20928
20934
  return DEFAULT_CUSTOM_XML;
20929
20935
  }
20930
- function generateSuperdocVersion(pid = 2, version = "0.7.8") {
20936
+ function generateSuperdocVersion(pid = 2, version = "0.7.10") {
20931
20937
  return {
20932
20938
  type: "element",
20933
20939
  name: "property",
@@ -33216,10 +33222,14 @@ const EditorFocus = Extension.create({
33216
33222
  return [editorFocusPlugin];
33217
33223
  }
33218
33224
  });
33219
- function createDocument(converter, schema, editor) {
33225
+ function createDocument(converter, schema, editor, { check = false } = {}) {
33220
33226
  const documentData = converter.getSchema(editor);
33221
33227
  if (documentData) {
33222
- return schema.nodeFromJSON(documentData);
33228
+ const documentNode = schema.nodeFromJSON(documentData);
33229
+ if (check) {
33230
+ documentNode.check();
33231
+ }
33232
+ return documentNode;
33223
33233
  }
33224
33234
  return schema.topNodeType.createAndFill();
33225
33235
  }
@@ -35158,7 +35168,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
35158
35168
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
35159
35169
  */
35160
35170
  processCollaborationMigrations() {
35161
- console.debug("[checkVersionMigrations] Current editor version", "0.7.8");
35171
+ console.debug("[checkVersionMigrations] Current editor version", "0.7.10");
35162
35172
  if (!this.options.ydoc) return;
35163
35173
  const metaMap = this.options.ydoc.getMap("meta");
35164
35174
  let docVersion = metaMap.get("version");
@@ -58679,4 +58689,4 @@ export {
58679
58689
  helpers as l,
58680
58690
  index as m
58681
58691
  };
58682
- //# sourceMappingURL=super-editor.es-CTzrAWzW.js.map
58692
+ //# sourceMappingURL=super-editor.es-BFSqj6T6.js.map