@marimo-team/islands 0.20.4-dev2 → 0.20.4
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
|
@@ -70357,7 +70357,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
|
|
|
70357
70357
|
return Logger.warn("Failed to get version from mount config"), null;
|
|
70358
70358
|
}
|
|
70359
70359
|
}
|
|
70360
|
-
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.20.4
|
|
70360
|
+
const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.20.4"), showCodeInRunModeAtom = atom(true);
|
|
70361
70361
|
atom(null);
|
|
70362
70362
|
var import_compiler_runtime$88 = require_compiler_runtime();
|
|
70363
70363
|
function useKeydownOnElement(e, r) {
|
package/package.json
CHANGED
|
@@ -184,6 +184,21 @@ export function useNotebookActions() {
|
|
|
184
184
|
await withLoadingToast(title, runDownload);
|
|
185
185
|
};
|
|
186
186
|
|
|
187
|
+
const handleDocumentPDF = async () => {
|
|
188
|
+
if (serverSidePdfEnabled) {
|
|
189
|
+
await downloadServerSidePDF({
|
|
190
|
+
preset: "document",
|
|
191
|
+
title: "Downloading Document PDF...",
|
|
192
|
+
});
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
const beforeprint = new Event("export-beforeprint");
|
|
196
|
+
const afterprint = new Event("export-afterprint");
|
|
197
|
+
window.dispatchEvent(beforeprint);
|
|
198
|
+
setTimeout(() => window.print(), 0);
|
|
199
|
+
setTimeout(() => window.dispatchEvent(afterprint), 0);
|
|
200
|
+
};
|
|
201
|
+
|
|
187
202
|
const actions: ActionButton[] = [
|
|
188
203
|
{
|
|
189
204
|
icon: <DownloadIcon size={14} strokeWidth={1.5} />,
|
|
@@ -261,49 +276,38 @@ export function useNotebookActions() {
|
|
|
261
276
|
});
|
|
262
277
|
},
|
|
263
278
|
},
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
label: "Download as PDF",
|
|
268
|
-
handle: NOOP_HANDLER,
|
|
269
|
-
dropdown: [
|
|
270
|
-
{
|
|
279
|
+
isSlidesLayout
|
|
280
|
+
? {
|
|
281
|
+
divider: true,
|
|
271
282
|
icon: <FileIcon size={14} strokeWidth={1.5} />,
|
|
272
|
-
label: "
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
283
|
+
label: "Download as PDF",
|
|
284
|
+
handle: NOOP_HANDLER,
|
|
285
|
+
dropdown: [
|
|
286
|
+
{
|
|
287
|
+
icon: <FileIcon size={14} strokeWidth={1.5} />,
|
|
288
|
+
label: "Document Layout",
|
|
289
|
+
handle: handleDocumentPDF,
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
icon: <FileIcon size={14} strokeWidth={1.5} />,
|
|
293
|
+
label: "Slides Layout",
|
|
294
|
+
rightElement: renderRecommendedElement(true),
|
|
295
|
+
hidden: !serverSidePdfEnabled,
|
|
296
|
+
handle: async () => {
|
|
297
|
+
await downloadServerSidePDF({
|
|
298
|
+
preset: "slides",
|
|
299
|
+
title: "Downloading Slides PDF...",
|
|
300
|
+
});
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
}
|
|
305
|
+
: {
|
|
306
|
+
divider: true,
|
|
294
307
|
icon: <FileIcon size={14} strokeWidth={1.5} />,
|
|
295
|
-
label: "
|
|
296
|
-
|
|
297
|
-
hidden: !serverSidePdfEnabled,
|
|
298
|
-
handle: async () => {
|
|
299
|
-
await downloadServerSidePDF({
|
|
300
|
-
preset: "slides",
|
|
301
|
-
title: "Downloading Slides PDF...",
|
|
302
|
-
});
|
|
303
|
-
},
|
|
308
|
+
label: "Download as PDF",
|
|
309
|
+
handle: handleDocumentPDF,
|
|
304
310
|
},
|
|
305
|
-
],
|
|
306
|
-
},
|
|
307
311
|
],
|
|
308
312
|
},
|
|
309
313
|
|