@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.
@@ -51183,7 +51183,8 @@ function translateImageNode(params, imageSize) {
51183
51183
  node: { attrs = {}, marks = [] }
51184
51184
  } = params;
51185
51185
  let imageId = attrs.rId;
51186
- const { originalWidth, originalHeight } = getPngDimensions(attrs.imageSrc);
51186
+ const src = attrs.src || attrs.imageSrc;
51187
+ const { originalWidth, originalHeight } = getPngDimensions(src);
51187
51188
  let size = attrs.size ? {
51188
51189
  w: pixelsToEmu(attrs.size.width),
51189
51190
  h: pixelsToEmu(attrs.size.height)
@@ -51198,10 +51199,10 @@ function translateImageNode(params, imageSize) {
51198
51199
  };
51199
51200
  }
51200
51201
  if (params.node.type === "image" && !imageId) {
51201
- const path2 = attrs.src?.split("word/")[1];
51202
+ const path2 = src?.split("word/")[1];
51202
51203
  imageId = addNewImageRelationship(params, path2);
51203
51204
  } else if (params.node.type === "fieldAnnotation" && !imageId) {
51204
- const type2 = attrs.imageSrc?.split(";")[0].split("/")[1];
51205
+ const type2 = src?.split(";")[0].split("/")[1];
51205
51206
  if (!type2) {
51206
51207
  return prepareTextAnnotation(params);
51207
51208
  }
@@ -51209,7 +51210,7 @@ function translateImageNode(params, imageSize) {
51209
51210
  const cleanUrl = attrs.fieldId.replace("-", "_");
51210
51211
  const imageUrl = `media/${cleanUrl}_${hash3}.${type2}`;
51211
51212
  imageId = addNewImageRelationship(params, imageUrl);
51212
- params.media[`${cleanUrl}_${hash3}.${type2}`] = attrs.imageSrc;
51213
+ params.media[`${cleanUrl}_${hash3}.${type2}`] = src;
51213
51214
  }
51214
51215
  const inlineAttrs = attrs.originalPadding || {
51215
51216
  distT: 0,
@@ -53606,7 +53607,7 @@ const _SuperConverter = class _SuperConverter {
53606
53607
  return;
53607
53608
  }
53608
53609
  }
53609
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.12") {
53610
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.6.13") {
53610
53611
  const customLocation = "docProps/custom.xml";
53611
53612
  if (!docx[customLocation]) {
53612
53613
  docx[customLocation] = generateCustomXml();
@@ -53854,7 +53855,7 @@ function storeSuperdocVersion(docx) {
53854
53855
  function generateCustomXml() {
53855
53856
  return DEFAULT_CUSTOM_XML;
53856
53857
  }
53857
- function generateSuperdocVersion(version2 = "0.6.12") {
53858
+ function generateSuperdocVersion(version2 = "0.6.13") {
53858
53859
  return {
53859
53860
  type: "element",
53860
53861
  name: "property",
@@ -53926,4 +53927,4 @@ export {
53926
53927
  twipsToLines as y,
53927
53928
  pixelsToTwips as z
53928
53929
  };
53929
- //# sourceMappingURL=converter-B3VH7R5z.js.map
53930
+ //# sourceMappingURL=converter-CyYKwIJ8.js.map