@marimo-team/frontend 0.23.7-dev26 → 0.23.7-dev27
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/{add-cell-with-ai-Brv9Nib_.js → add-cell-with-ai-BY6XaAZ3.js} +14 -14
- package/dist/assets/{agent-panel-GKPzGkcA.js → agent-panel-C35LzvRj.js} +1 -1
- package/dist/assets/{cell-editor-Bsykn4S-.js → cell-editor-D4S43bth.js} +1 -1
- package/dist/assets/{chat-display-D2yhLWNi.js → chat-display-BHIBT3NZ.js} +1 -1
- package/dist/assets/{chat-panel-B5MUxP69.js → chat-panel-BW7I3hUn.js} +1 -1
- package/dist/assets/{chat-ui-D4WaB_kd.js → chat-ui-CeMFucvK.js} +1 -1
- package/dist/assets/{command-palette-Bwq10yhf.js → command-palette-BqbTn6Xi.js} +1 -1
- package/dist/assets/{edit-page-ms9zMhPH.js → edit-page-B_dG00fF.js} +3 -3
- package/dist/assets/{hooks-cC9mPQOU.js → hooks-BoaTEVRI.js} +1 -1
- package/dist/assets/{index-5DPWreKX.js → index-C9ReT81p.js} +3 -3
- package/dist/assets/{layout-Cb_Fr_ha.js → layout-DzJD7qzE.js} +2 -2
- package/dist/assets/{panels-Btt-Kg9z.js → panels-BaSju-5I.js} +1 -1
- package/dist/assets/{reveal-component-Dop5VNNi.js → reveal-component-BQkj_fdq.js} +1 -1
- package/dist/assets/{run-page-CclsHuGK.js → run-page-DPGsoCow.js} +1 -1
- package/dist/assets/{scratchpad-panel-0WSd_KKK.js → scratchpad-panel-CbrRxE96.js} +1 -1
- package/dist/assets/{useNotebookActions-C2hJSWHR.js → useNotebookActions-C6bBSdjJ.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as We}from"./chunk-LvLJmgfZ.js";import{d as $,l as mt,p as pt,u as ae}from"./useEvent-D91BmmQi.js";import{t as ut}from"./react-Bj1aDYRI.js";import{D as _e,Dn as ft,Dr as xt,E as yt,Ii as fe,Mn as bt,On as kt,Sr as wt,Yr as jt,Zt as gt,_ as vt,_r as Ct,ct as zt,h as Me,kn as Wt,st as _t,t as Mt,ut as Ne,yr as Nt}from"./cells-DFP-V6he.js";import{t as N}from"./compiler-runtime-B3qBwwSJ.js";import{n as St,x as Dt}from"./ai-model-dropdown-BNBl1Zqz.js";import{_ as H,d as Se}from"./useEventListener-DvoEXWke.js";import{y as Pt}from"./utils-Wvjk_Y4h.js";import{n as S,t as De}from"./constants-DMpttj8Q.js";import{T as oe,n as At,o as It,v as Lt,w as Et}from"./config-DzkFE_hx.js";import{n as Tt}from"./switch-C4flmwHC.js";import{t as Rt}from"./jsx-runtime-BqBOg78p.js";import{o as $t}from"./alert-dialog-BqFLkbUc.js";import{a as Ht,c as xe,o as ye,s as qt}from"./popover-Bz_0Vkyf.js";import{a as Ot,c as Bt,i as Ft,n as Ut,r as Yt,s as Vt,t as Kt}from"./select-DZcFyKFQ.js";import{_t as Gt}from"./JsonOutput-DPTx4W3_.js";import{c as Pe,d as be,n as Jt,o as Zt,r as ke,t as Qt}from"./download-PdY73eIa.js";import{t as Ae}from"./tooltip-DTV9tlSr.js";import{r as Ie,t as q}from"./button-BbCh-29a.js";import{i as Xt,r as ea,t as Le}from"./strings-wdPMRf6Z.js";import{r as O}from"./requests-DIwGYs0l.js";import{t as g}from"./createLucideIcon-D5guW7EU.js";import{F as ta,I as aa,L as Ee,P as oa,R as na,a as Te,i as Re,u as $e}from"./layout-Cb_Fr_ha.js";import{t as we}from"./check-BH35Ndha.js";import{r as sa}from"./useCellActionButton-DB5AiJOa.js";import{t as He}from"./copy-BwrPA9zQ.js";import{t as la}from"./external-link-BTNxSavU.js";import{t as ia}from"./eye-off-BT-KOYV5.js";import{t as ne}from"./file-HTLbeC2b.js";import{t as ra}from"./github-raQvpeuZ.js";import{u as da}from"./form-CvdGBYia.js";import{n as ca,r as ha,t as ma}from"./youtube-3lRHw8NU.js";import{i as pa,n as qe}from"./add-connection-dialog-CDimGa9X.js";import{t as ua}from"./house-D2ldnAB9.js";import{t as fa}from"./image-BIibSXT6.js";import{t as xa}from"./link-CoJxTwWE.js";import{r as ya}from"./input-DkSJHlVD.js";import{t as ba}from"./settings-SnYErNWQ.js";import{t as ka}from"./sparkles-CC9Bko6a.js";import{y as wa}from"./textarea-DQ04jSpC.js";import{t as ja}from"./square-B5xWCt0a.js";import{t as D}from"./use-toast-IPAtJGea.js";import{n as Oe,t as ga}from"./paths-D5zczhUD.js";import{o as va}from"./session-0B5NBztP.js";import{n as B}from"./copy-LK56fFow.js";import{r as Ca}from"./useRunCells-YtfQa1U2.js";import{a as Be,c as Fe,i as Ue,n as Ye,r as Ve}from"./dialog-DzC_QCtT.js";import{n as je}from"./ImperativeModal-DMLPabMc.js";import{r as za,t as Ke}from"./share-DMwTZOTH.js";import{a as Wa}from"./cell-link-CKjfkiFA.js";import{a as _a}from"./renderShortcut-DpuO8OzB.js";import{t as Ma}from"./icons-D7rawFWk.js";import{n as Ge}from"./marimo-icons-CcDNGIRM.js";import{t as Na}from"./links-DguLoFik.js";import{r as Sa,t as Je}from"./hooks-cC9mPQOU.js";import{t as Ze}from"./types-iYXk7c05.js";var Da=g("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),Pa=g("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),Qe=g("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"}]]),Xe=g("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"}]]),et=g("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"}]]),Aa=g("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"}]]),Ia=g("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"}]]),La=g("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"}]]),Ea=g("notebook",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M16 2v20",key:"rotuqe"}]]),Ta=g("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),tt=g("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"}]]),Ra=g("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"}]]),$a=g("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"}]]),at=g("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"}]]),ge=N(),P=We(ut(),1),a=We(Rt(),1);function Ha(){return"uvx marimo@latest"}function qa(t,e,n){let o=n?" --with-token":"",s=`${Ha()} pair prompt --url '${e}'${o}`;switch(t){case"claude":return`claude "$(${s} --claude)"`;case"codex":return`codex "$(${s} --codex)"`;case"opencode":return`opencode --prompt "$(${s} --opencode)"`;default:ea(t)}}function Oa(t){return t.length<=4?"****":`${"*".repeat(Math.min(t.length-4,8))}${t.slice(-4)}`}var Ba="npx skills add marimo-team/marimo-pair";function Fa(){let t=(0,ge.c)(2),[e,n]=(0,P.useState)(null),o,s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{fetch(At("/auth/token").href,{headers:Tt.headers()}).then(Ua).then(r=>n((r==null?void 0:r.token)??null)).catch(()=>n(null))},s=[],t[0]=o,t[1]=s):(o=t[0],s=t[1]),(0,P.useEffect)(o,s),e}function Ua(t){return t.ok?t.json():null}const Ya=t=>{let e=(0,ge.c)(32),{onClose:n}=t,[o,s]=(0,P.useState)("claude"),r=It(),i=Fa(),l=!!i,d;e[0]!==o||e[1]!==l||e[2]!==r.httpURL?(d=qa(o,r.httpURL.toString(),l),e[0]=o,e[1]=l,e[2]=r.httpURL,e[3]=d):d=e[3];let c=d,p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(Fe,{children:"Pair with an agent"}),e[4]=p):p=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsxs)(Be,{children:[p,(0,a.jsxs)(Ve,{children:["Use an AI coding agent to pair-program on this notebook."," ",(0,a.jsx)("a",{href:"https://links.marimo.app/marimo-pair",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Learn more"}),"."]})]}),e[5]=u):u=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"1. Install the skill"}),(0,a.jsx)(F,{command:Ba})]}),e[6]=h):h=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=(0,a.jsx)("span",{className:"text-sm font-medium",children:"2. Run in your terminal"}),e[7]=f):f=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=M=>s(M),e[8]=x):x=e[8];let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=(0,a.jsxs)(qt,{className:"w-full",children:[(0,a.jsx)(xe,{value:"claude",className:"flex-1",children:"Claude"}),(0,a.jsx)(xe,{value:"codex",className:"flex-1",children:"Codex"}),(0,a.jsx)(xe,{value:"opencode",className:"flex-1",children:"OpenCode"})]}),e[9]=k):k=e[9];let y;e[10]===c?y=e[11]:(y=(0,a.jsx)(ye,{value:"claude",className:"mt-3",children:(0,a.jsx)(F,{command:c})}),e[10]=c,e[11]=y);let b;e[12]===c?b=e[13]:(b=(0,a.jsx)(ye,{value:"codex",className:"mt-3",children:(0,a.jsx)(F,{command:c})}),e[12]=c,e[13]=b);let w;e[14]===c?w=e[15]:(w=(0,a.jsx)(ye,{value:"opencode",className:"mt-3",children:(0,a.jsx)(F,{command:c})}),e[14]=c,e[15]=w);let j;e[16]!==o||e[17]!==w||e[18]!==y||e[19]!==b?(j=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[f,(0,a.jsxs)(Ht,{value:o,onValueChange:x,children:[k,y,b,w]})]}),e[16]=o,e[17]=w,e[18]=y,e[19]=b,e[20]=j):j=e[20];let z;e[21]!==i||e[22]!==l?(z=l&&i&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"3. Paste when prompted for token"}),(0,a.jsx)(F,{command:i,display:Oa(i)})]}),e[21]=i,e[22]=l,e[23]=z):z=e[23];let v;e[24]!==j||e[25]!==z?(v=(0,a.jsxs)("div",{className:"flex flex-col gap-4 py-2",children:[h,j,z]}),e[24]=j,e[25]=z,e[26]=v):v=e[26];let W;e[27]===n?W=e[28]:(W=(0,a.jsx)(Ue,{children:(0,a.jsx)(q,{variant:"secondary",onClick:n,children:"Close"})}),e[27]=n,e[28]=W);let _;return e[29]!==v||e[30]!==W?(_=(0,a.jsxs)(Ye,{className:"sm:max-w-lg",children:[u,v,W]}),e[29]=v,e[30]=W,e[31]=_):_=e[31],_};var F=t=>{let e=(0,ge.c)(15),{command:n,display:o}=t,[s,r]=(0,P.useState)(!1),i;e[0]===n?i=e[1]:(i=Ie.stopPropagation(async x=>{x.preventDefault(),await B(n),r(!0),setTimeout(()=>r(!1),2e3)}),e[0]=n,e[1]=i);let l=i,d=o??n,c;e[2]===d?c=e[3]:(c=(0,a.jsx)("code",{className:"flex-1 select-all break-words",children:d}),e[2]=d,e[3]=c);let p;e[4]===s?p=e[5]:(p=s?(0,a.jsx)(we,{size:14,strokeWidth:1.5}):(0,a.jsx)(He,{size:14,strokeWidth:1.5}),e[4]=s,e[5]=p);let u;e[6]!==l||e[7]!==p?(u=(0,a.jsx)(q,{onClick:l,size:"xs",variant:"ghost",children:p}),e[6]=l,e[7]=p,e[8]=u):u=e[8];let h;e[9]!==s||e[10]!==u?(h=(0,a.jsx)(Ae,{content:"Copied!",open:s,children:u}),e[9]=s,e[10]=u,e[11]=h):h=e[11];let f;return e[12]!==c||e[13]!==h?(f=(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-xs",children:[c,h]}),e[12]=c,e[13]=h,e[14]=f):f=e[14],f},ot=N(),se="https://static.marimo.app";const Va=t=>{let e=(0,ot.c)(25),{onClose:n}=t,[o,s]=(0,P.useState)(""),{exportAsHTML:r}=O(),i=`${o}-${Math.random().toString(36).slice(2,6)}`,l=`${se}/static/${i}`,d;e[0]!==r||e[1]!==n||e[2]!==i?(d=async j=>{j.preventDefault(),n();let z=await r({download:!1,includeCode:!0,files:oa.INSTANCE.filenames()}),v=D({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${se}/api/static`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:z,path:i})}).catch(()=>{v.dismiss(),D({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:S.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]})})}),v.dismiss(),D({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."]})})},e[0]=r,e[1]=n,e[2]=i,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsx)(Fe,{children:"Share static notebook"}),e[4]=c):c=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsxs)(Be,{children:[c,(0,a.jsxs)(Ve,{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:se,target:"_blank",children:se}),"."]})]}),e[5]=p):p=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=j=>{s(j.target.value.toLowerCase().replaceAll(/\s/g,"-").replaceAll(/[^\da-z-]/g,""))},e[6]=u):u=e[6];let h;e[7]===o?h=e[8]:(h=(0,a.jsx)(ya,{"data-testid":"slug-input",id:"slug",autoFocus:!0,value:o,placeholder:"Notebook slug",onChange:u,required:!0,autoComplete:"off"}),e[7]=o,e[8]=h);let f;e[9]===l?f=e[10]:(f=(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)(Ka,{text:l}),(0,a.jsx)("span",{className:"text-primary",children:l})]})]}),e[9]=l,e[10]=f);let x;e[11]!==h||e[12]!==f?(x=(0,a.jsxs)("div",{className:"flex flex-col gap-6 py-4",children:[h,f]}),e[11]=h,e[12]=f,e[13]=x):x=e[13];let k;e[14]===n?k=e[15]:(k=(0,a.jsx)(q,{"data-testid":"cancel-share-static-notebook-button",variant:"secondary",onClick:n,children:"Cancel"}),e[14]=n,e[15]=k);let y;e[16]===l?y=e[17]:(y=(0,a.jsx)(q,{"data-testid":"share-static-notebook-button","aria-label":"Save",variant:"default",type:"submit",onClick:async()=>{await B(l)},children:"Create"}),e[16]=l,e[17]=y);let b;e[18]!==k||e[19]!==y?(b=(0,a.jsxs)(Ue,{children:[k,y]}),e[18]=k,e[19]=y,e[20]=b):b=e[20];let w;return e[21]!==d||e[22]!==b||e[23]!==x?(w=(0,a.jsx)(Ye,{className:"w-fit",children:(0,a.jsxs)("form",{onSubmit:d,children:[p,x,b]})}),e[21]=d,e[22]=b,e[23]=x,e[24]=w):w=e[24],w};var Ka=t=>{let e=(0,ot.c)(8),[n,o]=P.useState(!1),s;e[0]===t.text?s=e[1]:(s=Ie.stopPropagation(async c=>{c.preventDefault(),await B(t.text),o(!0),setTimeout(()=>o(!1),2e3)}),e[0]=t.text,e[1]=s);let r=s,i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(He,{size:14,strokeWidth:1.5}),e[2]=i):i=e[2];let l;e[3]===r?l=e[4]:(l=(0,a.jsx)(q,{"data-testid":"copy-static-notebook-url-button",onClick:r,size:"xs",variant:"secondary",children:i}),e[3]=r,e[4]=l);let d;return e[5]!==n||e[6]!==l?(d=(0,a.jsx)(Ae,{content:"Copied!",open:n,children:l}),e[5]=n,e[6]=l,e[7]=d):d=e[7],d},Ga=N();function Ja(){let t=document.getElementsByClassName(De.outputArea);for(let e of t){let n=e.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=fe.findElement(e);if(!o){H.warn("Could not find HTMLCellId for visible output area",e);continue}return{cellId:fe.parse(o.id)}}}return H.warn("No visible output area found for scroll anchor"),null}function Za(t){if(!t){H.warn("No scroll anchor provided to restore scroll position");return}let e=document.getElementById(fe.create(t.cellId));if(!e){H.warn("Could not find cell element to restore scroll position",t.cellId);return}if(!e.querySelector(`.${De.outputArea}`)){H.warn("Could not find output area to restore scroll position",t.cellId);return}e.scrollIntoView({block:"start",behavior:"auto"})}function nt(){let t=(0,Ga.c)(2),e=$(Ne),n;return t[0]===e?n=t[1]:(n=()=>{let o=Ja();e(s=>({mode:zt(s.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Za(o)})})},t[0]=e,t[1]=n),n}const st=pt(!1);var Qa=N();const Xa=()=>{let t=(0,Qa.c)(7),{selectedLayout:e}=Te(),{setLayoutView:n}=Re();if(oe()&&!bt("wasm_layouts"))return null;let o;t[0]===n?o=t[1]:(o=l=>n(l),t[0]=n,t[1]=o);let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(Vt,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(Bt,{placeholder:"Select a view"})}),t[2]=s):s=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(Ut,{children:(0,a.jsxs)(Yt,{children:[(0,a.jsx)(Ot,{children:"View as"}),Ze.map(to)]})}),t[3]=r):r=t[3];let i;return t[4]!==e||t[5]!==o?(i=(0,a.jsxs)(Kt,{"data-testid":"layout-select",value:e,onValueChange:o,children:[s,r]}),t[4]=e,t[5]=o,t[6]=i):i=t[6],i};function eo(t){return(0,a.jsx)(lt(t),{className:"h-4 w-4"})}function lt(t){switch(t){case"vertical":return La;case"grid":return ha;case"slides":return tt;default:return Xt(t),ja}}function it(t){return Le.startCase(t)}function to(t){return(0,a.jsx)(Ft,{value:t,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[eo(t),(0,a.jsx)("span",{children:it(t)})]})},t)}async function ao(t){let{filename:e,preset:n,downloadPDF:o}=t;await o({filename:e,webpdf:!1,preset:n,includeInputs:!0,rasterServer:"static"})}var oo=N();function no(t){let e=(0,oo.c)(5),{openPrompt:n,closeModal:o}=je(),{sendCopy:s}=O(),r;return e[0]!==o||e[1]!==n||e[2]!==s||e[3]!==t?(r=()=>{if(!t)return null;let i=ga.guessDeliminator(t);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${Oe.basename(t)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:l=>{let d=i.join(Oe.dirname(t),l);s({source:t,destination:d}).then(()=>{o(),D({title:"Notebook copied",description:"A copy of the notebook has been created."}),Na(d)})}})},e[0]=o,e[1]=n,e[2]=s,e[3]=t,e[4]=r):r=e[4],r}const so=()=>{let{updateCellConfig:t}=_e(),{saveCellConfig:e}=O();return(0,P.useCallback)(async()=>{let n=new gt,o=Me(),s=o.cellIds.inOrderIds,r={};for(let l of s){if(o.cellData[l]===void 0)continue;let{code:d,config:c}=o.cellData[l];c.hide_code||n.isSupported(d)&&(r[l]={hide_code:!0})}let i=Se.entries(r);if(i.length!==0){await e({configs:r});for(let[l,d]of i)t({cellId:l,config:d})}},[t])};var lo=N();function rt(){let t=(0,lo.c)(4),{openConfirm:e}=je(),n=$(Lt),{sendRestart:o}=O(),s;return t[0]!==e||t[1]!==o||t[2]!==n?(s=()=>{e({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)($t,{onClick:async()=>{n({state:Et.CLOSING}),await o(),za()},"aria-label":"Confirm Restart",children:"Restart"})})},t[0]=e,t[1]=o,t[2]=n,t[3]=s):s=t[3],s}var io=N(),T=t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()};function ro(){var Ce,ze;let t=(0,io.c)(52),e=Wa(),{openModal:n,closeModal:o}=je(),{toggleApplication:s}=ft(),{selectedPanel:r}=kt(),[i]=mt(Ne),l=ae(_t),d=so(),[c]=Pt(),{updateCellConfig:p,undoDeleteCell:u,clearAllCellOutputs:h,addSetupCellIfDoesntExist:f,collapseAllCells:x,expandAllCells:k}=_e(),y=rt(),b=Ca(),w=no(e),j=$(st),z=$(St),v=$(Dt),{exportAsIPYNB:W,exportAsMarkdown:_,readCode:M,saveCellConfig:ie,updateCellOutputs:A}=O(),I=Sa(),re=ae(vt),de=ae(Mt),ce=ae(yt),{selectedLayout:U}=Te(),{setLayoutView:he}=Re(),Y=nt(),V=((Ce=c.sharing)==null?void 0:Ce.html)??!0,K=((ze=c.sharing)==null?void 0:ze.wasm)??!0,ve=!oe(),me=U==="slides",dt=_o,ct=Wo,G;t[0]!==e||t[1]!==I||t[2]!==A?(G=async m=>{let{preset:C,title:R}=m;if(!e){le();return}await Pe(R,async ue=>{await Je({takeScreenshots:()=>I({progress:ue}),updateCellOutputs:A}),await ao({filename:e,preset:C,downloadPDF:Jt})})},t[0]=e,t[1]=I,t[2]=A,t[3]=G):G=t[3];let L=G,J;t[4]===L?J=t[5]:(J=async()=>{if(ve){await L({preset:"document",title:"Downloading Document PDF..."});return}let m=new Event("export-beforeprint"),C=new Event("export-afterprint");window.dispatchEvent(m),setTimeout(zo,0),setTimeout(()=>window.dispatchEvent(C),0)},t[4]=L,t[5]=J);let Z=J,Q;t[6]!==W||t[7]!==e||t[8]!==I||t[9]!==A?(Q=async()=>{if(!e){le();return}await Pe("Downloading IPYNB...",async m=>{await Je({takeScreenshots:()=>I({progress:m}),updateCellOutputs:A});let C=await W({download:!1});ke(new Blob([C],{type:"application/x-ipynb+json"}),be.toIPYNB(document.title))})},t[6]=W,t[7]=e,t[8]=I,t[9]=A,t[10]=Q):Q=t[10];let pe=Q,X;t[11]===Symbol.for("react.memo_cache_sentinel")?(X=(0,a.jsx)(Gt,{size:14,strokeWidth:1.5}),t[11]=X):X=t[11];let ee;t[12]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,a.jsx)(Ee,{size:14,strokeWidth:1.5}),t[12]=ee):ee=t[12];let E;t[13]===e?E=t[14]:(E=async()=>{if(!e){le();return}await $e({filename:e,includeCode:!0})},t[13]=e,t[14]=E);let te;return t[15]!==f||t[16]!==de||t[17]!==h||t[18]!==o||t[19]!==x||t[20]!==w||t[21]!==L||t[22]!==k||t[23]!==_||t[24]!==e||t[25]!==Z||t[26]!==pe||t[27]!==re||t[28]!==d||t[29]!==me||t[30]!==l||t[31]!==n||t[32]!==M||t[33]!==y||t[34]!==b||t[35]!==ie||t[36]!==U||t[37]!==r||t[38]!==j||t[39]!==v||t[40]!==he||t[41]!==z||t[42]!==V||t[43]!==K||t[44]!==E||t[45]!==s||t[46]!==Y||t[47]!==u||t[48]!==ce||t[49]!==p||t[50]!==i.mode?(te=[{icon:X,label:"Download",handle:T,dropdown:[{icon:ee,label:"Download as HTML",handle:E},{icon:(0,a.jsx)(Ee,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!e){le();return}await $e({filename:e,includeCode:!1})}},{icon:(0,a.jsx)(Ma,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let m=await _({download:!1});ke(new Blob([m],{type:"text/plain"}),be.toMarkdown(document.title))}},{icon:(0,a.jsx)(Ea,{size:14,strokeWidth:1.5}),label:"Download as ipynb",handle:pe},{icon:(0,a.jsx)(na,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let m=await M();ke(new Blob([m.contents],{type:"text/plain"}),be.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(fa,{size:14,strokeWidth:1.5}),label:"Download as PNG",disabled:i.mode!=="present",tooltip:i.mode==="present"?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",_a("global.hideCode",!1)]}),handle:Co},me?{divider:!0,icon:(0,a.jsx)(ne,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:T,dropdown:[{icon:(0,a.jsx)(ne,{size:14,strokeWidth:1.5}),label:"Document Layout",handle:Z},{icon:(0,a.jsx)(ne,{size:14,strokeWidth:1.5}),label:"Slides Layout",rightElement:ct(!0),hidden:!ve,handle:async()=>{await L({preset:"slides",title:"Downloading Slides PDF..."})}}]}:{divider:!0,icon:(0,a.jsx)(ne,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:Z}]},{icon:(0,a.jsx)(ka,{size:14,strokeWidth:1.5}),label:"Pair with an agent",hidden:oe(),handle:async()=>{n((0,a.jsx)(Ya,{onClose:o}))}},{icon:(0,a.jsx)(Ra,{size:14,strokeWidth:1.5}),label:"Share",handle:T,hidden:!V&&!K,dropdown:[{icon:(0,a.jsx)(da,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!V,handle:async()=>{n((0,a.jsx)(Va,{onClose:o}))}},{icon:(0,a.jsx)(xa,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!K,handle:async()=>{await B(Ke({code:(await M()).contents})),D({title:"Copied",description:"Link copied to clipboard."})}},{icon:(0,a.jsx)(Ge,{size:14,strokeWidth:1.5}),label:"Create molab notebook",handle:async()=>{let m=Ke({code:(await M()).contents,baseUrl:`${S.molab}/new`});window.open(m,"_blank")}}]},{icon:(0,a.jsx)(Ta,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:T,dropdown:Wt.flatMap(m=>{let{type:C,Icon:R,hidden:ue,additionalKeywords:ht}=m;return ue?[]:{label:Le.startCase(C),rightElement:dt(r===C),icon:(0,a.jsx)(R,{size:14,strokeWidth:1.5}),handle:()=>s(C),additionalKeywords:ht}})},{icon:(0,a.jsx)(tt,{size:14,strokeWidth:1.5}),label:"Present as",handle:T,dropdown:[{icon:i.mode==="present"?(0,a.jsx)(wa,{size:14,strokeWidth:1.5}):(0,a.jsx)(ta,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{Y()}},...Ze.map((m,C)=>{let R=lt(m);return{divider:C===0,label:it(m),icon:(0,a.jsx)(R,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:U===m&&(0,a.jsx)(we,{size:14})}),handle:()=>{he(m),i.mode==="edit"&&Y()}}})]},{icon:(0,a.jsx)(Ia,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!e||oe(),handle:w},{icon:(0,a.jsx)(Qe,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!e,handle:async()=>{await B((await M()).contents),D({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(sa,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!re||l,handle:async()=>{let m=jt(Me());await ie({configs:Se.fromEntries(m.map(vo))});for(let C of m)p({cellId:C,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(et,{size:14,strokeWidth:1.5}),label:"Add setup cell",handle:()=>{f({})}},{icon:(0,a.jsx)(Nt,{size:14,strokeWidth:1.5}),label:"Add database connection",handle:()=>{n((0,a.jsx)(qe,{onClose:o}))}},{icon:(0,a.jsx)(pa,{size:14,strokeWidth:1.5}),label:"Add remote storage",handle:()=>{n((0,a.jsx)(qe,{defaultTab:"storage",onClose:o}))}},{icon:(0,a.jsx)(at,{size:14,strokeWidth:1.5}),label:ce,hidden:!de||l,handle:()=>{u()}},{icon:(0,a.jsx)($a,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:y,additionalKeywords:["reset","reload","restart"]},{icon:(0,a.jsx)(Aa,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{b()}},{icon:(0,a.jsx)(wt,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{h()}},{icon:(0,a.jsx)(ia,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",handle:d,redundant:!0},{icon:(0,a.jsx)(Pa,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:x,redundant:!0},{icon:(0,a.jsx)(Da,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:k,redundant:!0},{divider:!0,icon:(0,a.jsx)(Xe,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>j(go)},{icon:(0,a.jsx)(aa,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>v(jo)},{icon:(0,a.jsx)(ba,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>z(wo),redundant:!0,additionalKeywords:["preferences","options","configuration"]},{icon:(0,a.jsx)(la,{size:14,strokeWidth:1.5}),label:"Resources",handle:T,dropdown:[{icon:(0,a.jsx)(xt,{size:14,strokeWidth:1.5}),label:"Documentation",handle:ko},{icon:(0,a.jsx)(ra,{size:14,strokeWidth:1.5}),label:"GitHub",handle:bo},{icon:(0,a.jsx)(ca,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:yo},{icon:(0,a.jsx)(ma,{size:14,strokeWidth:1.5}),label:"YouTube",handle:xo},{icon:(0,a.jsx)(Ct,{size:14,strokeWidth:1.5}),label:"Changelog",handle:fo}]},{divider:!0,icon:(0,a.jsx)(ua,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:uo},{icon:(0,a.jsx)(Ge,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:po}].filter(mo).map(co),t[15]=f,t[16]=de,t[17]=h,t[18]=o,t[19]=x,t[20]=w,t[21]=L,t[22]=k,t[23]=_,t[24]=e,t[25]=Z,t[26]=pe,t[27]=re,t[28]=d,t[29]=me,t[30]=l,t[31]=n,t[32]=M,t[33]=y,t[34]=b,t[35]=ie,t[36]=U,t[37]=r,t[38]=j,t[39]=v,t[40]=he,t[41]=z,t[42]=V,t[43]=K,t[44]=E,t[45]=s,t[46]=Y,t[47]=u,t[48]=ce,t[49]=p,t[50]=i.mode,t[51]=te):te=t[51],te}function co(t){return t.dropdown?{...t,dropdown:t.dropdown.filter(ho)}:t}function ho(t){return!t.hidden}function mo(t){return!t.hidden}function po(){let t=va();window.open(t,"_blank")}function uo(){let t=document.baseURI.split("?")[0];window.open(t,"_self")}function fo(){window.open(S.releasesPage,"_blank")}function xo(){window.open(S.youtube,"_blank")}function yo(){window.open(S.discordLink,"_blank")}function bo(){window.open(S.githubPage,"_blank")}function ko(){window.open(S.docsPage,"_blank")}function wo(t){return!t}function jo(t){return!t}function go(t){return!t}function vo(t){return[t,{disabled:!1}]}async function Co(){let t=document.getElementById("App");t&&await Zt({element:t,filename:document.title,prepare:Qt})}function zo(){return window.print()}function Wo(t){return t?(0,a.jsx)("span",{className:"ml-3 shrink-0 rounded-full border border-emerald-200 bg-emerald-50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-emerald-700",children:"Recommended"}):null}function _o(t){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:t&&(0,a.jsx)(we,{size:14})})}function le(){D({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{nt as a,Xe as c,st as i,Qe as l,rt as n,at as o,Xa as r,et as s,ro as t};
|
|
1
|
+
import{s as We}from"./chunk-LvLJmgfZ.js";import{d as $,l as mt,p as pt,u as ae}from"./useEvent-D91BmmQi.js";import{t as ut}from"./react-Bj1aDYRI.js";import{D as _e,Dn as ft,Dr as xt,E as yt,Ii as fe,Mn as bt,On as kt,Sr as wt,Yr as jt,Zt as gt,_ as vt,_r as Ct,ct as zt,h as Me,kn as Wt,st as _t,t as Mt,ut as Ne,yr as Nt}from"./cells-DFP-V6he.js";import{t as N}from"./compiler-runtime-B3qBwwSJ.js";import{n as St,x as Dt}from"./ai-model-dropdown-BNBl1Zqz.js";import{_ as H,d as Se}from"./useEventListener-DvoEXWke.js";import{y as Pt}from"./utils-Wvjk_Y4h.js";import{n as S,t as De}from"./constants-DMpttj8Q.js";import{T as oe,n as At,o as It,v as Lt,w as Et}from"./config-DzkFE_hx.js";import{n as Tt}from"./switch-C4flmwHC.js";import{t as Rt}from"./jsx-runtime-BqBOg78p.js";import{o as $t}from"./alert-dialog-BqFLkbUc.js";import{a as Ht,c as xe,o as ye,s as qt}from"./popover-Bz_0Vkyf.js";import{a as Ot,c as Bt,i as Ft,n as Ut,r as Yt,s as Vt,t as Kt}from"./select-DZcFyKFQ.js";import{_t as Gt}from"./JsonOutput-DPTx4W3_.js";import{c as Pe,d as be,n as Jt,o as Zt,r as ke,t as Qt}from"./download-PdY73eIa.js";import{t as Ae}from"./tooltip-DTV9tlSr.js";import{r as Ie,t as q}from"./button-BbCh-29a.js";import{i as Xt,r as ea,t as Le}from"./strings-wdPMRf6Z.js";import{r as O}from"./requests-DIwGYs0l.js";import{t as g}from"./createLucideIcon-D5guW7EU.js";import{F as ta,I as aa,L as Ee,P as oa,R as na,a as Te,i as Re,u as $e}from"./layout-DzJD7qzE.js";import{t as we}from"./check-BH35Ndha.js";import{r as sa}from"./useCellActionButton-DB5AiJOa.js";import{t as He}from"./copy-BwrPA9zQ.js";import{t as la}from"./external-link-BTNxSavU.js";import{t as ia}from"./eye-off-BT-KOYV5.js";import{t as ne}from"./file-HTLbeC2b.js";import{t as ra}from"./github-raQvpeuZ.js";import{u as da}from"./form-CvdGBYia.js";import{n as ca,r as ha,t as ma}from"./youtube-3lRHw8NU.js";import{i as pa,n as qe}from"./add-connection-dialog-CDimGa9X.js";import{t as ua}from"./house-D2ldnAB9.js";import{t as fa}from"./image-BIibSXT6.js";import{t as xa}from"./link-CoJxTwWE.js";import{r as ya}from"./input-DkSJHlVD.js";import{t as ba}from"./settings-SnYErNWQ.js";import{t as ka}from"./sparkles-CC9Bko6a.js";import{y as wa}from"./textarea-DQ04jSpC.js";import{t as ja}from"./square-B5xWCt0a.js";import{t as D}from"./use-toast-IPAtJGea.js";import{n as Oe,t as ga}from"./paths-D5zczhUD.js";import{o as va}from"./session-0B5NBztP.js";import{n as B}from"./copy-LK56fFow.js";import{r as Ca}from"./useRunCells-YtfQa1U2.js";import{a as Be,c as Fe,i as Ue,n as Ye,r as Ve}from"./dialog-DzC_QCtT.js";import{n as je}from"./ImperativeModal-DMLPabMc.js";import{r as za,t as Ke}from"./share-DMwTZOTH.js";import{a as Wa}from"./cell-link-CKjfkiFA.js";import{a as _a}from"./renderShortcut-DpuO8OzB.js";import{t as Ma}from"./icons-D7rawFWk.js";import{n as Ge}from"./marimo-icons-CcDNGIRM.js";import{t as Na}from"./links-DguLoFik.js";import{r as Sa,t as Je}from"./hooks-BoaTEVRI.js";import{t as Ze}from"./types-iYXk7c05.js";var Da=g("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),Pa=g("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),Qe=g("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"}]]),Xe=g("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"}]]),et=g("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"}]]),Aa=g("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"}]]),Ia=g("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"}]]),La=g("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"}]]),Ea=g("notebook",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M16 2v20",key:"rotuqe"}]]),Ta=g("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),tt=g("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"}]]),Ra=g("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"}]]),$a=g("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"}]]),at=g("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"}]]),ge=N(),P=We(ut(),1),a=We(Rt(),1);function Ha(){return"uvx marimo@latest"}function qa(t,e,n){let o=n?" --with-token":"",s=`${Ha()} pair prompt --url '${e}'${o}`;switch(t){case"claude":return`claude "$(${s} --claude)"`;case"codex":return`codex "$(${s} --codex)"`;case"opencode":return`opencode --prompt "$(${s} --opencode)"`;default:ea(t)}}function Oa(t){return t.length<=4?"****":`${"*".repeat(Math.min(t.length-4,8))}${t.slice(-4)}`}var Ba="npx skills add marimo-team/marimo-pair";function Fa(){let t=(0,ge.c)(2),[e,n]=(0,P.useState)(null),o,s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{fetch(At("/auth/token").href,{headers:Tt.headers()}).then(Ua).then(r=>n((r==null?void 0:r.token)??null)).catch(()=>n(null))},s=[],t[0]=o,t[1]=s):(o=t[0],s=t[1]),(0,P.useEffect)(o,s),e}function Ua(t){return t.ok?t.json():null}const Ya=t=>{let e=(0,ge.c)(32),{onClose:n}=t,[o,s]=(0,P.useState)("claude"),r=It(),i=Fa(),l=!!i,d;e[0]!==o||e[1]!==l||e[2]!==r.httpURL?(d=qa(o,r.httpURL.toString(),l),e[0]=o,e[1]=l,e[2]=r.httpURL,e[3]=d):d=e[3];let c=d,p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(Fe,{children:"Pair with an agent"}),e[4]=p):p=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsxs)(Be,{children:[p,(0,a.jsxs)(Ve,{children:["Use an AI coding agent to pair-program on this notebook."," ",(0,a.jsx)("a",{href:"https://links.marimo.app/marimo-pair",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Learn more"}),"."]})]}),e[5]=u):u=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"1. Install the skill"}),(0,a.jsx)(F,{command:Ba})]}),e[6]=h):h=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=(0,a.jsx)("span",{className:"text-sm font-medium",children:"2. Run in your terminal"}),e[7]=f):f=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=M=>s(M),e[8]=x):x=e[8];let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=(0,a.jsxs)(qt,{className:"w-full",children:[(0,a.jsx)(xe,{value:"claude",className:"flex-1",children:"Claude"}),(0,a.jsx)(xe,{value:"codex",className:"flex-1",children:"Codex"}),(0,a.jsx)(xe,{value:"opencode",className:"flex-1",children:"OpenCode"})]}),e[9]=k):k=e[9];let y;e[10]===c?y=e[11]:(y=(0,a.jsx)(ye,{value:"claude",className:"mt-3",children:(0,a.jsx)(F,{command:c})}),e[10]=c,e[11]=y);let b;e[12]===c?b=e[13]:(b=(0,a.jsx)(ye,{value:"codex",className:"mt-3",children:(0,a.jsx)(F,{command:c})}),e[12]=c,e[13]=b);let w;e[14]===c?w=e[15]:(w=(0,a.jsx)(ye,{value:"opencode",className:"mt-3",children:(0,a.jsx)(F,{command:c})}),e[14]=c,e[15]=w);let j;e[16]!==o||e[17]!==w||e[18]!==y||e[19]!==b?(j=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[f,(0,a.jsxs)(Ht,{value:o,onValueChange:x,children:[k,y,b,w]})]}),e[16]=o,e[17]=w,e[18]=y,e[19]=b,e[20]=j):j=e[20];let z;e[21]!==i||e[22]!==l?(z=l&&i&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"3. Paste when prompted for token"}),(0,a.jsx)(F,{command:i,display:Oa(i)})]}),e[21]=i,e[22]=l,e[23]=z):z=e[23];let v;e[24]!==j||e[25]!==z?(v=(0,a.jsxs)("div",{className:"flex flex-col gap-4 py-2",children:[h,j,z]}),e[24]=j,e[25]=z,e[26]=v):v=e[26];let W;e[27]===n?W=e[28]:(W=(0,a.jsx)(Ue,{children:(0,a.jsx)(q,{variant:"secondary",onClick:n,children:"Close"})}),e[27]=n,e[28]=W);let _;return e[29]!==v||e[30]!==W?(_=(0,a.jsxs)(Ye,{className:"sm:max-w-lg",children:[u,v,W]}),e[29]=v,e[30]=W,e[31]=_):_=e[31],_};var F=t=>{let e=(0,ge.c)(15),{command:n,display:o}=t,[s,r]=(0,P.useState)(!1),i;e[0]===n?i=e[1]:(i=Ie.stopPropagation(async x=>{x.preventDefault(),await B(n),r(!0),setTimeout(()=>r(!1),2e3)}),e[0]=n,e[1]=i);let l=i,d=o??n,c;e[2]===d?c=e[3]:(c=(0,a.jsx)("code",{className:"flex-1 select-all break-words",children:d}),e[2]=d,e[3]=c);let p;e[4]===s?p=e[5]:(p=s?(0,a.jsx)(we,{size:14,strokeWidth:1.5}):(0,a.jsx)(He,{size:14,strokeWidth:1.5}),e[4]=s,e[5]=p);let u;e[6]!==l||e[7]!==p?(u=(0,a.jsx)(q,{onClick:l,size:"xs",variant:"ghost",children:p}),e[6]=l,e[7]=p,e[8]=u):u=e[8];let h;e[9]!==s||e[10]!==u?(h=(0,a.jsx)(Ae,{content:"Copied!",open:s,children:u}),e[9]=s,e[10]=u,e[11]=h):h=e[11];let f;return e[12]!==c||e[13]!==h?(f=(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-xs",children:[c,h]}),e[12]=c,e[13]=h,e[14]=f):f=e[14],f},ot=N(),se="https://static.marimo.app";const Va=t=>{let e=(0,ot.c)(25),{onClose:n}=t,[o,s]=(0,P.useState)(""),{exportAsHTML:r}=O(),i=`${o}-${Math.random().toString(36).slice(2,6)}`,l=`${se}/static/${i}`,d;e[0]!==r||e[1]!==n||e[2]!==i?(d=async j=>{j.preventDefault(),n();let z=await r({download:!1,includeCode:!0,files:oa.INSTANCE.filenames()}),v=D({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${se}/api/static`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:z,path:i})}).catch(()=>{v.dismiss(),D({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:S.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]})})}),v.dismiss(),D({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."]})})},e[0]=r,e[1]=n,e[2]=i,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsx)(Fe,{children:"Share static notebook"}),e[4]=c):c=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsxs)(Be,{children:[c,(0,a.jsxs)(Ve,{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:se,target:"_blank",children:se}),"."]})]}),e[5]=p):p=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=j=>{s(j.target.value.toLowerCase().replaceAll(/\s/g,"-").replaceAll(/[^\da-z-]/g,""))},e[6]=u):u=e[6];let h;e[7]===o?h=e[8]:(h=(0,a.jsx)(ya,{"data-testid":"slug-input",id:"slug",autoFocus:!0,value:o,placeholder:"Notebook slug",onChange:u,required:!0,autoComplete:"off"}),e[7]=o,e[8]=h);let f;e[9]===l?f=e[10]:(f=(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)(Ka,{text:l}),(0,a.jsx)("span",{className:"text-primary",children:l})]})]}),e[9]=l,e[10]=f);let x;e[11]!==h||e[12]!==f?(x=(0,a.jsxs)("div",{className:"flex flex-col gap-6 py-4",children:[h,f]}),e[11]=h,e[12]=f,e[13]=x):x=e[13];let k;e[14]===n?k=e[15]:(k=(0,a.jsx)(q,{"data-testid":"cancel-share-static-notebook-button",variant:"secondary",onClick:n,children:"Cancel"}),e[14]=n,e[15]=k);let y;e[16]===l?y=e[17]:(y=(0,a.jsx)(q,{"data-testid":"share-static-notebook-button","aria-label":"Save",variant:"default",type:"submit",onClick:async()=>{await B(l)},children:"Create"}),e[16]=l,e[17]=y);let b;e[18]!==k||e[19]!==y?(b=(0,a.jsxs)(Ue,{children:[k,y]}),e[18]=k,e[19]=y,e[20]=b):b=e[20];let w;return e[21]!==d||e[22]!==b||e[23]!==x?(w=(0,a.jsx)(Ye,{className:"w-fit",children:(0,a.jsxs)("form",{onSubmit:d,children:[p,x,b]})}),e[21]=d,e[22]=b,e[23]=x,e[24]=w):w=e[24],w};var Ka=t=>{let e=(0,ot.c)(8),[n,o]=P.useState(!1),s;e[0]===t.text?s=e[1]:(s=Ie.stopPropagation(async c=>{c.preventDefault(),await B(t.text),o(!0),setTimeout(()=>o(!1),2e3)}),e[0]=t.text,e[1]=s);let r=s,i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(He,{size:14,strokeWidth:1.5}),e[2]=i):i=e[2];let l;e[3]===r?l=e[4]:(l=(0,a.jsx)(q,{"data-testid":"copy-static-notebook-url-button",onClick:r,size:"xs",variant:"secondary",children:i}),e[3]=r,e[4]=l);let d;return e[5]!==n||e[6]!==l?(d=(0,a.jsx)(Ae,{content:"Copied!",open:n,children:l}),e[5]=n,e[6]=l,e[7]=d):d=e[7],d},Ga=N();function Ja(){let t=document.getElementsByClassName(De.outputArea);for(let e of t){let n=e.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=fe.findElement(e);if(!o){H.warn("Could not find HTMLCellId for visible output area",e);continue}return{cellId:fe.parse(o.id)}}}return H.warn("No visible output area found for scroll anchor"),null}function Za(t){if(!t){H.warn("No scroll anchor provided to restore scroll position");return}let e=document.getElementById(fe.create(t.cellId));if(!e){H.warn("Could not find cell element to restore scroll position",t.cellId);return}if(!e.querySelector(`.${De.outputArea}`)){H.warn("Could not find output area to restore scroll position",t.cellId);return}e.scrollIntoView({block:"start",behavior:"auto"})}function nt(){let t=(0,Ga.c)(2),e=$(Ne),n;return t[0]===e?n=t[1]:(n=()=>{let o=Ja();e(s=>({mode:zt(s.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Za(o)})})},t[0]=e,t[1]=n),n}const st=pt(!1);var Qa=N();const Xa=()=>{let t=(0,Qa.c)(7),{selectedLayout:e}=Te(),{setLayoutView:n}=Re();if(oe()&&!bt("wasm_layouts"))return null;let o;t[0]===n?o=t[1]:(o=l=>n(l),t[0]=n,t[1]=o);let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(Vt,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(Bt,{placeholder:"Select a view"})}),t[2]=s):s=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(Ut,{children:(0,a.jsxs)(Yt,{children:[(0,a.jsx)(Ot,{children:"View as"}),Ze.map(to)]})}),t[3]=r):r=t[3];let i;return t[4]!==e||t[5]!==o?(i=(0,a.jsxs)(Kt,{"data-testid":"layout-select",value:e,onValueChange:o,children:[s,r]}),t[4]=e,t[5]=o,t[6]=i):i=t[6],i};function eo(t){return(0,a.jsx)(lt(t),{className:"h-4 w-4"})}function lt(t){switch(t){case"vertical":return La;case"grid":return ha;case"slides":return tt;default:return Xt(t),ja}}function it(t){return Le.startCase(t)}function to(t){return(0,a.jsx)(Ft,{value:t,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[eo(t),(0,a.jsx)("span",{children:it(t)})]})},t)}async function ao(t){let{filename:e,preset:n,downloadPDF:o}=t;await o({filename:e,webpdf:!1,preset:n,includeInputs:!0,rasterServer:"static"})}var oo=N();function no(t){let e=(0,oo.c)(5),{openPrompt:n,closeModal:o}=je(),{sendCopy:s}=O(),r;return e[0]!==o||e[1]!==n||e[2]!==s||e[3]!==t?(r=()=>{if(!t)return null;let i=ga.guessDeliminator(t);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${Oe.basename(t)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:l=>{let d=i.join(Oe.dirname(t),l);s({source:t,destination:d}).then(()=>{o(),D({title:"Notebook copied",description:"A copy of the notebook has been created."}),Na(d)})}})},e[0]=o,e[1]=n,e[2]=s,e[3]=t,e[4]=r):r=e[4],r}const so=()=>{let{updateCellConfig:t}=_e(),{saveCellConfig:e}=O();return(0,P.useCallback)(async()=>{let n=new gt,o=Me(),s=o.cellIds.inOrderIds,r={};for(let l of s){if(o.cellData[l]===void 0)continue;let{code:d,config:c}=o.cellData[l];c.hide_code||n.isSupported(d)&&(r[l]={hide_code:!0})}let i=Se.entries(r);if(i.length!==0){await e({configs:r});for(let[l,d]of i)t({cellId:l,config:d})}},[t])};var lo=N();function rt(){let t=(0,lo.c)(4),{openConfirm:e}=je(),n=$(Lt),{sendRestart:o}=O(),s;return t[0]!==e||t[1]!==o||t[2]!==n?(s=()=>{e({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)($t,{onClick:async()=>{n({state:Et.CLOSING}),await o(),za()},"aria-label":"Confirm Restart",children:"Restart"})})},t[0]=e,t[1]=o,t[2]=n,t[3]=s):s=t[3],s}var io=N(),T=t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()};function ro(){var Ce,ze;let t=(0,io.c)(52),e=Wa(),{openModal:n,closeModal:o}=je(),{toggleApplication:s}=ft(),{selectedPanel:r}=kt(),[i]=mt(Ne),l=ae(_t),d=so(),[c]=Pt(),{updateCellConfig:p,undoDeleteCell:u,clearAllCellOutputs:h,addSetupCellIfDoesntExist:f,collapseAllCells:x,expandAllCells:k}=_e(),y=rt(),b=Ca(),w=no(e),j=$(st),z=$(St),v=$(Dt),{exportAsIPYNB:W,exportAsMarkdown:_,readCode:M,saveCellConfig:ie,updateCellOutputs:A}=O(),I=Sa(),re=ae(vt),de=ae(Mt),ce=ae(yt),{selectedLayout:U}=Te(),{setLayoutView:he}=Re(),Y=nt(),V=((Ce=c.sharing)==null?void 0:Ce.html)??!0,K=((ze=c.sharing)==null?void 0:ze.wasm)??!0,ve=!oe(),me=U==="slides",dt=_o,ct=Wo,G;t[0]!==e||t[1]!==I||t[2]!==A?(G=async m=>{let{preset:C,title:R}=m;if(!e){le();return}await Pe(R,async ue=>{await Je({takeScreenshots:()=>I({progress:ue}),updateCellOutputs:A}),await ao({filename:e,preset:C,downloadPDF:Jt})})},t[0]=e,t[1]=I,t[2]=A,t[3]=G):G=t[3];let L=G,J;t[4]===L?J=t[5]:(J=async()=>{if(ve){await L({preset:"document",title:"Downloading Document PDF..."});return}let m=new Event("export-beforeprint"),C=new Event("export-afterprint");window.dispatchEvent(m),setTimeout(zo,0),setTimeout(()=>window.dispatchEvent(C),0)},t[4]=L,t[5]=J);let Z=J,Q;t[6]!==W||t[7]!==e||t[8]!==I||t[9]!==A?(Q=async()=>{if(!e){le();return}await Pe("Downloading IPYNB...",async m=>{await Je({takeScreenshots:()=>I({progress:m}),updateCellOutputs:A});let C=await W({download:!1});ke(new Blob([C],{type:"application/x-ipynb+json"}),be.toIPYNB(document.title))})},t[6]=W,t[7]=e,t[8]=I,t[9]=A,t[10]=Q):Q=t[10];let pe=Q,X;t[11]===Symbol.for("react.memo_cache_sentinel")?(X=(0,a.jsx)(Gt,{size:14,strokeWidth:1.5}),t[11]=X):X=t[11];let ee;t[12]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,a.jsx)(Ee,{size:14,strokeWidth:1.5}),t[12]=ee):ee=t[12];let E;t[13]===e?E=t[14]:(E=async()=>{if(!e){le();return}await $e({filename:e,includeCode:!0})},t[13]=e,t[14]=E);let te;return t[15]!==f||t[16]!==de||t[17]!==h||t[18]!==o||t[19]!==x||t[20]!==w||t[21]!==L||t[22]!==k||t[23]!==_||t[24]!==e||t[25]!==Z||t[26]!==pe||t[27]!==re||t[28]!==d||t[29]!==me||t[30]!==l||t[31]!==n||t[32]!==M||t[33]!==y||t[34]!==b||t[35]!==ie||t[36]!==U||t[37]!==r||t[38]!==j||t[39]!==v||t[40]!==he||t[41]!==z||t[42]!==V||t[43]!==K||t[44]!==E||t[45]!==s||t[46]!==Y||t[47]!==u||t[48]!==ce||t[49]!==p||t[50]!==i.mode?(te=[{icon:X,label:"Download",handle:T,dropdown:[{icon:ee,label:"Download as HTML",handle:E},{icon:(0,a.jsx)(Ee,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!e){le();return}await $e({filename:e,includeCode:!1})}},{icon:(0,a.jsx)(Ma,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let m=await _({download:!1});ke(new Blob([m],{type:"text/plain"}),be.toMarkdown(document.title))}},{icon:(0,a.jsx)(Ea,{size:14,strokeWidth:1.5}),label:"Download as ipynb",handle:pe},{icon:(0,a.jsx)(na,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let m=await M();ke(new Blob([m.contents],{type:"text/plain"}),be.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(fa,{size:14,strokeWidth:1.5}),label:"Download as PNG",disabled:i.mode!=="present",tooltip:i.mode==="present"?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",_a("global.hideCode",!1)]}),handle:Co},me?{divider:!0,icon:(0,a.jsx)(ne,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:T,dropdown:[{icon:(0,a.jsx)(ne,{size:14,strokeWidth:1.5}),label:"Document Layout",handle:Z},{icon:(0,a.jsx)(ne,{size:14,strokeWidth:1.5}),label:"Slides Layout",rightElement:ct(!0),hidden:!ve,handle:async()=>{await L({preset:"slides",title:"Downloading Slides PDF..."})}}]}:{divider:!0,icon:(0,a.jsx)(ne,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:Z}]},{icon:(0,a.jsx)(ka,{size:14,strokeWidth:1.5}),label:"Pair with an agent",hidden:oe(),handle:async()=>{n((0,a.jsx)(Ya,{onClose:o}))}},{icon:(0,a.jsx)(Ra,{size:14,strokeWidth:1.5}),label:"Share",handle:T,hidden:!V&&!K,dropdown:[{icon:(0,a.jsx)(da,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!V,handle:async()=>{n((0,a.jsx)(Va,{onClose:o}))}},{icon:(0,a.jsx)(xa,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!K,handle:async()=>{await B(Ke({code:(await M()).contents})),D({title:"Copied",description:"Link copied to clipboard."})}},{icon:(0,a.jsx)(Ge,{size:14,strokeWidth:1.5}),label:"Create molab notebook",handle:async()=>{let m=Ke({code:(await M()).contents,baseUrl:`${S.molab}/new`});window.open(m,"_blank")}}]},{icon:(0,a.jsx)(Ta,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:T,dropdown:Wt.flatMap(m=>{let{type:C,Icon:R,hidden:ue,additionalKeywords:ht}=m;return ue?[]:{label:Le.startCase(C),rightElement:dt(r===C),icon:(0,a.jsx)(R,{size:14,strokeWidth:1.5}),handle:()=>s(C),additionalKeywords:ht}})},{icon:(0,a.jsx)(tt,{size:14,strokeWidth:1.5}),label:"Present as",handle:T,dropdown:[{icon:i.mode==="present"?(0,a.jsx)(wa,{size:14,strokeWidth:1.5}):(0,a.jsx)(ta,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{Y()}},...Ze.map((m,C)=>{let R=lt(m);return{divider:C===0,label:it(m),icon:(0,a.jsx)(R,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:U===m&&(0,a.jsx)(we,{size:14})}),handle:()=>{he(m),i.mode==="edit"&&Y()}}})]},{icon:(0,a.jsx)(Ia,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!e||oe(),handle:w},{icon:(0,a.jsx)(Qe,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!e,handle:async()=>{await B((await M()).contents),D({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(sa,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!re||l,handle:async()=>{let m=jt(Me());await ie({configs:Se.fromEntries(m.map(vo))});for(let C of m)p({cellId:C,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(et,{size:14,strokeWidth:1.5}),label:"Add setup cell",handle:()=>{f({})}},{icon:(0,a.jsx)(Nt,{size:14,strokeWidth:1.5}),label:"Add database connection",handle:()=>{n((0,a.jsx)(qe,{onClose:o}))}},{icon:(0,a.jsx)(pa,{size:14,strokeWidth:1.5}),label:"Add remote storage",handle:()=>{n((0,a.jsx)(qe,{defaultTab:"storage",onClose:o}))}},{icon:(0,a.jsx)(at,{size:14,strokeWidth:1.5}),label:ce,hidden:!de||l,handle:()=>{u()}},{icon:(0,a.jsx)($a,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:y,additionalKeywords:["reset","reload","restart"]},{icon:(0,a.jsx)(Aa,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{b()}},{icon:(0,a.jsx)(wt,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{h()}},{icon:(0,a.jsx)(ia,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",handle:d,redundant:!0},{icon:(0,a.jsx)(Pa,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:x,redundant:!0},{icon:(0,a.jsx)(Da,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:k,redundant:!0},{divider:!0,icon:(0,a.jsx)(Xe,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>j(go)},{icon:(0,a.jsx)(aa,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>v(jo)},{icon:(0,a.jsx)(ba,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>z(wo),redundant:!0,additionalKeywords:["preferences","options","configuration"]},{icon:(0,a.jsx)(la,{size:14,strokeWidth:1.5}),label:"Resources",handle:T,dropdown:[{icon:(0,a.jsx)(xt,{size:14,strokeWidth:1.5}),label:"Documentation",handle:ko},{icon:(0,a.jsx)(ra,{size:14,strokeWidth:1.5}),label:"GitHub",handle:bo},{icon:(0,a.jsx)(ca,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:yo},{icon:(0,a.jsx)(ma,{size:14,strokeWidth:1.5}),label:"YouTube",handle:xo},{icon:(0,a.jsx)(Ct,{size:14,strokeWidth:1.5}),label:"Changelog",handle:fo}]},{divider:!0,icon:(0,a.jsx)(ua,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:uo},{icon:(0,a.jsx)(Ge,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:po}].filter(mo).map(co),t[15]=f,t[16]=de,t[17]=h,t[18]=o,t[19]=x,t[20]=w,t[21]=L,t[22]=k,t[23]=_,t[24]=e,t[25]=Z,t[26]=pe,t[27]=re,t[28]=d,t[29]=me,t[30]=l,t[31]=n,t[32]=M,t[33]=y,t[34]=b,t[35]=ie,t[36]=U,t[37]=r,t[38]=j,t[39]=v,t[40]=he,t[41]=z,t[42]=V,t[43]=K,t[44]=E,t[45]=s,t[46]=Y,t[47]=u,t[48]=ce,t[49]=p,t[50]=i.mode,t[51]=te):te=t[51],te}function co(t){return t.dropdown?{...t,dropdown:t.dropdown.filter(ho)}:t}function ho(t){return!t.hidden}function mo(t){return!t.hidden}function po(){let t=va();window.open(t,"_blank")}function uo(){let t=document.baseURI.split("?")[0];window.open(t,"_self")}function fo(){window.open(S.releasesPage,"_blank")}function xo(){window.open(S.youtube,"_blank")}function yo(){window.open(S.discordLink,"_blank")}function bo(){window.open(S.githubPage,"_blank")}function ko(){window.open(S.docsPage,"_blank")}function wo(t){return!t}function jo(t){return!t}function go(t){return!t}function vo(t){return[t,{disabled:!1}]}async function Co(){let t=document.getElementById("App");t&&await Zt({element:t,filename:document.title,prepare:Qt})}function zo(){return window.print()}function Wo(t){return t?(0,a.jsx)("span",{className:"ml-3 shrink-0 rounded-full border border-emerald-200 bg-emerald-50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-emerald-700",children:"Recommended"}):null}function _o(t){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:t&&(0,a.jsx)(we,{size:14})})}function le(){D({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{nt as a,Xe as c,st as i,Qe as l,rt as n,at as o,Xa as r,et as s,ro as t};
|
package/dist/index.html
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<marimo-server-token data-token="{{ server_token }}" hidden></marimo-server-token>
|
|
67
67
|
<!-- /TODO -->
|
|
68
68
|
<title>{{ title }}</title>
|
|
69
|
-
<script type="module" crossorigin src="./assets/index-
|
|
69
|
+
<script type="module" crossorigin src="./assets/index-C9ReT81p.js"></script>
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-BPPi7vOr.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="./assets/chunk-LvLJmgfZ.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="./assets/react-Bj1aDYRI.js">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marimo-team/frontend",
|
|
3
|
-
"version": "0.23.7-
|
|
3
|
+
"version": "0.23.7-dev27",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"./unstable_internal/*": "./src/*"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@ai-sdk/react": "^3.0.
|
|
24
|
+
"@ai-sdk/react": "^3.0.134",
|
|
25
25
|
"@anywidget/types": "^0.2.0",
|
|
26
26
|
"@codemirror/autocomplete": "^6.20.1",
|
|
27
27
|
"@codemirror/commands": "^6.10.2",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@xterm/addon-web-links": "^0.12.0",
|
|
94
94
|
"@xterm/xterm": "^5.5.0",
|
|
95
95
|
"@zed-industries/agent-client-protocol": "^0.4.5",
|
|
96
|
-
"ai": "^6.0.
|
|
96
|
+
"ai": "^6.0.129",
|
|
97
97
|
"ansi_up": "^6.0.6",
|
|
98
98
|
"class-variance-authority": "^0.7.1",
|
|
99
99
|
"clsx": "^2.1.1",
|