@marimo-team/frontend 0.17.4 → 0.17.6
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-c0SAQ-F-.js → CellStatus-CHA41gSk.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-f8cXX1lE.js → ConnectedDataExplorerComponent-cTGPcGbT.js} +1 -1
- package/dist/assets/{ConsoleOutput-CDSftFlX.js → ConsoleOutput-CcWTsPJI.js} +1 -1
- package/dist/assets/{LazyAnyLanguageCodeMirror-BzY5E2SR.js → LazyAnyLanguageCodeMirror-De4wCXx1.js} +2 -2
- package/dist/assets/{MarimoErrorOutput-BMyX5A6l.js → MarimoErrorOutput-ZIgqDBQe.js} +1 -1
- package/dist/assets/{Output-pZgeySyq.js → Output-BNpy6qAs.js} +1 -1
- package/dist/assets/{RenderHTML-BUSbsjNK.js → RenderHTML-BBVeCFEd.js} +1 -1
- package/dist/assets/{TinyCode-CgC7YtPL.js → TinyCode-CSwZ6pBr.js} +1 -1
- package/dist/assets/{add-cell-with-ai-D5ovEhXx.js → add-cell-with-ai-DF_F9Sqz.js} +1 -1
- package/dist/assets/{add-database-form-p8983nDn.js → add-database-form-C6bWFcDu.js} +1 -1
- package/dist/assets/{add-missing-import-BwGZ98W0.js → add-missing-import-pmcK06GU.js} +1 -1
- package/dist/assets/{agent-panel-B5iI79QW.js → agent-panel-Cy7eGnp2.js} +1 -1
- package/dist/assets/{any-language-editor-CgFodhrt.js → any-language-editor-CtKaNSoA.js} +1 -1
- package/dist/assets/{app-config-button-BFmqvqPu.js → app-config-button-DkPbZ9Gv.js} +1 -1
- package/dist/assets/{cell-actions-Cc2JYtcT.js → cell-actions-BwzVQ6Dx.js} +1 -1
- package/dist/assets/{cell-editor-DJ46IITP.js → cell-editor-HcAVCF81.js} +4 -4
- package/dist/assets/{cell-link-DFNTDaPd.js → cell-link-Bp_0p3CR.js} +1 -1
- package/dist/assets/cells-DV6dfoCq.js +142 -0
- package/dist/assets/{chat-components-BJMCzZRK.js → chat-components-laNRM4nR.js} +2 -2
- package/dist/assets/{chat-panel-DajnoQHz.js → chat-panel-D0ofjONu.js} +1 -1
- package/dist/assets/{client-B0dO9skM.js → client-CHkG9bdV.js} +2 -2
- package/dist/assets/{column-preview-BiiXdwvw.js → column-preview-BavQbx6K.js} +1 -1
- package/dist/assets/{command-palette-DbfvqoOB.js → command-palette-BeIRV-WM.js} +1 -1
- package/dist/assets/{common-U0RDob8X.js → common-C3tRfmeF.js} +1 -1
- package/dist/assets/{datasources-panel-Bo6UM72J.js → datasources-panel-MHkoQPff.js} +1 -1
- package/dist/assets/{dependency-graph-panel-DcOypoYV.js → dependency-graph-panel-qI_Vzr7L.js} +1 -1
- package/dist/assets/dist-Dv7WCK3M.js +2 -0
- package/dist/assets/{documentation-panel-BPa77v-x.js → documentation-panel-BSLe420O.js} +1 -1
- package/dist/assets/{edit-page-CYfYSIzk.js → edit-page-BWiHWYlZ.js} +3 -3
- package/dist/assets/{error-panel-C4Dh4_Gz.js → error-panel-BXZjD7vi.js} +1 -1
- package/dist/assets/{esm-D8ZMWeYP.js → esm-C1NahKuy.js} +1 -1
- package/dist/assets/{file-explorer-panel-BTjjB1ys.js → file-explorer-panel-Dfhel-3W.js} +1 -1
- package/dist/assets/{floating-outline-DwAgRZTh.js → floating-outline-CgxonLQ-.js} +1 -1
- package/dist/assets/{focus-BwMl5m5_.js → focus--Piy3rX5.js} +1 -1
- package/dist/assets/{form-D69llIWP.js → form-Cdn744fY.js} +1 -1
- package/dist/assets/{form-CQCzdh1o.js → form-q5HZfP0M.js} +1 -1
- package/dist/assets/{glide-data-editor-BFKn2tIP.js → glide-data-editor-DyfmOgFY.js} +1 -1
- package/dist/assets/{home-page-F1w05vyJ.js → home-page-CQvcO2-r.js} +1 -1
- package/dist/assets/{index-q8eVuDDk.js → index-vG-gdKWq.js} +7 -7
- package/dist/assets/{kiosk-mode-Dd1ooBaF.js → kiosk-mode-OsMWvXhW.js} +1 -1
- package/dist/assets/{layout-C8ytLSQd.js → layout-BaosNuEp.js} +1 -1
- package/dist/assets/{lazy-tfeVHpGH.js → lazy-ijSQmhmN.js} +2 -2
- package/dist/assets/{logs-panel-C8ChYhO8.js → logs-panel-DzPVobVI.js} +1 -1
- package/dist/assets/{mermaid-D4G-AG2G.js → mermaid-DEUZM6JF.js} +1 -1
- package/dist/assets/{mode-BWw7rz82.js → mode-BK9SOQXS.js} +1 -1
- package/dist/assets/{name-cell-input-F8bM4E5e.js → name-cell-input-VEOAxqMs.js} +1 -1
- package/dist/assets/{outline-panel-QjRV3Zps.js → outline-panel-h_xN2aCi.js} +1 -1
- package/dist/assets/{packages-panel-_yihtFbB.js → packages-panel-MgK5SK20.js} +1 -1
- package/dist/assets/react-vega-CoPJaJAh.js +194 -0
- package/dist/assets/{react-vega-5InfQEZl.js → react-vega-D5EPmHUL.js} +1 -1
- package/dist/assets/{readonly-python-code-gmO6162d.js → readonly-python-code-ChK3PfU6.js} +1 -1
- package/dist/assets/{run-page-BsulC5PQ.js → run-page-BGTVY0j4.js} +1 -1
- package/dist/assets/{scratchpad-panel-A9G8o9jf.js → scratchpad-panel-DZbJOjct.js} +1 -1
- package/dist/assets/{snippets-panel-C6FwSaZz.js → snippets-panel-BkDWOzb7.js} +1 -1
- package/dist/assets/{state-CIEHjRfF.js → state-BHcVA2dC.js} +1 -1
- package/dist/assets/{state-C7T5AXo0.js → state-CjZ41ddG.js} +1 -1
- package/dist/assets/{storage-CmIwledL.js → storage-Q85CaPfH.js} +1 -1
- package/dist/assets/{tracing-Cq1z4XC3.js → tracing-DZ3Q4ew0.js} +1 -1
- package/dist/assets/{tracing-panel-Mt1B8lhs.js → tracing-panel-cWcQ0_7O.js} +2 -2
- package/dist/assets/{types-UoG2cq5J.js → types--mPsPGF4.js} +1 -1
- package/dist/assets/{useAddCell-xX3fIjF2.js → useAddCell-Ig4Te4YX.js} +1 -1
- package/dist/assets/{useCellActionButton-jH-t2BrR.js → useCellActionButton-Dxhr7c1D.js} +1 -1
- package/dist/assets/{useDeleteCell-CJ4WX9R2.js → useDeleteCell-Ba4wqcnv.js} +1 -1
- package/dist/assets/{useNotebookActions-Cf9b-Ef9.js → useNotebookActions-ClgDTwuq.js} +1 -1
- package/dist/assets/{useRunCells-DjmsNJ7r.js → useRunCells-WnlQjiPG.js} +1 -1
- package/dist/assets/{useSplitCell-ueztloAj.js → useSplitCell-BDVxP5U-.js} +1 -1
- package/dist/assets/useTheme-CJkb1R7C.js +1 -0
- package/dist/assets/{utilities.esm-D8HYU14D.js → utilities.esm-SfrtJjbv.js} +1 -1
- package/dist/assets/{variable-panel-DAhAueP9.js → variable-panel-1cBDHa5H.js} +1 -1
- package/dist/assets/{vega-component-B7kKQDi7.js → vega-component-DBpZ-MEj.js} +1 -1
- package/dist/index.html +28 -28
- package/package.json +2 -2
- package/src/components/app-config/data-form.tsx +3 -3
- package/src/core/codemirror/language/__tests__/markdown.test.ts +36 -13
- package/src/core/codemirror/language/__tests__/utils.test.ts +6 -2
- package/src/core/codemirror/language/languages/sql/sql.ts +2 -1
- package/src/plugins/layout/TexPlugin.tsx +33 -5
- package/dist/assets/cells-DNq9ng4B.js +0 -152
- package/dist/assets/dist-CzgFQFBf.js +0 -2
- package/dist/assets/node-sql-parser-B60nzzE3.js +0 -68
- package/dist/assets/react-vega-Kdht4Pfp.js +0 -192
- package/dist/assets/useTheme-DcMAIbRt.js +0 -1
- /package/dist/assets/{esm-DuHka6En.js → esm-D3_a5hg-.js} +0 -0
- /package/dist/assets/{react-plotly-B5BZoChE.js → react-plotly-BedjJ4JE.js} +0 -0
- /package/dist/assets/{wasm-BU5edgJp.js → wasm-86TLpKv7.js} +0 -0
- /package/dist/assets/{web-vitals-DxEe-Gv6.js → web-vitals-DCCm3RCd.js} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{s as m}from"./chunk-DZLz74EQ.js";import{t as l}from"./react-BcIddLXZ.js";import"./react-dom-D6bRRS5R.js";import"./zod-U2NFpcFA.js";import"./compiler-runtime-Cr9loedd.js";import{u}from"./hotkeys-ClCtr3_I.js";import"./useEventListener-D1FLsfmf.js";import{t as d}from"./jsx-runtime-mwDPpfh_.js";import"./cn-DEUt_IsG.js";import"./button-Zjtz1syG.js";import"./dist-o3-gJN-A.js";import"./dist-
|
|
1
|
+
import{s as m}from"./chunk-DZLz74EQ.js";import{t as l}from"./react-BcIddLXZ.js";import"./react-dom-D6bRRS5R.js";import"./zod-U2NFpcFA.js";import"./compiler-runtime-Cr9loedd.js";import{u}from"./hotkeys-ClCtr3_I.js";import"./useEventListener-D1FLsfmf.js";import{t as d}from"./jsx-runtime-mwDPpfh_.js";import"./cn-DEUt_IsG.js";import"./button-Zjtz1syG.js";import"./dist-o3-gJN-A.js";import"./dist-Dv7WCK3M.js";import"./dist-DdXBxU_X.js";import"./dist-ws1ADWL0.js";import"./dist-BOJjflZo.js";import"./dist-w3K5vvwl.js";import"./dist-DXPWGCwf.js";import"./dist-BGbJQ9FV.js";import"./stex-w1KpyykF.js";import"./use-toast-BPMVOfO3.js";import"./dist-dCpey1ug.js";import"./createLucideIcon-CaU6_Jtx.js";import"./check-Dc7YCRim.js";import"./copy-CDDalEhv.js";import"./Combination-DWHMUa0d.js";import"./dist-1ZdxNBaX.js";import"./tooltip-CerBk_un.js";import"./alert-dialog-BZHeDuaE.js";import{n as f}from"./error-banner-rdjPobI5.js";import"./copy-SPzF4B1M.js";import{t as c}from"./copy-icon-Ckew1l1_.js";import"./extends-DhnjMUSs.js";import"./objectWithoutPropertiesLoose-CNyONSoo.js";import"./dist-bbz7Slba.js";import"./dist-Duhp104c.js";import"./dist-CH5tSYom.js";import"./dist-Zii08NWl.js";import"./dist-C27NmZjJ.js";import"./dist-DWvYBldG.js";import"./dist-B309G_89.js";import"./dist-5c-fdIcP.js";import"./dist-COzB_eCZ.js";import"./dist-Z76N9TEr.js";import"./dist-C3eCrV3K.js";import"./dist-3nYEuz31.js";import"./apl-DOdxvsp7.js";import"./asciiarmor-iHsvYBsh.js";import"./asn1-CjQdFpKC.js";import"./brainfuck-DtaPUQOb.js";import"./cobol-B1NZRKFh.js";import"./clike-CEj-3lIu.js";import"./clojure-BoRNIjWi.js";import"./css-BOMeM4Jz.js";import"./cmake-BDPy65SJ.js";import"./coffeescript-C6u-3CUG.js";import"./commonlisp-PnS0RzOo.js";import"./cypher-BNcNWKra.js";import"./python-ChTwa-ru.js";import"./crystal-CmwgoX1x.js";import"./d-BMO4C4Kr.js";import"./diff-pLFk18zx.js";import"./dtd-Cufzm3tN.js";import"./dylan-CohSy5uK.js";import"./ecl-BhEt80nJ.js";import"./eiffel-CKJVLfM7.js";import"./elm-ClkLCCoU.js";import"./erlang-D2TH4-Et.js";import"./simple-mode-CXCwEnyS.js";import"./factor-6NmCZvh-.js";import"./forth-DV7ZwZS0.js";import"./fortran-C9_PuY2l.js";import"./mllike-ZkoLEmrh.js";import"./gas-CGuyKmgF.js";import"./gherkin-BwmPTL6e.js";import"./groovy-DJxiqoVo.js";import"./haskell-DOcPZqkO.js";import"./haxe-BVSsVSdX.js";import"./idl-D5drHePd.js";import"./javascript-rI4fd75W.js";import"./jinja2-BrZGqXAx.js";import"./julia-z0xq3uqV.js";import"./livescript-BbVvVfSY.js";import"./lua-CtEmKXsU.js";import"./mirc-Cyycx3am.js";import"./mathematica-B-SjlQIm.js";import"./modelica-DIZcE54y.js";import"./mumps-Cnu1tNUa.js";import"./mbox-BdnWvTJv.js";import"./nsis-CUebodQn.js";import"./ntriples-2rre165b.js";import"./octave-C7u5CeUZ.js";import"./oz-D5aE2uST.js";import"./pascal-DTApZM3o.js";import"./perl-Ckgh9LJK.js";import"./pig-jAl9a1Kh.js";import"./powershell-C_IKzlOl.js";import"./properties-BdVxDpDJ.js";import"./protobuf-DLu_SUI6.js";import"./pug-fgP-dIQ4.js";import"./puppet-CShRizHW.js";import"./q-D2OTJZH4.js";import"./r-DRqIAgj1.js";import"./rpm-BStFD27m.js";import"./ruby-C37hkPS4.js";import"./sas-CCEIl8BG.js";import"./scheme-B0jflgrk.js";import"./shell-Cq7B0hFW.js";import"./sieve-DS0lS4kt.js";import"./smalltalk-HHM53Uii.js";import"./sparql-BMqtnWzI.js";import"./stylus-Br2gMpMI.js";import"./swift-BJ8qi_zI.js";import"./verilog-MmKxT9bW.js";import"./tcl-D0knbOX7.js";import"./textile-DrRQSuh3.js";import"./toml-C2kDGfZi.js";import"./troff-2dFxqWQa.js";import"./ttcn-Cj4sIofh.js";import"./ttcn-cfg-CBXajWEo.js";import"./turtle-CDdPtp5F.js";import"./webidl-D9f20BkN.js";import"./vb-CtEhAMYU.js";import"./vbscript-B0nzdgzL.js";import"./velocity-DR7TSall.js";import"./vhdl-0jJrpQNA.js";import"./xquery-B0eSGN9q.js";import"./yacas-BS613OH9.js";import"./z80-CJYC52xh.js";import"./mscgen-MISBZbzR.js";import"./dist-BMfw4eeq.js";import{n as g,t as a}from"./esm-DXHMyc8g.js";import{t as v}from"./esm-C1NahKuy.js";var j=m(l(),1),t=m(d(),1);const s={python:"py",javascript:"js",typescript:"ts"};var x=({language:o,showCopyButton:e,extensions:r=[],...p})=>{o=s[o||""]||o;let i=o&&!(o in a);i&&u.warn(`Language ${o} not found in CodeMirror.`);let n=(0,j.useMemo)(()=>o?[g(o),...r].filter(Boolean):r,[o,r]);return(0,t.jsxs)("div",{className:"relative w-full group hover-actions-parent",children:[i&&(0,t.jsx)(f,{className:"mb-1 rounded-sm",error:`Language ${o} not supported.
|
|
2
2
|
|
|
3
3
|
Supported languages are: ${Object.keys(a).join(", ")}`}),e&&!i&&(0,t.jsx)(c,{tooltip:!1,className:"absolute top-2 right-2 p-1 hover-action z-10 text-muted-foreground",value:p.value||"",toastTitle:"Copied to clipboard"}),(0,t.jsx)(v,{...p,extensions:n})]})};export{s as LANGUAGE_MAP,x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as P}from"./chunk-DZLz74EQ.js";import{s as X}from"./jotai-BTnrNcC1.js";import{t as Z}from"./react-BcIddLXZ.js";import{gt as D}from"./cells-DNq9ng4B.js";import{t as I}from"./compiler-runtime-Cr9loedd.js";import{C as Q,S as $,_ as ee}from"./utils-BpjB6B-Y.js";import{g as te}from"./config-e9OVB2bJ.js";import{t as se}from"./jsx-runtime-mwDPpfh_.js";import{t as le}from"./button-Zjtz1syG.js";import{l as R}from"./once-3GsqimLM.js";import{r as U}from"./requests-DD3OWR81.js";import{t as ae}from"./use-toast-BPMVOfO3.js";import{t as oe}from"./createLucideIcon-CaU6_Jtx.js";import{c as ne,d as re,o as ie,r as ce,s as de,t as he}from"./state-C7T5AXo0.js";import{h as me,l as B}from"./select-Di-JjADd.js";import{r as O}from"./input-DuVApvWu.js";import{t as Y}from"./settings-DvMaGwYY.js";import{a as L,c as M,n as A,o as F,p as xe,r as q,s as S,t as pe,u as fe}from"./form-D69llIWP.js";import{t as ue}from"./VisuallyHidden-B9I0t9He.js";import{t as K}from"./tooltip-CerBk_un.js";import{o as je}from"./alert-dialog-BZHeDuaE.js";import{c as ve,l as ge,n as be,t as V}from"./dialog-CzmSXArA.js";import{n as we}from"./useDebounce--Sw2WRQ5.js";import{n as ye}from"./ImperativeModal-ExH1h9et.js";import{t as W}from"./kbd-BfBY_QKr.js";import{i as Ce,r as Ne,t as ke}from"./popover-BoRNi4dY.js";import{t as _e}from"./links-90C38wV6.js";import{t as G}from"./Inputs-aaNuvYOb.js";var Se=oe("power-off",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Te=P(I(),1),s=P(se(),1);const Le=t=>{let e=(0,Te.c)(15),{description:a,disabled:f,tooltip:r}=t,i=f===void 0?!1:f,u=r===void 0?"Shutdown":r,{openConfirm:b,closeModal:l}=ye(),{sendShutdown:o}=U(),w;e[0]===o?w=e[1]:(w=()=>{o(),setTimeout(Me,200)},e[0]=o,e[1]=w);let j=w;if(te())return null;let m=i?"disabled":"red",c;e[2]!==l||e[3]!==a||e[4]!==j||e[5]!==b?(c=h=>{h.stopPropagation(),b({title:"Shutdown",description:a,variant:"destructive",confirmAction:(0,s.jsx)(je,{onClick:()=>{j(),l()},"aria-label":"Confirm Shutdown",children:"Shutdown"})})},e[2]=l,e[3]=a,e[4]=j,e[5]=b,e[6]=c):c=e[6];let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=(0,s.jsx)(me,{strokeWidth:1}),e[7]=n):n=e[7];let d;e[8]!==i||e[9]!==m||e[10]!==c?(d=(0,s.jsx)(G,{"aria-label":"Shutdown","data-testid":"shutdown-button",shape:"circle",size:"small",color:m,className:"h-[27px] w-[27px]",disabled:i,onClick:c,children:n}),e[8]=i,e[9]=m,e[10]=c,e[11]=d):d=e[11];let x;return e[12]!==d||e[13]!==u?(x=(0,s.jsx)(K,{content:u,children:d}),e[12]=d,e[13]=u,e[14]=x):x=e[14],x};function Me(){window.close()}var J=P(I(),1),z=P(Z(),1),Ae=100;const Fe=()=>{let t=(0,J.c)(37),[e,a]=ee(),{saveAppConfig:f}=U(),r=(0,z.useId)(),i=(0,z.useId)(),u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=fe($),t[0]=u):u=t[0];let b;t[1]===e?b=t[2]:(b={resolver:u,defaultValues:e},t[1]=e,t[2]=b);let l=xe(b),o;t[3]!==f||t[4]!==a?(o=async p=>{await f({config:p}).then(()=>{a(p)}).catch(()=>{a(p)})},t[3]=f,t[4]=a,t[5]=o):o=t[5];let w=o,j;t[6]===w?j=t[7]:(j=p=>{w(p)},t[6]=w,t[7]=j);let m=we(j,Ae),c;t[8]===e.width?c=t[9]:(c=[e.width],t[8]=e.width,t[9]=c),(0,z.useEffect)(Pe,c);let n;t[10]!==m||t[11]!==l?(n=l.handleSubmit(m),t[10]=m,t[11]=l,t[12]=n):n=t[12];let d;t[13]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsxs)("div",{children:[(0,s.jsx)(ne,{children:"Notebook Settings"}),(0,s.jsx)(de,{children:"Configure how your notebook or application looks and behaves."})]}),t[13]=d):d=t[13];let x;t[14]===l.control?x=t[15]:(x=(0,s.jsxs)(E,{title:"Display",children:[(0,s.jsx)(L,{control:l.control,name:"width",render:He}),(0,s.jsx)(L,{control:l.control,name:"app_title",render:Ee})]}),t[14]=l.control,t[15]=x);let h;t[16]===l.control?h=t[17]:(h=(0,s.jsxs)(E,{title:"Custom Files",children:[(0,s.jsx)(L,{control:l.control,name:"css_file",render:Ie}),(0,s.jsx)(L,{control:l.control,name:"html_head_file",render:Oe})]}),t[16]=l.control,t[17]=h);let y;t[18]===l.control?y=t[19]:(y=(0,s.jsx)(E,{title:"Data",children:(0,s.jsx)(L,{control:l.control,name:"sql_output",render:ze})}),t[18]=l.control,t[19]=y);let C;t[20]!==r||t[21]!==i?(C=p=>{let{field:_}=p;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-col gap-2",children:[(0,s.jsx)(A,{children:(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(D,{id:r,"data-testid":"html-checkbox",checked:_.value.includes("html"),onCheckedChange:()=>{_.onChange(R(_.value,"html"))}}),(0,s.jsx)(S,{htmlFor:r,children:"HTML"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(D,{id:i,"data-testid":"ipynb-checkbox",checked:_.value.includes("ipynb"),onCheckedChange:()=>{_.onChange(R(_.value,"ipynb"))}}),(0,s.jsx)(S,{htmlFor:i,children:"IPYNB"})]})]})}),(0,s.jsx)(M,{})]}),(0,s.jsxs)(q,{children:["When enabled, marimo will periodically save this notebook in your selected formats (HTML, IPYNB) to a folder named"," ",(0,s.jsx)(W,{className:"inline",children:"__marimo__"})," next to your notebook file."]})]})},t[20]=r,t[21]=i,t[22]=C):C=t[22];let v;t[23]!==l.control||t[24]!==C?(v=(0,s.jsx)(E,{title:"Exporting outputs",children:(0,s.jsx)(L,{control:l.control,name:"auto_download",render:C})}),t[23]=l.control,t[24]=C,t[25]=v):v=t[25];let N;t[26]!==v||t[27]!==x||t[28]!==h||t[29]!==y?(N=(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-x-8 gap-y-4",children:[x,h,y,v]}),t[26]=v,t[27]=x,t[28]=h,t[29]=y,t[30]=N):N=t[30];let g;t[31]!==N||t[32]!==n?(g=(0,s.jsxs)("form",{onChange:n,className:"flex flex-col gap-6",children:[d,N]}),t[31]=N,t[32]=n,t[33]=g):g=t[33];let k;return t[34]!==l||t[35]!==g?(k=(0,s.jsx)(pe,{...l,children:g}),t[34]=l,t[35]=g,t[36]=k):k=t[36],k};var E=t=>{let e=(0,J.c)(5),{title:a,children:f}=t,r;e[0]===a?r=e[1]:(r=(0,s.jsx)("h3",{className:"text-base font-semibold mb-1",children:a}),e[0]=a,e[1]=r);let i;return e[2]!==f||e[3]!==r?(i=(0,s.jsxs)("div",{className:"flex flex-col gap-y-2",children:[r,f]}),e[2]=f,e[3]=r,e[4]=i):i=e[4],i};function Pe(){window.dispatchEvent(new Event("resize"))}function qe(t){return(0,s.jsx)("option",{value:t,children:t},t)}function He(t){let{field:e}=t;return(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"Width"}),(0,s.jsx)(A,{children:(0,s.jsx)(B,{"data-testid":"app-width-select",onChange:a=>e.onChange(a.target.value),value:e.value,disabled:e.disabled,className:"inline-flex mr-2",children:re().map(qe)})}),(0,s.jsx)(M,{})]})}function Ee(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"App title"}),(0,s.jsx)(A,{children:(0,s.jsx)(O,{...e,value:e.value??"",onChange:a=>{e.onChange(a.target.value),Q.safeParse(a.target.value).success&&(document.title=a.target.value)}})}),(0,s.jsx)(M,{})]}),(0,s.jsx)(q,{children:"The application title is put in the title tag in the HTML code and typically displayed in the title bar of the browser window."})]})}function Ie(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{className:"shrink-0",children:"Custom CSS"}),(0,s.jsx)(A,{children:(0,s.jsx)(O,{...e,value:e.value??"",placeholder:"custom.css",onChange:a=>{e.onChange(a.target.value),Q.safeParse(a.target.value).success&&(document.title=a.target.value)}})}),(0,s.jsx)(M,{})]}),(0,s.jsx)(q,{children:"A filepath to a custom css file to be injected into the notebook."})]})}function Oe(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{className:"shrink-0",children:"HTML Head"}),(0,s.jsx)(A,{children:(0,s.jsx)(O,{...e,value:e.value??"",placeholder:"head.html",onChange:a=>{e.onChange(a.target.value)}})}),(0,s.jsx)(M,{})]}),(0,s.jsxs)(q,{children:["A filepath to an HTML file to be injected into the"," ",(0,s.jsx)(W,{className:"inline",children:"<head/>"})," section of the notebook. Use this to add analytics, custom fonts, meta tags, or external scripts."]})]})}function We(t){return(0,s.jsx)("option",{value:t.value,children:t.label},t.value)}function ze(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"SQL Output Type"}),(0,s.jsx)(A,{children:(0,s.jsx)(B,{"data-testid":"sql-output-select",onChange:a=>{e.onChange(a.target.value),ae({title:"Kernel Restart Required",description:"This change requires a kernel restart to take effect."})},value:e.value,disabled:e.disabled,className:"inline-flex mr-2",children:ie.map(We)})}),(0,s.jsx)(M,{})]}),(0,s.jsxs)(q,{children:["The Python type returned by a SQL cell. For best performance with large datasets, we recommend using"," ",(0,s.jsx)(W,{className:"inline",children:"native"}),". See the"," ",(0,s.jsx)(_e,{href:"https://docs.marimo.io/guides/working_with_data/sql",children:"SQL guide"})," ","for more information."]})]})}var De=P(I(),1);const Qe=t=>{let e=(0,De.c)(32),{showAppConfig:a,disabled:f,tooltip:r}=t,i=a===void 0?!0:a,u=f===void 0?!1:f,b=r===void 0?"Settings":r,[l,o]=X(he),w=u?"disabled":"hint-green",j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=(0,s.jsx)(Y,{strokeWidth:1.8}),e[0]=j):j=e[0];let m;e[1]===b?m=e[2]:(m=(0,s.jsx)(K,{content:b,children:j}),e[1]=b,e[2]=m);let c;e[3]!==u||e[4]!==w||e[5]!==m?(c=(0,s.jsx)(G,{"aria-label":"Config","data-testid":"app-config-button",shape:"circle",size:"small",className:"h-[27px] w-[27px]",disabled:u,color:w,children:m}),e[3]=u,e[4]=w,e[5]=m,e[6]=c):c=e[6];let n=c,d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsxs)(be,{className:"w-[90vw] h-[90vh] overflow-hidden sm:max-w-5xl top-[5vh] p-0",children:[(0,s.jsx)(ue,{children:(0,s.jsx)(ve,{children:"User settings"})}),(0,s.jsx)(ce,{})]}),e[7]=d):d=e[7];let x=d;if(!i){let T;e[8]===n?T=e[9]:(T=(0,s.jsx)(ge,{children:n}),e[8]=n,e[9]=T);let H;return e[10]!==o||e[11]!==l||e[12]!==T?(H=(0,s.jsxs)(V,{open:l,onOpenChange:o,children:[T,x]}),e[10]=o,e[11]=l,e[12]=T,e[13]=H):H=e[13],H}let h;e[14]===n?h=e[15]:(h=(0,s.jsx)(Ce,{asChild:!0,children:n}),e[14]=n,e[15]=h);let y,C;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=(0,s.jsx)(Fe,{}),C=(0,s.jsx)("div",{className:"h-px bg-border my-2"}),e[16]=y,e[17]=C):(y=e[16],C=e[17]);let v;e[18]===o?v=e[19]:(v=()=>o(!0),e[18]=o,e[19]=v);let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=(0,s.jsx)(Y,{strokeWidth:1.8,className:"w-4 h-4 mr-2"}),e[20]=N):N=e[20];let g;e[21]===v?g=e[22]:(g=(0,s.jsxs)(Ne,{className:"w-[650px] overflow-auto max-h-[80vh] max-w-[80vw]",align:"end",side:"bottom",onFocusOutside:Re,children:[y,C,(0,s.jsxs)(le,{onClick:v,variant:"link",className:"px-0",children:[N,"User settings"]})]}),e[21]=v,e[22]=g);let k;e[23]!==g||e[24]!==h?(k=(0,s.jsxs)(ke,{children:[h,g]}),e[23]=g,e[24]=h,e[25]=k):k=e[25];let p;e[26]!==o||e[27]!==l?(p=(0,s.jsx)(V,{open:l,onOpenChange:o,children:x}),e[26]=o,e[27]=l,e[28]=p):p=e[28];let _;return e[29]!==k||e[30]!==p?(_=(0,s.jsxs)(s.Fragment,{children:[k,p]}),e[29]=k,e[30]=p,e[31]=_):_=e[31],_};function Re(t){return t.preventDefault()}export{Le as n,Se as r,Qe as t};
|
|
1
|
+
import{s as P}from"./chunk-DZLz74EQ.js";import{s as X}from"./jotai-BTnrNcC1.js";import{t as Z}from"./react-BcIddLXZ.js";import{gt as D}from"./cells-DV6dfoCq.js";import{t as I}from"./compiler-runtime-Cr9loedd.js";import{C as Q,S as $,_ as ee}from"./utils-BpjB6B-Y.js";import{g as te}from"./config-e9OVB2bJ.js";import{t as se}from"./jsx-runtime-mwDPpfh_.js";import{t as le}from"./button-Zjtz1syG.js";import{l as R}from"./once-3GsqimLM.js";import{r as U}from"./requests-DD3OWR81.js";import{t as ae}from"./use-toast-BPMVOfO3.js";import{t as oe}from"./createLucideIcon-CaU6_Jtx.js";import{c as ne,d as re,o as ie,r as ce,s as de,t as he}from"./state-CjZ41ddG.js";import{h as me,l as B}from"./select-Di-JjADd.js";import{r as O}from"./input-DuVApvWu.js";import{t as Y}from"./settings-DvMaGwYY.js";import{a as L,c as M,n as A,o as F,p as xe,r as q,s as S,t as pe,u as fe}from"./form-Cdn744fY.js";import{t as ue}from"./VisuallyHidden-B9I0t9He.js";import{t as K}from"./tooltip-CerBk_un.js";import{o as je}from"./alert-dialog-BZHeDuaE.js";import{c as ve,l as ge,n as be,t as V}from"./dialog-CzmSXArA.js";import{n as we}from"./useDebounce--Sw2WRQ5.js";import{n as ye}from"./ImperativeModal-ExH1h9et.js";import{t as W}from"./kbd-BfBY_QKr.js";import{i as Ce,r as Ne,t as ke}from"./popover-BoRNi4dY.js";import{t as _e}from"./links-90C38wV6.js";import{t as G}from"./Inputs-aaNuvYOb.js";var Se=oe("power-off",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Te=P(I(),1),s=P(se(),1);const Le=t=>{let e=(0,Te.c)(15),{description:a,disabled:f,tooltip:r}=t,i=f===void 0?!1:f,u=r===void 0?"Shutdown":r,{openConfirm:b,closeModal:l}=ye(),{sendShutdown:o}=U(),w;e[0]===o?w=e[1]:(w=()=>{o(),setTimeout(Me,200)},e[0]=o,e[1]=w);let j=w;if(te())return null;let m=i?"disabled":"red",c;e[2]!==l||e[3]!==a||e[4]!==j||e[5]!==b?(c=h=>{h.stopPropagation(),b({title:"Shutdown",description:a,variant:"destructive",confirmAction:(0,s.jsx)(je,{onClick:()=>{j(),l()},"aria-label":"Confirm Shutdown",children:"Shutdown"})})},e[2]=l,e[3]=a,e[4]=j,e[5]=b,e[6]=c):c=e[6];let n;e[7]===Symbol.for("react.memo_cache_sentinel")?(n=(0,s.jsx)(me,{strokeWidth:1}),e[7]=n):n=e[7];let d;e[8]!==i||e[9]!==m||e[10]!==c?(d=(0,s.jsx)(G,{"aria-label":"Shutdown","data-testid":"shutdown-button",shape:"circle",size:"small",color:m,className:"h-[27px] w-[27px]",disabled:i,onClick:c,children:n}),e[8]=i,e[9]=m,e[10]=c,e[11]=d):d=e[11];let x;return e[12]!==d||e[13]!==u?(x=(0,s.jsx)(K,{content:u,children:d}),e[12]=d,e[13]=u,e[14]=x):x=e[14],x};function Me(){window.close()}var J=P(I(),1),z=P(Z(),1),Ae=100;const Fe=()=>{let t=(0,J.c)(37),[e,a]=ee(),{saveAppConfig:f}=U(),r=(0,z.useId)(),i=(0,z.useId)(),u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=fe($),t[0]=u):u=t[0];let b;t[1]===e?b=t[2]:(b={resolver:u,defaultValues:e},t[1]=e,t[2]=b);let l=xe(b),o;t[3]!==f||t[4]!==a?(o=async p=>{await f({config:p}).then(()=>{a(p)}).catch(()=>{a(p)})},t[3]=f,t[4]=a,t[5]=o):o=t[5];let w=o,j;t[6]===w?j=t[7]:(j=p=>{w(p)},t[6]=w,t[7]=j);let m=we(j,Ae),c;t[8]===e.width?c=t[9]:(c=[e.width],t[8]=e.width,t[9]=c),(0,z.useEffect)(Pe,c);let n;t[10]!==m||t[11]!==l?(n=l.handleSubmit(m),t[10]=m,t[11]=l,t[12]=n):n=t[12];let d;t[13]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsxs)("div",{children:[(0,s.jsx)(ne,{children:"Notebook Settings"}),(0,s.jsx)(de,{children:"Configure how your notebook or application looks and behaves."})]}),t[13]=d):d=t[13];let x;t[14]===l.control?x=t[15]:(x=(0,s.jsxs)(E,{title:"Display",children:[(0,s.jsx)(L,{control:l.control,name:"width",render:He}),(0,s.jsx)(L,{control:l.control,name:"app_title",render:Ee})]}),t[14]=l.control,t[15]=x);let h;t[16]===l.control?h=t[17]:(h=(0,s.jsxs)(E,{title:"Custom Files",children:[(0,s.jsx)(L,{control:l.control,name:"css_file",render:Ie}),(0,s.jsx)(L,{control:l.control,name:"html_head_file",render:Oe})]}),t[16]=l.control,t[17]=h);let y;t[18]===l.control?y=t[19]:(y=(0,s.jsx)(E,{title:"Data",children:(0,s.jsx)(L,{control:l.control,name:"sql_output",render:ze})}),t[18]=l.control,t[19]=y);let C;t[20]!==r||t[21]!==i?(C=p=>{let{field:_}=p;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-col gap-2",children:[(0,s.jsx)(A,{children:(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(D,{id:r,"data-testid":"html-checkbox",checked:_.value.includes("html"),onCheckedChange:()=>{_.onChange(R(_.value,"html"))}}),(0,s.jsx)(S,{htmlFor:r,children:"HTML"})]}),(0,s.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,s.jsx)(D,{id:i,"data-testid":"ipynb-checkbox",checked:_.value.includes("ipynb"),onCheckedChange:()=>{_.onChange(R(_.value,"ipynb"))}}),(0,s.jsx)(S,{htmlFor:i,children:"IPYNB"})]})]})}),(0,s.jsx)(M,{})]}),(0,s.jsxs)(q,{children:["When enabled, marimo will periodically save this notebook in your selected formats (HTML, IPYNB) to a folder named"," ",(0,s.jsx)(W,{className:"inline",children:"__marimo__"})," next to your notebook file."]})]})},t[20]=r,t[21]=i,t[22]=C):C=t[22];let v;t[23]!==l.control||t[24]!==C?(v=(0,s.jsx)(E,{title:"Exporting outputs",children:(0,s.jsx)(L,{control:l.control,name:"auto_download",render:C})}),t[23]=l.control,t[24]=C,t[25]=v):v=t[25];let N;t[26]!==v||t[27]!==x||t[28]!==h||t[29]!==y?(N=(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-x-8 gap-y-4",children:[x,h,y,v]}),t[26]=v,t[27]=x,t[28]=h,t[29]=y,t[30]=N):N=t[30];let g;t[31]!==N||t[32]!==n?(g=(0,s.jsxs)("form",{onChange:n,className:"flex flex-col gap-6",children:[d,N]}),t[31]=N,t[32]=n,t[33]=g):g=t[33];let k;return t[34]!==l||t[35]!==g?(k=(0,s.jsx)(pe,{...l,children:g}),t[34]=l,t[35]=g,t[36]=k):k=t[36],k};var E=t=>{let e=(0,J.c)(5),{title:a,children:f}=t,r;e[0]===a?r=e[1]:(r=(0,s.jsx)("h3",{className:"text-base font-semibold mb-1",children:a}),e[0]=a,e[1]=r);let i;return e[2]!==f||e[3]!==r?(i=(0,s.jsxs)("div",{className:"flex flex-col gap-y-2",children:[r,f]}),e[2]=f,e[3]=r,e[4]=i):i=e[4],i};function Pe(){window.dispatchEvent(new Event("resize"))}function qe(t){return(0,s.jsx)("option",{value:t,children:t},t)}function He(t){let{field:e}=t;return(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"Width"}),(0,s.jsx)(A,{children:(0,s.jsx)(B,{"data-testid":"app-width-select",onChange:a=>e.onChange(a.target.value),value:e.value,disabled:e.disabled,className:"inline-flex mr-2",children:re().map(qe)})}),(0,s.jsx)(M,{})]})}function Ee(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"App title"}),(0,s.jsx)(A,{children:(0,s.jsx)(O,{...e,value:e.value??"",onChange:a=>{e.onChange(a.target.value),Q.safeParse(a.target.value).success&&(document.title=a.target.value)}})}),(0,s.jsx)(M,{})]}),(0,s.jsx)(q,{children:"The application title is put in the title tag in the HTML code and typically displayed in the title bar of the browser window."})]})}function Ie(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{className:"shrink-0",children:"Custom CSS"}),(0,s.jsx)(A,{children:(0,s.jsx)(O,{...e,value:e.value??"",placeholder:"custom.css",onChange:a=>{e.onChange(a.target.value),Q.safeParse(a.target.value).success&&(document.title=a.target.value)}})}),(0,s.jsx)(M,{})]}),(0,s.jsx)(q,{children:"A filepath to a custom css file to be injected into the notebook."})]})}function Oe(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{className:"shrink-0",children:"HTML Head"}),(0,s.jsx)(A,{children:(0,s.jsx)(O,{...e,value:e.value??"",placeholder:"head.html",onChange:a=>{e.onChange(a.target.value)}})}),(0,s.jsx)(M,{})]}),(0,s.jsxs)(q,{children:["A filepath to an HTML file to be injected into the"," ",(0,s.jsx)(W,{className:"inline",children:"<head/>"})," section of the notebook. Use this to add analytics, custom fonts, meta tags, or external scripts."]})]})}function We(t){return(0,s.jsx)("option",{value:t.value,children:t.label},t.value)}function ze(t){let{field:e}=t;return(0,s.jsxs)("div",{className:"flex flex-col gap-y-1",children:[(0,s.jsxs)(F,{className:"flex flex-row items-center space-x-1 space-y-0",children:[(0,s.jsx)(S,{children:"SQL Output Type"}),(0,s.jsx)(A,{children:(0,s.jsx)(B,{"data-testid":"sql-output-select",onChange:a=>{e.onChange(a.target.value),ae({title:"Kernel Restart Required",description:"This change requires a kernel restart to take effect."})},value:e.value,disabled:e.disabled,className:"inline-flex mr-2",children:ie.map(We)})}),(0,s.jsx)(M,{})]}),(0,s.jsxs)(q,{children:["The Python type returned by a SQL cell. For best performance with large datasets, we recommend using"," ",(0,s.jsx)(W,{className:"inline",children:"native"}),". See the"," ",(0,s.jsx)(_e,{href:"https://docs.marimo.io/guides/working_with_data/sql",children:"SQL guide"})," ","for more information."]})]})}var De=P(I(),1);const Qe=t=>{let e=(0,De.c)(32),{showAppConfig:a,disabled:f,tooltip:r}=t,i=a===void 0?!0:a,u=f===void 0?!1:f,b=r===void 0?"Settings":r,[l,o]=X(he),w=u?"disabled":"hint-green",j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=(0,s.jsx)(Y,{strokeWidth:1.8}),e[0]=j):j=e[0];let m;e[1]===b?m=e[2]:(m=(0,s.jsx)(K,{content:b,children:j}),e[1]=b,e[2]=m);let c;e[3]!==u||e[4]!==w||e[5]!==m?(c=(0,s.jsx)(G,{"aria-label":"Config","data-testid":"app-config-button",shape:"circle",size:"small",className:"h-[27px] w-[27px]",disabled:u,color:w,children:m}),e[3]=u,e[4]=w,e[5]=m,e[6]=c):c=e[6];let n=c,d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=(0,s.jsxs)(be,{className:"w-[90vw] h-[90vh] overflow-hidden sm:max-w-5xl top-[5vh] p-0",children:[(0,s.jsx)(ue,{children:(0,s.jsx)(ve,{children:"User settings"})}),(0,s.jsx)(ce,{})]}),e[7]=d):d=e[7];let x=d;if(!i){let T;e[8]===n?T=e[9]:(T=(0,s.jsx)(ge,{children:n}),e[8]=n,e[9]=T);let H;return e[10]!==o||e[11]!==l||e[12]!==T?(H=(0,s.jsxs)(V,{open:l,onOpenChange:o,children:[T,x]}),e[10]=o,e[11]=l,e[12]=T,e[13]=H):H=e[13],H}let h;e[14]===n?h=e[15]:(h=(0,s.jsx)(Ce,{asChild:!0,children:n}),e[14]=n,e[15]=h);let y,C;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=(0,s.jsx)(Fe,{}),C=(0,s.jsx)("div",{className:"h-px bg-border my-2"}),e[16]=y,e[17]=C):(y=e[16],C=e[17]);let v;e[18]===o?v=e[19]:(v=()=>o(!0),e[18]=o,e[19]=v);let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=(0,s.jsx)(Y,{strokeWidth:1.8,className:"w-4 h-4 mr-2"}),e[20]=N):N=e[20];let g;e[21]===v?g=e[22]:(g=(0,s.jsxs)(Ne,{className:"w-[650px] overflow-auto max-h-[80vh] max-w-[80vw]",align:"end",side:"bottom",onFocusOutside:Re,children:[y,C,(0,s.jsxs)(le,{onClick:v,variant:"link",className:"px-0",children:[N,"User settings"]})]}),e[21]=v,e[22]=g);let k;e[23]!==g||e[24]!==h?(k=(0,s.jsxs)(ke,{children:[h,g]}),e[23]=g,e[24]=h,e[25]=k):k=e[25];let p;e[26]!==o||e[27]!==l?(p=(0,s.jsx)(V,{open:l,onOpenChange:o,children:x}),e[26]=o,e[27]=l,e[28]=p):p=e[28];let _;return e[29]!==k||e[30]!==p?(_=(0,s.jsxs)(s.Fragment,{children:[k,p]}),e[29]=k,e[30]=p,e[31]=_):_=e[31],_};function Re(t){return t.preventDefault()}export{Le as n,Se as r,Qe as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as E}from"./chunk-DZLz74EQ.js";import{c as P}from"./jotai-BTnrNcC1.js";import{t as R}from"./react-BcIddLXZ.js";import{t as B}from"./compiler-runtime-Cr9loedd.js";import{t as G}from"./jsx-runtime-mwDPpfh_.js";import{t as J}from"./cn-DEUt_IsG.js";import{t as K}from"./createLucideIcon-CaU6_Jtx.js";import{t as L}from"./useCellActionButton-
|
|
1
|
+
import{s as E}from"./chunk-DZLz74EQ.js";import{c as P}from"./jotai-BTnrNcC1.js";import{t as R}from"./react-BcIddLXZ.js";import{t as B}from"./compiler-runtime-Cr9loedd.js";import{t as G}from"./jsx-runtime-mwDPpfh_.js";import{t as J}from"./cn-DEUt_IsG.js";import{t as K}from"./createLucideIcon-CaU6_Jtx.js";import{t as L}from"./useCellActionButton-Dxhr7c1D.js";import{a as U,n as V,o as W,t as Q}from"./tooltip-CerBk_un.js";import{d as X}from"./alert-dialog-BZHeDuaE.js";import{a as Y,i as Z}from"./renderShortcut-a-3t8sis.js";import{i as H,r as $,t as O}from"./popover-BoRNi4dY.js";import{a as ee,c as le,i as te,o as se,r as re,t as ae,u as oe}from"./command-DhuV6_de.js";import{n as ne}from"./focus--Piy3rX5.js";var ie=K("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),q=E(B(),1),b=E(R(),1),l=E(G(),1);const z=b.memo(b.forwardRef((i,r)=>{let e=(0,q.c)(35),s,a,n;e[0]===i?(s=e[1],a=e[2],n=e[3]):({children:s,showTooltip:n,...a}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=n);let m=n===void 0?!0:n,[c,y]=(0,b.useState)(!1),v;e[4]===Symbol.for("react.memo_cache_sentinel")?(v=()=>y(!1),e[4]=v):v=e[4];let M=v,g;e[5]===a?g=e[6]:(g={cell:a,closePopover:M},e[5]=a,e[6]=g);let d=L(g),A=X(),N;e[7]===Symbol.for("react.memo_cache_sentinel")?(N=()=>({toggle:()=>y(ce)}),e[7]=N):N=e[7],(0,b.useImperativeHandle)(r,N);let _;e[8]===Symbol.for("react.memo_cache_sentinel")?(_=(0,l.jsx)(ee,{placeholder:"Search actions...",className:"h-6 m-1"}),e[8]=_):_=e[8];let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=(0,l.jsx)(re,{children:"No results"}),e[9]=w):w=e[9];let h;if(e[10]!==d){let o;e[12]===d.length?o=e[13]:(o=(u,I)=>(0,l.jsxs)(b.Fragment,{children:[(0,l.jsx)(te,{children:u.map(t=>{let T=(0,l.jsxs)("div",{className:"flex items-center flex-1",children:[t.icon&&(0,l.jsx)("div",{className:"mr-2 w-5 text-muted-foreground",children:t.icon}),(0,l.jsx)("div",{className:"flex-1",children:t.label}),(0,l.jsxs)("div",{className:"shrink-0 text-sm",children:[t.hotkey&&Z(t.hotkey),t.rightElement]})]});return t.tooltip&&(T=(0,l.jsx)(Q,{content:t.tooltip,delayDuration:100,children:T})),(0,l.jsx)(se,{className:J(t.disabled&&"opacity-50!"),onSelect:()=>{t.disableClick||t.disabled||(t.handle(),y(!1))},variant:t.variant,children:T},t.label)})},I),I<d.length-1&&(0,l.jsx)(le,{})]},I),e[12]=d.length,e[13]=o),h=d.map(o),e[10]=d,e[11]=h}else h=e[11];let p;e[14]===h?p=e[15]:(p=(0,l.jsxs)(ae,{children:[_,(0,l.jsxs)(oe,{children:[w,h]})]}),e[14]=h,e[15]=p);let S;e[16]!==A||e[17]!==p?(S=(0,l.jsx)($,{className:"w-[300px] p-0 pt-1 overflow-auto",scrollable:!0,...A,children:p}),e[16]=A,e[17]=p,e[18]=S):S=e[18];let x=S;if(!m){let o;e[19]===s?o=e[20]:(o=(0,l.jsx)(H,{asChild:!0,children:s}),e[19]=s,e[20]=o);let u;return e[21]!==x||e[22]!==c||e[23]!==o?(u=(0,l.jsxs)(O,{open:c,onOpenChange:y,children:[o,x]}),e[21]=x,e[22]=c,e[23]=o,e[24]=u):u=e[24],u}let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=(0,l.jsx)(V,{tabIndex:-1,children:Y("cell.cellActions")}),e[25]=C):C=e[25];let D=!c&&C,f;e[26]===s?f=e[27]:(f=(0,l.jsx)(W,{children:(0,l.jsx)(H,{className:"flex",children:s})}),e[26]=s,e[27]=f);let j;e[28]!==D||e[29]!==f?(j=(0,l.jsxs)(U,{delayDuration:200,disableHoverableContent:!0,children:[D,f]}),e[28]=D,e[29]=f,e[30]=j):j=e[30];let k;return e[31]!==x||e[32]!==c||e[33]!==j?(k=(0,l.jsxs)(O,{open:c,onOpenChange:y,children:[j,x]}),e[31]=x,e[32]=c,e[33]=j,e[34]=k):k=e[34],k})),F=b.memo(i=>{let r=(0,q.c)(5),{children:e,cellId:s}=i,a;r[0]===s?a=r[1]:(a=ne(s),r[0]=s,r[1]=a);let n=P(a);if(!n)return null;let m;return r[2]!==e||r[3]!==n?(m=(0,l.jsx)(z,{showTooltip:!1,...n,children:e}),r[2]=e,r[3]=n,r[4]=m):m=r[4],m});F.displayName="ConnectionCellActionsDropdown";function ce(i){return!i}export{F as n,ie as r,z as t};
|