@bluepic/embed 0.2.0-next.12 → 0.2.0-next.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.
@@ -97300,7 +97300,7 @@ function useRenderer(m, c, ie, we, Ie, Me, qe, ne, rr, pr) {
97300
97300
  Xr.height,
97301
97301
  Or,
97302
97302
  95,
97303
- Xr.frames ?? { x: 1, y: 1 },
97303
+ Xr.frames ?? { x: 2, y: 2 },
97304
97304
  ne.value,
97305
97305
  rr.value
97306
97306
  );
@@ -97308,7 +97308,7 @@ function useRenderer(m, c, ie, we, Ie, Me, qe, ne, rr, pr) {
97308
97308
  const vi = await unzip(li);
97309
97309
  or.value = Object.fromEntries(
97310
97310
  await Promise.all(
97311
- Object.entries(vi.entries).map(async ([ui, oi]) => [ui, await oi.blob()])
97311
+ Object.entries(vi.entries).map(async ([ui, oi]) => [ui, await oi.blob(mimeTypes.lookup(ui) || "png")])
97312
97312
  )
97313
97313
  );
97314
97314
  } else {
@@ -97317,6 +97317,7 @@ function useRenderer(m, c, ie, we, Ie, Me, qe, ne, rr, pr) {
97317
97317
  [`${Xr.name}.${vi}`]: li
97318
97318
  };
97319
97319
  }
97320
+ console.log(or.value);
97320
97321
  } else {
97321
97322
  const li = we.value?.bluepicEmbeddedRef?.renderSVG(), vi = Ie.value;
97322
97323
  if (!li)
@@ -97394,23 +97395,23 @@ function useRenderer(m, c, ie, we, Ie, Me, qe, ne, rr, pr) {
97394
97395
  }
97395
97396
  async function downloadFiles(m, c) {
97396
97397
  const ie = await Promise.all(
97397
- m.map(async (we) => {
97398
+ m.map(async (we, Ie) => {
97398
97399
  if (we instanceof Blob)
97399
97400
  return {
97400
- name: `${c}.${mimeTypes.extension(we.type)}`,
97401
+ name: `${c}_${Ie + 1}.${mimeTypes.extension(we.type)}`,
97401
97402
  blob: we
97402
97403
  };
97403
- const Ie = we.split("/").pop(), Me = Ie.split(".").pop(), qe = await fetch(we);
97404
- if (!qe.ok)
97405
- throw new Error(`Failed to download file: ${qe.status}`);
97406
- const ne = await qe.blob();
97404
+ const Me = we.split("/").pop(), qe = Me.split(".").pop(), ne = await fetch(we);
97405
+ if (!ne.ok)
97406
+ throw new Error(`Failed to download file: ${ne.status}`);
97407
+ const rr = await ne.blob();
97407
97408
  return {
97408
- name: m.length > 1 ? Ie : `${c}.${Me}`,
97409
- blob: ne
97409
+ name: m.length > 1 ? Me : `${c}_${Ie + 1}.${qe}`,
97410
+ blob: rr
97410
97411
  };
97411
97412
  })
97412
97413
  );
97413
- if (ie.length > 1) {
97414
+ if (console.log("files", ie), ie.length > 1) {
97414
97415
  const we = await A(ie.map(({ name: Ie, blob: Me }) => ({ name: Ie, input: Me }))).blob();
97415
97416
  download(we, `${c}.zip`);
97416
97417
  } else