@marimo-team/frontend 0.23.16-dev35 → 0.23.16-dev36
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-CmojVYzm.js → CellStatus-Dua-Q5qp.js} +1 -1
- package/dist/assets/{JsonOutput-BwwRpByA.js → JsonOutput-BjTsPSAI.js} +12 -12
- package/dist/assets/{MarimoErrorOutput-BWte8vjk.js → MarimoErrorOutput-BSyqD6Hg.js} +8 -8
- package/dist/assets/{RenderHTML-DRltV71H.js → RenderHTML-DG0Fm01X.js} +1 -1
- package/dist/assets/{RunButton-DIegd2mN.js → RunButton-DFs1N-c9.js} +1 -1
- package/dist/assets/{add-cell-with-ai-BBFD-M9V.js → add-cell-with-ai-C6Kxfu_D.js} +17 -17
- package/dist/assets/{add-connection-dialog-CECJ8507.js → add-connection-dialog-DAqIrB2O.js} +1 -1
- package/dist/assets/{agent-panel-YaS0WXP1.js → agent-panel-GtkUm7qc.js} +5 -5
- package/dist/assets/ai-model-dropdown-UEHQ_Tx0.js +5 -0
- package/dist/assets/{app-config-button-BW-w01aF.js → app-config-button-BmBlROBo.js} +1 -1
- package/dist/assets/{cell-editor-EV-1IccQ.js → cell-editor-DKzBZjFa.js} +10 -10
- package/dist/assets/{cell-link-C5gpAn3R.js → cell-link-CRHwRCw2.js} +1 -1
- package/dist/assets/cells-C-9Qa_6_.js +235 -0
- package/dist/assets/{chat-display-8BbC5B-D.js → chat-display-CqB9H1kF.js} +1 -1
- package/dist/assets/{chat-panel-CMOZp5xW.js → chat-panel-C3wpuHtk.js} +2 -2
- package/dist/assets/{chat-ui-DWhJ2Ozy.js → chat-ui-DF2nZlBy.js} +1 -1
- package/dist/assets/{column-preview-DeXESYpM.js → column-preview-Bp4QHPE2.js} +1 -1
- package/dist/assets/{command-palette-Dx6AkiPd.js → command-palette-DaJdKaQz.js} +1 -1
- package/dist/assets/{common-XVELED_O.js → common-DeheUlBO.js} +1 -1
- package/dist/assets/{components-BLHpmhXx.js → components-Dk-7Tn_8.js} +1 -1
- package/dist/assets/{datasource-CTqa8bf-.js → datasource-D-oZZRFN.js} +2 -2
- package/dist/assets/{dependency-graph-panel-C4Nzcddp.js → dependency-graph-panel-JK4qjNID.js} +3 -3
- package/dist/assets/{documentation-panel-Bym4G7IS.js → documentation-panel-C_TxLeX8.js} +1 -1
- package/dist/assets/{download-HKgqJX4l.js → download-QhwPYWYu.js} +2 -2
- package/dist/assets/{edit-page-Jtp6Qqjl.js → edit-page-C8yy6X_7.js} +6 -6
- package/dist/assets/{error-entries-CxyvaxEM.js → error-entries-B8hPG61B.js} +2 -2
- package/dist/assets/{error-panel-CfSy7uUr.js → error-panel-BOBOm9wN.js} +1 -1
- package/dist/assets/{file-explorer-panel-Dd5Xn2TK.js → file-explorer-panel-CQOFpuIG.js} +4 -4
- package/dist/assets/{file-icons-CSjJ3JC6.js → file-icons-DoBeqg86.js} +1 -1
- package/dist/assets/{file-name-input-CrKtrXMl.js → file-name-input-B8d-QPzY.js} +1 -1
- package/dist/assets/{floating-outline-ByQ8vvif.js → floating-outline-ylNOBTvA.js} +1 -1
- package/dist/assets/{focus-CVONl-Dy.js → focus-CJzSyxLL.js} +1 -1
- package/dist/assets/{form-Ca3yd_Od.js → form-C2_p_FeE.js} +2 -2
- package/dist/assets/{home-page-FpAawj9s.js → home-page-D_6eKuGc.js} +2 -2
- package/dist/assets/{html-to-image-C-4ysbGe.js → html-to-image-DfyxinVN.js} +2 -2
- package/dist/assets/{index-CiJmYQBT.js → index-D-wPCBTa.js} +7 -7
- package/dist/assets/{index-xs-zSSrX.css → index-D6Dp_PFj.css} +1 -1
- package/dist/assets/{layout-Dtql_o_T.js → layout-BWV4OadK.js} +5 -5
- package/dist/assets/logs-panel-DpMLUEOB.js +1 -0
- package/dist/assets/{markdown-renderer-dABDqZDw.js → markdown-renderer-DtzxgcfB.js} +2 -2
- package/dist/assets/{name-cell-input-Y4knmEIU.js → name-cell-input-SbknxDvi.js} +1 -1
- package/dist/assets/{outline-panel-CQ_KWLip.js → outline-panel-kV7ARoXE.js} +1 -1
- package/dist/assets/{packages-panel-Ijt7d51P.js → packages-panel-B3biBPQ1.js} +1 -1
- package/dist/assets/{panels-DfU1Oikj.js → panels-BsrSW0bC.js} +2 -2
- package/dist/assets/process-output-DCAOrKEU.js +1 -0
- package/dist/assets/{radio-group-22eWJ9fv.js → radio-group-BWAhJtjV.js} +1 -1
- package/dist/assets/readonly-code-display-D_rgEfAm.js +1 -0
- package/dist/assets/{readonly-python-code-n_TrLmsR.js → readonly-python-code-B5ABqdqK.js} +1 -1
- package/dist/assets/{reveal-component-CCLTV1q6.js → reveal-component-CrcdxGl_.js} +2 -2
- package/dist/assets/{run-page-DbezK7Qs.js → run-page-DFHpKr66.js} +1 -1
- package/dist/assets/{scratchpad-panel-C2wAEv5n.js → scratchpad-panel-CfqnZK3C.js} +1 -1
- package/dist/assets/{session-panel-BZGNcZmp.js → session-panel-DWS61Z1x.js} +1 -1
- package/dist/assets/{skeleton-BzlKcq21.js → skeleton-PJnQ2_IA.js} +1 -1
- package/dist/assets/{snippets-panel-DNaNtkR0.js → snippets-panel-D1eovB0O.js} +1 -1
- package/dist/assets/{state-jCdh8Dcx.js → state-BjouLTuw.js} +1 -1
- package/dist/assets/{state-DFPAfLw7.js → state-Bu-aMpIc.js} +3 -3
- package/dist/assets/{textarea-DuEtSOCl.js → textarea-DhPaQ0wx.js} +1 -1
- package/dist/assets/{tracing-ttUd3J7U.js → tracing-B2ux60rQ.js} +1 -1
- package/dist/assets/{tracing-panel-rVAa3En0.js → tracing-panel-CF8H5wRv.js} +2 -2
- package/dist/assets/{tree-actions-UCr1tMHw.js → tree-actions-CPSDN4eE.js} +1 -1
- package/dist/assets/useCellActionButton-k2OXllYI.js +1 -0
- package/dist/assets/{useDeleteCell-PrgejW8A.js → useDeleteCell-C3nmnuxK.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-5jc-_-hy.js → useDependencyPanelTab-D14Lna3z.js} +1 -1
- package/dist/assets/{useNotebookActions-4vw_NiRs.js → useNotebookActions-CHM0Ardg.js} +3 -3
- package/dist/assets/useRunCells-C4qD32Ix.js +1 -0
- package/dist/assets/useSplitCell-BEebdldD.js +1 -0
- package/dist/index.html +23 -23
- package/package.json +2 -3
- package/src/components/editor/chrome/panels/__tests__/logs-panel.test.tsx +25 -0
- package/src/components/editor/chrome/panels/logs-panel.tsx +12 -2
- package/src/core/cells/__tests__/cells.test.ts +12 -2
- package/src/core/cells/__tests__/logs.test.ts +5 -5
- package/src/core/cells/cells.ts +13 -0
- package/src/core/cells/document-changes.ts +1 -0
- package/src/core/cells/logs.ts +14 -4
- package/src/core/codemirror/copilot/__tests__/language-server.test.ts +396 -100
- package/src/core/codemirror/copilot/__tests__/transport.test.ts +128 -540
- package/src/core/codemirror/copilot/language-server.ts +182 -70
- package/src/core/codemirror/copilot/transport.ts +15 -207
- package/src/core/codemirror/copilot/types.ts +9 -2
- package/src/core/codemirror/language/languages/python.ts +23 -11
- package/src/core/codemirror/lsp/__tests__/federated-lsp.test.ts +161 -0
- package/src/core/codemirror/lsp/__tests__/log-messages.test.ts +53 -0
- package/src/core/codemirror/lsp/__tests__/normalize-markdown-math.test.ts +25 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +598 -156
- package/src/core/codemirror/lsp/__tests__/transports.test.ts +112 -0
- package/src/core/codemirror/lsp/federated-lsp.ts +76 -23
- package/src/core/codemirror/lsp/log-messages.ts +37 -0
- package/src/core/codemirror/lsp/normalize-markdown-math.ts +8 -4
- package/src/core/codemirror/lsp/notebook-lsp.ts +220 -56
- package/src/core/codemirror/lsp/transports.ts +8 -1
- package/src/core/codemirror/lsp/types.ts +68 -8
- package/src/core/codemirror/lsp/utils.ts +14 -0
- package/src/core/lsp/__tests__/transport.test.ts +509 -337
- package/src/core/lsp/transport.ts +304 -132
- package/src/css/app/codemirror.css +16 -2
- package/src/stories/log-viewer.stories.tsx +12 -6
- package/dist/assets/ai-model-dropdown-BpVBUZnz.js +0 -5
- package/dist/assets/cells-6yd8nOAu.js +0 -231
- package/dist/assets/logs-panel-5u1wUBn1.js +0 -1
- package/dist/assets/process-output-Dd11YI04.js +0 -1
- package/dist/assets/readonly-code-display-BjK-TEri.js +0 -1
- package/dist/assets/useCellActionButton-CJknR0XY.js +0 -1
- package/dist/assets/useRunCells-DHsd7HGL.js +0 -1
- package/dist/assets/useSplitCell-MZpER0Bh.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as x}from"./chunk-LvLJmgfZ.js";import"./useEvent-D91BmmQi.js";import{t as f}from"./react-Bj1aDYRI.js";import{E as h,M as g,q as u,vr as j}from"./cells-6yd8nOAu.js";import"./react-dom-CSu739Rf.js";import{t as v}from"./compiler-runtime-B3qBwwSJ.js";import{t as m}from"./cn-DYvqRARy.js";import{t as y}from"./jsx-runtime-Blw4afVn.js";import"./fullscreen-CTDqNQr6.js";import"./dist-12S8I4CH.js";import"./cjs-D5tzp-Y6.js";import"./main-BNL5rxQw.js";import"./useNonce-CbdaHKzX.js";import"./dist-DcwTQG1A.js";import"./dist-DnjsPBRJ.js";import"./dist-BJZAIIze.js";import"./dist-aRc_dRed.js";import"./dist-CPjTeT8p.js";import"./session-BmukRjSi.js";import"./purify.es-CWmnYhGI.js";import{t as N}from"./cell-link-C5gpAn3R.js";import{t as b}from"./empty-state-CqJvEFRk.js";import{t as w}from"./clear-button-DQtvx6eq.js";var n=v();f();var s=x(y(),1),_=()=>{let r=(0,n.c)(9),e=g(),{clearLogs:i}=h();if(e.length===0){let o;r[0]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsx)("code",{className:"border rounded px-1",children:"stdout"}),r[0]=o):o=r[0];let l;return r[1]===Symbol.for("react.memo_cache_sentinel")?(l=(0,s.jsx)(b,{title:"No logs",description:(0,s.jsxs)("span",{children:[o," and"," ",(0,s.jsx)("code",{className:"border rounded px-1",children:"stderr"})," logs will appear here."]}),icon:(0,s.jsx)(j,{})}),r[1]=l):l=r[1],l}let a;r[2]===i?a=r[3]:(a=(0,s.jsx)("div",{className:"flex flex-row justify-start px-2 py-1",children:(0,s.jsx)(w,{dataTestId:"clear-logs-button",onClick:i})}),r[2]=i,r[3]=a);let t;r[4]===e?t=r[5]:(t=(0,s.jsx)(d,{logs:e,className:"min-w-[300px]"}),r[4]=e,r[5]=t);let c;return r[6]!==a||r[7]!==t?(c=(0,s.jsxs)("div",{className:"flex flex-col h-full overflow-auto",children:[a,t]}),r[6]=a,r[7]=t,r[8]=c):c=r[8],c};const d=r=>{let e=(0,n.c)(10),{logs:i,className:a}=r,t;e[0]===a?t=e[1]:(t=m("flex flex-col",a),e[0]=a,e[1]=t);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c={whiteSpace:"pre-wrap"},e[2]=c):c=e[2];let o;e[3]===i?o=e[4]:(o=i.map(I),e[3]=i,e[4]=o);let l;e[5]===o?l=e[6]:(l=(0,s.jsx)("pre",{className:"grid text-xs font-mono gap-1 whitespace-break-spaces font-semibold align-left",children:(0,s.jsx)("div",{className:"grid grid-cols-[30px_1fr]",style:c,children:o})}),e[5]=o,e[6]=l);let p;return e[7]!==t||e[8]!==l?(p=(0,s.jsx)("div",{className:t,children:l}),e[7]=t,e[8]=l,e[9]=p):p=e[9],p};function k(r){let e=u(r.timestamp),i=S[r.level],a=r.level.toUpperCase();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"shrink-0 text-(--gray-10) dark:text-(--gray-11)",children:["[",e,"]"]}),(0,s.jsx)("span",{className:m("shrink-0",i),children:a}),(0,s.jsxs)("span",{className:"shrink-0 text-(--gray-10)",children:["(",(0,s.jsx)(N,{cellId:r.cellId}),")"]}),r.message]})}var S={stdout:"text-(--grass-9)",stderr:"text-(--red-9)"};function I(r,e){return(0,s.jsxs)("div",{className:"contents group",children:[(0,s.jsx)("span",{className:m("opacity-70 group-hover:bg-(--gray-3) group-hover:opacity-100","text-right col-span-1 py-1 pr-1"),children:e+1}),(0,s.jsx)("span",{className:m("opacity-70 group-hover:bg-(--gray-3) group-hover:opacity-100","px-2 flex gap-x-1.5 py-1 flex-wrap"),children:k(r)})]},e)}export{d as LogViewer,_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{nt as i,tt as m}from"./cells-6yd8nOAu.js";import{t as a}from"./strings--BknHX9C.js";function n(t){return t.mimetype.startsWith("application/vnd.marimo")||t.mimetype==="text/html"?i(a.asString(t.data)):m(a.asString(t.data))}export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Xn as r,Zn as t}from"./cells-6yd8nOAu.js";var e=new t,a=new r;function d(o){let n=o.trim();return n?e.isSupported(n)?{code:e.transformIn(n).code,language:"markdown"}:a.isSupported(n)?{code:a.transformIn(n).code,language:"sql"}:{code:o,language:"python"}:{code:o,language:"python"}}export{d as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as b}from"./useEvent-D91BmmQi.js";import{Bn as de,Cr as ne,E as se,Zi as re,_ as ce,br as he,bt as V,er as me,xr as pe,yr as ke,zn as fe}from"./cells-6yd8nOAu.js";import{t as ue}from"./compiler-runtime-B3qBwwSJ.js";import{c as ye,i as be,s as xe}from"./utils-BWBBpCkT.js";import{O as je}from"./config-B-Q7J_6d.js";import{t as ve}from"./jsx-runtime-Blw4afVn.js";import{t as Ce}from"./label-CqjrpwRC.js";import{a as ge,g as we}from"./download-HKgqJX4l.js";import{r as ze}from"./requests-9-v2bhoi.js";import{t as f}from"./createLucideIcon-w-Qo9n0R.js";import{n as F,r as Q}from"./x-C-Eq0ag8.js";import{t as Ie}from"./chevron-right-BS_NcSch.js";import{t as G}from"./circle-plus-BluydVNx.js";import{t as We}from"./code-xml-aSiY8T7C.js";import{t as Me}from"./eye-off-BOZA7gbn.js";import{t as _e}from"./image-5XI2VU-q.js";import{t as Se}from"./link-CHdiBDr5.js";import{i as Ae,t as Ee}from"./useDeleteCell-PrgejW8A.js";import{t as Te}from"./sparkles-DUCpRFlS.js";import{t as Be}from"./trash-2-72W0TZ3L.js";import{t as De}from"./use-toast-BwJoaaDM.js";import{n as Ne}from"./copy-Bxb1_Gtw.js";import{i as Re}from"./useRunCells-DHsd7HGL.js";import{a as He,c as Le,n as Oe}from"./dialog-BCVepWLJ.js";import{n as qe}from"./ImperativeModal-fY-ZfT0b.js";import{n as Pe}from"./state-jCdh8Dcx.js";import{r as K}from"./html-to-image-C-4ysbGe.js";import{n as Ue,t as Ve}from"./icons-CIPE8AIY.js";import{n as Z}from"./name-cell-input-Y4knmEIU.js";import{t as $}from"./multi-icon-nrKPWjDU.js";import{t as Fe}from"./useSplitCell-MZpER0Bh.js";var J=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),X=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),Y=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 Ge(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ke(a){var c;let e=(c=a.match(/scrollTo=([^&]+)/))==null?void 0:c[1];return e?decodeURIComponent(e.split("&")[0]):null}function te(a){return a==="_"?!1:!!(a&&a.trim().length>0)}var Ze=ue(),l=ae(ve(),1);function $e(a){let e=(0,Ze.c)(47),{cell:c,closePopover:u}=a,{createNewCell:m,updateCellConfig:s,updateCellName:x,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:S,markUntouched:A}=se(),E=Fe(),T=Re(c==null?void 0:c.cellId),B=!b(ce),D=Ee(),{openModal:j}=qe(),N=ie(Pe),R=b(be),v=b(ye),oe=b(je),y=b(xe),{saveCellConfig:r}=ze();if(!c||oe){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],e[0]=t):t=e[0],t}let{cellId:o,config:i,getEditorView:n,name:h,hasOutput:C,hasConsoleOutput:H,status:L}=c,g;e[1]!==o||e[2]!==i.disabled||e[3]!==r||e[4]!==s?(g=async()=>{let t={disabled:!i.disabled};await r({configs:{[o]:t}}),s({cellId:o,config:t})},e[1]=o,e[2]=i.disabled,e[3]=r,e[4]=s,e[5]=g):g=e[5];let O=g,w;e[6]!==o||e[7]!==i.hide_code||e[8]!==n||e[9]!==r||e[10]!==s?(w=async()=>{let t={hide_code:!i.hide_code};await r({configs:{[o]:t}}),s({cellId:o,config:t});let U=n();U&&(t.hide_code?U.contentDOM.blur():U.focus())},e[6]=o,e[7]=i.hide_code,e[8]=n,e[9]=r,e[10]=s,e[11]=w):w=e[11];let q=w,d=o===re,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]===T?k=e[14]:(k=()=>T(),e[13]=T,e[14]=k);let I;return e[15]!==_||e[16]!==R||e[17]!==y||e[18]!==v||e[19]!==B||e[20]!==o||e[21]!==S||e[22]!==u||e[23]!==i.disabled||e[24]!==i.hide_code||e[25]!==m||e[26]!==D||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]!==N||e[39]!==E||e[40]!==P||e[41]!==k||e[42]!==O||e[43]!==q||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)(Te,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!R,handle:()=>{N(t=>(t==null?void 0:t.cellId)===o?null:{cellId:o})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(Y,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>E({cellId:o})},{icon:(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let t=n();t&&me({[o]:t})}},{icon:i.hide_code?(0,l.jsx)(ke,{size:13,strokeWidth:1.5}):(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:i.hide_code?"Show code":"Hide code",handle:q,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:O,hidden:d}],[{icon:(0,l.jsx)(Ve,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let t=n();t&&(K({autoInstantiate:v,createNewCell:m}),V(t,{language:"markdown",keepCodeAsIs:!1}),i.hide_code||(await r({configs:{[o]:{hide_code:!0}}}),s({cellId:o,config:{hide_code:!0}}),A({cellId:o})))},hidden:d},fe(n())==="sql"?{icon:(0,l.jsx)(Ue,{}),label:"View as Python",hotkey:"cell.viewAsSQL",handle:()=>{let t=n();t&&de(t,"python",{force:!0})},hidden:d}:{icon:(0,l.jsx)(he,{size:13,strokeWidth:1.5}),label:"Convert to SQL",hotkey:"cell.viewAsSQL",handle:()=>{let t=n();t&&(K({autoInstantiate:v,createNewCell:m}),V(t,{language:"sql",keepCodeAsIs:!1}))},hidden:d}],[{icon:(0,l.jsxs)($,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(F,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>m({cellId:o,before:!0}),hidden:d,redundant:!0},{icon:(0,l.jsxs)($,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(Q,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>m({cellId:o,before:!1}),redundant:!0},{icon:(0,l.jsx)(F,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>p({cellId:o,before:!0}),hidden:d},{icon:(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>p({cellId:o,before:!1}),hidden:d},{icon:(0,l.jsx)(we,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>p({cellId:o,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:o,direction:"right"}),hidden:y!=="columns"||d},{icon:(0,l.jsx)(X,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(J,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(pe,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:o}),hidden:y!=="columns"||d}],[{icon:(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!C,handle:()=>ge(o,"result")},{icon:(0,l.jsx)(ne,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(C||H),handle:()=>{S({cellId:o})}}],[{icon:(0,l.jsx)(Qe,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:el,handleHeadless:()=>{j((0,l.jsxs)(Oe,{children:[(0,l.jsx)(He,{children:(0,l.jsx)(Le,{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)(Z,{placeholder:"cell name",value:h,onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),j(null))},onChange:t=>x({cellId:o,name:t})})]})]}))},rightElement:(0,l.jsx)(Z,{placeholder:"cell name",value:h,onChange:t=>x({cellId:o,name:t}),onEnterKey:()=>u==null?void 0:u()}),hidden:d},{icon:(0,l.jsx)(Se,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!te(h),tooltip:te(h)?void 0:"Only named cells can be linked to",handle:async()=>{await Ne(Ge(h)),De({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!B,variant:"danger",icon:(0,l.jsx)(Be,{size:13,strokeWidth:1.5}),handle:()=>{D({cellId:o})}}]].map(Xe).filter(Je),e[15]=_,e[16]=R,e[17]=y,e[18]=v,e[19]=B,e[20]=o,e[21]=S,e[22]=u,e[23]=i.disabled,e[24]=i.hide_code,e[25]=m,e[26]=D,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]=N,e[39]=E,e[40]=P,e[41]=k,e[42]=O,e[43]=q,e[44]=s,e[45]=x,e[46]=I):I=e[46],I}function Je(a){return a.length>0}function Xe(a){return a.filter(Ye)}function Ye(a){return!a.hidden}function el(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{Y as a,ee as i,Ke as n,X as o,le as r,J as s,$e as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as k,n as i,p as v}from"./useEvent-D91BmmQi.js";import{E as w,m as d,pt as y,ri as F,ui as b,zn as x}from"./cells-6yd8nOAu.js";import{t as z}from"./compiler-runtime-B3qBwwSJ.js";import{g as D}from"./useEventListener-C0195JsF.js";import{o as E}from"./dist-DYEuVkEX.js";import{r as H}from"./requests-9-v2bhoi.js";var u=z();const g=v(!1);function V(){let r=(0,u.c)(2),n=p(),t;return r[0]===n?t=r[1]:(t=()=>n(b(d())),r[0]=n,r[1]=t),i(t)}function _(r){let n=(0,u.c)(3),t=p(),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=p(),t;return r[0]===n?t=r[1]:(t=()=>n(F(d())),r[0]=n,r[1]=t),i(t)}function p(){let r=(0,u.c)(4),{prepareForRun:n}=w(),{sendRun:t}=H(),o=k(g),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),I({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 I({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,f;l?(x(l)!=="markdown"&&E(l),f=y(l)):f=((h=s[a])==null?void 0:h.code)||"",c.push(f),t({cellId:a})}await n({cellIds:r,codes:c}).catch(a=>{D.error(a)})}export{p as a,_ as i,I as n,V as o,j as r,g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as m}from"./chunk-LvLJmgfZ.js";import{n as p}from"./useEvent-D91BmmQi.js";import{E as d,d as f,pt as u}from"./cells-6yd8nOAu.js";import{t as c}from"./compiler-runtime-B3qBwwSJ.js";import{t as C}from"./jsx-runtime-Blw4afVn.js";import{r as h}from"./useDeleteCell-PrgejW8A.js";import{t as v}from"./use-toast-BwJoaaDM.js";var x=c(),b=m(C(),1);function j(){let t=(0,x.c)(3),{splitCell:i,undoSplitCell:r}=d(),o;return t[0]!==i||t[1]!==r?(o=s=>{let l=f(s.cellId);if(!l)return;let a=u(l);i(s);let{dismiss:n}=v({title:"Cell split",action:(0,b.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};
|