@marimo-team/frontend 0.23.16-dev28 → 0.23.16-dev29
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/{cell-editor-KWSR-llo.js → cell-editor-EV-1IccQ.js} +1 -1
- package/dist/assets/{command-palette-BfyjcLEp.js → command-palette-DZ2rNzzf.js} +1 -1
- package/dist/assets/{edit-page-j4gnjFei.js → edit-page-BPBDN3FB.js} +4 -4
- package/dist/assets/{index-BYAv-jBF.js → index-BJDqUUF2.js} +3 -3
- package/dist/assets/{layout-Cyvip7OR.js → layout-Dtql_o_T.js} +2 -2
- package/dist/assets/{panels-EhYQAy06.js → panels-Nt5IZl-9.js} +1 -1
- package/dist/assets/{reveal-component-CkFCS99a.js → reveal-component-CCLTV1q6.js} +42 -42
- package/dist/assets/{run-page-ClhbSbzk.js → run-page-CtYo0xcq.js} +1 -1
- package/dist/assets/{scratchpad-panel-BH7tCYvw.js → scratchpad-panel-C2wAEv5n.js} +1 -1
- package/dist/assets/{skeleton-DiD_znnO.js → skeleton-BzlKcq21.js} +1 -1
- package/dist/assets/slides-DkEgzTJB.css +1 -0
- package/dist/assets/{useNotebookActions-C5R8yLEx.js → useNotebookActions-DG8f4m8p.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/src/components/slides/__tests__/cell-output-block.test.tsx +40 -0
- package/src/components/slides/__tests__/slide-cell-view.test.tsx +33 -0
- package/src/components/slides/reveal-component.tsx +22 -17
- package/src/components/slides/slide-cell-view.tsx +1 -1
- package/src/components/slides/slides.css +4 -2
- package/dist/assets/slides-MCbMDtlY.css +0 -1
- /package/dist/assets/{swiper-component-Che9MNs4.js → swiper-component-g8EXE911.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as I}from"./chunk-LvLJmgfZ.js";import{p as U,u as T}from"./useEvent-D91BmmQi.js";import{t as $}from"./react-Bj1aDYRI.js";import{E as D,Fi as F,b as M,h as W}from"./cells-6yd8nOAu.js";import"./react-dom-CSu739Rf.js";import{t as R}from"./compiler-runtime-B3qBwwSJ.js";import{C as q}from"./utils-BWBBpCkT.js";import{n as z}from"./constants-CDyU_g2F.js";import{M as V,l as A,m as G,v as H}from"./config-B-Q7J_6d.js";import"./readonly-python-code-n_TrLmsR.js";import{t as J}from"./cn-DYvqRARy.js";import{t as K}from"./jsx-runtime-Blw4afVn.js";import"./fullscreen-CTDqNQr6.js";import"./popover-Bcz1Zikb.js";import{Lt as Q,P as X}from"./JsonOutput-BwwRpByA.js";import{r as Y}from"./download-HKgqJX4l.js";import{n as Z,t as P}from"./button-DDGiD1NW.js";import"./dist-12S8I4CH.js";import"./cjs-D5tzp-Y6.js";import"./main-BNL5rxQw.js";import"./useNonce-CbdaHKzX.js";import{r as ee}from"./requests-9-v2bhoi.js";import"./layout-
|
|
1
|
+
import{s as I}from"./chunk-LvLJmgfZ.js";import{p as U,u as T}from"./useEvent-D91BmmQi.js";import{t as $}from"./react-Bj1aDYRI.js";import{E as D,Fi as F,b as M,h as W}from"./cells-6yd8nOAu.js";import"./react-dom-CSu739Rf.js";import{t as R}from"./compiler-runtime-B3qBwwSJ.js";import{C as q}from"./utils-BWBBpCkT.js";import{n as z}from"./constants-CDyU_g2F.js";import{M as V,l as A,m as G,v as H}from"./config-B-Q7J_6d.js";import"./readonly-python-code-n_TrLmsR.js";import{t as J}from"./cn-DYvqRARy.js";import{t as K}from"./jsx-runtime-Blw4afVn.js";import"./fullscreen-CTDqNQr6.js";import"./popover-Bcz1Zikb.js";import{Lt as Q,P as X}from"./JsonOutput-BwwRpByA.js";import{r as Y}from"./download-HKgqJX4l.js";import{n as Z,t as P}from"./button-DDGiD1NW.js";import"./dist-12S8I4CH.js";import"./cjs-D5tzp-Y6.js";import"./main-BNL5rxQw.js";import"./useNonce-CbdaHKzX.js";import{r as ee}from"./requests-9-v2bhoi.js";import"./layout-Dtql_o_T.js";import{l as te}from"./state-DDag0B_B.js";import"./markdown-renderer-dABDqZDw.js";import{t as re}from"./copy-3iHFdt22.js";import{d as se,i as oe,l as ae,n as ie,r as O,t as ne,u as me}from"./panels-Nt5IZl-9.js";import{t as le}from"./spinner-D-V4psAa.js";import"./dist-DcwTQG1A.js";import"./dist-DnjsPBRJ.js";import"./dist-BJZAIIze.js";import"./dist-aRc_dRed.js";import"./dist-CPjTeT8p.js";import{t as ce}from"./use-toast-BwJoaaDM.js";import{t as de}from"./session-BmukRjSi.js";import"./purify.es-CWmnYhGI.js";import"./dates-C2LWzsCZ.js";import{n as pe}from"./copy-Bxb1_Gtw.js";import{a as he,c as fe,l as xe,n as be,r as je,t as ue}from"./dialog-BCVepWLJ.js";import{t as ge}from"./share-852X_cqy.js";import"./tooltip-B7U4xkIN.js";import"./vega-loader.browser-Dun7Qe4B.js";import"./defaultLocale-DOVIEEPN.js";import"./defaultLocale-BUCH2FMc.js";import{a as ye}from"./cell-link-C5gpAn3R.js";import"./chunk-5FQGJX7Z-Cp0LZT-a.js";import"./html-to-image-C-4ysbGe.js";import{n as ke,t as _e}from"./react-resizable-panels.browser.esm-Z-MD3n3J.js";import"./esm-B30N1GS0.js";import"./name-cell-input-Y4knmEIU.js";import{n as Ne,t as ve}from"./marimo-icons-C_nFooxr.js";import"./ws-BmTnbVEi.js";import"./dist-D5ToCtv8.js";import"./dist-D35OyUMQ.js";import"./dist-ByK00N0T.js";import"./dist-C5kf6g-d.js";import"./dist-BaKJ0-Tb.js";import"./dist-DNGKAtWk.js";import"./dist-56ul6-mm.js";import"./dist-3N7-WLqi.js";import"./dist-CM-lWxt3.js";import"./esm-Cmv0Nuxi.js";var we=R(),Se=I($(),1),t=I(K(),1),Ce=U(o=>o(W)||!G(o(H).state));const ze=o=>{let e=(0,we.c)(22),{appConfig:s}=o,{setCells:r}=D(),{sendComponentValues:l}=ee(),a;e[0]===l?a=e[1]:(a=()=>(O.INSTANCE.start(l),Pe),e[0]=l,e[1]=a);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=[],e[2]=i):i=e[2],(0,Se.useEffect)(a,i);let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=de(),e[3]=c):c=e[3];let g;e[4]===r?g=e[5]:(g={autoInstantiate:!0,setCells:r,sessionId:c},e[4]=r,e[5]=g);let{connection:j,reconnect:k}=ie(g),u=T(M),d;e:{if(typeof window>"u"){d=null;break e}let b,m;if(e[6]===Symbol.for("react.memo_cache_sentinel")){if(m=new URL(window.location.href),!m.searchParams.has("file")){d=null;break e}m.searchParams.delete("file"),b=m.searchParams.toString(),e[6]=b,e[7]=m,e[8]=d}else b=e[6],m=e[7],d=e[8];let y=b;d=y?`${m.pathname}?${y}`:m.pathname}let _=d,p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=_&&(0,t.jsx)("div",{className:"flex items-center px-6 pt-4 sm:-mt-8",children:(0,t.jsxs)("a",{href:_,"aria-label":"Back to gallery",className:J(Z({variant:"text",size:"sm"}),"gap-2 px-0 text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(te,{className:"size-4","aria-hidden":!0}),(0,t.jsx)("span",{children:"Back"})]})}),e[9]=p):p=e[9];let h;e[10]===j?h=e[11]:(h=(0,t.jsx)(se,{connection:j,className:"sm:pt-8",children:p}),e[10]=j,e[11]=h);let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(le,{className:"mx-auto"}),(0,t.jsx)("p",{className:"text-center text-sm text-muted-foreground mt-2",children:"Connecting..."})]}),e[12]=f):f=e[12];let n;e[13]===s?n=e[14]:(n=(0,t.jsx)(me,{requires:Ce,delay:2e3,fallback:f,children:(0,t.jsx)(oe,{appConfig:s,mode:"read"})}),e[13]=s,e[14]=n);let x;return e[15]!==s.width||e[16]!==j||e[17]!==u||e[18]!==k||e[19]!==h||e[20]!==n?(x=(0,t.jsxs)(ae,{connection:j,isRunning:u,width:s.width,onReconnect:k,children:[h,n]}),e[15]=s.width,e[16]=j,e[17]=u,e[18]=k,e[19]=h,e[20]=n,e[21]=x):x=e[21],x};function Pe(){O.INSTANCE.stop()}var B=R();const Re=()=>{let o=(0,B.c)(3),e=T(F);if(!A()||!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:z.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)(Ee,{code:e})})]}),o[1]=e,o[2]=r),r};var Ee=o=>{var E;let e=(0,B.c)(36),{code:s}=o,r=ye()||"notebook.py",l=r.lastIndexOf("/");l!==-1&&(r=r.slice(l+1));let[a]=q(),i=((E=a.sharing)==null?void 0:E.molab)!==!1,c=window.location.href,g;e[0]===s?g=e[1]:(g=ge({code:s,baseUrl:`${z.molab}/new`}),e[0]=s,e[1]=g);let j=g,k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k=(0,t.jsx)(xe,{asChild:!0,children:(0,t.jsx)(P,{"data-testid":"static-notebook-dialog-trigger",variant:"outline",size:"xs",children:"Run or Edit"})}),e[2]=k):k=e[2];let u;e[3]===r?u=e[4]:(u=(0,t.jsx)(fe,{children:r}),e[3]=r,e[4]=u);let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsxs)("p",{children:["This is a static"," ",(0,t.jsx)("a",{href:z.githubPage,target:"_blank",className:"text-(--sky-11) hover:underline font-medium",children:"marimo"})," ","notebook. To run interactively:"]}),e[5]=d):d=e[5];let _;e[6]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)("br",{}),e[6]=_):_=e[6];let p;e[7]===r?p=e[8]:(p=(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",_,"marimo edit ",r]})}),e[7]=r,e[8]=p);let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=!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[9]=h):h=e[9];let f;e[10]!==i||e[11]!==j?(f=i&&(0,t.jsxs)("div",{className:"pt-3 border-t flex gap-2 items-center",children:[(0,t.jsx)(P,{asChild:!0,variant:"outline",size:"xs",className:"shrink-0",children:(0,t.jsxs)("a",{href:j,target:"_blank",rel:"noopener noreferrer",children:[(0,t.jsx)(Ne,{size:12,strokeWidth:1.5,className:"mr-1.5 mt-px text-(--grass-11)"}),"Open in molab"]})}),(0,t.jsxs)("p",{className:"text-sm text-(--sky-12)",children:["Run this notebook in"," ",(0,t.jsx)("span",{className:"font-semibold",children:"molab"}),", marimo's cloud-hosted notebook platform."]})]}),e[10]=i,e[11]=j,e[12]=f):f=e[12];let n;e[13]!==p||e[14]!==f?(n=(0,t.jsxs)(je,{className:"pt-3 text-left space-y-3",children:[d,p,h,f]}),e[13]=p,e[14]=f,e[15]=n):n=e[15];let x;e[16]!==u||e[17]!==n?(x=(0,t.jsxs)(he,{children:[u,n]}),e[16]=u,e[17]=n,e[18]=x):x=e[18];let b;e[19]===s?b=e[20]:(b=async()=>{await pe(s),ce({title:"Copied to clipboard"})},e[19]=s,e[20]=b);let m;e[21]===Symbol.for("react.memo_cache_sentinel")?(m=(0,t.jsx)(re,{className:"w-3 h-3 mr-2"}),e[21]=m):m=e[21];let y;e[22]===b?y=e[23]:(y=(0,t.jsxs)(P,{"data-testid":"copy-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:b,children:[m,"Copy code"]}),e[22]=b,e[23]=y);let N;e[24]!==s||e[25]!==r?(N=()=>{Y(new Blob([s],{type:"text/plain"}),r)},e[24]=s,e[25]=r,e[26]=N):N=e[26];let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=(0,t.jsx)(Q,{className:"w-3 h-3 mr-2"}),e[27]=S):S=e[27];let v;e[28]===N?v=e[29]:(v=(0,t.jsxs)(P,{"data-testid":"download-static-notebook-dialog-button",variant:"outline",size:"sm",onClick:N,children:[S,"Download"]}),e[28]=N,e[29]=v);let w;e[30]!==y||e[31]!==v?(w=(0,t.jsxs)("div",{className:"flex gap-3 pt-2",children:[y,v]}),e[30]=y,e[31]=v,e[32]=w):w=e[32];let C;return e[33]!==x||e[34]!==w?(C=(0,t.jsxs)(ue,{children:[k,(0,t.jsxs)(be,{children:[x,w]})]}),e[33]=x,e[34]=w,e[35]=C):C=e[35],C},L=R(),Ie=V()||A(),Te=o=>{let e=(0,L.c)(9),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)(Re,{}),e[0]=s):s=e[0];let r;e[1]===o.appConfig?r=e[2]:(r=(0,t.jsx)(ze,{appConfig:o.appConfig}),e[1]=o.appConfig,e[2]=r);let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=Ie&&(0,t.jsx)(Ae,{}),e[3]=l):l=e[3];let a;e[4]===r?a=e[5]:(a=(0,t.jsxs)(_e,{children:[s,r,l]}),e[4]=r,e[5]=a);let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(X,{}),e[6]=i):i=e[6];let c;return e[7]===a?c=e[8]:(c=(0,t.jsx)(ne,{children:(0,t.jsxs)(ke,{direction:"horizontal",autoSaveId:"marimo:chrome:v1:run1",children:[a,i]})}),e[7]=a,e[8]=c),c},Ae=()=>{let o=(0,L.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 print:hidden","data-testid":"watermark",children:(0,t.jsxs)("a",{href:z.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)(ve,{className:"h-4 w-auto"})]})}),o[0]=e):e=o[0],e},Oe=Te;export{Oe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as oe}from"./chunk-LvLJmgfZ.js";import{d as be,l as ye,n as H,p as ae,u as we}from"./useEvent-D91BmmQi.js";import{t as Ne}from"./react-Bj1aDYRI.js";import{E as ke,F as ze,Pn as Ce,Vi as Se,Xi as n,Yi as Oe,__tla as Ae}from"./cells-6yd8nOAu.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import{_ as se}from"./useEventListener-C0195JsF.js";import{C as Ee}from"./utils-BWBBpCkT.js";import{t as Ie}from"./constants-CDyU_g2F.js";import"./readonly-python-code-n_TrLmsR.js";import{t as le}from"./cn-DYvqRARy.js";import{t as Pe}from"./jsx-runtime-Blw4afVn.js";import"./fullscreen-CTDqNQr6.js";import"./popover-Bcz1Zikb.js";import{n as Le,__tla as Me}from"./JsonOutput-BwwRpByA.js";import"./download-HKgqJX4l.js";import{t as z}from"./tooltip-4bZlU7jl.js";import{t as C}from"./button-DDGiD1NW.js";import"./dist-12S8I4CH.js";import"./cjs-D5tzp-Y6.js";import"./main-BNL5rxQw.js";import"./useNonce-CbdaHKzX.js";import{r as Re}from"./requests-9-v2bhoi.js";import{t as me}from"./createLucideIcon-w-Qo9n0R.js";import{f as Ve,__tla as De}from"./layout-
|
|
1
|
+
import{s as oe}from"./chunk-LvLJmgfZ.js";import{d as be,l as ye,n as H,p as ae,u as we}from"./useEvent-D91BmmQi.js";import{t as Ne}from"./react-Bj1aDYRI.js";import{E as ke,F as ze,Pn as Ce,Vi as Se,Xi as n,Yi as Oe,__tla as Ae}from"./cells-6yd8nOAu.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import{_ as se}from"./useEventListener-C0195JsF.js";import{C as Ee}from"./utils-BWBBpCkT.js";import{t as Ie}from"./constants-CDyU_g2F.js";import"./readonly-python-code-n_TrLmsR.js";import{t as le}from"./cn-DYvqRARy.js";import{t as Pe}from"./jsx-runtime-Blw4afVn.js";import"./fullscreen-CTDqNQr6.js";import"./popover-Bcz1Zikb.js";import{n as Le,__tla as Me}from"./JsonOutput-BwwRpByA.js";import"./download-HKgqJX4l.js";import{t as z}from"./tooltip-4bZlU7jl.js";import{t as C}from"./button-DDGiD1NW.js";import"./dist-12S8I4CH.js";import"./cjs-D5tzp-Y6.js";import"./main-BNL5rxQw.js";import"./useNonce-CbdaHKzX.js";import{r as Re}from"./requests-9-v2bhoi.js";import{t as me}from"./createLucideIcon-w-Qo9n0R.js";import{f as Ve,__tla as De}from"./layout-Dtql_o_T.js";import{n as He,t as qe,__tla as Te}from"./LazyAnyLanguageCodeMirror-B2JvSXP-.js";import{__tla as Fe}from"./markdown-renderer-dABDqZDw.js";import{u as Ge}from"./toDate-Ct2FT81-.js";import{t as Ue,__tla as Xe}from"./cell-editor-EV-1IccQ.js";import{t as Ye}from"./spinner-D-V4psAa.js";import{i as Be}from"./useDeleteCell-PrgejW8A.js";import"./dist-DcwTQG1A.js";import"./dist-DnjsPBRJ.js";import"./dist-BJZAIIze.js";import"./dist-aRc_dRed.js";import"./dist-CPjTeT8p.js";import"./session-BmukRjSi.js";import{r as Je}from"./useTheme-Bxv9B31g.js";import"./purify.es-CWmnYhGI.js";import"./dates-C2LWzsCZ.js";import"./tooltip-B7U4xkIN.js";import"./vega-loader.browser-Dun7Qe4B.js";import"./defaultLocale-DOVIEEPN.js";import"./defaultLocale-BUCH2FMc.js";import{__tla as Ke}from"./chunk-5FQGJX7Z-Cp0LZT-a.js";import"./html-to-image-C-4ysbGe.js";import{o as Qe}from"./focus-CVONl-Dy.js";import{n as We,r as Ze,t as ne}from"./react-resizable-panels.browser.esm-Z-MD3n3J.js";import{a as $e}from"./renderShortcut-Bl8_FVn8.js";import"./esm-B30N1GS0.js";import"./name-cell-input-Y4knmEIU.js";import{n as et,r as tt}from"./panel-context-CH75ubGG.js";import{__tla as rt}from"./loro_wasm_bg-RNUly1SE.js";import"./ws-BmTnbVEi.js";import"./Inputs-B8-VCb_j.js";import"./dist-D5ToCtv8.js";import"./dist-D35OyUMQ.js";import"./dist-ByK00N0T.js";import"./dist-C5kf6g-d.js";import"./dist-BaKJ0-Tb.js";import"./dist-DNGKAtWk.js";import"./dist-56ul6-mm.js";import"./dist-3N7-WLqi.js";import"./dist-CM-lWxt3.js";import"./esm-Cmv0Nuxi.js";import{t as ot}from"./kiosk-mode-BumOFEtY.js";let ce,at=Promise.all([(()=>{try{return Ae}catch{}})(),(()=>{try{return Me}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return Te}catch{}})(),(()=>{try{return Fe}catch{}})(),(()=>{try{return Xe}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return rt}catch{}})()]).then(async()=>{var de=me("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]),pe=me("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]),he=ie(),q=oe(Ne(),1),ue=15;const T=Se("marimo:scratchpadHistory:v1",[],Ce),fe=ae(!1),xe=ae(null,(e,i,s)=>{if(s=s.trim(),!s)return;let m=e(T);i(T,[s,...m.filter(c=>c!==s)].slice(0,ue))});var t=oe(Pe(),1),_e={hide_code:!1,disabled:!1};const ve=()=>{var re;let e=(0,he.c)(60),i=ze(),[s]=Ee(),{theme:m}=Je(),c=(0,q.useRef)(null),F=Qe(),{createNewCell:G,updateCellCode:d}=ke(),{sendRunScratchpad:p}=Re(),S=et(),U=tt(),l=i.cellRuntime[n],X=l==null?void 0:l.output,O=l==null?void 0:l.status,Y=l==null?void 0:l.consoleOutputs,r=((re=i.cellData.__scratch__)==null?void 0:re.code)??"",B=be(xe),[a,h]=ye(fe),u=we(T),A;e[0]!==B||e[1]!==r||e[2]!==p?(A=()=>{p({code:r}),B(r)},e[0]=B,e[1]=r,e[2]=p,e[3]=A):A=e[3];let f=H(A),E;e[4]!==r||e[5]!==G||e[6]!==F?(E=()=>{r.trim()&&G({code:r,before:!1,cellId:F??"__end__"})},e[4]=r,e[5]=G,e[6]=F,e[7]=E):E=e[7];let J=H(E),I;e[8]!==p||e[9]!==d?(I=()=>{d({cellId:n,code:"",formattingChange:!1}),p({code:""});let o=c.current;o&&o.dispatch({changes:{from:0,to:o.state.doc.length,insert:""}})},e[8]=p,e[9]=d,e[10]=I):I=e[10];let K=H(I),P;e[11]!==h||e[12]!==d?(P=o=>{h(!1),d({cellId:n,code:o,formattingChange:!1});let k=c.current;k&&k.dispatch({changes:{from:0,to:k.state.doc.length,insert:o}})},e[11]=h,e[12]=d,e[13]=P):P=e[13];let Q=H(P),[W,ge]=(0,q.useState)(),L;e[14]!==Q||e[15]!==u||e[16]!==a||e[17]!==m?(L=()=>a?(0,t.jsx)("div",{className:"absolute inset-0 z-100 bg-background p-3 border-none overflow-auto",children:(0,t.jsx)("div",{className:"overflow-auto flex flex-col gap-3",children:u.map((o,k)=>(0,t.jsx)("div",{className:"border rounded-md hover:shadow-sm cursor-pointer hover:border-input overflow-hidden",onClick:()=>Q(o),children:(0,t.jsx)(q.Suspense,{children:(0,t.jsx)(qe,{language:"python",theme:m,basicSetup:{highlightActiveLine:!1,highlightActiveLineGutter:!1},value:o.trim(),editable:!1,readOnly:!0})})},k))})}):null,e[14]=Q,e[15]=u,e[16]=a,e[17]=m,e[18]=L):L=e[18];let Z=L,M;e[19]!==K||e[20]!==J||e[21]!==f||e[22]!==u.length||e[23]!==a||e[24]!==h||e[25]!==O?(M=()=>(0,t.jsxs)("div",{className:"flex items-center shrink-0 border-b",children:[(0,t.jsx)(z,{content:$e("cell.run"),children:(0,t.jsx)(C,{"data-testid":"scratchpad-run-button",onClick:f,disabled:a,variant:"text",size:"xs",children:(0,t.jsx)(Be,{color:"var(--grass-11)",size:16})})}),(0,t.jsx)(z,{content:"Clear code and outputs",children:(0,t.jsx)(C,{disabled:a,size:"xs",variant:"text",onClick:K,children:(0,t.jsx)(de,{size:16})})}),(0,t.jsx)(ot,{children:(0,t.jsx)(z,{content:"Insert code",children:(0,t.jsx)(C,{disabled:a,size:"xs",variant:"text",onClick:J,children:(0,t.jsx)(He,{size:16})})})}),(O==="running"||O==="queued")&&(0,t.jsx)(Ye,{className:"inline",size:"small"}),(0,t.jsx)("div",{className:"flex-1"}),(0,t.jsx)(z,{content:"Toggle history",children:(0,t.jsx)(C,{size:"xs",variant:"text",className:le(a&&"bg-(--sky-3) rounded-none"),onClick:()=>h(!a),disabled:u.length===0,children:(0,t.jsx)(pe,{size:16})})}),(0,t.jsx)(z,{content:(0,t.jsx)("span",{className:"block max-w-prose",children:"Use this scratchpad to experiment with code without restrictions on variable names. Variables defined here aren't saved to notebook memory, and the code is not saved in the notebook file."}),children:(0,t.jsx)(C,{size:"xs",variant:"text",children:(0,t.jsx)(Ge,{size:16})})})]}),e[19]=K,e[20]=J,e[21]=f,e[22]=u.length,e[23]=a,e[24]=h,e[25]=O,e[26]=M):M=e[26];let $=M,je=S==="vertical",R;e[27]===Symbol.for("react.memo_cache_sentinel")?(R=Oe.create(n),e[27]=R):R=e[27];let x;e[28]===$?x=e[29]:(x=$(),e[28]=$,e[29]=x);let V;e[30]===Symbol.for("react.memo_cache_sentinel")?(V=o=>{c.current=o},e[30]=V):V=e[30];let _;e[31]!==r||e[32]!==f||e[33]!==W||e[34]!==m||e[35]!==s?(_=(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsx)(Ue,{theme:m,showPlaceholder:!1,id:n,code:r,config:_e,status:"idle",serializedEditorState:null,runCell:f,userConfig:s,editorViewRef:c,setEditorView:V,hidden:!1,showHiddenCode:se.NOOP,languageAdapter:W,setLanguageAdapter:ge})}),e[31]=r,e[32]=f,e[33]=W,e[34]=m,e[35]=s,e[36]=_):_=e[36];let v;e[37]===Z?v=e[38]:(v=Z(),e[37]=Z,e[38]=v);let g;e[39]!==v||e[40]!==x||e[41]!==_?(g=(0,t.jsx)(ne,{defaultSize:40,minSize:20,maxSize:70,children:(0,t.jsxs)("div",{className:"h-full flex flex-col overflow-hidden relative",children:[x,_,v]})}),e[39]=v,e[40]=x,e[41]=_,e[42]=g):g=e[42];let ee=je?"h-1":"w-1",j;e[43]===ee?j=e[44]:(j=le("bg-border hover:bg-primary/50 transition-colors",ee),e[43]=ee,e[44]=j);let b;e[45]===j?b=e[46]:(b=(0,t.jsx)(Ze,{className:j}),e[45]=j,e[46]=b);let y;e[47]===X?y=e[48]:(y=(0,t.jsx)("div",{className:"flex-1 overflow-auto",children:(0,t.jsx)(Le,{allowExpand:!1,output:X,className:Ie.outputArea,cellId:n,stale:!1,loading:!1})}),e[47]=X,e[48]=y);let w;e[49]===Y?w=e[50]:(w=(0,t.jsx)("div",{className:"overflow-auto shrink-0 max-h-[50%]",children:(0,t.jsx)(Ve,{consoleOutputs:Y,className:"overflow-auto",stale:!1,interrupted:!1,cellName:"_",onSubmitDebugger:se.NOOP,cellId:n,debuggerActive:!1})}),e[49]=Y,e[50]=w);let N;e[51]!==y||e[52]!==w?(N=(0,t.jsx)(ne,{defaultSize:60,minSize:20,children:(0,t.jsxs)("div",{className:"h-full flex flex-col divide-y overflow-hidden",children:[y,w]})}),e[51]=y,e[52]=w,e[53]=N):N=e[53];let D;return e[54]!==S||e[55]!==U||e[56]!==g||e[57]!==b||e[58]!==N?(D=(0,t.jsx)("div",{className:"flex flex-col h-full overflow-hidden",id:R,children:(0,t.jsxs)(We,{direction:S,className:"h-full",children:[g,b,N]},U)}),e[54]=S,e[55]=U,e[56]=g,e[57]=b,e[58]=N,e[59]=D):D=e[59],D};let te;te=ie(),ce=()=>{let e=(0,te.c)(1),i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(ve,{}),e[0]=i):i=e[0],i}});export{at as __tla,ce as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var A=Object.defineProperty;var N=(t,e,a)=>e in t?A(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var b=(t,e,a)=>N(t,typeof e!="symbol"?e+"":e,a);import{s as T}from"./chunk-LvLJmgfZ.js";import{u as I}from"./useEvent-D91BmmQi.js";import{a as V}from"./cells-6yd8nOAu.js";import{t as M}from"./compiler-runtime-B3qBwwSJ.js";import{g as k}from"./useEventListener-C0195JsF.js";import{t as E}from"./objects-BlG0ZrO0.js";import{o as P}from"./utils-BWBBpCkT.js";import{T as _,v as D}from"./config-B-Q7J_6d.js";import{t as z}from"./cn-DYvqRARy.js";import{t as $}from"./jsx-runtime-Blw4afVn.js";import{c as B,d as H}from"./download-HKgqJX4l.js";import{r as L}from"./requests-9-v2bhoi.js";import{F as R}from"./layout-
|
|
1
|
+
var A=Object.defineProperty;var N=(t,e,a)=>e in t?A(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var b=(t,e,a)=>N(t,typeof e!="symbol"?e+"":e,a);import{s as T}from"./chunk-LvLJmgfZ.js";import{u as I}from"./useEvent-D91BmmQi.js";import{a as V}from"./cells-6yd8nOAu.js";import{t as M}from"./compiler-runtime-B3qBwwSJ.js";import{g as k}from"./useEventListener-C0195JsF.js";import{t as E}from"./objects-BlG0ZrO0.js";import{o as P}from"./utils-BWBBpCkT.js";import{T as _,v as D}from"./config-B-Q7J_6d.js";import{t as z}from"./cn-DYvqRARy.js";import{t as $}from"./jsx-runtime-Blw4afVn.js";import{c as B,d as H}from"./download-HKgqJX4l.js";import{r as L}from"./requests-9-v2bhoi.js";import{F as R}from"./layout-Dtql_o_T.js";import{t as Y}from"./Deferred-D2igisxY.js";import{t as q}from"./use-toast-BwJoaaDM.js";import{t as x}from"./useInterval-CWBTUy5W.js";var G=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 a=this.inFlight.get(t);return!(a&&a.inputValue===e)}waitForInFlight(t,e){let a=this.inFlight.get(t);return a&&a.inputValue===e?a.deferred.promise:null}startCapture(t,e){let a=this.inFlight.get(t);a&&this.cancelEntry(a);let r=new AbortController,i=new Y,s={controller:r,inputValue:e,deferred:i};return this.inFlight.set(t,s),{signal:r.signal,markCaptured:p=>{this.inFlight.get(t)===s&&(i.resolve(p),this.capturedInputs.set(t,e),this.inFlight.delete(t))},markFailed:()=>{this.inFlight.get(t)===s&&(i.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,a]of this.inFlight)t.has(e)||(this.cancelEntry(a),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()}},J=M(),S=5e3;function K(){let t=(0,J.c)(14),e=I(P),{state:a}=I(D),r=e.auto_download.includes("markdown"),i=e.auto_download.includes("html"),s=e.auto_download.includes("ipynb"),p=a===_.OPEN,m=!r||!p,d=!i||!p,c=!s||!p,{autoExportAsHTML:l,autoExportAsIPYNB:o,autoExportAsMarkdown:n,updateCellOutputs:u}=L(),h=O(),f;t[0]===n?f=t[1]:(f=async()=>{await n({download:!1})},t[0]=n,t[1]=f);let g;t[2]===m?g=t[3]:(g={delayMs:S,whenVisible:!0,disabled:m},t[2]=m,t[3]=g),x(f,g);let w;t[4]===l?w=t[5]:(w=async()=>{await l({download:!1,includeCode:!0,files:R.INSTANCE.filenames()})},t[4]=l,t[5]=w);let v;t[6]===d?v=t[7]:(v={delayMs:S,whenVisible:!0,disabled:d},t[6]=d,t[7]=v),x(w,v);let F;t[8]!==o||t[9]!==h||t[10]!==u?(F=async()=>{await j({takeScreenshots:()=>h({progress:H.indeterminate()}),updateCellOutputs:u}),await o({download:!1})},t[8]=o,t[9]=h,t[10]=u,t[11]=F):F=t[11];let y;t[12]===c?y=t[13]:(y={delayMs:S,whenVisible:!0,disabled:c,skipIfRunning:!0},t[12]=c,t[13]=y),x(F,y)}var Q=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 G;function O(){let t=I(V);return async e=>{var d,c;let{progress:a}=e,r=new Set(E.keys(t));C.prune(r);let i=[],s=[];for(let[l,o]of E.entries(t)){let n=(d=o.output)==null?void 0:d.data;if((c=o.output)!=null&&c.mimetype&&Q.has(o.output.mimetype)&&n)if(C.needsCapture(l,n))i.push([l,n]);else{let u=C.waitForInFlight(l,n);u&&s.push({cellId:l,promise:u})}}if(i.length===0&&s.length===0)return{};i.length>0&&a.addTotal(i.length);let p={};for(let[l,o]of i){let n=C.startCapture(l,o);try{let u=await B(l);if(n.signal.aborted)continue;if(!u){k.error(`Failed to capture screenshot for cell ${l}`),n.markFailed();continue}let h=["image/png",u];p[l]=h,n.markCaptured(h)}catch(u){k.error(`Error screenshotting cell ${l}:`,u),n.markFailed()}finally{a.increment(1)}}let m=await Promise.allSettled(s.map(({promise:l})=>l));for(let[l,{cellId:o}]of s.entries()){let n=m[l];n.status==="fulfilled"&&n.value&&(p[o]=n.value)}return p}}async function j(t){let{takeScreenshots:e,updateCellOutputs:a}=t;try{let r=await e();E.size(r)>0&&await a({cellIdsToOutput:r})}catch(r){k.error("Error updating cell outputs with screenshots:",r),q({title:"Failed to capture cell outputs",description:"Some outputs may not appear in the PDF. Continuing with export.",variant:"danger"})}}var U=M(),W=T($(),1),X=t=>{let e=(0,U.c)(8),a,r;e[0]===t?(a=e[1],r=e[2]):({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r);let i;e[3]===a?i=e[4]:(i=z("animate-pulse rounded-md bg-muted",a),e[3]=a,e[4]=i);let s;return e[5]!==r||e[6]!==i?(s=(0,W.jsx)("div",{className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s};export{O as i,j as n,K as r,X as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.mo-slide-content{justify-content:center;width:100%;min-height:fit-content;display:flex;& .output{max-width:100%;width:unset;margin:auto 0}&>:only-child:has(>.output:only-child,>*>.output:only-child){flex:1}& div:has(>marimo-ui-element>marimo-vega){flex:1;display:block!important;@media (width>=500px){min-width:350px}}}.mo-slides-notes-resize{background-color:#0000;outline:none;height:4px;transition:background-color .2s linear}.mo-slides-notes-resize:hover,.mo-slides-notes-resize[data-resize-handle-active]{background-color:var(--slate-11)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as Se}from"./chunk-LvLJmgfZ.js";import{d as R,i as Wt,l as St,p as At,u as N}from"./useEvent-D91BmmQi.js";import{t as _t}from"./react-Bj1aDYRI.js";import{An as Dt,Cr as Et,E as Ae,Ht as It,Li as Pt,Mi as Lt,Mn as Tt,On as Ot,Or as Ht,T as Rt,Tn as $t,Vn as qt,Yi as ke,br as Bt,g as Ft,jt as _e,kn as Yt,m as De,ni as Ut,t as Vt,vr as Kt,y as Gt,yr as Ee}from"./cells-6yd8nOAu.js";import{t as z}from"./compiler-runtime-B3qBwwSJ.js";import{n as Jt,r as Xt,x as Qt}from"./ai-model-dropdown-BpVBUZnz.js";import{g as $,n as Zt}from"./useEventListener-C0195JsF.js";import{t as Ie}from"./objects-BlG0ZrO0.js";import{C as ea,r as ta}from"./utils-BWBBpCkT.js";import{n as v,t as Pe}from"./constants-CDyU_g2F.js";import{M as ee,O as aa,T as Le,j as Te,k as na,v as Oe}from"./config-B-Q7J_6d.js";import{c as oa}from"./readonly-python-code-n_TrLmsR.js";import{t as sa}from"./cn-DYvqRARy.js";import{t as ra}from"./jsx-runtime-Blw4afVn.js";import{o as la}from"./alert-dialog-Bb8Lz8ko.js";import{a as ia,c as da,i as ca,n as ha,r as ma,s as ua,t as pa}from"./select-BP75_5jJ.js";import{Lt as fa}from"./JsonOutput-BwwRpByA.js";import{f as xa,l as He,n as ba,o as Re,r as ya,s as ka,t as wa}from"./download-HKgqJX4l.js";import{t as ga}from"./tooltip-4bZlU7jl.js";import{r as ja,t as P}from"./button-DDGiD1NW.js";import{i as va,t as we}from"./strings--BknHX9C.js";import{r as L}from"./requests-9-v2bhoi.js";import{t as k}from"./createLucideIcon-w-Qo9n0R.js";import{F as Ca,I as Na,L as za,R as $e,a as qe,d as Ma,i as Be,u as Fe}from"./layout-
|
|
1
|
+
import{s as Se}from"./chunk-LvLJmgfZ.js";import{d as R,i as Wt,l as St,p as At,u as N}from"./useEvent-D91BmmQi.js";import{t as _t}from"./react-Bj1aDYRI.js";import{An as Dt,Cr as Et,E as Ae,Ht as It,Li as Pt,Mi as Lt,Mn as Tt,On as Ot,Or as Ht,T as Rt,Tn as $t,Vn as qt,Yi as ke,br as Bt,g as Ft,jt as _e,kn as Yt,m as De,ni as Ut,t as Vt,vr as Kt,y as Gt,yr as Ee}from"./cells-6yd8nOAu.js";import{t as z}from"./compiler-runtime-B3qBwwSJ.js";import{n as Jt,r as Xt,x as Qt}from"./ai-model-dropdown-BpVBUZnz.js";import{g as $,n as Zt}from"./useEventListener-C0195JsF.js";import{t as Ie}from"./objects-BlG0ZrO0.js";import{C as ea,r as ta}from"./utils-BWBBpCkT.js";import{n as v,t as Pe}from"./constants-CDyU_g2F.js";import{M as ee,O as aa,T as Le,j as Te,k as na,v as Oe}from"./config-B-Q7J_6d.js";import{c as oa}from"./readonly-python-code-n_TrLmsR.js";import{t as sa}from"./cn-DYvqRARy.js";import{t as ra}from"./jsx-runtime-Blw4afVn.js";import{o as la}from"./alert-dialog-Bb8Lz8ko.js";import{a as ia,c as da,i as ca,n as ha,r as ma,s as ua,t as pa}from"./select-BP75_5jJ.js";import{Lt as fa}from"./JsonOutput-BwwRpByA.js";import{f as xa,l as He,n as ba,o as Re,r as ya,s as ka,t as wa}from"./download-HKgqJX4l.js";import{t as ga}from"./tooltip-4bZlU7jl.js";import{r as ja,t as P}from"./button-DDGiD1NW.js";import{i as va,t as we}from"./strings--BknHX9C.js";import{r as L}from"./requests-9-v2bhoi.js";import{t as k}from"./createLucideIcon-w-Qo9n0R.js";import{F as Ca,I as Na,L as za,R as $e,a as qe,d as Ma,i as Be,u as Fe}from"./layout-Dtql_o_T.js";import{t as Ye}from"./check-rzLRd0j9.js";import{r as Wa}from"./useCellActionButton-CJknR0XY.js";import{t as Sa}from"./code-B2aKtXoe.js";import{t as Aa}from"./copy-3iHFdt22.js";import{t as Ue}from"./eye-off-BOZA7gbn.js";import{t as Ve}from"./external-link-BOlXZUla.js";import{t as te}from"./file-CJH9JNGH.js";import{u as _a}from"./form-Ca3yd_Od.js";import{n as Da,r as Ea,t as Ia}from"./youtube-OwaksuQt.js";import{i as Pa,n as Ke}from"./add-connection-dialog-CECJ8507.js";import{t as La}from"./house-DS0r7dNZ.js";import{t as Ta}from"./image-5XI2VU-q.js";import{t as Oa}from"./link-CHdiBDr5.js";import{r as Ha}from"./input-JxFwu-3G.js";import{t as Ra}from"./settings-D_PiwXwo.js";import{t as $a}from"./sparkles-DUCpRFlS.js";import{y as qa}from"./textarea-DuEtSOCl.js";import{t as Ba}from"./square-DFICx2Qv.js";import{t as Ge}from"./triangle-alert-BL4YVsPy.js";import{t as W}from"./use-toast-BwJoaaDM.js";import{n as Je,t as Fa}from"./paths-BKO-pHK6.js";import{o as Ya}from"./session-BmukRjSi.js";import{n as ae}from"./copy-Bxb1_Gtw.js";import{t as Xe}from"./copy-icon-neDQUo4Q.js";import{r as Ua}from"./useRunCells-DHsd7HGL.js";import{a as Qe,c as Ze,i as Va,n as et,r as tt}from"./dialog-BCVepWLJ.js";import{n as ne}from"./ImperativeModal-fY-ZfT0b.js";import{r as Ka,t as at}from"./share-852X_cqy.js";import{a as Ga}from"./cell-link-C5gpAn3R.js";import{n as nt}from"./useAsyncData-Bg5iAViP.js";import{a as Ja}from"./renderShortcut-Bl8_FVn8.js";import{t as Xa}from"./icons-CIPE8AIY.js";import{i as Qa,n as ot}from"./error-entries-CxyvaxEM.js";import{t as Za}from"./pair-with-agent-modal-BUtnUuiE.js";import{t as en}from"./github-_JH-0hIO.js";import{n as st}from"./marimo-icons-C_nFooxr.js";import{t as tn}from"./links-CZr5bjvo.js";import{i as an,n as rt,t as ge}from"./skeleton-BzlKcq21.js";import{t as lt}from"./types-Da7lA5YC.js";var nn=k("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),on=k("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),it=k("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"}]]),dt=k("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"}]]),ct=k("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"}]]),sn=k("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"}]]),rn=k("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"}]]),ln=k("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"}]]),ht=k("message-circle-question-mark",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),dn=k("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"}]]),cn=k("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),mt=k("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"}]]),hn=k("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"}]]),mn=k("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"}]]),ut=k("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"}]]),un=z(),T=Se(_t(),1);function je(e,t){let n=(0,un.c)(11),o;n[0]===t?o=n[1]:(o=new Lt(t),n[0]=t,n[1]=o);let s=o,l;n[2]!==e||n[3]!==s?(l=()=>s.get(e),n[2]=e,n[3]=s,n[4]=l):l=n[4];let[r,d]=(0,T.useState)(l),i;n[5]!==e||n[6]!==s?(i=x=>{d(x),s.set(e,x)},n[5]=e,n[6]=s,n[7]=i):i=n[7];let c=i,h;return n[8]!==c||n[9]!==r?(h=[r,c],n[8]=c,n[9]=r,n[10]=h):h=n[10],h}function pn(e,t){return{...e,Binaries:{...e.Binaries,Browser:t}}}function fn(e,t,n,o){return{marimo:e,Locale:n||void 0,Binaries:{Browser:t},"Environment Collection Error":o}}function ve(e,t){let n=Math.max(2,...Array.from(t.matchAll(/`+/g),s=>s[0].length)),o="`".repeat(n+1);return`${o}${e}
|
|
2
2
|
${t}
|
|
3
3
|
${o}`}function xn(e,t){let n=e.includes("?")?"&":"?",o=[],s=e,l=0;for(let[r,d]of Object.entries(t)){if(d.length===0)continue;let i=`${r}=${encodeURIComponent(d)}`,c=`${s}${l===0?n:"&"}${i}`;if(c.length>6e3){o.push(r);continue}s=c,l+=1}return{url:s,omitted:o}}function Ce(e,t){return["<details>",`<summary>${we.htmlEscape(e)??""}</summary>`,"",t,"","</details>"].join(`
|
|
4
4
|
`)}function bn(e){return Ce("Environment",ve("json",JSON.stringify(e,null,2)))}function pt(e){return Ce("Errors",ve("text",e.map(ot).join(`
|
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-BJDqUUF2.js"></script>
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-TXkS1QI3.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="./assets/objects-BlG0ZrO0.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="./assets/chunk-LvLJmgfZ.js">
|
package/package.json
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import { describe, expect, it } from "vitest";
|
|
5
|
+
import { cellId } from "@/__tests__/branded";
|
|
6
|
+
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
7
|
+
import { CellOutputId } from "@/core/cells/ids";
|
|
8
|
+
import { createCell, createCellRuntimeState } from "@/core/cells/types";
|
|
9
|
+
import { CellOutputBlock } from "../reveal-component";
|
|
10
|
+
|
|
11
|
+
describe("CellOutputBlock", () => {
|
|
12
|
+
it("renders the cell's data-cell-id and data-cell-name so it can be targeted by custom CSS", () => {
|
|
13
|
+
const id = cellId("test");
|
|
14
|
+
const cell = {
|
|
15
|
+
...createCell({ id, name: "title" }),
|
|
16
|
+
...createCellRuntimeState({
|
|
17
|
+
output: {
|
|
18
|
+
channel: "output",
|
|
19
|
+
mimetype: "text/plain",
|
|
20
|
+
data: "hello",
|
|
21
|
+
timestamp: 0,
|
|
22
|
+
},
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const { container } = render(
|
|
27
|
+
<TooltipProvider>
|
|
28
|
+
<CellOutputBlock cell={cell} />
|
|
29
|
+
</TooltipProvider>,
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const cellElement = container.querySelector(`[data-cell-id="${id}"]`);
|
|
33
|
+
expect(cellElement).toBeTruthy();
|
|
34
|
+
expect(cellElement?.getAttribute("data-cell-name")).toBe("title");
|
|
35
|
+
|
|
36
|
+
// The wrapper's `data-cell-id` must coexist with the output's own
|
|
37
|
+
// `CellOutputId`-derived id, without colliding.
|
|
38
|
+
expect(document.getElementById(CellOutputId.create(id))).toBeTruthy();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import { beforeAll, describe, expect, it } from "vitest";
|
|
5
|
+
import { SetupMocks } from "@/__mocks__/common";
|
|
6
|
+
import { cellId } from "@/__tests__/branded";
|
|
7
|
+
import { TooltipProvider } from "@/components/ui/tooltip";
|
|
8
|
+
import { createCell, createCellRuntimeState } from "@/core/cells/types";
|
|
9
|
+
import { SlideCellReadOnlyView } from "../slide-cell-view";
|
|
10
|
+
|
|
11
|
+
beforeAll(() => {
|
|
12
|
+
SetupMocks.resizeObserver();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe("SlideCellReadOnlyView", () => {
|
|
16
|
+
it("renders the cell's data-cell-id and data-cell-name so it can be targeted by custom CSS", () => {
|
|
17
|
+
const id = cellId("test");
|
|
18
|
+
const cell = {
|
|
19
|
+
...createCell({ id, name: "title", code: "x = 1" }),
|
|
20
|
+
...createCellRuntimeState(),
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const { container } = render(
|
|
24
|
+
<TooltipProvider>
|
|
25
|
+
<SlideCellReadOnlyView cell={cell} />
|
|
26
|
+
</TooltipProvider>,
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const cellElement = container.querySelector(`[data-cell-id="${id}"]`);
|
|
30
|
+
expect(cellElement).toBeTruthy();
|
|
31
|
+
expect(cellElement?.getAttribute("data-cell-name")).toBe("title");
|
|
32
|
+
});
|
|
33
|
+
});
|
|
@@ -13,6 +13,7 @@ import useEvent from "react-use-event-hook";
|
|
|
13
13
|
import { CodeIcon, ExpandIcon, EyeOffIcon } from "lucide-react";
|
|
14
14
|
import { Deck, Fragment, Slide, Stack } from "@revealjs/react";
|
|
15
15
|
import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";
|
|
16
|
+
import { cellDomProps } from "@/components/editor/common";
|
|
16
17
|
import { Slide as CellOutputSlide } from "@/components/slides/slide";
|
|
17
18
|
import { SlideScrollContainer } from "@/components/slides/slide-scroll-hint";
|
|
18
19
|
import { Button } from "@/components/ui/button";
|
|
@@ -304,6 +305,25 @@ function resolveSlideContentStyle(
|
|
|
304
305
|
}
|
|
305
306
|
}
|
|
306
307
|
|
|
308
|
+
/**
|
|
309
|
+
* Renders a cell's output wrapped in a `data-cell-id`/`data-cell-name` div
|
|
310
|
+
* (see `cellDomProps`), so it can be targeted by custom CSS in the slides
|
|
311
|
+
* view just like it can in the vertical layout. The wrapper is required
|
|
312
|
+
* because `CellOutputSlide` sets its own `id` from `CellOutputId` (a
|
|
313
|
+
* different scheme than `HTMLCellId`) and its inner `OutputArea` uses
|
|
314
|
+
* `display: contents`, which can't be targeted for background/border styling.
|
|
315
|
+
*/
|
|
316
|
+
export const CellOutputBlock = ({ cell }: { cell: RuntimeCell }) => (
|
|
317
|
+
<div className="flex flex-col" {...cellDomProps(cell.id, cell.name)}>
|
|
318
|
+
<CellOutputSlide
|
|
319
|
+
cellId={cell.id}
|
|
320
|
+
status={cell.status}
|
|
321
|
+
output={cell.output}
|
|
322
|
+
stale={outputIsStale(cell, false)}
|
|
323
|
+
/>
|
|
324
|
+
</div>
|
|
325
|
+
);
|
|
326
|
+
|
|
307
327
|
const SubslideView = ({
|
|
308
328
|
subslide,
|
|
309
329
|
resolveShowCode,
|
|
@@ -340,15 +360,7 @@ const SubslideView = ({
|
|
|
340
360
|
{subslide.blocks.map((block, i) => {
|
|
341
361
|
const rendered = block.cells.map((cell) => {
|
|
342
362
|
if (!resolveShowCode(cell.id)) {
|
|
343
|
-
return
|
|
344
|
-
<CellOutputSlide
|
|
345
|
-
key={cell.id}
|
|
346
|
-
cellId={cell.id}
|
|
347
|
-
status={cell.status}
|
|
348
|
-
output={cell.output}
|
|
349
|
-
stale={outputIsStale(cell, false)}
|
|
350
|
-
/>
|
|
351
|
-
);
|
|
363
|
+
return <CellOutputBlock key={cell.id} cell={cell} />;
|
|
352
364
|
}
|
|
353
365
|
return isEditable ? (
|
|
354
366
|
<SlideCellView key={cell.id} cell={cell} />
|
|
@@ -406,14 +418,7 @@ const ParkedPreviewContent = ({
|
|
|
406
418
|
<SlideCellReadOnlyView cell={cell} />
|
|
407
419
|
);
|
|
408
420
|
}
|
|
409
|
-
return
|
|
410
|
-
<CellOutputSlide
|
|
411
|
-
cellId={cell.id}
|
|
412
|
-
status={cell.status}
|
|
413
|
-
output={cell.output}
|
|
414
|
-
stale={outputIsStale(cell, false)}
|
|
415
|
-
/>
|
|
416
|
-
);
|
|
421
|
+
return <CellOutputBlock cell={cell} />;
|
|
417
422
|
};
|
|
418
423
|
|
|
419
424
|
// There is an upstream react bug in dev mode (https://github.com/facebook/react/issues/34840)
|
|
@@ -202,7 +202,7 @@ export const SlideCellReadOnlyView = ({ cell }: { cell: RuntimeCell }) => {
|
|
|
202
202
|
);
|
|
203
203
|
|
|
204
204
|
const editor = (
|
|
205
|
-
<div className="marimo-cell">
|
|
205
|
+
<div className="marimo-cell" {...cellDomProps(cell.id, cell.name)}>
|
|
206
206
|
<ReadonlyCode
|
|
207
207
|
code={display.code}
|
|
208
208
|
language={display.language}
|
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
width: unset;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
/* If the first output is the only child, make it flex 1
|
|
19
|
-
|
|
18
|
+
/* If the first output is the only child, make it flex 1. Cells are wrapped
|
|
19
|
+
in a `data-cell-id`/`data-cell-name` div (see `cellDomProps`), so `.output`
|
|
20
|
+
is a grandchild rather than a direct child here. */
|
|
21
|
+
> *:only-child:has(> .output:only-child, > * > .output:only-child) {
|
|
20
22
|
flex: 1;
|
|
21
23
|
}
|
|
22
24
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.mo-slide-content{justify-content:center;width:100%;min-height:fit-content;display:flex;& .output{max-width:100%;width:unset;margin:auto 0}&>:only-child>.output:only-child{flex:1}& div:has(>marimo-ui-element>marimo-vega){flex:1;display:block!important;@media (width>=500px){min-width:350px}}}.mo-slides-notes-resize{background-color:#0000;outline:none;height:4px;transition:background-color .2s linear}.mo-slides-notes-resize:hover,.mo-slides-notes-resize[data-resize-handle-active]{background-color:var(--slate-11)}
|
|
File without changes
|