@marimo-team/frontend 0.19.7-dev23 → 0.19.7-dev25
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/assets/{CellStatus-DFhwmbo5.js → CellStatus-oBL2iale.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-Cosas-Z0.js → ConnectedDataExplorerComponent-ec_bSRbX.js} +1 -1
- package/dist/assets/{ErrorBoundary-BU1OKJ3L.js → ErrorBoundary-ChCiwl15.js} +1 -1
- package/dist/assets/{ImperativeModal-DstvzsTs.js → ImperativeModal-CUbWEBci.js} +1 -1
- package/dist/assets/{JsonOutput-Dmfgex9T.js → JsonOutput-BKP4rBIw.js} +3 -3
- package/dist/assets/{LazyAnyLanguageCodeMirror-ygeIsKeo.js → LazyAnyLanguageCodeMirror-yzHjsVJt.js} +2 -2
- package/dist/assets/{MarimoErrorOutput-eoDwRuKU.js → MarimoErrorOutput-cw9gEb4T.js} +1 -1
- package/dist/assets/{RenderHTML-DuJkj1GV.js → RenderHTML-Bgz4e362.js} +1 -1
- package/dist/assets/{add-cell-with-ai-COxBrLrH.js → add-cell-with-ai-DNbX7Ctg.js} +1 -1
- package/dist/assets/{add-database-form-BtP14Anj.js → add-database-form-CP39qGit.js} +1 -1
- package/dist/assets/{agent-panel-Baphp2Rh.js → agent-panel-Bak-DtIc.js} +1 -1
- package/dist/assets/{ai-model-dropdown-GvB-5iLY.js → ai-model-dropdown-Dpr0DUJN.js} +1 -1
- package/dist/assets/{alert-dialog-Bv1sALHm.js → alert-dialog-DwQffb13.js} +1 -1
- package/dist/assets/{any-language-editor-WGtuXPVf.js → any-language-editor-BMlwpEZ4.js} +1 -1
- package/dist/assets/{app-config-button-BK2508Jf.js → app-config-button-CAaYaq0L.js} +1 -1
- package/dist/assets/{button-B3uq-Cpf.js → button-YC1gW_kJ.js} +1 -1
- package/dist/assets/{cache-panel-DFXoPp-r.js → cache-panel-BHX9f5Bx.js} +1 -1
- package/dist/assets/{capabilities-CUpom6r4.js → capabilities-MM7JYRxj.js} +1 -1
- package/dist/assets/{capitalize-CXGTjPyK.js → capitalize-CkclHYWI.js} +1 -1
- package/dist/assets/{cell-editor-Cqw8VDah.js → cell-editor-B6jD1bv8.js} +10 -10
- package/dist/assets/{cell-link-BITMERKQ.js → cell-link-CyIWDVXR.js} +1 -1
- package/dist/assets/{cells-Cvo5AIrZ.js → cells-DRiwSVs0.js} +1 -1
- package/dist/assets/{chat-components-BV83l1rZ.js → chat-components-DDIZD9FU.js} +1 -1
- package/dist/assets/{chat-display-C4qhRyWq.js → chat-display-D-Wa-1Hv.js} +1 -1
- package/dist/assets/{chat-panel-BxxPae_R.js → chat-panel-RtFQiyUV.js} +1 -1
- package/dist/assets/{column-preview-BvwEAGt6.js → column-preview-C72fVZoP.js} +1 -1
- package/dist/assets/{command-BjWSp3sa.js → command-Bq3e85NA.js} +1 -1
- package/dist/assets/{command-palette-aT5upvTH.js → command-palette-D4NcN7PV.js} +1 -1
- package/dist/assets/{common-BLddv5HY.js → common-CeF2TOUZ.js} +1 -1
- package/dist/assets/{config-BgpK7vqH.js → config-CIrPQIbt.js} +1 -1
- package/dist/assets/{copy-r7i0SKI4.js → copy-Bv2DBpIS.js} +1 -1
- package/dist/assets/{copy-icon-wZr2McVB.js → copy-icon-BhONVREY.js} +1 -1
- package/dist/assets/{createReducer-Cki97cx5.js → createReducer-Dnna-AUO.js} +1 -1
- package/dist/assets/{datasource-D2hNaG_n.js → datasource-AZ3l2P48.js} +1 -1
- package/dist/assets/{dates-CxJmszXT.js → dates-Dhn1r-h6.js} +1 -1
- package/dist/assets/{dependency-graph-panel-CBiKFUBG.js → dependency-graph-panel-i3yTswTN.js} +1 -1
- package/dist/assets/{dialog-C5Pa_iIq.js → dialog-CxGKN4C_.js} +1 -1
- package/dist/assets/{dist-R0oOvu5B.js → dist-CdxIjAOP.js} +1 -1
- package/dist/assets/{documentation-panel-ChkvmAB1.js → documentation-panel-J2fwLjEP.js} +1 -1
- package/dist/assets/download-Y3BpaOoI.js +6 -0
- package/dist/assets/{edit-page-BfA_Lg2x.js → edit-page-Bpl6BN5G.js} +6 -6
- package/dist/assets/{error-banner-BWJsOpnc.js → error-banner-DUzsIXtq.js} +1 -1
- package/dist/assets/{error-panel-Bnhv5zxn.js → error-panel-Cpfr8TZw.js} +1 -1
- package/dist/assets/{field-BN2j4cag.js → field-BEg1eC0P.js} +1 -1
- package/dist/assets/{file-explorer-panel-CkOMaMbq.js → file-explorer-panel-DsMwvQX7.js} +1 -1
- package/dist/assets/{floating-outline-CxfziveS.js → floating-outline-yvPiOGQ2.js} +1 -1
- package/dist/assets/{focus-BeWVOW9Q.js → focus-B7xu7kpl.js} +1 -1
- package/dist/assets/{form-DazVYGCT.js → form-BpwI8bBX.js} +1 -1
- package/dist/assets/{formats-BBDL2N4i.js → formats-W1SWxSE3.js} +1 -1
- package/dist/assets/{glide-data-editor-DEwgx2xp.js → glide-data-editor-DVw6MlCk.js} +1 -1
- package/dist/assets/{globals-uEPg-4pq.js → globals-BW23ny3Q.js} +1 -1
- package/dist/assets/{home-page-Dtcd7Trh.js → home-page-C-JIKt-2.js} +1 -1
- package/dist/assets/hooks-2c2seyHG.js +1 -0
- package/dist/assets/hotkeys-BHHWjLlp.js +1 -0
- package/dist/assets/{html-to-image-CJgqxZci.js → html-to-image-Cy_LYuWW.js} +1 -1
- package/dist/assets/{index-DCjsZDGq.js → index-C4si8YAb.js} +21 -26
- package/dist/assets/index-DHsXOI_M.css +2 -0
- package/dist/assets/{input-BeGfEf2S.js → input-pAun1m1X.js} +1 -1
- package/dist/assets/{kiosk-mode-Djm3JPwk.js → kiosk-mode-D9jdUD5P.js} +1 -1
- package/dist/assets/{label-C_OuzPjQ.js → label-Be1daUcS.js} +1 -1
- package/dist/assets/{layout-BkGjQBnQ.js → layout-BjIcxFO0.js} +4 -4
- package/dist/assets/links-C-GGaW8R.js +1 -0
- package/dist/assets/{logs-panel-BsnCP3we.js → logs-panel-XVSOzGFv.js} +1 -1
- package/dist/assets/{maps-vcWR7nnr.js → maps-t9yNKYA8.js} +1 -1
- package/dist/assets/{markdown-renderer-CoQm4UxN.js → markdown-renderer-BM4a9QeZ.js} +1 -1
- package/dist/assets/{mermaid-R2vBM-JH.js → mermaid-BG5ill_a.js} +1 -1
- package/dist/assets/{mode-DjraKyN2.js → mode-BD6zDBBd.js} +1 -1
- package/dist/assets/{multi-map-Cwq--tzY.js → multi-map-C8GlnP-4.js} +1 -1
- package/dist/assets/{name-cell-input-CHmzPoeN.js → name-cell-input-CGevX71g.js} +1 -1
- package/dist/assets/{numbers-CSY3JIgn.js → numbers-iQunIAXf.js} +1 -1
- package/dist/assets/{outline-panel-DMECjI9i.js → outline-panel-BgZXYbEO.js} +1 -1
- package/dist/assets/{packages-panel-CbXV6Rc8.js → packages-panel-8NDUaEZw.js} +1 -1
- package/dist/assets/{panels-B55q0DEo.js → panels-05G4QYfq.js} +1 -1
- package/dist/assets/{process-output-CwcoTocd.js → process-output-nNOt7QtH.js} +1 -1
- package/dist/assets/{readonly-python-code-BlVsu50E.js → readonly-python-code-CfLdThzF.js} +1 -1
- package/dist/assets/{renderShortcut-Dyrbz79Y.js → renderShortcut-DHc-p-_c.js} +1 -1
- package/dist/assets/{run-page-6DKviU71.js → run-page-DvWw2rQu.js} +1 -1
- package/dist/assets/{runs-CAvk6jVz.js → runs-bjsj1D88.js} +1 -1
- package/dist/assets/{scratchpad-panel-CM5InA2G.js → scratchpad-panel-Bzreyj8q.js} +1 -1
- package/dist/assets/{secrets-panel-XDvrD2PC.js → secrets-panel-Br6CcsOE.js} +1 -1
- package/dist/assets/{select-UFziUNxL.js → select-V5IdpNiR.js} +1 -1
- package/dist/assets/{session-panel-CRStSDDj.js → session-panel-CxCUFR_x.js} +1 -1
- package/dist/assets/{share-CKfNi8fD.js → share-CbPtIlnM.js} +1 -1
- package/dist/assets/{slides-component-0GonPC6Y.js → slides-component-DP2pxhDh.js} +1 -1
- package/dist/assets/{snippets-panel-Db-biIgP.js → snippets-panel-BeqbqiKB.js} +1 -1
- package/dist/assets/{spec-DJ3YTCel.js → spec-BSxN05D8.js} +1 -1
- package/dist/assets/{state-D-CqcbQE.js → state-D7LZMIOW.js} +1 -1
- package/dist/assets/{state-CS48Wh7M.js → state-DnUQ1uxR.js} +1 -1
- package/dist/assets/{switch-Di5kBaS8.js → switch-Cx8dJhf6.js} +1 -1
- package/dist/assets/{terminal-nu6YfkVm.js → terminal-DNwT6UrR.js} +1 -1
- package/dist/assets/{textarea-hNyWE2r_.js → textarea-DellDgP4.js} +1 -1
- package/dist/assets/{tooltip-CE4l3v3B.js → tooltip-BGrCWNss.js} +1 -1
- package/dist/assets/{tracing-CDNRUjb9.js → tracing-7U4WTsN0.js} +1 -1
- package/dist/assets/{tracing-panel-CHVKa-9o.js → tracing-panel-BPW1q7K3.js} +2 -2
- package/dist/assets/{type-D8l_U05h.js → type-DUK-1jKc.js} +1 -1
- package/dist/assets/{types-DWpF5HiT.js → types-D5X7ikSD.js} +1 -1
- package/dist/assets/{useAddCell-CklpKCq2.js → useAddCell-bMoxoWAg.js} +1 -1
- package/dist/assets/{useBoolean-BE72e3yb.js → useBoolean-B1Xeh6vA.js} +1 -1
- package/dist/assets/{useCellActionButton-CQQ8dBy_.js → useCellActionButton-0MDUWMcl.js} +1 -1
- package/dist/assets/{useDeleteCell-BRWEDSc9.js → useDeleteCell-BUAQb9OH.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-_ibASMD1.js → useDependencyPanelTab-odtlfdG2.js} +1 -1
- package/dist/assets/{useIframeCapabilities-BVYqWHmA.js → useIframeCapabilities-DuIDx9mD.js} +1 -1
- package/dist/assets/{useInstallPackage-Dxl_p6oW.js → useInstallPackage-Bdnnp5fe.js} +1 -1
- package/dist/assets/{useLifecycle-DvpL8DUJ.js → useLifecycle-ChNbzbYY.js} +1 -1
- package/dist/assets/useNotebookActions-CNWP5yqL.js +1 -0
- package/dist/assets/{useRunCells-jbEa8WGV.js → useRunCells-DyBzMbHe.js} +1 -1
- package/dist/assets/{useSplitCell-CdjW9REr.js → useSplitCell-CyFavQ2l.js} +1 -1
- package/dist/assets/{useTheme-CuyH5VNX.js → useTheme-DUdVAZI8.js} +1 -1
- package/dist/assets/{utilities.esm-eBoXu7lR.js → utilities.esm-j_F9mYkM.js} +1 -1
- package/dist/assets/{utils-CSDCHxwI.js → utils-DXvhzCGS.js} +1 -1
- package/dist/assets/{vega-component-B3_9VVhH.js → vega-component-Dd3MCYZO.js} +1 -1
- package/dist/assets/{write-secret-modal-DfRIeQB5.js → write-secret-modal-CpmU5gbF.js} +1 -1
- package/dist/index.html +67 -67
- package/package.json +1 -1
- package/src/components/editor/actions/useNotebookActions.tsx +5 -3
- package/src/components/editor/header/filename-form.tsx +15 -2
- package/src/components/editor/navigation/__tests__/navigation.test.ts +2 -0
- package/src/components/ui/progress.tsx +22 -5
- package/src/core/export/__tests__/hooks.test.ts +42 -19
- package/src/core/export/hooks.ts +33 -32
- package/src/core/saving/save-component.tsx +1 -0
- package/src/utils/__tests__/download.test.tsx +6 -4
- package/src/utils/__tests__/objects.test.ts +263 -0
- package/src/utils/__tests__/progress.test.ts +156 -0
- package/src/utils/download.ts +7 -2
- package/src/utils/objects.ts +3 -0
- package/src/utils/progress.ts +61 -0
- package/src/utils/toast-progress.tsx +41 -0
- package/dist/assets/download-kUMZIq8-.js +0 -1
- package/dist/assets/hooks-DxXRX-38.js +0 -1
- package/dist/assets/hotkeys-DghjL7BQ.js +0 -1
- package/dist/assets/index-CodxHczV.css +0 -2
- package/dist/assets/links-CUKo4afc.js +0 -1
- package/dist/assets/useNotebookActions-REoVp8xc.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as n}from"./config-BgpK7vqH.js";function t(o){window.open(n(`?file=${o}`).toString(),"_blank")}export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as de}from"./chunk-LvLJmgfZ.js";import{d as N,l as Be,p as Oe,u as ee}from"./useEvent-DO6uJBas.js";import{t as $e}from"./react-BGmjiNul.js";import{$n as Ue,Gn as Ye,Jn as Fe,Rt as Ge,Un as Je,ai as te,dn as Ke,g as Xe,hn as ce,jt as Ze,ln as Qe,m as he,t as et,un as tt,w as pe,yr as at,zt as me}from"./cells-Cvo5AIrZ.js";import{t as W}from"./compiler-runtime-DeeZ7FnK.js";import{i as ot}from"./useLifecycle-DvpL8DUJ.js";import{a as ue}from"./type-D8l_U05h.js";import{n as nt}from"./add-database-form-BtP14Anj.js";import{n as it,x as lt}from"./ai-model-dropdown-GvB-5iLY.js";import{a as fe,d as D}from"./hotkeys-DghjL7BQ.js";import{y as st}from"./utils-CSDCHxwI.js";import{n as _,t as ye}from"./constants-B6Cb__3x.js";import{A as rt,f as dt,j as be,w as ct}from"./config-BgpK7vqH.js";import{t as ht}from"./jsx-runtime-ZmTK25f3.js";import{r as pt,t as ae}from"./button-B3uq-Cpf.js";import{r as P}from"./requests-BsVD4CdD.js";import{t as h}from"./createLucideIcon-CnW3RofX.js";import{a as ke,f as mt,i as xe,m as ut,p as we,u as ge}from"./layout-BkGjQBnQ.js";import{t as je}from"./check-DdfN0k2d.js";import{a as ft,c as yt,i as bt,n as kt,r as xt,s as wt,t as gt}from"./select-UFziUNxL.js";import{a as jt,c as ve,n as Ce,s as vt,t as Ct}from"./download-kUMZIq8-.js";import{f as zt}from"./maps-vcWR7nnr.js";import{r as Mt}from"./useCellActionButton-CQQ8dBy_.js";import{t as Wt}from"./copy-CQ15EONK.js";import{t as _t}from"./download-B9SUL40m.js";import{t as At}from"./eye-off-BhExYOph.js";import{t as St}from"./file-plus-corner-Da9I6dgU.js";import{t as Nt}from"./file-Cs1JbsV6.js";import{i as Dt,n as Pt,r as It,t as Et}from"./youtube-8p26v8EM.js";import{n as Tt,t as Ht}from"./house-DhFkiXz7.js";import{n as Lt}from"./play-BPIh-ZEU.js";import{t as qt}from"./link-BsTPF7B0.js";import{r as Rt}from"./input-BeGfEf2S.js";import{t as Vt}from"./settings-DOXWMfVd.js";import{y as Bt}from"./textarea-hNyWE2r_.js";import{t as Ot}from"./square-C8Tw_XXG.js";import{t as C}from"./use-toast-rmUWldD_.js";import{t as $t}from"./tooltip-CEc2ajau.js";import{a as ze,i as Ut,r as Yt}from"./mode-DjraKyN2.js";import{o as Ft}from"./alert-dialog-Bv1sALHm.js";import{a as Gt,c as Jt,i as Kt,n as Xt,r as Zt}from"./dialog-C5Pa_iIq.js";import{n as oe}from"./ImperativeModal-DstvzsTs.js";import{r as Qt,t as ea}from"./share-CKfNi8fD.js";import{t as O}from"./copy-r7i0SKI4.js";import{r as ta}from"./useRunCells-jbEa8WGV.js";import{a as aa}from"./cell-link-BITMERKQ.js";import{a as Me}from"./renderShortcut-Dyrbz79Y.js";import{t as oa}from"./icons-BhEXrzsb.js";import{t as na}from"./links-CUKo4afc.js";import{r as ia,t as la}from"./hooks-DxXRX-38.js";import{t as We}from"./types-z6Sk3JCV.js";var sa=h("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),ra=h("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),_e=h("clipboard-copy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]),Ae=h("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]),Se=h("diamond-plus",[["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z",key:"1ey20j"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),da=h("fast-forward",[["path",{d:"M12 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 12 18z",key:"b19h5q"}],["path",{d:"M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z",key:"h7h5ge"}]]),ca=h("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]),ha=h("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]),Ne=h("layout-template",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]),pa=h("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),ma=h("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),De=h("presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),ua=h("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),fa=h("square-power",[["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M7.998 9.003a5 5 0 1 0 8-.005",key:"1pek45"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]),Pe=h("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]),Ie=W(),ne=de($e(),1),a=de(ht(),1),$="https://static.marimo.app";const ya=e=>{let t=(0,Ie.c)(25),{onClose:n}=e,[o,l]=(0,ne.useState)(""),{exportAsHTML:r}=P(),s=`${o}-${Math.random().toString(36).slice(2,6)}`,i=`${$}/static/${s}`,d;t[0]!==r||t[1]!==n||t[2]!==s?(d=async v=>{v.preventDefault(),n();let A=await r({download:!1,includeCode:!0,files:mt.INSTANCE.filenames()}),z=C({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${$}/api/static`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:A,path:s})}).catch(()=>{z.dismiss(),C({title:"Error uploading static page",description:(0,a.jsxs)("div",{children:["Please try again later. If the problem persists, please file a bug report on"," ",(0,a.jsx)("a",{href:_.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]})})}),z.dismiss(),C({title:"Static page uploaded!",description:(0,a.jsxs)("div",{children:["The URL has been copied to your clipboard.",(0,a.jsx)("br",{}),"You can share it with anyone."]})})},t[0]=r,t[1]=n,t[2]=s,t[3]=d):d=t[3];let p;t[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(Jt,{children:"Share static notebook"}),t[4]=p):p=t[4];let w;t[5]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsxs)(Gt,{children:[p,(0,a.jsxs)(Zt,{children:["You can publish a static, non-interactive version of this notebook to the public web. We will create a link for you that lives on"," ",(0,a.jsx)("a",{href:$,target:"_blank",children:$}),"."]})]}),t[5]=w):w=t[5];let g;t[6]===Symbol.for("react.memo_cache_sentinel")?(g=v=>{l(v.target.value.toLowerCase().replaceAll(/\s/g,"-").replaceAll(/[^\da-z-]/g,""))},t[6]=g):g=t[6];let m;t[7]===o?m=t[8]:(m=(0,a.jsx)(Rt,{"data-testid":"slug-input",id:"slug",autoFocus:!0,value:o,placeholder:"Notebook slug",onChange:g,required:!0,autoComplete:"off"}),t[7]=o,t[8]=m);let u;t[9]===i?u=t[10]:(u=(0,a.jsxs)("div",{className:"font-semibold text-sm text-muted-foreground gap-2 flex flex-col",children:["Anyone will be able to access your notebook at this URL:",(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(ba,{text:i}),(0,a.jsx)("span",{className:"text-primary",children:i})]})]}),t[9]=i,t[10]=u);let f;t[11]!==m||t[12]!==u?(f=(0,a.jsxs)("div",{className:"flex flex-col gap-6 py-4",children:[m,u]}),t[11]=m,t[12]=u,t[13]=f):f=t[13];let y;t[14]===n?y=t[15]:(y=(0,a.jsx)(ae,{"data-testid":"cancel-share-static-notebook-button",variant:"secondary",onClick:n,children:"Cancel"}),t[14]=n,t[15]=y);let b;t[16]===i?b=t[17]:(b=(0,a.jsx)(ae,{"data-testid":"share-static-notebook-button","aria-label":"Save",variant:"default",type:"submit",onClick:async()=>{await O(i)},children:"Create"}),t[16]=i,t[17]=b);let k;t[18]!==y||t[19]!==b?(k=(0,a.jsxs)(Kt,{children:[y,b]}),t[18]=y,t[19]=b,t[20]=k):k=t[20];let j;return t[21]!==d||t[22]!==k||t[23]!==f?(j=(0,a.jsx)(Xt,{className:"w-fit",children:(0,a.jsxs)("form",{onSubmit:d,children:[w,f,k]})}),t[21]=d,t[22]=k,t[23]=f,t[24]=j):j=t[24],j};var ba=e=>{let t=(0,Ie.c)(8),[n,o]=ne.useState(!1),l;t[0]===e.text?l=t[1]:(l=pt.stopPropagation(async p=>{p.preventDefault(),await O(e.text),o(!0),setTimeout(()=>o(!1),2e3)}),t[0]=e.text,t[1]=l);let r=l,s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(Wt,{size:14,strokeWidth:1.5}),t[2]=s):s=t[2];let i;t[3]===r?i=t[4]:(i=(0,a.jsx)(ae,{"data-testid":"copy-static-notebook-url-button",onClick:r,size:"xs",variant:"secondary",children:s}),t[3]=r,t[4]=i);let d;return t[5]!==n||t[6]!==i?(d=(0,a.jsx)($t,{content:"Copied!",open:n,children:i}),t[5]=n,t[6]=i,t[7]=d):d=t[7],d},ka=W();function xa(){let e=document.getElementsByClassName(ye.outputArea);for(let t of e){let n=t.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=te.findElement(t);if(!o){D.warn("Could not find HTMLCellId for visible output area",t);continue}return{cellId:te.parse(o.id)}}}return D.warn("No visible output area found for scroll anchor"),null}function wa(e){if(!e){D.warn("No scroll anchor provided to restore scroll position");return}let t=document.getElementById(te.create(e.cellId));if(!t){D.warn("Could not find cell element to restore scroll position",e.cellId);return}if(!t.querySelector(`.${ye.outputArea}`)){D.warn("Could not find output area to restore scroll position",e.cellId);return}t.scrollIntoView({block:"start",behavior:"auto"})}function Ee(){let e=(0,ka.c)(2),t=N(ze),n;return e[0]===t?n=e[1]:(n=()=>{let o=xa();t(l=>({mode:Ut(l.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{wa(o)})})},e[0]=t,e[1]=n),n}const Te=Oe(!1);var ga=W();const ja=()=>{let e=(0,ga.c)(7),{selectedLayout:t}=ke(),{setLayoutView:n}=xe();if(be()&&!ce("wasm_layouts"))return null;let o;e[0]===n?o=e[1]:(o=i=>n(i),e[0]=n,e[1]=o);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(wt,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(yt,{placeholder:"Select a view"})}),e[2]=l):l=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(kt,{children:(0,a.jsxs)(xt,{children:[(0,a.jsx)(ft,{children:"View as"}),We.map(Ca)]})}),e[3]=r):r=e[3];let s;return e[4]!==t||e[5]!==o?(s=(0,a.jsxs)(gt,{"data-testid":"layout-select",value:t,onValueChange:o,children:[l,r]}),e[4]=t,e[5]=o,e[6]=s):s=e[6],s};function va(e){return(0,a.jsx)(He(e),{className:"h-4 w-4"})}function He(e){switch(e){case"vertical":return pa;case"grid":return It;case"slides":return De;default:return ot(e),Ot}}function Le(e){return ue(e)}function Ca(e){return(0,a.jsx)(bt,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[va(e),(0,a.jsx)("span",{children:Le(e)})]})},e)}var za=W();function Ma(e){let t=(0,za.c)(5),{openPrompt:n,closeModal:o}=oe(),{sendCopy:l}=P(),r;return t[0]!==o||t[1]!==n||t[2]!==l||t[3]!==e?(r=()=>{if(!e)return null;let s=Ge.guessDeliminator(e);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${me.basename(e)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:i=>{let d=s.join(me.dirname(e),i);l({source:e,destination:d}).then(()=>{o(),C({title:"Notebook copied",description:"A copy of the notebook has been created."}),na(d)})}})},t[0]=o,t[1]=n,t[2]=l,t[3]=e,t[4]=r):r=t[4],r}const Wa=()=>{let{updateCellConfig:e}=pe(),{saveCellConfig:t}=P();return(0,ne.useCallback)(async()=>{let n=new Ze,o=he(),l=o.cellIds.inOrderIds,r={};for(let i of l){if(o.cellData[i]===void 0)continue;let{code:d,config:p}=o.cellData[i];p.hide_code||n.isSupported(d)&&(r[i]={hide_code:!0})}let s=fe.entries(r);if(s.length!==0){await t({configs:r});for(let[i,d]of s)e({cellId:i,config:d})}},[e])};var _a=W();function qe(){let e=(0,_a.c)(4),{openConfirm:t}=oe(),n=N(ct),{sendRestart:o}=P(),l;return e[0]!==t||e[1]!==o||e[2]!==n?(l=()=>{t({title:"Restart Kernel",description:"This will restart the Python kernel. You'll lose all data that's in memory. You will also lose any unsaved changes, so make sure to save your work before restarting.",variant:"destructive",confirmAction:(0,a.jsx)(Ft,{onClick:async()=>{n({state:rt.CLOSING}),await o(),Qt()},"aria-label":"Confirm Restart",children:"Restart"})})},e[0]=t,e[1]=o,e[2]=n,e[3]=l):l=e[3],l}var Aa=W(),I=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation()};function Sa(){var se,re;let e=(0,Aa.c)(40),t=aa(),{openModal:n,closeModal:o}=oe(),{toggleApplication:l}=Qe(),{selectedPanel:r}=tt(),[s]=Be(ze),i=ee(Yt),d=Wa(),[p]=st(),{updateCellConfig:w,undoDeleteCell:g,clearAllCellOutputs:m,addSetupCellIfDoesntExist:u,collapseAllCells:f,expandAllCells:y}=pe(),b=qe(),k=ta(),j=Ma(t),v=N(Te),A=N(it),z=N(lt),{exportAsMarkdown:U,readCode:S,saveCellConfig:Y,updateCellOutputs:F}=P(),G=ee(Xe),J=ee(et),{selectedLayout:K}=ke(),{setLayoutView:X}=xe(),E=Ee(),Z=ia(),T=((se=p.sharing)==null?void 0:se.html)??!0,H=((re=p.sharing)==null?void 0:re.wasm)??!0,L;e[0]===Symbol.for("react.memo_cache_sentinel")?(L=ce("server_side_pdf_export"),e[0]=L):L=e[0];let le=L,q=le||s.mode==="present",Re=Fa,R;e[1]===Symbol.for("react.memo_cache_sentinel")?(R=(0,a.jsx)(_t,{size:14,strokeWidth:1.5}),e[1]=R):R=e[1];let V;e[2]===Symbol.for("react.memo_cache_sentinel")?(V=(0,a.jsx)(we,{size:14,strokeWidth:1.5}),e[2]=V):V=e[2];let M;e[3]===t?M=e[4]:(M=async()=>{if(!t){ie();return}await ge({filename:t,includeCode:!0})},e[3]=t,e[4]=M);let B;return e[5]!==u||e[6]!==J||e[7]!==m||e[8]!==o||e[9]!==f||e[10]!==j||e[11]!==y||e[12]!==U||e[13]!==t||e[14]!==G||e[15]!==d||e[16]!==i||e[17]!==n||e[18]!==q||e[19]!==S||e[20]!==b||e[21]!==k||e[22]!==Y||e[23]!==K||e[24]!==r||e[25]!==v||e[26]!==z||e[27]!==X||e[28]!==A||e[29]!==T||e[30]!==H||e[31]!==M||e[32]!==Z||e[33]!==l||e[34]!==E||e[35]!==g||e[36]!==w||e[37]!==F||e[38]!==s.mode?(B=[{icon:R,label:"Download",handle:I,dropdown:[{icon:V,label:"Download as HTML",handle:M},{icon:(0,a.jsx)(we,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!t){ie();return}await ge({filename:t,includeCode:!1})}},{icon:(0,a.jsx)(oa,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let c=await U({download:!1});Ce(new Blob([c],{type:"text/plain"}),ve.toMarkdown(document.title))}},{icon:(0,a.jsx)(ut,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let c=await S();Ce(new Blob([c.contents],{type:"text/plain"}),ve.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(Lt,{size:14,strokeWidth:1.5}),label:"Download as PNG",disabled:s.mode!=="present",tooltip:s.mode==="present"?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",Me("global.hideCode",!1)]}),handle:Ya},{icon:(0,a.jsx)(Nt,{size:14,strokeWidth:1.5}),label:"Download as PDF",disabled:!q,tooltip:q?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",Me("global.hideCode",!1)]}),handle:async()=>{if(le){if(!t){ie();return}await vt("Downloading PDF...",async()=>{await la(Z,F),await Ct({filename:t,webpdf:!1})});return}let c=new Event("export-beforeprint"),x=new Event("export-afterprint");(function(){window.dispatchEvent(c),setTimeout(Ua,0),setTimeout(()=>window.dispatchEvent(x),0)})()}}]},{icon:(0,a.jsx)(ua,{size:14,strokeWidth:1.5}),label:"Share",handle:I,hidden:!T&&!H,dropdown:[{icon:(0,a.jsx)(Tt,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!T,handle:async()=>{n((0,a.jsx)(ya,{onClose:o}))}},{icon:(0,a.jsx)(qt,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!H,handle:async()=>{await O(ea({code:(await S()).contents})),C({title:"Copied",description:"Link copied to clipboard."})}}]},{icon:(0,a.jsx)(ma,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:I,dropdown:Ke.flatMap(c=>{let{type:x,Icon:Q,hidden:Ve}=c;return Ve?[]:{label:ue(x),rightElement:Re(r===x),icon:(0,a.jsx)(Q,{size:14,strokeWidth:1.5}),handle:()=>l(x)}})},{icon:(0,a.jsx)(De,{size:14,strokeWidth:1.5}),label:"Present as",handle:I,dropdown:[{icon:s.mode==="present"?(0,a.jsx)(Bt,{size:14,strokeWidth:1.5}):(0,a.jsx)(Ne,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{E()}},...We.map((c,x)=>{let Q=He(c);return{divider:x===0,label:Le(c),icon:(0,a.jsx)(Q,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:K===c&&(0,a.jsx)(je,{size:14})}),handle:()=>{X(c),s.mode==="edit"&&E()}}})]},{icon:(0,a.jsx)(ca,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!t||be(),handle:j},{icon:(0,a.jsx)(_e,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!t,handle:async()=>{await O((await S()).contents),C({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(Mt,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!G||i,handle:async()=>{let c=at(he());await Y({configs:fe.fromEntries(c.map($a))});for(let x of c)w({cellId:x,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(Se,{size:14,strokeWidth:1.5}),label:"Add setup cell",handle:()=>{u({})}},{icon:(0,a.jsx)(Ye,{size:14,strokeWidth:1.5}),label:"Add database connection",handle:()=>{n((0,a.jsx)(nt,{onClose:o}))}},{icon:(0,a.jsx)(Pe,{size:14,strokeWidth:1.5}),label:"Undo cell deletion",hidden:!J||i,handle:()=>{g()}},{icon:(0,a.jsx)(fa,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:b},{icon:(0,a.jsx)(da,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{k()}},{icon:(0,a.jsx)(Fe,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{m()}},{icon:(0,a.jsx)(At,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",handle:d,redundant:!0},{icon:(0,a.jsx)(ra,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:f,redundant:!0},{icon:(0,a.jsx)(sa,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:y,redundant:!0},{divider:!0,icon:(0,a.jsx)(Ae,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>v(Oa)},{icon:(0,a.jsx)(ha,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>z(Ba)},{icon:(0,a.jsx)(Vt,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>A(Va),redundant:!0},{icon:(0,a.jsx)(zt,{size:14,strokeWidth:1.5}),label:"Resources",handle:I,dropdown:[{icon:(0,a.jsx)(Ue,{size:14,strokeWidth:1.5}),label:"Documentation",handle:Ra},{icon:(0,a.jsx)(Dt,{size:14,strokeWidth:1.5}),label:"GitHub",handle:qa},{icon:(0,a.jsx)(Pt,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:La},{icon:(0,a.jsx)(Et,{size:14,strokeWidth:1.5}),label:"YouTube",handle:Ha},{icon:(0,a.jsx)(Je,{size:14,strokeWidth:1.5}),label:"Changelog",handle:Ta}]},{divider:!0,icon:(0,a.jsx)(Ht,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:Ea},{icon:(0,a.jsx)(St,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:Ia}].filter(Pa).map(Na),e[5]=u,e[6]=J,e[7]=m,e[8]=o,e[9]=f,e[10]=j,e[11]=y,e[12]=U,e[13]=t,e[14]=G,e[15]=d,e[16]=i,e[17]=n,e[18]=q,e[19]=S,e[20]=b,e[21]=k,e[22]=Y,e[23]=K,e[24]=r,e[25]=v,e[26]=z,e[27]=X,e[28]=A,e[29]=T,e[30]=H,e[31]=M,e[32]=Z,e[33]=l,e[34]=E,e[35]=g,e[36]=w,e[37]=F,e[38]=s.mode,e[39]=B):B=e[39],B}function Na(e){return e.dropdown?{...e,dropdown:e.dropdown.filter(Da)}:e}function Da(e){return!e.hidden}function Pa(e){return!e.hidden}function Ia(){let e=dt();window.open(e,"_blank")}function Ea(){let e=document.baseURI.split("?")[0];window.open(e,"_self")}function Ta(){window.open(_.releasesPage,"_blank")}function Ha(){window.open(_.youtube,"_blank")}function La(){window.open(_.discordLink,"_blank")}function qa(){window.open(_.githubPage,"_blank")}function Ra(){window.open(_.docsPage,"_blank")}function Va(e){return!e}function Ba(e){return!e}function Oa(e){return!e}function $a(e){return[e,{disabled:!1}]}function Ua(){return window.print()}async function Ya(){let e=document.getElementById("App");e&&await jt({element:e,filename:document.title})}function Fa(e){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:e&&(0,a.jsx)(je,{size:14})})}function ie(){C({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{Ee as a,Se as c,Te as i,Ae as l,qe as n,Pe as o,ja as r,Ne as s,Sa as t,_e as u};
|