@marimo-team/islands 0.23.7-dev6 → 0.23.7-dev8

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.
@@ -20664,8 +20664,8 @@ ${n.sqlString}
20664
20664
  }), i;
20665
20665
  try {
20666
20666
  if (r.startsWith("data:")) {
20667
- let e2 = r.split(",")[1], n2 = prompt("We can save your image as a file. Enter a filename.", t.name), a2 = t.type.split("/")[1];
20668
- if (n2 === null) {
20667
+ let e2 = prompt("We can save your image as a file. Enter a filename.", t.name), n2 = t.type.split("/")[1];
20668
+ if (e2 === null) {
20669
20669
  let e3 = Math.round(r.length / 1024);
20670
20670
  if (e3 > MAX_BASE64_SIZE_KB) {
20671
20671
  toast({
@@ -20675,14 +20675,14 @@ ${n.sqlString}
20675
20675
  return;
20676
20676
  }
20677
20677
  } else {
20678
- n2.trim() === "" ? n2 = t.name : n2.endsWith(`.${a2}`) || (n2 = `${n2}.${a2}`);
20679
- let r2 = store.get(filenameAtom), o2 = r2 ? Paths.dirname(r2) : null, s = o2 ? `${o2}/public` : "public", c = await getRequestClient().sendCreateFileOrFolder({
20680
- path: s,
20678
+ e2.trim() === "" ? e2 = t.name : e2.endsWith(`.${n2}`) || (e2 = `${e2}.${n2}`);
20679
+ let r2 = store.get(filenameAtom), a2 = r2 ? Paths.dirname(r2) : null, o2 = a2 ? `${a2}/public` : "public", s = await getRequestClient().sendCreateFileOrFolder({
20680
+ path: o2,
20681
20681
  type: "file",
20682
- name: n2,
20683
- contents: e2
20682
+ name: e2,
20683
+ file: t
20684
20684
  });
20685
- c.success ? (i = (_a2 = c.info) == null ? void 0 : _a2.path, i && o2 && i.startsWith(o2) && (i = Paths.rest(i, o2).replaceAll("\\", "/")), toast({
20685
+ s.success ? (i = (_a2 = s.info) == null ? void 0 : _a2.path, i && a2 && i.startsWith(a2) && (i = Paths.rest(i, a2).replaceAll("\\", "/")), toast({
20686
20686
  title: "Image uploaded successfully",
20687
20687
  description: `We've uploaded your image at ${i}`
20688
20688
  })) : toast({