@marimo-team/frontend 0.25.3-dev92 → 0.25.3-dev93
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-DwPjR2_8.js → CellStatus-CplYFNTy.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-D9UK8o9A.js → ConnectedDataExplorerComponent-Dft8R6l5.js} +1 -1
- package/dist/assets/{ErrorBoundary-BhXbaVBa.js → ErrorBoundary-CdGuz4a_.js} +2 -2
- package/dist/assets/{JsonOutput-Dti6dc1X.js → JsonOutput-Csbov8Fx.js} +1 -1
- package/dist/assets/{MarimoErrorOutput-BKvntkfq.js → MarimoErrorOutput-czclLlOn.js} +1 -1
- package/dist/assets/{RenderHTML-DUI47UDk.js → RenderHTML-CNDedpS4.js} +1 -1
- package/dist/assets/{RunButton-CLhvSMZG.js → RunButton-CRfdOxVd.js} +1 -1
- package/dist/assets/{add-cell-with-ai-ev63rhN4.js → add-cell-with-ai-BAIX7r0P.js} +1 -1
- package/dist/assets/{add-connection-dialog-2Tgl7Mjn.js → add-connection-dialog-DrDuM-tI.js} +1 -1
- package/dist/assets/{agent-panel-D4lNacey.js → agent-panel-CoXq_rlA.js} +1 -1
- package/dist/assets/{ai-model-dropdown-BqjVBWQp.js → ai-model-dropdown-COvWn46z.js} +1 -1
- package/dist/assets/{app-config-button-BToMQZBN.js → app-config-button-CtxoYG4F.js} +1 -1
- package/dist/assets/{blob-DMgg2NZo.js → blob-DCjrjZKW.js} +1 -1
- package/dist/assets/{cache-panel-Byolv2ht.js → cache-panel-CbWZcBu0.js} +1 -1
- package/dist/assets/{cell-editor-DGRa0o5e.js → cell-editor-BnL0Sorl.js} +1 -1
- package/dist/assets/{cell-link-D6rI90gy.js → cell-link-BFbgKiRH.js} +1 -1
- package/dist/assets/{cells-Cetiartc.js → cells-yOs72eZm.js} +1 -1
- package/dist/assets/{chat-display-CgpJ6XM4.js → chat-display-DwRM41t_.js} +1 -1
- package/dist/assets/{chat-panel-Djs36Uy4.js → chat-panel-DeTEdjxF.js} +1 -1
- package/dist/assets/{chat-ui-B_JGdp0E.js → chat-ui-D6XucD07.js} +1 -1
- package/dist/assets/{code-visibility-ny5n3-GH.js → code-visibility-DYDagVy7.js} +1 -1
- package/dist/assets/{column-preview-BIpGfTJf.js → column-preview-DXM8SqGY.js} +1 -1
- package/dist/assets/{command-palette-9pxpuKHs.js → command-palette-CA6yfNLb.js} +1 -1
- package/dist/assets/{common-D0jeQZnr.js → common-B-ZYnO1x.js} +1 -1
- package/dist/assets/{components-CJRBUI2s.js → components-CBE8cOLK.js} +1 -1
- package/dist/assets/{components-DrU8dOzy.js → components-DCo7mAWO.js} +1 -1
- package/dist/assets/{components-DkQChRNr.js → components-vu2jLG08.js} +1 -1
- package/dist/assets/{config-BWKfkUWA.js → config-CD1IuZFJ.js} +1 -1
- package/dist/assets/{config-CP8Y8_R0.js → config-DMz7oN0r.js} +1 -1
- package/dist/assets/{config-DGX7JYor.js → config-DpY86_Yq.js} +1 -1
- package/dist/assets/{createReducer-HKXUbqyz.js → createReducer-CaI_Oa0v.js} +1 -1
- package/dist/assets/{datasource-BXFNO5td.js → datasource-BakEOWsf.js} +1 -1
- package/dist/assets/{dependency-graph-panel-BFVIEz0s.js → dependency-graph-panel-DCGB3_id.js} +1 -1
- package/dist/assets/{documentation-panel-CaUMsgkg.js → documentation-panel-CpGZ2Dfn.js} +1 -1
- package/dist/assets/{download-C-q7-OBT.js → download-CV1k4XQ4.js} +1 -1
- package/dist/assets/{edit-page-VhYLLklC.js → edit-page-By7n2M84.js} +4 -4
- package/dist/assets/{error-entries-p_IDc4iy.js → error-entries-JgrZYMbe.js} +1 -1
- package/dist/assets/{error-panel-B0BwSTRv.js → error-panel-DS7HWph-.js} +1 -1
- package/dist/assets/feedback-button-Dgs_HOOC.js +1 -0
- package/dist/assets/{feedback-button-D0HjY39R.js → feedback-button-eYsTCK-g.js} +1 -1
- package/dist/assets/{file-explorer-panel-BLIEpQzW.js → file-explorer-panel-BTLwwwD4.js} +1 -1
- package/dist/assets/{file-name-input-CZ_W4QXG.js → file-name-input-BaR4h2Ud.js} +1 -1
- package/dist/assets/{floating-outline-D7DFh_29.js → floating-outline-Drd73Quo.js} +1 -1
- package/dist/assets/{gallery-page-BLgoybvc.js → gallery-page-DXUD11Rm.js} +1 -1
- package/dist/assets/{glide-data-editor-DVpOmYXo.js → glide-data-editor-DqBBoQBl.js} +1 -1
- package/dist/assets/{home-page--OLVJPiE.js → home-page-DrRto2-v.js} +1 -1
- package/dist/assets/{hooks-D0Pzb8Q4.js → hooks-D25kP4Sr.js} +1 -1
- package/dist/assets/{index-DB50a7AR.js → index-vBuAUWEe.js} +6 -6
- package/dist/assets/{input-BZdRe7pb.js → input-DmHMEZGh.js} +1 -1
- package/dist/assets/kiosk-mode-DFS6HopF.js +1 -0
- package/dist/assets/{layout-HYpXx9Kc.js → layout-DLHIGZTK.js} +3 -3
- package/dist/assets/links-DX2w97N9.js +1 -0
- package/dist/assets/{logs-panel-Cbx5BJ3w.js → logs-panel-D5AAD2s9.js} +1 -1
- package/dist/assets/{markdown-renderer-B1GLwS-C.js → markdown-renderer--CwVm4kJ.js} +1 -1
- package/dist/assets/{mermaid-B6mqMm5_.js → mermaid-BKXlWk4F.js} +1 -1
- package/dist/assets/{name-cell-input-CgINqxMv.js → name-cell-input-BFKZaNI5.js} +1 -1
- package/dist/assets/{outline-panel-DaCt5blP.js → outline-panel-qcwRnl0R.js} +1 -1
- package/dist/assets/{package-data-dv4FBHxR.js → package-data-CKPmBDtg.js} +1 -1
- package/dist/assets/{packages-panel-DRKwpeJ2.js → packages-panel-DnSryNcz.js} +1 -1
- package/dist/assets/{panel-accordion-state-C4fxJULv.js → panel-accordion-state-BwJpDMVt.js} +1 -1
- package/dist/assets/{panels-D_TmFEit.js → panels-Aqzwb3UR.js} +1 -1
- package/dist/assets/{process-output-D1KxMfN7.js → process-output-DuUfHYSr.js} +1 -1
- package/dist/assets/{readonly-code-display-DVn7_uLn.js → readonly-code-display-BY-9I_Yk.js} +1 -1
- package/dist/assets/{readonly-python-code-5F8u1711.js → readonly-python-code-DSyr-yE2.js} +1 -1
- package/dist/assets/{renderShortcut-H60uiHBp.js → renderShortcut-rUwGqKgC.js} +1 -1
- package/dist/assets/{requests-lt0JK8Jt.js → requests-BIFR-h4M.js} +1 -1
- package/dist/assets/requests-DuLJN9Tf.js +1 -0
- package/dist/assets/{reveal-component-B4rC_fg1.js → reveal-component-C_Lb7Mom.js} +1 -1
- package/dist/assets/{run-page-BHdHPiQA.js → run-page-ZTw-kCU-.js} +1 -1
- package/dist/assets/{runs-6lJxKV1w.js → runs-C49hleBy.js} +1 -1
- package/dist/assets/{runtime-details-state-BLDCeDBF.js → runtime-details-state-B7gpnuXx.js} +1 -1
- package/dist/assets/{scratchpad-panel-ChSdhkiu.js → scratchpad-panel-D2IHkKoG.js} +1 -1
- package/dist/assets/{secrets-panel-Dh3v7XPE.js → secrets-panel-bcfEKxRx.js} +1 -1
- package/dist/assets/{session-B8Y-GJnS.js → session-CMLIzZKw.js} +1 -1
- package/dist/assets/session-panel-cOSO3WCX.js +1 -0
- package/dist/assets/{snippets-panel-D7PPIwX1.js → snippets-panel-BNadUJLU.js} +1 -1
- package/dist/assets/{state-BY4_P6ko.js → state-3mcyTS9q.js} +1 -1
- package/dist/assets/{state-C0irhlOZ.js → state-B_MCKzBL.js} +1 -1
- package/dist/assets/{state-Bd_wAeZf.js → state-BaYudep3.js} +1 -1
- package/dist/assets/{state-DaWgt-rn.js → state-C5WAeuTu.js} +1 -1
- package/dist/assets/{state-Ck7FMD5A.js → state-Cv2JW3l9.js} +1 -1
- package/dist/assets/{state-pXUWLVXv.js → state-_1LTGJQM.js} +1 -1
- package/dist/assets/{switch-IoWE8PbW.js → switch-DYjBfpNJ.js} +1 -1
- package/dist/assets/{terminal-BwLC9HS5.js → terminal-Ca-kubKb.js} +1 -1
- package/dist/assets/{tracing-WN4XSiAm.js → tracing-DbTgS4u9.js} +1 -1
- package/dist/assets/{tracing-panel-BVC4DsH6.js → tracing-panel-CjlrpXPy.js} +2 -2
- package/dist/assets/{tree-actions-MaUvbTxA.js → tree-actions-C_KYlaSv.js} +1 -1
- package/dist/assets/{useAddCell-D7SKNQll.js → useAddCell-C0J8quGE.js} +1 -1
- package/dist/assets/{useAsyncData-DhhdOGGd.js → useAsyncData-qvoPYHtx.js} +1 -1
- package/dist/assets/{useBoolean-WABMLM83.js → useBoolean-Dd2nWXFJ.js} +1 -1
- package/dist/assets/{useCellActionButton-Byz7LlUo.js → useCellActionButton-CbkOj6BE.js} +1 -1
- package/dist/assets/{useDebounce-k9QTpQ9-.js → useDebounce-DwTQ_1Pu.js} +1 -1
- package/dist/assets/{useDeepCompareMemoize-DFIVN9dn.js → useDeepCompareMemoize-B2DVK2De.js} +1 -1
- package/dist/assets/{useDeleteCell-D-k2fD1X.js → useDeleteCell-DHkF5wgS.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-neRJ4T16.js → useDependencyPanelTab--yXJW6X5.js} +1 -1
- package/dist/assets/{useEvent-Dfcbgjhg.js → useEvent-BDjgaBtz.js} +1 -1
- package/dist/assets/{useInstallPackage-CWcPxSLP.js → useInstallPackage-wcDq9hYT.js} +1 -1
- package/dist/assets/{useNotebookActions-Df_jxEKJ.js → useNotebookActions-dJQalORg.js} +1 -1
- package/dist/assets/{useRunCells-AZJD5ITo.js → useRunCells-C_IwVJR_.js} +1 -1
- package/dist/assets/{useSplitCell-CgiU_w77.js → useSplitCell-Ci4MEUj8.js} +1 -1
- package/dist/assets/{useTheme-DLtPc-39.js → useTheme-BAA27lh7.js} +1 -1
- package/dist/assets/{vega-component-CY6HmM06.js → vega-component-BeyxAJad.js} +1 -1
- package/dist/assets/{write-secret-modal-7DzehGyr.js → write-secret-modal-BEx-EUlh.js} +1 -1
- package/dist/index.html +40 -40
- package/package.json +1 -1
- package/src/components/datasources/__tests__/table-list.test.tsx +118 -0
- package/src/components/datasources/datasources.tsx +35 -21
- package/src/core/state/__tests__/jotai.test.tsx +108 -0
- package/src/core/state/jotai.ts +1 -1
- package/dist/assets/feedback-button-BFoleTOt.js +0 -1
- package/dist/assets/kiosk-mode-BGmMSc7A.js +0 -1
- package/dist/assets/links-CXcpNIM0.js +0 -1
- package/dist/assets/requests-CgSY1X4a.js +0 -1
- package/dist/assets/session-panel-CtQgwbFW.js +0 -1
- package/src/core/state/__tests__/jotai.test.ts +0 -25
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{t as n}from"./compiler-runtime-BrajqUja.js";import{n as r,t as i}from"./cn-ldLVeaqm.js";import{t as a}from"./jsx-runtime-B74pBk57.js";import{x as o}from"./fullscreen-BWTs8pYZ.js";import{a as s,c,i as l,l as u,n as d,r as f,s as p,t as m}from"./alert-dialog-C-sWmKva.js";import{c as h,d as g,i as _,n as ee,s as te,t as ne,u as v}from"./select-3CVGlYrC.js";import{r as y,t as b}from"./button-D8gVKwe-.js";import{t as x}from"./createLucideIcon-DfJ2oMlA.js";import{C as S,Jt as C,Lt as w,N as T,Qt as re,Xt as ie,Yt as ae,Zt as oe,r as E,tn as se,u as D,x as O}from"./input-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{t}from"./react-DVplv7_D.js";import{t as n}from"./compiler-runtime-BrajqUja.js";import{n as r,t as i}from"./cn-ldLVeaqm.js";import{t as a}from"./jsx-runtime-B74pBk57.js";import{x as o}from"./fullscreen-BWTs8pYZ.js";import{a as s,c,i as l,l as u,n as d,r as f,s as p,t as m}from"./alert-dialog-C-sWmKva.js";import{c as h,d as g,i as _,n as ee,s as te,t as ne,u as v}from"./select-3CVGlYrC.js";import{r as y,t as b}from"./button-D8gVKwe-.js";import{t as x}from"./createLucideIcon-DfJ2oMlA.js";import{C as S,Jt as C,Lt as w,N as T,Qt as re,Xt as ie,Yt as ae,Zt as oe,r as E,tn as se,u as D,x as O}from"./input-DmHMEZGh.js";import{t as k}from"./use-toast-Wu434mLr.js";import{r as ce,t as A}from"./requests-BIFR-h4M.js";import{t as j}from"./Deferred-CrTnjj37.js";import{t as M}from"./uuid-k9DpjH68.js";import{n as N}from"./useDebounce-DwTQ_1Pu.js";var P=x(`key`,[[`path`,{d:`m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4`,key:`g0fldk`}],[`path`,{d:`m21 2-9.6 9.6`,key:`1j0ho8`}],[`circle`,{cx:`7.5`,cy:`15.5`,r:`5.5`,key:`yqb3hr`}]]),F=e(t(),1),I=n(),L=a(),R={create(){return M()}},z=class{requests=new Map;operation;makeRequest;opts;constructor(e,t,n={}){this.operation=e,this.makeRequest=t,this.opts=n}async request(e){if(this.opts.resolveExistingRequests){let e=this.opts.resolveExistingRequests();for(let t of this.requests.values())t.resolve(e);this.requests.clear()}let t=R.create(),n=new j;return this.requests.set(t,n),await this.makeRequest(t,e).catch(e=>{n.reject(e),this.requests.delete(t)}),n.promise}resolve(e,t){let n=this.requests.get(e);n!==void 0&&(n.resolve(t),this.requests.delete(e))}reject(e,t){let n=this.requests.get(e);n!==void 0&&(n.reject(t),this.requests.delete(e))}},B=F.forwardRef((e,t)=>{let n=(0,I.c)(16),r,a,o;n[0]===e?(r=n[1],a=n[2],o=n[3]):({className:a,bottomAdornment:r,...o}=e,n[0]=e,n[1]=r,n[2]=a,n[3]=o);let s;n[4]===a?s=n[5]:(s=i(`shadow-xs-solid hover:shadow-sm-solid disabled:shadow-xs-solid focus-visible:shadow-md-solid`,`flex w-full mb-1 rounded-sm border border-input bg-background px-3 py-2 text-sm font-code ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:border-accent disabled:cursor-not-allowed disabled:opacity-50 min-h-6`,a),n[4]=a,n[5]=s);let c;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=y.stopPropagation(),n[6]=c):c=n[6];let l;n[7]!==o||n[8]!==t||n[9]!==s?(l=(0,L.jsx)(`textarea`,{className:s,onClick:c,ref:t,...o}),n[7]=o,n[8]=t,n[9]=s,n[10]=l):l=n[10];let u;n[11]===r?u=n[12]:(u=r&&(0,L.jsx)(`div`,{className:`absolute right-0 bottom-1 flex items-center pr-[6px] pointer-events-none text-muted-foreground h-6`,children:r}),n[11]=r,n[12]=u);let d;return n[13]!==l||n[14]!==u?(d=(0,L.jsxs)(`div`,{className:`relative`,children:[l,u]}),n[13]=l,n[14]=u,n[15]=d):d=n[15],d});B.displayName=`Textarea`;var V=F.forwardRef((e,t)=>{let n=(0,I.c)(16),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,onValueChange:i,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let o;n[4]!==i||n[5]!==a.delay||n[6]!==a.value?(o={initialValue:a.value,delay:a.delay,onChange:i},n[4]=i,n[5]=a.delay,n[6]=a.value,n[7]=o):o=n[7];let{value:s,onChange:c}=N(o),l;n[8]===c?l=n[9]:(l=e=>c(e.target.value),n[8]=c,n[9]=l);let u;return n[10]!==r||n[11]!==a||n[12]!==t||n[13]!==l||n[14]!==s?(u=(0,L.jsx)(B,{ref:t,className:r,...a,onChange:l,value:s}),n[10]=r,n[11]=a,n[12]=t,n[13]=l,n[14]=s,n[15]=u):u=n[15],u});V.displayName=`DebouncedTextarea`;var H=F.forwardRef((e,t)=>{let n=(0,I.c)(23),r,i,a;n[0]===e?(r=n[1],i=n[2],a=n[3]):({className:r,onValueChange:i,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a);let[s,c]=F.useState(a.value),l;n[4]!==s||n[5]!==i||n[6]!==a.value?(l={prop:a.value,defaultProp:s,onChange:i},n[4]=s,n[5]=i,n[6]=a.value,n[7]=l):l=n[7];let[u,d]=o(l),f,p;n[8]===u?(f=n[9],p=n[10]):(f=()=>{c(u||``)},p=[u],n[8]=u,n[9]=f,n[10]=p),F.useEffect(f,p);let m;n[11]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>c(e.target.value),n[11]=m):m=n[11];let h,g;n[12]!==s||n[13]!==d?(h=()=>d(s),g=e=>{e.ctrlKey&&e.key===`Enter`&&(e.preventDefault(),d(s))},n[12]=s,n[13]=d,n[14]=h,n[15]=g):(h=n[14],g=n[15]);let _;return n[16]!==r||n[17]!==s||n[18]!==a||n[19]!==t||n[20]!==h||n[21]!==g?(_=(0,L.jsx)(B,{ref:t,className:r,...a,value:s,onChange:m,onBlur:h,onKeyDown:g}),n[16]=r,n[17]=s,n[18]=a,n[19]=t,n[20]=h,n[21]=g,n[22]=_):_=n[22],_});H.displayName=`OnBlurredTextarea`;var U=F.createContext({modal:null,setModal:()=>{}}),W=e=>{let t=(0,I.c)(6),[n,r]=F.useState(null),i;t[0]===n?i=t[1]:(i={modal:n,setModal:r},t[0]=n,t[1]=i);let a;return t[2]!==n||t[3]!==e.children||t[4]!==i?(a=(0,L.jsxs)(U,{value:i,children:[n,e.children]}),t[2]=n,t[3]=e.children,t[4]=i,t[5]=a):a=t[5],a};function G(){let e=F.use(U);if(e===void 0)throw Error(`useModal must be used within a ModalProvider`);let t=()=>{e.setModal(null)};return{openModal:n=>{e.setModal((0,L.jsx)(C,{open:!0,onOpenChange:e=>{e||t()},children:n}))},openAlert:n=>{e.setModal((0,L.jsx)(m,{open:!0,onOpenChange:e=>{e||t()},children:(0,L.jsxs)(l,{children:[n,(0,L.jsx)(p,{children:(0,L.jsx)(d,{autoFocus:!0,onClick:t,children:`Ok`})})]})}))},openPrompt:n=>{e.setModal((0,L.jsx)(m,{open:!0,onOpenChange:e=>{e||t()},children:(0,L.jsx)(l,{children:(0,L.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),n.onConfirm(e.currentTarget.prompt.value),t()},children:[(0,L.jsxs)(c,{children:[(0,L.jsx)(u,{children:n.title}),(0,L.jsx)(s,{children:n.description}),(0,L.jsx)(E,{spellCheck:n.spellCheck,defaultValue:n.defaultValue,className:`my-4 h-8`,name:`prompt`,required:!0,autoFocus:!0,autoComplete:`off`})]}),(0,L.jsxs)(p,{children:[(0,L.jsx)(f,{onClick:t,children:`Cancel`}),(0,L.jsx)(b,{type:`submit`,children:n.confirmText??`Ok`})]})]})})}))},openConfirm:n=>{e.setModal((0,L.jsx)(m,{open:!0,onOpenChange:e=>{e||t()},children:(0,L.jsxs)(l,{children:[(0,L.jsxs)(c,{children:[(0,L.jsx)(u,{className:n.variant===`destructive`?`text-destructive`:``,children:n.title}),(0,L.jsx)(s,{children:n.description})]}),(0,L.jsxs)(p,{children:[(0,L.jsx)(f,{onClick:t,children:`Cancel`}),n.confirmAction]})]})}))},closeModal:t}}var K=new z(`secrets-result`,async(e,t)=>{await A().listSecretKeys({requestId:e,...t})}),le=r([`text-sm font-medium leading-none`,`data-disabled:cursor-not-allowed data-disabled:opacity-70`,`group-data-invalid:text-destructive`]),ue=e=>{let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(le(),n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,L.jsx)(T,{className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o},q=e=>{let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,L.jsx)(S,{className:a,...r,slot:`description`}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o},de=e=>{let t=(0,I.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`text-sm font-medium text-destructive`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,L.jsx)(O,{className:a,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o},J=r(``,{variants:{variant:{default:[`relative flex w-full items-center overflow-hidden rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background`,v(),`data-focus-within:outline-hidden data-focus-within:ring-2 data-focus-within:ring-ring data-focus-within:ring-offset-2`,`data-disabled:opacity-50`],ghost:``}},defaultVariants:{variant:`default`}}),fe=e=>{let t=(0,I.c)(12),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,variant:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let o;t[4]===a?o=t[5]:(o=e=>i(J({variant:a}),e),t[4]=a,t[5]=o);let s;t[6]!==n||t[7]!==o?(s=w(n,o),t[6]=n,t[7]=o,t[8]=s):s=t[8];let c;return t[9]!==r||t[10]!==s?(c=(0,L.jsx)(D,{className:s,...r}),t[9]=r,t[10]=s,t[11]=c):c=t[11],c},Y=e=>{let t=(0,I.c)(3),{href:n,children:r}=e,i;return t[0]!==r||t[1]!==n?(i=(0,L.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,className:`text-link hover:underline`,children:r}),t[0]=r,t[1]=n,t[2]=i):i=t[2],i},X=`path:`;function Z(e){return typeof e==`string`&&e.startsWith(X)}function pe(e){return`${X}${e}`}function me(e){return e.slice(5)}var Q=`env:`;function he(e){return e}function ge(e){return typeof e==`string`&&e.startsWith(Q)}function _e(e){return`${Q}${e}`}function ve(e){return e.replace(Q,``)}function ye(e,t){return Z(e)?{kind:`path`,path:me(e)}:{kind:`json`,expr:ge(e)?`json.loads(${t(e)})`:`json.loads(r"""${e}""")`}}function be(e){let t=e.trimStart();return t.startsWith(`{`)||t.startsWith(`[`)}function $(e){let t=e.trim();if(!t)return``;try{return JSON.stringify(JSON.parse(t))}catch{return e.replaceAll(/\r?\n/g,``)}}function xe(e){return e.replaceAll(`\\`,`\\\\`).replaceAll(`"`,`\\"`).replaceAll(`
|
|
2
2
|
`,`\\n`).replaceAll(`\r`,`\\r`).replaceAll(` `,`\\t`)}function Se(e){return e.toSorted((e,t)=>e.provider===`env`?1:t.provider===`env`?-1:0)}var Ce=e=>{let t=(0,I.c)(47),{providerNames:n,onClose:r,onSuccess:i,initialValue:a,multiline:o}=e,s=a===void 0?``:a,c=o!==void 0&&o,{writeSecret:l}=ce(),[u,d]=F.useState(``),f;t[0]!==s||t[1]!==c?(f=()=>c?$(s):s,t[0]=s,t[1]=c,t[2]=f):f=t[2];let[p,m]=F.useState(f),[_,v]=F.useState(n[0]),y;t[3]!==u||t[4]!==_||t[5]!==c||t[6]!==i||t[7]!==p||t[8]!==l?(y=async e=>{if(e.preventDefault(),!_){k({title:`Error`,description:`No location selected for the secret.`,variant:`danger`});return}let t=c?$(p):p;if(!u||!t||!_){k({title:`Error`,description:`Please fill in all fields.`,variant:`danger`});return}try{await l({key:u,value:t,provider:`dotenv`,name:_}),k({title:`Secret created`,description:`The secret has been created successfully.`}),i(u)}catch{k({title:`Error`,description:`Failed to create secret. Please try again.`,variant:`danger`})}},t[3]=u,t[4]=_,t[5]=c,t[6]=i,t[7]=p,t[8]=l,t[9]=y):y=t[9];let x=y,S;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,L.jsxs)(re,{children:[(0,L.jsx)(se,{children:`Add Secret`}),(0,L.jsx)(ie,{children:`Add a new secret to your environment variables.`})]}),t[10]=S):S=t[10];let C;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,L.jsx)(g,{htmlFor:`key`,children:`Key`}),t[11]=C):C=t[11];let w;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>{d(we(e.target.value))},t[12]=w):w=t[12];let T;t[13]===u?T=t[14]:(T=(0,L.jsxs)(`div`,{className:`grid gap-2`,children:[C,(0,L.jsx)(E,{id:`key`,value:u,onChange:w,placeholder:`MY_SECRET_KEY`,required:!0})]}),t[13]=u,t[14]=T);let D;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,L.jsx)(g,{htmlFor:`value`,children:`Value`}),t[15]=D):D=t[15];let O;t[16]!==c||t[17]!==p?(O=c?(0,L.jsx)(B,{id:`value`,value:p,onChange:e=>m($(e.target.value)),required:!0,className:`my-0 font-code text-xs break-all`,rows:8,autoFocus:!0,autoComplete:`off`}):(0,L.jsx)(E,{id:`value`,type:`password`,value:p,onChange:e=>m(e.target.value),required:!0,autoComplete:`off`}),t[16]=c,t[17]=p,t[18]=O):O=t[18];let A;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(A=Te()&&(0,L.jsx)(q,{children:`Note: You are sending this key over http.`}),t[19]=A):A=t[19];let j;t[20]===O?j=t[21]:(j=(0,L.jsxs)(`div`,{className:`grid gap-2`,children:[D,O,A]}),t[20]=O,t[21]=j);let M;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,L.jsx)(g,{htmlFor:`location`,children:`Location`}),t[22]=M):M=t[22];let N;t[23]===n.length?N=t[24]:(N=n.length===0&&(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No dotenv locations configured.`}),t[23]=n.length,t[24]=N);let P;t[25]!==_||t[26]!==n?(P=n.length>0&&(0,L.jsxs)(ne,{value:_,onValueChange:e=>v(e),children:[(0,L.jsx)(te,{children:(0,L.jsx)(h,{placeholder:`Select a provider`})}),(0,L.jsx)(ee,{children:n.map(Ee)})]}),t[25]=_,t[26]=n,t[27]=P):P=t[27];let R;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,L.jsxs)(q,{children:[`You can configure the location by setting the`,` `,(0,L.jsx)(Y,{href:`https://links.marimo.app/dotenv`,children:`dotenv configuration`}),`.`]}),t[28]=R):R=t[28];let z;t[29]!==N||t[30]!==P?(z=(0,L.jsxs)(`div`,{className:`grid gap-2`,children:[M,N,P,R]}),t[29]=N,t[30]=P,t[31]=z):z=t[31];let V;t[32]!==j||t[33]!==z||t[34]!==T?(V=(0,L.jsxs)(`div`,{className:`grid gap-4 py-4`,children:[T,j,z]}),t[32]=j,t[33]=z,t[34]=T,t[35]=V):V=t[35];let H;t[36]===r?H=t[37]:(H=(0,L.jsx)(b,{type:`button`,variant:`outline`,onClick:r,children:`Cancel`}),t[36]=r,t[37]=H);let U=!u||!p||!_,W;t[38]===U?W=t[39]:(W=(0,L.jsx)(b,{type:`submit`,disabled:U,children:`Add Secret`}),t[38]=U,t[39]=W);let G;t[40]!==H||t[41]!==W?(G=(0,L.jsxs)(oe,{children:[H,W]}),t[40]=H,t[41]=W,t[42]=G):G=t[42];let K;return t[43]!==x||t[44]!==V||t[45]!==G?(K=(0,L.jsx)(ae,{children:(0,L.jsxs)(`form`,{onSubmit:x,children:[S,V,G]})}),t[43]=x,t[44]=V,t[45]=G,t[46]=K):K=t[46],K};function we(e){return e.replaceAll(/\W/g,`_`)}function Te(){return window.location.href.startsWith(`http://`)}function Ee(e){return(0,L.jsx)(_,{value:e,children:e},e)}export{B as C,H as S,P as T,J as _,ye as a,G as b,_e as c,pe as d,me as f,ue as g,fe as h,be as i,ve as l,de as m,Se as n,he as o,Y as p,xe as r,ge as s,Ce as t,Z as u,K as v,z as w,V as x,W as y};
|
package/dist/index.html
CHANGED
|
@@ -66,11 +66,11 @@
|
|
|
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-vBuAUWEe.js"></script>
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-B0Z9INg1.js">
|
|
71
71
|
<link rel="modulepreload" crossorigin href="./assets/react-DVplv7_D.js">
|
|
72
72
|
<link rel="modulepreload" crossorigin href="./assets/compiler-runtime-BrajqUja.js">
|
|
73
|
-
<link rel="modulepreload" crossorigin href="./assets/useEvent-
|
|
73
|
+
<link rel="modulepreload" crossorigin href="./assets/useEvent-BDjgaBtz.js">
|
|
74
74
|
<link rel="modulepreload" crossorigin href="./assets/react-dom-_LrxgvjW.js">
|
|
75
75
|
<link rel="modulepreload" crossorigin href="./assets/schemas-ChRqMOTL.js">
|
|
76
76
|
<link rel="modulepreload" crossorigin href="./assets/isObject-BCaOs5rp.js">
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
<link rel="modulepreload" crossorigin href="./assets/objects-rLPlQ3X_.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="./assets/useEventListener-CjDeLqFC.js">
|
|
84
84
|
<link rel="modulepreload" crossorigin href="./assets/invariant-Ci2dTZ72.js">
|
|
85
|
-
<link rel="modulepreload" crossorigin href="./assets/config-
|
|
85
|
+
<link rel="modulepreload" crossorigin href="./assets/config-DpY86_Yq.js">
|
|
86
86
|
<link rel="modulepreload" crossorigin href="./assets/utils-B4K466FK.js">
|
|
87
|
-
<link rel="modulepreload" crossorigin href="./assets/session-
|
|
87
|
+
<link rel="modulepreload" crossorigin href="./assets/session-CMLIzZKw.js">
|
|
88
88
|
<link rel="modulepreload" crossorigin href="./assets/Deferred-CrTnjj37.js">
|
|
89
|
-
<link rel="modulepreload" crossorigin href="./assets/config-
|
|
89
|
+
<link rel="modulepreload" crossorigin href="./assets/config-CD1IuZFJ.js">
|
|
90
90
|
<link rel="modulepreload" crossorigin href="./assets/clsx-DB0hHKMi.js">
|
|
91
91
|
<link rel="modulepreload" crossorigin href="./assets/cn-ldLVeaqm.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="./assets/jsx-runtime-B74pBk57.js">
|
|
@@ -111,12 +111,12 @@
|
|
|
111
111
|
<link rel="modulepreload" crossorigin href="./assets/arrays-0R2reF2y.js">
|
|
112
112
|
<link rel="modulepreload" crossorigin href="./assets/once-6KNTRW0u.js">
|
|
113
113
|
<link rel="modulepreload" crossorigin href="./assets/numbers-CsZVw3Dc.js">
|
|
114
|
-
<link rel="modulepreload" crossorigin href="./assets/useDebounce-
|
|
115
|
-
<link rel="modulepreload" crossorigin href="./assets/input-
|
|
114
|
+
<link rel="modulepreload" crossorigin href="./assets/useDebounce-DwTQ_1Pu.js">
|
|
115
|
+
<link rel="modulepreload" crossorigin href="./assets/input-DmHMEZGh.js">
|
|
116
116
|
<link rel="modulepreload" crossorigin href="./assets/use-toast-Wu434mLr.js">
|
|
117
|
-
<link rel="modulepreload" crossorigin href="./assets/requests-
|
|
117
|
+
<link rel="modulepreload" crossorigin href="./assets/requests-BIFR-h4M.js">
|
|
118
118
|
<link rel="modulepreload" crossorigin href="./assets/uuid-k9DpjH68.js">
|
|
119
|
-
<link rel="modulepreload" crossorigin href="./assets/write-secret-modal-
|
|
119
|
+
<link rel="modulepreload" crossorigin href="./assets/write-secret-modal-BEx-EUlh.js">
|
|
120
120
|
<link rel="modulepreload" crossorigin href="./assets/plus-C5silF6g.js">
|
|
121
121
|
<link rel="modulepreload" crossorigin href="./assets/trash-2-DcgaW8fn.js">
|
|
122
122
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-uBIymjUX.js">
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
<link rel="modulepreload" crossorigin href="./assets/dist-DBMV4gqt.js">
|
|
125
125
|
<link rel="modulepreload" crossorigin href="./assets/capabilities-Pq1YNPlK.js">
|
|
126
126
|
<link rel="modulepreload" crossorigin href="./assets/cjs-C49f7GXV.js">
|
|
127
|
-
<link rel="modulepreload" crossorigin href="./assets/createReducer-
|
|
127
|
+
<link rel="modulepreload" crossorigin href="./assets/createReducer-CaI_Oa0v.js">
|
|
128
128
|
<link rel="modulepreload" crossorigin href="./assets/dist-qhAY4L2r.js">
|
|
129
129
|
<link rel="modulepreload" crossorigin href="./assets/marked.esm-B_3iMIUq.js">
|
|
130
130
|
<link rel="modulepreload" crossorigin href="./assets/strings-C25fhMR_.js">
|
|
@@ -136,10 +136,10 @@
|
|
|
136
136
|
<link rel="modulepreload" crossorigin href="./assets/dist-LSsCJjA3.js">
|
|
137
137
|
<link rel="modulepreload" crossorigin href="./assets/dist-DusFODSa.js">
|
|
138
138
|
<link rel="modulepreload" crossorigin href="./assets/stex-Dc5bKD4z.js">
|
|
139
|
-
<link rel="modulepreload" crossorigin href="./assets/useTheme-
|
|
140
|
-
<link rel="modulepreload" crossorigin href="./assets/useAsyncData-
|
|
139
|
+
<link rel="modulepreload" crossorigin href="./assets/useTheme-BAA27lh7.js">
|
|
140
|
+
<link rel="modulepreload" crossorigin href="./assets/useAsyncData-qvoPYHtx.js">
|
|
141
141
|
<link rel="modulepreload" crossorigin href="./assets/purify.es--06brOip.js">
|
|
142
|
-
<link rel="modulepreload" crossorigin href="./assets/cells-
|
|
142
|
+
<link rel="modulepreload" crossorigin href="./assets/cells-yOs72eZm.js">
|
|
143
143
|
<link rel="modulepreload" crossorigin href="./assets/coerce-DWjFeXOY.js">
|
|
144
144
|
<link rel="modulepreload" crossorigin href="./assets/get-DjNf4SIX.js">
|
|
145
145
|
<link rel="modulepreload" crossorigin href="./assets/_hasPath-BmRQipI0.js">
|
|
@@ -147,47 +147,47 @@
|
|
|
147
147
|
<link rel="modulepreload" crossorigin href="./assets/_baseSet-Bpdo9AvU.js">
|
|
148
148
|
<link rel="modulepreload" crossorigin href="./assets/pick-DKIID_Mo.js">
|
|
149
149
|
<link rel="modulepreload" crossorigin href="./assets/errors-CNsgAw6m.js">
|
|
150
|
-
<link rel="modulepreload" crossorigin href="./assets/config-
|
|
151
|
-
<link rel="modulepreload" crossorigin href="./assets/state-
|
|
152
|
-
<link rel="modulepreload" crossorigin href="./assets/state-
|
|
150
|
+
<link rel="modulepreload" crossorigin href="./assets/config-DMz7oN0r.js">
|
|
151
|
+
<link rel="modulepreload" crossorigin href="./assets/state-B_MCKzBL.js">
|
|
152
|
+
<link rel="modulepreload" crossorigin href="./assets/state-C5WAeuTu.js">
|
|
153
153
|
<link rel="modulepreload" crossorigin href="./assets/LazyAnyLanguageCodeMirror-BPYE76jR.js">
|
|
154
154
|
<link rel="modulepreload" crossorigin href="./assets/copy-KlhazlhB.js">
|
|
155
155
|
<link rel="modulepreload" crossorigin href="./assets/micromark-factory-space-D9Dr-k4J.js">
|
|
156
156
|
<link rel="modulepreload" crossorigin href="./assets/chunk-YOKDWASO-BIpRENEC.js">
|
|
157
|
-
<link rel="modulepreload" crossorigin href="./assets/markdown-renderer
|
|
157
|
+
<link rel="modulepreload" crossorigin href="./assets/markdown-renderer--CwVm4kJ.js">
|
|
158
158
|
<link rel="modulepreload" crossorigin href="./assets/copy-Djr5m5ac.js">
|
|
159
159
|
<link rel="modulepreload" crossorigin href="./assets/copy-icon-8-a5vovc.js">
|
|
160
|
-
<link rel="modulepreload" crossorigin href="./assets/useRunCells-
|
|
161
|
-
<link rel="modulepreload" crossorigin href="./assets/RenderHTML-
|
|
162
|
-
<link rel="modulepreload" crossorigin href="./assets/blob-
|
|
160
|
+
<link rel="modulepreload" crossorigin href="./assets/useRunCells-C_IwVJR_.js">
|
|
161
|
+
<link rel="modulepreload" crossorigin href="./assets/RenderHTML-CNDedpS4.js">
|
|
162
|
+
<link rel="modulepreload" crossorigin href="./assets/blob-DCjrjZKW.js">
|
|
163
163
|
<link rel="modulepreload" crossorigin href="./assets/kbd-pdKBv96t.js">
|
|
164
|
-
<link rel="modulepreload" crossorigin href="./assets/useInstallPackage-
|
|
164
|
+
<link rel="modulepreload" crossorigin href="./assets/useInstallPackage-wcDq9hYT.js">
|
|
165
165
|
<link rel="modulepreload" crossorigin href="./assets/share-BZW3tzEX.js">
|
|
166
166
|
<link rel="modulepreload" crossorigin href="./assets/events-CbeVJ6OD.js">
|
|
167
|
-
<link rel="modulepreload" crossorigin href="./assets/state-
|
|
168
|
-
<link rel="modulepreload" crossorigin href="./assets/ErrorBoundary-
|
|
167
|
+
<link rel="modulepreload" crossorigin href="./assets/state-BaYudep3.js">
|
|
168
|
+
<link rel="modulepreload" crossorigin href="./assets/ErrorBoundary-CdGuz4a_.js">
|
|
169
169
|
<link rel="modulepreload" crossorigin href="./assets/chevron-right-eAtVhbNZ.js">
|
|
170
170
|
<link rel="modulepreload" crossorigin href="./assets/dropdown-menu-DS6umAnH.js">
|
|
171
171
|
<link rel="modulepreload" crossorigin href="./assets/html-to-image-D_0rd3_B.js">
|
|
172
|
-
<link rel="modulepreload" crossorigin href="./assets/download-
|
|
173
|
-
<link rel="modulepreload" crossorigin href="./assets/switch-
|
|
172
|
+
<link rel="modulepreload" crossorigin href="./assets/download-CV1k4XQ4.js">
|
|
173
|
+
<link rel="modulepreload" crossorigin href="./assets/switch-DYjBfpNJ.js">
|
|
174
174
|
<link rel="modulepreload" crossorigin href="./assets/tabs-CY8E4r9U.js">
|
|
175
175
|
<link rel="modulepreload" crossorigin href="./assets/table-DG7Ap4H4.js">
|
|
176
176
|
<link rel="modulepreload" crossorigin href="./assets/eye-off-CxVozGAC.js">
|
|
177
177
|
<link rel="modulepreload" crossorigin href="./assets/refresh-cw-Qw1f8Jhy.js">
|
|
178
|
-
<link rel="modulepreload" crossorigin href="./assets/tree-actions-
|
|
178
|
+
<link rel="modulepreload" crossorigin href="./assets/tree-actions-C_KYlaSv.js">
|
|
179
179
|
<link rel="modulepreload" crossorigin href="./assets/ellipsis-63DyBLHQ.js">
|
|
180
180
|
<link rel="modulepreload" crossorigin href="./assets/external-link-UrX9KO36.js">
|
|
181
181
|
<link rel="modulepreload" crossorigin href="./assets/spinner-DyNE-o8o.js">
|
|
182
182
|
<link rel="modulepreload" crossorigin href="./assets/message-circle-C3rKm8_a.js">
|
|
183
183
|
<link rel="modulepreload" crossorigin href="./assets/hat-glasses-C8RhSVii.js">
|
|
184
184
|
<link rel="modulepreload" crossorigin href="./assets/package-GSoSTiIK.js">
|
|
185
|
-
<link rel="modulepreload" crossorigin href="./assets/datasource-
|
|
186
|
-
<link rel="modulepreload" crossorigin href="./assets/error-entries-
|
|
185
|
+
<link rel="modulepreload" crossorigin href="./assets/datasource-BakEOWsf.js">
|
|
186
|
+
<link rel="modulepreload" crossorigin href="./assets/error-entries-JgrZYMbe.js">
|
|
187
187
|
<link rel="modulepreload" crossorigin href="./assets/alert-DTaqCu_d.js">
|
|
188
|
-
<link rel="modulepreload" crossorigin href="./assets/state-
|
|
189
|
-
<link rel="modulepreload" crossorigin href="./assets/cell-link-
|
|
190
|
-
<link rel="modulepreload" crossorigin href="./assets/MarimoErrorOutput-
|
|
188
|
+
<link rel="modulepreload" crossorigin href="./assets/state-_1LTGJQM.js">
|
|
189
|
+
<link rel="modulepreload" crossorigin href="./assets/cell-link-BFbgKiRH.js">
|
|
190
|
+
<link rel="modulepreload" crossorigin href="./assets/MarimoErrorOutput-czclLlOn.js">
|
|
191
191
|
<link rel="modulepreload" crossorigin href="./assets/useDateFormatter-DA-62E-Y.js">
|
|
192
192
|
<link rel="modulepreload" crossorigin href="./assets/en-US-Buu61juQ.js">
|
|
193
193
|
<link rel="modulepreload" crossorigin href="./assets/isValid-q_Ad80ug.js">
|
|
@@ -207,13 +207,13 @@
|
|
|
207
207
|
<link rel="modulepreload" crossorigin href="./assets/table-vrvqpuKJ.js">
|
|
208
208
|
<link rel="modulepreload" crossorigin href="./assets/react-resizable-panels.browser.esm-Dbe0MrFr.js">
|
|
209
209
|
<link rel="modulepreload" crossorigin href="./assets/useStateForKey-CGMJQT8x.js">
|
|
210
|
-
<link rel="modulepreload" crossorigin href="./assets/JsonOutput-
|
|
210
|
+
<link rel="modulepreload" crossorigin href="./assets/JsonOutput-Csbov8Fx.js">
|
|
211
211
|
<link rel="modulepreload" crossorigin href="./assets/chart-no-axes-column-C4_v6fQW.js">
|
|
212
212
|
<link rel="modulepreload" crossorigin href="./assets/square-function-_W_Lo0P4.js">
|
|
213
213
|
<link rel="modulepreload" crossorigin href="./assets/spec-uCpVvaAR.js">
|
|
214
214
|
<link rel="modulepreload" crossorigin href="./assets/semaphore-BjoL5P0h.js">
|
|
215
215
|
<link rel="modulepreload" crossorigin href="./assets/fileToBase64-BgBraYAr.js">
|
|
216
|
-
<link rel="modulepreload" crossorigin href="./assets/useBoolean-
|
|
216
|
+
<link rel="modulepreload" crossorigin href="./assets/useBoolean-Dd2nWXFJ.js">
|
|
217
217
|
<link rel="modulepreload" crossorigin href="./assets/code-xml-SQaZqvcO.js">
|
|
218
218
|
<link rel="modulepreload" crossorigin href="./assets/file-headphone-Dl35U6h3.js">
|
|
219
219
|
<link rel="modulepreload" crossorigin href="./assets/file-BPBVl9pl.js">
|
|
@@ -221,24 +221,24 @@
|
|
|
221
221
|
<link rel="modulepreload" crossorigin href="./assets/file-icons-CdJgUy-I.js">
|
|
222
222
|
<link rel="modulepreload" crossorigin href="./assets/globe-UdPdIbF7.js">
|
|
223
223
|
<link rel="modulepreload" crossorigin href="./assets/esm-CI_o7NhW.js">
|
|
224
|
-
<link rel="modulepreload" crossorigin href="./assets/useAddCell-
|
|
225
|
-
<link rel="modulepreload" crossorigin href="./assets/readonly-python-code-
|
|
224
|
+
<link rel="modulepreload" crossorigin href="./assets/useAddCell-C0J8quGE.js">
|
|
225
|
+
<link rel="modulepreload" crossorigin href="./assets/readonly-python-code-DSyr-yE2.js">
|
|
226
226
|
<link rel="modulepreload" crossorigin href="./assets/data-grid-types-DgHVN_Zz.js">
|
|
227
227
|
<link rel="modulepreload" crossorigin href="./assets/glide-utils-HFqhvWHI.js">
|
|
228
|
-
<link rel="modulepreload" crossorigin href="./assets/column-preview-
|
|
228
|
+
<link rel="modulepreload" crossorigin href="./assets/column-preview-DXM8SqGY.js">
|
|
229
229
|
<link rel="modulepreload" crossorigin href="./assets/square-BPmgQFnh.js">
|
|
230
230
|
<link rel="modulepreload" crossorigin href="./assets/triangle-alert-DmIqR8sY.js">
|
|
231
231
|
<link rel="modulepreload" crossorigin href="./assets/prop-types-Djf4O40e.js">
|
|
232
232
|
<link rel="modulepreload" crossorigin href="./assets/es-N9SHpmG7.js">
|
|
233
|
-
<link rel="modulepreload" crossorigin href="./assets/package-data-
|
|
233
|
+
<link rel="modulepreload" crossorigin href="./assets/package-data-CKPmBDtg.js">
|
|
234
234
|
<link rel="modulepreload" crossorigin href="./assets/markdown-export-DzhB1FrN.js">
|
|
235
|
-
<link rel="modulepreload" crossorigin href="./assets/renderShortcut-
|
|
235
|
+
<link rel="modulepreload" crossorigin href="./assets/renderShortcut-rUwGqKgC.js">
|
|
236
236
|
<link rel="modulepreload" crossorigin href="./assets/bundle.esm-D3tw5rqW.js">
|
|
237
237
|
<link rel="modulepreload" crossorigin href="./assets/icons-CiZ_8zS-.js">
|
|
238
|
-
<link rel="modulepreload" crossorigin href="./assets/useDeepCompareMemoize-
|
|
238
|
+
<link rel="modulepreload" crossorigin href="./assets/useDeepCompareMemoize-B2DVK2De.js">
|
|
239
239
|
<link rel="modulepreload" crossorigin href="./assets/useDelayElapsed-BlsDT4TV.js">
|
|
240
240
|
<link rel="modulepreload" crossorigin href="./assets/pathUtils-DPmlLd-r.js">
|
|
241
|
-
<link rel="modulepreload" crossorigin href="./assets/floating-outline-
|
|
241
|
+
<link rel="modulepreload" crossorigin href="./assets/floating-outline-Drd73Quo.js">
|
|
242
242
|
<link rel="stylesheet" crossorigin href="./assets/cells-0PFKL3SH.css">
|
|
243
243
|
<link rel="stylesheet" crossorigin href="./assets/markdown-renderer-DjIHoF9Z.css">
|
|
244
244
|
<link rel="stylesheet" crossorigin href="./assets/JsonOutput-B0GmlMnR.css">
|
package/package.json
CHANGED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { render, screen, waitFor } from "@testing-library/react";
|
|
4
|
+
import { Provider } from "jotai";
|
|
5
|
+
import type React from "react";
|
|
6
|
+
import { describe, expect, it } from "vitest";
|
|
7
|
+
import { MockRequestClient } from "@/__mocks__/requests";
|
|
8
|
+
import type { SQLTableContext } from "@/core/datasets/data-source-connections";
|
|
9
|
+
import { PreviewSQLTableList } from "@/core/datasets/request-registry";
|
|
10
|
+
import type { SQLTableListPreview } from "@/core/kernel/messages";
|
|
11
|
+
import type { RequestId } from "@/core/network/DeferredRequestRegistry";
|
|
12
|
+
import { requestClientAtom } from "@/core/network/requests";
|
|
13
|
+
import { store } from "@/core/state/jotai";
|
|
14
|
+
import { TableList } from "../datasources";
|
|
15
|
+
|
|
16
|
+
const wrapper = ({ children }: { children: React.ReactNode }) => (
|
|
17
|
+
<Provider store={store}>{children}</Provider>
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const sqlTableContext: SQLTableContext = {
|
|
21
|
+
engine: "my_engine",
|
|
22
|
+
database: "my_db",
|
|
23
|
+
schema: "public",
|
|
24
|
+
dialect: "postgres",
|
|
25
|
+
schemaPath: ["public"],
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// The kernel answers table-list requests over the websocket, so the mock
|
|
29
|
+
// settles the deferred request instead of returning the response directly.
|
|
30
|
+
function renderDeferredTableList(settle?: (requestId: RequestId) => void) {
|
|
31
|
+
const client = MockRequestClient.create();
|
|
32
|
+
client.previewSQLTableList.mockImplementation(async ({ requestId }) => {
|
|
33
|
+
settle?.(requestId);
|
|
34
|
+
return null;
|
|
35
|
+
});
|
|
36
|
+
store.set(requestClientAtom, client);
|
|
37
|
+
render(
|
|
38
|
+
<TableList
|
|
39
|
+
tables={[]}
|
|
40
|
+
tablesResolved={false}
|
|
41
|
+
sqlTableContext={sqlTableContext}
|
|
42
|
+
/>,
|
|
43
|
+
{ wrapper },
|
|
44
|
+
);
|
|
45
|
+
return client;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
describe("TableList deferred discovery", () => {
|
|
49
|
+
it("shows the error when the request rejects", async () => {
|
|
50
|
+
renderDeferredTableList((requestId) =>
|
|
51
|
+
PreviewSQLTableList.reject(requestId, new Error("engine offline")),
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
expect(screen.getByText("Loading tables...")).toBeInTheDocument();
|
|
55
|
+
|
|
56
|
+
await waitFor(() => {
|
|
57
|
+
expect(screen.getByText("engine offline")).toBeInTheDocument();
|
|
58
|
+
});
|
|
59
|
+
expect(screen.queryByText("Loading tables...")).toBeNull();
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("shows the error when the response has no tables field", async () => {
|
|
63
|
+
renderDeferredTableList((requestId) =>
|
|
64
|
+
PreviewSQLTableList.resolve(requestId, {} as SQLTableListPreview),
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
await waitFor(() => {
|
|
68
|
+
expect(screen.getByText("No tables available")).toBeInTheDocument();
|
|
69
|
+
});
|
|
70
|
+
expect(screen.queryByText("Loading tables...")).toBeNull();
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("shows the empty state for an empty table list", async () => {
|
|
74
|
+
renderDeferredTableList((requestId) =>
|
|
75
|
+
PreviewSQLTableList.resolve(requestId, {
|
|
76
|
+
tables: [],
|
|
77
|
+
} as unknown as SQLTableListPreview),
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
await waitFor(() => {
|
|
81
|
+
expect(screen.getByText("No tables found")).toBeInTheDocument();
|
|
82
|
+
});
|
|
83
|
+
expect(screen.queryByText("Loading tables...")).toBeNull();
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
it("requests the table list with the table context and waits for the kernel", async () => {
|
|
87
|
+
let pendingRequestId: RequestId | undefined;
|
|
88
|
+
const client = renderDeferredTableList((requestId) => {
|
|
89
|
+
pendingRequestId = requestId;
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
await waitFor(() => {
|
|
93
|
+
expect(client.previewSQLTableList).toHaveBeenCalledTimes(1);
|
|
94
|
+
});
|
|
95
|
+
expect(client.previewSQLTableList).toHaveBeenCalledWith(
|
|
96
|
+
expect.objectContaining({
|
|
97
|
+
engine: "my_engine",
|
|
98
|
+
database: "my_db",
|
|
99
|
+
schema: "public",
|
|
100
|
+
schemaPath: ["public"],
|
|
101
|
+
}),
|
|
102
|
+
);
|
|
103
|
+
expect(screen.getByText("Loading tables...")).toBeInTheDocument();
|
|
104
|
+
|
|
105
|
+
// Settle the request so the process-wide registry does not keep the entry.
|
|
106
|
+
expect(pendingRequestId).toBeDefined();
|
|
107
|
+
PreviewSQLTableList.resolve(
|
|
108
|
+
pendingRequestId as RequestId,
|
|
109
|
+
{
|
|
110
|
+
tables: [],
|
|
111
|
+
} as unknown as SQLTableListPreview,
|
|
112
|
+
);
|
|
113
|
+
await waitFor(() => {
|
|
114
|
+
expect(screen.queryByText("Loading tables...")).toBeNull();
|
|
115
|
+
});
|
|
116
|
+
expect(PreviewSQLTableList.requests.size).toBe(0);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
@@ -702,7 +702,40 @@ const SchemaNode: React.FC<SchemaNodeProps> = (props) => {
|
|
|
702
702
|
);
|
|
703
703
|
};
|
|
704
704
|
|
|
705
|
-
|
|
705
|
+
// Kept outside the component because the React Compiler does not yet
|
|
706
|
+
// support try/finally inside component bodies.
|
|
707
|
+
async function loadTableList(
|
|
708
|
+
sqlTableContext: SQLTableContext,
|
|
709
|
+
addTableList: ReturnType<typeof useDataSourceActions>["addTableList"],
|
|
710
|
+
setLoading: (loading: boolean) => void,
|
|
711
|
+
) {
|
|
712
|
+
setLoading(true);
|
|
713
|
+
try {
|
|
714
|
+
const { engine, database, schema, schemaPath } = sqlTableContext;
|
|
715
|
+
const previewTableList = await PreviewSQLTableList.request({
|
|
716
|
+
engine: engine,
|
|
717
|
+
database: database,
|
|
718
|
+
schema: schema,
|
|
719
|
+
schemaPath: schemaPath ?? [],
|
|
720
|
+
});
|
|
721
|
+
|
|
722
|
+
if (!previewTableList?.tables) {
|
|
723
|
+
throw new Error("No tables available");
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
addTableList({
|
|
727
|
+
tables: previewTableList.tables,
|
|
728
|
+
sqlTableContext: sqlTableContext,
|
|
729
|
+
});
|
|
730
|
+
} finally {
|
|
731
|
+
setLoading(false);
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* This is exported for testing purposes only.
|
|
737
|
+
*/
|
|
738
|
+
export const TableList: React.FC<{
|
|
706
739
|
tables: DataTable[];
|
|
707
740
|
sqlTableContext?: SQLTableContext;
|
|
708
741
|
searchValue?: string;
|
|
@@ -731,26 +764,7 @@ const TableList: React.FC<{
|
|
|
731
764
|
// resets tablesResolved to false).
|
|
732
765
|
const { isPending, error } = useAsyncData(async () => {
|
|
733
766
|
if (!tablesResolved && sqlTableContext) {
|
|
734
|
-
setTablesLoading
|
|
735
|
-
|
|
736
|
-
const { engine, database, schema, schemaPath } = sqlTableContext;
|
|
737
|
-
const previewTableList = await PreviewSQLTableList.request({
|
|
738
|
-
engine: engine,
|
|
739
|
-
database: database,
|
|
740
|
-
schema: schema,
|
|
741
|
-
schemaPath: schemaPath ?? [],
|
|
742
|
-
});
|
|
743
|
-
|
|
744
|
-
if (!previewTableList?.tables) {
|
|
745
|
-
setTablesLoading(false);
|
|
746
|
-
throw new Error("No tables available");
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
addTableList({
|
|
750
|
-
tables: previewTableList.tables,
|
|
751
|
-
sqlTableContext: sqlTableContext,
|
|
752
|
-
});
|
|
753
|
-
setTablesLoading(false);
|
|
767
|
+
await loadTableList(sqlTableContext, addTableList, setTablesLoading);
|
|
754
768
|
}
|
|
755
769
|
}, [tablesResolved, sqlTableContext]);
|
|
756
770
|
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
import { act, renderHook } from "@testing-library/react";
|
|
4
|
+
import { atom, Provider } from "jotai";
|
|
5
|
+
import type React from "react";
|
|
6
|
+
import { describe, expect, it, vi } from "vitest";
|
|
7
|
+
import { store, useJotaiEffect, waitFor } from "../jotai";
|
|
8
|
+
|
|
9
|
+
const wrapper = ({ children }: { children: React.ReactNode }) => (
|
|
10
|
+
<Provider store={store}>{children}</Provider>
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
describe("waitFor function", () => {
|
|
14
|
+
it("should resolve when the atom satisfies the predicate", async () => {
|
|
15
|
+
const testAtom = atom(0);
|
|
16
|
+
store.set(testAtom, 10);
|
|
17
|
+
|
|
18
|
+
const result = await waitFor(testAtom, (value) => value === 10);
|
|
19
|
+
expect(result).toBe(10);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it("should resolve when the atom changes to satisfy the predicate", async () => {
|
|
23
|
+
const testAtom = atom(0);
|
|
24
|
+
|
|
25
|
+
setTimeout(() => store.set(testAtom, 15), 5);
|
|
26
|
+
setTimeout(() => store.set(testAtom, 20), 10);
|
|
27
|
+
|
|
28
|
+
const result = await waitFor(testAtom, (value) => value === 20);
|
|
29
|
+
expect(result).toBe(20);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
describe("useJotaiEffect", () => {
|
|
34
|
+
it("calls the effect with the new and previous values", () => {
|
|
35
|
+
const testAtom = atom(0);
|
|
36
|
+
const effect = vi.fn();
|
|
37
|
+
renderHook(() => useJotaiEffect(testAtom, effect), { wrapper });
|
|
38
|
+
|
|
39
|
+
act(() => store.set(testAtom, 1));
|
|
40
|
+
act(() => store.set(testAtom, 2));
|
|
41
|
+
|
|
42
|
+
expect(effect.mock.calls).toEqual([
|
|
43
|
+
[1, 0],
|
|
44
|
+
[2, 1],
|
|
45
|
+
]);
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it("calls only the latest callback after a rerender", () => {
|
|
49
|
+
const testAtom = atom(0);
|
|
50
|
+
const first = vi.fn();
|
|
51
|
+
const second = vi.fn();
|
|
52
|
+
const { rerender } = renderHook(
|
|
53
|
+
({ effect }) => useJotaiEffect(testAtom, effect),
|
|
54
|
+
{ initialProps: { effect: first }, wrapper },
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
rerender({ effect: second });
|
|
58
|
+
act(() => store.set(testAtom, 1));
|
|
59
|
+
|
|
60
|
+
expect(first).not.toHaveBeenCalled();
|
|
61
|
+
expect(second).toHaveBeenCalledTimes(1);
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("subscribes once per rerender with an inline callback", () => {
|
|
65
|
+
const testAtom = atom(0);
|
|
66
|
+
const calls: number[] = [];
|
|
67
|
+
const { rerender } = renderHook(
|
|
68
|
+
() => useJotaiEffect(testAtom, (value) => calls.push(value)),
|
|
69
|
+
{ wrapper },
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
rerender();
|
|
73
|
+
rerender();
|
|
74
|
+
act(() => store.set(testAtom, 1));
|
|
75
|
+
|
|
76
|
+
expect(calls).toEqual([1]);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it("stops listening to the previous atom when the atom changes", () => {
|
|
80
|
+
const firstAtom = atom(0);
|
|
81
|
+
const secondAtom = atom(0);
|
|
82
|
+
const effect = vi.fn();
|
|
83
|
+
const { rerender } = renderHook(
|
|
84
|
+
({ target }) => useJotaiEffect(target, effect),
|
|
85
|
+
{ initialProps: { target: firstAtom }, wrapper },
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
rerender({ target: secondAtom });
|
|
89
|
+
act(() => store.set(firstAtom, 1));
|
|
90
|
+
expect(effect).not.toHaveBeenCalled();
|
|
91
|
+
|
|
92
|
+
act(() => store.set(secondAtom, 1));
|
|
93
|
+
expect(effect).toHaveBeenCalledTimes(1);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it("unsubscribes on unmount", () => {
|
|
97
|
+
const testAtom = atom(0);
|
|
98
|
+
const effect = vi.fn();
|
|
99
|
+
const { unmount } = renderHook(() => useJotaiEffect(testAtom, effect), {
|
|
100
|
+
wrapper,
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
unmount();
|
|
104
|
+
act(() => store.set(testAtom, 1));
|
|
105
|
+
|
|
106
|
+
expect(effect).not.toHaveBeenCalled();
|
|
107
|
+
});
|
|
108
|
+
});
|
package/src/core/state/jotai.ts
CHANGED
|
@@ -42,7 +42,7 @@ export function useJotaiEffect<T>(
|
|
|
42
42
|
const store = useStore();
|
|
43
43
|
useEffect(() => {
|
|
44
44
|
let prevValue = store.get(atom);
|
|
45
|
-
store.sub(atom, () => {
|
|
45
|
+
return store.sub(atom, () => {
|
|
46
46
|
const value = store.get(atom);
|
|
47
47
|
effect(value, prevValue);
|
|
48
48
|
prevValue = value;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./feedback-button-D0HjY39R.js";export{e as FeedbackModal};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as e}from"./useEvent-Dfcbgjhg.js";import{m as t}from"./session-B8Y-GJnS.js";var n=n=>{let{children:r}=n;return e(t)?null:r},r=n=>{let{children:r}=n;return e(t)?r:null};export{r as n,n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as e}from"./session-B8Y-GJnS.js";function t(t){window.open(e(`?file=${encodeURIComponent(t)}`).toString(),`_blank`)}export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as e}from"./useEvent-Dfcbgjhg.js";var t=e(null);export{t};
|