@harbour-enterprises/superdoc 0.6.12 → 0.6.13

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.
@@ -51157,7 +51157,8 @@ function translateImageNode(params2, imageSize) {
51157
51157
  node: { attrs = {}, marks = [] }
51158
51158
  } = params2;
51159
51159
  let imageId = attrs.rId;
51160
- const { originalWidth, originalHeight } = getPngDimensions(attrs.imageSrc);
51160
+ const src = attrs.src || attrs.imageSrc;
51161
+ const { originalWidth, originalHeight } = getPngDimensions(src);
51161
51162
  let size2 = attrs.size ? {
51162
51163
  w: pixelsToEmu(attrs.size.width),
51163
51164
  h: pixelsToEmu(attrs.size.height)
@@ -51172,10 +51173,10 @@ function translateImageNode(params2, imageSize) {
51172
51173
  };
51173
51174
  }
51174
51175
  if (params2.node.type === "image" && !imageId) {
51175
- const path2 = attrs.src?.split("word/")[1];
51176
+ const path2 = src?.split("word/")[1];
51176
51177
  imageId = addNewImageRelationship(params2, path2);
51177
51178
  } else if (params2.node.type === "fieldAnnotation" && !imageId) {
51178
- const type2 = attrs.imageSrc?.split(";")[0].split("/")[1];
51179
+ const type2 = src?.split(";")[0].split("/")[1];
51179
51180
  if (!type2) {
51180
51181
  return prepareTextAnnotation(params2);
51181
51182
  }
@@ -51183,7 +51184,7 @@ function translateImageNode(params2, imageSize) {
51183
51184
  const cleanUrl = attrs.fieldId.replace("-", "_");
51184
51185
  const imageUrl = `media/${cleanUrl}_${hash3}.${type2}`;
51185
51186
  imageId = addNewImageRelationship(params2, imageUrl);
51186
- params2.media[`${cleanUrl}_${hash3}.${type2}`] = attrs.imageSrc;
51187
+ params2.media[`${cleanUrl}_${hash3}.${type2}`] = src;
51187
51188
  }
51188
51189
  const inlineAttrs = attrs.originalPadding || {
51189
51190
  distT: 0,
@@ -53564,7 +53565,7 @@ const _SuperConverter = class _SuperConverter2 {
53564
53565
  return;
53565
53566
  }
53566
53567
  }
53567
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.12") {
53568
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.13") {
53568
53569
  const customLocation = "docProps/custom.xml";
53569
53570
  if (!docx[customLocation]) {
53570
53571
  docx[customLocation] = generateCustomXml();
@@ -53805,7 +53806,7 @@ function storeSuperdocVersion(docx) {
53805
53806
  function generateCustomXml() {
53806
53807
  return DEFAULT_CUSTOM_XML;
53807
53808
  }
53808
- function generateSuperdocVersion(version2 = "0.6.12") {
53809
+ function generateSuperdocVersion(version2 = "0.6.13") {
53809
53810
  return {
53810
53811
  type: "element",
53811
53812
  name: "property",
@@ -67630,7 +67631,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
67630
67631
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
67631
67632
  */
67632
67633
  processCollaborationMigrations() {
67633
- console.debug("[checkVersionMigrations] Current editor version", "0.6.12");
67634
+ console.debug("[checkVersionMigrations] Current editor version", "0.6.13");
67634
67635
  if (!this.options.ydoc) return;
67635
67636
  const metaMap = this.options.ydoc.getMap("meta");
67636
67637
  let docVersion = metaMap.get("version");
@@ -87992,4 +87993,4 @@ export {
87992
87993
  helpers as k,
87993
87994
  index as l
87994
87995
  };
87995
- //# sourceMappingURL=super-editor.es-ByBN8jzD.js.map
87996
+ //# sourceMappingURL=super-editor.es-JefoLxp5.js.map