@harbour-enterprises/superdoc 0.5.7 → 0.5.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.
@@ -49735,7 +49735,7 @@ const toIsoNoFractional = (unixMillis) => {
49735
49735
  const date = new Date(unixMillis || Date.now());
49736
49736
  return date.toISOString().replace(/\.\d{3}Z$/, "Z");
49737
49737
  };
49738
- const updateCommentsXml = (commentDefs, commentsXml) => {
49738
+ const updateCommentsXml = (commentDefs = [], commentsXml) => {
49739
49739
  const newCommentsXml = carbonCopy(commentsXml);
49740
49740
  commentDefs.forEach((commentDef) => {
49741
49741
  commentDef.elements[0].elements.unshift(COMMENT_REF);
@@ -52807,7 +52807,7 @@ const _SuperConverter = class _SuperConverter2 {
52807
52807
  return;
52808
52808
  }
52809
52809
  }
52810
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.5.7") {
52810
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.5.8") {
52811
52811
  const customLocation = "docProps/custom.xml";
52812
52812
  if (!docx[customLocation]) {
52813
52813
  docx[customLocation] = generateCustomXml();
@@ -52953,6 +52953,7 @@ _SuperConverter_instances = /* @__PURE__ */ new WeakSet();
52953
52953
  updateCommentsFiles_fn = function(exportedCommentDefs, commentsExportType) {
52954
52954
  const originalXml = this.convertedXml["word/comments.xml"];
52955
52955
  if (!originalXml && commentsExportType === "clean") return;
52956
+ if (!this.convertedXml["word/comments.xml"]) this.convertedXml["word/comments.xml"] = { ...COMMENTS_XML };
52956
52957
  const commentsXml = { ...this.convertedXml["word/comments.xml"] };
52957
52958
  if (commentsXml && commentsExportType === "clean") {
52958
52959
  return this.convertedXml["word/comments.xml"] = { ...COMMENTS_XML };
@@ -53046,7 +53047,7 @@ function storeSuperdocVersion(docx) {
53046
53047
  function generateCustomXml() {
53047
53048
  return DEFAULT_CUSTOM_XML;
53048
53049
  }
53049
- function generateSuperdocVersion(version2 = "0.5.7") {
53050
+ function generateSuperdocVersion(version2 = "0.5.8") {
53050
53051
  return {
53051
53052
  type: "element",
53052
53053
  name: "property",
@@ -66860,7 +66861,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
66860
66861
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
66861
66862
  */
66862
66863
  processCollaborationMigrations() {
66863
- console.debug("[checkVersionMigrations] Current editor version", "0.5.7");
66864
+ console.debug("[checkVersionMigrations] Current editor version", "0.5.8");
66864
66865
  if (!this.options.ydoc) return;
66865
66866
  const metaMap = this.options.ydoc.getMap("meta");
66866
66867
  let docVersion = metaMap.get("version");
@@ -87108,4 +87109,4 @@ export {
87108
87109
  helpers as k,
87109
87110
  index as l
87110
87111
  };
87111
- //# sourceMappingURL=super-editor.es-Ch98_TZo.js.map
87112
+ //# sourceMappingURL=super-editor.es-CzD_CS_R.js.map