@marimo-team/frontend 0.23.4-dev18 → 0.23.4-dev19

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.
Files changed (29) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-DgruBYR5.js → ConnectedDataExplorerComponent-BPVOWDZX.js} +1 -1
  2. package/dist/assets/{JsonOutput-D5TiQGJ4.js → JsonOutput-Czb2TmJ4.js} +2 -2
  3. package/dist/assets/{add-connection-dialog-Dg6K--Uw.js → add-connection-dialog-G4wHI7_B.js} +1 -1
  4. package/dist/assets/{agent-panel-oPuvVsjs.js → agent-panel-phdI_3um.js} +1 -1
  5. package/dist/assets/{cell-editor-CdyZleud.js → cell-editor-Bobxvl7m.js} +1 -1
  6. package/dist/assets/{column-preview-B1KZjh-X.js → column-preview-B8GVi5XJ.js} +1 -1
  7. package/dist/assets/{command-palette-C7AbtCWz.js → command-palette-XgZRZfKU.js} +1 -1
  8. package/dist/assets/{edit-page-CbGDoOay.js → edit-page-Brche0Kt.js} +3 -3
  9. package/dist/assets/{file-explorer-panel-Cjlf3QNa.js → file-explorer-panel-BLRkSfjQ.js} +1 -1
  10. package/dist/assets/{form-D1abghOq.js → form-CkSHaI0F.js} +1 -1
  11. package/dist/assets/{hooks-4gSLiehn.js → hooks-GRIf_L9K.js} +1 -1
  12. package/dist/assets/{index-rjcv10Dv.js → index-DNAFmNNQ.js} +5 -5
  13. package/dist/assets/{layout-C4u-1iTo.js → layout-LtK-XwMq.js} +3 -3
  14. package/dist/assets/{panels-CpvbcuTn.js → panels-BLS3SEXF.js} +1 -1
  15. package/dist/assets/react-vega-BQXvtE5G.js +188 -0
  16. package/dist/assets/{react-vega-8VhWN23c.js → react-vega-BVATzlrQ.js} +1 -1
  17. package/dist/assets/{reveal-component-C2X5QJAC.js → reveal-component-CDRFYh8-.js} +1 -1
  18. package/dist/assets/{run-page-BYdI3kiE.js → run-page--UnWNqEX.js} +1 -1
  19. package/dist/assets/{scratchpad-panel-BP6-rZV6.js → scratchpad-panel-JHDLg327.js} +1 -1
  20. package/dist/assets/{session-panel-YGK2D21A.js → session-panel-DlD6bUAC.js} +1 -1
  21. package/dist/assets/{slide-form-BE8M6oJo.js → slide-form-BggQ8pFx.js} +1 -1
  22. package/dist/assets/{state-CoUA-8Ay.js → state-DVtVR8-c.js} +1 -1
  23. package/dist/assets/{tracing-DjZGgWTo.js → tracing-BZPLfSlB.js} +1 -1
  24. package/dist/assets/{tracing-panel-8eFzEjG0.js → tracing-panel-DBaQBraG.js} +2 -2
  25. package/dist/assets/{useNotebookActions-bCZiRDS-.js → useNotebookActions-DtGrNgJ9.js} +1 -1
  26. package/dist/assets/{vega-component-DTWLzrN1.js → vega-component-BnaMdpJB.js} +1 -1
  27. package/dist/index.html +5 -5
  28. package/package.json +2 -2
  29. package/dist/assets/react-vega-Dprex0g5.js +0 -190
