@marimo-team/islands 0.19.7-dev40 → 0.19.7-dev41

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.
package/dist/main.js CHANGED
@@ -61452,10 +61452,10 @@ ${r}
61452
61452
  }))).join("\n");
61453
61453
  }
61454
61454
  async function embedWebFonts(e, r) {
61455
- let c = r.fontEmbedCSS == null ? r.skipFonts ? null : await getWebFontCSS(e, r) : r.fontEmbedCSS;
61456
- if (c) {
61457
- let r2 = document.createElement("style"), d = document.createTextNode(c);
61458
- r2.appendChild(d), e.firstChild ? e.insertBefore(r2, e.firstChild) : e.appendChild(r2);
61455
+ let c = r.fontEmbedCSS == null ? r.skipFonts ? null : await getWebFontCSS(e, r) : r.fontEmbedCSS, d = r.extraStyleContent == null ? c : r.extraStyleContent.concat(c || "");
61456
+ if (d) {
61457
+ let r2 = document.createElement("style"), c2 = document.createTextNode(d);
61458
+ r2.appendChild(c2), e.firstChild ? e.insertBefore(r2, e.firstChild) : e.appendChild(r2);
61459
61459
  }
61460
61460
  }
61461
61461
  async function toSvg(e, r = {}) {
@@ -73168,7 +73168,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
73168
73168
  return Logger.warn("Failed to get version from mount config"), null;
73169
73169
  }
73170
73170
  }
73171
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.19.7-dev40"), showCodeInRunModeAtom = atom(true);
73171
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.19.7-dev41"), showCodeInRunModeAtom = atom(true);
73172
73172
  atom(null);
73173
73173
  var import_compiler_runtime$88 = require_compiler_runtime();
73174
73174
  function useKeydownOnElement(e, r) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/islands",
3
- "version": "0.19.7-dev40",
3
+ "version": "0.19.7-dev41",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -194,10 +194,9 @@ export function useEnrichCellOutputs(): (
194
194
  inFlightWaiters.map(({ promise }) => promise),
195
195
  );
196
196
  for (const [i, { cellId }] of inFlightWaiters.entries()) {
197
- const result =
198
- settled[i].status === "fulfilled" ? settled[i].value : undefined;
199
- if (result) {
200
- results[cellId] = result;
197
+ const settledResult = settled[i];
198
+ if (settledResult.status === "fulfilled" && settledResult.value) {
199
+ results[cellId] = settledResult.value;
201
200
  }
202
201
  }
203
202
 
@@ -65,6 +65,10 @@ function prepareCellElementForScreenshot(element: HTMLElement) {
65
65
  }
66
66
 
67
67
  const THRESHOLD_TIME_MS = 500;
68
+ const HIDE_SCROLLBAR_STYLES = `
69
+ * { scrollbar-width: none; -ms-overflow-style: none; }
70
+ *::-webkit-scrollbar { display: none; }
71
+ `;
68
72
 
69
73
  /**
70
74
  * Capture a cell output as a PNG data URL.
@@ -89,7 +93,9 @@ export async function getImageDataUrlForCell(
89
93
 
90
94
  try {
91
95
  const startTime = Date.now();
92
- const dataUrl = await toPng(element);
96
+ const dataUrl = await toPng(element, {
97
+ extraStyleContent: HIDE_SCROLLBAR_STYLES,
98
+ });
93
99
  const timeTaken = Date.now() - startTime;
94
100
  if (timeTaken > THRESHOLD_TIME_MS) {
95
101
  Logger.debug(
@@ -115,7 +121,7 @@ export async function downloadCellOutputAsImage(
115
121
  if (!dataUrl) {
116
122
  return;
117
123
  }
118
- return downloadByURL(dataUrl, Filenames.toPNG(filename));
124
+ downloadByURL(dataUrl, Filenames.toPNG(filename));
119
125
  }
120
126
 
121
127
  export const ADD_PRINTING_CLASS = (): (() => void) => {