@marimo-team/frontend 0.23.4-dev0 → 0.23.4-dev5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{CellStatus-BTL_sgUY.js → CellStatus-PIeZtHEl.js} +1 -1
- package/dist/assets/JsonOutput-BVAcY5xS.js +49 -0
- package/dist/assets/{MarimoErrorOutput-BBD405a6.js → MarimoErrorOutput-B9_RO5eX.js} +2 -2
- package/dist/assets/{RenderHTML-BT9obKLc.js → RenderHTML-DR6lqJGS.js} +1 -1
- package/dist/assets/{add-cell-with-ai-qEfAzC8R.js → add-cell-with-ai-DjfY8mF1.js} +9 -9
- package/dist/assets/{add-connection-dialog-HCShSlr3.js → add-connection-dialog-gd2yD9Qo.js} +2 -2
- package/dist/assets/{agent-panel-CoBHxHpJ.js → agent-panel-TetMUXWP.js} +3 -3
- package/dist/assets/{ai-model-dropdown-CYx9ZfdS.js → ai-model-dropdown-By4Ohb0R.js} +3 -3
- package/dist/assets/{app-config-button-DC5UlXZA.js → app-config-button-YS8lpoUa.js} +1 -1
- package/dist/assets/{cell-editor-BMjfXh0J.js → cell-editor-87LAVsOR.js} +11 -11
- package/dist/assets/{cell-link-BA7Demf0.js → cell-link-d38hFEon.js} +1 -1
- package/dist/assets/{cells-CJlo_hG2.js → cells-A-ljPpuj.js} +55 -55
- package/dist/assets/{chat-display-DbztpRD4.js → chat-display-Be0U92hE.js} +1 -1
- package/dist/assets/{chat-panel-H-xFzATI.js → chat-panel-BEz970S3.js} +1 -1
- package/dist/assets/{chat-ui-CFqAy2ck.js → chat-ui-CdW7awFa.js} +1 -1
- package/dist/assets/{column-preview-DzN2QumC.js → column-preview-_5uYiy74.js} +1 -1
- package/dist/assets/{command-DbT_zkRP.js → command-CzIDL1VI.js} +1 -1
- package/dist/assets/{command-palette-DSSR50KF.js → command-palette-DfotChyr.js} +1 -1
- package/dist/assets/{common-CquNY-ok.js → common-DC9LEIym.js} +1 -1
- package/dist/assets/{components-BXKuiPiF.js → components-BDnRtsA5.js} +1 -1
- package/dist/assets/{components-BiBOcq1x.js → components-FepcpFGL.js} +1 -1
- package/dist/assets/{datasource-BKDU-4D5.js → datasource-BCnGIjqn.js} +2 -2
- package/dist/assets/{dependency-graph-panel-ayo-Mm2j.js → dependency-graph-panel-Yk1Ch_Gj.js} +1 -1
- package/dist/assets/{documentation-panel-ph6755dz.js → documentation-panel-BMrGuByB.js} +1 -1
- package/dist/assets/{download-mzsKQgiy.js → download-Iyng0xCz.js} +4 -4
- package/dist/assets/{edit-page-Bxa5DWoE.js → edit-page-yF7xM43H.js} +6 -6
- package/dist/assets/{error-panel-BfG_JeMA.js → error-panel-CHSsnRFF.js} +1 -1
- package/dist/assets/{file-explorer-panel-D7-d0Puf.js → file-explorer-panel-Dlwspu2Y.js} +3 -3
- package/dist/assets/{file-icons-BNrh8MRG.js → file-icons-DTNZv05h.js} +1 -1
- package/dist/assets/{floating-outline-BMB4_phA.js → floating-outline-CSNGDMAm.js} +1 -1
- package/dist/assets/{focus-BX3gXJxx.js → focus-Baz7rlo0.js} +1 -1
- package/dist/assets/form-Dr-_EXr8.js +2 -0
- package/dist/assets/{home-page-B1ELDhn8.js → home-page-QvO22-4u.js} +1 -1
- package/dist/assets/{hooks-b3J1eFE-.js → hooks-CNPv5U-N.js} +1 -1
- package/dist/assets/{html-to-image-Cz8lDF-Y.js → html-to-image-tbPEMBJg.js} +1 -1
- package/dist/assets/index-DH5UUBE4.css +2 -0
- package/dist/assets/{index-BjiE1T38.js → index-z8Uh9i5Z.js} +8 -8
- package/dist/assets/{kiosk-mode-Dxbs5i5g.js → kiosk-mode-cWTXpegb.js} +1 -1
- package/dist/assets/{layout-lxwMDUgI.js → layout-DDh3d8oW.js} +5 -5
- package/dist/assets/{logs-panel-BW6S5AI1.js → logs-panel-Dgkr6V7q.js} +1 -1
- package/dist/assets/loro_wasm_bg-Bu4Ofw1K.js +2 -0
- package/dist/assets/{loro_wasm_bg-DXuHQ2hl.js → loro_wasm_bg-DWJCS9pK.js} +1 -1
- package/dist/assets/{markdown-renderer-CeHY2KoQ.js → markdown-renderer-CFrgiLqu.js} +1 -1
- package/dist/assets/{name-cell-input-B1BCybeo.js → name-cell-input-C5LXTI3T.js} +1 -1
- package/dist/assets/{outline-panel-DgMz83Mx.js → outline-panel-0lyts6z4.js} +1 -1
- package/dist/assets/{packages-panel-CbjavFh2.js → packages-panel-BhI1lbfw.js} +1 -1
- package/dist/assets/{panels-BPzk3EbR.js → panels-CbRenLjk.js} +1 -1
- package/dist/assets/{process-output-CggRIZ6s.js → process-output-BwZ5VxXO.js} +1 -1
- package/dist/assets/{readonly-python-code-Ccd8HM-7.js → readonly-python-code-B0nrQE3U.js} +1 -1
- package/dist/assets/{reveal-component-BamXsTkr.js → reveal-component-CLjsFHmT.js} +1 -1
- package/dist/assets/{run-page-C5cZvltI.js → run-page-C1Wd8dr8.js} +1 -1
- package/dist/assets/{scratchpad-panel-PMFH4Ktp.js → scratchpad-panel-B8kRNql6.js} +1 -1
- package/dist/assets/{session-panel-CUTSr9rt.js → session-panel-BvCIuxgU.js} +1 -1
- package/dist/assets/{slide-form-Bi8ZYBHP.js → slide-form-CXqvfwGg.js} +1 -1
- package/dist/assets/{snippets-panel-CdhDsAII.js → snippets-panel-COBTGJcr.js} +1 -1
- package/dist/assets/{state-C5AUgyZT.js → state-Bsz477is.js} +1 -1
- package/dist/assets/{state-DHlRrwyY.js → state-LyvUXW6A.js} +2 -2
- package/dist/assets/{textarea-BXPC1-kb.js → textarea-Dd0InTQJ.js} +1 -1
- package/dist/assets/{tracing-wSufGcF9.js → tracing-DjZGgWTo.js} +1 -1
- package/dist/assets/{tracing-panel-BO6MMAXa.js → tracing-panel-8eFzEjG0.js} +2 -2
- package/dist/assets/{useAddCell-CqBbGhrY.js → useAddCell-De9xD63_.js} +1 -1
- package/dist/assets/{useCellActionButton-DYwx4pGE.js → useCellActionButton-Bjxun3wK.js} +1 -1
- package/dist/assets/{useDeleteCell-BJlGbsbV.js → useDeleteCell-C2Stbb6Q.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-rkAIQ6zL.js → useDependencyPanelTab-DFZNQ3a8.js} +1 -1
- package/dist/assets/{useNotebookActions-Dga3qEHF.js → useNotebookActions-F5fGMe9N.js} +1 -1
- package/dist/assets/{useRunCells-B531RIUE.js → useRunCells-DU1tawR-.js} +1 -1
- package/dist/assets/{useSplitCell-BnuJW5uo.js → useSplitCell-BZPuhd8z.js} +1 -1
- package/dist/index.html +25 -25
- package/package.json +4 -4
- package/src/components/data-table/data-table.tsx +11 -2
- package/src/components/data-table/filter-by-values-picker.tsx +238 -0
- package/src/components/data-table/filter-pill-editor.tsx +470 -0
- package/src/components/data-table/filter-pills.tsx +177 -41
- package/src/components/ui/checkbox.tsx +8 -4
- package/src/components/ui/combobox.tsx +3 -0
- package/src/css/app/Cell.css +4 -0
- package/src/plugins/impl/DataTablePlugin.tsx +1 -0
- package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +15 -15
- package/src/utils/sets.ts +13 -0
- package/dist/assets/JsonOutput-DXnOS_Hk.js +0 -49
- package/dist/assets/form-CPDlIjdV.js +0 -2
- package/dist/assets/index-BYLYJcAY.css +0 -2
- package/dist/assets/loro_wasm_bg-Ds40eH8K.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as q}from"./chunk-LvLJmgfZ.js";import{d as Z,p as ee,u as F}from"./useEvent-D91BmmQi.js";import{t as te}from"./react-Bj1aDYRI.js";import{K as L,br as re,j as le,mr as se}from"./cells-CJlo_hG2.js";import"./react-dom-CSu739Rf.js";import{t as ae}from"./compiler-runtime-B3qBwwSJ.js";import{t as ie}from"./cn-DCUzRj2J.js";import{t as ne}from"./jsx-runtime-BqBOg78p.js";import"./fullscreen-BDxedMYP.js";import{t as A}from"./tooltip-Gcwqb_SK.js";import"./dist-BrR4M-k3.js";import"./cjs-BRGiG41H.js";import"./main-B0OX4z33.js";import"./useNonce-DfoVjkkH.js";import{t as oe}from"./createLucideIcon-D5guW7EU.js";import{n as de,r as U}from"./CellStatus-BTL_sgUY.js";import{r as ce}from"./x-C-6liIBr.js";import{t as me}from"./chevron-right-CG5QYXYk.js";import{t as pe}from"./circle-check-C17zXg7L.js";import{t as ue}from"./circle-play-CYXX2xu3.js";import"./dist-Ds4ite_2.js";import"./dist-CEysMnMQ.js";import"./dist-DGxytjtv.js";import"./dist-DZ2qbK2N.js";import"./dist-CRPTyqAT.js";import"./session-nmTRerwF.js";import{r as he}from"./useTheme-DEcgJENn.js";import"./purify.es-DC4RGS9t.js";import"./vega-loader.browser-DXARUlxo.js";import{r as fe,t as xe}from"./react-vega-Dprex0g5.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import{t as ve}from"./cell-link-BA7Demf0.js";import{n as ge,r as je,t as K}from"./react-resizable-panels.browser.esm-Bcm5njwd.js";import{t as ye}from"./bundle.esm-DU-4isVC.js";import{t as Ie}from"./empty-state-CsVQSqKA.js";import"./multi-icon-DQxqgfM2.js";import{r as Se}from"./panel-context-B3J07LRC.js";import{t as be}from"./clear-button-DBrTU3uL.js";import{n as Ne,t as we}from"./runs-5odJFrfi.js";var ke=oe("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),H=ae(),C=q(te(),1);const V="hoveredCellId",Y="cellHover";var Re="cellNum",G="cell",O="startTimestamp",J="endTimestamp",Q="status";function Te(t,e,r,a){let i="hoursminutessecondsmilliseconds";return{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:V,bind:{element:`#${e}`}},{name:Y,select:{type:"point",on:"mouseover",fields:[G],clear:"mouseout"}}],height:{step:r==="sideBySide"?26:21},encoding:{y:{field:Re,scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:r==="sideBySide"?null:void 0},x:{field:O,type:"temporal",axis:{orient:"top",title:null}},x2:{field:J,type:"temporal"},tooltip:[{field:O,type:"temporal",timeUnit:i,title:"Start"},{field:J,type:"temporal",timeUnit:i,title:"End"}],size:{value:{expr:`${V} == toString(datum.${G}) ? 19.5 : 18`}},color:{field:Q,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:t},transform:[{calculate:`datum.${Q} === 'queued' ? 9999999999999 : datum.${O}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}function W(t){try{let e=new Date(t*1e3);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}var l=q(ne(),1),X=ee(new Map);const Ee=()=>{let t=(0,H.c)(34),{runIds:e,runMap:r}=F(we),a=F(X),{clearRuns:i}=Ne(),{theme:n}=he(),[s,k]=(0,C.useState)("above"),N=Se(),c;t[0]===s?c=t[1]:(c=()=>{k(s==="above"?"sideBySide":"above")},t[0]=s,t[1]=c);let m=c;if(e.length===0){let p;return t[2]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)(Ie,{title:"No traces",description:(0,l.jsx)("span",{children:"Cells that have ran will appear here."}),icon:(0,l.jsx)(re,{})}),t[2]=p):p=t[2],p}let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=u):u=t[3];let y=s==="sideBySide",o;t[4]!==y||t[5]!==m?(o=(0,l.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[u,(0,l.jsx)("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:m,defaultChecked:y,className:"h-3 cursor-pointer"})]}),t[4]=y,t[5]=m,t[6]=o):o=t[6];let h;t[7]===i?h=t[8]:(h=(0,l.jsx)(be,{dataTestId:"clear-traces-button",onClick:i}),t[7]=i,t[8]=h);let v;t[9]!==o||t[10]!==h?(v=(0,l.jsxs)("div",{className:"flex flex-row justify-start gap-3",children:[o,h]}),t[9]=o,t[10]=h,t[11]=v):v=t[11];let g;if(t[12]!==s||t[13]!==a||t[14]!==e||t[15]!==r||t[16]!==n){let p;t[18]!==s||t[19]!==a||t[20]!==r||t[21]!==n?(p=(E,P)=>{let T=r.get(E);return T?(0,l.jsx)(_e,{run:T,isExpanded:a.get(T.runId),isMostRecentRun:P===0,chartPosition:s,theme:n},T.runId):null},t[18]=s,t[19]=a,t[20]=r,t[21]=n,t[22]=p):p=t[22],g=e.map(p),t[12]=s,t[13]=a,t[14]=e,t[15]=r,t[16]=n,t[17]=g}else g=t[17];let j;t[23]===g?j=t[24]:(j=(0,l.jsx)("div",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=j);let w;t[25]!==v||t[26]!==j?(w=(0,l.jsxs)("div",{className:"py-1 px-2 overflow-y-scroll h-full",children:[v,j]}),t[25]=v,t[26]=j,t[27]=w):w=t[27];let f=w;if(N==="sidebar")return f;let x;t[28]===f?x=t[29]:(x=(0,l.jsx)(K,{defaultSize:50,minSize:30,maxSize:80,children:f}),t[28]=f,t[29]=x);let d;t[30]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(je,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),t[30]=d):d=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(K,{defaultSize:50,children:(0,l.jsx)("div",{})}),t[31]=I):I=t[31];let S;return t[32]===x?S=t[33]:(S=(0,l.jsxs)(ge,{direction:"horizontal",className:"h-full",children:[x,d,I]}),t[32]=x,t[33]=S),S};var _e=({run:t,isMostRecentRun:e,chartPosition:r,isExpanded:a,theme:i})=>{let n=Z(X);a??(a=e);let s=()=>{n(c=>{let m=new Map(c);return m.set(t.runId,!a),m})},k=(0,l.jsx)(a?ce:me,{height:16,className:"inline"}),N=(0,l.jsxs)("span",{className:"text-sm cursor-pointer",onClick:s,children:["Run - ",L(t.runStartTime),k]});return a?(0,l.jsx)(Me,{run:t,chartPosition:r,theme:i,title:N},t.runId):(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)("pre",{className:"font-mono font-semibold",children:N})},t.runId)},Me=t=>{let e=(0,H.c)(40),{run:r,chartPosition:a,theme:i,title:n}=t,[s,k]=(0,C.useState)(),N=(0,C.useRef)(null),{ref:c,width:m}=ye(),u=m===void 0?300:m,y=le(),o,h;if(e[0]!==y||e[1]!==a||e[2]!==r.cellRuns||e[3]!==r.runId||e[4]!==i){let R=[...r.cellRuns.values()].map(b=>{let _=b.elapsedTime??0;return{cell:b.cellId,cellNum:y.inOrderIds.indexOf(b.cellId),startTimestamp:W(b.startTime),endTimestamp:W(b.startTime+_),elapsedTime:U(_*1e3),status:b.status}});o=`hiddenInputElement-${r.runId}`,h=fe(Te(R,o,a,i)),e[0]=y,e[1]=a,e[2]=r.cellRuns,e[3]=r.runId,e[4]=i,e[5]=o,e[6]=h}else o=e[5],h=e[6];let v=h.spec,g=i==="dark"?"dark":void 0,j=u-50,w=a==="above"?120:100,f;e[7]!==g||e[8]!==j||e[9]!==w?(f={theme:g,width:j,height:w,actions:!1,mode:"vega",renderer:"canvas"},e[7]=g,e[8]=j,e[9]=w,e[10]=f):f=e[10];let x;e[11]!==f||e[12]!==v?(x={ref:N,spec:v,options:f},e[11]=f,e[12]=v,e[13]=x):x=e[13];let d=xe(x),I;e[14]===(d==null?void 0:d.view)?I=e[15]:(I=()=>{let R=[{signalName:Y,handler:(b,_)=>{var z;k(((z=_.cell)==null?void 0:z[0])??void 0??null)}}];return R.forEach(b=>{let{signalName:_,handler:z}=b;d==null||d.view.addSignalListener(_,z)}),()=>{R.forEach(b=>{let{signalName:_,handler:z}=b;d==null||d.view.removeSignalListener(_,z)})}},e[14]=d==null?void 0:d.view,e[15]=I);let S;e[16]===d?S=e[17]:(S=[d],e[16]=d,e[17]=S),(0,C.useEffect)(I,S);let p;e[18]!==o||e[19]!==s||e[20]!==r?(p=(0,l.jsx)($e,{run:r,hoveredCellId:s,hiddenInputElementId:o}),e[18]=o,e[19]=s,e[20]=r,e[21]=p):p=e[21];let E=p,P=a==="sideBySide"?"-mt-0.5 flex-1":"",T;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=(0,l.jsx)(C.Suspense,{children:(0,l.jsx)("div",{ref:N})}),e[22]=T):T=e[22];let B;e[23]!==c||e[24]!==P?(B=(0,l.jsx)("div",{className:P,ref:c,children:T}),e[23]=c,e[24]=P,e[25]=B):B=e[25];let M=B;if(a==="above"){let R;e[26]!==M||e[27]!==n||e[28]!==E?(R=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,M,E]}),e[26]=M,e[27]=n,e[28]=E,e[29]=R):R=e[29];let b;return e[30]!==r.runId||e[31]!==R?(b=(0,l.jsx)("div",{className:"flex flex-col",children:R},r.runId),e[30]=r.runId,e[31]=R,e[32]=b):b=e[32],b}let $;e[33]!==n||e[34]!==E?($=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,E]}),e[33]=n,e[34]=E,e[35]=$):$=e[35];let D;return e[36]!==M||e[37]!==r.runId||e[38]!==$?(D=(0,l.jsxs)("div",{className:"flex flex-row",children:[$,M]},r.runId),e[36]=M,e[37]=r.runId,e[38]=$,e[39]=D):D=e[39],D},$e=t=>{let e=(0,H.c)(12),{run:r,hoveredCellId:a,hiddenInputElementId:i}=t,n=(0,C.useRef)(null),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o=>{n.current&&(n.current.value=String(o),n.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=s):s=e[0];let k=s,N=a||"",c;e[1]!==i||e[2]!==N?(c=(0,l.jsx)("input",{type:"text",id:i,defaultValue:N,hidden:!0,ref:n}),e[1]=i,e[2]=N,e[3]=c):c=e[3];let m;e[4]===r.cellRuns?m=e[5]:(m=[...r.cellRuns.values()],e[4]=r.cellRuns,e[5]=m);let u;e[6]!==a||e[7]!==m?(u=m.map(o=>(0,l.jsx)(Ce,{cellRun:o,hovered:o.cellId===a,dispatchHoverEvent:k},o.cellId)),e[6]=a,e[7]=m,e[8]=u):u=e[8];let y;return e[9]!==c||e[10]!==u?(y=(0,l.jsxs)("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[c,u]}),e[9]=c,e[10]=u,e[11]=y):y=e[11],y},ze={success:(0,l.jsx)(pe,{color:"green",size:14}),running:(0,l.jsx)(ue,{color:"var(--blue-10)",size:14}),error:(0,l.jsx)(se,{color:"red",size:14}),queued:(0,l.jsx)(ke,{color:"grey",size:14})},Ce=t=>{let e=(0,H.c)(39),{cellRun:r,hovered:a,dispatchHoverEvent:i}=t,n;e[0]===r.elapsedTime?n=e[1]:(n=r.elapsedTime?U(r.elapsedTime*1e3):"-",e[0]=r.elapsedTime,e[1]=n);let s=n,k;e[2]!==r.elapsedTime||e[3]!==s?(k=r.elapsedTime?(0,l.jsxs)("span",{children:["This cell took ",(0,l.jsx)(de,{elapsedTime:s})," to run"]}):(0,l.jsx)("span",{children:"This cell has not been run"}),e[2]=r.elapsedTime,e[3]=s,e[4]=k):k=e[4];let N=k,c;e[5]!==r.cellId||e[6]!==i?(c=()=>{i(r.cellId)},e[5]=r.cellId,e[6]=i,e[7]=c):c=e[7];let m=c,u;e[8]===i?u=e[9]:(u=()=>{i(null)},e[8]=i,e[9]=u);let y=u,o=a&&"bg-(--gray-3) opacity-100",h;e[10]===o?h=e[11]:(h=ie("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100",o),e[10]=o,e[11]=h);let v;e[12]===r.startTime?v=e[13]:(v=L(r.startTime),e[12]=r.startTime,e[13]=v);let g;e[14]===v?g=e[15]:(g=(0,l.jsxs)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:["[",v,"]"]}),e[14]=v,e[15]=g);let j;e[16]===r.cellId?j=e[17]:(j=(0,l.jsxs)("span",{className:"text-(--gray-10) w-16 overflow-hidden",children:["(",(0,l.jsx)(ve,{cellId:r.cellId}),")"]}),e[16]=r.cellId,e[17]=j);let w;e[18]===r.code?w=e[19]:(w=(0,l.jsx)("span",{className:"w-40 truncate -ml-1",children:r.code}),e[18]=r.code,e[19]=w);let f;e[20]===s?f=e[21]:(f=(0,l.jsx)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:s}),e[20]=s,e[21]=f);let x;e[22]!==N||e[23]!==f?(x=(0,l.jsx)(A,{content:N,children:f}),e[22]=N,e[23]=f,e[24]=x):x=e[24];let d=ze[r.status],I;e[25]!==r.status||e[26]!==d?(I=(0,l.jsx)(A,{content:r.status,children:d}),e[25]=r.status,e[26]=d,e[27]=I):I=e[27];let S;e[28]!==x||e[29]!==I?(S=(0,l.jsxs)("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[x,I]}),e[28]=x,e[29]=I,e[30]=S):S=e[30];let p;return e[31]!==m||e[32]!==y||e[33]!==w||e[34]!==S||e[35]!==h||e[36]!==g||e[37]!==j?(p=(0,l.jsxs)("div",{className:h,onMouseEnter:m,onMouseLeave:y,children:[g,j,w,S]}),e[31]=m,e[32]=y,e[33]=w,e[34]=S,e[35]=h,e[36]=g,e[37]=j,e[38]=p):p=e[38],p};export{Ee as Tracing};
|
|
1
|
+
import{s as q}from"./chunk-LvLJmgfZ.js";import{d as Z,p as ee,u as F}from"./useEvent-D91BmmQi.js";import{t as te}from"./react-Bj1aDYRI.js";import{K as L,hr as re,j as le,xr as se}from"./cells-A-ljPpuj.js";import"./react-dom-CSu739Rf.js";import{t as ae}from"./compiler-runtime-B3qBwwSJ.js";import{t as ie}from"./cn-DCUzRj2J.js";import{t as ne}from"./jsx-runtime-BqBOg78p.js";import"./fullscreen-BDxedMYP.js";import{t as A}from"./tooltip-Gcwqb_SK.js";import"./dist-BrR4M-k3.js";import"./cjs-BRGiG41H.js";import"./main-B0OX4z33.js";import"./useNonce-DfoVjkkH.js";import{t as oe}from"./createLucideIcon-D5guW7EU.js";import{n as de,r as U}from"./CellStatus-PIeZtHEl.js";import{r as ce}from"./x-C-6liIBr.js";import{t as me}from"./chevron-right-CG5QYXYk.js";import{t as pe}from"./circle-check-C17zXg7L.js";import{t as ue}from"./circle-play-CYXX2xu3.js";import"./dist-Ds4ite_2.js";import"./dist-CEysMnMQ.js";import"./dist-DGxytjtv.js";import"./dist-DZ2qbK2N.js";import"./dist-CRPTyqAT.js";import"./session-nmTRerwF.js";import{r as he}from"./useTheme-DEcgJENn.js";import"./purify.es-DC4RGS9t.js";import"./vega-loader.browser-DXARUlxo.js";import{r as fe,t as xe}from"./react-vega-Dprex0g5.js";import"./defaultLocale-JieDVWC_.js";import"./defaultLocale-BLne0bXb.js";import{t as ve}from"./cell-link-d38hFEon.js";import{n as ge,r as je,t as K}from"./react-resizable-panels.browser.esm-Bcm5njwd.js";import{t as ye}from"./bundle.esm-DU-4isVC.js";import{t as Ie}from"./empty-state-CsVQSqKA.js";import"./multi-icon-DQxqgfM2.js";import{r as Se}from"./panel-context-B3J07LRC.js";import{t as be}from"./clear-button-DBrTU3uL.js";import{n as Ne,t as we}from"./runs-5odJFrfi.js";var ke=oe("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),H=ae(),C=q(te(),1);const V="hoveredCellId",Y="cellHover";var Re="cellNum",G="cell",O="startTimestamp",J="endTimestamp",Q="status";function Te(t,e,r,a){let i="hoursminutessecondsmilliseconds";return{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:V,bind:{element:`#${e}`}},{name:Y,select:{type:"point",on:"mouseover",fields:[G],clear:"mouseout"}}],height:{step:r==="sideBySide"?26:21},encoding:{y:{field:Re,scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:r==="sideBySide"?null:void 0},x:{field:O,type:"temporal",axis:{orient:"top",title:null}},x2:{field:J,type:"temporal"},tooltip:[{field:O,type:"temporal",timeUnit:i,title:"Start"},{field:J,type:"temporal",timeUnit:i,title:"End"}],size:{value:{expr:`${V} == toString(datum.${G}) ? 19.5 : 18`}},color:{field:Q,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:t},transform:[{calculate:`datum.${Q} === 'queued' ? 9999999999999 : datum.${O}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}function W(t){try{let e=new Date(t*1e3);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}var l=q(ne(),1),X=ee(new Map);const Ee=()=>{let t=(0,H.c)(34),{runIds:e,runMap:r}=F(we),a=F(X),{clearRuns:i}=Ne(),{theme:n}=he(),[s,k]=(0,C.useState)("above"),N=Se(),c;t[0]===s?c=t[1]:(c=()=>{k(s==="above"?"sideBySide":"above")},t[0]=s,t[1]=c);let m=c;if(e.length===0){let p;return t[2]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)(Ie,{title:"No traces",description:(0,l.jsx)("span",{children:"Cells that have ran will appear here."}),icon:(0,l.jsx)(se,{})}),t[2]=p):p=t[2],p}let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=u):u=t[3];let y=s==="sideBySide",o;t[4]!==y||t[5]!==m?(o=(0,l.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[u,(0,l.jsx)("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:m,defaultChecked:y,className:"h-3 cursor-pointer"})]}),t[4]=y,t[5]=m,t[6]=o):o=t[6];let h;t[7]===i?h=t[8]:(h=(0,l.jsx)(be,{dataTestId:"clear-traces-button",onClick:i}),t[7]=i,t[8]=h);let v;t[9]!==o||t[10]!==h?(v=(0,l.jsxs)("div",{className:"flex flex-row justify-start gap-3",children:[o,h]}),t[9]=o,t[10]=h,t[11]=v):v=t[11];let g;if(t[12]!==s||t[13]!==a||t[14]!==e||t[15]!==r||t[16]!==n){let p;t[18]!==s||t[19]!==a||t[20]!==r||t[21]!==n?(p=(E,P)=>{let T=r.get(E);return T?(0,l.jsx)(_e,{run:T,isExpanded:a.get(T.runId),isMostRecentRun:P===0,chartPosition:s,theme:n},T.runId):null},t[18]=s,t[19]=a,t[20]=r,t[21]=n,t[22]=p):p=t[22],g=e.map(p),t[12]=s,t[13]=a,t[14]=e,t[15]=r,t[16]=n,t[17]=g}else g=t[17];let j;t[23]===g?j=t[24]:(j=(0,l.jsx)("div",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=j);let w;t[25]!==v||t[26]!==j?(w=(0,l.jsxs)("div",{className:"py-1 px-2 overflow-y-scroll h-full",children:[v,j]}),t[25]=v,t[26]=j,t[27]=w):w=t[27];let f=w;if(N==="sidebar")return f;let x;t[28]===f?x=t[29]:(x=(0,l.jsx)(K,{defaultSize:50,minSize:30,maxSize:80,children:f}),t[28]=f,t[29]=x);let d;t[30]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(je,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),t[30]=d):d=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(K,{defaultSize:50,children:(0,l.jsx)("div",{})}),t[31]=I):I=t[31];let S;return t[32]===x?S=t[33]:(S=(0,l.jsxs)(ge,{direction:"horizontal",className:"h-full",children:[x,d,I]}),t[32]=x,t[33]=S),S};var _e=({run:t,isMostRecentRun:e,chartPosition:r,isExpanded:a,theme:i})=>{let n=Z(X);a??(a=e);let s=()=>{n(c=>{let m=new Map(c);return m.set(t.runId,!a),m})},k=(0,l.jsx)(a?ce:me,{height:16,className:"inline"}),N=(0,l.jsxs)("span",{className:"text-sm cursor-pointer",onClick:s,children:["Run - ",L(t.runStartTime),k]});return a?(0,l.jsx)(Me,{run:t,chartPosition:r,theme:i,title:N},t.runId):(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)("pre",{className:"font-mono font-semibold",children:N})},t.runId)},Me=t=>{let e=(0,H.c)(40),{run:r,chartPosition:a,theme:i,title:n}=t,[s,k]=(0,C.useState)(),N=(0,C.useRef)(null),{ref:c,width:m}=ye(),u=m===void 0?300:m,y=le(),o,h;if(e[0]!==y||e[1]!==a||e[2]!==r.cellRuns||e[3]!==r.runId||e[4]!==i){let R=[...r.cellRuns.values()].map(b=>{let _=b.elapsedTime??0;return{cell:b.cellId,cellNum:y.inOrderIds.indexOf(b.cellId),startTimestamp:W(b.startTime),endTimestamp:W(b.startTime+_),elapsedTime:U(_*1e3),status:b.status}});o=`hiddenInputElement-${r.runId}`,h=fe(Te(R,o,a,i)),e[0]=y,e[1]=a,e[2]=r.cellRuns,e[3]=r.runId,e[4]=i,e[5]=o,e[6]=h}else o=e[5],h=e[6];let v=h.spec,g=i==="dark"?"dark":void 0,j=u-50,w=a==="above"?120:100,f;e[7]!==g||e[8]!==j||e[9]!==w?(f={theme:g,width:j,height:w,actions:!1,mode:"vega",renderer:"canvas"},e[7]=g,e[8]=j,e[9]=w,e[10]=f):f=e[10];let x;e[11]!==f||e[12]!==v?(x={ref:N,spec:v,options:f},e[11]=f,e[12]=v,e[13]=x):x=e[13];let d=xe(x),I;e[14]===(d==null?void 0:d.view)?I=e[15]:(I=()=>{let R=[{signalName:Y,handler:(b,_)=>{var z;k(((z=_.cell)==null?void 0:z[0])??void 0??null)}}];return R.forEach(b=>{let{signalName:_,handler:z}=b;d==null||d.view.addSignalListener(_,z)}),()=>{R.forEach(b=>{let{signalName:_,handler:z}=b;d==null||d.view.removeSignalListener(_,z)})}},e[14]=d==null?void 0:d.view,e[15]=I);let S;e[16]===d?S=e[17]:(S=[d],e[16]=d,e[17]=S),(0,C.useEffect)(I,S);let p;e[18]!==o||e[19]!==s||e[20]!==r?(p=(0,l.jsx)($e,{run:r,hoveredCellId:s,hiddenInputElementId:o}),e[18]=o,e[19]=s,e[20]=r,e[21]=p):p=e[21];let E=p,P=a==="sideBySide"?"-mt-0.5 flex-1":"",T;e[22]===Symbol.for("react.memo_cache_sentinel")?(T=(0,l.jsx)(C.Suspense,{children:(0,l.jsx)("div",{ref:N})}),e[22]=T):T=e[22];let B;e[23]!==c||e[24]!==P?(B=(0,l.jsx)("div",{className:P,ref:c,children:T}),e[23]=c,e[24]=P,e[25]=B):B=e[25];let M=B;if(a==="above"){let R;e[26]!==M||e[27]!==n||e[28]!==E?(R=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,M,E]}),e[26]=M,e[27]=n,e[28]=E,e[29]=R):R=e[29];let b;return e[30]!==r.runId||e[31]!==R?(b=(0,l.jsx)("div",{className:"flex flex-col",children:R},r.runId),e[30]=r.runId,e[31]=R,e[32]=b):b=e[32],b}let $;e[33]!==n||e[34]!==E?($=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,E]}),e[33]=n,e[34]=E,e[35]=$):$=e[35];let D;return e[36]!==M||e[37]!==r.runId||e[38]!==$?(D=(0,l.jsxs)("div",{className:"flex flex-row",children:[$,M]},r.runId),e[36]=M,e[37]=r.runId,e[38]=$,e[39]=D):D=e[39],D},$e=t=>{let e=(0,H.c)(12),{run:r,hoveredCellId:a,hiddenInputElementId:i}=t,n=(0,C.useRef)(null),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o=>{n.current&&(n.current.value=String(o),n.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=s):s=e[0];let k=s,N=a||"",c;e[1]!==i||e[2]!==N?(c=(0,l.jsx)("input",{type:"text",id:i,defaultValue:N,hidden:!0,ref:n}),e[1]=i,e[2]=N,e[3]=c):c=e[3];let m;e[4]===r.cellRuns?m=e[5]:(m=[...r.cellRuns.values()],e[4]=r.cellRuns,e[5]=m);let u;e[6]!==a||e[7]!==m?(u=m.map(o=>(0,l.jsx)(Ce,{cellRun:o,hovered:o.cellId===a,dispatchHoverEvent:k},o.cellId)),e[6]=a,e[7]=m,e[8]=u):u=e[8];let y;return e[9]!==c||e[10]!==u?(y=(0,l.jsxs)("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[c,u]}),e[9]=c,e[10]=u,e[11]=y):y=e[11],y},ze={success:(0,l.jsx)(pe,{color:"green",size:14}),running:(0,l.jsx)(ue,{color:"var(--blue-10)",size:14}),error:(0,l.jsx)(re,{color:"red",size:14}),queued:(0,l.jsx)(ke,{color:"grey",size:14})},Ce=t=>{let e=(0,H.c)(39),{cellRun:r,hovered:a,dispatchHoverEvent:i}=t,n;e[0]===r.elapsedTime?n=e[1]:(n=r.elapsedTime?U(r.elapsedTime*1e3):"-",e[0]=r.elapsedTime,e[1]=n);let s=n,k;e[2]!==r.elapsedTime||e[3]!==s?(k=r.elapsedTime?(0,l.jsxs)("span",{children:["This cell took ",(0,l.jsx)(de,{elapsedTime:s})," to run"]}):(0,l.jsx)("span",{children:"This cell has not been run"}),e[2]=r.elapsedTime,e[3]=s,e[4]=k):k=e[4];let N=k,c;e[5]!==r.cellId||e[6]!==i?(c=()=>{i(r.cellId)},e[5]=r.cellId,e[6]=i,e[7]=c):c=e[7];let m=c,u;e[8]===i?u=e[9]:(u=()=>{i(null)},e[8]=i,e[9]=u);let y=u,o=a&&"bg-(--gray-3) opacity-100",h;e[10]===o?h=e[11]:(h=ie("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100",o),e[10]=o,e[11]=h);let v;e[12]===r.startTime?v=e[13]:(v=L(r.startTime),e[12]=r.startTime,e[13]=v);let g;e[14]===v?g=e[15]:(g=(0,l.jsxs)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:["[",v,"]"]}),e[14]=v,e[15]=g);let j;e[16]===r.cellId?j=e[17]:(j=(0,l.jsxs)("span",{className:"text-(--gray-10) w-16 overflow-hidden",children:["(",(0,l.jsx)(ve,{cellId:r.cellId}),")"]}),e[16]=r.cellId,e[17]=j);let w;e[18]===r.code?w=e[19]:(w=(0,l.jsx)("span",{className:"w-40 truncate -ml-1",children:r.code}),e[18]=r.code,e[19]=w);let f;e[20]===s?f=e[21]:(f=(0,l.jsx)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:s}),e[20]=s,e[21]=f);let x;e[22]!==N||e[23]!==f?(x=(0,l.jsx)(A,{content:N,children:f}),e[22]=N,e[23]=f,e[24]=x):x=e[24];let d=ze[r.status],I;e[25]!==r.status||e[26]!==d?(I=(0,l.jsx)(A,{content:r.status,children:d}),e[25]=r.status,e[26]=d,e[27]=I):I=e[27];let S;e[28]!==x||e[29]!==I?(S=(0,l.jsxs)("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[x,I]}),e[28]=x,e[29]=I,e[30]=S):S=e[30];let p;return e[31]!==m||e[32]!==y||e[33]!==w||e[34]!==S||e[35]!==h||e[36]!==g||e[37]!==j?(p=(0,l.jsxs)("div",{className:h,onMouseEnter:m,onMouseLeave:y,children:[g,j,w,S]}),e[31]=m,e[32]=y,e[33]=w,e[34]=S,e[35]=h,e[36]=g,e[37]=j,e[38]=p):p=e[38],p};export{Ee as Tracing};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-
|
|
2
|
-
import{s as m}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-Bj1aDYRI.js";import{t as n}from"./compiler-runtime-B3qBwwSJ.js";import{t as f}from"./jsx-runtime-BqBOg78p.js";import{t as _}from"./spinner-Bhir8k53.js";import{t as p}from"./preload-helper-D2MJg03u.js";let c,u=(async()=>{let a,l,r,o,s;a=n(),l=m(i(),1),r=m(f(),1),o=l.lazy(()=>p(()=>import("./tracing-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-DjZGgWTo.js","./clear-button-DBrTU3uL.js","./cn-DCUzRj2J.js","./clsx-Dz_KRrWq.js","./compiler-runtime-B3qBwwSJ.js","./react-Bj1aDYRI.js","./chunk-LvLJmgfZ.js","./jsx-runtime-BqBOg78p.js","./cells-A-ljPpuj.js","./preload-helper-D2MJg03u.js","./badge-ChrPsdTW.js","./button-D9nb17Rw.js","./useEventListener-BR0C1MaI.js","./fullscreen-BDxedMYP.js","./react-dom-CSu739Rf.js","./menu-items-CwUpDHG7.js","./select-5i7URBEn.js","./dist-BoOh2kN5.js","./check-BH35Ndha.js","./createLucideIcon-D5guW7EU.js","./x-C-6liIBr.js","./tooltip-Gcwqb_SK.js","./use-toast-BDYuj3zG.js","./utils-DIGrmLDO.js","./useEvent-D91BmmQi.js","./invariant-BUdrueMv.js","./merge-_9WLTEyt.js","./_baseFor-DKD1r8uL.js","./isObject-DvLSfCY5.js","./zod-H_cgTO0M.js","./DeferredRequestRegistry-DjHgMr3S.js","./Deferred-DxQeE5uh.js","./uuid-DXdzqzcr.js","./config-ChCHm539.js","./constants-DMpttj8Q.js","./session-nmTRerwF.js","./requests-DIwGYs0l.js","./useLifecycle-DieWOfXE.js","./useNonce-DfoVjkkH.js","./useTheme-DEcgJENn.js","./arrays-DYDL-3-i.js","./strings-md4mFbOQ.js","./capabilities-C_FLIcjP.js","./once-DRroIaBz.js","./createReducer-1ePoj7v6.js","./paths-CXng2XQv.js","./dist-HlsDto3K.js","./dist-BrR4M-k3.js","./dist-CHcznzB-.js","./dist-Ds4ite_2.js","./dist-CEysMnMQ.js","./dist-DGxytjtv.js","./dist-DZ2qbK2N.js","./dist-CRPTyqAT.js","./dist-C9ZB41s2.js","./stex-jWatZkll.js","./toDate-B5A0DFEz.js","./purify.es-DC4RGS9t.js","./cjs-BRGiG41H.js","./debounce-DhnxH9Rh.js","./now-CsYTPAhW.js","./isSymbol-BT6B8Bon.js","./database-zap-BUVn5HoR.js","./main-B0OX4z33.js","./cells-jmgGt1lS.css","./CellStatus-PIeZtHEl.js","./multi-icon-DQxqgfM2.js","./multi-icon-pwGWVz3d.css","./useDateFormatter-BEz9SEXo.js","./context-DGqo1TbK.js","./SSRProvider-D3zWcDme.js","./en-US-BqRooSzc.js","./ellipsis-pk06Lq82.js","./refresh-cw-DHwG4Mac.js","./workflow-DYcZF-oV.js","./CellStatus-2Psjnl5F.css","./empty-state-CsVQSqKA.js","./panel-context-B3J07LRC.js","./cell-link-d38hFEon.js","./ImperativeModal-BBqcKmmk.js","./alert-dialog-BGBdrcqJ.js","./dialog-EekxpBBM.js","./input-DyPS_GiK.js","./useDebounce-BDIglWmG.js","./numbers-OHL_xBiC.js","./useNumberFormatter-wQU1z0W_.js","./usePress-CtfZXGno.js","./runs-5odJFrfi.js","./react-vega-Dprex0g5.js","./precisionRound-CU2C3Vxx.js","./defaultLocale-JieDVWC_.js","./linear-Bn2iRj5i.js","./timer-CIInKAPS.js","./init-DE_uL9Ns.js","./time-yM1OtSdb.js","./defaultLocale-BLne0bXb.js","./range-1DwpgXvM.js","./vega-loader.browser-DXARUlxo.js","./treemap-BKxvGXqJ.js","./path-LDcaQ64B.js","./colors-CI3VyX7X.js","./ordinal-DEaY__23.js","./arc-ONRhTAm2.js","./math-Bf0RgaKx.js","./array-BCwZq3ts.js","./step-BE8c2ivx.js","./line-j0cbFv7-.js","./chevron-right-CG5QYXYk.js","./circle-check-C17zXg7L.js","./circle-play-CYXX2xu3.js","./react-resizable-panels.browser.esm-Bcm5njwd.js","./bundle.esm-DU-4isVC.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{s as m}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-Bj1aDYRI.js";import{t as n}from"./compiler-runtime-B3qBwwSJ.js";import{t as f}from"./jsx-runtime-BqBOg78p.js";import{t as _}from"./spinner-Bhir8k53.js";import{t as p}from"./preload-helper-D2MJg03u.js";let c,u=(async()=>{let a,l,r,o,s;a=n(),l=m(i(),1),r=m(f(),1),o=l.lazy(()=>p(()=>import("./tracing-DjZGgWTo.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111]),import.meta.url).then(t=>({default:t.Tracing}))),c=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(s,{}),children:(0,r.jsx)(o,{})}),t[0]=e):e=t[0],e},s=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("div",{className:"flex flex-col items-center justify-center h-full",children:(0,r.jsx)(_,{})}),t[0]=e):e=t[0],e}})();export{u as __tla,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as l}from"./useEvent-D91BmmQi.js";import{E as s}from"./cells-
|
|
1
|
+
import{u as l}from"./useEvent-D91BmmQi.js";import{E as s}from"./cells-A-ljPpuj.js";import{t as i}from"./compiler-runtime-B3qBwwSJ.js";import{o as n}from"./utils-DIGrmLDO.js";import{n as f}from"./html-to-image-tbPEMBJg.js";import{o as c}from"./focus-Baz7rlo0.js";var p=i();function u(){let o=(0,p.c)(4),a=l(n),r=c(),{createNewCell:t}=s(),e;return o[0]!==a||o[1]!==t||o[2]!==r?(e=m=>{m.includes("alt")&&f({autoInstantiate:a,createNewCell:t,fromCellId:r}),t({code:m,before:!1,cellId:r??"__end__"})},o[0]=a,o[1]=t,o[2]=r,o[3]=e):e=o[3],e}export{u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as b}from"./useEvent-D91BmmQi.js";import{Dt as F,E as de,Kn as ne,
|
|
1
|
+
import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as b}from"./useEvent-D91BmmQi.js";import{Dt as F,E as de,Kn as ne,Rn as se,dr as re,fr as ce,hr as he,ki as me,ot as pe,pr as ke,v as fe,zn as ue}from"./cells-A-ljPpuj.js";import{t as ye}from"./compiler-runtime-B3qBwwSJ.js";import{a as be,o as xe,r as je}from"./utils-DIGrmLDO.js";import{t as ve}from"./jsx-runtime-BqBOg78p.js";import{t as Ce}from"./label-DTR8T0AE.js";import{a as we,h as ge}from"./download-Iyng0xCz.js";import{r as ze}from"./requests-DIwGYs0l.js";import{t as f}from"./createLucideIcon-D5guW7EU.js";import{n as K,r as Q}from"./x-C-6liIBr.js";import{t as Ie}from"./chevron-right-CG5QYXYk.js";import{t as V}from"./circle-plus-BdiiIXu5.js";import{t as We}from"./code-xml-CZN6vNxu.js";import{t as Me}from"./eye-off-BT-KOYV5.js";import{t as _e}from"./image-DQHXdEQn.js";import{t as Se}from"./link-CfEtM3Rl.js";import{t as Ae}from"./play-C7DcCsoO.js";import{t as De}from"./sparkles-CZ5WmLPA.js";import{t as Ne}from"./trash-2-D280Xiwg.js";import{t as Re}from"./use-toast-BDYuj3zG.js";import{n as Te}from"./copy-B5qyZn5s.js";import{i as Ee}from"./useRunCells-DU1tawR-.js";import{a as Be,c as He,n as Le}from"./dialog-EekxpBBM.js";import{n as qe}from"./ImperativeModal-BBqcKmmk.js";import{n as Oe}from"./state-Bsz477is.js";import{r as G}from"./html-to-image-tbPEMBJg.js";import{n as Pe,t as Ue}from"./icons-BRopQwI3.js";import{t as Fe}from"./useDeleteCell-C2Stbb6Q.js";import{n as J}from"./name-cell-input-C5LXTI3T.js";import{t as $}from"./multi-icon-DQxqgfM2.js";import{t as Ke}from"./useSplitCell-BZPuhd8z.js";var X=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),Y=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),Z=f("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]),Qe=f("text-cursor-input",[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]]),ee=f("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),le=f("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Ve(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ge(a){var c;let e=(c=a.match(/scrollTo=([^&]+)/))==null?void 0:c[1];return e?decodeURIComponent(e.split("&")[0]):null}function oe(a){return a==="_"?!1:!!(a&&a.trim().length>0)}var Je=ye(),l=ae(ve(),1);function $e(a){let e=(0,Je.c)(47),{cell:c,closePopover:u}=a,{createNewCell:m,updateCellConfig:s,updateCellName:x,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:S,markUntouched:A}=de(),D=Ke(),N=Ee(c==null?void 0:c.cellId),R=!b(fe),T=Fe(),{openModal:j}=qe(),E=ie(Oe),B=b(je),v=b(xe),te=b(pe),y=b(be),{saveCellConfig:r}=ze();if(!c||te){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[0]=o):o=e[0],o}let{cellId:t,config:i,getEditorView:n,name:h,hasOutput:C,hasConsoleOutput:H,status:L}=c,w;e[1]!==t||e[2]!==i.disabled||e[3]!==r||e[4]!==s?(w=async()=>{let o={disabled:!i.disabled};await r({configs:{[t]:o}}),s({cellId:t,config:o})},e[1]=t,e[2]=i.disabled,e[3]=r,e[4]=s,e[5]=w):w=e[5];let q=w,g;e[6]!==t||e[7]!==i.hide_code||e[8]!==n||e[9]!==r||e[10]!==s?(g=async()=>{let o={hide_code:!i.hide_code};await r({configs:{[t]:o}}),s({cellId:t,config:o});let U=n();U&&(o.hide_code?U.contentDOM.blur():U.focus())},e[6]=t,e[7]=i.hide_code,e[8]=n,e[9]=r,e[10]=s,e[11]=g):g=e[11];let O=g,d=t===me,z;e[12]===Symbol.for("react.memo_cache_sentinel")?(z=(0,l.jsx)(Ae,{size:13,strokeWidth:1.5}),e[12]=z):z=e[12];let P=L==="running"||L==="queued"||L==="disabled-transitively"||i.disabled,k;e[13]===N?k=e[14]:(k=()=>N(),e[13]=N,e[14]=k);let I;return e[15]!==_||e[16]!==B||e[17]!==y||e[18]!==v||e[19]!==R||e[20]!==t||e[21]!==S||e[22]!==u||e[23]!==i.disabled||e[24]!==i.hide_code||e[25]!==m||e[26]!==T||e[27]!==n||e[28]!==H||e[29]!==C||e[30]!==d||e[31]!==A||e[32]!==p||e[33]!==h||e[34]!==j||e[35]!==r||e[36]!==M||e[37]!==W||e[38]!==E||e[39]!==D||e[40]!==P||e[41]!==k||e[42]!==q||e[43]!==O||e[44]!==s||e[45]!==x?(I=[[{icon:z,label:"Run cell",hotkey:"cell.run",hidden:P,redundant:!0,handle:k},{icon:(0,l.jsx)(De,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!B,handle:()=>{E(o=>(o==null?void 0:o.cellId)===t?null:{cellId:t})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(Z,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>D({cellId:t})},{icon:(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let o=n();o&&ne({[t]:o})}},{icon:i.hide_code?(0,l.jsx)(re,{size:13,strokeWidth:1.5}):(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:i.hide_code?"Show code":"Hide code",handle:O,hotkey:"cell.hideCode"},{icon:i.disabled?(0,l.jsx)(ee,{size:13,strokeWidth:1.5}):(0,l.jsx)(le,{size:13,strokeWidth:1.5}),label:i.disabled?"Enable execution":"Disable execution",handle:q,hidden:d}],[{icon:(0,l.jsx)(Ue,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let o=n();o&&(G({autoInstantiate:v,createNewCell:m}),F(o,{language:"markdown",keepCodeAsIs:!1}),i.hide_code||(await r({configs:{[t]:{hide_code:!0}}}),s({cellId:t,config:{hide_code:!0}}),A({cellId:t})))},hidden:d},se(n())==="sql"?{icon:(0,l.jsx)(Pe,{}),label:"View as Python",hotkey:"cell.viewAsSQL",handle:()=>{let o=n();o&&ue(o,"python",{force:!0})},hidden:d}:{icon:(0,l.jsx)(ce,{size:13,strokeWidth:1.5}),label:"Convert to SQL",hotkey:"cell.viewAsSQL",handle:()=>{let o=n();o&&(G({autoInstantiate:v,createNewCell:m}),F(o,{language:"sql",keepCodeAsIs:!1}))},hidden:d}],[{icon:(0,l.jsxs)($,{children:[(0,l.jsx)(V,{size:13,strokeWidth:1.5}),(0,l.jsx)(K,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>m({cellId:t,before:!0}),hidden:d,redundant:!0},{icon:(0,l.jsxs)($,{children:[(0,l.jsx)(V,{size:13,strokeWidth:1.5}),(0,l.jsx)(Q,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>m({cellId:t,before:!1}),redundant:!0},{icon:(0,l.jsx)(K,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>p({cellId:t,before:!0}),hidden:d},{icon:(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>p({cellId:t,before:!1}),hidden:d},{icon:(0,l.jsx)(ge,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>p({cellId:t,direction:"left"}),hidden:y!=="columns"||d},{icon:(0,l.jsx)(Ie,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>p({cellId:t,direction:"right"}),hidden:y!=="columns"||d},{icon:(0,l.jsx)(Y,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:t,scroll:!1}),hidden:d},{icon:(0,l.jsx)(X,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:t,scroll:!1}),hidden:d},{icon:(0,l.jsx)(ke,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:t}),hidden:y!=="columns"||d}],[{icon:(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!C,handle:()=>we(t,"result")},{icon:(0,l.jsx)(he,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(C||H),handle:()=>{S({cellId:t})}}],[{icon:(0,l.jsx)(Qe,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:el,handleHeadless:()=>{j((0,l.jsxs)(Le,{children:[(0,l.jsx)(Be,{children:(0,l.jsx)(He,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(Ce,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)(J,{placeholder:"cell name",value:h,onKeyDown:o=>{o.key==="Enter"&&(o.preventDefault(),o.stopPropagation(),j(null))},onChange:o=>x({cellId:t,name:o})})]})]}))},rightElement:(0,l.jsx)(J,{placeholder:"cell name",value:h,onChange:o=>x({cellId:t,name:o}),onEnterKey:()=>u==null?void 0:u()}),hidden:d},{icon:(0,l.jsx)(Se,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!oe(h),tooltip:oe(h)?void 0:"Only named cells can be linked to",handle:async()=>{await Te(Ve(h)),Re({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!R,variant:"danger",icon:(0,l.jsx)(Ne,{size:13,strokeWidth:1.5}),handle:()=>{T({cellId:t})}}]].map(Ye).filter(Xe),e[15]=_,e[16]=B,e[17]=y,e[18]=v,e[19]=R,e[20]=t,e[21]=S,e[22]=u,e[23]=i.disabled,e[24]=i.hide_code,e[25]=m,e[26]=T,e[27]=n,e[28]=H,e[29]=C,e[30]=d,e[31]=A,e[32]=p,e[33]=h,e[34]=j,e[35]=r,e[36]=M,e[37]=W,e[38]=E,e[39]=D,e[40]=P,e[41]=k,e[42]=q,e[43]=O,e[44]=s,e[45]=x,e[46]=I):I=e[46],I}function Xe(a){return a.length>0}function Ye(a){return a.filter(Ze)}function Ze(a){return!a.hidden}function el(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{Z as a,ee as i,Ge as n,Y as o,le as r,X as s,$e as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as v}from"./chunk-LvLJmgfZ.js";import{i as m,n as u}from"./useEvent-D91BmmQi.js";import{E as p,b as D,v as h}from"./cells-
|
|
1
|
+
import{s as v}from"./chunk-LvLJmgfZ.js";import{i as m,n as u}from"./useEvent-D91BmmQi.js";import{E as p,b as D,v as h}from"./cells-A-ljPpuj.js";import{t as C}from"./compiler-runtime-B3qBwwSJ.js";import{t as I}from"./useEventListener-BR0C1MaI.js";import{t as x}from"./jsx-runtime-BqBOg78p.js";import{t as _}from"./button-D9nb17Rw.js";import{r as b}from"./requests-DIwGYs0l.js";import{t as g}from"./use-toast-BDYuj3zG.js";import{n as j}from"./renderShortcut-CkNNAheg.js";var w=C(),d=v(x(),1);const f=e=>{let t=(0,w.c)(7),l;t[0]===e?l=t[1]:(l=a=>{var s;(a.ctrlKey||a.metaKey)&&a.key==="z"&&(a.preventDefault(),a.stopPropagation(),(s=e.onClick)==null||s.call(e,a))},t[0]=e,t[1]=l);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r={capture:!0},t[2]=r):r=t[2],I(window,"keydown",l,r);let o=e.children??"Undo",i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=(0,d.jsx)(j,{className:"ml-2",shortcut:"cmd-z"}),t[3]=i):i=t[3];let n;return t[4]!==o||t[5]!==e?(n=(0,d.jsxs)(_,{"data-testid":"undo-button",size:"sm",variant:"outline",...e,children:[o," ",i]}),t[4]=o,t[5]=e,t[6]=n):n=t[6],n};var y=C();function z(){let e=(0,y.c)(4),{deleteCell:t,undoDeleteCell:l}=p(),{sendDeleteCell:r}=b(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=i=>{var s;if(m.get(h))return;let{cellId:n}=i,a=(((s=m.get(D).cellData[n])==null?void 0:s.code)??"").trim()==="";if(t({cellId:n}),r({cellId:n}).catch(()=>{l()}),!a){let{dismiss:c}=g({title:"Cell deleted",description:"You can bring it back by clicking undo or through the command palette.",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{l(),k()}})}),k=c}},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}function K(){let e=(0,y.c)(4),{deleteCell:t,undoDeleteCell:l}=p(),{sendDeleteCell:r}=b(),o;return e[0]!==t||e[1]!==r||e[2]!==l?(o=async i=>{if(m.get(h))return;let{cellIds:n}=i;for(let c of n)await r({cellId:c}).then(()=>{t({cellId:c})});let{dismiss:a}=g({title:"Cells deleted",action:(0,d.jsx)(f,{"data-testid":"undo-delete-button",onClick:()=>{for(let c of n)l();s()}})}),s=a},e[0]=t,e[1]=r,e[2]=l,e[3]=o):o=e[3],u(o)}export{K as n,f as r,z as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as E}from"./chunk-LvLJmgfZ.js";import{d as X,l as Y,n as G,p as Z,u as $}from"./useEvent-D91BmmQi.js";import{t as ee}from"./react-Bj1aDYRI.js";import{G as te,Mt as re}from"./cells-
|
|
1
|
+
import{s as E}from"./chunk-LvLJmgfZ.js";import{d as X,l as Y,n as G,p as Z,u as $}from"./useEvent-D91BmmQi.js";import{t as ee}from"./react-Bj1aDYRI.js";import{G as te,Mt as re}from"./cells-A-ljPpuj.js";import{t as V}from"./compiler-runtime-B3qBwwSJ.js";import{t as le}from"./cn-DCUzRj2J.js";import{t as ae}from"./jsx-runtime-BqBOg78p.js";import{d as ne}from"./alert-dialog-BGBdrcqJ.js";import{i as B,r as se,t as J}from"./popover-UExmgBsf.js";import{a as oe,n as ie,o as ce,t as me}from"./tooltip-Gcwqb_SK.js";import{t as de}from"./createLucideIcon-D5guW7EU.js";import{t as he}from"./useCellActionButton-Bjxun3wK.js";import{a as pe,c as fe,d as ue,i as xe,o as je,r as be,t as ye}from"./command-CzIDL1VI.js";import{n as ve}from"./focus-Baz7rlo0.js";import{a as Ne,i as ge}from"./renderShortcut-CkNNAheg.js";var we=de("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),K=V(),h=E(ee(),1),t=E(ae(),1);const L=h.memo(h.forwardRef((r,a)=>{let e=(0,K.c)(39),{children:n,showTooltip:c,...m}=r,p=c===void 0?!0:c,[d,I]=(0,h.useState)(!1),N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=()=>I(!1),e[0]=N):N=e[0];let W=N,D=(0,h.useRef)(null),z=he({cell:m,closePopover:W}).map(Ce).filter(_e),P=ne(),g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{te(()=>{D.current&&D.current.scrollIntoView({behavior:"auto",block:"nearest"})})},e[1]=g):g=e[1];let T=G(g),w;e[2]===T?w=e[3]:(w=s=>{I(o=>{let l=typeof s=="function"?s(o):s;return l&&T(),l})},e[2]=T,e[3]=w);let i=G(w),k;e[4]===i?k=e[5]:(k=()=>({toggle:()=>i(Se)}),e[4]=i,e[5]=k),(0,h.useImperativeHandle)(a,k);let O=se,A=ye,F=re(m.cellId),f;e[6]===F?f=e[7]:(f=(0,t.jsx)(pe,{placeholder:"Search actions...",className:"h-6 m-1",...F}),e[6]=F,e[7]=f);let H=ue,u;e[8]===Symbol.for("react.memo_cache_sentinel")?(u=(0,t.jsx)(be,{children:"No results"}),e[8]=u):u=e[8];let M=z.map((s,o)=>(0,t.jsxs)(h.Fragment,{children:[(0,t.jsx)(xe,{children:s.map(l=>{let q=(0,t.jsxs)("div",{className:"flex items-center flex-1",children:[l.icon&&(0,t.jsx)("div",{className:"mr-2 w-5 text-muted-foreground",children:l.icon}),(0,t.jsx)("div",{className:"flex-1",children:l.label}),(0,t.jsxs)("div",{className:"shrink-0 text-sm",children:[l.hotkey&&ge(l.hotkey),l.rightElement]})]});return l.tooltip&&(q=(0,t.jsx)(me,{content:l.tooltip,delayDuration:100,children:q})),(0,t.jsx)(je,{className:le(l.disabled&&"opacity-50!"),onSelect:()=>{l.disableClick||l.disabled||(l.handle(),I(!1))},variant:l.variant,children:q},l.label)})},o),o<z.length-1&&(0,t.jsx)(fe,{})]},o)),x;e[9]!==H||e[10]!==u||e[11]!==M?(x=(0,t.jsxs)(H,{children:[u,M]}),e[9]=H,e[10]=u,e[11]=M,e[12]=x):x=e[12];let j;e[13]!==A||e[14]!==x||e[15]!==f?(j=(0,t.jsxs)(A,{children:[f,x]}),e[13]=A,e[14]=x,e[15]=f,e[16]=j):j=e[16];let C;e[17]!==O||e[18]!==P||e[19]!==j?(C=(0,t.jsx)(O,{className:"w-[300px] p-0 pt-1 overflow-auto",scrollable:!0,...P,children:j}),e[17]=O,e[18]=P,e[19]=j,e[20]=C):C=e[20];let b=C;if(!p){let s;e[21]===n?s=e[22]:(s=(0,t.jsx)(B,{asChild:!0,children:n}),e[21]=n,e[22]=s);let o;return e[23]!==b||e[24]!==i||e[25]!==d||e[26]!==s?(o=(0,t.jsxs)(J,{open:d,onOpenChange:i,children:[s,b]}),e[23]=b,e[24]=i,e[25]=d,e[26]=s,e[27]=o):o=e[27],o}let _;e[28]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(ie,{tabIndex:-1,children:Ne("cell.cellActions")}),e[28]=_):_=e[28];let R=!d&&_,y;e[29]===n?y=e[30]:(y=(0,t.jsx)(ce,{ref:D,children:(0,t.jsx)(B,{className:"flex",children:n})}),e[29]=n,e[30]=y);let v;e[31]!==R||e[32]!==y?(v=(0,t.jsxs)(oe,{delayDuration:200,disableHoverableContent:!0,children:[R,y]}),e[31]=R,e[32]=y,e[33]=v):v=e[33];let S;return e[34]!==b||e[35]!==i||e[36]!==d||e[37]!==v?(S=(0,t.jsxs)(J,{open:d,onOpenChange:i,children:[v,b]}),e[34]=b,e[35]=i,e[36]=d,e[37]=v,e[38]=S):S=e[38],S})),Q=h.memo(r=>{let a=(0,K.c)(5),{children:e,cellId:n}=r,c;a[0]===n?c=a[1]:(c=ve(n),a[0]=n,a[1]=c);let m=$(c);if(!m)return null;let p;return a[2]!==e||a[3]!==m?(p=(0,t.jsx)(L,{showTooltip:!1,...m,children:e}),a[2]=e,a[3]=m,a[4]=p):p=a[4],p});Q.displayName="ConnectionCellActionsDropdown";function ke(r){return!r.redundant}function Ce(r){return r.filter(ke)}function _e(r){return r.length>0}function Se(r){return!r}var Ie=V();const U=Z("minimap");function De(){let r=(0,Ie.c)(3),[a,e]=Y(U),n;return r[0]!==a||r[1]!==e?(n={dependencyPanelTab:a,setDependencyPanelTab:e},r[0]=a,r[1]=e,r[2]=n):n=r[2],n}function Pe(){return X(U)}export{we as a,Q as i,Pe as n,L as r,De as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as ze}from"./chunk-LvLJmgfZ.js";import{d as R,l as ht,p as mt,u as me}from"./useEvent-D91BmmQi.js";import{t as pt}from"./react-Bj1aDYRI.js";import{An as ut,Dn as ft,E as Me,Ei as pe,En as xt,Tn as yt,Yt as bt,_ as kt,dr as wt,h as We,lr as jt,lt as _e,mr as gt,ot as vt,st as Ct,t as zt,yr as Mt,zr as Wt}from"./cells-CJlo_hG2.js";import{t as N}from"./compiler-runtime-B3qBwwSJ.js";import{n as _t,x as Nt}from"./ai-model-dropdown-CYx9ZfdS.js";import{_ as H,d as Ne}from"./useEventListener-BR0C1MaI.js";import{y as St}from"./utils-DIGrmLDO.js";import{n as S,t as Se}from"./constants-DMpttj8Q.js";import{S as ue,h as Dt,n as At,o as Pt,x as It}from"./config-ChCHm539.js";import{n as Et}from"./switch-DlgpDZMk.js";import{t as Lt}from"./jsx-runtime-BqBOg78p.js";import{o as Tt}from"./alert-dialog-BGBdrcqJ.js";import{a as $t,c as fe,o as xe,s as Rt}from"./popover-UExmgBsf.js";import{a as Ht,c as qt,i as Ut,n as Bt,r as Ot,s as Yt,t as Ft}from"./select-5i7URBEn.js";import{vt as Vt}from"./JsonOutput-DXnOS_Hk.js";import{c as De,d as ye,n as Kt,o as Gt,r as be,t as Jt}from"./download-mzsKQgiy.js";import{t as Ae}from"./tooltip-Gcwqb_SK.js";import{r as Pe,t as q}from"./button-D9nb17Rw.js";import{i as Xt,r as Qt,t as Ie}from"./strings-md4mFbOQ.js";import{r as U}from"./requests-DIwGYs0l.js";import{t as j}from"./createLucideIcon-D5guW7EU.js";import{A as Ee,a as Le,i as Te,j as Zt,k as ea,u as $e}from"./layout-lxwMDUgI.js";import{t as ke}from"./check-BH35Ndha.js";import{n as ta}from"./maps-C48Oksn0.js";import{r as aa}from"./useCellActionButton-DYwx4pGE.js";import{o as oa}from"./slide-form-Bi8ZYBHP.js";import{t as Re}from"./copy-Dk_3y0H-.js";import{t as na}from"./eye-off-BT-KOYV5.js";import{t as ae}from"./file-HTLbeC2b.js";import{t as sa}from"./github-raQvpeuZ.js";import{f as la}from"./form-CPDlIjdV.js";import{n as ia,r as ra,t as da}from"./youtube-3lRHw8NU.js";import{i as ca,n as He}from"./add-connection-dialog-HCShSlr3.js";import{n as ha,t as ma}from"./square-Dj2Cf4ne.js";import{t as pa}from"./image-DQHXdEQn.js";import{t as ua}from"./link-CfEtM3Rl.js";import{r as fa}from"./input-DyPS_GiK.js";import{t as xa}from"./settings-DfFe0dWD.js";import{t as ya}from"./sparkles-CZ5WmLPA.js";import{y as ba}from"./textarea-BXPC1-kb.js";import{t as D}from"./use-toast-BDYuj3zG.js";import{n as qe,t as ka}from"./paths-CXng2XQv.js";import{o as wa}from"./session-nmTRerwF.js";import{n as B}from"./copy-B5qyZn5s.js";import{r as ja}from"./useRunCells-B531RIUE.js";import{a as Ue,c as Be,i as Oe,n as Ye,r as Fe}from"./dialog-EekxpBBM.js";import{n as we}from"./ImperativeModal-BBqcKmmk.js";import{r as ga,t as Ve}from"./share-BXN2Sd1t.js";import{a as va}from"./cell-link-BA7Demf0.js";import{a as Ca}from"./renderShortcut-CkNNAheg.js";import{t as za}from"./icons-BRopQwI3.js";import{n as Ke}from"./marimo-icons-BSB-Z_W3.js";import{t as Ma}from"./links-BHtUMVOq.js";import{r as Wa,t as Ge}from"./hooks-b3J1eFE-.js";import{t as Je}from"./types-z6Sk3JCV.js";var _a=j("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),Na=j("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),Xe=j("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"}]]),Qe=j("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"}]]),Ze=j("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"}]]),Sa=j("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"}]]),Da=j("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"}]]),Aa=j("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]),Pa=j("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"}]]),Ia=j("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"}]]),Ea=j("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),et=j("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"}]]),La=j("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"}]]),Ta=j("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"}]]),tt=j("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"}]]),je=N(),A=ze(pt(),1),a=ze(Lt(),1);function $a(){return"uvx marimo@latest"}function Ra(t,e,n){let o=n?" --with-token":"",s=`${$a()} pair prompt --url '${e}'${o}`;switch(t){case"claude":return`claude "$(${s} --claude)"`;case"codex":return`codex "$(${s} --codex)"`;case"opencode":return`opencode "$(${s} --opencode)"`;default:Qt(t)}}function Ha(t){return t.length<=4?"****":`${"*".repeat(Math.min(t.length-4,8))}${t.slice(-4)}`}var qa="npx skills add marimo-team/marimo-pair";function Ua(){let t=(0,je.c)(2),[e,n]=(0,A.useState)(null),o,s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{fetch(At("/auth/token").href,{headers:Et.headers()}).then(Ba).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,A.useEffect)(o,s),e}function Ba(t){return t.ok?t.json():null}const Oa=t=>{let e=(0,je.c)(32),{onClose:n}=t,[o,s]=(0,A.useState)("claude"),r=Pt(),i=Ua(),l=!!i,d;e[0]!==o||e[1]!==l||e[2]!==r.httpURL?(d=Ra(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)(Be,{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)(Ue,{children:[p,(0,a.jsxs)(Fe,{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)(O,{command:qa})]}),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=_=>s(_),e[8]=x):x=e[8];let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=(0,a.jsxs)(Rt,{className:"w-full",children:[(0,a.jsx)(fe,{value:"claude",className:"flex-1",children:"Claude"}),(0,a.jsx)(fe,{value:"codex",className:"flex-1",children:"Codex"}),(0,a.jsx)(fe,{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)(xe,{value:"claude",className:"mt-3",children:(0,a.jsx)(O,{command:c})}),e[10]=c,e[11]=y);let b;e[12]===c?b=e[13]:(b=(0,a.jsx)(xe,{value:"codex",className:"mt-3",children:(0,a.jsx)(O,{command:c})}),e[12]=c,e[13]=b);let w;e[14]===c?w=e[15]:(w=(0,a.jsx)(xe,{value:"opencode",className:"mt-3",children:(0,a.jsx)(O,{command:c})}),e[14]=c,e[15]=w);let g;e[16]!==o||e[17]!==w||e[18]!==y||e[19]!==b?(g=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[f,(0,a.jsxs)($t,{value:o,onValueChange:x,children:[k,y,b,w]})]}),e[16]=o,e[17]=w,e[18]=y,e[19]=b,e[20]=g):g=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)(O,{command:i,display:Ha(i)})]}),e[21]=i,e[22]=l,e[23]=z):z=e[23];let v;e[24]!==g||e[25]!==z?(v=(0,a.jsxs)("div",{className:"flex flex-col gap-4 py-2",children:[h,g,z]}),e[24]=g,e[25]=z,e[26]=v):v=e[26];let M;e[27]===n?M=e[28]:(M=(0,a.jsx)(Oe,{children:(0,a.jsx)(q,{variant:"secondary",onClick:n,children:"Close"})}),e[27]=n,e[28]=M);let W;return e[29]!==v||e[30]!==M?(W=(0,a.jsxs)(Ye,{className:"sm:max-w-lg",children:[u,v,M]}),e[29]=v,e[30]=M,e[31]=W):W=e[31],W};var O=t=>{let e=(0,je.c)(15),{command:n,display:o}=t,[s,r]=(0,A.useState)(!1),i;e[0]===n?i=e[1]:(i=Pe.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)(ke,{size:14,strokeWidth:1.5}):(0,a.jsx)(Re,{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},at=N(),oe="https://static.marimo.app";const Ya=t=>{let e=(0,at.c)(25),{onClose:n}=t,[o,s]=(0,A.useState)(""),{exportAsHTML:r}=U(),i=`${o}-${Math.random().toString(36).slice(2,6)}`,l=`${oe}/static/${i}`,d;e[0]!==r||e[1]!==n||e[2]!==i?(d=async g=>{g.preventDefault(),n();let z=await r({download:!1,includeCode:!0,files:ea.INSTANCE.filenames()}),v=D({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${oe}/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)(Be,{children:"Share static notebook"}),e[4]=c):c=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsxs)(Ue,{children:[c,(0,a.jsxs)(Fe,{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:oe,target:"_blank",children:oe}),"."]})]}),e[5]=p):p=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=g=>{s(g.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)(fa,{"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)(Fa,{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)(Oe,{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 Fa=t=>{let e=(0,at.c)(8),[n,o]=A.useState(!1),s;e[0]===t.text?s=e[1]:(s=Pe.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)(Re,{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},Va=N();function Ka(){let t=document.getElementsByClassName(Se.outputArea);for(let e of t){let n=e.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=pe.findElement(e);if(!o){H.warn("Could not find HTMLCellId for visible output area",e);continue}return{cellId:pe.parse(o.id)}}}return H.warn("No visible output area found for scroll anchor"),null}function Ga(t){if(!t){H.warn("No scroll anchor provided to restore scroll position");return}let e=document.getElementById(pe.create(t.cellId));if(!e){H.warn("Could not find cell element to restore scroll position",t.cellId);return}if(!e.querySelector(`.${Se.outputArea}`)){H.warn("Could not find output area to restore scroll position",t.cellId);return}e.scrollIntoView({block:"start",behavior:"auto"})}function ot(){let t=(0,Va.c)(2),e=R(_e),n;return t[0]===e?n=t[1]:(n=()=>{let o=Ka();e(s=>({mode:Ct(s.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ga(o)})})},t[0]=e,t[1]=n),n}const nt=mt(!1);var Ja=N();const Xa=()=>{let t=(0,Ja.c)(7),{selectedLayout:e}=Le(),{setLayoutView:n}=Te();if(ue()&&!ut("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)(Yt,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(qt,{placeholder:"Select a view"})}),t[2]=s):s=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(Bt,{children:(0,a.jsxs)(Ot,{children:[(0,a.jsx)(Ht,{children:"View as"}),Je.map(Za)]})}),t[3]=r):r=t[3];let i;return t[4]!==e||t[5]!==o?(i=(0,a.jsxs)(Ft,{"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 Qa(t){return(0,a.jsx)(st(t),{className:"h-4 w-4"})}function st(t){switch(t){case"vertical":return Pa;case"grid":return ra;case"slides":return et;default:return Xt(t),ma}}function lt(t){return Ie.startCase(t)}function Za(t){return(0,a.jsx)(Ut,{value:t,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[Qa(t),(0,a.jsx)("span",{children:lt(t)})]})},t)}async function eo(t){let{filename:e,preset:n,downloadPDF:o}=t;await o({filename:e,webpdf:!1,preset:n,includeInputs:!0,rasterServer:"static"})}var to=N();function ao(t){let e=(0,to.c)(5),{openPrompt:n,closeModal:o}=we(),{sendCopy:s}=U(),r;return e[0]!==o||e[1]!==n||e[2]!==s||e[3]!==t?(r=()=>{if(!t)return null;let i=ka.guessDeliminator(t);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${qe.basename(t)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:l=>{let d=i.join(qe.dirname(t),l);s({source:t,destination:d}).then(()=>{o(),D({title:"Notebook copied",description:"A copy of the notebook has been created."}),Ma(d)})}})},e[0]=o,e[1]=n,e[2]=s,e[3]=t,e[4]=r):r=e[4],r}const oo=()=>{let{updateCellConfig:t}=Me(),{saveCellConfig:e}=U();return(0,A.useCallback)(async()=>{let n=new bt,o=We(),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=Ne.entries(r);if(i.length!==0){await e({configs:r});for(let[l,d]of i)t({cellId:l,config:d})}},[t])};var no=N();function it(){let t=(0,no.c)(4),{openConfirm:e}=we(),n=R(Dt),{sendRestart:o}=U(),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)(Tt,{onClick:async()=>{n({state:It.CLOSING}),await o(),ga()},"aria-label":"Confirm Restart",children:"Restart"})})},t[0]=e,t[1]=o,t[2]=n,t[3]=s):s=t[3],s}var so=N(),T=t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()};function lo(){var ve,Ce;let t=(0,so.c)(51),e=va(),{openModal:n,closeModal:o}=we(),{toggleApplication:s}=yt(),{selectedPanel:r}=xt(),[i]=ht(_e),l=me(vt),d=oo(),[c]=St(),{updateCellConfig:p,undoDeleteCell:u,clearAllCellOutputs:h,addSetupCellIfDoesntExist:f,collapseAllCells:x,expandAllCells:k}=Me(),y=it(),b=ja(),w=ao(e),g=R(nt),z=R(_t),v=R(Nt),{exportAsIPYNB:M,exportAsMarkdown:W,readCode:_,saveCellConfig:se,updateCellOutputs:P}=U(),I=Wa(),le=me(kt),ie=me(zt),{selectedLayout:Y}=Le(),{setLayoutView:re}=Te(),F=ot(),V=((ve=c.sharing)==null?void 0:ve.html)??!0,K=((Ce=c.sharing)==null?void 0:Ce.wasm)??!0,ge=!ue(),de=Y==="slides",rt=zo,dt=Co,G;t[0]!==e||t[1]!==I||t[2]!==P?(G=async m=>{let{preset:C,title:$}=m;if(!e){ne();return}await De($,async he=>{await Ge({takeScreenshots:()=>I({progress:he}),updateCellOutputs:P}),await eo({filename:e,preset:C,downloadPDF:Kt})})},t[0]=e,t[1]=I,t[2]=P,t[3]=G):G=t[3];let E=G,J;t[4]===E?J=t[5]:(J=async()=>{if(ge){await E({preset:"document",title:"Downloading Document PDF..."});return}let m=new Event("export-beforeprint"),C=new Event("export-afterprint");window.dispatchEvent(m),setTimeout(vo,0),setTimeout(()=>window.dispatchEvent(C),0)},t[4]=E,t[5]=J);let X=J,Q;t[6]!==M||t[7]!==e||t[8]!==I||t[9]!==P?(Q=async()=>{if(!e){ne();return}await De("Downloading IPYNB...",async m=>{await Ge({takeScreenshots:()=>I({progress:m}),updateCellOutputs:P});let C=await M({download:!1});be(new Blob([C],{type:"application/x-ipynb+json"}),ye.toIPYNB(document.title))})},t[6]=M,t[7]=e,t[8]=I,t[9]=P,t[10]=Q):Q=t[10];let ce=Q,Z;t[11]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,a.jsx)(Vt,{size:14,strokeWidth:1.5}),t[11]=Z):Z=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 L;t[13]===e?L=t[14]:(L=async()=>{if(!e){ne();return}await $e({filename:e,includeCode:!0})},t[13]=e,t[14]=L);let te;return t[15]!==f||t[16]!==ie||t[17]!==h||t[18]!==o||t[19]!==x||t[20]!==w||t[21]!==E||t[22]!==k||t[23]!==W||t[24]!==e||t[25]!==X||t[26]!==ce||t[27]!==le||t[28]!==d||t[29]!==de||t[30]!==l||t[31]!==n||t[32]!==_||t[33]!==y||t[34]!==b||t[35]!==se||t[36]!==Y||t[37]!==r||t[38]!==g||t[39]!==v||t[40]!==re||t[41]!==z||t[42]!==V||t[43]!==K||t[44]!==L||t[45]!==s||t[46]!==F||t[47]!==u||t[48]!==p||t[49]!==i.mode?(te=[{icon:Z,label:"Download",handle:T,dropdown:[{icon:ee,label:"Download as HTML",handle:L},{icon:(0,a.jsx)(Ee,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!e){ne();return}await $e({filename:e,includeCode:!1})}},{icon:(0,a.jsx)(za,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let m=await W({download:!1});be(new Blob([m],{type:"text/plain"}),ye.toMarkdown(document.title))}},{icon:(0,a.jsx)(Ia,{size:14,strokeWidth:1.5}),label:"Download as ipynb",handle:ce},{icon:(0,a.jsx)(Zt,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let m=await _();be(new Blob([m.contents],{type:"text/plain"}),ye.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(pa,{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: ",Ca("global.hideCode",!1)]}),handle:go},de?{divider:!0,icon:(0,a.jsx)(ae,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:T,dropdown:[{icon:(0,a.jsx)(ae,{size:14,strokeWidth:1.5}),label:"Document Layout",handle:X},{icon:(0,a.jsx)(ae,{size:14,strokeWidth:1.5}),label:"Slides Layout",rightElement:dt(!0),hidden:!ge,handle:async()=>{await E({preset:"slides",title:"Downloading Slides PDF..."})}}]}:{divider:!0,icon:(0,a.jsx)(ae,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:X}]},{icon:(0,a.jsx)(ya,{size:14,strokeWidth:1.5}),label:"Pair with an agent",handle:async()=>{n((0,a.jsx)(Oa,{onClose:o}))}},{icon:(0,a.jsx)(La,{size:14,strokeWidth:1.5}),label:"Share",handle:T,hidden:!V&&!K,dropdown:[{icon:(0,a.jsx)(la,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!V,handle:async()=>{n((0,a.jsx)(Ya,{onClose:o}))}},{icon:(0,a.jsx)(ua,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!K,handle:async()=>{await B(Ve({code:(await _()).contents})),D({title:"Copied",description:"Link copied to clipboard."})}},{icon:(0,a.jsx)(Ke,{size:14,strokeWidth:1.5}),label:"Create molab notebook",handle:async()=>{let m=Ve({code:(await _()).contents,baseUrl:`${S.molab}/new`});window.open(m,"_blank")}}]},{icon:(0,a.jsx)(Ea,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:T,dropdown:ft.flatMap(m=>{let{type:C,Icon:$,hidden:he,additionalKeywords:ct}=m;return he?[]:{label:Ie.startCase(C),rightElement:rt(r===C),icon:(0,a.jsx)($,{size:14,strokeWidth:1.5}),handle:()=>s(C),additionalKeywords:ct}})},{icon:(0,a.jsx)(et,{size:14,strokeWidth:1.5}),label:"Present as",handle:T,dropdown:[{icon:i.mode==="present"?(0,a.jsx)(ba,{size:14,strokeWidth:1.5}):(0,a.jsx)(oa,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{F()}},...Je.map((m,C)=>{let $=st(m);return{divider:C===0,label:lt(m),icon:(0,a.jsx)($,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:Y===m&&(0,a.jsx)(ke,{size:14})}),handle:()=>{re(m),i.mode==="edit"&&F()}}})]},{icon:(0,a.jsx)(Da,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!e||ue(),handle:w},{icon:(0,a.jsx)(Xe,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!e,handle:async()=>{await B((await _()).contents),D({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(aa,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!le||l,handle:async()=>{let m=Wt(We());await se({configs:Ne.fromEntries(m.map(jo))});for(let C of m)p({cellId:C,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(Ze,{size:14,strokeWidth:1.5}),label:"Add setup cell",handle:()=>{f({})}},{icon:(0,a.jsx)(wt,{size:14,strokeWidth:1.5}),label:"Add database connection",handle:()=>{n((0,a.jsx)(He,{onClose:o}))}},{icon:(0,a.jsx)(ca,{size:14,strokeWidth:1.5}),label:"Add remote storage",handle:()=>{n((0,a.jsx)(He,{defaultTab:"storage",onClose:o}))}},{icon:(0,a.jsx)(tt,{size:14,strokeWidth:1.5}),label:"Undo cell deletion",hidden:!ie||l,handle:()=>{u()}},{icon:(0,a.jsx)(Ta,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:y,additionalKeywords:["reset","reload","restart"]},{icon:(0,a.jsx)(Sa,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{b()}},{icon:(0,a.jsx)(gt,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{h()}},{icon:(0,a.jsx)(na,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",handle:d,redundant:!0},{icon:(0,a.jsx)(Na,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:x,redundant:!0},{icon:(0,a.jsx)(_a,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:k,redundant:!0},{divider:!0,icon:(0,a.jsx)(Qe,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>g(wo)},{icon:(0,a.jsx)(Aa,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>v(ko)},{icon:(0,a.jsx)(xa,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>z(bo),redundant:!0,additionalKeywords:["preferences","options","configuration"]},{icon:(0,a.jsx)(ta,{size:14,strokeWidth:1.5}),label:"Resources",handle:T,dropdown:[{icon:(0,a.jsx)(Mt,{size:14,strokeWidth:1.5}),label:"Documentation",handle:yo},{icon:(0,a.jsx)(sa,{size:14,strokeWidth:1.5}),label:"GitHub",handle:xo},{icon:(0,a.jsx)(ia,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:fo},{icon:(0,a.jsx)(da,{size:14,strokeWidth:1.5}),label:"YouTube",handle:uo},{icon:(0,a.jsx)(jt,{size:14,strokeWidth:1.5}),label:"Changelog",handle:po}]},{divider:!0,icon:(0,a.jsx)(ha,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:mo},{icon:(0,a.jsx)(Ke,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:ho}].filter(co).map(io),t[15]=f,t[16]=ie,t[17]=h,t[18]=o,t[19]=x,t[20]=w,t[21]=E,t[22]=k,t[23]=W,t[24]=e,t[25]=X,t[26]=ce,t[27]=le,t[28]=d,t[29]=de,t[30]=l,t[31]=n,t[32]=_,t[33]=y,t[34]=b,t[35]=se,t[36]=Y,t[37]=r,t[38]=g,t[39]=v,t[40]=re,t[41]=z,t[42]=V,t[43]=K,t[44]=L,t[45]=s,t[46]=F,t[47]=u,t[48]=p,t[49]=i.mode,t[50]=te):te=t[50],te}function io(t){return t.dropdown?{...t,dropdown:t.dropdown.filter(ro)}:t}function ro(t){return!t.hidden}function co(t){return!t.hidden}function ho(){let t=wa();window.open(t,"_blank")}function mo(){let t=document.baseURI.split("?")[0];window.open(t,"_self")}function po(){window.open(S.releasesPage,"_blank")}function uo(){window.open(S.youtube,"_blank")}function fo(){window.open(S.discordLink,"_blank")}function xo(){window.open(S.githubPage,"_blank")}function yo(){window.open(S.docsPage,"_blank")}function bo(t){return!t}function ko(t){return!t}function wo(t){return!t}function jo(t){return[t,{disabled:!1}]}async function go(){let t=document.getElementById("App");t&&await Gt({element:t,filename:document.title,prepare:Jt})}function vo(){return window.print()}function Co(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 zo(t){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:t&&(0,a.jsx)(ke,{size:14})})}function ne(){D({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{ot as a,Qe as c,nt as i,Xe as l,it as n,tt as o,Xa as r,Ze as s,lo as t};
|
|
1
|
+
import{s as ze}from"./chunk-LvLJmgfZ.js";import{d as R,l as ht,p as mt,u as me}from"./useEvent-D91BmmQi.js";import{t as pt}from"./react-Bj1aDYRI.js";import{An as ut,Br as ft,Di as pe,Dn as xt,E as Me,En as yt,Tn as bt,Yt as kt,_ as wt,br as jt,fr as gt,h as We,hr as vt,lt as _e,ot as Ct,st as zt,t as Mt,ur as Wt}from"./cells-A-ljPpuj.js";import{t as N}from"./compiler-runtime-B3qBwwSJ.js";import{n as _t,x as Nt}from"./ai-model-dropdown-By4Ohb0R.js";import{_ as H,d as Ne}from"./useEventListener-BR0C1MaI.js";import{y as St}from"./utils-DIGrmLDO.js";import{n as S,t as Se}from"./constants-DMpttj8Q.js";import{S as ue,h as Dt,n as At,o as Pt,x as It}from"./config-ChCHm539.js";import{n as Lt}from"./switch-DlgpDZMk.js";import{t as Et}from"./jsx-runtime-BqBOg78p.js";import{o as Tt}from"./alert-dialog-BGBdrcqJ.js";import{a as $t,c as fe,o as xe,s as Rt}from"./popover-UExmgBsf.js";import{a as Ht,c as qt,i as Ut,n as Bt,r as Ot,s as Yt,t as Ft}from"./select-5i7URBEn.js";import{bt as Vt}from"./JsonOutput-BVAcY5xS.js";import{c as De,d as ye,n as Kt,o as Gt,r as be,t as Jt}from"./download-Iyng0xCz.js";import{t as Ae}from"./tooltip-Gcwqb_SK.js";import{r as Pe,t as q}from"./button-D9nb17Rw.js";import{i as Xt,r as Qt,t as Ie}from"./strings-md4mFbOQ.js";import{r as U}from"./requests-DIwGYs0l.js";import{t as j}from"./createLucideIcon-D5guW7EU.js";import{A as Le,a as Ee,i as Te,j as Zt,k as ea,u as $e}from"./layout-DDh3d8oW.js";import{t as ke}from"./check-BH35Ndha.js";import{n as ta}from"./maps-C48Oksn0.js";import{r as aa}from"./useCellActionButton-Bjxun3wK.js";import{o as oa}from"./slide-form-CXqvfwGg.js";import{t as Re}from"./copy-Dk_3y0H-.js";import{t as na}from"./eye-off-BT-KOYV5.js";import{t as ae}from"./file-HTLbeC2b.js";import{t as sa}from"./github-raQvpeuZ.js";import{u as la}from"./form-Dr-_EXr8.js";import{n as ia,r as ra,t as da}from"./youtube-3lRHw8NU.js";import{i as ca,n as He}from"./add-connection-dialog-gd2yD9Qo.js";import{n as ha,t as ma}from"./square-Dj2Cf4ne.js";import{t as pa}from"./image-DQHXdEQn.js";import{t as ua}from"./link-CfEtM3Rl.js";import{r as fa}from"./input-DyPS_GiK.js";import{t as xa}from"./settings-DfFe0dWD.js";import{t as ya}from"./sparkles-CZ5WmLPA.js";import{y as ba}from"./textarea-Dd0InTQJ.js";import{t as D}from"./use-toast-BDYuj3zG.js";import{n as qe,t as ka}from"./paths-CXng2XQv.js";import{o as wa}from"./session-nmTRerwF.js";import{n as B}from"./copy-B5qyZn5s.js";import{r as ja}from"./useRunCells-DU1tawR-.js";import{a as Ue,c as Be,i as Oe,n as Ye,r as Fe}from"./dialog-EekxpBBM.js";import{n as we}from"./ImperativeModal-BBqcKmmk.js";import{r as ga,t as Ve}from"./share-BXN2Sd1t.js";import{a as va}from"./cell-link-d38hFEon.js";import{a as Ca}from"./renderShortcut-CkNNAheg.js";import{t as za}from"./icons-BRopQwI3.js";import{n as Ke}from"./marimo-icons-BSB-Z_W3.js";import{t as Ma}from"./links-BHtUMVOq.js";import{r as Wa,t as Ge}from"./hooks-CNPv5U-N.js";import{t as Je}from"./types-z6Sk3JCV.js";var _a=j("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),Na=j("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),Xe=j("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"}]]),Qe=j("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"}]]),Ze=j("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"}]]),Sa=j("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"}]]),Da=j("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"}]]),Aa=j("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]),Pa=j("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"}]]),Ia=j("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"}]]),La=j("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),et=j("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"}]]),Ea=j("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"}]]),Ta=j("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"}]]),tt=j("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"}]]),je=N(),A=ze(pt(),1),a=ze(Et(),1);function $a(){return"uvx marimo@latest"}function Ra(t,e,n){let o=n?" --with-token":"",s=`${$a()} pair prompt --url '${e}'${o}`;switch(t){case"claude":return`claude "$(${s} --claude)"`;case"codex":return`codex "$(${s} --codex)"`;case"opencode":return`opencode "$(${s} --opencode)"`;default:Qt(t)}}function Ha(t){return t.length<=4?"****":`${"*".repeat(Math.min(t.length-4,8))}${t.slice(-4)}`}var qa="npx skills add marimo-team/marimo-pair";function Ua(){let t=(0,je.c)(2),[e,n]=(0,A.useState)(null),o,s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{fetch(At("/auth/token").href,{headers:Lt.headers()}).then(Ba).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,A.useEffect)(o,s),e}function Ba(t){return t.ok?t.json():null}const Oa=t=>{let e=(0,je.c)(32),{onClose:n}=t,[o,s]=(0,A.useState)("claude"),r=Pt(),i=Ua(),l=!!i,d;e[0]!==o||e[1]!==l||e[2]!==r.httpURL?(d=Ra(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)(Be,{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)(Ue,{children:[p,(0,a.jsxs)(Fe,{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)(O,{command:qa})]}),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=_=>s(_),e[8]=x):x=e[8];let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=(0,a.jsxs)(Rt,{className:"w-full",children:[(0,a.jsx)(fe,{value:"claude",className:"flex-1",children:"Claude"}),(0,a.jsx)(fe,{value:"codex",className:"flex-1",children:"Codex"}),(0,a.jsx)(fe,{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)(xe,{value:"claude",className:"mt-3",children:(0,a.jsx)(O,{command:c})}),e[10]=c,e[11]=y);let b;e[12]===c?b=e[13]:(b=(0,a.jsx)(xe,{value:"codex",className:"mt-3",children:(0,a.jsx)(O,{command:c})}),e[12]=c,e[13]=b);let w;e[14]===c?w=e[15]:(w=(0,a.jsx)(xe,{value:"opencode",className:"mt-3",children:(0,a.jsx)(O,{command:c})}),e[14]=c,e[15]=w);let g;e[16]!==o||e[17]!==w||e[18]!==y||e[19]!==b?(g=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[f,(0,a.jsxs)($t,{value:o,onValueChange:x,children:[k,y,b,w]})]}),e[16]=o,e[17]=w,e[18]=y,e[19]=b,e[20]=g):g=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)(O,{command:i,display:Ha(i)})]}),e[21]=i,e[22]=l,e[23]=z):z=e[23];let v;e[24]!==g||e[25]!==z?(v=(0,a.jsxs)("div",{className:"flex flex-col gap-4 py-2",children:[h,g,z]}),e[24]=g,e[25]=z,e[26]=v):v=e[26];let M;e[27]===n?M=e[28]:(M=(0,a.jsx)(Oe,{children:(0,a.jsx)(q,{variant:"secondary",onClick:n,children:"Close"})}),e[27]=n,e[28]=M);let W;return e[29]!==v||e[30]!==M?(W=(0,a.jsxs)(Ye,{className:"sm:max-w-lg",children:[u,v,M]}),e[29]=v,e[30]=M,e[31]=W):W=e[31],W};var O=t=>{let e=(0,je.c)(15),{command:n,display:o}=t,[s,r]=(0,A.useState)(!1),i;e[0]===n?i=e[1]:(i=Pe.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)(ke,{size:14,strokeWidth:1.5}):(0,a.jsx)(Re,{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},at=N(),oe="https://static.marimo.app";const Ya=t=>{let e=(0,at.c)(25),{onClose:n}=t,[o,s]=(0,A.useState)(""),{exportAsHTML:r}=U(),i=`${o}-${Math.random().toString(36).slice(2,6)}`,l=`${oe}/static/${i}`,d;e[0]!==r||e[1]!==n||e[2]!==i?(d=async g=>{g.preventDefault(),n();let z=await r({download:!1,includeCode:!0,files:ea.INSTANCE.filenames()}),v=D({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${oe}/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)(Be,{children:"Share static notebook"}),e[4]=c):c=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsxs)(Ue,{children:[c,(0,a.jsxs)(Fe,{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:oe,target:"_blank",children:oe}),"."]})]}),e[5]=p):p=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=g=>{s(g.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)(fa,{"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)(Fa,{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)(Oe,{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 Fa=t=>{let e=(0,at.c)(8),[n,o]=A.useState(!1),s;e[0]===t.text?s=e[1]:(s=Pe.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)(Re,{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},Va=N();function Ka(){let t=document.getElementsByClassName(Se.outputArea);for(let e of t){let n=e.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=pe.findElement(e);if(!o){H.warn("Could not find HTMLCellId for visible output area",e);continue}return{cellId:pe.parse(o.id)}}}return H.warn("No visible output area found for scroll anchor"),null}function Ga(t){if(!t){H.warn("No scroll anchor provided to restore scroll position");return}let e=document.getElementById(pe.create(t.cellId));if(!e){H.warn("Could not find cell element to restore scroll position",t.cellId);return}if(!e.querySelector(`.${Se.outputArea}`)){H.warn("Could not find output area to restore scroll position",t.cellId);return}e.scrollIntoView({block:"start",behavior:"auto"})}function ot(){let t=(0,Va.c)(2),e=R(_e),n;return t[0]===e?n=t[1]:(n=()=>{let o=Ka();e(s=>({mode:zt(s.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ga(o)})})},t[0]=e,t[1]=n),n}const nt=mt(!1);var Ja=N();const Xa=()=>{let t=(0,Ja.c)(7),{selectedLayout:e}=Ee(),{setLayoutView:n}=Te();if(ue()&&!ut("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)(Yt,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(qt,{placeholder:"Select a view"})}),t[2]=s):s=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(Bt,{children:(0,a.jsxs)(Ot,{children:[(0,a.jsx)(Ht,{children:"View as"}),Je.map(Za)]})}),t[3]=r):r=t[3];let i;return t[4]!==e||t[5]!==o?(i=(0,a.jsxs)(Ft,{"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 Qa(t){return(0,a.jsx)(st(t),{className:"h-4 w-4"})}function st(t){switch(t){case"vertical":return Pa;case"grid":return ra;case"slides":return et;default:return Xt(t),ma}}function lt(t){return Ie.startCase(t)}function Za(t){return(0,a.jsx)(Ut,{value:t,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[Qa(t),(0,a.jsx)("span",{children:lt(t)})]})},t)}async function eo(t){let{filename:e,preset:n,downloadPDF:o}=t;await o({filename:e,webpdf:!1,preset:n,includeInputs:!0,rasterServer:"static"})}var to=N();function ao(t){let e=(0,to.c)(5),{openPrompt:n,closeModal:o}=we(),{sendCopy:s}=U(),r;return e[0]!==o||e[1]!==n||e[2]!==s||e[3]!==t?(r=()=>{if(!t)return null;let i=ka.guessDeliminator(t);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${qe.basename(t)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:l=>{let d=i.join(qe.dirname(t),l);s({source:t,destination:d}).then(()=>{o(),D({title:"Notebook copied",description:"A copy of the notebook has been created."}),Ma(d)})}})},e[0]=o,e[1]=n,e[2]=s,e[3]=t,e[4]=r):r=e[4],r}const oo=()=>{let{updateCellConfig:t}=Me(),{saveCellConfig:e}=U();return(0,A.useCallback)(async()=>{let n=new kt,o=We(),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=Ne.entries(r);if(i.length!==0){await e({configs:r});for(let[l,d]of i)t({cellId:l,config:d})}},[t])};var no=N();function it(){let t=(0,no.c)(4),{openConfirm:e}=we(),n=R(Dt),{sendRestart:o}=U(),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)(Tt,{onClick:async()=>{n({state:It.CLOSING}),await o(),ga()},"aria-label":"Confirm Restart",children:"Restart"})})},t[0]=e,t[1]=o,t[2]=n,t[3]=s):s=t[3],s}var so=N(),T=t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()};function lo(){var ve,Ce;let t=(0,so.c)(51),e=va(),{openModal:n,closeModal:o}=we(),{toggleApplication:s}=bt(),{selectedPanel:r}=yt(),[i]=ht(_e),l=me(Ct),d=oo(),[c]=St(),{updateCellConfig:p,undoDeleteCell:u,clearAllCellOutputs:h,addSetupCellIfDoesntExist:f,collapseAllCells:x,expandAllCells:k}=Me(),y=it(),b=ja(),w=ao(e),g=R(nt),z=R(_t),v=R(Nt),{exportAsIPYNB:M,exportAsMarkdown:W,readCode:_,saveCellConfig:se,updateCellOutputs:P}=U(),I=Wa(),le=me(wt),ie=me(Mt),{selectedLayout:Y}=Ee(),{setLayoutView:re}=Te(),F=ot(),V=((ve=c.sharing)==null?void 0:ve.html)??!0,K=((Ce=c.sharing)==null?void 0:Ce.wasm)??!0,ge=!ue(),de=Y==="slides",rt=zo,dt=Co,G;t[0]!==e||t[1]!==I||t[2]!==P?(G=async m=>{let{preset:C,title:$}=m;if(!e){ne();return}await De($,async he=>{await Ge({takeScreenshots:()=>I({progress:he}),updateCellOutputs:P}),await eo({filename:e,preset:C,downloadPDF:Kt})})},t[0]=e,t[1]=I,t[2]=P,t[3]=G):G=t[3];let L=G,J;t[4]===L?J=t[5]:(J=async()=>{if(ge){await L({preset:"document",title:"Downloading Document PDF..."});return}let m=new Event("export-beforeprint"),C=new Event("export-afterprint");window.dispatchEvent(m),setTimeout(vo,0),setTimeout(()=>window.dispatchEvent(C),0)},t[4]=L,t[5]=J);let X=J,Q;t[6]!==M||t[7]!==e||t[8]!==I||t[9]!==P?(Q=async()=>{if(!e){ne();return}await De("Downloading IPYNB...",async m=>{await Ge({takeScreenshots:()=>I({progress:m}),updateCellOutputs:P});let C=await M({download:!1});be(new Blob([C],{type:"application/x-ipynb+json"}),ye.toIPYNB(document.title))})},t[6]=M,t[7]=e,t[8]=I,t[9]=P,t[10]=Q):Q=t[10];let ce=Q,Z;t[11]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,a.jsx)(Vt,{size:14,strokeWidth:1.5}),t[11]=Z):Z=t[11];let ee;t[12]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,a.jsx)(Le,{size:14,strokeWidth:1.5}),t[12]=ee):ee=t[12];let E;t[13]===e?E=t[14]:(E=async()=>{if(!e){ne();return}await $e({filename:e,includeCode:!0})},t[13]=e,t[14]=E);let te;return t[15]!==f||t[16]!==ie||t[17]!==h||t[18]!==o||t[19]!==x||t[20]!==w||t[21]!==L||t[22]!==k||t[23]!==W||t[24]!==e||t[25]!==X||t[26]!==ce||t[27]!==le||t[28]!==d||t[29]!==de||t[30]!==l||t[31]!==n||t[32]!==_||t[33]!==y||t[34]!==b||t[35]!==se||t[36]!==Y||t[37]!==r||t[38]!==g||t[39]!==v||t[40]!==re||t[41]!==z||t[42]!==V||t[43]!==K||t[44]!==E||t[45]!==s||t[46]!==F||t[47]!==u||t[48]!==p||t[49]!==i.mode?(te=[{icon:Z,label:"Download",handle:T,dropdown:[{icon:ee,label:"Download as HTML",handle:E},{icon:(0,a.jsx)(Le,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!e){ne();return}await $e({filename:e,includeCode:!1})}},{icon:(0,a.jsx)(za,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let m=await W({download:!1});be(new Blob([m],{type:"text/plain"}),ye.toMarkdown(document.title))}},{icon:(0,a.jsx)(Ia,{size:14,strokeWidth:1.5}),label:"Download as ipynb",handle:ce},{icon:(0,a.jsx)(Zt,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let m=await _();be(new Blob([m.contents],{type:"text/plain"}),ye.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(pa,{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: ",Ca("global.hideCode",!1)]}),handle:go},de?{divider:!0,icon:(0,a.jsx)(ae,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:T,dropdown:[{icon:(0,a.jsx)(ae,{size:14,strokeWidth:1.5}),label:"Document Layout",handle:X},{icon:(0,a.jsx)(ae,{size:14,strokeWidth:1.5}),label:"Slides Layout",rightElement:dt(!0),hidden:!ge,handle:async()=>{await L({preset:"slides",title:"Downloading Slides PDF..."})}}]}:{divider:!0,icon:(0,a.jsx)(ae,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:X}]},{icon:(0,a.jsx)(ya,{size:14,strokeWidth:1.5}),label:"Pair with an agent",handle:async()=>{n((0,a.jsx)(Oa,{onClose:o}))}},{icon:(0,a.jsx)(Ea,{size:14,strokeWidth:1.5}),label:"Share",handle:T,hidden:!V&&!K,dropdown:[{icon:(0,a.jsx)(la,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!V,handle:async()=>{n((0,a.jsx)(Ya,{onClose:o}))}},{icon:(0,a.jsx)(ua,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!K,handle:async()=>{await B(Ve({code:(await _()).contents})),D({title:"Copied",description:"Link copied to clipboard."})}},{icon:(0,a.jsx)(Ke,{size:14,strokeWidth:1.5}),label:"Create molab notebook",handle:async()=>{let m=Ve({code:(await _()).contents,baseUrl:`${S.molab}/new`});window.open(m,"_blank")}}]},{icon:(0,a.jsx)(La,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:T,dropdown:xt.flatMap(m=>{let{type:C,Icon:$,hidden:he,additionalKeywords:ct}=m;return he?[]:{label:Ie.startCase(C),rightElement:rt(r===C),icon:(0,a.jsx)($,{size:14,strokeWidth:1.5}),handle:()=>s(C),additionalKeywords:ct}})},{icon:(0,a.jsx)(et,{size:14,strokeWidth:1.5}),label:"Present as",handle:T,dropdown:[{icon:i.mode==="present"?(0,a.jsx)(ba,{size:14,strokeWidth:1.5}):(0,a.jsx)(oa,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{F()}},...Je.map((m,C)=>{let $=st(m);return{divider:C===0,label:lt(m),icon:(0,a.jsx)($,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:Y===m&&(0,a.jsx)(ke,{size:14})}),handle:()=>{re(m),i.mode==="edit"&&F()}}})]},{icon:(0,a.jsx)(Da,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!e||ue(),handle:w},{icon:(0,a.jsx)(Xe,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!e,handle:async()=>{await B((await _()).contents),D({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(aa,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!le||l,handle:async()=>{let m=ft(We());await se({configs:Ne.fromEntries(m.map(jo))});for(let C of m)p({cellId:C,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(Ze,{size:14,strokeWidth:1.5}),label:"Add setup cell",handle:()=>{f({})}},{icon:(0,a.jsx)(gt,{size:14,strokeWidth:1.5}),label:"Add database connection",handle:()=>{n((0,a.jsx)(He,{onClose:o}))}},{icon:(0,a.jsx)(ca,{size:14,strokeWidth:1.5}),label:"Add remote storage",handle:()=>{n((0,a.jsx)(He,{defaultTab:"storage",onClose:o}))}},{icon:(0,a.jsx)(tt,{size:14,strokeWidth:1.5}),label:"Undo cell deletion",hidden:!ie||l,handle:()=>{u()}},{icon:(0,a.jsx)(Ta,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:y,additionalKeywords:["reset","reload","restart"]},{icon:(0,a.jsx)(Sa,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{b()}},{icon:(0,a.jsx)(vt,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{h()}},{icon:(0,a.jsx)(na,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",handle:d,redundant:!0},{icon:(0,a.jsx)(Na,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:x,redundant:!0},{icon:(0,a.jsx)(_a,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:k,redundant:!0},{divider:!0,icon:(0,a.jsx)(Qe,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>g(wo)},{icon:(0,a.jsx)(Aa,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>v(ko)},{icon:(0,a.jsx)(xa,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>z(bo),redundant:!0,additionalKeywords:["preferences","options","configuration"]},{icon:(0,a.jsx)(ta,{size:14,strokeWidth:1.5}),label:"Resources",handle:T,dropdown:[{icon:(0,a.jsx)(jt,{size:14,strokeWidth:1.5}),label:"Documentation",handle:yo},{icon:(0,a.jsx)(sa,{size:14,strokeWidth:1.5}),label:"GitHub",handle:xo},{icon:(0,a.jsx)(ia,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:fo},{icon:(0,a.jsx)(da,{size:14,strokeWidth:1.5}),label:"YouTube",handle:uo},{icon:(0,a.jsx)(Wt,{size:14,strokeWidth:1.5}),label:"Changelog",handle:po}]},{divider:!0,icon:(0,a.jsx)(ha,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:mo},{icon:(0,a.jsx)(Ke,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:ho}].filter(co).map(io),t[15]=f,t[16]=ie,t[17]=h,t[18]=o,t[19]=x,t[20]=w,t[21]=L,t[22]=k,t[23]=W,t[24]=e,t[25]=X,t[26]=ce,t[27]=le,t[28]=d,t[29]=de,t[30]=l,t[31]=n,t[32]=_,t[33]=y,t[34]=b,t[35]=se,t[36]=Y,t[37]=r,t[38]=g,t[39]=v,t[40]=re,t[41]=z,t[42]=V,t[43]=K,t[44]=E,t[45]=s,t[46]=F,t[47]=u,t[48]=p,t[49]=i.mode,t[50]=te):te=t[50],te}function io(t){return t.dropdown?{...t,dropdown:t.dropdown.filter(ro)}:t}function ro(t){return!t.hidden}function co(t){return!t.hidden}function ho(){let t=wa();window.open(t,"_blank")}function mo(){let t=document.baseURI.split("?")[0];window.open(t,"_self")}function po(){window.open(S.releasesPage,"_blank")}function uo(){window.open(S.youtube,"_blank")}function fo(){window.open(S.discordLink,"_blank")}function xo(){window.open(S.githubPage,"_blank")}function yo(){window.open(S.docsPage,"_blank")}function bo(t){return!t}function ko(t){return!t}function wo(t){return!t}function jo(t){return[t,{disabled:!1}]}async function go(){let t=document.getElementById("App");t&&await Gt({element:t,filename:document.title,prepare:Jt})}function vo(){return window.print()}function Co(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 zo(t){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:t&&(0,a.jsx)(ke,{size:14})})}function ne(){D({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{ot as a,Qe as c,nt as i,Xe as l,it as n,tt as o,Xa as r,Ze as s,lo as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as g,n as i,p as k}from"./useEvent-D91BmmQi.js";import{
|
|
1
|
+
import{d as g,n as i,p as k}from"./useEvent-D91BmmQi.js";import{E as v,Gr as w,Rn as y,Vr as F,bt as V,h as d}from"./cells-A-ljPpuj.js";import{t as _}from"./compiler-runtime-B3qBwwSJ.js";import{_ as x}from"./useEventListener-BR0C1MaI.js";import{o as D}from"./dist-HlsDto3K.js";import{r as E}from"./requests-DIwGYs0l.js";var u=_();const I=k(!1);function G(){let r=(0,u.c)(2),n=f(),t;return r[0]===n?t=r[1]:(t=()=>n(w(d())),r[0]=n,r[1]=t),i(t)}function H(r){let n=(0,u.c)(3),t=f(),o;return n[0]!==r||n[1]!==t?(o=()=>{r!==void 0&&t([r])},n[0]=r,n[1]=t,n[2]=o):o=n[2],i(o)}function j(){let r=(0,u.c)(2),n=f(),t;return r[0]===n?t=r[1]:(t=()=>n(F(d())),r[0]=n,r[1]=t),i(t)}function f(){let r=(0,u.c)(4),{prepareForRun:n}=v(),{sendRun:t}=E(),o=g(I),e;return r[0]!==n||r[1]!==t||r[2]!==o?(e=async s=>{if(s.length===0)return;let c=d();return o(!0),b({cellIds:s,sendRun:t,prepareForRun:n,notebook:c})},r[0]=n,r[1]=t,r[2]=o,r[3]=e):e=r[3],i(e)}async function b({cellIds:r,sendRun:n,prepareForRun:t,notebook:o}){var m,R,h;if(r.length===0)return;let{cellHandles:e,cellData:s}=o,c=[];for(let a of r){let l=(R=(m=e[a])==null?void 0:m.current)==null?void 0:R.editorView,p;l?(y(l)!=="markdown"&&D(l),p=V(l)):p=((h=s[a])==null?void 0:h.code)||"",c.push(p),t({cellId:a})}await n({cellIds:r,codes:c}).catch(a=>{x.error(a)})}export{f as a,H as i,b as n,G as o,j as r,I as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as m}from"./chunk-LvLJmgfZ.js";import{n as p}from"./useEvent-D91BmmQi.js";import{E as d,bt as f,f as u}from"./cells-
|
|
1
|
+
import{s as m}from"./chunk-LvLJmgfZ.js";import{n as p}from"./useEvent-D91BmmQi.js";import{E as d,bt as f,f as u}from"./cells-A-ljPpuj.js";import{t as c}from"./compiler-runtime-B3qBwwSJ.js";import{t as C}from"./jsx-runtime-BqBOg78p.js";import{t as b}from"./use-toast-BDYuj3zG.js";import{r as h}from"./useDeleteCell-C2Stbb6Q.js";var v=c(),x=m(C(),1);function j(){let t=(0,v.c)(3),{splitCell:i,undoSplitCell:r}=d(),o;return t[0]!==i||t[1]!==r?(o=s=>{let l=u(s.cellId);if(!l)return;let a=f(l);i(s);let{dismiss:n}=b({title:"Cell split",action:(0,x.jsx)(h,{"data-testid":"undo-split-button",size:"sm",variant:"outline",onClick:()=>{r({...s,snapshot:a}),e()},children:"Undo"})}),e=n},t[0]=i,t[1]=r,t[2]=o):o=t[2],p(o)}export{j 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-z8Uh9i5Z.js"></script>
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-D2MJg03u.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="./assets/chunk-LvLJmgfZ.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="./assets/react-Bj1aDYRI.js">
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
<link rel="modulepreload" crossorigin href="./assets/debounce-DhnxH9Rh.js">
|
|
134
134
|
<link rel="modulepreload" crossorigin href="./assets/database-zap-BUVn5HoR.js">
|
|
135
135
|
<link rel="modulepreload" crossorigin href="./assets/main-B0OX4z33.js">
|
|
136
|
-
<link rel="modulepreload" crossorigin href="./assets/cells-
|
|
136
|
+
<link rel="modulepreload" crossorigin href="./assets/cells-A-ljPpuj.js">
|
|
137
137
|
<link rel="modulepreload" crossorigin href="./assets/ErrorBoundary-DzYV_VeY.js">
|
|
138
138
|
<link rel="modulepreload" crossorigin href="./assets/kbd-CGShmG7L.js">
|
|
139
139
|
<link rel="modulepreload" crossorigin href="./assets/useInstallPackage-afgh7PwB.js">
|
|
@@ -147,33 +147,33 @@
|
|
|
147
147
|
<link rel="modulepreload" crossorigin href="./assets/usePress-CtfZXGno.js">
|
|
148
148
|
<link rel="modulepreload" crossorigin href="./assets/input-DyPS_GiK.js">
|
|
149
149
|
<link rel="modulepreload" crossorigin href="./assets/ImperativeModal-BBqcKmmk.js">
|
|
150
|
-
<link rel="modulepreload" crossorigin href="./assets/cell-link-
|
|
150
|
+
<link rel="modulepreload" crossorigin href="./assets/cell-link-d38hFEon.js">
|
|
151
151
|
<link rel="modulepreload" crossorigin href="./assets/multi-map-rafH3cg3.js">
|
|
152
152
|
<link rel="modulepreload" crossorigin href="./assets/alert-cDholnQq.js">
|
|
153
153
|
<link rel="modulepreload" crossorigin href="./assets/chevron-right-CG5QYXYk.js">
|
|
154
154
|
<link rel="modulepreload" crossorigin href="./assets/dropdown-menu-D1A3cFC8.js">
|
|
155
155
|
<link rel="modulepreload" crossorigin href="./assets/links-C-rLiK3d.js">
|
|
156
|
-
<link rel="modulepreload" crossorigin href="./assets/useRunCells-
|
|
156
|
+
<link rel="modulepreload" crossorigin href="./assets/useRunCells-DU1tawR-.js">
|
|
157
157
|
<link rel="modulepreload" crossorigin href="./assets/copy-B5qyZn5s.js">
|
|
158
158
|
<link rel="modulepreload" crossorigin href="./assets/copy-Dk_3y0H-.js">
|
|
159
159
|
<link rel="modulepreload" crossorigin href="./assets/copy-icon-C67c9EwB.js">
|
|
160
|
-
<link rel="modulepreload" crossorigin href="./assets/RenderHTML-
|
|
161
|
-
<link rel="modulepreload" crossorigin href="./assets/datasource-
|
|
162
|
-
<link rel="modulepreload" crossorigin href="./assets/state-
|
|
160
|
+
<link rel="modulepreload" crossorigin href="./assets/RenderHTML-DR6lqJGS.js">
|
|
161
|
+
<link rel="modulepreload" crossorigin href="./assets/datasource-BCnGIjqn.js">
|
|
162
|
+
<link rel="modulepreload" crossorigin href="./assets/state-Bsz477is.js">
|
|
163
163
|
<link rel="modulepreload" crossorigin href="./assets/sparkles-CZ5WmLPA.js">
|
|
164
|
-
<link rel="modulepreload" crossorigin href="./assets/MarimoErrorOutput-
|
|
164
|
+
<link rel="modulepreload" crossorigin href="./assets/MarimoErrorOutput-B9_RO5eX.js">
|
|
165
165
|
<link rel="modulepreload" crossorigin href="./assets/spinner-Bhir8k53.js">
|
|
166
|
-
<link rel="modulepreload" crossorigin href="./assets/html-to-image-
|
|
167
|
-
<link rel="modulepreload" crossorigin href="./assets/focus-
|
|
166
|
+
<link rel="modulepreload" crossorigin href="./assets/html-to-image-tbPEMBJg.js">
|
|
167
|
+
<link rel="modulepreload" crossorigin href="./assets/focus-Baz7rlo0.js">
|
|
168
168
|
<link rel="modulepreload" crossorigin href="./assets/useAsyncData-dS4Ne6pU.js">
|
|
169
169
|
<link rel="modulepreload" crossorigin href="./assets/LazyAnyLanguageCodeMirror-0gZO1asr.js">
|
|
170
170
|
<link rel="modulepreload" crossorigin href="./assets/micromark-factory-space-WzovnJik.js">
|
|
171
171
|
<link rel="modulepreload" crossorigin href="./assets/chunk-5FQGJX7Z-B4RvNAGm.js">
|
|
172
|
-
<link rel="modulepreload" crossorigin href="./assets/markdown-renderer-
|
|
173
|
-
<link rel="modulepreload" crossorigin href="./assets/command-
|
|
172
|
+
<link rel="modulepreload" crossorigin href="./assets/markdown-renderer-CFrgiLqu.js">
|
|
173
|
+
<link rel="modulepreload" crossorigin href="./assets/command-CzIDL1VI.js">
|
|
174
174
|
<link rel="modulepreload" crossorigin href="./assets/popover-UExmgBsf.js">
|
|
175
175
|
<link rel="modulepreload" crossorigin href="./assets/errors-CZb6hI2x.js">
|
|
176
|
-
<link rel="modulepreload" crossorigin href="./assets/download-
|
|
176
|
+
<link rel="modulepreload" crossorigin href="./assets/download-Iyng0xCz.js">
|
|
177
177
|
<link rel="modulepreload" crossorigin href="./assets/table-23NNA1s9.js">
|
|
178
178
|
<link rel="modulepreload" crossorigin href="./assets/useIframeCapabilities-CryCjoyY.js">
|
|
179
179
|
<link rel="modulepreload" crossorigin href="./assets/error-banner-CTBwdcdk.js">
|
|
@@ -189,28 +189,29 @@
|
|
|
189
189
|
<link rel="modulepreload" crossorigin href="./assets/table-6NxtGaCm.js">
|
|
190
190
|
<link rel="modulepreload" crossorigin href="./assets/ellipsis-pk06Lq82.js">
|
|
191
191
|
<link rel="modulepreload" crossorigin href="./assets/message-circle-CWm2KnSx.js">
|
|
192
|
+
<link rel="modulepreload" crossorigin href="./assets/trash-2-D280Xiwg.js">
|
|
192
193
|
<link rel="modulepreload" crossorigin href="./assets/react-resizable-panels.browser.esm-Bcm5njwd.js">
|
|
193
|
-
<link rel="modulepreload" crossorigin href="./assets/JsonOutput-
|
|
194
|
+
<link rel="modulepreload" crossorigin href="./assets/JsonOutput-BVAcY5xS.js">
|
|
194
195
|
<link rel="modulepreload" crossorigin href="./assets/chart-no-axes-column-nqk474t8.js">
|
|
195
196
|
<link rel="modulepreload" crossorigin href="./assets/square-function-D1dlJvD8.js">
|
|
196
197
|
<link rel="modulepreload" crossorigin href="./assets/spec-Cq8FVoTf.js">
|
|
197
198
|
<link rel="modulepreload" crossorigin href="./assets/ellipsis-vertical-gxgNyR5G.js">
|
|
198
199
|
<link rel="modulepreload" crossorigin href="./assets/refresh-cw-DHwG4Mac.js">
|
|
199
200
|
<link rel="modulepreload" crossorigin href="./assets/tree-actions-oMCx6WNc.js">
|
|
200
|
-
<link rel="modulepreload" crossorigin href="./assets/components-
|
|
201
|
-
<link rel="modulepreload" crossorigin href="./assets/column-preview-
|
|
201
|
+
<link rel="modulepreload" crossorigin href="./assets/components-FepcpFGL.js">
|
|
202
|
+
<link rel="modulepreload" crossorigin href="./assets/column-preview-_5uYiy74.js">
|
|
202
203
|
<link rel="modulepreload" crossorigin href="./assets/icons-BRopQwI3.js">
|
|
203
|
-
<link rel="modulepreload" crossorigin href="./assets/floating-outline-
|
|
204
|
-
<link rel="modulepreload" crossorigin href="./assets/useAddCell-
|
|
204
|
+
<link rel="modulepreload" crossorigin href="./assets/floating-outline-CSNGDMAm.js">
|
|
205
|
+
<link rel="modulepreload" crossorigin href="./assets/useAddCell-De9xD63_.js">
|
|
205
206
|
<link rel="modulepreload" crossorigin href="./assets/objectWithoutPropertiesLoose-smPWkHxB.js">
|
|
206
207
|
<link rel="modulepreload" crossorigin href="./assets/esm-G1JMtvxe.js">
|
|
207
208
|
<link rel="modulepreload" crossorigin href="./assets/eye-off-BT-KOYV5.js">
|
|
208
209
|
<link rel="modulepreload" crossorigin href="./assets/plus-BgB18UzY.js">
|
|
209
|
-
<link rel="modulepreload" crossorigin href="./assets/readonly-python-code-
|
|
210
|
+
<link rel="modulepreload" crossorigin href="./assets/readonly-python-code-B0nrQE3U.js">
|
|
210
211
|
<link rel="modulepreload" crossorigin href="./assets/file-headphone-B3fuktN0.js">
|
|
211
212
|
<link rel="modulepreload" crossorigin href="./assets/file-HTLbeC2b.js">
|
|
212
213
|
<link rel="modulepreload" crossorigin href="./assets/image-DQHXdEQn.js">
|
|
213
|
-
<link rel="modulepreload" crossorigin href="./assets/file-icons-
|
|
214
|
+
<link rel="modulepreload" crossorigin href="./assets/file-icons-DTNZv05h.js">
|
|
214
215
|
<link rel="modulepreload" crossorigin href="./assets/switch-DlgpDZMk.js">
|
|
215
216
|
<link rel="modulepreload" crossorigin href="./assets/events-Qeh-bHlj.js">
|
|
216
217
|
<link rel="modulepreload" crossorigin href="./assets/globals-xVhZei_S.js">
|
|
@@ -219,13 +220,12 @@
|
|
|
219
220
|
<link rel="modulepreload" crossorigin href="./assets/memoize-Tp7rARFe.js">
|
|
220
221
|
<link rel="modulepreload" crossorigin href="./assets/get-C-qh_et5.js">
|
|
221
222
|
<link rel="modulepreload" crossorigin href="./assets/_baseSet-CxV9N1bc.js">
|
|
222
|
-
<link rel="modulepreload" crossorigin href="./assets/state-
|
|
223
|
+
<link rel="modulepreload" crossorigin href="./assets/state-LyvUXW6A.js">
|
|
223
224
|
<link rel="modulepreload" crossorigin href="./assets/label-DTR8T0AE.js">
|
|
224
|
-
<link rel="modulepreload" crossorigin href="./assets/textarea-
|
|
225
|
+
<link rel="modulepreload" crossorigin href="./assets/textarea-Dd0InTQJ.js">
|
|
225
226
|
<link rel="modulepreload" crossorigin href="./assets/radio-group-BtBoRbGH.js">
|
|
226
227
|
<link rel="modulepreload" crossorigin href="./assets/refresh-ccw-C-n2VFP5.js">
|
|
227
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
228
|
-
<link rel="modulepreload" crossorigin href="./assets/form-CPDlIjdV.js">
|
|
228
|
+
<link rel="modulepreload" crossorigin href="./assets/form-Dr-_EXr8.js">
|
|
229
229
|
<link rel="modulepreload" crossorigin href="./assets/renderShortcut-CkNNAheg.js">
|
|
230
230
|
<link rel="modulepreload" crossorigin href="./assets/field-B8kJgr2A.js">
|
|
231
231
|
<link rel="modulepreload" crossorigin href="./assets/RSPContexts-BeHIgT4C.js">
|
|
@@ -246,7 +246,7 @@
|
|
|
246
246
|
<link rel="stylesheet" crossorigin href="./assets/cells-jmgGt1lS.css">
|
|
247
247
|
<link rel="stylesheet" crossorigin href="./assets/markdown-renderer-DdDKmWlR.css">
|
|
248
248
|
<link rel="stylesheet" crossorigin href="./assets/JsonOutput-B7vuddcd.css">
|
|
249
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
249
|
+
<link rel="stylesheet" crossorigin href="./assets/index-DH5UUBE4.css">
|
|
250
250
|
</head>
|
|
251
251
|
<body>
|
|
252
252
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marimo-team/frontend",
|
|
3
|
-
"version": "0.23.4-
|
|
3
|
+
"version": "0.23.4-dev5",
|
|
4
4
|
"main": "dist/main.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
"@types/react": "^19.2.10",
|
|
210
210
|
"@types/react-dom": "^19.2.3",
|
|
211
211
|
"@types/timestring": "^6.0.5",
|
|
212
|
-
"@vitejs/plugin-react": "^5.
|
|
212
|
+
"@vitejs/plugin-react": "^5.2.0",
|
|
213
213
|
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
|
214
214
|
"blob-polyfill": "^7.0.20220408",
|
|
215
215
|
"cross-env": "^7.0.3",
|
|
@@ -226,11 +226,11 @@
|
|
|
226
226
|
"storybook": "^10.2.12",
|
|
227
227
|
"stylelint": "^16.26.1",
|
|
228
228
|
"stylelint-config-standard": "^36.0.1",
|
|
229
|
-
"tailwindcss": "^4.2.
|
|
229
|
+
"tailwindcss": "^4.2.2",
|
|
230
230
|
"vega-typings": "^2.1.0",
|
|
231
231
|
"vite": "npm:rolldown-vite@7.3.1",
|
|
232
232
|
"vite-plugin-top-level-await": "^1.6.0",
|
|
233
|
-
"vite-plugin-wasm": "^3.
|
|
233
|
+
"vite-plugin-wasm": "^3.6.0",
|
|
234
234
|
"vitest": "^3.2.4"
|
|
235
235
|
}
|
|
236
236
|
}
|
|
@@ -22,7 +22,10 @@ import React, { memo } from "react";
|
|
|
22
22
|
import { useLocale } from "react-aria";
|
|
23
23
|
|
|
24
24
|
import { Table } from "@/components/ui/table";
|
|
25
|
-
import type {
|
|
25
|
+
import type {
|
|
26
|
+
CalculateTopKRows,
|
|
27
|
+
GetRowIds,
|
|
28
|
+
} from "@/plugins/impl/DataTablePlugin";
|
|
26
29
|
import { cn } from "@/utils/cn";
|
|
27
30
|
import {
|
|
28
31
|
PANEL_TYPES,
|
|
@@ -89,6 +92,7 @@ interface DataTableProps<TData> extends Partial<ExportActionProps> {
|
|
|
89
92
|
showFilters?: boolean;
|
|
90
93
|
filters?: ColumnFiltersState;
|
|
91
94
|
onFiltersChange?: OnChangeFn<ColumnFiltersState>;
|
|
95
|
+
calculateTopKRows?: CalculateTopKRows;
|
|
92
96
|
reloading?: boolean;
|
|
93
97
|
// Columns
|
|
94
98
|
freezeColumnsLeft?: string[];
|
|
@@ -139,6 +143,7 @@ const DataTableInternal = <TData,>({
|
|
|
139
143
|
showFilters = false,
|
|
140
144
|
filters,
|
|
141
145
|
onFiltersChange,
|
|
146
|
+
calculateTopKRows,
|
|
142
147
|
reloading,
|
|
143
148
|
freezeColumnsLeft,
|
|
144
149
|
freezeColumnsRight,
|
|
@@ -282,7 +287,11 @@ const DataTableInternal = <TData,>({
|
|
|
282
287
|
|
|
283
288
|
return (
|
|
284
289
|
<div className={cn(wrapperClassName, "flex flex-col space-y-1")}>
|
|
285
|
-
<FilterPills
|
|
290
|
+
<FilterPills
|
|
291
|
+
filters={filters}
|
|
292
|
+
table={table}
|
|
293
|
+
calculateTopKRows={calculateTopKRows}
|
|
294
|
+
/>
|
|
286
295
|
<CellSelectionProvider>
|
|
287
296
|
<div
|
|
288
297
|
part="table-wrapper"
|