@@ -1,4 +1,4 @@
1
- import{s as qe}from"./chunk-LvLJmgfZ.js";import{i as Rt,l as ke,n as ee,p as Ue,u as ye}from"./useEvent-D91BmmQi.js";import{t as At}from"./react-Bj1aDYRI.js";import{E as Et,Nn as We,_r as It,hi as Ht,yi as Ge}from"./cells-A-ljPpuj.js";import"./react-dom-CSu739Rf.js";import{t as fe}from"./compiler-runtime-B3qBwwSJ.js";import{_ as Me}from"./useEventListener-BR0C1MaI.js";import{t as Lt}from"./invariant-BUdrueMv.js";import{p as Vt,u as Je}from"./utils-DIGrmLDO.js";import{S as _e}from"./config-ChCHm539.js";import{t as ie}from"./cn-DCUzRj2J.js";import{t as Bt}from"./jsx-runtime-BqBOg78p.js";import"./fullscreen-BDxedMYP.js";import{n as qt}from"./multi-map-rafH3cg3.js";import{o as Ut}from"./alert-dialog-BGBdrcqJ.js";import"./popover-UExmgBsf.js";import{a as E,c as ue,p as Wt,r as Gt,t as Jt}from"./dropdown-menu-D1A3cFC8.js";import{a as Kt,bt as De,i as Ke,o as Ce}from"./JsonOutput-D5TiQGJ4.js";import{c as Yt,i as ze,r as Fe}from"./download-Iyng0xCz.js";import{t as I}from"./tooltip-Gcwqb_SK.js";import{n as Xt,t as $}from"./button-D9nb17Rw.js";import{St as Zt}from"./dist-BrR4M-k3.js";import"./cjs-BRGiG41H.js";import"./main-B0OX4z33.js";import"./useNonce-DfoVjkkH.js";import{n as Qt,r as Pe}from"./requests-DIwGYs0l.js";import{t as re}from"./createLucideIcon-D5guW7EU.js";import{a as Ye,c as Xe,i as Ze,n as Se,o as Te,r as ea,t as ta}from"./state-svfaehZt.js";import{n as aa}from"./LazyAnyLanguageCodeMirror-0gZO1asr.js";import{t as na}from"./x-C-6liIBr.js";import{n as Oe}from"./maps-C48Oksn0.js";import{n as $e}from"./markdown-renderer-CFrgiLqu.js";import{u as ra}from"./toDate-B5A0DFEz.js";import{t as Qe}from"./copy-Dk_3y0H-.js";import{t as sa}from"./eye-off-BT-KOYV5.js";import{a as oa,i as et,n as tt,r as la,t as ia}from"./file-icons-DTNZv05h.js";import{t as at}from"./file-HTLbeC2b.js";import{i as nt,r as ca,t as rt}from"./add-connection-dialog-Dg6K--Uw.js";import{n as Re,t as da}from"./spinner-Bhir8k53.js";import{a as ma,c as pa,d as ha,f as xa,i as fa,l as ua,n as ya,r as ja,t as ga,u as ba}from"./file-name-input-CLlFR7p-.js";import{t as st}from"./plus-BgB18UzY.js";import{t as ot}from"./refresh-cw-DHwG4Mac.js";import{t as va}from"./save-Clg5dMoP.js";import{t as wa}from"./triangle-alert-DBoAWWKA.js";import{n as Na,t as ka}from"./es-YQvzKo5h.js";import"./dist-Ds4ite_2.js";import"./dist-CEysMnMQ.js";import"./dist-DGxytjtv.js";import"./dist-DZ2qbK2N.js";import"./dist-CRPTyqAT.js";import{t as te}from"./use-toast-BDYuj3zG.js";import{t as _a}from"./paths-CXng2XQv.js";import"./session-nmTRerwF.js";import"./purify.es-DC4RGS9t.js";import"./dates-DhByPWH5.js";import{n as je}from"./copy-B5qyZn5s.js";import{t as Ca}from"./copy-icon-C67c9EwB.js";import{t as lt}from"./context-DGqo1TbK.js";import{n as it}from"./ImperativeModal-BBqcKmmk.js";import{n as Fa,t as ct}from"./blob-CTort_or.js";import"./utils-Bq5kLQ87.js";import"./vega-loader.browser-DXARUlxo.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import{n as Sa,t as Ma}from"./alert-cDholnQq.js";import{n as dt}from"./error-banner-CTBwdcdk.js";import{n as Ae}from"./useAsyncData-dS4Ne6pU.js";import{a as Da,o as mt,t as za,u as Pa}from"./command-CXDOCJwp.js";import"./chunk-5FQGJX7Z-B4RvNAGm.js";import"./html-to-image-tbPEMBJg.js";import{o as Ta}from"./focus-Baz7rlo0.js";import"./react-resizable-panels.browser.esm-Bcm5njwd.js";import{a as Oa}from"./renderShortcut-CkNNAheg.js";import{t as $a}from"./bundle.esm-DU-4isVC.js";import{t as pt}from"./useAddCell-De9xD63_.js";import{i as Ee,n as Ra,r as ht,t as ge}from"./tree-actions-oMCx6WNc.js";import{a as Aa}from"./components-FepcpFGL.js";import{n as Ea}from"./pathUtils-CSrNy17a.js";import{t as Ia}from"./empty-state-CsVQSqKA.js";import{t as Ie}from"./formatting-Cncf6ptO.js";import{a as Ha,i as La,n as xt,r as ft,t as ut}from"./components-BDnRtsA5.js";import{n as yt,t as Va}from"./marimo-icons-BSB-Z_W3.js";import{t as Ba}from"./links-BHtUMVOq.js";var qa=re("book-plus",[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]),Ua=re("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),jt=re("file-plus-corner",[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]]),Wa=re("file-symlink",[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",key:"huwfnr"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 18 3-3-3-3",key:"18f6ys"}]]),gt=re("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),bt=re("list-tree",[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]),Ga=re("square-play",[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]]),vt=re("view",[["path",{d:"M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2",key:"mrq65r"}],["path",{d:"M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2",key:"be3xqs"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]),T=qe(At(),1),Ja=fe(),a=qe(Bt(),1);const wt=t=>{let e=(0,Ja.c)(17),{filename:n,filenameIcon:i,onBack:l,onRefresh:r,onDownload:d,actions:c}=t,h;e[0]===l?h=e[1]:(h=l&&(0,a.jsx)(I,{content:"Back to file list",children:(0,a.jsx)($,{variant:"text",size:"xs",onClick:l,children:(0,a.jsx)(Xe,{className:"h-4 w-4"})})}),e[0]=l,e[1]=h);let s;e[2]!==n||e[3]!==i?(s=n?(0,a.jsxs)("span",{className:"flex items-center gap-1.5 flex-1 min-w-0 text-xs font-semibold truncate",children:[i,n]}):(0,a.jsx)("span",{className:"flex-1"}),e[2]=n,e[3]=i,e[4]=s):s=e[4];let y;e[5]===r?y=e[6]:(y=r&&(0,a.jsx)(I,{content:"Refresh",children:(0,a.jsx)($,{variant:"text",size:"xs",onClick:r,children:(0,a.jsx)(ot,{className:"h-3.5 w-3.5"})})}),e[5]=r,e[6]=y);let x;e[7]===d?x=e[8]:(x=d&&(0,a.jsx)(I,{content:"Download",children:(0,a.jsx)($,{variant:"text",size:"xs",onClick:d,children:(0,a.jsx)(De,{className:"h-3.5 w-3.5"})})}),e[7]=d,e[8]=x);let p;e[9]!==c||e[10]!==y||e[11]!==x?(p=(0,a.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[y,c,x]}),e[9]=c,e[10]=y,e[11]=x,e[12]=p):p=e[12];let u;return e[13]!==h||e[14]!==s||e[15]!==p?(u=(0,a.jsxs)("div",{className:"flex items-center shrink-0 border-b px-1 gap-1",children:[h,s,p]}),e[13]=h,e[14]=s,e[15]=p,e[16]=u):u=e[16],u};var Ka=new Set(["http","file","in-memory"]);function He(t){return JSON.stringify(t).slice(1,-1)}const Nt=[{id:"read-file",label:"Insert read snippet",icon:qa,getCode:t=>{if(t.entry.kind==="directory")return null;let e=He(t.entry.path);return t.backendType==="obstore"?`_data = ${t.variableName}.get("${e}").bytes()
1
+ import{s as qe}from"./chunk-LvLJmgfZ.js";import{i as Rt,l as ke,n as ee,p as Ue,u as ye}from"./useEvent-D91BmmQi.js";import{t as At}from"./react-Bj1aDYRI.js";import{E as Et,Nn as We,_r as It,hi as Ht,yi as Ge}from"./cells-A-ljPpuj.js";import"./react-dom-CSu739Rf.js";import{t as fe}from"./compiler-runtime-B3qBwwSJ.js";import{_ as Me}from"./useEventListener-BR0C1MaI.js";import{t as Lt}from"./invariant-BUdrueMv.js";import{p as Vt,u as Je}from"./utils-DIGrmLDO.js";import{S as _e}from"./config-ChCHm539.js";import{t as ie}from"./cn-DCUzRj2J.js";import{t as Bt}from"./jsx-runtime-BqBOg78p.js";import"./fullscreen-BDxedMYP.js";import{n as qt}from"./multi-map-rafH3cg3.js";import{o as Ut}from"./alert-dialog-BGBdrcqJ.js";import"./popover-UExmgBsf.js";import{a as E,c as ue,p as Wt,r as Gt,t as Jt}from"./dropdown-menu-D1A3cFC8.js";import{a as Kt,bt as De,i as Ke,o as Ce}from"./JsonOutput-Czb2TmJ4.js";import{c as Yt,i as ze,r as Fe}from"./download-Iyng0xCz.js";import{t as I}from"./tooltip-Gcwqb_SK.js";import{n as Xt,t as $}from"./button-D9nb17Rw.js";import{St as Zt}from"./dist-BrR4M-k3.js";import"./cjs-BRGiG41H.js";import"./main-B0OX4z33.js";import"./useNonce-DfoVjkkH.js";import{n as Qt,r as Pe}from"./requests-DIwGYs0l.js";import{t as re}from"./createLucideIcon-D5guW7EU.js";import{a as Ye,c as Xe,i as Ze,n as Se,o as Te,r as ea,t as ta}from"./state-svfaehZt.js";import{n as aa}from"./LazyAnyLanguageCodeMirror-0gZO1asr.js";import{t as na}from"./x-C-6liIBr.js";import{n as Oe}from"./maps-C48Oksn0.js";import{n as $e}from"./markdown-renderer-CFrgiLqu.js";import{u as ra}from"./toDate-B5A0DFEz.js";import{t as Qe}from"./copy-Dk_3y0H-.js";import{t as sa}from"./eye-off-BT-KOYV5.js";import{a as oa,i as et,n as tt,r as la,t as ia}from"./file-icons-DTNZv05h.js";import{t as at}from"./file-HTLbeC2b.js";import{i as nt,r as ca,t as rt}from"./add-connection-dialog-G4wHI7_B.js";import{n as Re,t as da}from"./spinner-Bhir8k53.js";import{a as ma,c as pa,d as ha,f as xa,i as fa,l as ua,n as ya,r as ja,t as ga,u as ba}from"./file-name-input-CLlFR7p-.js";import{t as st}from"./plus-BgB18UzY.js";import{t as ot}from"./refresh-cw-DHwG4Mac.js";import{t as va}from"./save-Clg5dMoP.js";import{t as wa}from"./triangle-alert-DBoAWWKA.js";import{n as Na,t as ka}from"./es-YQvzKo5h.js";import"./dist-Ds4ite_2.js";import"./dist-CEysMnMQ.js";import"./dist-DGxytjtv.js";import"./dist-DZ2qbK2N.js";import"./dist-CRPTyqAT.js";import{t as te}from"./use-toast-BDYuj3zG.js";import{t as _a}from"./paths-CXng2XQv.js";import"./session-nmTRerwF.js";import"./purify.es-DC4RGS9t.js";import"./dates-DhByPWH5.js";import{n as je}from"./copy-B5qyZn5s.js";import{t as Ca}from"./copy-icon-C67c9EwB.js";import{t as lt}from"./context-DGqo1TbK.js";import{n as it}from"./ImperativeModal-BBqcKmmk.js";import{n as Fa,t as ct}from"./blob-CTort_or.js";import"./utils-Bq5kLQ87.js";import"./vega-loader.browser-DXARUlxo.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import{n as Sa,t as Ma}from"./alert-cDholnQq.js";import{n as dt}from"./error-banner-CTBwdcdk.js";import{n as Ae}from"./useAsyncData-dS4Ne6pU.js";import{a as Da,o as mt,t as za,u as Pa}from"./command-CXDOCJwp.js";import"./chunk-5FQGJX7Z-B4RvNAGm.js";import"./html-to-image-tbPEMBJg.js";import{o as Ta}from"./focus-Baz7rlo0.js";import"./react-resizable-panels.browser.esm-Bcm5njwd.js";import{a as Oa}from"./renderShortcut-CkNNAheg.js";import{t as $a}from"./bundle.esm-DU-4isVC.js";import{t as pt}from"./useAddCell-De9xD63_.js";import{i as Ee,n as Ra,r as ht,t as ge}from"./tree-actions-oMCx6WNc.js";import{a as Aa}from"./components-FepcpFGL.js";import{n as Ea}from"./pathUtils-CSrNy17a.js";import{t as Ia}from"./empty-state-CsVQSqKA.js";import{t as Ie}from"./formatting-Cncf6ptO.js";import{a as Ha,i as La,n as xt,r as ft,t as ut}from"./components-BDnRtsA5.js";import{n as yt,t as Va}from"./marimo-icons-BSB-Z_W3.js";import{t as Ba}from"./links-BHtUMVOq.js";var qa=re("book-plus",[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]),Ua=re("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),jt=re("file-plus-corner",[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]]),Wa=re("file-symlink",[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",key:"huwfnr"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 18 3-3-3-3",key:"18f6ys"}]]),gt=re("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),bt=re("list-tree",[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]),Ga=re("square-play",[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]]),vt=re("view",[["path",{d:"M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2",key:"mrq65r"}],["path",{d:"M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2",key:"be3xqs"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]),T=qe(At(),1),Ja=fe(),a=qe(Bt(),1);const wt=t=>{let e=(0,Ja.c)(17),{filename:n,filenameIcon:i,onBack:l,onRefresh:r,onDownload:d,actions:c}=t,h;e[0]===l?h=e[1]:(h=l&&(0,a.jsx)(I,{content:"Back to file list",children:(0,a.jsx)($,{variant:"text",size:"xs",onClick:l,children:(0,a.jsx)(Xe,{className:"h-4 w-4"})})}),e[0]=l,e[1]=h);let s;e[2]!==n||e[3]!==i?(s=n?(0,a.jsxs)("span",{className:"flex items-center gap-1.5 flex-1 min-w-0 text-xs font-semibold truncate",children:[i,n]}):(0,a.jsx)("span",{className:"flex-1"}),e[2]=n,e[3]=i,e[4]=s):s=e[4];let y;e[5]===r?y=e[6]:(y=r&&(0,a.jsx)(I,{content:"Refresh",children:(0,a.jsx)($,{variant:"text",size:"xs",onClick:r,children:(0,a.jsx)(ot,{className:"h-3.5 w-3.5"})})}),e[5]=r,e[6]=y);let x;e[7]===d?x=e[8]:(x=d&&(0,a.jsx)(I,{content:"Download",children:(0,a.jsx)($,{variant:"text",size:"xs",onClick:d,children:(0,a.jsx)(De,{className:"h-3.5 w-3.5"})})}),e[7]=d,e[8]=x);let p;e[9]!==c||e[10]!==y||e[11]!==x?(p=(0,a.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[y,c,x]}),e[9]=c,e[10]=y,e[11]=x,e[12]=p):p=e[12];let u;return e[13]!==h||e[14]!==s||e[15]!==p?(u=(0,a.jsxs)("div",{className:"flex items-center shrink-0 border-b px-1 gap-1",children:[h,s,p]}),e[13]=h,e[14]=s,e[15]=p,e[16]=u):u=e[16],u};var Ka=new Set(["http","file","in-memory"]);function He(t){return JSON.stringify(t).slice(1,-1)}const Nt=[{id:"read-file",label:"Insert read snippet",icon:qa,getCode:t=>{if(t.entry.kind==="directory")return null;let e=He(t.entry.path);return t.backendType==="obstore"?`_data = ${t.variableName}.get("${e}").bytes()
2
2
  _data`:`_data = ${t.variableName}.cat_file("${e}")
3
3
  _data`}},{id:"download-file",label:"Insert download snippet",icon:Wa,getCode:t=>{if(t.entry.kind==="directory")return null;let e=He(t.entry.path);if(t.backendType==="obstore")return Ka.has(t.protocol)?null:`from datetime import timedelta
4
4
  from obstore import sign
@@ -1,2 +1,2 @@
1
- import{s as H}from"./chunk-LvLJmgfZ.js";import{t as fe}from"./react-Bj1aDYRI.js";import{Rt as xe}from"./cells-A-ljPpuj.js";import{_ as Q,c as ue,d as Z,f as F,g as je,h as I,l as ve,m as ge,o as be,p as E,s as ye,t as q,u as W,y as B}from"./zod-H_cgTO0M.js";import{t as X}from"./compiler-runtime-B3qBwwSJ.js";import{_ as we,d as Ce}from"./useEventListener-BR0C1MaI.js";import{t as K}from"./cn-DCUzRj2J.js";import{t as Ne}from"./jsx-runtime-BqBOg78p.js";import{c as Se,i as Y,l as ke,n as Oe,r as Ve,s as $e,t as Ae}from"./select-5i7URBEn.js";import{k as Le,v as ee,y as ne}from"./JsonOutput-D5TiQGJ4.js";import{t as _e}from"./label-DTR8T0AE.js";import{n as ze,t as Ee}from"./radio-group-BtBoRbGH.js";import{t as Me}from"./tooltip-Gcwqb_SK.js";import{r as Pe,t as re}from"./button-D9nb17Rw.js";import{t as se}from"./strings-md4mFbOQ.js";import{t as Te}from"./createLucideIcon-D5guW7EU.js";import{t as De}from"./plus-BgB18UzY.js";import{t as Je}from"./refresh-ccw-C-n2VFP5.js";import{n as Ze,t as R}from"./input-DyPS_GiK.js";import{a as k,c as w,d as O,h as Fe,l as V,m as Ie,o as S,r as te,u as y,y as qe}from"./textarea-Dd0InTQJ.js";import{t as Be}from"./trash-2-D280Xiwg.js";var Ke=Te("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);const A={of(r){return JSON.stringify(r)},parse(r){if(!r)return{};try{return JSON.parse(r)}catch{return{label:r}}}};function ae(){return Math.floor(Math.random()*1e5)}function Re(r){return r instanceof q.ZodArray}function le(r){return r instanceof q.ZodPipe}function Ue(r){return r instanceof q.ZodTuple}function ie(r){return"unwrap"in r?r.unwrap():r}function D(r){let e=t=>{if(t instanceof E){let a=[...t.values];return t.values.size===1?a[0]:a}if(t instanceof W){let a=t.def.defaultValue;return typeof a=="function"?a():a}if(le(t))return e(t.in);if(Ue(t))return t.def.items.map(a=>e(a));if("unwrap"in t)return e(ie(t))};return r instanceof B||r instanceof Z?e(r.options[0]):Re(r)?Ge(r)?[D(r.element)]:[]:r instanceof Q?"":r instanceof F?r.options[0]:r instanceof I?Object.fromEntries(Object.entries(r.shape).map(([t,a])=>[t,e(a)])):e(r)}function _(r){if(r instanceof E)return r;if(r instanceof I){let e=r.shape.type;if(e instanceof E)return e;throw Error("Invalid schema")}if(r instanceof B||r instanceof Z)return _(r.options[0]);throw we.warn(r),Error("Invalid schema")}function Ge(r){return!r.safeParse([]).success}var oe=X(),ce=H(fe(),1),n=H(Ne(),1),de=`
1
+ import{s as H}from"./chunk-LvLJmgfZ.js";import{t as fe}from"./react-Bj1aDYRI.js";import{Rt as xe}from"./cells-A-ljPpuj.js";import{_ as Q,c as ue,d as Z,f as F,g as je,h as I,l as ve,m as ge,o as be,p as E,s as ye,t as q,u as W,y as B}from"./zod-H_cgTO0M.js";import{t as X}from"./compiler-runtime-B3qBwwSJ.js";import{_ as we,d as Ce}from"./useEventListener-BR0C1MaI.js";import{t as K}from"./cn-DCUzRj2J.js";import{t as Ne}from"./jsx-runtime-BqBOg78p.js";import{c as Se,i as Y,l as ke,n as Oe,r as Ve,s as $e,t as Ae}from"./select-5i7URBEn.js";import{k as Le,v as ee,y as ne}from"./JsonOutput-Czb2TmJ4.js";import{t as _e}from"./label-DTR8T0AE.js";import{n as ze,t as Ee}from"./radio-group-BtBoRbGH.js";import{t as Me}from"./tooltip-Gcwqb_SK.js";import{r as Pe,t as re}from"./button-D9nb17Rw.js";import{t as se}from"./strings-md4mFbOQ.js";import{t as Te}from"./createLucideIcon-D5guW7EU.js";import{t as De}from"./plus-BgB18UzY.js";import{t as Je}from"./refresh-ccw-C-n2VFP5.js";import{n as Ze,t as R}from"./input-DyPS_GiK.js";import{a as k,c as w,d as O,h as Fe,l as V,m as Ie,o as S,r as te,u as y,y as qe}from"./textarea-Dd0InTQJ.js";import{t as Be}from"./trash-2-D280Xiwg.js";var Ke=Te("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);const A={of(r){return JSON.stringify(r)},parse(r){if(!r)return{};try{return JSON.parse(r)}catch{return{label:r}}}};function ae(){return Math.floor(Math.random()*1e5)}function Re(r){return r instanceof q.ZodArray}function le(r){return r instanceof q.ZodPipe}function Ue(r){return r instanceof q.ZodTuple}function ie(r){return"unwrap"in r?r.unwrap():r}function D(r){let e=t=>{if(t instanceof E){let a=[...t.values];return t.values.size===1?a[0]:a}if(t instanceof W){let a=t.def.defaultValue;return typeof a=="function"?a():a}if(le(t))return e(t.in);if(Ue(t))return t.def.items.map(a=>e(a));if("unwrap"in t)return e(ie(t))};return r instanceof B||r instanceof Z?e(r.options[0]):Re(r)?Ge(r)?[D(r.element)]:[]:r instanceof Q?"":r instanceof F?r.options[0]:r instanceof I?Object.fromEntries(Object.entries(r.shape).map(([t,a])=>[t,e(a)])):e(r)}function _(r){if(r instanceof E)return r;if(r instanceof I){let e=r.shape.type;if(e instanceof E)return e;throw Error("Invalid schema")}if(r instanceof B||r instanceof Z)return _(r.options[0]);throw we.warn(r),Error("Invalid schema")}function Ge(r){return!r.safeParse([]).success}var oe=X(),ce=H(fe(),1),n=H(Ne(),1),de=`
2
2
  `;const pe=r=>{let e=(0,oe.c)(24),{value:t,options:a,onChange:l,className:d,placeholder:o,textAreaClassName:h,comboBoxClassName:m}=r,[s,i]=(0,ce.useState)(!1),p;e[0]===t?p=e[1]:(p=J(t),e[0]=t,e[1]=p);let f=p,x;e[2]!==m||e[3]!==l||e[4]!==a||e[5]!==o||e[6]!==s||e[7]!==h||e[8]!==f?(x=()=>s?(0,n.jsx)(U,{value:f,className:h,onChange:l,placeholder:o?`${o}: one per line`:"One value per line"}):(0,n.jsx)(ee,{placeholder:o,displayValue:He,className:K("w-full max-w-[400px]",m),multiple:!0,value:f,onValueChange:l,keepPopoverOpenOnSelect:!0,chips:!0,chipsClassName:"flex-row flex-wrap min-w-[210px]",children:a.map(Qe)}),e[2]=m,e[3]=l,e[4]=a,e[5]=o,e[6]=s,e[7]=h,e[8]=f,e[9]=x):x=e[9];let c=x,v;e[10]===d?v=e[11]:(v=K("flex gap-1",d),e[10]=d,e[11]=v);let u;e[12]===c?u=e[13]:(u=c(),e[12]=c,e[13]=u);let g=s?"Switch to multi-select":"Switch to textarea",j;e[14]===Symbol.for("react.memo_cache_sentinel")?(j=(0,n.jsx)(qe,{className:"w-3 h-3"}),e[14]=j):j=e[14];let b;e[15]===s?b=e[16]:(b=(0,n.jsx)(Le,{size:"xs",onPressedChange:i,pressed:s,children:j}),e[15]=s,e[16]=b);let C;e[17]!==g||e[18]!==b?(C=(0,n.jsx)(Me,{content:g,children:b}),e[17]=g,e[18]=b,e[19]=C):C=e[19];let N;return e[20]!==v||e[21]!==u||e[22]!==C?(N=(0,n.jsxs)("div",{className:v,children:[u,C]}),e[20]=v,e[21]=u,e[22]=C,e[23]=N):N=e[23],N},U=r=>{let e=(0,oe.c)(11),{className:t,value:a,onChange:l,placeholder:d}=r,o,h;if(e[0]!==a){let p=J(a);o=te,h=p.join(de),e[0]=a,e[1]=o,e[2]=h}else o=e[1],h=e[2];let m;e[3]===l?m=e[4]:(m=p=>{if(p.target.value===""){l([]);return}l(p.target.value.split(de))},e[3]=l,e[4]=m);let s=d?`${d}: one per line`:"One value per line",i;return e[5]!==o||e[6]!==t||e[7]!==h||e[8]!==m||e[9]!==s?(i=(0,n.jsx)(o,{value:h,className:t,rows:4,onChange:m,placeholder:s}),e[5]=o,e[6]=t,e[7]=h,e[8]=m,e[9]=s,e[10]=i):i=e[10],i};function J(r){return r==null?[]:Array.isArray(r)?r:[r].filter(e=>e!=null||e!=="")}function He(r){return r}function Qe(r){return(0,n.jsx)(ne,{value:r,children:r},r)}var z=X();const We=r=>{let e=(0,z.c)(11),{schema:t,form:a,path:l,renderers:d,children:o}=r,h=l===void 0?"":l,m;e[0]===d?m=e[1]:(m=d===void 0?[]:d,e[0]=d,e[1]=m);let s=m,i;e[2]!==a||e[3]!==h||e[4]!==s||e[5]!==t?(i=$(t,a,h,s),e[2]=a,e[3]=h,e[4]=s,e[5]=t,e[6]=i):i=e[6];let p;return e[7]!==o||e[8]!==a||e[9]!==i?(p=(0,n.jsxs)(Ie,{...a,children:[o,i]}),e[7]=o,e[8]=a,e[9]=i,e[10]=p):p=e[10],p};function $(r,e,t,a){for(let s of a){let{isMatch:i,Component:p}=s;if(i(r))return(0,n.jsx)(p,{schema:r,form:e,path:t})}let{label:l,description:d,special:o,direction:h="column",minLength:m}=A.parse(r.description||"");if(r instanceof W){let s=r.unwrap();return s=!s.description&&r.description?s.describe(r.description):s,$(s,e,t,a)}if(r instanceof je){let s=r.unwrap();return s=!s.description&&r.description?s.describe(r.description):s,$(s,e,t,a)}if(r instanceof I)return(0,n.jsxs)("div",{className:K("flex",h==="row"?"flex-row gap-6 items-start":h==="two-columns"?"grid grid-cols-2 gap-y-6":"flex-col gap-6"),children:[(0,n.jsx)(y,{children:l}),Ce.entries(r.shape).map(([s,i])=>{let p=i instanceof E,f=$(i,e,rn(t,s),a);return p?(0,n.jsx)(ce.Fragment,{children:f},s):(0,n.jsx)("div",{className:"flex flex-row align-start",children:f},s)})]});if(r instanceof Q)return o==="time"?(0,n.jsx)(w,{control:e.control,name:t,render:({field:s})=>(0,n.jsxs)(V,{children:[(0,n.jsx)(y,{children:l}),(0,n.jsx)(S,{children:d}),(0,n.jsx)(k,{children:(0,n.jsx)(R,{...s,onValueChange:s.onChange,type:"time",className:"my-0"})}),(0,n.jsx)(O,{})]})}):(0,n.jsx)(me,{schema:r,form:e,path:t});if(r instanceof ue)return(0,n.jsx)(w,{control:e.control,name:t,render:({field:s})=>(0,n.jsxs)(V,{children:[(0,n.jsxs)("div",{className:"flex flex-row items-start space-x-2",children:[(0,n.jsx)(y,{children:l}),(0,n.jsx)(S,{children:d}),(0,n.jsx)(k,{children:(0,n.jsx)(xe,{"data-testid":"marimo-plugin-data-frames-boolean-checkbox",checked:s.value,onCheckedChange:s.onChange})})]}),(0,n.jsx)(O,{})]})});if(r instanceof ge)return o==="random_number_button"?(0,n.jsx)(w,{control:e.control,name:t,render:({field:s})=>(0,n.jsxs)(re,{size:"xs","data-testid":"marimo-plugin-data-frames-random-number-button",variant:"secondary",onClick:()=>{s.onChange(ae())},children:[(0,n.jsx)(Je,{className:"w-3.5 h-3.5 mr-1"}),l]})}):(0,n.jsx)(w,{control:e.control,name:t,render:({field:s})=>(0,n.jsxs)(V,{children:[(0,n.jsx)(y,{children:l}),(0,n.jsx)(S,{children:d}),(0,n.jsx)(k,{children:(0,n.jsx)(Ze,{...s,className:"my-0",onValueChange:s.onChange})}),(0,n.jsx)(O,{})]})});if(r instanceof ve){let s=o==="datetime"?"datetime-local":o==="time"?"time":"date";return(0,n.jsx)(w,{control:e.control,name:t,render:({field:i})=>(0,n.jsxs)(V,{children:[(0,n.jsx)(y,{children:l}),(0,n.jsx)(S,{children:d}),(0,n.jsx)(k,{children:(0,n.jsx)(R,{...i,onValueChange:i.onChange,type:s,className:"my-0"})}),(0,n.jsx)(O,{})]})})}if(r instanceof be)return(0,n.jsx)(me,{schema:r,form:e,path:t});if(r instanceof F)return(0,n.jsx)(en,{schema:r,form:e,path:t,options:r.options.map(s=>s.toString())});if(r instanceof ye){if(o==="text_area_multiline")return(0,n.jsx)(Ye,{schema:r,form:e,path:t});let s=r.element;return s instanceof F?(0,n.jsx)(nn,{schema:r,form:e,path:t,itemLabel:l,options:s.options.map(i=>i.toString())}):(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(_e,{children:l}),(0,n.jsx)(Xe,{schema:r.element,form:e,path:t,minLength:m,renderers:a},t)]})}if(r instanceof Z){let s=r.def,i=s.options,p=s.discriminator,f=x=>i.find(c=>_(c).value===x);return(0,n.jsx)(w,{control:e.control,name:t,render:({field:x})=>{let c=x.value,v=i.map(j=>_(j).value),u=c&&typeof c=="object"&&p in c?c[p]:v[0],g=f(u);return(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)(y,{children:l}),(0,n.jsx)("div",{className:"flex border-b mb-4 -mt-2",children:v.map(j=>(0,n.jsx)("button",{type:"button",className:`px-4 py-2 ${u===j?"border-b-2 border-primary font-medium":"text-muted-foreground"}`,onClick:()=>{let b=f(j);b?x.onChange(D(b)):x.onChange({[p]:j})},children:j},j))}),(0,n.jsx)("div",{className:"flex flex-col",children:g&&$(g,e,t,a)},u)]})}})}return r instanceof B?(0,n.jsx)(w,{control:e.control,name:t,render:({field:s})=>{let i=r.options,p=s.value,f=i.map(c=>_(c).value);p||(p=f[0]);let x=i.find(c=>_(c).value===p);return(0,n.jsxs)("div",{className:"flex flex-col mb-4 gap-1",children:[(0,n.jsx)(y,{children:l}),(0,n.jsx)(ke,{"data-testid":"marimo-plugin-data-frames-union-select",...s,children:f.map(c=>(0,n.jsx)("option",{value:c,children:c},c))}),x&&$(x,e,t,a)]})}}):r instanceof E?(0,n.jsx)(w,{control:e.control,name:t,render:({field:s})=>(0,n.jsx)("input",{...s,type:"hidden",value:String([...r.values][0]??"")})}):"unwrap"in r?$(ie(r),e,t,a):le(r)?$(r.in,e,t,a):(0,n.jsxs)("div",{children:["Unknown schema type"," ",r==null?t:JSON.stringify(r.type??r)]})}var Xe=r=>{let e=(0,z.c)(39),{schema:t,form:a,path:l,minLength:d,renderers:o}=r,h;e[0]===t.description?h=e[1]:(h=A.parse(t.description||""),e[0]=t.description,e[1]=h);let{label:m,description:s}=h,i=a.control,p;e[2]!==i||e[3]!==l?(p={control:i,name:l},e[2]=i,e[3]=l,e[4]=p):p=e[4];let{fields:f,append:x,remove:c}=Fe(p),v=d!=null&&f.length<d,u=d==null||f.length>d,g;e[5]===m?g=e[6]:(g=(0,n.jsx)(y,{children:m}),e[5]=m,e[6]=g);let j;e[7]===s?j=e[8]:(j=(0,n.jsx)(S,{children:s}),e[7]=s,e[8]=j);let b;if(e[9]!==u||e[10]!==f||e[11]!==a||e[12]!==l||e[13]!==c||e[14]!==o||e[15]!==t){let T;e[17]!==u||e[18]!==a||e[19]!==l||e[20]!==c||e[21]!==o||e[22]!==t?(T=(he,G)=>(0,n.jsxs)("div",{className:"flex flex-row pl-2 ml-2 border-l-2 border-disabled hover-actions-parent relative pr-5 pt-1 items-center w-fit",onKeyDown:Pe.onEnter(sn),children:[$(t,a,`${l}[${G}]`,o),u&&(0,n.jsx)(Be,{className:"w-4 h-4 ml-2 my-1 text-muted-foreground hover:text-destructive cursor-pointer absolute right-0 top-5",onClick:()=>{c(G)}})]},he.id),e[17]=u,e[18]=a,e[19]=l,e[20]=c,e[21]=o,e[22]=t,e[23]=T):T=e[23],b=f.map(T),e[9]=u,e[10]=f,e[11]=a,e[12]=l,e[13]=c,e[14]=o,e[15]=t,e[16]=b}else b=e[16];let C;e[24]!==v||e[25]!==d?(C=v&&(0,n.jsx)("div",{className:"text-destructive text-xs font-semibold",children:(0,n.jsxs)("div",{children:["At least ",d," required."]})}),e[24]=v,e[25]=d,e[26]=C):C=e[26];let N;e[27]!==x||e[28]!==t?(N=()=>{x(D(t))},e[27]=x,e[28]=t,e[29]=N):N=e[29];let M;e[30]===Symbol.for("react.memo_cache_sentinel")?(M=(0,n.jsx)(De,{className:"w-3.5 h-3.5 mr-1"}),e[30]=M):M=e[30];let L;e[31]===N?L=e[32]:(L=(0,n.jsx)("div",{children:(0,n.jsxs)(re,{size:"xs","data-testid":"marimo-plugin-data-frames-add-array-item",variant:"text",className:"hover:text-accent-foreground",onClick:N,children:[M,"Add"]})}),e[31]=N,e[32]=L);let P;return e[33]!==g||e[34]!==j||e[35]!==b||e[36]!==C||e[37]!==L?(P=(0,n.jsxs)("div",{className:"flex flex-col gap-2 min-w-[220px]",children:[g,j,b,C,L]}),e[33]=g,e[34]=j,e[35]=b,e[36]=C,e[37]=L,e[38]=P):P=e[38],P},me=r=>{let e=(0,z.c)(21),{schema:t,form:a,path:l}=r,d;e[0]===t.description?d=e[1]:(d=A.parse(t.description),e[0]=t.description,e[1]=d);let{label:o,description:h,placeholder:m,disabled:s,inputType:i}=d;if(i==="textarea"){let x;e[2]!==h||e[3]!==s||e[4]!==o||e[5]!==m?(x=v=>{let{field:u}=v;return(0,n.jsxs)(V,{children:[(0,n.jsx)(y,{children:o}),(0,n.jsx)(S,{children:h}),(0,n.jsx)(k,{children:(0,n.jsx)(te,{...u,value:u.value,onChange:u.onChange,className:"my-0",placeholder:m,disabled:s})}),(0,n.jsx)(O,{})]})},e[2]=h,e[3]=s,e[4]=o,e[5]=m,e[6]=x):x=e[6];let c;return e[7]!==a.control||e[8]!==l||e[9]!==x?(c=(0,n.jsx)(w,{control:a.control,name:l,render:x}),e[7]=a.control,e[8]=l,e[9]=x,e[10]=c):c=e[10],c}let p;e[11]!==h||e[12]!==s||e[13]!==i||e[14]!==o||e[15]!==m?(p=x=>{let{field:c}=x;return(0,n.jsxs)(V,{children:[(0,n.jsx)(y,{children:o}),(0,n.jsx)(S,{children:h}),(0,n.jsx)(k,{children:(0,n.jsx)(R,{...c,type:i,value:c.value,onValueChange:c.onChange,className:"my-0",placeholder:m,disabled:s})}),(0,n.jsx)(O,{})]})},e[11]=h,e[12]=s,e[13]=i,e[14]=o,e[15]=m,e[16]=p):p=e[16];let f;return e[17]!==a.control||e[18]!==l||e[19]!==p?(f=(0,n.jsx)(w,{control:a.control,name:l,render:p}),e[17]=a.control,e[18]=l,e[19]=p,e[20]=f):f=e[20],f},Ye=r=>{let e=(0,z.c)(10),{schema:t,form:a,path:l}=r,d;e[0]===t.description?d=e[1]:(d=A.parse(t.description),e[0]=t.description,e[1]=d);let{label:o,description:h,placeholder:m}=d,s;e[2]!==h||e[3]!==o||e[4]!==m?(s=p=>{let{field:f}=p;return(0,n.jsxs)(V,{children:[(0,n.jsx)(y,{children:o}),(0,n.jsx)(S,{children:h}),(0,n.jsx)(k,{children:(0,n.jsx)(U,{...f,placeholder:m})}),(0,n.jsx)(O,{})]})},e[2]=h,e[3]=o,e[4]=m,e[5]=s):s=e[5];let i;return e[6]!==a.control||e[7]!==l||e[8]!==s?(i=(0,n.jsx)(w,{control:a.control,name:l,render:s}),e[6]=a.control,e[7]=l,e[8]=s,e[9]=i):i=e[9],i},en=r=>{let e=(0,z.c)(22),{schema:t,form:a,path:l,options:d,textTransform:o}=r,h;e[0]===t.description?h=e[1]:(h=A.parse(t.description),e[0]=t.description,e[1]=h);let{label:m,description:s,disabled:i,special:p}=h;if(p==="radio_group"){let c;e[2]!==s||e[3]!==m||e[4]!==d||e[5]!==l?(c=u=>{let{field:g}=u;return(0,n.jsxs)(V,{children:[(0,n.jsx)(y,{children:m}),(0,n.jsx)(S,{children:s}),(0,n.jsx)(k,{children:(0,n.jsx)(Ee,{className:"flex flex-row gap-2 pt-1 items-center",value:g.value,onValueChange:g.onChange,children:d.map(j=>(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(ze,{value:j,id:`${l}-${j}`},j),(0,n.jsx)(y,{className:"whitespace-pre",htmlFor:`${l}-${j}`,children:se.startCase(j)})]},j))})}),(0,n.jsx)(O,{})]})},e[2]=s,e[3]=m,e[4]=d,e[5]=l,e[6]=c):c=e[6];let v;return e[7]!==i||e[8]!==a.control||e[9]!==l||e[10]!==c?(v=(0,n.jsx)(w,{control:a.control,name:l,disabled:i,render:c}),e[7]=i,e[8]=a.control,e[9]=l,e[10]=c,e[11]=v):v=e[11],v}let f;e[12]!==s||e[13]!==m||e[14]!==d||e[15]!==o?(f=c=>{let{field:v}=c;return(0,n.jsxs)(V,{children:[(0,n.jsx)(y,{className:"whitespace-pre",children:m}),(0,n.jsx)(S,{children:s}),(0,n.jsx)(k,{children:(0,n.jsxs)(Ae,{"data-testid":"marimo-plugin-data-frames-select",value:v.value,onValueChange:v.onChange,children:[(0,n.jsx)($e,{className:"min-w-[180px]",children:(0,n.jsx)(Se,{placeholder:"--"})}),(0,n.jsx)(Oe,{children:(0,n.jsxs)(Ve,{children:[d.map(u=>(0,n.jsx)(Y,{value:u,children:(o==null?void 0:o(u))??u},u)),d.length===0&&(0,n.jsx)(Y,{disabled:!0,value:"--",children:"No options"})]})})]})}),(0,n.jsx)(O,{})]})},e[12]=s,e[13]=m,e[14]=d,e[15]=o,e[16]=f):f=e[16];let x;return e[17]!==i||e[18]!==a.control||e[19]!==l||e[20]!==f?(x=(0,n.jsx)(w,{control:a.control,name:l,disabled:i,render:f}),e[17]=i,e[18]=a.control,e[19]=l,e[20]=f,e[21]=x):x=e[21],x},nn=r=>{let e=(0,z.c)(15),{schema:t,form:a,path:l,options:d,itemLabel:o,showSwitchable:h}=r,m;e[0]===t.description?m=e[1]:(m=A.parse(t.description),e[0]=t.description,e[1]=m);let{label:s,description:i,placeholder:p}=m,f;e[2]!==o||e[3]!==p?(f=p??(o?`Select ${o==null?void 0:o.toLowerCase()}`:void 0),e[2]=o,e[3]=p,e[4]=f):f=e[4];let x=f,c;e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==x||e[9]!==h?(c=u=>{let{field:g}=u,j=J(g.value);return(0,n.jsxs)(V,{children:[(0,n.jsx)(y,{className:"whitespace-pre",children:s}),(0,n.jsx)(S,{children:i}),(0,n.jsx)(k,{children:h?(0,n.jsx)(pe,{...g,value:j,options:d,placeholder:x}):(0,n.jsx)(ee,{className:"min-w-[180px]",placeholder:x,displayValue:tn,multiple:!0,chips:!0,keepPopoverOpenOnSelect:!0,value:j,onValueChange:g.onChange,children:d.map(an)})}),(0,n.jsx)(O,{})]})},e[5]=i,e[6]=s,e[7]=d,e[8]=x,e[9]=h,e[10]=c):c=e[10];let v;return e[11]!==a.control||e[12]!==l||e[13]!==c?(v=(0,n.jsx)(w,{control:a.control,name:l,render:c}),e[11]=a.control,e[12]=l,e[13]=c,e[14]=v):v=e[14],v};function rn(...r){return r.filter(e=>e!=="").join(".")}function sn(r){return r.preventDefault()}function tn(r){return se.startCase(r)}function an(r){return(0,n.jsx)(ne,{value:r,children:r},r)}export{J as a,A as c,U as i,ae as l,$ as n,D as o,pe as r,_ as s,We as t,Ke as u};
@@ -1 +1 @@
1
- var O=Object.defineProperty;var V=(t,e,i)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var b=(t,e,i)=>V(t,typeof e!="symbol"?e+"":e,i);import{u as k}from"./useEvent-D91BmmQi.js";import{o as j}from"./cells-A-ljPpuj.js";import{t as T}from"./compiler-runtime-B3qBwwSJ.js";import{_ as I,d as E}from"./useEventListener-BR0C1MaI.js";import{i as _}from"./utils-DIGrmLDO.js";import{h as N,x as P}from"./config-ChCHm539.js";import{s as z,u as D}from"./download-Iyng0xCz.js";import{r as $}from"./requests-DIwGYs0l.js";import{k as B}from"./layout-C4u-1iTo.js";import{t as H}from"./Deferred-DxQeE5uh.js";import{t as L}from"./use-toast-BDYuj3zG.js";import{t as x}from"./useInterval-CG264TRB.js";var R=class{constructor(){b(this,"capturedInputs",new Map);b(this,"inFlight",new Map)}cancelEntry(t){t.controller.abort(),t.deferred.status==="pending"&&t.deferred.resolve(void 0)}needsCapture(t,e){if(this.capturedInputs.get(t)===e)return!1;let i=this.inFlight.get(t);return!(i&&i.inputValue===e)}waitForInFlight(t,e){let i=this.inFlight.get(t);return i&&i.inputValue===e?i.deferred.promise:null}startCapture(t,e){let i=this.inFlight.get(t);i&&this.cancelEntry(i);let n=new AbortController,l=new H,u={controller:n,inputValue:e,deferred:l};return this.inFlight.set(t,u),{signal:n.signal,markCaptured:p=>{this.inFlight.get(t)===u&&(l.resolve(p),this.capturedInputs.set(t,e),this.inFlight.delete(t))},markFailed:()=>{this.inFlight.get(t)===u&&(l.resolve(void 0),this.inFlight.delete(t))}}}prune(t){for(let e of this.capturedInputs.keys())t.has(e)||this.capturedInputs.delete(e);for(let[e,i]of this.inFlight)t.has(e)||(this.cancelEntry(i),this.inFlight.delete(e))}get isCapturing(){return this.inFlight.size>0}abort(){for(let t of this.inFlight.values())this.cancelEntry(t);this.inFlight.clear()}reset(){this.abort(),this.capturedInputs.clear()}},Y=T(),M=5e3;function q(){let t=(0,Y.c)(14),e=k(_),{state:i}=k(N),n=e.auto_download.includes("markdown"),l=e.auto_download.includes("html"),u=e.auto_download.includes("ipynb"),p=i===P.OPEN,m=!n||!p,d=!l||!p,h=!u||!p,{autoExportAsHTML:a,autoExportAsIPYNB:s,autoExportAsMarkdown:r,updateCellOutputs:o}=$(),c=S(),f;t[0]===r?f=t[1]:(f=async()=>{await r({download:!1})},t[0]=r,t[1]=f);let g;t[2]===m?g=t[3]:(g={delayMs:M,whenVisible:!0,disabled:m},t[2]=m,t[3]=g),x(f,g);let w;t[4]===a?w=t[5]:(w=async()=>{await a({download:!1,includeCode:!0,files:B.INSTANCE.filenames()})},t[4]=a,t[5]=w);let v;t[6]===d?v=t[7]:(v={delayMs:M,whenVisible:!0,disabled:d},t[6]=d,t[7]=v),x(w,v);let F;t[8]!==s||t[9]!==c||t[10]!==o?(F=async()=>{await A({takeScreenshots:()=>c({progress:D.indeterminate()}),updateCellOutputs:o}),await s({download:!1})},t[8]=s,t[9]=c,t[10]=o,t[11]=F):F=t[11];let y;t[12]===h?y=t[13]:(y={delayMs:M,whenVisible:!0,disabled:h,skipIfRunning:!0},t[12]=h,t[13]=y),x(F,y)}var G=new Set(["text/html","application/vnd.vegalite.v5+json","application/vnd.vega.v5+json","application/vnd.vegalite.v6+json","application/vnd.vega.v6+json"]);const C=new R;function S(){let t=k(j);return async e=>{var d,h;let{progress:i}=e,n=new Set(E.keys(t));C.prune(n);let l=[],u=[];for(let[a,s]of E.entries(t)){let r=(d=s.output)==null?void 0:d.data;if((h=s.output)!=null&&h.mimetype&&G.has(s.output.mimetype)&&r)if(C.needsCapture(a,r))l.push([a,r]);else{let o=C.waitForInFlight(a,r);o&&u.push({cellId:a,promise:o})}}if(l.length===0&&u.length===0)return{};l.length>0&&i.addTotal(l.length);let p={};for(let[a,s]of l){let r=C.startCapture(a,s);try{let o=await z(a);if(r.signal.aborted)continue;if(!o){I.error(`Failed to capture screenshot for cell ${a}`),r.markFailed();continue}let c=["image/png",o];p[a]=c,r.markCaptured(c)}catch(o){I.error(`Error screenshotting cell ${a}:`,o),r.markFailed()}finally{i.increment(1)}}let m=await Promise.allSettled(u.map(({promise:a})=>a));for(let[a,{cellId:s}]of u.entries()){let r=m[a];r.status==="fulfilled"&&r.value&&(p[s]=r.value)}return p}}async function A(t){let{takeScreenshots:e,updateCellOutputs:i}=t;try{let n=await e();E.size(n)>0&&await i({cellIdsToOutput:n})}catch(n){I.error("Error updating cell outputs with screenshots:",n),L({title:"Failed to capture cell outputs",description:"Some outputs may not appear in the PDF. Continuing with export.",variant:"danger"})}}export{q as n,S as r,A as t};
1
+ var O=Object.defineProperty;var V=(t,e,i)=>e in t?O(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var b=(t,e,i)=>V(t,typeof e!="symbol"?e+"":e,i);import{u as k}from"./useEvent-D91BmmQi.js";import{o as j}from"./cells-A-ljPpuj.js";import{t as T}from"./compiler-runtime-B3qBwwSJ.js";import{_ as I,d as E}from"./useEventListener-BR0C1MaI.js";import{i as _}from"./utils-DIGrmLDO.js";import{h as N,x as P}from"./config-ChCHm539.js";import{s as z,u as D}from"./download-Iyng0xCz.js";import{r as $}from"./requests-DIwGYs0l.js";import{k as B}from"./layout-LtK-XwMq.js";import{t as H}from"./Deferred-DxQeE5uh.js";import{t as L}from"./use-toast-BDYuj3zG.js";import{t as x}from"./useInterval-CG264TRB.js";var R=class{constructor(){b(this,"capturedInputs",new Map);b(this,"inFlight",new Map)}cancelEntry(t){t.controller.abort(),t.deferred.status==="pending"&&t.deferred.resolve(void 0)}needsCapture(t,e){if(this.capturedInputs.get(t)===e)return!1;let i=this.inFlight.get(t);return!(i&&i.inputValue===e)}waitForInFlight(t,e){let i=this.inFlight.get(t);return i&&i.inputValue===e?i.deferred.promise:null}startCapture(t,e){let i=this.inFlight.get(t);i&&this.cancelEntry(i);let n=new AbortController,l=new H,u={controller:n,inputValue:e,deferred:l};return this.inFlight.set(t,u),{signal:n.signal,markCaptured:p=>{this.inFlight.get(t)===u&&(l.resolve(p),this.capturedInputs.set(t,e),this.inFlight.delete(t))},markFailed:()=>{this.inFlight.get(t)===u&&(l.resolve(void 0),this.inFlight.delete(t))}}}prune(t){for(let e of this.capturedInputs.keys())t.has(e)||this.capturedInputs.delete(e);for(let[e,i]of this.inFlight)t.has(e)||(this.cancelEntry(i),this.inFlight.delete(e))}get isCapturing(){return this.inFlight.size>0}abort(){for(let t of this.inFlight.values())this.cancelEntry(t);this.inFlight.clear()}reset(){this.abort(),this.capturedInputs.clear()}},Y=T(),M=5e3;function q(){let t=(0,Y.c)(14),e=k(_),{state:i}=k(N),n=e.auto_download.includes("markdown"),l=e.auto_download.includes("html"),u=e.auto_download.includes("ipynb"),p=i===P.OPEN,m=!n||!p,d=!l||!p,h=!u||!p,{autoExportAsHTML:a,autoExportAsIPYNB:s,autoExportAsMarkdown:r,updateCellOutputs:o}=$(),c=S(),f;t[0]===r?f=t[1]:(f=async()=>{await r({download:!1})},t[0]=r,t[1]=f);let g;t[2]===m?g=t[3]:(g={delayMs:M,whenVisible:!0,disabled:m},t[2]=m,t[3]=g),x(f,g);let w;t[4]===a?w=t[5]:(w=async()=>{await a({download:!1,includeCode:!0,files:B.INSTANCE.filenames()})},t[4]=a,t[5]=w);let v;t[6]===d?v=t[7]:(v={delayMs:M,whenVisible:!0,disabled:d},t[6]=d,t[7]=v),x(w,v);let F;t[8]!==s||t[9]!==c||t[10]!==o?(F=async()=>{await A({takeScreenshots:()=>c({progress:D.indeterminate()}),updateCellOutputs:o}),await s({download:!1})},t[8]=s,t[9]=c,t[10]=o,t[11]=F):F=t[11];let y;t[12]===h?y=t[13]:(y={delayMs:M,whenVisible:!0,disabled:h,skipIfRunning:!0},t[12]=h,t[13]=y),x(F,y)}var G=new Set(["text/html","application/vnd.vegalite.v5+json","application/vnd.vega.v5+json","application/vnd.vegalite.v6+json","application/vnd.vega.v6+json"]);const C=new R;function S(){let t=k(j);return async e=>{var d,h;let{progress:i}=e,n=new Set(E.keys(t));C.prune(n);let l=[],u=[];for(let[a,s]of E.entries(t)){let r=(d=s.output)==null?void 0:d.data;if((h=s.output)!=null&&h.mimetype&&G.has(s.output.mimetype)&&r)if(C.needsCapture(a,r))l.push([a,r]);else{let o=C.waitForInFlight(a,r);o&&u.push({cellId:a,promise:o})}}if(l.length===0&&u.length===0)return{};l.length>0&&i.addTotal(l.length);let p={};for(let[a,s]of l){let r=C.startCapture(a,s);try{let o=await z(a);if(r.signal.aborted)continue;if(!o){I.error(`Failed to capture screenshot for cell ${a}`),r.markFailed();continue}let c=["image/png",o];p[a]=c,r.markCaptured(c)}catch(o){I.error(`Error screenshotting cell ${a}:`,o),r.markFailed()}finally{i.increment(1)}}let m=await Promise.allSettled(u.map(({promise:a})=>a));for(let[a,{cellId:s}]of u.entries()){let r=m[a];r.status==="fulfilled"&&r.value&&(p[s]=r.value)}return p}}async function A(t){let{takeScreenshots:e,updateCellOutputs:i}=t;try{let n=await e();E.size(n)>0&&await i({cellIdsToOutput:n})}catch(n){I.error("Error updating cell outputs with screenshots:",n),L({title:"Failed to capture cell outputs",description:"Some outputs may not appear in the PDF. Continuing with export.",variant:"danger"})}}export{q as n,S as r,A as t};