@marimo-team/frontend 0.18.5-dev200 → 0.18.5-dev202
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-Bo1x1B6n.js → CellStatus-CJVmn-JU.js} +1 -1
- package/dist/assets/{JsonOutput-BCHaEg3R.js → JsonOutput-BLd1jTNA.js} +1 -1
- package/dist/assets/{MarimoErrorOutput-BIIhR96K.js → MarimoErrorOutput-Orp0blpZ.js} +2 -2
- package/dist/assets/{RenderHTML-BUhX0rkG.js → RenderHTML-BzGWfPTJ.js} +1 -1
- package/dist/assets/{add-cell-with-ai-CLrEdPGH.js → add-cell-with-ai-Dx5UA23s.js} +1 -1
- package/dist/assets/{add-database-form-DkSxzOXk.js → add-database-form-MNQmbAaT.js} +1 -1
- package/dist/assets/{agent-panel-Bz7HLWO3.js → agent-panel-BS2q53WX.js} +2 -2
- package/dist/assets/{ai-model-dropdown-ea-cOLAL.js → ai-model-dropdown-DZ7evAGU.js} +1 -1
- package/dist/assets/{app-config-button-BFjdAlTt.js → app-config-button-CsABtw-A.js} +1 -1
- package/dist/assets/{cell-editor-B-NH54Cv.js → cell-editor-D4tKLHiP.js} +4 -4
- package/dist/assets/{cell-link-DNVmmRzI.js → cell-link-BoUpLV2S.js} +1 -1
- package/dist/assets/{cells-Dk_j8HX9.js → cells-D_SkyFDn.js} +47 -47
- package/dist/assets/{chat-components-BMWBGknq.js → chat-components-6dWNbFjV.js} +1 -1
- package/dist/assets/{chat-display-CEYX5MXY.js → chat-display-Cfg38gMM.js} +1 -1
- package/dist/assets/{chat-panel-DmUjYxAt.js → chat-panel-CofEklYU.js} +1 -1
- package/dist/assets/{client-D08Rbi3p.js → client-BUus2uot.js} +1 -1
- package/dist/assets/{column-preview-MV5ZRt10.js → column-preview-9nPwQyJZ.js} +1 -1
- package/dist/assets/{command-gUA-HncX.js → command-Qt3ng7cb.js} +1 -1
- package/dist/assets/{command-palette-Dt43cGFk.js → command-palette-ptrGtoIl.js} +1 -1
- package/dist/assets/{common-BWR26KIv.js → common-DE3UmpZO.js} +1 -1
- package/dist/assets/{datasource-i415crE1.js → datasource-CR_zEq5o.js} +1 -1
- package/dist/assets/{dependency-graph-panel-BwaKuCE7.js → dependency-graph-panel-Dy8lj02R.js} +1 -1
- package/dist/assets/{documentation-panel-C4aTmugE.js → documentation-panel-C0769uWv.js} +1 -1
- package/dist/assets/{download-Dsuja3On.js → download-CITws1-y.js} +1 -1
- package/dist/assets/{edit-page-DIpr3pNk.js → edit-page-BC3j4y4f.js} +6 -6
- package/dist/assets/{error-panel-DCozbyWc.js → error-panel-B-EvbVVc.js} +1 -1
- package/dist/assets/{es-DjCjT1hB.js → es-CEEVxHsX.js} +1 -1
- package/dist/assets/{file-explorer-panel-BvRpCXWv.js → file-explorer-panel-BqkMxs-d.js} +1 -1
- package/dist/assets/{floating-outline-DYdnwTX9.js → floating-outline-p0aHdM2W.js} +1 -1
- package/dist/assets/{focus-U1ePwk4d.js → focus-D18AHojc.js} +1 -1
- package/dist/assets/{form-D8BW7hlS.js → form-DEraWoX5.js} +1 -1
- package/dist/assets/{globals-BBskDqJi.js → globals-D3SeIm1j.js} +1 -1
- package/dist/assets/{home-page-c43aYnLs.js → home-page-9rDRaLCP.js} +1 -1
- package/dist/assets/{index-MoQWZ3Gl.js → index-BReVmpoy.js} +3 -3
- package/dist/assets/{kiosk-mode-lhqhA8En.js → kiosk-mode-DL9UBacr.js} +1 -1
- package/dist/assets/{layout-DenYhPfS.js → layout-Bd6wzfjT.js} +1 -1
- package/dist/assets/{logs-panel-CmImbuAp.js → logs-panel-C7VsvCHz.js} +1 -1
- package/dist/assets/{markdown-renderer-COkLQ1b5.js → markdown-renderer-C_xfLXiO.js} +1 -1
- package/dist/assets/{mode-BOijHAOc.js → mode-BFwdGSZ7.js} +1 -1
- package/dist/assets/{name-cell-input-Cf2CUXDm.js → name-cell-input-CsDYsdH3.js} +1 -1
- package/dist/assets/{outline-panel-CdaUT0TE.js → outline-panel-BlhMaZpZ.js} +1 -1
- package/dist/assets/{packages-panel-CghFsvM0.js → packages-panel-YNB3ay32.js} +1 -1
- package/dist/assets/{panels-CymS0QU-.js → panels-DfOJ05Sp.js} +1 -1
- package/dist/assets/{process-output-BAfpcew-.js → process-output-4w8xDO0j.js} +1 -1
- package/dist/assets/{readonly-python-code-B8gfuyX1.js → readonly-python-code-DjP4vjBQ.js} +1 -1
- package/dist/assets/{run-page-rr9Ilre7.js → run-page-DRgXZvWr.js} +1 -1
- package/dist/assets/{scratchpad-panel-DWsu0wnU.js → scratchpad-panel-BYCWZWFJ.js} +1 -1
- package/dist/assets/{session-panel-BJRncUge.js → session-panel-C0b1PCJc.js} +1 -1
- package/dist/assets/{snippets-panel-Dv7eGWsB.js → snippets-panel-CpjS6w9M.js} +1 -1
- package/dist/assets/{state-DWEWL_KV.js → state-BTRRCWOH.js} +1 -1
- package/dist/assets/{state-HUtu_wpA.js → state-kFdt1US2.js} +1 -1
- package/dist/assets/{switch-Cd5iA-KH.js → switch-C9iBa4rX.js} +1 -1
- package/dist/assets/{textarea-jTWtOsHe.js → textarea-D2hGxqGj.js} +1 -1
- package/dist/assets/{tracing-CDJRdFd4.js → tracing-CKdq5KMT.js} +1 -1
- package/dist/assets/{tracing-panel-BrBmQCJr.js → tracing-panel-DXjACxb_.js} +2 -2
- package/dist/assets/{types-CiMSegk1.js → types-VzFAm7Cv.js} +1 -1
- package/dist/assets/{useAddCell-FisWjOQO.js → useAddCell-CVfRv5mq.js} +1 -1
- package/dist/assets/{useCellActionButton-DLwn_yx9.js → useCellActionButton-Woqd9LSB.js} +1 -1
- package/dist/assets/{useDeleteCell-CFtiNna2.js → useDeleteCell-GHwc6J4l.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-DWfKzMhf.js → useDependencyPanelTab-B0ZsFCYF.js} +1 -1
- package/dist/assets/{useNotebookActions-B4HR9n-p.js → useNotebookActions-DQW0wwU6.js} +1 -1
- package/dist/assets/{useRunCells-DLQFWY1L.js → useRunCells-BZ_OFvV4.js} +1 -1
- package/dist/assets/{useSplitCell-DDFoE9WM.js → useSplitCell-BnJiHHep.js} +1 -1
- package/dist/assets/{utilities.esm-DlnAwGsz.js → utilities.esm-FYD46c3d.js} +1 -1
- package/dist/index.html +31 -31
- package/package.json +1 -1
- package/src/components/editor/chrome/state.ts +3 -3
- package/src/components/editor/chrome/types.ts +5 -3
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +11 -4
- package/src/components/editor/chrome/wrapper/sidebar.tsx +11 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Un=Object.defineProperty;var Vn=(t,e,a)=>e in t?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var $=(t,e,a)=>Vn(t,typeof e!="symbol"?e+"":e,a);import{s as ka,t as qn}from"./chunk-LvLJmgfZ.js";import{f as Rr,i as Nr,l as Bn,n as Wn,o as Jn,u as Kn}from"./useEvent-DlWF5OMa.js";import{t as Yn}from"./react-BGmjiNul.js";import{$n as Mr,$r as Hn,At as Gn,Bn as Qn,Br as Xn,C as Pr,Cn as ei,Kr as ti,Qn as ai,Qr as jr,Sr as ri,Tt as $r,Wr as si,Xn as ni,d as ii,fn as oi,hn as li,i as di,it as Ca,pt as ui,v as Ge,yr as ci}from"./cells-
|
|
1
|
+
var Un=Object.defineProperty;var Vn=(t,e,a)=>e in t?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[e]=a;var $=(t,e,a)=>Vn(t,typeof e!="symbol"?e+"":e,a);import{s as ka,t as qn}from"./chunk-LvLJmgfZ.js";import{f as Rr,i as Nr,l as Bn,n as Wn,o as Jn,u as Kn}from"./useEvent-DlWF5OMa.js";import{t as Yn}from"./react-BGmjiNul.js";import{$n as Mr,$r as Hn,At as Gn,Bn as Qn,Br as Xn,C as Pr,Cn as ei,Kr as ti,Qn as ai,Qr as jr,Sr as ri,Tt as $r,Wr as si,Xn as ni,d as ii,fn as oi,hn as li,i as di,it as Ca,pt as ui,v as Ge,yr as ci}from"./cells-D_SkyFDn.js";import{B as Te,D as pi,E as Lr,H as mi,I as It,J as Dr,L as ee,N as Zr,O as hi,P as Q,R as k,S as fi,T as de,V as Ue,W as Fr,b as Bt,k as N,w as Ve,x as Wt}from"./zod-Cg4WLWh2.js";import{t as Ea}from"./compiler-runtime-DeeZ7FnK.js";import{i as zr}from"./useLifecycle-CmDXEyIC.js";import{d as oe,s as gi}from"./hotkeys-uKX61F1_.js";import{o as yi}from"./config-babG4OBR.js";import{t as vi}from"./jsx-runtime-DN_bIXfG.js";import{t as Qe}from"./button-DuYGqRtX.js";import{t as Ur}from"./cn-C1rgT0yh.js";import{Bt as _i,Jt,St as Kt,Ut as Vr,Vt as bi,Xt as xi,at as qr,ct as wi,lt as Br,qt as Yt,rt as Ta,xt as ki}from"./dist-CAcX026F.js";import{t as Ci}from"./createReducer-DDa-hVe3.js";import{h as Ei,n as Ti,o as Ii,r as Si}from"./dist-DKNOF5xd.js";import{r as Oi,t as Ai}from"./requests-C0HaHO6a.js";import{t as Ia}from"./createLucideIcon-CW2xpJ57.js";import{t as Ri}from"./ai-model-dropdown-DZ7evAGU.js";import{h as Ni}from"./select-D0g5GnIs.js";import{f as Mi,n as Pi,u as Wr}from"./markdown-renderer-C_xfLXiO.js";import{a as Jr,c as ji,p as $i,r as Li,t as Di}from"./dropdown-menu-BP4_BZLr.js";import{t as Zi}from"./play-BJDBXApx.js";import{n as Fi}from"./spinner-C1czjtp7.js";import{a as zi}from"./state-kFdt1US2.js";import{a as St,i as yt,o as Ot,r as vt,s as Ui,t as Vi}from"./datasource-CR_zEq5o.js";import{a as qi}from"./dist-HGZzCB0y.js";import{t as Kr}from"./use-toast-Bzf3rpev.js";import{r as Bi}from"./useTheme-DfP1CWaW.js";import{t as Wi}from"./tooltip-CvjcEpZC.js";import{s as Ji}from"./popover-DtnzNVk-.js";import{a as Ki}from"./error-banner-DU5Qb8a8.js";import{n as Yi}from"./useRunCells-BZ_OFvV4.js";import{i as Sa}from"./cell-link-BoUpLV2S.js";import{r as Hi,t as Gi}from"./es-CEEVxHsX.js";import{n as Oa}from"./renderShortcut-D0Pei-OA.js";import{t as Qi}from"./process-output-4w8xDO0j.js";import{t as Xi}from"./blob-Dg_vNTSs.js";import{t as eo}from"./useDeleteCell-GHwc6J4l.js";import{r as to,t as ao}from"./esm-B3JckBtM.js";import{n as ro}from"./icons-D4lB4En9.js";var so=Ia("at-sign",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]),no=Ia("send-horizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]),io=Ia("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]),Yr="vercel.ai.error",oo=Symbol.for(Yr),Hr,Gr,Xe=class Pn extends(Gr=Error,Hr=oo,Gr){constructor({name:e,message:a,cause:r}){super(a),this[Hr]=!0,this.name=e,this.cause=r}static isInstance(e){return Pn.hasMarker(e,Yr)}static hasMarker(e,a){let r=Symbol.for(a);return typeof e=="object"&&!!e&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Qr(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Xr="AI_InvalidArgumentError",es=`vercel.ai.error.${Xr}`,lo=Symbol.for(es),ts,as,uo=class extends(as=Xe,ts=lo,as){constructor({message:t,cause:e,argument:a}){super({name:Xr,message:t,cause:e}),this[ts]=!0,this.argument=a}static isInstance(t){return Xe.hasMarker(t,es)}},rs="AI_JSONParseError",ss=`vercel.ai.error.${rs}`,co=Symbol.for(ss),ns,is,os=class extends(is=Xe,ns=co,is){constructor({text:t,cause:e}){super({name:rs,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Qr(e)}`,cause:e}),this[ns]=!0,this.text=t}static isInstance(t){return Xe.hasMarker(t,ss)}},ls="AI_TypeValidationError",ds=`vercel.ai.error.${ls}`,po=Symbol.for(ds),us,cs,Ht=class Er extends(cs=Xe,us=po,cs){constructor({value:e,cause:a}){super({name:ls,message:`Type validation failed: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Qr(a)}`,cause:a}),this[us]=!0,this.value=e}static isInstance(e){return Xe.hasMarker(e,ds)}static wrap({value:e,cause:a}){return Er.isInstance(a)&&a.value===e?a:new Er({value:e,cause:a})}},ps=class extends Error{constructor(t,e){super(t),this.name="ParseError",this.type=e.type,this.field=e.field,this.value=e.value,this.line=e.line}};function Aa(t){}function mo(t){if(typeof t=="function")throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:e=Aa,onError:a=Aa,onRetry:r=Aa,onComment:s}=t,n="",o=!0,i,l="",d="";function u(f){let c=o?f.replace(/^\xEF\xBB\xBF/,""):f,[m,_]=ho(`${n}${c}`);for(let E of m)p(E);n=_,o=!1}function p(f){if(f===""){h();return}if(f.startsWith(":")){s&&s(f.slice(f.startsWith(": ")?2:1));return}let c=f.indexOf(":");if(c!==-1){let m=f.slice(0,c),_=f[c+1]===" "?2:1;g(m,f.slice(c+_),f);return}g(f,"",f)}function g(f,c,m){switch(f){case"event":d=c;break;case"data":l=`${l}${c}
|
|
4
4
|
`;break;case"id":i=c.includes("\0")?void 0:c;break;case"retry":/^\d+$/.test(c)?r(parseInt(c,10)):a(new ps(`Invalid \`retry\` value: "${c}"`,{type:"invalid-retry",value:c,line:m}));break;default:a(new ps(`Unknown field "${f.length>20?`${f.slice(0,20)}\u2026`:f}"`,{type:"unknown-field",field:f,value:c,line:m}));break}}function h(){l.length>0&&e({id:i,event:d||void 0,data:l.endsWith(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ue=Object.defineProperty;var Ke=(t,e,s)=>e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var ne=(t,e,s)=>Ke(t,typeof e!="symbol"?e+"":e,s);import{s as me}from"./chunk-LvLJmgfZ.js";import{t as We}from"./react-BGmjiNul.js";import{C as He,dt as Me,yn as h}from"./cells-
|
|
1
|
+
var Ue=Object.defineProperty;var Ke=(t,e,s)=>e in t?Ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var ne=(t,e,s)=>Ke(t,typeof e!="symbol"?e+"":e,s);import{s as me}from"./chunk-LvLJmgfZ.js";import{t as We}from"./react-BGmjiNul.js";import{C as He,dt as Me,yn as h}from"./cells-D_SkyFDn.js";import{D as oe,P as p,R as d,T as v,_ as ue,i as Qe,k as m,m as Ge}from"./zod-Cg4WLWh2.js";import{t as be}from"./compiler-runtime-DeeZ7FnK.js";import{S as Ve}from"./_Uint8Array-BGESiCQL.js";import{r as re}from"./useLifecycle-CmDXEyIC.js";import{r as ze,t as Je}from"./_baseEach-BH6a1vAB.js";import{f as Ye}from"./hotkeys-uKX61F1_.js";import{t as Xe}from"./jsx-runtime-DN_bIXfG.js";import{t as ie}from"./button-DuYGqRtX.js";import{t as fe}from"./cn-C1rgT0yh.js";import{c as Ze,i as et,n as tt,r as st,s as nt,t as ot}from"./select-D0g5GnIs.js";import{t as rt}from"./circle-plus-D1IRnTdM.js";import{a as ae,c as ge,o as it,p as at,r as ct,t as lt}from"./dropdown-menu-BP4_BZLr.js";import{n as dt}from"./DeferredRequestRegistry-B3BENoUa.js";import{o as ht,r as pt}from"./input-CaEtLL8p.js";import{a as mt,c as ut,d as bt,g as ft,l as gt,o as yt,p as St,s as _t,u as wt}from"./textarea-D2hGxqGj.js";import{a as xt,c as $t,l as kt,n as Ct,r as At,t as jt}from"./dialog-DUEuLcT2.js";import{n as vt}from"./ImperativeModal-q6QlC2aZ.js";import{t as Rt}from"./links-DNmjkr65.js";import{n as It}from"./useAsyncData-BJJJOr9W.js";import{o as Tt}from"./focus-D18AHojc.js";import{o as Dt,t as qt,u as i}from"./form-DEraWoX5.js";import{t as Lt}from"./request-registry-CAqj3mAX.js";import{n as Pt,t as Nt}from"./write-secret-modal-CLm48gMe.js";function Ft(t,e,s,o){for(var n=-1,a=t==null?0:t.length;++n<a;){var c=t[n];e(o,c,s(c),t)}return o}var Et=Ft;function Bt(t,e,s,o){return Je(t,function(n,a,c){e(o,n,s(n),c)}),o}var Ot=Bt;function Ut(t,e){return function(s,o){var n=Ve(s)?Et:Ot,a=e?e():{};return n(s,t,ze(o,2),a)}}var Kt=Ut(function(t,e,s){t[s?0:1].push(e)},function(){return[[],[]]});function $(){return d().optional().describe(i.of({label:"Password",inputType:"password",placeholder:"password",optionRegex:".*password.*"}))}function ce(t,e){let s=d();return s=e?s.nonempty():s.optional(),s=s.describe(i.of({label:t||"Token",inputType:"password",placeholder:"token",optionRegex:".*token.*"})),s}function G(){return d().optional().describe(i.of({label:"Warehouse Name",placeholder:"warehouse",optionRegex:".*warehouse.*"}))}function le(t,e){let s=d();return s=e?s.nonempty():s.optional(),s.describe(i.of({label:t||"URI",optionRegex:".*uri.*"}))}function x(t){return d().nonempty().describe(i.of({label:t||"Host",placeholder:"localhost",optionRegex:".*host.*"}))}function w(){return d().describe(i.of({label:"Database",placeholder:"db name",optionRegex:".*database.*"}))}function Wt(){return d().describe(i.of({label:"Schema",placeholder:"schema name",optionRegex:".*schema.*"}))}function k(){return d().nonempty().describe(i.of({label:"Username",placeholder:"username",optionRegex:".*username.*"}))}function C(t){let e=Qe().describe(i.of({label:"Port",inputType:"number",placeholder:t==null?void 0:t.toString()})).transform(Number).refine(s=>s>=0&&s<=65535,{message:"Port must be between 0 and 65535"});return t===void 0?e:e.default(t)}function ye(){return v().default(!1).describe(i.of({label:"Read Only"}))}const Se=p({type:m("postgres"),host:x(),port:C(5432).optional(),database:w(),username:k(),password:$(),ssl:v().default(!1).describe(i.of({label:"Use SSL"}))}).describe(i.of({direction:"two-columns"})),_e=p({type:m("mysql"),host:x(),port:C(3306),database:w(),username:k(),password:$(),ssl:v().default(!1).describe(i.of({label:"Use SSL"}))}).describe(i.of({direction:"two-columns"})),we=p({type:m("sqlite"),database:w().describe(i.of({label:"Database Path"}))}).describe(i.of({direction:"two-columns"})),xe=p({type:m("duckdb"),database:w().describe(i.of({label:"Database Path"})),read_only:ye()}).describe(i.of({direction:"two-columns"})),$e=p({type:m("motherduck"),database:w().default("my_db").describe(i.of({label:"Database Name"})),token:ce()}).describe(i.of({direction:"two-columns"})),ke=p({type:m("snowflake"),account:d().nonempty().describe(i.of({label:"Account",optionRegex:".*snowflake.*"})),warehouse:d().optional().describe(i.of({label:"Warehouse",optionRegex:".*snowflake.*"})),database:w(),schema:d().optional().describe(i.of({label:"Schema",optionRegex:".*snowflake.*"})),username:k(),password:$(),role:d().optional().describe(i.of({label:"Role"}))}).describe(i.of({direction:"two-columns"})),Ce=p({type:m("bigquery"),project:d().nonempty().describe(i.of({label:"Project ID",optionRegex:".*bigquery.*"})),dataset:d().nonempty().describe(i.of({label:"Dataset",optionRegex:".*bigquery.*"})),credentials_json:d().describe(i.of({label:"Credentials JSON",inputType:"textarea"}))}).describe(i.of({direction:"two-columns"})),Ae=p({type:m("clickhouse_connect"),host:x(),port:C(8123).optional(),username:k(),password:$(),secure:v().default(!1).describe(i.of({label:"Use HTTPs"}))}).describe(i.of({direction:"two-columns"})),je=p({type:m("timeplus"),host:x().default("localhost"),port:C(8123).optional(),username:k().default("default"),password:$().default("")}).describe(i.of({direction:"two-columns"})),ve=p({type:m("chdb"),database:w().describe(i.of({label:"Database Path"})),read_only:ye()}).describe(i.of({direction:"two-columns"})),Re=p({type:m("trino"),host:x(),port:C(8080),database:w(),schema:Wt().optional(),username:k(),password:$(),async_support:v().default(!1).describe(i.of({label:"Async Support"}))}).describe(i.of({direction:"two-columns"})),Ie=p({type:m("iceberg"),name:d().describe(i.of({label:"Catalog Name"})),catalog:oe("type",[p({type:m("REST"),warehouse:G(),uri:d().optional().describe(i.of({label:"URI",placeholder:"https://",optionRegex:".*uri.*"})),token:ce()}),p({type:m("SQL"),warehouse:G(),uri:d().optional().describe(i.of({label:"URI",placeholder:"jdbc:iceberg://host:port/database",optionRegex:".*uri.*"}))}),p({type:m("Hive"),warehouse:G(),uri:le()}),p({type:m("Glue"),warehouse:G(),uri:le()}),p({type:m("DynamoDB"),"dynamodb.profile-name":d().optional().describe(i.of({label:"Profile Name"})),"dynamodb.region":d().optional().describe(i.of({label:"Region"})),"dynamodb.access-key-id":d().optional().describe(i.of({label:"Access Key ID"})),"dynamodb.secret-access-key":d().optional().describe(i.of({label:"Secret Access Key",inputType:"password"})),"dynamodb.session-token":d().optional().describe(i.of({label:"Session Token",inputType:"password"}))})]).default({type:"REST",token:void 0}).describe(i.of({special:"tabs"}))}),Te=p({type:m("datafusion"),sessionContext:v().optional().describe(i.of({label:"Use Session Context"}))}),De=p({type:m("pyspark"),host:x().optional(),port:C().optional()}),qe=p({type:m("redshift"),host:x(),port:C(5439),connectionType:oe("type",[p({type:m("IAM credentials"),region:d().describe(i.of({label:"Region"})),aws_access_key_id:d().nonempty().describe(i.of({label:"AWS Access Key ID",inputType:"password",optionRegex:".*aws_access_key_id.*"})),aws_secret_access_key:d().nonempty().describe(i.of({label:"AWS Secret Access Key",inputType:"password",optionRegex:".*aws_secret_access_key.*"})),aws_session_token:d().optional().describe(i.of({label:"AWS Session Token",inputType:"password",optionRegex:".*aws_session_token.*"}))}),p({type:m("DB credentials"),user:k(),password:$()})]).default({type:"IAM credentials",aws_access_key_id:"",aws_secret_access_key:"",region:""}),database:w()}).describe(i.of({direction:"two-columns"})),Le=p({type:m("databricks"),access_token:ce("Access Token",!0),server_hostname:x("Server Hostname"),http_path:le("HTTP Path",!0),catalog:d().optional().describe(i.of({label:"Catalog"})),schema:d().optional().describe(i.of({label:"Schema"}))}).describe(i.of({direction:"two-columns"})),Pe=p({type:m("supabase"),host:x(),port:C(5432).optional(),database:w(),username:k(),password:$(),disable_client_pooling:v().default(!1).describe(i.of({label:"Disable Client-Side Pooling"}))}).describe(i.of({direction:"two-columns"})),Ht=oe("type",[Se,_e,we,xe,$e,ke,Ce,Ae,je,ve,Re,Ie,Te,De,qe,Le,Pe]);var de="env:";function tn(t){return t}function V(t){return typeof t=="string"?t.startsWith(de):!1}function he(t){return`${de}${t}`}function Mt(t){return t.replace(de,"")}const Ne={sqlmodel:"SQLModel",sqlalchemy:"SQLAlchemy",duckdb:"DuckDB",clickhouse_connect:"ClickHouse Connect",chdb:"chDB",pyiceberg:"PyIceberg",ibis:"Ibis",motherduck:"MotherDuck",redshift:"Redshift",databricks:"Databricks"};var y=class{constructor(t,e,s){this.connection=t,this.orm=e,this.secrets=s}get imports(){let t=new Set(this.generateImports());switch(this.orm){case"sqlalchemy":t.add("import sqlalchemy");break;case"sqlmodel":t.add("import sqlmodel");break;case"duckdb":t.add("import duckdb");break;case"ibis":t.add("import ibis");break}return t}},Qt=t=>`_${t}`,Gt=class{constructor(){ne(this,"secrets",{})}get imports(){return Object.keys(this.secrets).length===0?new Set:new Set(["import os"])}print(t,e,s){if(t=Qt(t),V(e)){let o=Mt(e),n=s?`os.environ.get("${o}", "${s}")`:`os.environ.get("${o}")`;return this.secrets[t]=n,t}if(s!=null){let o=`os.environ.get("${e}", "${s}")`;return this.secrets[t]=o,t}return typeof e=="number"||typeof e=="number"?`${e}`:typeof e=="boolean"?U(e):e?`"${e}"`:""}printInFString(t,e,s){if(e===void 0)return"";if(typeof e=="number")return`${e}`;if(typeof e=="boolean")return U(e);let o=this.print(t,e,s);return o.startsWith('"')&&o.endsWith('"')?o.slice(1,-1):`{${o}}`}printPassword(t,e,s,o){let n=s?this.printInFString.bind(this):this.print.bind(this);return V(t)?n(o||"password",t):n(o||"password",e,t)}getSecrets(){return this.secrets}formatSecrets(){return Object.keys(this.secrets).length===0?"":Object.entries(this.secrets).map(([t,e])=>`${t} = ${e}`).join(`
|
|
2
2
|
`)}},Vt=class extends y{generateImports(){return[]}generateConnectionCode(){let t=this.connection.ssl?", connect_args={'sslmode': 'require'}":"",e=this.secrets.printPassword(this.connection.password,"POSTGRES_PASSWORD",!0);return h(`
|
|
3
3
|
DATABASE_URL = f"postgresql://${this.secrets.printInFString("username",this.connection.username)}:${e}@${this.secrets.printInFString("host",this.connection.host)}:${this.secrets.printInFString("port",this.connection.port)}/${this.secrets.printInFString("database",this.connection.database)}"
|
|
4
4
|
engine = ${this.orm}.create_engine(DATABASE_URL${t})
|