@marimo-team/frontend 0.23.2-dev52 → 0.23.2-dev53

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.
@@ -1 +0,0 @@
1
- import{s as K}from"./chunk-LvLJmgfZ.js";import{u as M}from"./useEvent-D91BmmQi.js";import{t as G}from"./react-Bj1aDYRI.js";import{E as H,fi as ee,x as te}from"./cells-8P3lr_U-.js";import"./react-dom-CSu739Rf.js";import{t as $}from"./compiler-runtime-B3qBwwSJ.js";import{n as q}from"./constants-DMpttj8Q.js";import{S as re,d as se}from"./config-Calf6e81.js";import{t as oe}from"./cn-DCUzRj2J.js";import{t as ae}from"./jsx-runtime-BqBOg78p.js";import"./fullscreen-BDxedMYP.js";import"./popover-UExmgBsf.js";import{P as ie,_t as le,st as Q,v as me}from"./JsonOutput-C9sdMiTb.js";import{r as ne}from"./download-C9hPuN_P.js";import{n as ce,t as F}from"./button-D9nb17Rw.js";import"./dist-BrR4M-k3.js";import"./cjs-BRGiG41H.js";import"./main-B0OX4z33.js";import"./useNonce-DfoVjkkH.js";import{r as de}from"./requests-DIwGYs0l.js";import"./layout-j6GRgN2K.js";import{c as pe}from"./state-Dlj7aAV2.js";import"./markdown-renderer-1cPM8PkF.js";import{t as he}from"./copy-BwrPA9zQ.js";import{i as fe,l as xe,n as be,r as X,t as ye,u as je}from"./panels--d4wmuBV.js";import{t as ue}from"./spinner-jEqwgi_c.js";import"./dist-BwejP-9J.js";import"./dist-G3xLh7ZX.js";import"./dist-idZNafp8.js";import"./dist-DfWgLTCQ.js";import"./dist-Dg3CCt0r.js";import{t as ge}from"./use-toast-PYIpV284.js";import{t as ke}from"./session-DdhIEena.js";import"./purify.es-Cg0r2qW-.js";import"./dates-CtmdgiVR.js";import{n as _e}from"./copy-BnK_ki61.js";import{a as Ne,c as we,l as ve,n as Se,r as Ce,t as ze}from"./dialog-CqE8CV1Y.js";import{t as Pe}from"./share-CJEPnWjm.js";import"./utils-DVodi8oQ.js";import"./vega-loader.browser-CRZ52CKf.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";import{a as Ee}from"./cell-link-Df1ljd4V.js";import"./chunk-5FQGJX7Z-nCjg4iIq.js";import"./html-to-image-1NtYwXkp.js";import{n as Ie,t as Ae}from"./react-resizable-panels.browser.esm-xQHRvEag.js";import"./esm-CcSYdGmP.js";import"./name-cell-input-BQJD6TKP.js";import{t as Re}from"./marimo-icons-Ce24dQVN.js";import"./ws-BV-4clkP.js";import"./dist-De_C4bys.js";import"./dist-C65QDoZM.js";import"./dist-BicRLhLc.js";import"./dist-Ccf5fPww.js";import"./dist-Ba9R9Dz8.js";import"./dist-Bhj_nUh_.js";import"./dist-QPltPF77.js";import"./dist-yDzOYJbU.js";import"./dist-CJ2fCJoy.js";import"./esm-DYK5NwJW.js";var Te=$(),Be=K(G(),1),t=K(ae(),1);const We=o=>{let e=(0,Te.c)(25),{appConfig:s}=o,{setCells:r}=H(),{sendComponentValues:y}=de(),c;e[0]===y?c=e[1]:(c=()=>(X.INSTANCE.start(y),Le),e[0]=y,e[1]=c);let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[2]=a):a=e[2],(0,Be.useEffect)(c,a);let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=ke(),e[3]=i):i=e[3];let j;e[4]===r?j=e[5]:(j={autoInstantiate:!0,setCells:r,sessionId:i},e[4]=r,e[5]=j);let{connection:l}=be(j),N=M(te),u;e[6]===l.state?u=e[7]:(u=se(l.state),e[6]=l.state,e[7]=u);let x=u,d;e[8]!==s||e[9]!==x?(d=()=>x?(0,t.jsxs)(ie,{milliseconds:2e3,fallback:null,children:[(0,t.jsx)(ue,{className:"mx-auto"}),(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground mt-2",children:"Connecting..."})]}):(0,t.jsx)(fe,{appConfig:s,mode:"read"}),e[8]=s,e[9]=x,e[10]=d):d=e[10];let b=d,m;e:{if(typeof window>"u"){m=null;break e}let f,n;if(e[11]===Symbol.for("react.memo_cache_sentinel")){if(n=new URL(window.location.href),!n.searchParams.has("file")){m=null;break e}n.searchParams.delete("file"),f=n.searchParams.toString(),e[11]=f,e[12]=n,e[13]=m}else f=e[11],n=e[12],m=e[13];let w=f;m=w?`${n.pathname}?${w}`:n.pathname}let g=m,v=s.width,k;e[14]===Symbol.for("react.memo_cache_sentinel")?(k=g&&(0,t.jsx)("div",{className:"flex items-center px-6 pt-4 sm:-mt-8",children:(0,t.jsxs)("a",{href:g,"aria-label":"Back to gallery",className:oe(ce({variant:"text",size:"sm"}),"gap-2 px-0 text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(pe,{className:"size-4","aria-hidden":!0}),(0,t.jsx)("span",{children:"Back"})]})}),e[14]=k):k=e[14];let p;e[15]===l?p=e[16]:(p=(0,t.jsx)(je,{connection:l,className:"sm:pt-8",children:k}),e[15]=l,e[16]=p);let h;e[17]===b?h=e[18]:(h=b(),e[17]=b,e[18]=h);let _;return e[19]!==s.width||e[20]!==l||e[21]!==N||e[22]!==p||e[23]!==h?(_=(0,t.jsxs)(xe,{connection:l,isRunning:N,width:v,children:[p,h]}),e[19]=s.width,e[20]=l,e[21]=N,e[22]=p,e[23]=h,e[24]=_):_=e[24],_};function Le(){X.INSTANCE.stop()}var Y=$();const Oe=()=>{let o=(0,Y.c)(3),e=M(ee);if(!Q()||!e)return null;let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsxs)("span",{children:["Static"," ",(0,t.jsx)("a",{href:q.githubPage,target:"_blank",className:"text-(--sky-11) font-medium underline",children:"marimo"})," ","notebook - Run or edit for full interactivity"]}),o[0]=s):s=o[0];let r;return o[1]===e?r=o[2]:(r=(0,t.jsxs)("div",{className:"px-4 py-2 bg-(--sky-2) border-b border-(--sky-7) text-(--sky-11) flex justify-between items-center gap-4 print:hidden text-sm","data-testid":"static-notebook-banner",children:[s,(0,t.jsx)("span",{className:"shrink-0",children:(0,t.jsx)(Ue,{code:e})})]}),o[1]=e,o[2]=r),r};var Ue=o=>{let e=(0,Y.c)(78),{code:s}=o,r=Ee()||"notebook.py",y=r.lastIndexOf("/");y!==-1&&(r=r.slice(y+1));let c=window.location.href,a,i,j,l,N,u,x,d,b,m,g,v,k,p,h,_,f,n,w;if(e[0]!==s||e[1]!==r){let J=Pe({code:s});l=ze,e[21]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)(ve,{asChild:!0,children:(0,t.jsx)(F,{"data-testid":"static-notebook-dialog-trigger",variant:"outline",size:"xs",children:"Run or Edit"})}),e[21]=g):g=e[21],j=Se,i=Ne,e[22]===r?m=e[23]:(m=(0,t.jsx)(we,{children:r}),e[22]=r,e[23]=m),a=Ce,u="pt-3 text-left space-y-3",e[24]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsxs)("p",{children:["This is a static"," ",(0,t.jsx)("a",{href:q.githubPage,target:"_blank",className:"text-(--sky-11) hover:underline font-medium",children:"marimo"})," ","notebook. To run interactively:"]}),e[24]=x):x=e[24];let V;e[25]===Symbol.for("react.memo_cache_sentinel")?(V=(0,t.jsx)("br",{}),e[25]=V):V=e[25],e[26]===r?d=e[27]:(d=(0,t.jsx)("div",{className:"rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)",children:(0,t.jsxs)("div",{className:"font-mono text-(--sky-11) leading-relaxed",children:["pip install marimo",V,"marimo edit ",r]})}),e[26]=r,e[27]=d),e[28]===Symbol.for("react.memo_cache_sentinel")?(b=!c.endsWith(".html")&&(0,t.jsxs)("div",{className:"rounded-lg p-3 border bg-(--sky-2) border-(--sky-7)",children:[(0,t.jsx)("div",{className:"text-sm text-(--sky-12) mb-1",children:"Or run directly from URL:"}),(0,t.jsxs)("div",{className:"font-mono text-(--sky-11) break-all",children:["marimo edit ",window.location.href]})]}),e[28]=b):b=e[28],w="pt-3 border-t border-(--sky-7)",_="text-sm text-(--sky-12) mb-2",e[29]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsx)("strong",{children:"Try in browser with WebAssembly:"}),e[29]=f):f=e[29],n=" ",N=J,v="_blank",k="text-(--sky-11) hover:underline break-all",p="noreferrer",h=J.slice(0,50),e[0]=s,e[1]=r,e[2]=a,e[3]=i,e[4]=j,e[5]=l,e[6]=N,e[7]=u,e[8]=x,e[9]=d,e[10]=b,e[11]=m,e[12]=g,e[13]=v,e[14]=k,e[15]=p,e[16]=h,e[17]=_,e[18]=f,e[19]=n,e[20]=w}else a=e[2],i=e[3],j=e[4],l=e[5],N=e[6],u=e[7],x=e[8],d=e[9],b=e[10],m=e[11],g=e[12],v=e[13],k=e[14],p=e[15],h=e[16],_=e[17],f=e[18],n=e[19],w=e[20];let S;e[30]!==N||e[31]!==v||e[32]!==k||e[33]!==p||e[34]!==h?(S=(0,t.jsxs)("a",{href:N,target:v,className:k,rel:p,children:[h,"..."]}),e[30]=N,e[31]=v,e[32]=k,e[33]=p,e[34]=h,e[35]=S):S=e[35];let C;e[36]!==S||e[37]!==_||e[38]!==f||e[39]!==n?(C=(0,t.jsxs)("p",{className:_,children:[f,n,S]}),e[36]=S,e[37]=_,e[38]=f,e[39]=n,e[40]=C):C=e[40];let L;e[41]===Symbol.for("react.memo_cache_sentinel")?(L=(0,t.jsx)("p",{className:"text-sm text-(--sky-12)",children:"Note: WebAssembly may not work for all notebooks. Additionally, some dependencies may not be available in the browser."}),e[41]=L):L=e[41];let z;e[42]!==C||e[43]!==w?(z=(0,t.jsxs)("div",{className:w,children:[C,L]}),e[42]=C,e[43]=w,e[44]=z):z=e[44];let P;e[45]!==a||e[46]!==u||e[47]!==x||e[48]!==d||e[49]!==b||e[50]!==z?(P=(0,t.jsxs)(a,{className:u,children:[x,d,b,z]}),e[45]=a,e[46]=u,e[47]=x,e[48]=d,e[49]=b,e[50]=z,e[51]=P):P=e[51];let E;e[52]!==i||e[53]!==m||e[54]!==P?(E=(0,t.jsxs)(i,{children:[m,P]}),e[52]=i,e[53]=m,e[54]=P,e[55]=E):E=e[55];let I;e[56]===s?I=e[57]:(I=async()=>{await _e(s),ge({title:"Copied to clipboard"})},e[56]=s,e[57]=I);let O;e[58]===Symbol.for("react.memo_cache_sentinel")?(O=(0,t.jsx)(he,{className:"w-3 h-3 mr-2"}),e[58]=O):O=e[58];let A;e[59]===I?A=e[60]:(A=(0,t.jsxs)(F,{"data-testid":"copy-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:I,children:[O,"Copy code"]}),e[59]=I,e[60]=A);let R;e[61]!==s||e[62]!==r?(R=()=>{ne(new Blob([s],{type:"text/plain"}),r)},e[61]=s,e[62]=r,e[63]=R):R=e[63];let U;e[64]===Symbol.for("react.memo_cache_sentinel")?(U=(0,t.jsx)(le,{className:"w-3 h-3 mr-2"}),e[64]=U):U=e[64];let T;e[65]===R?T=e[66]:(T=(0,t.jsxs)(F,{"data-testid":"download-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:R,children:[U,"Download"]}),e[65]=R,e[66]=T);let B;e[67]!==A||e[68]!==T?(B=(0,t.jsxs)("div",{className:"flex gap-3 pt-2",children:[A,T]}),e[67]=A,e[68]=T,e[69]=B):B=e[69];let W;e[70]!==j||e[71]!==E||e[72]!==B?(W=(0,t.jsxs)(j,{children:[E,B]}),e[70]=j,e[71]=E,e[72]=B,e[73]=W):W=e[73];let D;return e[74]!==l||e[75]!==g||e[76]!==W?(D=(0,t.jsxs)(l,{children:[g,W]}),e[74]=l,e[75]=g,e[76]=W,e[77]=D):D=e[77],D},Z=$(),De=re()||Q(),Ve=o=>{let e=(0,Z.c)(9),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(Oe,{}),e[0]=s):s=e[0];let r;e[1]===o.appConfig?r=e[2]:(r=(0,t.jsx)(We,{appConfig:o.appConfig}),e[1]=o.appConfig,e[2]=r);let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=De&&(0,t.jsx)($e,{}),e[3]=y):y=e[3];let c;e[4]===r?c=e[5]:(c=(0,t.jsxs)(Ae,{children:[s,r,y]}),e[4]=r,e[5]=c);let a;e[6]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(me,{}),e[6]=a):a=e[6];let i;return e[7]===c?i=e[8]:(i=(0,t.jsx)(ye,{children:(0,t.jsxs)(Ie,{direction:"horizontal",autoSaveId:"marimo:chrome:v1:run1",children:[c,a]})}),e[7]=c,e[8]=i),i},$e=()=>{let o=(0,Z.c)(1),e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("div",{className:"fixed bottom-0 right-0 z-50","data-testid":"watermark",children:(0,t.jsxs)("a",{href:q.githubPage,target:"_blank",className:"text-sm text-(--grass-11) font-bold tracking-wide transition-colors bg-(--grass-4) hover:bg-(--grass-5) border-t border-l border-(--grass-8) px-3 py-1 rounded-tl-md flex items-center gap-2",children:[(0,t.jsx)("span",{children:"made with marimo"}),(0,t.jsx)(Re,{className:"h-4 w-auto"})]})}),o[0]=e):e=o[0],e},qe=Ve;export{qe as default};