@marimo-team/islands 0.25.1-dev2 → 0.25.1-dev20
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/{ConnectedDataExplorerComponent-KVhjDMSe.js → ConnectedDataExplorerComponent-CwMXfDQR.js} +3 -3
- package/dist/{ErrorBoundary-DO0ie20N.js → ErrorBoundary-BU3l6Hi2.js} +1 -1
- package/dist/{abnfDiagram-VCTEODGH-CpN0FRda.js → abnfDiagram-VCTEODGH-AFhOQTt8.js} +3 -3
- package/dist/{architectureDiagram-5GKGNRK7-DDyj5SRB.js → architectureDiagram-5GKGNRK7-BngksAAQ.js} +5 -5
- package/dist/{blockDiagram-I7D4REHJ-BbXEXJRu.js → blockDiagram-I7D4REHJ-CvBmppdy.js} +9 -9
- package/dist/{c4Diagram-7LVT6UL2-DcLsbQmR.js → c4Diagram-7LVT6UL2-EceL4_jH.js} +7 -7
- package/dist/{cells-DYIkSxs6.js → cells-Cksce8br.js} +4123 -4150
- package/dist/{channel-B5XnTarr.js → channel-z7HZXHwv.js} +1 -1
- package/dist/{chat-ui-BXj3uYjy.js → chat-ui-ruucqBTA.js} +45 -45
- package/dist/{chunk-4HAMMTFA-D2qv8E0X.js → chunk-4HAMMTFA-BPTTOOC5.js} +5 -5
- package/dist/{chunk-75Z2AOVW-5_HsvXwr.js → chunk-75Z2AOVW-C4AOleKf.js} +1 -1
- package/dist/{chunk-DU6HZSFF-BUgAHvnM.js → chunk-DU6HZSFF-1TwWR6gh.js} +1 -1
- package/dist/{chunk-F27PBJKO-DHmYWZXr.js → chunk-F27PBJKO-DMI1PBe4.js} +1 -1
- package/dist/{chunk-GMAD6QVW-Czynz8aA.js → chunk-GMAD6QVW-vStrMz2P.js} +3 -3
- package/dist/{chunk-GVQU2GXP-yQEdulRS.js → chunk-GVQU2GXP-2HwWgs4u.js} +2 -2
- package/dist/{chunk-IMKFNOWR-BfwTebD0.js → chunk-IMKFNOWR-UOVZuZVn.js} +5 -5
- package/dist/{chunk-L3NEJ4N5-DwRWnDDK.js → chunk-L3NEJ4N5-RhC7i0I2.js} +5 -5
- package/dist/{chunk-OSK3NFVY-BBKU_Ign.js → chunk-OSK3NFVY-CZV09N-U.js} +6 -6
- package/dist/{chunk-P2QGCYS3-C0iGU29N.js → chunk-P2QGCYS3-0TAWai9C.js} +1 -1
- package/dist/{chunk-POPQ4Y6H-BCbS3Ozc.js → chunk-POPQ4Y6H-Cc3_56GX.js} +1 -1
- package/dist/{chunk-PWAF6VOD-CTFCL0jI.js → chunk-PWAF6VOD-lNxB9k8z.js} +1 -1
- package/dist/{chunk-SHT3W25Y-BspJEJ5H.js → chunk-SHT3W25Y-CrEPyWy1.js} +7 -7
- package/dist/{chunk-SVP7TREG-DX3rFNTe.js → chunk-SVP7TREG-uIyyySp6.js} +2 -2
- package/dist/{chunk-TICWLB2K-fVF7Uujg.js → chunk-TICWLB2K-DdXM3eg6.js} +5 -5
- package/dist/classDiagram-ZZMXUADV-BiATbBE4.js +30 -0
- package/dist/classDiagram-v2-VYDZK3BY-JnH97GYw.js +30 -0
- package/dist/{code-visibility-64_ACQvC.js → code-visibility-DDDujOI0.js} +17 -17
- package/dist/{common-LlPE7GR6.js → common-BkYqr2IQ.js} +620 -620
- package/dist/{cynefinDiagram-5FMLGOSQ-CFQrqzSX.js → cynefinDiagram-5FMLGOSQ-zknaAsGy.js} +3 -3
- package/dist/{dagre-GXQ25YYZ-xHNAUTyG.js → dagre-GXQ25YYZ-BhMOoMGJ.js} +10 -10
- package/dist/{data-grid-overlay-editor-BUvmnptP.js → data-grid-overlay-editor-3APq_6Z0.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-Bt1rPbAx.js → diagram-S7CK7UJ4-V5-Z-EDY.js} +4 -4
- package/dist/{diagram-UQ7AKVKN-D1sq5FoZ.js → diagram-UQ7AKVKN-qw8AjDal.js} +3 -3
- package/dist/{diagram-VSXAHHWV-BKpmG23x.js → diagram-VSXAHHWV-CR7BJygZ.js} +2 -2
- package/dist/{diagram-VX7I27RA-BMwGFVD6.js → diagram-VX7I27RA-DfuqFb1E.js} +5 -5
- package/dist/{diagram-Z3DM3KII--KLDR9Pl.js → diagram-Z3DM3KII-DpWwlYZB.js} +3 -3
- package/dist/{dist-BaHjhkpZ.js → dist-CcyKTBTF.js} +1 -1
- package/dist/{ebnfDiagram-PWID7BFC-WnG4cvSQ.js → ebnfDiagram-PWID7BFC-C20OnNMZ.js} +3 -3
- package/dist/{erDiagram-RLTQ6QDP-DhzKiYHc.js → erDiagram-RLTQ6QDP-DBXLWO9v.js} +12 -12
- package/dist/{error-entries-C0NsUqXl.js → error-entries-CvCFdpY2.js} +18 -18
- package/dist/{feedback-button-B98mEc3M.js → feedback-button-DWSXRUAw.js} +19 -19
- package/dist/flowDiagram-HODETNUW-DL52nMkt.js +16 -0
- package/dist/{formats-BR5iGb4s.js → formats-Cl_67ghI.js} +2 -2
- package/dist/{ganttDiagram-EL5Y4UJY-DbzEBLbl.js → ganttDiagram-EL5Y4UJY-cRRaDt88.js} +2 -2
- package/dist/{gitGraphDiagram-WWUBYQGX-BMf0iKi1.js → gitGraphDiagram-WWUBYQGX-Pox5k9-Y.js} +2 -2
- package/dist/{glide-data-editor-CBIPbkXG.js → glide-data-editor-DGmuodBB.js} +3 -3
- package/dist/{globals-VpAtGRbg.js → globals-ciicQhoq.js} +1 -1
- package/dist/{html-to-image-CeYYvQNb.js → html-to-image-CcfkLMrx.js} +32 -31
- package/dist/{infoDiagram-27XIBGKW-BagtCX_5.js → infoDiagram-27XIBGKW-ntpxMfrq.js} +2 -2
- package/dist/{ishikawaDiagram-5VMMS53U-DByDehYy.js → ishikawaDiagram-5VMMS53U-BllIlHE5.js} +3 -3
- package/dist/{journeyDiagram-3NMN7TZE-D2LcKDUO.js → journeyDiagram-3NMN7TZE-EPJDPlt0.js} +2 -2
- package/dist/{kanban-definition-UXKFOSKX-BxwkbBI_.js → kanban-definition-UXKFOSKX-GYtNMjtS.js} +9 -9
- package/dist/{katex-C6D4cX_N.js → katex-BNCmKUol.js} +983 -1120
- package/dist/{loader-D2W4oM-3.js → loader-DEZSzvma.js} +253 -248
- package/dist/main.js +622 -620
- package/dist/{mermaid-DPNuhemn.js → mermaid-Dnzoxjt1.js} +49 -49
- package/dist/{mhchem-DWCF06w9.js → mhchem-BEc7A1or.js} +1 -1
- package/dist/{mindmap-definition-YA3MSWOX-Cgvojw3y.js → mindmap-definition-YA3MSWOX-Cth76xgH.js} +11 -11
- package/dist/{number-overlay-editor-ClZmv3Qw.js → number-overlay-editor-CcdYLWWR.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-DahHhYyN.js → pegDiagram-XKGWAZYB-Cu4uOXii.js} +3 -3
- package/dist/{pieDiagram-E7YTZNPT-CCtX0oCK.js → pieDiagram-E7YTZNPT-Bh3eDa9s.js} +3 -3
- package/dist/{process-output-BCTjlyuH.js → process-output-C6apL85F.js} +2 -2
- package/dist/{quadrantDiagram-AXDQQJYC-DftINo6g.js → quadrantDiagram-AXDQQJYC--kqzFC3w.js} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-Du5NsPUb.js → railroadDiagram-O6MQD6OU-DG-M6Rnc.js} +3 -3
- package/dist/{react-vega-5AcMW8gG.js → react-vega-ewj7q_U5.js} +1 -1
- package/dist/{requirementDiagram-BXWQKSXE-0pmmxL6_.js → requirementDiagram-BXWQKSXE-DCwsThh0.js} +11 -11
- package/dist/{reveal-component-C1s_K6O8.js → reveal-component-DUPORxps.js} +744 -743
- package/dist/{sankeyDiagram-P5KCCOFB-CDKR5TJH.js → sankeyDiagram-P5KCCOFB-BdzhT0BM.js} +1 -1
- package/dist/{sequenceDiagram-WJ2MYXX4-DB-ChWwU.js → sequenceDiagram-WJ2MYXX4-CbXB1_PU.js} +4 -4
- package/dist/{stateDiagram-D77RDMKH-orN6AwMx.js → stateDiagram-D77RDMKH-A-Zf3Sb2.js} +13 -13
- package/dist/stateDiagram-v2-MP3YSRHH-D9YMnUGx.js +30 -0
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-BkSDcqDT.js → swimlanes-42K2YHIH-B_pMf0J4.js} +10 -10
- package/dist/swimlanesDiagram-VR7AAH4N-Ctgy-yGP.js +30 -0
- package/dist/{timeline-definition-24CTP7MA-BuqJUIRZ.js → timeline-definition-24CTP7MA-DTXFjTTM.js} +3 -3
- package/dist/{toDate-WXg1yLcI.js → toDate-C67bxMWn.js} +139 -111
- package/dist/{vega-component-D0QXopU8.js → vega-component-tFOzgarw.js} +12 -12
- package/dist/{vega-embed-container-CbnTccZi.js → vega-embed-container-sSR5hAsy.js} +2 -2
- package/dist/{vega-loader.browser-D95WfUcj.js → vega-loader.browser-DNST6uVf.js} +2 -2
- package/dist/{vennDiagram-4TSXK5OY-CTUlJ2PK.js → vennDiagram-4TSXK5OY-BPHjZo0R.js} +3 -3
- package/dist/{wardleyDiagram-VM6X3IG4-3evLUb0M.js → wardleyDiagram-VM6X3IG4-6fTLYBuD.js} +3 -3
- package/dist/{xychartDiagram-S5SC5T6Z-DL2E3K8-.js → xychartDiagram-S5SC5T6Z-BYjwjrzE.js} +5 -5
- package/package.json +1 -2
- package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +286 -0
- package/src/components/data-table/charts/charts.tsx +26 -13
- package/src/components/editor/chrome/components/contribute-snippet-button.tsx +6 -1
- package/src/components/editor/notebook-cell.tsx +2 -2
- package/src/components/editor/output/MarimoTracebackOutput.tsx +1 -1
- package/src/components/editor/output/VideoOutput.tsx +1 -1
- package/src/components/editor/output/ansi-reduce.ts +8 -4
- package/src/components/editor/output/console/text-rendering.tsx +3 -1
- package/src/components/home/components.tsx +1 -0
- package/src/components/pages/run-page.tsx +1 -0
- package/src/components/static-html/share-modal.tsx +2 -1
- package/src/components/static-html/static-banner.tsx +2 -2
- package/src/components/ui/links.tsx +6 -1
- package/src/components/ui/typography.tsx +16 -8
- package/src/core/kernel/__tests__/session.test.ts +110 -1
- package/src/core/kernel/session.ts +46 -15
- package/src/css/globals.css +18 -21
- package/src/css/katex.min.css +260 -241
- package/src/plugins/impl/vega/__tests__/utils.test.ts +16 -1
- package/src/plugins/impl/vega/__tests__/vega.test.ts +37 -0
- package/src/plugins/impl/vega/loader.ts +23 -1
- package/src/plugins/impl/vega/utils.ts +5 -4
- package/src/plugins/layout/RoutesPlugin.tsx +4 -6
- package/dist/classDiagram-ZZMXUADV-Fe-V14Sc.js +0 -30
- package/dist/classDiagram-v2-VYDZK3BY-xTDg7lOs.js +0 -30
- package/dist/flowDiagram-HODETNUW-6dMdB8pR.js +0 -16
- package/dist/katex-DFBiSucW.js +0 -21840
- package/dist/stateDiagram-v2-MP3YSRHH-o05_rJN8.js +0 -30
- package/dist/swimlanesDiagram-VR7AAH4N-D_nFQfRc.js +0 -30
package/dist/main.js
CHANGED
|
@@ -3,20 +3,20 @@ import { _ as a, c as o, f as s, g as c, h as l, i as u, l as d, m as f, n as p,
|
|
|
3
3
|
import { t as y } from "./react-ofJbxM4x.js";
|
|
4
4
|
import { t as b } from "./compiler-runtime-Cj8ZWiNS.js";
|
|
5
5
|
import { i as x, n as S, r as C, t as w } from "./copy-icon-CLdENY__.js";
|
|
6
|
-
import { C as T, F as E, G as D, I as O, J as k, K as A, L as j, P as M, R as N, X as P, Z as F, _ as I, a as L, b as R, g as ee, i as z, j as te, k as B, n as ne, o as re, q as ie, v as ae, y as oe } from "./html-to-image-
|
|
6
|
+
import { C as T, F as E, G as D, I as O, J as k, K as A, L as j, P as M, R as N, X as P, Z as F, _ as I, a as L, b as R, g as ee, i as z, j as te, k as B, n as ne, o as re, q as ie, v as ae, y as oe } from "./html-to-image-CcfkLMrx.js";
|
|
7
7
|
import { a as se, f as ce, g as V, i as le, n as ue, o as de, p as fe, r as pe, t as me } from "./tooltip-qB8NlSqV.js";
|
|
8
|
-
import { $ as he, $t as ge,
|
|
9
|
-
import { D as
|
|
10
|
-
import { $t as
|
|
11
|
-
import { c as
|
|
12
|
-
import { t as
|
|
13
|
-
import { A as
|
|
14
|
-
import { B as
|
|
15
|
-
import { _ as
|
|
16
|
-
import { a as wa, c as Ta, d as Ea, f as Da, i as Oa, l as ka, n as Aa, o as ja, r as Ma, s as Na, t as Pa } from "./process-output-
|
|
8
|
+
import { $ as he, $t as ge, B as _e, Bt as ve, C as ye, Ct as be, D as xe, Dt as Se, Et as Ce, F as we, G as Te, Gt as Ee, Ht as De, I as Oe, J as ke, Jt as Ae, Kt as je, L as Me, O as Ne, Ot as Pe, P as Fe, Pt as Ie, Q as Le, Qt as Re, Rt as ze, S as Be, St as Ve, T as He, Tt as Ue, U as We, W as Ge, Wt as Ke, bt as qe, c as Je, cn as Ye, ct as Xe, d as Ze, dn as Qe, dt as $e, en as et, f as tt, fn as nt, ft as rt, g as it, gt as at, h as ot, hn as st, k as ct, l as lt, ln as ut, m as dt, mn as ft, n as pt, o as mt, on as ht, ot as gt, p as _t, q as vt, qt as yt, r as bt, rn as xt, rt as St, sn as Ct, st as wt, tn as Tt, u as Et, v as Dt, w as Ot, wt as kt, zt as At } from "./cells-Cksce8br.js";
|
|
9
|
+
import { D as jt, E as Mt, O as Nt, S as Pt, T as Ft, _ as It, a as Lt, c as Rt, d as zt, f as Bt, g as Vt, h as Ht, i as Ut, l as Wt, m as Gt, n as Kt, o as qt, p as Jt, r as Yt, s as Xt, t as Zt, u as Qt, v as $t, w as en, x as tn, y as nn } from "./spec-CAYwFeV6.js";
|
|
10
|
+
import { $t as rn, A as an, At as on, B as sn, Bt as cn, C as ln, Ct as un, D as dn, Dt as fn, E as pn, Et as mn, F as hn, Ft as gn, G as _n, Gt as vn, H as yn, Ht as bn, I as xn, It as Sn, J as Cn, Jt as wn, K as Tn, Kt as En, L as Dn, Lt as On, M as kn, Mt as An, N as jn, Nt as Mn, O as Nn, Ot as Pn, P as Fn, Pt as In, Qt as Ln, R as Rn, Rt as zn, S as Bn, St as Vn, T as Hn, Tt as Un, U as Wn, Ut as Gn, V as Kn, Vt as qn, W as Jn, Wt as Yn, X as Xn, Xt as Zn, Y as Qn, Yt as $n, Zt as er, _ as tr, _t as nr, an as rr, at as ir, b as ar, c as or, cn as sr, ct as cr, d as lr, dn as ur, dt as dr, en as fr, et as pr, f as mr, fn as hr, ft as gr, g as _r, gt as vr, h as yr, hn as br, ht as xr, in as Sr, it as Cr, j as wr, jt as Tr, k as Er, kt as Dr, ln as Or, lt as kr, m as Ar, mn as jr, mt as Mr, nn as Nr, nt as Pr, ot as Fr, p as Ir, pn as Lr, pt as Rr, q as zr, qt as Br, r as Vr, rn as Hr, rt as Ur, sn as Wr, st as Gr, t as Kr, tn as qr, tt as Jr, u as Yr, un as Xr, ut as Zr, v as Qr, vt as $r, w as ei, wt as ti, x as ni, y as ri, yt as ii, z as ai, zt as oi } from "./common-BkYqr2IQ.js";
|
|
11
|
+
import { c as si, i as ci, n as li, o as ui, t as di } from "./useLifecycle-DPgiiwwU.js";
|
|
12
|
+
import { t as fi } from "./check-B7cIK6gb.js";
|
|
13
|
+
import { A as pi, C as mi, D as hi, E as gi, M as _i, O as vi, S as yi, T as bi, a as xi, b as Si, c as Ci, i as wi, k as Ti, l as Ei, n as Di, o as Oi, r as ki, s as Ai, t as ji, w as Mi, x as Ni } from "./select-C6plhmZr.js";
|
|
14
|
+
import { B as Pi, C as Fi, J as Ii, Mt as Li, Nt as Ri, S as zi, Vt as Bi, W as Vi, _ as Hi, a as Ui, at as Wi, c as Gi, dt as Ki, f as qi, fn as Ji, g as Yi, h as Xi, i as Zi, it as Qi, m as $i, n as ea, p as ta, pn as na, q as ra, r as ia, s as aa, t as oa, v as sa, vt as ca, x as la, z as ua } from "./dropdown-menu-CZgjYSAh.js";
|
|
15
|
+
import { C as da, S as fa, T as pa, _ as ma, c as ha, d as ga, f as _a, g as va, h as ya, m as ba, u as xa, x as Sa, y as Ca } from "./toDate-C67bxMWn.js";
|
|
16
|
+
import { a as wa, c as Ta, d as Ea, f as Da, i as Oa, l as ka, n as Aa, o as ja, r as Ma, s as Na, t as Pa } from "./process-output-C6apL85F.js";
|
|
17
17
|
import { a as Fa, c as Ia, d as La, i as Ra, l as za, r as Ba, u as Va } from "./glide-utils-B3rUT5PI.js";
|
|
18
|
-
import { n as Ha, t as Ua } from "./ErrorBoundary-
|
|
19
|
-
import { n as Wa, t as Ga } from "./globals-
|
|
18
|
+
import { n as Ha, t as Ua } from "./ErrorBoundary-BU3l6Hi2.js";
|
|
19
|
+
import { n as Wa, t as Ga } from "./globals-ciicQhoq.js";
|
|
20
20
|
import { t as Ka } from "./react-dom-BUgJ-ab_.js";
|
|
21
21
|
import { t as qa } from "./jsx-runtime-DgDPJV9S.js";
|
|
22
22
|
import { B as Ja, C as H, Ct as Ya, D as Xa, E as Za, Et as Qa, F as U, G as $a, H as eo, I as to, L as no, M as W, N as ro, O as io, P as ao, Q as oo, R as so, S as G, St as co, Tt as lo, U as uo, W as fo, Y as po, Z as mo, _ as ho, a as go, b as _o, bt as vo, c as yo, d as bo, dt as xo, f as So, g as Co, gt as wo, h as To, i as Eo, j as K, k as Do, l as Oo, m as ko, n as Ao, o as jo, p as Mo, r as No, s as Po, u as Fo, v as Io, vt as Lo, w as Ro, wt as zo, x as Bo, xt as Vo, y as Ho, yt as Uo } from "./use-restore-focus-D5D9xEjZ.js";
|
|
@@ -37,10 +37,10 @@ import { n as ks } from "./dist-BRxfaJgs.js";
|
|
|
37
37
|
import { i as As } from "./dist-C2KzV-vf.js";
|
|
38
38
|
import { n as js, t as Ms } from "./esm-h8f7-1CJ.js";
|
|
39
39
|
import { t as Ns } from "./useAsyncData-BD6AStMt.js";
|
|
40
|
-
import { i as Ps, n as Fs, r as Is } from "./formats-
|
|
41
|
-
import { M as Ls, N as Rs } from "./vega-loader.browser-
|
|
42
|
-
import { a as zs, n as Bs } from "./loader-
|
|
43
|
-
import { c as Vs, d as Hs, i as Us, l as Ws, o as Gs, s as Ks, t as qs, u as Js } from "./code-visibility-
|
|
40
|
+
import { i as Ps, n as Fs, r as Is } from "./formats-Cl_67ghI.js";
|
|
41
|
+
import { M as Ls, N as Rs } from "./vega-loader.browser-DNST6uVf.js";
|
|
42
|
+
import { a as zs, n as Bs } from "./loader-DEZSzvma.js";
|
|
43
|
+
import { c as Vs, d as Hs, i as Us, l as Ws, o as Gs, s as Ks, t as qs, u as Js } from "./code-visibility-DDDujOI0.js";
|
|
44
44
|
import { t as Ys } from "./useDeepCompareMemoize-D_HNdyvI.js";
|
|
45
45
|
import { t as Xs } from "./esm-BElI3qKH.js";
|
|
46
46
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
@@ -1859,8 +1859,8 @@ var { enableCache: tu, disableCache: nu, iconLoaded: ru, iconExists: iu, getIcon
|
|
|
1859
1859
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
1860
1860
|
key: "ih7n3h"
|
|
1861
1861
|
}]
|
|
1862
|
-
]), J = /* @__PURE__ */ e(y(), 1), sd = /* @__PURE__ */ e(Ka(), 1), Y = qa(), cd = "NavigationMenu", [ld, ud, dd] =
|
|
1863
|
-
let { __scopeNavigationMenu: n, value: r, onValueChange: i, defaultValue: a, delayDuration: o = 200, skipDelayDuration: s = 300, orientation: c = "horizontal", dir: l, ...u } = e, [d, f] = J.useState(null), p = h(t, (e) => f(e)), m =
|
|
1862
|
+
]), J = /* @__PURE__ */ e(y(), 1), sd = /* @__PURE__ */ e(Ka(), 1), Y = qa(), cd = "NavigationMenu", [ld, ud, dd] = Ti(cd), [fd, pd, md] = Ti(cd), [hd, gd] = zo(cd, [dd, md]), [_d, vd] = hd(cd), [yd, bd] = hd(cd), xd = J.forwardRef((e, t) => {
|
|
1863
|
+
let { __scopeNavigationMenu: n, value: r, onValueChange: i, defaultValue: a, delayDuration: o = 200, skipDelayDuration: s = 300, orientation: c = "horizontal", dir: l, ...u } = e, [d, f] = J.useState(null), p = h(t, (e) => f(e)), m = vi(l), g = J.useRef(0), _ = J.useRef(0), v = J.useRef(0), [y, b] = J.useState(!0), [x, S] = Vo({
|
|
1864
1864
|
prop: r,
|
|
1865
1865
|
onChange: (e) => {
|
|
1866
1866
|
let t = e !== "", n = s > 0;
|
|
@@ -1944,7 +1944,7 @@ var wd = (e) => {
|
|
|
1944
1944
|
isRootMenu: n,
|
|
1945
1945
|
rootNavigationMenu: r,
|
|
1946
1946
|
value: s,
|
|
1947
|
-
previousValue:
|
|
1947
|
+
previousValue: hi(s),
|
|
1948
1948
|
baseId: Uo(),
|
|
1949
1949
|
dir: i,
|
|
1950
1950
|
orientation: a,
|
|
@@ -2425,7 +2425,7 @@ var sf = xd, cf = Ed, lf = Ad, uf = Md, df = Fd, ff = Ld, pf = Bd, mf = Gd, hf =
|
|
|
2425
2425
|
"ArrowUp",
|
|
2426
2426
|
"ArrowLeft"
|
|
2427
2427
|
]
|
|
2428
|
-
}, vf = "Slider", [yf, bf, xf] =
|
|
2428
|
+
}, vf = "Slider", [yf, bf, xf] = Ti(vf), [Sf, Cf] = zo(vf, [xf]), [wf, Tf] = Sf(vf), Ef = J.forwardRef((e, t) => {
|
|
2429
2429
|
let { name: n, min: r = 0, max: i = 100, step: a = 1, orientation: o = "horizontal", disabled: s = !1, minStepsBetweenThumbs: c = 0, defaultValue: l = [r], value: u, onValueChange: d = () => {}, onValueCommit: f = () => {}, inverted: p = !1, form: m, ...h } = e, g = J.useRef(/* @__PURE__ */ new Set()), _ = J.useRef(0), v = o === "horizontal" ? kf : Af, [y = [], b] = Vo({
|
|
2430
2430
|
prop: u,
|
|
2431
2431
|
defaultProp: l,
|
|
@@ -2444,7 +2444,7 @@ var sf = xd, cf = Ed, lf = Ad, uf = Md, df = Fd, ff = Ld, pf = Bd, mf = Gd, hf =
|
|
|
2444
2444
|
y[_.current] !== e && f(y);
|
|
2445
2445
|
}
|
|
2446
2446
|
function T(e, t, { commit: n } = { commit: !1 }) {
|
|
2447
|
-
let o = Yf(a), s = Xf(Math.round((e - r) / a) * a + r, o), l =
|
|
2447
|
+
let o = Yf(a), s = Xf(Math.round((e - r) / a) * a + r, o), l = gi(s, [r, i]);
|
|
2448
2448
|
b((e = []) => {
|
|
2449
2449
|
let r = Vf(e, l, t);
|
|
2450
2450
|
if (qf(r, c * a)) {
|
|
@@ -2504,7 +2504,7 @@ var [Df, Of] = Sf(vf, {
|
|
|
2504
2504
|
size: "width",
|
|
2505
2505
|
direction: 1
|
|
2506
2506
|
}), kf = J.forwardRef((e, t) => {
|
|
2507
|
-
let { min: n, max: r, dir: i, inverted: a, onSlideStart: o, onSlideMove: s, onSlideEnd: c, onStepKeyDown: l, ...u } = e, [d, f] = J.useState(null), p = h(t, (e) => f(e)), m = J.useRef(void 0), g =
|
|
2507
|
+
let { min: n, max: r, dir: i, inverted: a, onSlideStart: o, onSlideMove: s, onSlideEnd: c, onStepKeyDown: l, ...u } = e, [d, f] = J.useState(null), p = h(t, (e) => f(e)), m = J.useRef(void 0), g = vi(i), _ = g === "ltr", v = _ && !a || !_ && a;
|
|
2508
2508
|
function y(e) {
|
|
2509
2509
|
let t = m.current || d.getBoundingClientRect(), i = Jf([0, t.width], v ? [n, r] : [r, n]);
|
|
2510
2510
|
return m.current = t, i(e - t.left);
|
|
@@ -2676,7 +2676,7 @@ var If = "SliderThumb", Lf = J.forwardRef((e, t) => {
|
|
|
2676
2676
|
});
|
|
2677
2677
|
Lf.displayName = If;
|
|
2678
2678
|
var zf = "RadioBubbleInput", Bf = J.forwardRef(({ __scopeSlider: e, value: t, ...n }, r) => {
|
|
2679
|
-
let i = J.useRef(null), a = h(i, r), o =
|
|
2679
|
+
let i = J.useRef(null), a = h(i, r), o = hi(t);
|
|
2680
2680
|
return J.useEffect(() => {
|
|
2681
2681
|
let e = i.current;
|
|
2682
2682
|
if (!e) return;
|
|
@@ -2699,7 +2699,7 @@ function Vf(e = [], t, n) {
|
|
|
2699
2699
|
}
|
|
2700
2700
|
function Hf(e, t, n) {
|
|
2701
2701
|
let r = 100 / (n - t) * (e - t);
|
|
2702
|
-
return
|
|
2702
|
+
return gi(r, [0, 100]);
|
|
2703
2703
|
}
|
|
2704
2704
|
function Uf(e, t) {
|
|
2705
2705
|
if (t > 2) return `Value ${e + 1} of ${t}`;
|
|
@@ -2762,15 +2762,15 @@ var rp = np;
|
|
|
2762
2762
|
//#endregion
|
|
2763
2763
|
//#region ../node_modules/.pnpm/@react-aria+button@3.14.5_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@react-aria/button/dist/useToggleButton.mjs
|
|
2764
2764
|
function ip(e, t, n) {
|
|
2765
|
-
let { isSelected: r } = t, { isPressed: i, buttonProps: a } =
|
|
2765
|
+
let { isSelected: r } = t, { isPressed: i, buttonProps: a } = Wi({
|
|
2766
2766
|
...e,
|
|
2767
|
-
onPress:
|
|
2767
|
+
onPress: Bi(t.toggle, e.onPress)
|
|
2768
2768
|
}, n);
|
|
2769
2769
|
return {
|
|
2770
2770
|
isPressed: i,
|
|
2771
2771
|
isSelected: r,
|
|
2772
2772
|
isDisabled: e.isDisabled || !1,
|
|
2773
|
-
buttonProps:
|
|
2773
|
+
buttonProps: Ri(a, { "aria-pressed": r })
|
|
2774
2774
|
};
|
|
2775
2775
|
}
|
|
2776
2776
|
//#endregion
|
|
@@ -2800,7 +2800,7 @@ function ap(e, t, n) {
|
|
|
2800
2800
|
//#endregion
|
|
2801
2801
|
//#region ../node_modules/.pnpm/@react-stately+toggle@3.9.5_react@19.2.8/node_modules/@react-stately/toggle/dist/useToggleState.mjs
|
|
2802
2802
|
function op(e = {}) {
|
|
2803
|
-
let { isReadOnly: t } = e, [n, r] =
|
|
2803
|
+
let { isReadOnly: t } = e, [n, r] = ca(e.isSelected, e.defaultSelected || !1, e.onChange), [i] = (0, J.useState)(n);
|
|
2804
2804
|
function a(e) {
|
|
2805
2805
|
t || r(e);
|
|
2806
2806
|
}
|
|
@@ -2848,7 +2848,7 @@ function fp(e) {
|
|
|
2848
2848
|
}
|
|
2849
2849
|
//#endregion
|
|
2850
2850
|
//#region ../node_modules/.pnpm/react-hook-form@7.54.2_react@19.2.8/node_modules/react-hook-form/dist/index.esm.mjs
|
|
2851
|
-
var X = b(), pp = /* @__PURE__ */ e(
|
|
2851
|
+
var X = b(), pp = /* @__PURE__ */ e(at(), 1), mp = ya(), hp = (e) => e.type === "checkbox", gp = (e) => e instanceof Date, _p = (e) => e == null, vp = (e) => typeof e == "object", yp = (e) => !_p(e) && !Array.isArray(e) && vp(e) && !gp(e), bp = (e) => yp(e) && e.target ? hp(e.target) ? e.target.checked : e.target.value : e, xp = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Sp = (e, t) => e.has(xp(t)), Cp = (e) => {
|
|
2852
2852
|
let t = e.constructor && e.constructor.prototype;
|
|
2853
2853
|
return yp(t) && t.hasOwnProperty("isPrototypeOf");
|
|
2854
2854
|
}, wp = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
|
|
@@ -4266,7 +4266,7 @@ var wh = (e) => {
|
|
|
4266
4266
|
let a;
|
|
4267
4267
|
t[0] === n ? a = t[1] : (a = l("stroke-[1.8px]", n), t[0] = n, t[1] = a);
|
|
4268
4268
|
let o;
|
|
4269
|
-
t[2] === a ? o = t[3] : (o = /* @__PURE__ */ (0, Y.jsx)(
|
|
4269
|
+
t[2] === a ? o = t[3] : (o = /* @__PURE__ */ (0, Y.jsx)(ft, { className: a }), t[2] = a, t[3] = o);
|
|
4270
4270
|
let s;
|
|
4271
4271
|
return t[4] !== i || t[5] !== o ? (s = /* @__PURE__ */ (0, Y.jsx)(me, {
|
|
4272
4272
|
content: i,
|
|
@@ -4277,7 +4277,7 @@ wh.displayName = "FormMessageTooltip";
|
|
|
4277
4277
|
//#endregion
|
|
4278
4278
|
//#region ../node_modules/.pnpm/react-aria-components@1.16.0_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-aria-components/dist/SelectionIndicator.mjs
|
|
4279
4279
|
var Th = /*#__PURE__*/ (0, J.createContext)({ isSelected: !1 }), Eh = /*#__PURE__*/ (0, J.createContext)(null), Dh = /*#__PURE__*/ (0, J.createContext)({}), Oh = /*#__PURE__*/ (0, J.forwardRef)(function(e, t) {
|
|
4280
|
-
[e, t] =
|
|
4280
|
+
[e, t] = ua(e, t, Dh);
|
|
4281
4281
|
let n = (0, J.useContext)(Eh), r = op(n && e.id != null ? {
|
|
4282
4282
|
isSelected: n.selectedKeys.has(e.id),
|
|
4283
4283
|
onChange(t) {
|
|
@@ -4289,10 +4289,10 @@ var Th = /*#__PURE__*/ (0, J.createContext)({ isSelected: !1 }), Eh = /*#__PURE_
|
|
|
4289
4289
|
}, n, t) : ip({
|
|
4290
4290
|
...e,
|
|
4291
4291
|
id: e.id == null ? void 0 : String(e.id)
|
|
4292
|
-
}, r, t), { focusProps: c, isFocused: l, isFocusVisible: u } =
|
|
4292
|
+
}, r, t), { focusProps: c, isFocused: l, isFocusVisible: u } = Qi(e), { hoverProps: d, isHovered: f } = Ki({
|
|
4293
4293
|
...e,
|
|
4294
4294
|
isDisabled: s
|
|
4295
|
-
}), p =
|
|
4295
|
+
}), p = Pi({
|
|
4296
4296
|
...e,
|
|
4297
4297
|
id: void 0,
|
|
4298
4298
|
values: {
|
|
@@ -4305,9 +4305,9 @@ var Th = /*#__PURE__*/ (0, J.createContext)({ isSelected: !1 }), Eh = /*#__PURE_
|
|
|
4305
4305
|
state: r
|
|
4306
4306
|
},
|
|
4307
4307
|
defaultClassName: "react-aria-ToggleButton"
|
|
4308
|
-
}), m =
|
|
4309
|
-
return delete m.id, delete m.onClick, /*#__PURE__*/ J.createElement(
|
|
4310
|
-
...
|
|
4308
|
+
}), m = Li(e, { global: !0 });
|
|
4309
|
+
return delete m.id, delete m.onClick, /*#__PURE__*/ J.createElement(Vi.button, {
|
|
4310
|
+
...Ri(m, p, i, c, d),
|
|
4311
4311
|
ref: t,
|
|
4312
4312
|
slot: e.slot || void 0,
|
|
4313
4313
|
"data-focused": l || void 0,
|
|
@@ -4352,7 +4352,7 @@ var Ah = J.forwardRef((e, t) => {
|
|
|
4352
4352
|
delay: a.delay,
|
|
4353
4353
|
onChange: i
|
|
4354
4354
|
}, n[4] = i, n[5] = a.delay, n[6] = a.value, n[7] = o) : o = n[7];
|
|
4355
|
-
let { value: s, onChange: c } =
|
|
4355
|
+
let { value: s, onChange: c } = ra(o), l;
|
|
4356
4356
|
n[8] === c ? l = n[9] : (l = (e) => c(e.target.value), n[8] = c, n[9] = l);
|
|
4357
4357
|
let u;
|
|
4358
4358
|
return n[10] !== r || n[11] !== a || n[12] !== t || n[13] !== l || n[14] !== s ? (u = /* @__PURE__ */ (0, Y.jsx)(kh, {
|
|
@@ -4476,7 +4476,7 @@ var Rh = "\n", zh = (e) => {
|
|
|
4476
4476
|
className: s,
|
|
4477
4477
|
onChange: i,
|
|
4478
4478
|
placeholder: o ? `${o}: one per line` : "One value per line"
|
|
4479
|
-
}) : /* @__PURE__ */ (0, Y.jsx)(
|
|
4479
|
+
}) : /* @__PURE__ */ (0, Y.jsx)(vn, {
|
|
4480
4480
|
placeholder: o,
|
|
4481
4481
|
displayValue: Hh,
|
|
4482
4482
|
className: l("w-full max-w-[400px]", c),
|
|
@@ -4541,7 +4541,7 @@ function Hh(e) {
|
|
|
4541
4541
|
return e;
|
|
4542
4542
|
}
|
|
4543
4543
|
function Uh(e) {
|
|
4544
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
4544
|
+
return /* @__PURE__ */ (0, Y.jsx)(En, {
|
|
4545
4545
|
value: e,
|
|
4546
4546
|
children: e
|
|
4547
4547
|
}, e);
|
|
@@ -4611,7 +4611,7 @@ function Kh({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
4611
4611
|
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(yh, { children: [
|
|
4612
4612
|
/* @__PURE__ */ (0, Y.jsx)(bh, { children: i }),
|
|
4613
4613
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: a }),
|
|
4614
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
4614
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(ta, {
|
|
4615
4615
|
...e,
|
|
4616
4616
|
onValueChange: e.onChange,
|
|
4617
4617
|
type: "time",
|
|
@@ -4629,7 +4629,7 @@ function Kh({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
4629
4629
|
name: n,
|
|
4630
4630
|
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(yh, { children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
4631
4631
|
className: l("flex flex-row gap-2", a ? "items-start" : "items-center"),
|
|
4632
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
4632
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(Me, {
|
|
4633
4633
|
"data-testid": "marimo-plugin-data-frames-boolean-checkbox",
|
|
4634
4634
|
checked: e.value,
|
|
4635
4635
|
onCheckedChange: e.onChange,
|
|
@@ -4658,7 +4658,7 @@ function Kh({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
4658
4658
|
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(yh, { children: [
|
|
4659
4659
|
/* @__PURE__ */ (0, Y.jsx)(bh, { children: i }),
|
|
4660
4660
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: a }),
|
|
4661
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
4661
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)($i, {
|
|
4662
4662
|
...e,
|
|
4663
4663
|
className: "my-0",
|
|
4664
4664
|
onValueChange: e.onChange
|
|
@@ -4674,7 +4674,7 @@ function Kh({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
4674
4674
|
render: ({ field: t }) => /* @__PURE__ */ (0, Y.jsxs)(yh, { children: [
|
|
4675
4675
|
/* @__PURE__ */ (0, Y.jsx)(bh, { children: i }),
|
|
4676
4676
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: a }),
|
|
4677
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
4677
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(ta, {
|
|
4678
4678
|
...t,
|
|
4679
4679
|
onValueChange: t.onChange,
|
|
4680
4680
|
type: e,
|
|
@@ -4777,7 +4777,7 @@ function Kh({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
4777
4777
|
className: "flex flex-col mb-4 gap-1",
|
|
4778
4778
|
children: [
|
|
4779
4779
|
/* @__PURE__ */ (0, Y.jsx)(bh, { children: i }),
|
|
4780
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
4780
|
+
/* @__PURE__ */ (0, Y.jsx)(Ei, {
|
|
4781
4781
|
"data-testid": "marimo-plugin-data-frames-union-select",
|
|
4782
4782
|
...a,
|
|
4783
4783
|
children: c.map((e) => /* @__PURE__ */ (0, Y.jsx)("option", {
|
|
@@ -4919,7 +4919,7 @@ var qh = (e) => {
|
|
|
4919
4919
|
return /* @__PURE__ */ (0, Y.jsxs)(yh, { children: [
|
|
4920
4920
|
/* @__PURE__ */ (0, Y.jsx)(bh, { children: o }),
|
|
4921
4921
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: s }),
|
|
4922
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
4922
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(ta, {
|
|
4923
4923
|
...t,
|
|
4924
4924
|
type: u,
|
|
4925
4925
|
value: t.value,
|
|
@@ -4970,19 +4970,19 @@ var qh = (e) => {
|
|
|
4970
4970
|
return /* @__PURE__ */ (0, Y.jsxs)(yh, { children: [
|
|
4971
4971
|
/* @__PURE__ */ (0, Y.jsx)(bh, { children: c }),
|
|
4972
4972
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: l }),
|
|
4973
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
4973
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(Gn, {
|
|
4974
4974
|
className: "flex flex-row gap-2 pt-1 items-center",
|
|
4975
4975
|
value: t.value,
|
|
4976
4976
|
onValueChange: t.onChange,
|
|
4977
4977
|
children: a.map((e) => /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
4978
4978
|
className: "flex items-center gap-1",
|
|
4979
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
4979
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Yn, {
|
|
4980
4980
|
value: e,
|
|
4981
4981
|
id: `${i}-${e}`
|
|
4982
4982
|
}, e), /* @__PURE__ */ (0, Y.jsx)(bh, {
|
|
4983
4983
|
className: "whitespace-pre",
|
|
4984
4984
|
htmlFor: `${i}-${e}`,
|
|
4985
|
-
children:
|
|
4985
|
+
children: Si.startCase(e)
|
|
4986
4986
|
})]
|
|
4987
4987
|
}, e))
|
|
4988
4988
|
}) }),
|
|
@@ -5006,17 +5006,17 @@ var qh = (e) => {
|
|
|
5006
5006
|
children: c
|
|
5007
5007
|
}),
|
|
5008
5008
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: l }),
|
|
5009
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
5009
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(ji, {
|
|
5010
5010
|
"data-testid": "marimo-plugin-data-frames-select",
|
|
5011
5011
|
value: t.value,
|
|
5012
5012
|
onValueChange: t.onChange,
|
|
5013
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
5013
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Ai, {
|
|
5014
5014
|
className: "min-w-[180px]",
|
|
5015
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
5016
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
5015
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ci, { placeholder: "--" })
|
|
5016
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Di, { children: /* @__PURE__ */ (0, Y.jsxs)(ki, { children: [a.map((e) => /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
5017
5017
|
value: e,
|
|
5018
5018
|
children: o?.(e) ?? e
|
|
5019
|
-
}, e)), a.length === 0 && /* @__PURE__ */ (0, Y.jsx)(
|
|
5019
|
+
}, e)), a.length === 0 && /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
5020
5020
|
disabled: !0,
|
|
5021
5021
|
value: "--",
|
|
5022
5022
|
children: "No options"
|
|
@@ -5051,7 +5051,7 @@ var qh = (e) => {
|
|
|
5051
5051
|
value: n,
|
|
5052
5052
|
options: a,
|
|
5053
5053
|
placeholder: p
|
|
5054
|
-
}) : /* @__PURE__ */ (0, Y.jsx)(
|
|
5054
|
+
}) : /* @__PURE__ */ (0, Y.jsx)(vn, {
|
|
5055
5055
|
className: "min-w-[180px]",
|
|
5056
5056
|
placeholder: p,
|
|
5057
5057
|
displayValue: eg,
|
|
@@ -5079,10 +5079,10 @@ function $h(e) {
|
|
|
5079
5079
|
return e.preventDefault();
|
|
5080
5080
|
}
|
|
5081
5081
|
function eg(e) {
|
|
5082
|
-
return
|
|
5082
|
+
return Si.startCase(e);
|
|
5083
5083
|
}
|
|
5084
5084
|
function tg(e) {
|
|
5085
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
5085
|
+
return /* @__PURE__ */ (0, Y.jsx)(En, {
|
|
5086
5086
|
value: e,
|
|
5087
5087
|
children: e
|
|
5088
5088
|
}, e);
|
|
@@ -5249,18 +5249,18 @@ function ug(e) {
|
|
|
5249
5249
|
return typeof e == "function";
|
|
5250
5250
|
}
|
|
5251
5251
|
function dg(e) {
|
|
5252
|
-
return
|
|
5252
|
+
return Ge(e) && (lg(e.render) || ug(e.initialize));
|
|
5253
5253
|
}
|
|
5254
5254
|
function fg(e) {
|
|
5255
5255
|
return typeof e == "function" || dg(e);
|
|
5256
5256
|
}
|
|
5257
5257
|
function pg(e) {
|
|
5258
|
-
return
|
|
5258
|
+
return Ge(e) && fg(e.default);
|
|
5259
5259
|
}
|
|
5260
5260
|
var mg = /* @__PURE__ */ new Set(), hg = /* @__PURE__ */ new WeakMap();
|
|
5261
5261
|
function gg(e, t) {
|
|
5262
5262
|
if (pg(e)) return e.default;
|
|
5263
|
-
if (!
|
|
5263
|
+
if (!Ge(e) || e.default !== void 0) return null;
|
|
5264
5264
|
let n = lg(e.render) ? e.render : void 0, r = ug(e.initialize) ? e.initialize : void 0;
|
|
5265
5265
|
if (n === void 0 && r === void 0) return null;
|
|
5266
5266
|
let i = hg.get(e);
|
|
@@ -5273,8 +5273,8 @@ function gg(e, t) {
|
|
|
5273
5273
|
return hg.set(e, a), a;
|
|
5274
5274
|
}
|
|
5275
5275
|
function _g(e, t) {
|
|
5276
|
-
let n = "https://anywidget.dev/en/afm/", r =
|
|
5277
|
-
if (
|
|
5276
|
+
let n = "https://anywidget.dev/en/afm/", r = Ge(e) && We(e, "render"), i = Ge(e) && We(e, "initialize");
|
|
5277
|
+
if (Ge(e) && e.default !== void 0) return /* @__PURE__ */ Error(`Anywidget module at ${t} has an invalid default export. Expected a factory function or an object with \`render\` or \`initialize\`. See ${n}`);
|
|
5278
5278
|
if (r || i) {
|
|
5279
5279
|
let e = [r ? "`render`" : null, i ? "`initialize`" : null].filter(Boolean).join(" and "), a = [r ? "render" : null, i ? "initialize" : null].filter((e) => e !== null), o = `export default { ${a.join(", ")} }`, s = a.length === 1 ? `export function ${a[0]}` : "named export function ...";
|
|
5280
5280
|
return /* @__PURE__ */ Error(`Anywidget module at ${t} uses named exports (${e}). Per the AFM spec, use a default export instead: \`${o}\` (not \`${s}\`). See ${n}`);
|
|
@@ -5286,7 +5286,7 @@ function _g(e, t) {
|
|
|
5286
5286
|
function vg(e) {
|
|
5287
5287
|
return e.startsWith(".") ? e.slice(1) : e;
|
|
5288
5288
|
}
|
|
5289
|
-
function yg(e, t =
|
|
5289
|
+
function yg(e, t = xa()) {
|
|
5290
5290
|
let n = bg(e, t);
|
|
5291
5291
|
if (!n) return e;
|
|
5292
5292
|
let r = ka(n);
|
|
@@ -5343,8 +5343,8 @@ var Dg = class {
|
|
|
5343
5343
|
}
|
|
5344
5344
|
async #t(e, t = {}) {
|
|
5345
5345
|
if (!(Sg(e) || t.kernelAuthored === !0 && /^(https?:|data:)/.test(e))) throw Error(`Refusing to load anywidget module from untrusted URL: ${String(e)}`);
|
|
5346
|
-
let n =
|
|
5347
|
-
return
|
|
5346
|
+
let n = ha(e).toString();
|
|
5347
|
+
return ga() && (n = yg(n)), import(
|
|
5348
5348
|
/* @vite-ignore */
|
|
5349
5349
|
n
|
|
5350
5350
|
);
|
|
@@ -5451,7 +5451,7 @@ var Ag = class e {
|
|
|
5451
5451
|
#r;
|
|
5452
5452
|
#i;
|
|
5453
5453
|
#a = new AbortController();
|
|
5454
|
-
#o = new
|
|
5454
|
+
#o = new fa();
|
|
5455
5455
|
#s = /* @__PURE__ */ new Set();
|
|
5456
5456
|
#c = /* @__PURE__ */ new Map();
|
|
5457
5457
|
#l;
|
|
@@ -5691,7 +5691,7 @@ function Rg(e) {
|
|
|
5691
5691
|
//#endregion
|
|
5692
5692
|
//#region src/plugins/impl/anywidget/registry.ts
|
|
5693
5693
|
function zg() {
|
|
5694
|
-
let e = os.get(
|
|
5694
|
+
let e = os.get(Sa).mode;
|
|
5695
5695
|
return e === "edit" || e === "present";
|
|
5696
5696
|
}
|
|
5697
5697
|
var Bg = new class {
|
|
@@ -5761,7 +5761,7 @@ async function Vg(e, t) {
|
|
|
5761
5761
|
return;
|
|
5762
5762
|
}
|
|
5763
5763
|
e.createModel(n, (e) => {
|
|
5764
|
-
let t =
|
|
5764
|
+
let t = ga() ? {
|
|
5765
5765
|
sendUpdate: async () => void 0,
|
|
5766
5766
|
sendCustomMessage: async () => void 0
|
|
5767
5767
|
} : {
|
|
@@ -5771,7 +5771,7 @@ async function Vg(e, t) {
|
|
|
5771
5771
|
return;
|
|
5772
5772
|
}
|
|
5773
5773
|
let { state: r, buffers: i, bufferPaths: a } = Lg(t);
|
|
5774
|
-
await
|
|
5774
|
+
await Ve().sendModelValue({
|
|
5775
5775
|
modelId: n,
|
|
5776
5776
|
message: {
|
|
5777
5777
|
method: "update",
|
|
@@ -5786,7 +5786,7 @@ async function Vg(e, t) {
|
|
|
5786
5786
|
c.debug(`[Model] sendCustomMessage suppressed for model=${n} (signal aborted)`);
|
|
5787
5787
|
return;
|
|
5788
5788
|
}
|
|
5789
|
-
await
|
|
5789
|
+
await Ve().sendModelValue({
|
|
5790
5790
|
modelId: n,
|
|
5791
5791
|
message: {
|
|
5792
5792
|
method: "custom",
|
|
@@ -5820,10 +5820,10 @@ async function Vg(e, t) {
|
|
|
5820
5820
|
sg(await e.getModel(n)).updateAndEmitDiffs(o);
|
|
5821
5821
|
return;
|
|
5822
5822
|
}
|
|
5823
|
-
default:
|
|
5823
|
+
default: yi(r);
|
|
5824
5824
|
}
|
|
5825
5825
|
}
|
|
5826
|
-
|
|
5826
|
+
gt(Bg, "WIDGET_REGISTRY");
|
|
5827
5827
|
//#endregion
|
|
5828
5828
|
//#region src/components/ui/navigation.tsx
|
|
5829
5829
|
var Hg = J.forwardRef((e, t) => {
|
|
@@ -6156,7 +6156,7 @@ function l_(e) {
|
|
|
6156
6156
|
}
|
|
6157
6157
|
function u_(e) {
|
|
6158
6158
|
let t = new URL(globalThis.location.href);
|
|
6159
|
-
return
|
|
6159
|
+
return _a({
|
|
6160
6160
|
href: e,
|
|
6161
6161
|
queryParams: t.search,
|
|
6162
6162
|
keys: [ss.filePath]
|
|
@@ -6190,7 +6190,7 @@ var f_ = class e {
|
|
|
6190
6190
|
let n = this.entries.get(e);
|
|
6191
6191
|
n === void 0 ? this.entries.set(e, {
|
|
6192
6192
|
objectId: e,
|
|
6193
|
-
value:
|
|
6193
|
+
value: ve(t, this),
|
|
6194
6194
|
elements: /* @__PURE__ */ new Set([t])
|
|
6195
6195
|
}) : n.elements.add(t);
|
|
6196
6196
|
}
|
|
@@ -6255,14 +6255,14 @@ var f_ = class e {
|
|
|
6255
6255
|
detail: { objectId: t }
|
|
6256
6256
|
})));
|
|
6257
6257
|
}
|
|
6258
|
-
}, p_ = f_.INSTANCE, m_ = new
|
|
6259
|
-
await
|
|
6258
|
+
}, p_ = f_.INSTANCE, m_ = new Le("function-call-result", async (e, t) => {
|
|
6259
|
+
await Ve().sendFunctionRequest({
|
|
6260
6260
|
functionCallId: e,
|
|
6261
6261
|
...t
|
|
6262
6262
|
});
|
|
6263
6263
|
}), h_ = (e) => {
|
|
6264
6264
|
let t = (0, X.c)(5), { children: n } = e, r = rs(hs), i;
|
|
6265
|
-
t[0] === r ? i = t[1] : (i =
|
|
6265
|
+
t[0] === r ? i = t[1] : (i = bn(r), t[0] = r, t[1] = i);
|
|
6266
6266
|
let a;
|
|
6267
6267
|
return t[2] !== n || t[3] !== i ? (a = /* @__PURE__ */ (0, Y.jsx)(Yo, {
|
|
6268
6268
|
locale: i,
|
|
@@ -6295,7 +6295,7 @@ function v_(e, t) {
|
|
|
6295
6295
|
function y_(e, t) {
|
|
6296
6296
|
if (!t) return [];
|
|
6297
6297
|
let n = e;
|
|
6298
|
-
if (
|
|
6298
|
+
if (Un(t)) return [{
|
|
6299
6299
|
column_id: n,
|
|
6300
6300
|
operator: t.operator,
|
|
6301
6301
|
type: "condition",
|
|
@@ -6333,7 +6333,7 @@ function y_(e, t) {
|
|
|
6333
6333
|
type: "condition",
|
|
6334
6334
|
negate: !1
|
|
6335
6335
|
}];
|
|
6336
|
-
default:
|
|
6336
|
+
default: yi(t);
|
|
6337
6337
|
}
|
|
6338
6338
|
case "text": switch (t.operator) {
|
|
6339
6339
|
case "contains":
|
|
@@ -6362,12 +6362,12 @@ function y_(e, t) {
|
|
|
6362
6362
|
type: "condition",
|
|
6363
6363
|
negate: !1
|
|
6364
6364
|
}];
|
|
6365
|
-
default:
|
|
6365
|
+
default: yi(t);
|
|
6366
6366
|
}
|
|
6367
6367
|
case "date":
|
|
6368
6368
|
case "datetime":
|
|
6369
6369
|
case "time": {
|
|
6370
|
-
let e = t.type === "date" ?
|
|
6370
|
+
let e = t.type === "date" ? fn : t.type === "time" ? Dr : Pn;
|
|
6371
6371
|
switch (t.operator) {
|
|
6372
6372
|
case "between": return [{
|
|
6373
6373
|
column_id: n,
|
|
@@ -6391,7 +6391,7 @@ function y_(e, t) {
|
|
|
6391
6391
|
type: "condition",
|
|
6392
6392
|
negate: !1
|
|
6393
6393
|
}];
|
|
6394
|
-
default:
|
|
6394
|
+
default: yi(t);
|
|
6395
6395
|
}
|
|
6396
6396
|
}
|
|
6397
6397
|
case "boolean": return [{
|
|
@@ -6400,7 +6400,7 @@ function y_(e, t) {
|
|
|
6400
6400
|
type: "condition",
|
|
6401
6401
|
negate: !1
|
|
6402
6402
|
}];
|
|
6403
|
-
default:
|
|
6403
|
+
default: yi(t);
|
|
6404
6404
|
}
|
|
6405
6405
|
}
|
|
6406
6406
|
function b_(e) {
|
|
@@ -9010,7 +9010,7 @@ function Gx(e) {
|
|
|
9010
9010
|
let t = (0, X.c)(9), { option: n, checked: r, renderOption: i } = e, a = r || void 0, o = n.value, s;
|
|
9011
9011
|
t[0] !== r || t[1] !== n || t[2] !== i ? (s = i ? i(n, { checked: r }) : n.label, t[0] = r, t[1] = n, t[2] = i, t[3] = s) : s = t[3];
|
|
9012
9012
|
let c;
|
|
9013
|
-
return t[4] !== n.disabled || t[5] !== a || t[6] !== o || t[7] !== s ? (c = /* @__PURE__ */ (0, Y.jsx)(
|
|
9013
|
+
return t[4] !== n.disabled || t[5] !== a || t[6] !== o || t[7] !== s ? (c = /* @__PURE__ */ (0, Y.jsx)(En, {
|
|
9014
9014
|
"data-slot": "select-option",
|
|
9015
9015
|
"data-checked": a,
|
|
9016
9016
|
value: o,
|
|
@@ -9043,7 +9043,7 @@ function Yx(e) {
|
|
|
9043
9043
|
allowSelectNone: s,
|
|
9044
9044
|
pinSelected: b
|
|
9045
9045
|
}, t[0] = s, t[1] = o, t[2] = a, t[3] = i, t[4] = n, t[5] = b, t[6] = r, t[7] = O) : O = t[7];
|
|
9046
|
-
let k =
|
|
9046
|
+
let k = Wn(O), A;
|
|
9047
9047
|
t[8] !== s || t[9] !== o || t[10] !== a || t[11] !== i ? (A = (e) => {
|
|
9048
9048
|
if (!a) {
|
|
9049
9049
|
if (e == null && !s) return;
|
|
@@ -9057,12 +9057,12 @@ function Yx(e) {
|
|
|
9057
9057
|
if (t[13] !== k.bulkActions) {
|
|
9058
9058
|
if (M = k.bulkActions.map(Xx), M.length > 0) {
|
|
9059
9059
|
let e;
|
|
9060
|
-
t[15] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)(
|
|
9060
|
+
t[15] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)(Ln, { "data-slot": "select-separator" }, "_bulk_separator"), t[15] = e) : e = t[15], M.push(e);
|
|
9061
9061
|
}
|
|
9062
9062
|
t[13] = k.bulkActions, t[14] = M;
|
|
9063
9063
|
} else M = t[14];
|
|
9064
9064
|
let N;
|
|
9065
|
-
t[16] !== k.pinnedCount || t[17] !== k.visibleOptions.length ? (N = (e) => k.pinnedCount > 0 && e === k.pinnedCount && k.pinnedCount < k.visibleOptions.length ? /* @__PURE__ */ (0, Y.jsx)(
|
|
9065
|
+
t[16] !== k.pinnedCount || t[17] !== k.visibleOptions.length ? (N = (e) => k.pinnedCount > 0 && e === k.pinnedCount && k.pinnedCount < k.visibleOptions.length ? /* @__PURE__ */ (0, Y.jsx)(Ln, { "data-slot": "select-separator" }, "_pinned_separator") : null, t[16] = k.pinnedCount, t[17] = k.visibleOptions.length, t[18] = N) : N = t[18];
|
|
9066
9066
|
let P = N, F;
|
|
9067
9067
|
t[19] !== M || t[20] !== k || t[21] !== P || t[22] !== g || t[23] !== E || t[24] !== D ? (F = () => {
|
|
9068
9068
|
if (k.visibleOptions.length > E) return /* @__PURE__ */ (0, Y.jsx)(tx, {
|
|
@@ -9099,7 +9099,7 @@ function Yx(e) {
|
|
|
9099
9099
|
return t.length === 0 ? /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
9100
9100
|
className: "text-muted-foreground",
|
|
9101
9101
|
children: S
|
|
9102
|
-
}) : /* @__PURE__ */ (0, Y.jsx)(
|
|
9102
|
+
}) : /* @__PURE__ */ (0, Y.jsx)(Jn, {
|
|
9103
9103
|
items: t.map(k.labelOf),
|
|
9104
9104
|
max: 3
|
|
9105
9105
|
});
|
|
@@ -9128,13 +9128,13 @@ function Yx(e) {
|
|
|
9128
9128
|
id: h
|
|
9129
9129
|
}, t[36] = C, t[37] = h, t[38] = k.open, t[39] = k.searchQuery, t[40] = k.setOpen, t[41] = k.setSearchQuery, t[42] = S, t[43] = ee, t[44] = z, t[45] = te, t[46] = B, t[47] = oe, t[48] = se) : se = t[48];
|
|
9130
9130
|
let ce = se, V;
|
|
9131
|
-
return t[49] !== ce || t[50] !== j || t[51] !== a || t[52] !== I || t[53] !== r ? (V = a ? /* @__PURE__ */ (0, Y.jsx)(
|
|
9131
|
+
return t[49] !== ce || t[50] !== j || t[51] !== a || t[52] !== I || t[53] !== r ? (V = a ? /* @__PURE__ */ (0, Y.jsx)(vn, {
|
|
9132
9132
|
...ce,
|
|
9133
9133
|
multiple: !0,
|
|
9134
9134
|
value: r,
|
|
9135
9135
|
onValueChange: j,
|
|
9136
9136
|
children: I()
|
|
9137
|
-
}) : /* @__PURE__ */ (0, Y.jsx)(
|
|
9137
|
+
}) : /* @__PURE__ */ (0, Y.jsx)(vn, {
|
|
9138
9138
|
...ce,
|
|
9139
9139
|
multiple: !1,
|
|
9140
9140
|
value: r,
|
|
@@ -9144,7 +9144,7 @@ function Yx(e) {
|
|
|
9144
9144
|
}
|
|
9145
9145
|
function Xx(e) {
|
|
9146
9146
|
let t = "enabled" in e ? !e.enabled : e.items.length === 0;
|
|
9147
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
9147
|
+
return /* @__PURE__ */ (0, Y.jsx)(Zn, {
|
|
9148
9148
|
"data-slot": "select-bulk",
|
|
9149
9149
|
className: "pl-6 m-1 py-1",
|
|
9150
9150
|
value: `__bulk_${e.kind}`,
|
|
@@ -9183,7 +9183,7 @@ var Zx = ie, Qx = D, $x = A, eS = k, tS = (e) => {
|
|
|
9183
9183
|
className: "text-muted-foreground border-muted-foreground-20",
|
|
9184
9184
|
children: [o, /* @__PURE__ */ (0, Y.jsx)(Qx, {
|
|
9185
9185
|
className: "text-[0.84375rem]",
|
|
9186
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
9186
|
+
children: /* @__PURE__ */ (0, Y.jsx)(mr, { data: r })
|
|
9187
9187
|
})]
|
|
9188
9188
|
})
|
|
9189
9189
|
}), t[6] = r, t[7] = s);
|
|
@@ -9221,10 +9221,10 @@ function rS(e) {
|
|
|
9221
9221
|
//#region src/plugins/core/registerReactComponent.tsx
|
|
9222
9222
|
var iS = 3, aS = 150;
|
|
9223
9223
|
function oS({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
9224
|
-
let [s, l] = (0, J.useState)(n), [u, d] = (0, J.useState)(r()), { theme: f } = fs(), [p, m] = (0, J.useState)(() => t.validator.safeParse(
|
|
9224
|
+
let [s, l] = (0, J.useState)(n), [u, d] = (0, J.useState)(r()), { theme: f } = fs(), [p, m] = (0, J.useState)(() => t.validator.safeParse(At(e))), [h, g] = (0, J.useState)(0);
|
|
9225
9225
|
(0, J.useImperativeHandle)(i, () => ({
|
|
9226
9226
|
reset: () => {
|
|
9227
|
-
d(r()), m(t.validator.safeParse(
|
|
9227
|
+
d(r()), m(t.validator.safeParse(At(e))), g((e) => e + 1);
|
|
9228
9228
|
},
|
|
9229
9229
|
setChildren: (e) => {
|
|
9230
9230
|
l(e);
|
|
@@ -9233,7 +9233,7 @@ function oS({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
|
9233
9233
|
t.detail.element === e && d(t.detail.value);
|
|
9234
9234
|
}), (0, J.useEffect)(() => {
|
|
9235
9235
|
let n = new MutationObserver((n) => {
|
|
9236
|
-
n.some((e) => e.type === "attributes" && e.attributeName?.startsWith("data-")) && m(t.validator.safeParse(
|
|
9236
|
+
n.some((e) => e.type === "attributes" && e.attributeName?.startsWith("data-")) && m(t.validator.safeParse(At(e)));
|
|
9237
9237
|
});
|
|
9238
9238
|
return n.observe(e, { attributes: !0 }), () => {
|
|
9239
9239
|
n.disconnect();
|
|
@@ -9251,10 +9251,10 @@ function oS({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
|
9251
9251
|
let { input: t, output: a } = i;
|
|
9252
9252
|
n[r] = async (...n) => {
|
|
9253
9253
|
xs(n.length <= 1, `Plugin functions only supports a single argument. Called ${r}`);
|
|
9254
|
-
let i =
|
|
9254
|
+
let i = ga(), o = De.findElementThroughShadowDOMs(e)?.id, s = o ? De.parse(o) : null;
|
|
9255
9255
|
if (s && !i) {
|
|
9256
|
-
let e = os.get(
|
|
9257
|
-
if (
|
|
9256
|
+
let e = os.get(Ze), t = e.cellRuntime[s], n = e.cellData[s];
|
|
9257
|
+
if (Ue({
|
|
9258
9258
|
executionTime: t.runElapsedTimeMs ?? n.lastExecutionTime,
|
|
9259
9259
|
status: t.status,
|
|
9260
9260
|
errored: t.errored,
|
|
@@ -9357,7 +9357,7 @@ function uS(e) {
|
|
|
9357
9357
|
hostElement: this,
|
|
9358
9358
|
plugin: e,
|
|
9359
9359
|
ref: this.pluginRef,
|
|
9360
|
-
getInitialValue: () =>
|
|
9360
|
+
getInitialValue: () => ve(this, f_.INSTANCE),
|
|
9361
9361
|
children: this.getChildren()
|
|
9362
9362
|
}) })
|
|
9363
9363
|
}));
|
|
@@ -9428,7 +9428,7 @@ function hS() {
|
|
|
9428
9428
|
inputListener = a.NOOP;
|
|
9429
9429
|
init() {
|
|
9430
9430
|
if (this.initialized) return;
|
|
9431
|
-
let e =
|
|
9431
|
+
let e = Ke.parseOrThrow(this);
|
|
9432
9432
|
this.inputListener = (n) => {
|
|
9433
9433
|
e !== null && n.detail.element === this.firstElementChild && (p_.has(e) || p_.registerInstance(e, t), p_.broadcastValueUpdate(t, e, n.detail.value));
|
|
9434
9434
|
};
|
|
@@ -9449,14 +9449,14 @@ function hS() {
|
|
|
9449
9449
|
}
|
|
9450
9450
|
connectedCallback() {
|
|
9451
9451
|
if (this.init(), this.initialized) {
|
|
9452
|
-
let e =
|
|
9452
|
+
let e = Ke.parseOrThrow(this), t = this.firstElementChild;
|
|
9453
9453
|
p_.registerInstance(e, t), document.addEventListener(wa.TYPE, this.inputListener);
|
|
9454
9454
|
}
|
|
9455
9455
|
}
|
|
9456
9456
|
disconnectedCallback() {
|
|
9457
9457
|
if (this.initialized) {
|
|
9458
9458
|
document.removeEventListener(wa.TYPE, this.inputListener);
|
|
9459
|
-
let e =
|
|
9459
|
+
let e = Ke.parseOrThrow(this);
|
|
9460
9460
|
p_.removeInstance(e, this.firstElementChild);
|
|
9461
9461
|
}
|
|
9462
9462
|
}
|
|
@@ -9465,7 +9465,7 @@ function hS() {
|
|
|
9465
9465
|
fS(e) ? e.reset() : c.error("[marimo-ui-element] first child must have a reset method");
|
|
9466
9466
|
}
|
|
9467
9467
|
static get observedAttributes() {
|
|
9468
|
-
return [
|
|
9468
|
+
return [yt];
|
|
9469
9469
|
}
|
|
9470
9470
|
attributeChangedCallback(e, t, n) {
|
|
9471
9471
|
if (this.initialized && e === "random-id" && t !== n) {
|
|
@@ -9479,16 +9479,16 @@ function hS() {
|
|
|
9479
9479
|
}
|
|
9480
9480
|
function gS(e) {
|
|
9481
9481
|
if (!e) return null;
|
|
9482
|
-
if (e.nodeName === mS) return
|
|
9482
|
+
if (e.nodeName === mS) return Ke.parseOrThrow(e);
|
|
9483
9483
|
let t = e.parentElement;
|
|
9484
|
-
return t?.nodeName === mS ?
|
|
9484
|
+
return t?.nodeName === mS ? Ke.parseOrThrow(t) : null;
|
|
9485
9485
|
}
|
|
9486
9486
|
function _S(e) {
|
|
9487
9487
|
return e.tagName === mS;
|
|
9488
9488
|
}
|
|
9489
9489
|
//#endregion
|
|
9490
9490
|
//#region src/components/editor/renderers/vertical-layout/sidebar/state.ts
|
|
9491
|
-
var vS =
|
|
9491
|
+
var vS = Re({ isOpen: !0 }, (e, t) => {
|
|
9492
9492
|
if (!t) return e;
|
|
9493
9493
|
switch (t.type) {
|
|
9494
9494
|
case "toggle": return {
|
|
@@ -9520,21 +9520,21 @@ function bS() {
|
|
|
9520
9520
|
this.observer && (this.observer.disconnect(), this.unmountReactComponent());
|
|
9521
9521
|
}
|
|
9522
9522
|
mountReactComponent() {
|
|
9523
|
-
this.syncWidth(),
|
|
9524
|
-
name:
|
|
9523
|
+
this.syncWidth(), Xn.mount({
|
|
9524
|
+
name: Qn.SIDEBAR,
|
|
9525
9525
|
ref: this.uniqueId,
|
|
9526
9526
|
children: this.getContents()
|
|
9527
9527
|
});
|
|
9528
9528
|
}
|
|
9529
9529
|
unmountReactComponent() {
|
|
9530
|
-
|
|
9531
|
-
name:
|
|
9530
|
+
Xn.unmount({
|
|
9531
|
+
name: Qn.SIDEBAR,
|
|
9532
9532
|
ref: this.uniqueId
|
|
9533
9533
|
});
|
|
9534
9534
|
}
|
|
9535
9535
|
updateReactComponent() {
|
|
9536
|
-
this.syncWidth(),
|
|
9537
|
-
name:
|
|
9536
|
+
this.syncWidth(), Xn.update({
|
|
9537
|
+
name: Qn.SIDEBAR,
|
|
9538
9538
|
ref: this.uniqueId,
|
|
9539
9539
|
children: this.getContents()
|
|
9540
9540
|
});
|
|
@@ -9633,7 +9633,7 @@ var SS = xS("marimo-anywidget").withData(W({ modelId: Ro(rg, { message: "Expecte
|
|
|
9633
9633
|
let i, a, o;
|
|
9634
9634
|
if (t[1] !== r || t[2] !== n) {
|
|
9635
9635
|
let e = n.split("-");
|
|
9636
|
-
i =
|
|
9636
|
+
i = Gi, t[6] === r ? a = t[7] : (a = l("flex gap-1 items-center", r), t[6] = r, t[7] = a), o = e.map(ES).map(AS), t[1] = r, t[2] = n, t[3] = i, t[4] = a, t[5] = o;
|
|
9637
9637
|
} else i = t[3], a = t[4], o = t[5];
|
|
9638
9638
|
let s;
|
|
9639
9639
|
return t[8] !== i || t[9] !== a || t[10] !== o ? (s = /* @__PURE__ */ (0, Y.jsx)(i, {
|
|
@@ -9775,8 +9775,8 @@ function kS(e) {
|
|
|
9775
9775
|
tabIndex: -1,
|
|
9776
9776
|
content: t,
|
|
9777
9777
|
delayDuration: 300,
|
|
9778
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
9779
|
-
}, t) : /* @__PURE__ */ (0, Y.jsx)(
|
|
9778
|
+
children: /* @__PURE__ */ (0, Y.jsx)(cn, { children: n }, t)
|
|
9779
|
+
}, t) : /* @__PURE__ */ (0, Y.jsx)(cn, { children: OS(t) }, t);
|
|
9780
9780
|
}
|
|
9781
9781
|
function AS(e) {
|
|
9782
9782
|
let [t, n] = e;
|
|
@@ -9895,7 +9895,7 @@ var PS = (e) => {
|
|
|
9895
9895
|
e !== "indeterminate" && r(e);
|
|
9896
9896
|
}, t[0] = r, t[1] = a);
|
|
9897
9897
|
let o = a, s = (0, J.useId)(), c;
|
|
9898
|
-
t[2] !== i.disabled || t[3] !== s || t[4] !== o || t[5] !== n ? (c = /* @__PURE__ */ (0, Y.jsx)(
|
|
9898
|
+
t[2] !== i.disabled || t[3] !== s || t[4] !== o || t[5] !== n ? (c = /* @__PURE__ */ (0, Y.jsx)(Me, {
|
|
9899
9899
|
"data-testid": "marimo-plugin-checkbox",
|
|
9900
9900
|
checked: n,
|
|
9901
9901
|
onCheckedChange: o,
|
|
@@ -9940,7 +9940,7 @@ var PS = (e) => {
|
|
|
9940
9940
|
onChange: u,
|
|
9941
9941
|
disabled: f
|
|
9942
9942
|
}, t[2] = e.setValue, t[3] = e.value, t[4] = l, t[5] = f, t[6] = p) : p = t[6];
|
|
9943
|
-
let { onChange: m } =
|
|
9943
|
+
let { onChange: m } = ra(p), h;
|
|
9944
9944
|
t[7] !== e || t[8] !== m ? (h = (t) => {
|
|
9945
9945
|
s((e) => t), typeof e.debounce == "number" ? m(t) : e.debounce || e.setValue(t);
|
|
9946
9946
|
}, t[7] = e, t[8] = m, t[9] = h) : h = t[9];
|
|
@@ -9992,7 +9992,7 @@ var PS = (e) => {
|
|
|
9992
9992
|
output: t
|
|
9993
9993
|
};
|
|
9994
9994
|
} };
|
|
9995
|
-
} }, BS = J.lazy(() => import("./chat-ui-
|
|
9995
|
+
} }, BS = J.lazy(() => import("./chat-ui-ruucqBTA.js").then((e) => ({ default: e.Chatbot }))), VS = G(W({
|
|
9996
9996
|
id: U(),
|
|
9997
9997
|
role: Io([
|
|
9998
9998
|
"system",
|
|
@@ -10047,9 +10047,9 @@ var PS = (e) => {
|
|
|
10047
10047
|
let s = r || "rounded-md border", c;
|
|
10048
10048
|
t[2] === s ? c = t[3] : (c = l(s), t[2] = s, t[3] = c);
|
|
10049
10049
|
let u;
|
|
10050
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, Y.jsx)(
|
|
10050
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, Y.jsx)(Fr, { children: Array.from({ length: 1 }).map(qS) }), t[4] = u) : u = t[4];
|
|
10051
10051
|
let d;
|
|
10052
|
-
t[5] === a ? d = t[6] : (d = /* @__PURE__ */ (0, Y.jsxs)(
|
|
10052
|
+
t[5] === a ? d = t[6] : (d = /* @__PURE__ */ (0, Y.jsxs)(Pr, { children: [u, /* @__PURE__ */ (0, Y.jsx)(Ur, { children: Array.from({ length: a }).map(YS) })] }), t[5] = a, t[6] = d);
|
|
10053
10053
|
let f;
|
|
10054
10054
|
t[7] !== c || t[8] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
10055
10055
|
part: "table-wrapper",
|
|
@@ -10065,16 +10065,16 @@ var PS = (e) => {
|
|
|
10065
10065
|
}), t[11] = o, t[12] = f, t[13] = m) : m = t[13], m;
|
|
10066
10066
|
};
|
|
10067
10067
|
function KS(e, t) {
|
|
10068
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
10068
|
+
return /* @__PURE__ */ (0, Y.jsx)(ir, { children: /* @__PURE__ */ (0, Y.jsx)("div", { className: "h-4 bg-(--slate-5) animate-pulse rounded-md w-[70%]" }) }, t);
|
|
10069
10069
|
}
|
|
10070
10070
|
function qS(e, t) {
|
|
10071
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
10071
|
+
return /* @__PURE__ */ (0, Y.jsx)(Gr, { children: Array.from({ length: 8 }).map(KS) }, t);
|
|
10072
10072
|
}
|
|
10073
10073
|
function JS(e, t) {
|
|
10074
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
10074
|
+
return /* @__PURE__ */ (0, Y.jsx)(Cr, { children: /* @__PURE__ */ (0, Y.jsx)("div", { className: "h-4 bg-(--slate-5) animate-pulse rounded-md w-[90%]" }) }, t);
|
|
10075
10075
|
}
|
|
10076
10076
|
function YS(e, t) {
|
|
10077
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
10077
|
+
return /* @__PURE__ */ (0, Y.jsx)(Gr, { children: Array.from({ length: 8 }).map(JS) }, t);
|
|
10078
10078
|
}
|
|
10079
10079
|
//#endregion
|
|
10080
10080
|
//#region src/core/kernel/messages.ts
|
|
@@ -10396,7 +10396,7 @@ function LC(e) {
|
|
|
10396
10396
|
];
|
|
10397
10397
|
return new Map(i);
|
|
10398
10398
|
}
|
|
10399
|
-
default: return
|
|
10399
|
+
default: return mi(e), t;
|
|
10400
10400
|
}
|
|
10401
10401
|
}
|
|
10402
10402
|
//#endregion
|
|
@@ -10448,7 +10448,7 @@ function RC(e, t) {
|
|
|
10448
10448
|
newColumnName: e.newName
|
|
10449
10449
|
});
|
|
10450
10450
|
break;
|
|
10451
|
-
default:
|
|
10451
|
+
default: mi(e);
|
|
10452
10452
|
}
|
|
10453
10453
|
}
|
|
10454
10454
|
return {
|
|
@@ -10458,7 +10458,7 @@ function RC(e, t) {
|
|
|
10458
10458
|
}
|
|
10459
10459
|
//#endregion
|
|
10460
10460
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
10461
|
-
var zC = J.lazy(() => import("./glide-data-editor-
|
|
10461
|
+
var zC = J.lazy(() => import("./glide-data-editor-DGmuodBB.js").then((e) => e.t)), BC = xS("marimo-data-editor", { cssStyles: [WS] }).withData(W({
|
|
10462
10462
|
initialValue: W({ edits: G(W({
|
|
10463
10463
|
rowIdx: K(),
|
|
10464
10464
|
columnId: U(),
|
|
@@ -10480,13 +10480,13 @@ var zC = J.lazy(() => import("./glide-data-editor-CBIPbkXG.js").then((e) => e.t)
|
|
|
10480
10480
|
})), VC = (e) => {
|
|
10481
10481
|
let t = (0, X.c)(20), [n, r] = (0, J.useState)(null), i, a;
|
|
10482
10482
|
t[0] !== e.columnNames || t[1] !== e.data || t[2] !== e.fieldTypes ? (i = async () => {
|
|
10483
|
-
let t =
|
|
10483
|
+
let t = un(e.fieldTypes ?? []), n = Array.isArray(e.data) ? e.data : await Bs(e.data, {
|
|
10484
10484
|
type: "csv",
|
|
10485
10485
|
parse: Rs(Object.fromEntries(t))
|
|
10486
10486
|
}, { handleBigIntAndNumberLike: !0 });
|
|
10487
10487
|
return {
|
|
10488
10488
|
data: n,
|
|
10489
|
-
columnFields: NC(
|
|
10489
|
+
columnFields: NC(un(e.fieldTypes ?? Zr(n)), e.columnNames)
|
|
10490
10490
|
};
|
|
10491
10491
|
}, a = [
|
|
10492
10492
|
e.fieldTypes,
|
|
@@ -10511,7 +10511,7 @@ var zC = J.lazy(() => import("./glide-data-editor-CBIPbkXG.js").then((e) => e.t)
|
|
|
10511
10511
|
}
|
|
10512
10512
|
if (n === null) {
|
|
10513
10513
|
let e;
|
|
10514
|
-
return t[12] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)(
|
|
10514
|
+
return t[12] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)(Mr, {
|
|
10515
10515
|
milliseconds: 200,
|
|
10516
10516
|
children: /* @__PURE__ */ (0, Y.jsx)(GS, { pageSize: 10 })
|
|
10517
10517
|
}), t[12] = e) : e = t[12], e;
|
|
@@ -10751,7 +10751,7 @@ ${n}
|
|
|
10751
10751
|
}
|
|
10752
10752
|
function iw(e) {
|
|
10753
10753
|
let t = {};
|
|
10754
|
-
for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = n === "field" && typeof r == "string" ? new ZC(
|
|
10754
|
+
for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = n === "field" && typeof r == "string" ? new ZC(Mt(r)) : new ZC(r));
|
|
10755
10755
|
return t;
|
|
10756
10756
|
}
|
|
10757
10757
|
//#endregion
|
|
@@ -10759,7 +10759,7 @@ function iw(e) {
|
|
|
10759
10759
|
var aw = (0, J.createContext)({
|
|
10760
10760
|
fields: [],
|
|
10761
10761
|
saveForm: a.NOOP,
|
|
10762
|
-
chartType:
|
|
10762
|
+
chartType: Wt.LINE
|
|
10763
10763
|
}), ow = () => (0, J.use)(aw);
|
|
10764
10764
|
//#endregion
|
|
10765
10765
|
//#region src/hooks/useBoolean.ts
|
|
@@ -10819,7 +10819,7 @@ var lw = J.forwardRef((e, t) => {
|
|
|
10819
10819
|
})
|
|
10820
10820
|
}), n[8] = s.setFalse, n[9] = s.setTrue, n[10] = p) : p = n[10];
|
|
10821
10821
|
let m;
|
|
10822
|
-
n[11] !== c || n[12] !== i.value || n[13] !== a ? (m = i.value != null && i.value.length === 1 && /* @__PURE__ */ (0, Y.jsx)(ue, { children:
|
|
10822
|
+
n[11] !== c || n[12] !== i.value || n[13] !== a ? (m = i.value != null && i.value.length === 1 && /* @__PURE__ */ (0, Y.jsx)(ue, { children: zi(a(i.value[0]), { locale: c }) }, i.value[0]), n[11] = c, n[12] = i.value, n[13] = a, n[14] = m) : m = n[14];
|
|
10823
10823
|
let h;
|
|
10824
10824
|
n[15] === m ? h = n[16] : (h = /* @__PURE__ */ (0, Y.jsx)(pe, { children: m }), n[15] = m, n[16] = h);
|
|
10825
10825
|
let g;
|
|
@@ -10891,9 +10891,9 @@ function fw(e) {
|
|
|
10891
10891
|
//#endregion
|
|
10892
10892
|
//#region src/components/editor/cell/useAddCell.ts
|
|
10893
10893
|
function pw() {
|
|
10894
|
-
let e = (0, X.c)(4), t = rs(ls), n =
|
|
10894
|
+
let e = (0, X.c)(4), t = rs(ls), n = Ne(), { createNewCell: r } = ot(), i;
|
|
10895
10895
|
return e[0] !== t || e[1] !== r || e[2] !== n ? (i = (e) => {
|
|
10896
|
-
e.includes("alt") &&
|
|
10896
|
+
e.includes("alt") && ct({
|
|
10897
10897
|
autoInstantiate: t,
|
|
10898
10898
|
createNewCell: r,
|
|
10899
10899
|
fromCellId: n
|
|
@@ -12164,7 +12164,7 @@ var hw = [mw({
|
|
|
12164
12164
|
borderBottom: "2px solid var(--cm-reactive-reference-border-color)"
|
|
12165
12165
|
},
|
|
12166
12166
|
".mo-cm-reactive-reference-hover": { cursor: "pointer" }
|
|
12167
|
-
})], _w = [
|
|
12167
|
+
})], _w = [_e(), _s.lineWrapping], vw = [Os(), _s.lineWrapping], yw = [ks(), _s.lineWrapping];
|
|
12168
12168
|
function bw(e) {
|
|
12169
12169
|
switch (e) {
|
|
12170
12170
|
case "sql": return vw;
|
|
@@ -12248,10 +12248,10 @@ var Sw = (e) => {
|
|
|
12248
12248
|
}), t[3] = r, t[4] = a), a;
|
|
12249
12249
|
}, Cw = (e) => {
|
|
12250
12250
|
let t = (0, X.c)(9), n = e.hidden ? "Show code" : "Hide code", r = e.hidden ? "Show code" : "Hide code", i;
|
|
12251
|
-
t[0] === e.hidden ? i = t[1] : (i = e.hidden ? /* @__PURE__ */ (0, Y.jsx)(
|
|
12251
|
+
t[0] === e.hidden ? i = t[1] : (i = e.hidden ? /* @__PURE__ */ (0, Y.jsx)(ut, {
|
|
12252
12252
|
size: 14,
|
|
12253
12253
|
strokeWidth: 1.5
|
|
12254
|
-
}) : /* @__PURE__ */ (0, Y.jsx)(
|
|
12254
|
+
}) : /* @__PURE__ */ (0, Y.jsx)(rr, {
|
|
12255
12255
|
size: 14,
|
|
12256
12256
|
strokeWidth: 1.5
|
|
12257
12257
|
}), t[0] = e.hidden, t[1] = i);
|
|
@@ -12303,7 +12303,7 @@ var Ew = (e) => {
|
|
|
12303
12303
|
let t = (0, X.c)(5), { text: n, tooltip: r } = e, i;
|
|
12304
12304
|
t[0] === r ? i = t[1] : (i = r && /* @__PURE__ */ (0, Y.jsx)(me, {
|
|
12305
12305
|
content: r,
|
|
12306
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
12306
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ct, { className: "w-3 h-3 mt-0.5" })
|
|
12307
12307
|
}), t[0] = r, t[1] = i);
|
|
12308
12308
|
let a;
|
|
12309
12309
|
return t[2] !== i || t[3] !== n ? (a = /* @__PURE__ */ (0, Y.jsxs)("h2", {
|
|
@@ -12387,7 +12387,7 @@ var Ew = (e) => {
|
|
|
12387
12387
|
let p = f, m;
|
|
12388
12388
|
t[10] !== p || t[11] !== r || t[12] !== n || t[13] !== s || t[14] !== o || t[15] !== i || t[16] !== d || t[17] !== l ? (m = (e) => {
|
|
12389
12389
|
let { field: t } = e;
|
|
12390
|
-
return /* @__PURE__ */ (0, Y.jsx)(yh, { children: /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
12390
|
+
return /* @__PURE__ */ (0, Y.jsx)(yh, { children: /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(ji, {
|
|
12391
12391
|
...t,
|
|
12392
12392
|
onValueChange: (e) => {
|
|
12393
12393
|
if (e === Fw) {
|
|
@@ -12399,28 +12399,28 @@ var Ew = (e) => {
|
|
|
12399
12399
|
return;
|
|
12400
12400
|
}
|
|
12401
12401
|
let t = r.find((t) => t.name === e);
|
|
12402
|
-
t && (s.setValue(n, e), s.setValue(l, t.type), s.setValue(d,
|
|
12402
|
+
t && (s.setValue(n, e), s.setValue(l, t.type), s.setValue(d, Ut(t.type)), i?.(n, t.type));
|
|
12403
12403
|
},
|
|
12404
12404
|
value: t.value ?? "",
|
|
12405
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12405
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Ai, {
|
|
12406
12406
|
className: "w-40 truncate",
|
|
12407
12407
|
onClear: t.value ? p : void 0,
|
|
12408
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
12409
|
-
}), /* @__PURE__ */ (0, Y.jsxs)(
|
|
12410
|
-
t.value && /* @__PURE__ */ (0, Y.jsx)(
|
|
12408
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ci, { placeholder: "Select column" })
|
|
12409
|
+
}), /* @__PURE__ */ (0, Y.jsxs)(Di, { children: [
|
|
12410
|
+
t.value && /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
12411
12411
|
value: Fw,
|
|
12412
12412
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
12413
12413
|
className: "flex items-center truncate",
|
|
12414
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12414
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(pi, { className: "w-3 h-3 mr-2" }), "Clear"]
|
|
12415
12415
|
})
|
|
12416
12416
|
}),
|
|
12417
|
-
o && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12417
|
+
o && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
12418
12418
|
value: "__count__",
|
|
12419
12419
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
12420
12420
|
className: "flex items-center truncate",
|
|
12421
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12421
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(jt, { className: "w-3 h-3 mr-2" }), "Count of records"]
|
|
12422
12422
|
})
|
|
12423
|
-
}, "__count__"), /* @__PURE__ */ (0, Y.jsx)(
|
|
12423
|
+
}, "__count__"), /* @__PURE__ */ (0, Y.jsx)(Oi, {})] }),
|
|
12424
12424
|
r.map(Yw)
|
|
12425
12425
|
] })]
|
|
12426
12426
|
}) }) });
|
|
@@ -12437,14 +12437,14 @@ var Ew = (e) => {
|
|
|
12437
12437
|
let { field: t } = e;
|
|
12438
12438
|
return /* @__PURE__ */ (0, Y.jsxs)(yh, {
|
|
12439
12439
|
className: "flex flex-row items-center justify-between",
|
|
12440
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
12440
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(ji, {
|
|
12441
12441
|
...t,
|
|
12442
12442
|
onValueChange: t.onChange,
|
|
12443
12443
|
value: t.value ?? a,
|
|
12444
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12444
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Ai, {
|
|
12445
12445
|
className: "truncate",
|
|
12446
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
12447
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
12446
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ci, { placeholder: "Select an option" })
|
|
12447
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Di, { children: /* @__PURE__ */ (0, Y.jsx)(ki, { children: i.filter(Xw).map(Zw) }) })]
|
|
12448
12448
|
}) })]
|
|
12449
12449
|
});
|
|
12450
12450
|
}, t[0] = a, t[1] = r, t[2] = i, t[3] = s) : s = t[3];
|
|
@@ -12460,7 +12460,7 @@ var Ew = (e) => {
|
|
|
12460
12460
|
let { field: t } = e;
|
|
12461
12461
|
return /* @__PURE__ */ (0, Y.jsxs)(yh, {
|
|
12462
12462
|
className: "flex flex-row gap-2 items-center",
|
|
12463
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
12463
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(ta, {
|
|
12464
12464
|
...t,
|
|
12465
12465
|
value: t.value ?? "",
|
|
12466
12466
|
onValueChange: t.onChange,
|
|
@@ -12485,7 +12485,7 @@ var Ew = (e) => {
|
|
|
12485
12485
|
children: [/* @__PURE__ */ (0, Y.jsx)(bh, {
|
|
12486
12486
|
className: "whitespace-nowrap",
|
|
12487
12487
|
children: o
|
|
12488
|
-
}), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
12488
|
+
}), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)($i, {
|
|
12489
12489
|
...t,
|
|
12490
12490
|
value: t.value,
|
|
12491
12491
|
onValueChange: t.onChange,
|
|
@@ -12509,7 +12509,7 @@ var Ew = (e) => {
|
|
|
12509
12509
|
let { field: t } = e;
|
|
12510
12510
|
return /* @__PURE__ */ (0, Y.jsxs)(yh, {
|
|
12511
12511
|
className: l("flex flex-row items-center gap-2", i),
|
|
12512
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
12512
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(Me, {
|
|
12513
12513
|
checked: t.value ?? a ?? !1,
|
|
12514
12514
|
onCheckedChange: t.onChange,
|
|
12515
12515
|
className: "w-4 h-4"
|
|
@@ -12599,7 +12599,7 @@ var Ew = (e) => {
|
|
|
12599
12599
|
size: "sm",
|
|
12600
12600
|
onClick: () => h(t),
|
|
12601
12601
|
className: "h-4 w-4 p-0",
|
|
12602
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
12602
|
+
children: /* @__PURE__ */ (0, Y.jsx)(pi, { className: "h-2 w-2" })
|
|
12603
12603
|
})
|
|
12604
12604
|
]
|
|
12605
12605
|
}, t)), /* @__PURE__ */ (0, Y.jsxs)(_, {
|
|
@@ -12627,27 +12627,27 @@ var Ew = (e) => {
|
|
|
12627
12627
|
let { field: t } = e;
|
|
12628
12628
|
return /* @__PURE__ */ (0, Y.jsxs)(yh, {
|
|
12629
12629
|
className: "flex flex-row items-center justify-between w-full",
|
|
12630
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
12630
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(ji, {
|
|
12631
12631
|
...t,
|
|
12632
12632
|
onValueChange: (e) => {
|
|
12633
12633
|
e === Fw ? o() : t.onChange(e);
|
|
12634
12634
|
},
|
|
12635
12635
|
value: t.value ?? "yearmonthdate",
|
|
12636
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12636
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Ai, {
|
|
12637
12637
|
onClear: t.value ? o : void 0,
|
|
12638
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
12639
|
-
}), /* @__PURE__ */ (0, Y.jsxs)(
|
|
12638
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ci, { placeholder: "Select unit" })
|
|
12639
|
+
}), /* @__PURE__ */ (0, Y.jsxs)(Di, {
|
|
12640
12640
|
className: "w-72",
|
|
12641
|
-
children: [t.value && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12641
|
+
children: [t.value && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
12642
12642
|
value: Fw,
|
|
12643
12643
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
12644
12644
|
className: "flex items-center truncate",
|
|
12645
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12645
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(pi, { className: "w-3 h-3 mr-2" }), "Clear"]
|
|
12646
12646
|
})
|
|
12647
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
12648
|
-
|
|
12649
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
12650
|
-
|
|
12647
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Oi, {})] }), /* @__PURE__ */ (0, Y.jsxs)(ki, { children: [
|
|
12648
|
+
Rt.map(s),
|
|
12649
|
+
/* @__PURE__ */ (0, Y.jsx)(Oi, {}),
|
|
12650
|
+
Bt.map(s)
|
|
12651
12651
|
] })]
|
|
12652
12652
|
})]
|
|
12653
12653
|
}) })]
|
|
@@ -12665,7 +12665,7 @@ var Ew = (e) => {
|
|
|
12665
12665
|
let { field: t } = e;
|
|
12666
12666
|
return /* @__PURE__ */ (0, Y.jsxs)(yh, {
|
|
12667
12667
|
className: "flex flex-row items-center justify-between w-full",
|
|
12668
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
12668
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }), /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(ji, {
|
|
12669
12669
|
...t,
|
|
12670
12670
|
onValueChange: (e) => {
|
|
12671
12671
|
t.onChange(e), a?.(e);
|
|
@@ -12673,18 +12673,18 @@ var Ew = (e) => {
|
|
|
12673
12673
|
value: t.value ?? i,
|
|
12674
12674
|
open: o,
|
|
12675
12675
|
onOpenChange: s,
|
|
12676
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12677
|
-
let t =
|
|
12678
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
12676
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Ai, { children: /* @__PURE__ */ (0, Y.jsx)(Ci, { placeholder: "Select an option" }) }), /* @__PURE__ */ (0, Y.jsx)(Di, { children: /* @__PURE__ */ (0, Y.jsx)(ki, { children: zt.map((e) => {
|
|
12677
|
+
let t = rt[e], n = e === "string" ? "categorical" : e;
|
|
12678
|
+
return /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
12679
12679
|
value: e,
|
|
12680
12680
|
className: "flex flex-col items-start justify-center",
|
|
12681
12681
|
subtitle: o && /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
12682
12682
|
className: "text-xs text-muted-foreground",
|
|
12683
|
-
children:
|
|
12683
|
+
children: en[e]
|
|
12684
12684
|
}),
|
|
12685
12685
|
children: /* @__PURE__ */ (0, Y.jsx)(Aw, {
|
|
12686
12686
|
Icon: t,
|
|
12687
|
-
text:
|
|
12687
|
+
text: Ni(n)
|
|
12688
12688
|
})
|
|
12689
12689
|
}, e);
|
|
12690
12690
|
}) }) })]
|
|
@@ -12698,7 +12698,7 @@ var Ew = (e) => {
|
|
|
12698
12698
|
render: l
|
|
12699
12699
|
}), t[5] = n, t[6] = c.control, t[7] = l, t[8] = u) : u = t[8], u;
|
|
12700
12700
|
}, Gw = (e) => {
|
|
12701
|
-
let t = (0, X.c)(12), { fieldName: n, selectedDataType: r, binFieldName: i, defaultAggregation: a } = e, o = Ip(), s = r === "string" ?
|
|
12701
|
+
let t = (0, X.c)(12), { fieldName: n, selectedDataType: r, binFieldName: i, defaultAggregation: a } = e, o = Ip(), s = r === "string" ? Gt : Lt, { chartType: c } = ow(), l = c !== Wt.HEATMAP, u = eT, d = tT, f;
|
|
12702
12702
|
t[0] !== i || t[1] !== o ? (f = (e) => {
|
|
12703
12703
|
let { value: t, previousValue: n, onChange: r } = e;
|
|
12704
12704
|
t === "bin" ? o.setValue(i, !0) : n === "bin" && o.setValue(i, !1), r(t);
|
|
@@ -12706,7 +12706,7 @@ var Ew = (e) => {
|
|
|
12706
12706
|
let p = f, m;
|
|
12707
12707
|
t[3] !== s || t[4] !== a || t[5] !== p || t[6] !== l ? (m = (e) => {
|
|
12708
12708
|
let { field: t } = e;
|
|
12709
|
-
return /* @__PURE__ */ (0, Y.jsx)(yh, { children: /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
12709
|
+
return /* @__PURE__ */ (0, Y.jsx)(yh, { children: /* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(ji, {
|
|
12710
12710
|
...t,
|
|
12711
12711
|
value: (t.value ?? a ?? "none").toString(),
|
|
12712
12712
|
onValueChange: (e) => {
|
|
@@ -12716,16 +12716,16 @@ var Ew = (e) => {
|
|
|
12716
12716
|
onChange: t.onChange
|
|
12717
12717
|
});
|
|
12718
12718
|
},
|
|
12719
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12719
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Ai, {
|
|
12720
12720
|
variant: "ghost",
|
|
12721
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
12722
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
12723
|
-
let t =
|
|
12721
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ci, {})
|
|
12722
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Di, { children: /* @__PURE__ */ (0, Y.jsxs)(ki, { children: [/* @__PURE__ */ (0, Y.jsx)(xi, { children: "Aggregation" }), s.map((e) => {
|
|
12723
|
+
let t = It[e], n = u(Vt[e] ?? "Other"), r = d({
|
|
12724
12724
|
value: e,
|
|
12725
|
-
Icon: t ??
|
|
12725
|
+
Icon: t ?? jt,
|
|
12726
12726
|
subtitle: n
|
|
12727
12727
|
});
|
|
12728
|
-
return e === "bin" ? l ? /* @__PURE__ */ (0, Y.jsxs)("div", { children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
12728
|
+
return e === "bin" ? l ? /* @__PURE__ */ (0, Y.jsxs)("div", { children: [/* @__PURE__ */ (0, Y.jsx)(Oi, {}), r] }, e) : null : r;
|
|
12729
12729
|
})] }) })]
|
|
12730
12730
|
}) }) });
|
|
12731
12731
|
}, t[3] = s, t[4] = a, t[5] = p, t[6] = l, t[7] = m) : m = t[7];
|
|
@@ -12759,7 +12759,7 @@ var Ew = (e) => {
|
|
|
12759
12759
|
}), t[3] = n, t[4] = i.control, t[5] = s, t[6] = c) : c = t[6], c;
|
|
12760
12760
|
}, qw = (e) => {
|
|
12761
12761
|
let t = (0, X.c)(5), { fieldName: n, label: r, defaultValue: i } = e, a;
|
|
12762
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (a =
|
|
12762
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (a = Jt.map(aT), t[0] = a) : a = t[0];
|
|
12763
12763
|
let o = i ?? "ascending", s;
|
|
12764
12764
|
return t[1] !== n || t[2] !== r || t[3] !== o ? (s = /* @__PURE__ */ (0, Y.jsx)(Lw, {
|
|
12765
12765
|
fieldName: n,
|
|
@@ -12797,8 +12797,8 @@ var Ew = (e) => {
|
|
|
12797
12797
|
};
|
|
12798
12798
|
function Yw(e) {
|
|
12799
12799
|
if (e.name.trim() === "") return null;
|
|
12800
|
-
let t =
|
|
12801
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
12800
|
+
let t = rt[e.type];
|
|
12801
|
+
return /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
12802
12802
|
value: e.name,
|
|
12803
12803
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
12804
12804
|
className: "flex items-center truncate",
|
|
@@ -12810,7 +12810,7 @@ function Xw(e) {
|
|
|
12810
12810
|
return e.value !== "";
|
|
12811
12811
|
}
|
|
12812
12812
|
function Zw(e) {
|
|
12813
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
12813
|
+
return /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
12814
12814
|
value: e.value,
|
|
12815
12815
|
children: e.display
|
|
12816
12816
|
}, e.value);
|
|
@@ -12819,8 +12819,8 @@ function Qw(e) {
|
|
|
12819
12819
|
return e;
|
|
12820
12820
|
}
|
|
12821
12821
|
function $w(e) {
|
|
12822
|
-
let [t, n] =
|
|
12823
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
12822
|
+
let [t, n] = Ft[e];
|
|
12823
|
+
return /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
12824
12824
|
value: e,
|
|
12825
12825
|
className: "flex flex-row",
|
|
12826
12826
|
subtitle: /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
@@ -12838,13 +12838,13 @@ function eT(e) {
|
|
|
12838
12838
|
}
|
|
12839
12839
|
function tT(e) {
|
|
12840
12840
|
let { value: t, Icon: n, subtitle: r } = e;
|
|
12841
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
12841
|
+
return /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
12842
12842
|
value: t,
|
|
12843
12843
|
className: "flex flex-col items-start justify-center",
|
|
12844
12844
|
subtitle: r,
|
|
12845
12845
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
12846
12846
|
className: "flex items-center",
|
|
12847
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(n, { className: "w-3 h-3 mr-2" }),
|
|
12847
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(n, { className: "w-3 h-3 mr-2" }), Ni(t)]
|
|
12848
12848
|
})
|
|
12849
12849
|
}, t);
|
|
12850
12850
|
}
|
|
@@ -12863,8 +12863,8 @@ function iT(e) {
|
|
|
12863
12863
|
function aT(e) {
|
|
12864
12864
|
return {
|
|
12865
12865
|
display: /* @__PURE__ */ (0, Y.jsx)(Aw, {
|
|
12866
|
-
Icon: e === "ascending" ? Ou :
|
|
12867
|
-
text:
|
|
12866
|
+
Icon: e === "ascending" ? Ou : br,
|
|
12867
|
+
text: Ni(e)
|
|
12868
12868
|
}),
|
|
12869
12869
|
value: e
|
|
12870
12870
|
};
|
|
@@ -12872,7 +12872,7 @@ function aT(e) {
|
|
|
12872
12872
|
//#endregion
|
|
12873
12873
|
//#region src/components/data-table/charts/components/chart-items.tsx
|
|
12874
12874
|
function oT(e) {
|
|
12875
|
-
return
|
|
12875
|
+
return Yt(e?.field) && e?.field !== "__count__";
|
|
12876
12876
|
}
|
|
12877
12877
|
function sT(e) {
|
|
12878
12878
|
return e?.selectedDataType === "string" && oT(e);
|
|
@@ -12887,7 +12887,7 @@ function uT(e) {
|
|
|
12887
12887
|
return e?.selectedDataType !== "temporal" && oT(e);
|
|
12888
12888
|
}
|
|
12889
12889
|
function dT(e) {
|
|
12890
|
-
let t = e?.type ?
|
|
12890
|
+
let t = e?.type ? Ut(e.type) : "string";
|
|
12891
12891
|
return {
|
|
12892
12892
|
inferredDataType: t,
|
|
12893
12893
|
selectedDataType: e?.selectedDataType || t
|
|
@@ -12918,38 +12918,38 @@ var fT = (e) => {
|
|
|
12918
12918
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = p({
|
|
12919
12919
|
variant: "outline",
|
|
12920
12920
|
className: "user-select-none w-full justify-between px-3"
|
|
12921
|
-
}), a = /* @__PURE__ */ (0, Y.jsx)(
|
|
12921
|
+
}), a = /* @__PURE__ */ (0, Y.jsx)(Ci, {}), t[0] = i, t[1] = a) : (i = t[0], a = t[1]);
|
|
12922
12922
|
let o;
|
|
12923
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ (0, Y.jsxs)(
|
|
12923
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ (0, Y.jsxs)(bi, {
|
|
12924
12924
|
className: i,
|
|
12925
|
-
children: [a, /* @__PURE__ */ (0, Y.jsx)(
|
|
12925
|
+
children: [a, /* @__PURE__ */ (0, Y.jsx)(Mi, {
|
|
12926
12926
|
asChild: !0,
|
|
12927
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
12927
|
+
children: /* @__PURE__ */ (0, Y.jsx)(_i, { className: "h-4 w-4 opacity-50" })
|
|
12928
12928
|
})]
|
|
12929
12929
|
}), t[2] = o) : o = t[2];
|
|
12930
12930
|
let s;
|
|
12931
12931
|
t[3] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
12932
12932
|
className: "flex flex-row gap-2 items-center",
|
|
12933
|
-
children: [o, /* @__PURE__ */ (0, Y.jsx)(
|
|
12933
|
+
children: [o, /* @__PURE__ */ (0, Y.jsx)(Di, { children: qt.map(yT) })]
|
|
12934
12934
|
}), t[3] = s) : s = t[3];
|
|
12935
12935
|
let c;
|
|
12936
|
-
return t[4] !== r || t[5] !== n ? (c = /* @__PURE__ */ (0, Y.jsx)(
|
|
12936
|
+
return t[4] !== r || t[5] !== n ? (c = /* @__PURE__ */ (0, Y.jsx)(ji, {
|
|
12937
12937
|
value: n,
|
|
12938
12938
|
onValueChange: r,
|
|
12939
12939
|
children: s
|
|
12940
12940
|
}), t[4] = r, t[5] = n, t[6] = c) : c = t[6], c;
|
|
12941
12941
|
}, mT = (e) => {
|
|
12942
|
-
let t = (0, X.c)(10), { chartType: n } = e, r =
|
|
12942
|
+
let t = (0, X.c)(10), { chartType: n } = e, r = $t[n], i;
|
|
12943
12943
|
t[0] === r ? i = t[1] : (i = /* @__PURE__ */ (0, Y.jsx)(r, { className: "w-4 h-4 mr-2" }), t[0] = r, t[1] = i);
|
|
12944
12944
|
let a;
|
|
12945
|
-
t[2] === n ? a = t[3] : (a =
|
|
12945
|
+
t[2] === n ? a = t[3] : (a = Ni(n), t[2] = n, t[3] = a);
|
|
12946
12946
|
let o;
|
|
12947
12947
|
t[4] !== i || t[5] !== a ? (o = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
12948
12948
|
className: "flex items-center",
|
|
12949
12949
|
children: [i, a]
|
|
12950
12950
|
}), t[4] = i, t[5] = a, t[6] = o) : o = t[6];
|
|
12951
12951
|
let s;
|
|
12952
|
-
return t[7] !== n || t[8] !== o ? (s = /* @__PURE__ */ (0, Y.jsx)(
|
|
12952
|
+
return t[7] !== n || t[8] !== o ? (s = /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
12953
12953
|
value: n,
|
|
12954
12954
|
className: "gap-2",
|
|
12955
12955
|
children: o
|
|
@@ -12959,7 +12959,7 @@ var fT = (e) => {
|
|
|
12959
12959
|
e[0] === t.control ? n = e[1] : (n = { control: t.control }, e[0] = t.control, e[1] = n);
|
|
12960
12960
|
let r = qp(n), i = ow(), a = r.general?.xColumn, o;
|
|
12961
12961
|
e[2] === a ? o = e[3] : (o = dT(a), e[2] = a, e[3] = o);
|
|
12962
|
-
let { inferredDataType: s } = o, c = i.chartType ===
|
|
12962
|
+
let { inferredDataType: s } = o, c = i.chartType === Wt.LINE || i.chartType === Wt.BAR || i.chartType === Wt.AREA, l;
|
|
12963
12963
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ (0, Y.jsx)(Ew, { text: "X-Axis" }), e[4] = l) : l = e[4];
|
|
12964
12964
|
let u;
|
|
12965
12965
|
e[5] !== i.fields || e[6] !== a ? (u = /* @__PURE__ */ (0, Y.jsx)(fT, {
|
|
@@ -12997,13 +12997,13 @@ var fT = (e) => {
|
|
|
12997
12997
|
let e = (0, X.c)(29), t = Ip(), n;
|
|
12998
12998
|
e[0] === t.control ? n = e[1] : (n = { control: t.control }, e[0] = t.control, e[1] = n);
|
|
12999
12999
|
let r = qp(n), i = ow(), a = r.general?.yColumn, o = a?.field, s;
|
|
13000
|
-
e[2] === o ? s = e[3] : (s =
|
|
13000
|
+
e[2] === o ? s = e[3] : (s = Yt(o), e[2] = o, e[3] = s);
|
|
13001
13001
|
let c = s, l = r.general?.xColumn?.field, u;
|
|
13002
|
-
e[4] === l ? u = e[5] : (u =
|
|
13002
|
+
e[4] === l ? u = e[5] : (u = Yt(l), e[4] = l, e[5] = u);
|
|
13003
13003
|
let d = u, f;
|
|
13004
13004
|
e[6] === a ? f = e[7] : (f = dT(a), e[6] = a, e[7] = f);
|
|
13005
13005
|
let { inferredDataType: p } = f, m;
|
|
13006
|
-
cT(a) ? m =
|
|
13006
|
+
cT(a) ? m = tn : sT(a) && (m = "count");
|
|
13007
13007
|
let h;
|
|
13008
13008
|
e[8] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, Y.jsx)(Ew, { text: "Y-Axis" }), e[8] = h) : h = e[8];
|
|
13009
13009
|
let g;
|
|
@@ -13068,14 +13068,14 @@ var fT = (e) => {
|
|
|
13068
13068
|
e[0] === n.control ? r = e[1] : (r = { control: n.control }, e[0] = n.control, e[1] = r);
|
|
13069
13069
|
let i = qp(r), a;
|
|
13070
13070
|
e[2] !== t || e[3] !== i.general?.facet ? (a = (e) => {
|
|
13071
|
-
let n = i.general?.facet?.[e], r =
|
|
13071
|
+
let n = i.general?.facet?.[e], r = Yt(n?.field), { inferredDataType: a } = dT(n), o = e === "row" ? "general.facet.row.linkYAxis" : "general.facet.column.linkXAxis";
|
|
13072
13072
|
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
13073
13073
|
className: "flex flex-col gap-1",
|
|
13074
13074
|
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
13075
13075
|
className: "flex flex-row justify-between",
|
|
13076
13076
|
children: [/* @__PURE__ */ (0, Y.jsx)("p", {
|
|
13077
13077
|
className: "font-semibold",
|
|
13078
|
-
children:
|
|
13078
|
+
children: Ni(e)
|
|
13079
13079
|
}), /* @__PURE__ */ (0, Y.jsx)(Iw, {
|
|
13080
13080
|
fieldName: `general.facet.${e}.field`,
|
|
13081
13081
|
columns: t
|
|
@@ -13130,9 +13130,9 @@ var bT = () => {
|
|
|
13130
13130
|
let e = (0, X.c)(17), t = Ip(), n;
|
|
13131
13131
|
e[0] === t.control ? n = e[1] : (n = { control: t.control }, e[0] = t.control, e[1] = n);
|
|
13132
13132
|
let r = qp(n), i = r.general?.yColumn, a = r.general?.colorByColumn, o = i?.field, s;
|
|
13133
|
-
e[2] === o ? s = e[3] : (s =
|
|
13133
|
+
e[2] === o ? s = e[3] : (s = Yt(o), e[2] = o, e[3] = s);
|
|
13134
13134
|
let c = s, { chartType: l } = ow(), u;
|
|
13135
|
-
e[4] !== l || e[5] !== a?.field ? (u =
|
|
13135
|
+
e[4] !== l || e[5] !== a?.field ? (u = Yt(a?.field) && (l === Wt.BAR || l === Wt.LINE), e[4] = l, e[5] = a?.field, e[6] = u) : u = e[6];
|
|
13136
13136
|
let d = u, f, p, m;
|
|
13137
13137
|
e[7] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, Y.jsx)(me, {
|
|
13138
13138
|
delayDuration: 100,
|
|
@@ -13175,7 +13175,7 @@ var bT = () => {
|
|
|
13175
13175
|
label: "Plot title",
|
|
13176
13176
|
fieldName: "general.title"
|
|
13177
13177
|
}), e[1] = r) : r = e[1];
|
|
13178
|
-
let i = t ===
|
|
13178
|
+
let i = t === Wt.SCATTER, a;
|
|
13179
13179
|
e[2] === i ? a = e[3] : (a = /* @__PURE__ */ (0, Y.jsxs)(Mw, {
|
|
13180
13180
|
value: "general",
|
|
13181
13181
|
children: [n, /* @__PURE__ */ (0, Y.jsxs)(Nw, { children: [r, /* @__PURE__ */ (0, Y.jsx)(Bw, {
|
|
@@ -13222,15 +13222,15 @@ var bT = () => {
|
|
|
13222
13222
|
e[9] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ (0, Y.jsx)(Lw, {
|
|
13223
13223
|
fieldName: "color.field",
|
|
13224
13224
|
label: "Field",
|
|
13225
|
-
options:
|
|
13226
|
-
defaultValue:
|
|
13225
|
+
options: Xt.map(CT),
|
|
13226
|
+
defaultValue: Qt
|
|
13227
13227
|
}), e[9] = d) : d = e[9];
|
|
13228
13228
|
let f, p;
|
|
13229
13229
|
e[10] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, Y.jsx)(Lw, {
|
|
13230
13230
|
fieldName: "color.scheme",
|
|
13231
13231
|
label: "Color scheme",
|
|
13232
|
-
defaultValue:
|
|
13233
|
-
options:
|
|
13232
|
+
defaultValue: Pt,
|
|
13233
|
+
options: nn.map(wT)
|
|
13234
13234
|
}), p = /* @__PURE__ */ (0, Y.jsx)(Hw, {
|
|
13235
13235
|
fieldName: "color.range",
|
|
13236
13236
|
label: "Color range"
|
|
@@ -13244,7 +13244,7 @@ var bT = () => {
|
|
|
13244
13244
|
p,
|
|
13245
13245
|
/* @__PURE__ */ (0, Y.jsxs)("p", {
|
|
13246
13246
|
className: "text-xs",
|
|
13247
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
13247
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Ct, { className: "w-2.5 h-2.5 inline mb-1 mr-1" }), "If you are using color range, color scheme will be ignored."]
|
|
13248
13248
|
})
|
|
13249
13249
|
] })]
|
|
13250
13250
|
}), e[12] = m) : m = e[12];
|
|
@@ -13300,13 +13300,13 @@ var bT = () => {
|
|
|
13300
13300
|
};
|
|
13301
13301
|
function CT(e) {
|
|
13302
13302
|
return {
|
|
13303
|
-
display:
|
|
13303
|
+
display: Ni(e),
|
|
13304
13304
|
value: e
|
|
13305
13305
|
};
|
|
13306
13306
|
}
|
|
13307
13307
|
function wT(e) {
|
|
13308
13308
|
return {
|
|
13309
|
-
display:
|
|
13309
|
+
display: Ni(e),
|
|
13310
13310
|
value: e
|
|
13311
13311
|
};
|
|
13312
13312
|
}
|
|
@@ -13316,9 +13316,9 @@ var TT = () => {
|
|
|
13316
13316
|
let e = (0, X.c)(17), t = Ip(), n;
|
|
13317
13317
|
e[0] === t.control ? n = e[1] : (n = { control: t.control }, e[0] = t.control, e[1] = n);
|
|
13318
13318
|
let r = qp(n), i = r.general?.xColumn?.field, a;
|
|
13319
|
-
e[2] === i ? a = e[3] : (a =
|
|
13319
|
+
e[2] === i ? a = e[3] : (a = Yt(i), e[2] = i, e[3] = a);
|
|
13320
13320
|
let o = a, s = r.general?.yColumn?.field, c;
|
|
13321
|
-
e[4] === s ? c = e[5] : (c =
|
|
13321
|
+
e[4] === s ? c = e[5] : (c = Yt(s), e[4] = s, e[5] = c);
|
|
13322
13322
|
let l = c, u;
|
|
13323
13323
|
e[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, Y.jsx)(hT, {}), e[6] = u) : u = e[6];
|
|
13324
13324
|
let d;
|
|
@@ -13352,7 +13352,7 @@ var TT = () => {
|
|
|
13352
13352
|
let i = qp(r), a = i.general?.colorByColumn, o = i.general?.yColumn?.selectedDataType;
|
|
13353
13353
|
(o === "" || !o) && (o = "string");
|
|
13354
13354
|
let s;
|
|
13355
|
-
e[2] === a ? s = e[3] : (s = a?.type ?
|
|
13355
|
+
e[2] === a ? s = e[3] : (s = a?.type ? Ut(a.type) : "string", e[2] = a, e[3] = s);
|
|
13356
13356
|
let c = s, l;
|
|
13357
13357
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ (0, Y.jsx)(Ew, { text: "Color by" }), e[4] = l) : l = e[4];
|
|
13358
13358
|
let u;
|
|
@@ -13362,7 +13362,7 @@ var TT = () => {
|
|
|
13362
13362
|
includeCountField: !1
|
|
13363
13363
|
}), e[5] = n, e[6] = u);
|
|
13364
13364
|
let d;
|
|
13365
|
-
e[7] !== a?.field || e[8] !== c ? (d =
|
|
13365
|
+
e[7] !== a?.field || e[8] !== c ? (d = Yt(a?.field) && /* @__PURE__ */ (0, Y.jsx)(Ww, {
|
|
13366
13366
|
fieldName: "general.colorByColumn.selectedDataType",
|
|
13367
13367
|
label: "Data Type",
|
|
13368
13368
|
defaultValue: c
|
|
@@ -13410,11 +13410,11 @@ var TT = () => {
|
|
|
13410
13410
|
}
|
|
13411
13411
|
let o;
|
|
13412
13412
|
t[1] !== r || t[2] !== i || t[3] !== a ? (o = (e) => {
|
|
13413
|
-
if (typeof e == "string") return /* @__PURE__ */ (0, Y.jsx)(
|
|
13414
|
-
let t =
|
|
13413
|
+
if (typeof e == "string") return /* @__PURE__ */ (0, Y.jsx)(gn, { children: e });
|
|
13414
|
+
let t = Zt(e, r);
|
|
13415
13415
|
return /* @__PURE__ */ (0, Y.jsx)(J.Suspense, {
|
|
13416
13416
|
fallback: /* @__PURE__ */ (0, Y.jsx)(OT, {}),
|
|
13417
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
13417
|
+
children: /* @__PURE__ */ (0, Y.jsx)(On, {
|
|
13418
13418
|
spec: t,
|
|
13419
13419
|
"data-container-width": Ls(t),
|
|
13420
13420
|
options: {
|
|
@@ -13440,7 +13440,7 @@ var TT = () => {
|
|
|
13440
13440
|
}), t[5] = n, t[6] = s, t[7] = c) : c = t[7], c;
|
|
13441
13441
|
}, OT = () => {
|
|
13442
13442
|
let e = (0, X.c)(1), t;
|
|
13443
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ (0, Y.jsx)(
|
|
13443
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ (0, Y.jsx)(gn, {
|
|
13444
13444
|
className: "mt-14",
|
|
13445
13445
|
children: "Loading chart..."
|
|
13446
13446
|
}), e[0] = t) : t = e[0], t;
|
|
@@ -13451,10 +13451,10 @@ var TT = () => {
|
|
|
13451
13451
|
}), AT = W({
|
|
13452
13452
|
field: U().optional(),
|
|
13453
13453
|
type: Io([...XS, ""]).catch("unknown").optional(),
|
|
13454
|
-
selectedDataType: Io([...
|
|
13455
|
-
sort: Io(
|
|
13456
|
-
timeUnit: Io(
|
|
13457
|
-
}), jT = AT.extend({ aggregate: Io(
|
|
13454
|
+
selectedDataType: Io([...zt, ""]).optional(),
|
|
13455
|
+
sort: Io(Jt).default("ascending").optional(),
|
|
13456
|
+
timeUnit: Io(Ht).optional()
|
|
13457
|
+
}), jT = AT.extend({ aggregate: Io(Lt).default(Qt).optional() }), MT = AT.extend({
|
|
13458
13458
|
linkYAxis: H().default(!0),
|
|
13459
13459
|
binned: H().default(!0),
|
|
13460
13460
|
maxbins: K().default(6)
|
|
@@ -13486,8 +13486,8 @@ var TT = () => {
|
|
|
13486
13486
|
bin: kT.optional()
|
|
13487
13487
|
}).optional(),
|
|
13488
13488
|
color: W({
|
|
13489
|
-
field: Io([...
|
|
13490
|
-
scheme: U().default(
|
|
13489
|
+
field: Io([...Xt, Qt]).default(Qt),
|
|
13490
|
+
scheme: U().default(Pt).optional(),
|
|
13491
13491
|
range: G(U()).optional(),
|
|
13492
13492
|
domain: G(U()).optional(),
|
|
13493
13493
|
bin: kT.optional()
|
|
@@ -13522,7 +13522,7 @@ function FT() {
|
|
|
13522
13522
|
}
|
|
13523
13523
|
} },
|
|
13524
13524
|
color: {
|
|
13525
|
-
field:
|
|
13525
|
+
field: Qt,
|
|
13526
13526
|
scheme: "default"
|
|
13527
13527
|
},
|
|
13528
13528
|
tooltips: {
|
|
@@ -13537,7 +13537,7 @@ var IT = "marimo:charts:v2", LT = W({
|
|
|
13537
13537
|
tabName: U().transform((e) => e),
|
|
13538
13538
|
chartType: U().transform((e) => e),
|
|
13539
13539
|
config: PT
|
|
13540
|
-
}), RT = G(to([U().transform((e) => e), G(LT)])), zT = new
|
|
13540
|
+
}), RT = G(to([U().transform((e) => e), G(LT)])), zT = new Ie(IT, RT, () => []), BT = {
|
|
13541
13541
|
getItem: (e) => {
|
|
13542
13542
|
try {
|
|
13543
13543
|
let t = zT.get(e);
|
|
@@ -13552,9 +13552,9 @@ var IT = "marimo:charts:v2", LT = W({
|
|
|
13552
13552
|
removeItem: (e) => {
|
|
13553
13553
|
zT.remove(e);
|
|
13554
13554
|
}
|
|
13555
|
-
}, VT =
|
|
13555
|
+
}, VT = ge(IT, /* @__PURE__ */ new Map(), BT);
|
|
13556
13556
|
function HT(e, t) {
|
|
13557
|
-
let n =
|
|
13557
|
+
let n = Ni(t);
|
|
13558
13558
|
return e === 0 ? `${n} Chart` : `${n} Chart ${e + 1}`;
|
|
13559
13559
|
}
|
|
13560
13560
|
var UT = BT.getItem(IT);
|
|
@@ -13612,24 +13612,24 @@ var ZT = ({ cellId: e, data: t, dataTable: n, totalRows: r, columns: i, getDataU
|
|
|
13612
13612
|
} : e), o = new Map(u).set(e, a);
|
|
13613
13613
|
d(o), m(a[i].tabName);
|
|
13614
13614
|
}, C = r === "too_many" || r > JT || i > YT;
|
|
13615
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
13615
|
+
return /* @__PURE__ */ (0, Y.jsxs)(on, {
|
|
13616
13616
|
value: p,
|
|
13617
13617
|
className: "-mt-1",
|
|
13618
13618
|
children: [
|
|
13619
|
-
/* @__PURE__ */ (0, Y.jsxs)(
|
|
13619
|
+
/* @__PURE__ */ (0, Y.jsxs)(An, {
|
|
13620
13620
|
part: "table-tabs",
|
|
13621
13621
|
children: [
|
|
13622
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
13622
|
+
/* @__PURE__ */ (0, Y.jsx)(Mn, {
|
|
13623
13623
|
className: "text-xs",
|
|
13624
13624
|
value: KT,
|
|
13625
13625
|
onClick: () => m(KT),
|
|
13626
13626
|
children: "Table"
|
|
13627
13627
|
}),
|
|
13628
|
-
f.map((e, t) => /* @__PURE__ */ (0, Y.jsxs)(
|
|
13628
|
+
f.map((e, t) => /* @__PURE__ */ (0, Y.jsxs)(Mn, {
|
|
13629
13629
|
className: "text-xs",
|
|
13630
13630
|
value: e.tabName,
|
|
13631
13631
|
onClick: () => m(e.tabName),
|
|
13632
|
-
children: [e.tabName, /* @__PURE__ */ (0, Y.jsx)(
|
|
13632
|
+
children: [e.tabName, /* @__PURE__ */ (0, Y.jsx)(pi, {
|
|
13633
13633
|
className: "w-3 h-3 ml-1 mt-[0.5px] hover:text-red-500 hover:font-semibold",
|
|
13634
13634
|
onClick: (t) => {
|
|
13635
13635
|
t.stopPropagation(), b(e.tabName);
|
|
@@ -13645,12 +13645,12 @@ var ZT = ({ cellId: e, data: t, dataTable: n, totalRows: r, columns: i, getDataU
|
|
|
13645
13645
|
})
|
|
13646
13646
|
]
|
|
13647
13647
|
}),
|
|
13648
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
13648
|
+
/* @__PURE__ */ (0, Y.jsx)(Tr, {
|
|
13649
13649
|
className: "mt-1 overflow-hidden",
|
|
13650
13650
|
value: KT,
|
|
13651
13651
|
children: n
|
|
13652
13652
|
}),
|
|
13653
|
-
f.map((e, r) => /* @__PURE__ */ (0, Y.jsx)(
|
|
13653
|
+
f.map((e, r) => /* @__PURE__ */ (0, Y.jsx)(Tr, {
|
|
13654
13654
|
value: e.tabName,
|
|
13655
13655
|
className: "h-[400px] mt-0",
|
|
13656
13656
|
children: /* @__PURE__ */ (0, Y.jsx)($T, {
|
|
@@ -13668,26 +13668,33 @@ var ZT = ({ cellId: e, data: t, dataTable: n, totalRows: r, columns: i, getDataU
|
|
|
13668
13668
|
S(e.tabName, t);
|
|
13669
13669
|
},
|
|
13670
13670
|
getDataUrl: a,
|
|
13671
|
-
|
|
13671
|
+
hasSchema: !!o?.length,
|
|
13672
|
+
fieldTypes: XT(o ?? Zr(n.props.data), s),
|
|
13672
13673
|
isLargeDataset: C
|
|
13673
13674
|
})
|
|
13674
13675
|
}, r))
|
|
13675
13676
|
]
|
|
13676
13677
|
});
|
|
13677
|
-
}, QT = "X and Y columns are not set", $T = ({ tableData: e, chartConfig: t, chartType: n, saveChart: r, saveChartType: i, getDataUrl: a, fieldTypes: o,
|
|
13678
|
-
let { theme:
|
|
13678
|
+
}, QT = "X and Y columns are not set", $T = ({ tableData: e, chartConfig: t, chartType: n, saveChart: r, saveChartType: i, getDataUrl: a, fieldTypes: o, hasSchema: s = !!o?.length, isLargeDataset: c }) => {
|
|
13679
|
+
let { theme: l } = fs(), u = Qm({
|
|
13679
13680
|
defaultValues: t ?? FT(),
|
|
13680
13681
|
resolver: ch(PT)
|
|
13681
|
-
}), [
|
|
13682
|
-
if (!a || e.length === 0 || !
|
|
13682
|
+
}), [d, f] = (0, J.useState)(n), [p, m] = (0, J.useState)(!1), [h, g] = (0, J.useState)(!c), { ref: v } = WC(), y = Ys(s ? o : null), { data: b, isPending: x, error: S } = Ns(async () => {
|
|
13683
|
+
if (!a || e.length === 0 || !h) return [];
|
|
13683
13684
|
let t = await a({});
|
|
13684
|
-
|
|
13685
|
+
if (Array.isArray(t.data_url)) return t.data_url;
|
|
13686
|
+
let n;
|
|
13687
|
+
return n = t.format === "arrow" ? { type: "arrow" } : t.format === "json" ? { type: "json" } : {
|
|
13685
13688
|
type: "csv",
|
|
13686
|
-
parse:
|
|
13687
|
-
},
|
|
13688
|
-
}, [
|
|
13689
|
-
|
|
13690
|
-
|
|
13689
|
+
parse: Rs(y && Object.fromEntries(y.map(([e, [t]]) => [e, t])), { parseDates: !0 })
|
|
13690
|
+
}, Bs(t.data_url, n);
|
|
13691
|
+
}, [
|
|
13692
|
+
e,
|
|
13693
|
+
h,
|
|
13694
|
+
y
|
|
13695
|
+
]), C = u.watch(), w = (0, J.useMemo)(() => structuredClone(C), [C]), T = Kt(d, w, l, "container", qT), E = (0, J.useMemo)(() => x ? /* @__PURE__ */ (0, Y.jsx)(Sn, {}) : S ? /* @__PURE__ */ (0, Y.jsx)(In, { error: S }) : h ? /* @__PURE__ */ (0, Y.jsx)(DT, {
|
|
13696
|
+
baseSpec: T,
|
|
13697
|
+
data: b,
|
|
13691
13698
|
height: qT
|
|
13692
13699
|
}) : /* @__PURE__ */ (0, Y.jsxs)(Fs, {
|
|
13693
13700
|
variant: "warning",
|
|
@@ -13696,56 +13703,56 @@ var ZT = ({ cellId: e, data: t, dataTable: n, totalRows: r, columns: i, getDataU
|
|
|
13696
13703
|
className: "flex flex-row justify-between items-center w-full",
|
|
13697
13704
|
children: [/* @__PURE__ */ (0, Y.jsx)("span", { children: "Rendering large datasets is not well supported and may crash the browser" }), /* @__PURE__ */ (0, Y.jsx)(_, {
|
|
13698
13705
|
variant: "warn",
|
|
13699
|
-
onClick: () =>
|
|
13706
|
+
onClick: () => g(!0),
|
|
13700
13707
|
className: "h-8",
|
|
13701
13708
|
children: "Proceed"
|
|
13702
13709
|
})]
|
|
13703
13710
|
})]
|
|
13704
13711
|
}), [
|
|
13705
|
-
|
|
13706
|
-
|
|
13707
|
-
|
|
13708
|
-
|
|
13709
|
-
|
|
13712
|
+
x,
|
|
13713
|
+
S,
|
|
13714
|
+
h,
|
|
13715
|
+
T,
|
|
13716
|
+
b
|
|
13710
13717
|
]);
|
|
13711
13718
|
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
13712
13719
|
className: "flex flex-row gap-2 h-full rounded-md border-t pr-2",
|
|
13713
13720
|
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
13714
|
-
className: `relative flex flex-col gap-2 overflow-auto px-2 py-3 scrollbar-thin transition-width duration-200 ${
|
|
13715
|
-
children: [!
|
|
13716
|
-
value:
|
|
13721
|
+
className: `relative flex flex-col gap-2 overflow-auto px-2 py-3 scrollbar-thin transition-width duration-200 ${p ? "w-8" : "w-[300px]"}`,
|
|
13722
|
+
children: [!p && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(pT, {
|
|
13723
|
+
value: d,
|
|
13717
13724
|
onValueChange: (e) => {
|
|
13718
|
-
|
|
13725
|
+
f(e), i(e);
|
|
13719
13726
|
}
|
|
13720
13727
|
}), /* @__PURE__ */ (0, Y.jsx)(eE, {
|
|
13721
|
-
form:
|
|
13728
|
+
form: u,
|
|
13722
13729
|
saveChart: r,
|
|
13723
13730
|
fieldTypes: o,
|
|
13724
|
-
chartType:
|
|
13731
|
+
chartType: d
|
|
13725
13732
|
})] }), /* @__PURE__ */ (0, Y.jsx)(_, {
|
|
13726
13733
|
variant: "outline",
|
|
13727
13734
|
size: "icon",
|
|
13728
13735
|
className: "border-border ml-auto",
|
|
13729
|
-
onClick: () =>
|
|
13730
|
-
title:
|
|
13731
|
-
children:
|
|
13736
|
+
onClick: () => m((e) => !e),
|
|
13737
|
+
title: p ? "Expand sidebar" : "Collapse sidebar",
|
|
13738
|
+
children: p ? /* @__PURE__ */ (0, Y.jsx)(na, { className: "w-4 h-5" }) : /* @__PURE__ */ (0, Y.jsx)(jr, { className: "w-4 h-5" })
|
|
13732
13739
|
})]
|
|
13733
13740
|
}), /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
13734
13741
|
className: "flex-1 overflow-auto h-full w-full mt-3",
|
|
13735
13742
|
children: (() => {
|
|
13736
13743
|
let e = QT;
|
|
13737
|
-
return typeof
|
|
13744
|
+
return typeof T != "string" && (e = rw(T, "_df", "_chart")), /* @__PURE__ */ (0, Y.jsxs)(on, {
|
|
13738
13745
|
defaultValue: "chart",
|
|
13739
13746
|
children: [
|
|
13740
13747
|
/* @__PURE__ */ (0, Y.jsx)("div", {
|
|
13741
13748
|
className: "flex flex-row gap-1.5 items-center",
|
|
13742
|
-
children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
13743
|
-
/* @__PURE__ */ (0, Y.jsxs)(
|
|
13749
|
+
children: /* @__PURE__ */ (0, Y.jsxs)(An, { children: [
|
|
13750
|
+
/* @__PURE__ */ (0, Y.jsxs)(Mn, {
|
|
13744
13751
|
value: "chart",
|
|
13745
13752
|
className: "h-6",
|
|
13746
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
13753
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Nt, { className: "text-muted-foreground mr-2 w-4 h-4" }), "Chart"]
|
|
13747
13754
|
}),
|
|
13748
|
-
/* @__PURE__ */ (0, Y.jsxs)(
|
|
13755
|
+
/* @__PURE__ */ (0, Y.jsxs)(Mn, {
|
|
13749
13756
|
value: "code",
|
|
13750
13757
|
className: "h-6",
|
|
13751
13758
|
children: [/* @__PURE__ */ (0, Y.jsx)(GC, { className: "text-muted-foreground mr-2" }), "Python code"]
|
|
@@ -13753,12 +13760,12 @@ var ZT = ({ cellId: e, data: t, dataTable: n, totalRows: r, columns: i, getDataU
|
|
|
13753
13760
|
!1
|
|
13754
13761
|
] })
|
|
13755
13762
|
}),
|
|
13756
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
13763
|
+
/* @__PURE__ */ (0, Y.jsx)(Tr, {
|
|
13757
13764
|
value: "chart",
|
|
13758
|
-
ref:
|
|
13759
|
-
children:
|
|
13765
|
+
ref: v,
|
|
13766
|
+
children: E
|
|
13760
13767
|
}),
|
|
13761
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
13768
|
+
/* @__PURE__ */ (0, Y.jsx)(Tr, {
|
|
13762
13769
|
value: "code",
|
|
13763
13770
|
children: /* @__PURE__ */ (0, Y.jsx)(Pw, {
|
|
13764
13771
|
code: e,
|
|
@@ -13785,8 +13792,8 @@ var ZT = ({ cellId: e, data: t, dataTable: n, totalRows: r, columns: i, getDataU
|
|
|
13785
13792
|
let e = n.getValues();
|
|
13786
13793
|
r(e);
|
|
13787
13794
|
}, t[3] = n, t[4] = r, t[5] = c) : c = t[5];
|
|
13788
|
-
let l =
|
|
13789
|
-
a ===
|
|
13795
|
+
let l = Ii(c, 300), u = bT;
|
|
13796
|
+
a === Wt.PIE ? u = ET : a === Wt.HEATMAP && (u = TT);
|
|
13790
13797
|
let d;
|
|
13791
13798
|
t[6] !== a || t[7] !== l || t[8] !== s ? (d = {
|
|
13792
13799
|
fields: s,
|
|
@@ -13794,36 +13801,36 @@ var ZT = ({ cellId: e, data: t, dataTable: n, totalRows: r, columns: i, getDataU
|
|
|
13794
13801
|
chartType: a
|
|
13795
13802
|
}, t[6] = a, t[7] = l, t[8] = s, t[9] = d) : d = t[9];
|
|
13796
13803
|
let f;
|
|
13797
|
-
t[10] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, Y.jsxs)(
|
|
13804
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, Y.jsxs)(Mn, {
|
|
13798
13805
|
value: "data",
|
|
13799
13806
|
className: "w-1/2 h-6",
|
|
13800
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
13807
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Qe, { className: "w-4 h-4 mr-2" }), "Data"]
|
|
13801
13808
|
}), t[10] = f) : f = t[10];
|
|
13802
13809
|
let p;
|
|
13803
|
-
t[11] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ (0, Y.jsxs)(
|
|
13810
|
+
t[11] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ (0, Y.jsxs)(An, {
|
|
13804
13811
|
className: "w-full",
|
|
13805
|
-
children: [f, /* @__PURE__ */ (0, Y.jsxs)(
|
|
13812
|
+
children: [f, /* @__PURE__ */ (0, Y.jsxs)(Mn, {
|
|
13806
13813
|
value: "style",
|
|
13807
13814
|
className: "w-1/2 h-6",
|
|
13808
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
13815
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(xt, { className: "w-4 h-4 mr-2" }), "Style"]
|
|
13809
13816
|
})]
|
|
13810
13817
|
}), t[11] = p) : p = t[11];
|
|
13811
13818
|
let m;
|
|
13812
13819
|
t[12] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ (0, Y.jsx)("hr", { className: "my-2" }), t[12] = m) : m = t[12];
|
|
13813
13820
|
let h;
|
|
13814
|
-
t[13] === u ? h = t[14] : (h = /* @__PURE__ */ (0, Y.jsxs)(
|
|
13821
|
+
t[13] === u ? h = t[14] : (h = /* @__PURE__ */ (0, Y.jsxs)(Tr, {
|
|
13815
13822
|
value: "data",
|
|
13816
13823
|
children: [m, /* @__PURE__ */ (0, Y.jsx)(Dw, { children: /* @__PURE__ */ (0, Y.jsx)(u, {}) })]
|
|
13817
13824
|
}), t[13] = u, t[14] = h);
|
|
13818
13825
|
let g;
|
|
13819
13826
|
t[15] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, Y.jsx)("hr", { className: "my-2" }), t[15] = g) : g = t[15];
|
|
13820
13827
|
let _;
|
|
13821
|
-
t[16] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ (0, Y.jsxs)(
|
|
13828
|
+
t[16] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ (0, Y.jsxs)(Tr, {
|
|
13822
13829
|
value: "style",
|
|
13823
13830
|
children: [g, /* @__PURE__ */ (0, Y.jsx)(Dw, { children: /* @__PURE__ */ (0, Y.jsx)(xT, {}) })]
|
|
13824
13831
|
}), t[16] = _) : _ = t[16];
|
|
13825
13832
|
let v;
|
|
13826
|
-
t[17] === h ? v = t[18] : (v = /* @__PURE__ */ (0, Y.jsxs)(
|
|
13833
|
+
t[17] === h ? v = t[18] : (v = /* @__PURE__ */ (0, Y.jsxs)(on, {
|
|
13827
13834
|
defaultValue: "data",
|
|
13828
13835
|
children: [
|
|
13829
13836
|
p,
|
|
@@ -13860,7 +13867,7 @@ function nE(e) {
|
|
|
13860
13867
|
//#endregion
|
|
13861
13868
|
//#region src/components/data-table/hooks/use-panel-ownership.ts
|
|
13862
13869
|
function rE(e, t) {
|
|
13863
|
-
let n = (0, X.c)(16), r = rs(w_), { focusCell: i } =
|
|
13870
|
+
let n = (0, X.c)(16), r = rs(w_), { focusCell: i } = xe(), a = Ne(), [o, s] = as(S_), [l, u] = as(x_), [d, f] = as(C_), p = iE(e, t);
|
|
13864
13871
|
!t && r && (c.error("CellId is not found, defaulting to fixed mode"), r = !1);
|
|
13865
13872
|
let m = (e) => l === p && d && e === o, h = a === t, g = l && aE(l, t);
|
|
13866
13873
|
r && h && l !== p && !g && u(p);
|
|
@@ -13901,7 +13908,7 @@ var oE = zS.input(W({ format: Io([
|
|
|
13901
13908
|
function sE({ error: e, missingPackages: t, refetchPreview: n }) {
|
|
13902
13909
|
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
13903
13910
|
className: "text-xs text-muted-foreground p-2 border border-border rounded flex items-center justify-between",
|
|
13904
|
-
children: [/* @__PURE__ */ (0, Y.jsx)("span", { children: e }), t && /* @__PURE__ */ (0, Y.jsx)(
|
|
13911
|
+
children: [/* @__PURE__ */ (0, Y.jsx)("span", { children: e }), t && /* @__PURE__ */ (0, Y.jsx)(_r, {
|
|
13905
13912
|
packages: t,
|
|
13906
13913
|
showMaxPackages: 1,
|
|
13907
13914
|
className: "w-32",
|
|
@@ -13917,11 +13924,11 @@ function cE({ stats: e, dataType: t, locale: n }) {
|
|
|
13917
13924
|
children: [
|
|
13918
13925
|
/* @__PURE__ */ (0, Y.jsx)("span", {
|
|
13919
13926
|
className: "text-xs min-w-[60px] capitalize",
|
|
13920
|
-
children:
|
|
13927
|
+
children: qe(e, t)
|
|
13921
13928
|
}),
|
|
13922
13929
|
/* @__PURE__ */ (0, Y.jsx)("span", {
|
|
13923
13930
|
className: "text-xs font-bold text-muted-foreground tracking-wide",
|
|
13924
|
-
children:
|
|
13931
|
+
children: la(r, n)
|
|
13925
13932
|
}),
|
|
13926
13933
|
/* @__PURE__ */ (0, Y.jsx)(w, {
|
|
13927
13934
|
className: "h-3 w-3 invisible group-hover:visible",
|
|
@@ -13938,7 +13945,7 @@ var lE = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
|
13938
13945
|
function uE(e, t) {
|
|
13939
13946
|
return /* @__PURE__ */ (0, Y.jsx)(J.Suspense, {
|
|
13940
13947
|
fallback: lE,
|
|
13941
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
13948
|
+
children: /* @__PURE__ */ (0, Y.jsx)(On, {
|
|
13942
13949
|
"data-container-width": "container",
|
|
13943
13950
|
spec: ((e) => ({
|
|
13944
13951
|
...e,
|
|
@@ -13959,9 +13966,9 @@ function uE(e, t) {
|
|
|
13959
13966
|
});
|
|
13960
13967
|
}
|
|
13961
13968
|
var dE = (e) => {
|
|
13962
|
-
let t = (0, X.c)(10), { chartCode: n } = e, r = rs(ls), i =
|
|
13969
|
+
let t = (0, X.c)(10), { chartCode: n } = e, r = rs(ls), i = Ne(), { createNewCell: a } = ot(), o;
|
|
13963
13970
|
t[0] !== r || t[1] !== a || t[2] !== i ? (o = (e) => {
|
|
13964
|
-
e.includes("alt") &&
|
|
13971
|
+
e.includes("alt") && ct({
|
|
13965
13972
|
autoInstantiate: r,
|
|
13966
13973
|
createNewCell: a,
|
|
13967
13974
|
fromCellId: i
|
|
@@ -13991,7 +13998,7 @@ var dE = (e) => {
|
|
|
13991
13998
|
//#endregion
|
|
13992
13999
|
//#region src/components/data-table/column-explorer-panel/column-explorer.tsx
|
|
13993
14000
|
function fE({ previewColumn: e, fieldTypes: t, totalRows: n, totalColumns: r, tableId: i, table: a }) {
|
|
13994
|
-
let [o, s] = (0, J.useState)(""), { locale: c } = Xo(), l = t?.filter(([e]) => !(e === "__select__" || e === "_marimo_row_id" || e.startsWith("__m_column__"))), u = l?.filter(([e]) =>
|
|
14001
|
+
let [o, s] = (0, J.useState)(""), { locale: c } = Xo(), l = t?.filter(([e]) => !(e === "__select__" || e === "_marimo_row_id" || e.startsWith("__m_column__"))), u = l?.filter(([e]) => rn(o, e)), { totalColumns: d, hiddenColumns: f } = jn(a, r), { visible: p } = hn(a), m = Fn(a), { rowsAndColumns: h, hiddenSuffix: g } = wr({
|
|
13995
14002
|
numRows: n,
|
|
13996
14003
|
totalColumns: d,
|
|
13997
14004
|
locale: c,
|
|
@@ -14021,7 +14028,7 @@ function fE({ previewColumn: e, fieldTypes: t, totalRows: n, totalColumns: r, ta
|
|
|
14021
14028
|
className: "gap-1",
|
|
14022
14029
|
disabled: f === 0,
|
|
14023
14030
|
onClick: () => a.toggleAllColumnsVisible(!0),
|
|
14024
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
14031
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(ut, { className: "w-3 h-3" }), "Show all"]
|
|
14025
14032
|
})
|
|
14026
14033
|
}), /* @__PURE__ */ (0, Y.jsx)(me, {
|
|
14027
14034
|
content: "Hide all columns",
|
|
@@ -14033,21 +14040,21 @@ function fE({ previewColumn: e, fieldTypes: t, totalRows: n, totalColumns: r, ta
|
|
|
14033
14040
|
className: "gap-1",
|
|
14034
14041
|
disabled: p === 0,
|
|
14035
14042
|
onClick: () => a.toggleAllColumnsVisible(!1),
|
|
14036
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
14043
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(rr, { className: "w-3 h-3" }), "Hide all"]
|
|
14037
14044
|
})
|
|
14038
14045
|
})]
|
|
14039
14046
|
})
|
|
14040
14047
|
]
|
|
14041
|
-
}), /* @__PURE__ */ (0, Y.jsxs)(
|
|
14048
|
+
}), /* @__PURE__ */ (0, Y.jsxs)(Br, {
|
|
14042
14049
|
className: "h-5/6 bg-background",
|
|
14043
14050
|
shouldFilter: !1,
|
|
14044
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
14051
|
+
children: [/* @__PURE__ */ (0, Y.jsx)($n, {
|
|
14045
14052
|
placeholder: "Search columns...",
|
|
14046
14053
|
value: o,
|
|
14047
14054
|
onValueChange: (e) => s(e)
|
|
14048
|
-
}), /* @__PURE__ */ (0, Y.jsxs)(
|
|
14055
|
+
}), /* @__PURE__ */ (0, Y.jsxs)(er, {
|
|
14049
14056
|
className: "max-h-full",
|
|
14050
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
14057
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(wn, { children: "No results." }), u?.map(([t, [n, r]], o) => {
|
|
14051
14058
|
let s = a.getColumn(t);
|
|
14052
14059
|
return /* @__PURE__ */ (0, Y.jsx)(pE, {
|
|
14053
14060
|
columnName: t,
|
|
@@ -14066,12 +14073,12 @@ function fE({ previewColumn: e, fieldTypes: t, totalRows: n, totalColumns: r, ta
|
|
|
14066
14073
|
}
|
|
14067
14074
|
function pE({ columnName: e, column: t, dataType: n, externalType: r, previewColumn: i, table: a, showOnlyColumnState: o, defaultExpanded: s = !1 }) {
|
|
14068
14075
|
let [c, u] = (0, J.useState)(s);
|
|
14069
|
-
return /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsxs)(
|
|
14076
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsxs)(Zn, {
|
|
14070
14077
|
onSelect: () => u(!c),
|
|
14071
14078
|
className: "flex flex-row items-center gap-1.5 group w-full cursor-pointer",
|
|
14072
14079
|
children: [
|
|
14073
|
-
c ? /* @__PURE__ */ (0, Y.jsx)(
|
|
14074
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
14080
|
+
c ? /* @__PURE__ */ (0, Y.jsx)(_i, { className: "w-3 h-3 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ (0, Y.jsx)(na, { className: "w-3 h-3 shrink-0 text-muted-foreground" }),
|
|
14081
|
+
/* @__PURE__ */ (0, Y.jsx)(pn, {
|
|
14075
14082
|
columnName: /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
14076
14083
|
className: c ? "font-semibold" : "",
|
|
14077
14084
|
children: e
|
|
@@ -14087,10 +14094,10 @@ function pE({ columnName: e, column: t, dataType: n, externalType: r, previewCol
|
|
|
14087
14094
|
className: "h-3 w-3",
|
|
14088
14095
|
buttonClassName: l("inline-flex items-center justify-center rounded-md h-6 w-6", "group-hover:opacity-100 opacity-0 hover:bg-muted text-muted-foreground hover:text-primary")
|
|
14089
14096
|
}),
|
|
14090
|
-
t?.getCanHide() && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
14097
|
+
t?.getCanHide() && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(Hn, {
|
|
14091
14098
|
table: a,
|
|
14092
14099
|
columnIds: [e],
|
|
14093
|
-
disabled:
|
|
14100
|
+
disabled: xn(o, [e]),
|
|
14094
14101
|
className: l(t.getIsVisible() ? "group-hover:opacity-100 opacity-0" : "opacity-100")
|
|
14095
14102
|
}), /* @__PURE__ */ (0, Y.jsx)(me, {
|
|
14096
14103
|
content: t.getIsVisible() ? "Hide column" : "Show column",
|
|
@@ -14104,10 +14111,10 @@ function pE({ columnName: e, column: t, dataType: n, externalType: r, previewCol
|
|
|
14104
14111
|
onClick: (e) => {
|
|
14105
14112
|
e.preventDefault(), e.stopPropagation(), t.toggleVisibility(!t.getIsVisible());
|
|
14106
14113
|
},
|
|
14107
|
-
children: t.getIsVisible() ? /* @__PURE__ */ (0, Y.jsx)(
|
|
14114
|
+
children: t.getIsVisible() ? /* @__PURE__ */ (0, Y.jsx)(ut, {
|
|
14108
14115
|
className: "h-3 w-3",
|
|
14109
14116
|
strokeWidth: 2.5
|
|
14110
|
-
}) : /* @__PURE__ */ (0, Y.jsx)(
|
|
14117
|
+
}) : /* @__PURE__ */ (0, Y.jsx)(rr, {
|
|
14111
14118
|
className: "h-3 w-3",
|
|
14112
14119
|
strokeWidth: 2.5
|
|
14113
14120
|
})
|
|
@@ -14128,9 +14135,9 @@ function pE({ columnName: e, column: t, dataType: n, externalType: r, previewCol
|
|
|
14128
14135
|
}
|
|
14129
14136
|
var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
14130
14137
|
let { theme: r } = fs(), { locale: i } = Xo(), { data: a, error: o, isPending: s, refetch: c } = Ns(async () => await e({ column: t }), []);
|
|
14131
|
-
if (o) return /* @__PURE__ */ (0, Y.jsx)(
|
|
14132
|
-
if (s) return /* @__PURE__ */ (0, Y.jsx)(
|
|
14133
|
-
if (!a) return /* @__PURE__ */ (0, Y.jsx)(
|
|
14138
|
+
if (o) return /* @__PURE__ */ (0, Y.jsx)(Er, { error: o });
|
|
14139
|
+
if (s) return /* @__PURE__ */ (0, Y.jsx)(an, { message: "Loading..." });
|
|
14140
|
+
if (!a) return /* @__PURE__ */ (0, Y.jsx)(Nn, {
|
|
14134
14141
|
content: "No data",
|
|
14135
14142
|
className: "pl-4"
|
|
14136
14143
|
});
|
|
@@ -14143,7 +14150,7 @@ var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
14143
14150
|
dataType: n,
|
|
14144
14151
|
locale: i
|
|
14145
14152
|
}), g = l && uE(l, r);
|
|
14146
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
14153
|
+
return /* @__PURE__ */ (0, Y.jsxs)(dn, {
|
|
14147
14154
|
className: "px-2 py-1",
|
|
14148
14155
|
children: [
|
|
14149
14156
|
m,
|
|
@@ -14153,7 +14160,7 @@ var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
14153
14160
|
]
|
|
14154
14161
|
});
|
|
14155
14162
|
}, hE = ({ rowIdx: e, setRowIdx: t, totalRows: n, fieldTypes: r, getRow: i, isSelectable: a, isRowSelected: o, handleRowSelectionChange: s }) => {
|
|
14156
|
-
let [c, l] = (0, J.useState)(""), u = (0, J.useRef)(null), d = (0, J.useId)(), { locale: f } = Xo(), p = n ===
|
|
14163
|
+
let [c, l] = (0, J.useState)(""), u = (0, J.useRef)(null), d = (0, J.useId)(), { locale: f } = Xo(), p = n === Vn, { data: m, error: h } = Ns(async () => (await i(e)).rows, [
|
|
14157
14164
|
i,
|
|
14158
14165
|
e,
|
|
14159
14166
|
n
|
|
@@ -14197,7 +14204,7 @@ var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
14197
14204
|
title: "Select/unselect the current row",
|
|
14198
14205
|
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
14199
14206
|
className: "flex items-center gap-1.5",
|
|
14200
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
14207
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Me, {
|
|
14201
14208
|
id: d,
|
|
14202
14209
|
checked: o,
|
|
14203
14210
|
onCheckedChange: v,
|
|
@@ -14219,7 +14226,7 @@ var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
14219
14226
|
onClick: () => g(0),
|
|
14220
14227
|
disabled: e === 0,
|
|
14221
14228
|
"aria-label": "Go to first row",
|
|
14222
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
14229
|
+
children: /* @__PURE__ */ (0, Y.jsx)(hr, {})
|
|
14223
14230
|
}),
|
|
14224
14231
|
/* @__PURE__ */ (0, Y.jsx)(_, {
|
|
14225
14232
|
variant: "outline",
|
|
@@ -14228,11 +14235,11 @@ var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
14228
14235
|
onClick: () => g(e - 1),
|
|
14229
14236
|
disabled: e === 0,
|
|
14230
14237
|
"aria-label": "Previous row",
|
|
14231
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
14238
|
+
children: /* @__PURE__ */ (0, Y.jsx)(jr, {})
|
|
14232
14239
|
}),
|
|
14233
14240
|
/* @__PURE__ */ (0, Y.jsx)("span", {
|
|
14234
14241
|
className: "text-xs",
|
|
14235
|
-
children: p ? `Row ${e + 1}` : `Row ${e + 1} of ${
|
|
14242
|
+
children: p ? `Row ${e + 1}` : `Row ${e + 1} of ${kn(n, f)}`
|
|
14236
14243
|
}),
|
|
14237
14244
|
/* @__PURE__ */ (0, Y.jsx)(_, {
|
|
14238
14245
|
variant: "outline",
|
|
@@ -14241,7 +14248,7 @@ var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
14241
14248
|
onClick: () => g(e + 1),
|
|
14242
14249
|
disabled: !p && e === n - 1,
|
|
14243
14250
|
"aria-label": "Next row",
|
|
14244
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
14251
|
+
children: /* @__PURE__ */ (0, Y.jsx)(na, {})
|
|
14245
14252
|
}),
|
|
14246
14253
|
/* @__PURE__ */ (0, Y.jsx)(_, {
|
|
14247
14254
|
variant: "outline",
|
|
@@ -14252,14 +14259,14 @@ var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
14252
14259
|
},
|
|
14253
14260
|
disabled: p || e === n - 1,
|
|
14254
14261
|
"aria-label": "Go to last row",
|
|
14255
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
14262
|
+
children: /* @__PURE__ */ (0, Y.jsx)(ur, {})
|
|
14256
14263
|
})
|
|
14257
14264
|
]
|
|
14258
14265
|
}),
|
|
14259
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
14266
|
+
/* @__PURE__ */ (0, Y.jsx)(Br, {
|
|
14260
14267
|
className: "bg-background",
|
|
14261
14268
|
shouldFilter: !1,
|
|
14262
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
14269
|
+
children: /* @__PURE__ */ (0, Y.jsx)($n, {
|
|
14263
14270
|
placeholder: "Search",
|
|
14264
14271
|
value: c,
|
|
14265
14272
|
onValueChange: l,
|
|
@@ -14273,10 +14280,10 @@ var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
14273
14280
|
});
|
|
14274
14281
|
if (n === 0) return /* @__PURE__ */ (0, Y.jsx)(_E, {
|
|
14275
14282
|
kind: "info",
|
|
14276
|
-
Icon:
|
|
14283
|
+
Icon: Ct,
|
|
14277
14284
|
message: "No rows selected"
|
|
14278
14285
|
});
|
|
14279
|
-
if (!m) return /* @__PURE__ */ (0, Y.jsx)(
|
|
14286
|
+
if (!m) return /* @__PURE__ */ (0, Y.jsx)(Mr, {
|
|
14280
14287
|
milliseconds: 200,
|
|
14281
14288
|
children: /* @__PURE__ */ (0, Y.jsx)(ne, {
|
|
14282
14289
|
size: "medium",
|
|
@@ -14298,23 +14305,23 @@ var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
14298
14305
|
message: "Row is not an object. Please report the issue."
|
|
14299
14306
|
});
|
|
14300
14307
|
let t = {};
|
|
14301
|
-
for (let [n, r] of Object.entries(e)) n !== "__select__" && n !== "_marimo_row_id" && (n.startsWith("__m_column__") ? t[n.slice(
|
|
14302
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
14308
|
+
for (let [n, r] of Object.entries(e)) n !== "__select__" && n !== "_marimo_row_id" && (n.startsWith("__m_column__") ? t[n.slice(cr.length)] = r : t[n] = r);
|
|
14309
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Pr, {
|
|
14303
14310
|
className: "mb-4",
|
|
14304
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
14311
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Fr, { children: /* @__PURE__ */ (0, Y.jsxs)(Gr, { children: [/* @__PURE__ */ (0, Y.jsx)(ir, {
|
|
14305
14312
|
className: "w-1/4",
|
|
14306
14313
|
children: "Column"
|
|
14307
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
14314
|
+
}), /* @__PURE__ */ (0, Y.jsx)(ir, {
|
|
14308
14315
|
className: "w-3/4",
|
|
14309
14316
|
children: "Value"
|
|
14310
|
-
})] }) }), /* @__PURE__ */ (0, Y.jsx)(
|
|
14317
|
+
})] }) }), /* @__PURE__ */ (0, Y.jsx)(Ur, { children: r?.map(([e, [n, r]]) => {
|
|
14311
14318
|
let i = t[e];
|
|
14312
14319
|
if (!gE({
|
|
14313
14320
|
columnName: e,
|
|
14314
14321
|
columnValue: i,
|
|
14315
14322
|
searchQuery: c
|
|
14316
14323
|
})) return null;
|
|
14317
|
-
let a =
|
|
14324
|
+
let a = dr({
|
|
14318
14325
|
column: {
|
|
14319
14326
|
id: e,
|
|
14320
14327
|
columnDef: { meta: {
|
|
@@ -14329,12 +14336,12 @@ var mE = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
14329
14336
|
selectCell: void 0,
|
|
14330
14337
|
cellStyles: "text-left break-word"
|
|
14331
14338
|
}), o = typeof i == "object" ? JSON.stringify(i) : String(i);
|
|
14332
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
14339
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Gr, {
|
|
14333
14340
|
className: "group",
|
|
14334
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
14341
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Cr, { children: /* @__PURE__ */ (0, Y.jsx)(pn, {
|
|
14335
14342
|
columnName: /* @__PURE__ */ (0, Y.jsx)("span", { children: e }),
|
|
14336
14343
|
dataType: n
|
|
14337
|
-
}) }), /* @__PURE__ */ (0, Y.jsx)(
|
|
14344
|
+
}) }), /* @__PURE__ */ (0, Y.jsx)(Cr, { children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
14338
14345
|
className: "flex flex-row items-center justify-between gap-1",
|
|
14339
14346
|
children: [a, /* @__PURE__ */ (0, Y.jsx)(w, {
|
|
14340
14347
|
value: o,
|
|
@@ -14383,22 +14390,22 @@ function xE({ rowIdx: e, setRowIdx: t, totalRows: n, fieldTypes: r, getRow: i, i
|
|
|
14383
14390
|
table: f
|
|
14384
14391
|
});
|
|
14385
14392
|
if (!v) return p ? y : m ? b : null;
|
|
14386
|
-
let x = h ??
|
|
14387
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
14393
|
+
let x = h ?? Cn.ROW_VIEWER;
|
|
14394
|
+
return /* @__PURE__ */ (0, Y.jsxs)(on, {
|
|
14388
14395
|
value: x,
|
|
14389
14396
|
onValueChange: (e) => g(e),
|
|
14390
14397
|
className: "flex flex-col min-w-[350px]",
|
|
14391
14398
|
children: [
|
|
14392
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
14393
|
-
name:
|
|
14399
|
+
/* @__PURE__ */ (0, Y.jsx)(pr, {
|
|
14400
|
+
name: Qn.CONTEXT_AWARE_PANEL_HEADER,
|
|
14394
14401
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
14395
14402
|
className: "flex items-center gap-1",
|
|
14396
14403
|
children: [
|
|
14397
14404
|
/* @__PURE__ */ (0, Y.jsx)(_, {
|
|
14398
14405
|
variant: "text",
|
|
14399
14406
|
size: "xs",
|
|
14400
|
-
onClick: () => g(
|
|
14401
|
-
className: l(vE, x ===
|
|
14407
|
+
onClick: () => g(Cn.ROW_VIEWER),
|
|
14408
|
+
className: l(vE, x === Cn.ROW_VIEWER ? yE : bE),
|
|
14402
14409
|
children: "Rows"
|
|
14403
14410
|
}),
|
|
14404
14411
|
/* @__PURE__ */ (0, Y.jsx)("span", {
|
|
@@ -14408,20 +14415,20 @@ function xE({ rowIdx: e, setRowIdx: t, totalRows: n, fieldTypes: r, getRow: i, i
|
|
|
14408
14415
|
/* @__PURE__ */ (0, Y.jsx)(_, {
|
|
14409
14416
|
variant: "text",
|
|
14410
14417
|
size: "xs",
|
|
14411
|
-
onClick: () => g(
|
|
14412
|
-
className: l(vE, x ===
|
|
14418
|
+
onClick: () => g(Cn.COLUMN_EXPLORER),
|
|
14419
|
+
className: l(vE, x === Cn.COLUMN_EXPLORER ? yE : bE),
|
|
14413
14420
|
children: "Columns"
|
|
14414
14421
|
})
|
|
14415
14422
|
]
|
|
14416
14423
|
})
|
|
14417
14424
|
}),
|
|
14418
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
14419
|
-
value:
|
|
14425
|
+
/* @__PURE__ */ (0, Y.jsx)(Tr, {
|
|
14426
|
+
value: Cn.ROW_VIEWER,
|
|
14420
14427
|
className: "flex-1 overflow-auto",
|
|
14421
14428
|
children: y
|
|
14422
14429
|
}),
|
|
14423
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
14424
|
-
value:
|
|
14430
|
+
/* @__PURE__ */ (0, Y.jsx)(Tr, {
|
|
14431
|
+
value: Cn.COLUMN_EXPLORER,
|
|
14425
14432
|
className: "flex-1 overflow-auto",
|
|
14426
14433
|
children: b
|
|
14427
14434
|
})
|
|
@@ -14484,7 +14491,7 @@ var CE = no([
|
|
|
14484
14491
|
label: U().nullable(),
|
|
14485
14492
|
data: no([U(), G(W({}).passthrough())]),
|
|
14486
14493
|
rawData: no([U(), G(io({}))]).nullish(),
|
|
14487
|
-
totalRows: no([K(), Xa(
|
|
14494
|
+
totalRows: no([K(), Xa(Vn)]),
|
|
14488
14495
|
pagination: H().default(!1),
|
|
14489
14496
|
pageSize: K().default(10),
|
|
14490
14497
|
selection: Io([
|
|
@@ -14546,7 +14553,7 @@ var CE = no([
|
|
|
14546
14553
|
max_columns: K().nullable().optional()
|
|
14547
14554
|
})).output(W({
|
|
14548
14555
|
data: no([U(), G(W({}).passthrough())]),
|
|
14549
|
-
total_rows: no([K(), Xa(
|
|
14556
|
+
total_rows: no([K(), Xa(Vn)]),
|
|
14550
14557
|
cell_styles: ao(U(), ao(U(), W({}).passthrough())).nullable(),
|
|
14551
14558
|
cell_hover_texts: DE.nullable(),
|
|
14552
14559
|
raw_data: no([U(), G(io({}))]).nullish()
|
|
@@ -14599,8 +14606,8 @@ function jE(e, t) {
|
|
|
14599
14606
|
var ME = (e) => {
|
|
14600
14607
|
let t = (0, X.c)(13), { isLazy: n, children: r, preload: i, host: a } = e, o, s, c, l;
|
|
14601
14608
|
if (t[0] !== a || t[1] !== n || t[2] !== i) {
|
|
14602
|
-
let e = a.closest(`[${
|
|
14603
|
-
l = e ?
|
|
14609
|
+
let e = a.closest(`[${je}]`);
|
|
14610
|
+
l = e ? Ke.parse(e) : null, o = a.closest(`[${yt}]`)?.getAttribute(yt), s = J.useState, c = n && !i && !AE(l, o), t[0] = a, t[1] = n, t[2] = i, t[3] = o, t[4] = s, t[5] = c, t[6] = l;
|
|
14604
14611
|
} else o = t[3], s = t[4], c = t[5], l = t[6];
|
|
14605
14612
|
let [u, d] = s(c);
|
|
14606
14613
|
if (u) {
|
|
@@ -14609,7 +14616,7 @@ var ME = (e) => {
|
|
|
14609
14616
|
jE(l, o), d(!1);
|
|
14610
14617
|
}, t[7] = o, t[8] = l, t[9] = e) : e = t[9];
|
|
14611
14618
|
let n;
|
|
14612
|
-
t[10] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ (0, Y.jsx)(
|
|
14619
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ (0, Y.jsx)(Tt, { className: "mr-2 h-4 w-4" }), t[10] = n) : n = t[10];
|
|
14613
14620
|
let r;
|
|
14614
14621
|
return t[11] === e ? r = t[12] : (r = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
14615
14622
|
className: "flex h-20 items-center justify-center",
|
|
@@ -14624,7 +14631,7 @@ var ME = (e) => {
|
|
|
14624
14631
|
return r;
|
|
14625
14632
|
}, NE = (0, J.memo)((e) => {
|
|
14626
14633
|
let t = (0, X.c)(119), n;
|
|
14627
|
-
t[0] === e.host ? n = t[1] : (n =
|
|
14634
|
+
t[0] === e.host ? n = t[1] : (n = Ee(e.host), t[0] = e.host, t[1] = n);
|
|
14628
14635
|
let r = n, i = e.search, a = e.setValue, o;
|
|
14629
14636
|
t[2] === Symbol.for("react.memo_cache_sentinel") ? (o = [], t[2] = o) : o = t[2];
|
|
14630
14637
|
let [s, l] = (0, J.useState)(o), u;
|
|
@@ -14674,7 +14681,7 @@ var ME = (e) => {
|
|
|
14674
14681
|
let e = await f;
|
|
14675
14682
|
t = e.data, n = e.raw_data, r = e.total_rows, a = e.cell_styles || {}, o = e.cell_hover_texts || {};
|
|
14676
14683
|
}
|
|
14677
|
-
let [m, h] = await
|
|
14684
|
+
let [m, h] = await $r(t, n);
|
|
14678
14685
|
return t = m, {
|
|
14679
14686
|
rows: t,
|
|
14680
14687
|
rawRows: h,
|
|
@@ -14698,7 +14705,7 @@ var ME = (e) => {
|
|
|
14698
14705
|
d.pageSize,
|
|
14699
14706
|
d.pageIndex
|
|
14700
14707
|
], t[35] = g, t[36] = d.pageIndex, t[37] = d.pageSize, t[38] = e.cellHoverTexts, t[39] = e.cellStyles, t[40] = e.data, t[41] = e.lazy, t[42] = e.totalRows, t[43] = i, t[44] = p, t[45] = s, t[46] = E, t[47] = D) : D = t[47];
|
|
14701
|
-
let { data: O, error: k, isPending: A, isFetching: j } = Ns(T, D), M = rs(
|
|
14708
|
+
let { data: O, error: k, isPending: A, isFetching: j } = Ns(T, D), M = rs(ei), N;
|
|
14702
14709
|
t[48] !== M || t[49] !== e ? (N = async () => !M || !e.showDownload || e.lazy || e.totalRows === 0 ? null : (await e.get_size_bytes({})).size_bytes ?? null, t[48] = M, t[49] = e, t[50] = N) : N = t[50];
|
|
14703
14710
|
let P = e.showDownload, F = e.get_size_bytes, I = e.lazy, L = e.totalRows, R = Ys(g), ee = Ys(s), z;
|
|
14704
14711
|
t[51] !== M || t[52] !== e.get_size_bytes || t[53] !== e.lazy || t[54] !== e.showDownload || t[55] !== e.totalRows || t[56] !== p || t[57] !== R || t[58] !== ee ? (z = [
|
|
@@ -14721,7 +14728,7 @@ var ME = (e) => {
|
|
|
14721
14728
|
filters: b_(g),
|
|
14722
14729
|
max_columns: null
|
|
14723
14730
|
});
|
|
14724
|
-
return { rows: await
|
|
14731
|
+
return { rows: await ii(n.data) };
|
|
14725
14732
|
}, t[60] = g, t[61] = i, t[62] = p, t[63] = s, t[64] = ie) : ie = t[64];
|
|
14726
14733
|
let ae = ie, oe;
|
|
14727
14734
|
t[65] === Symbol.for("react.memo_cache_sentinel") ? (oe = () => {
|
|
@@ -14731,7 +14738,7 @@ var ME = (e) => {
|
|
|
14731
14738
|
t[66] === se ? ce = t[67] : (ce = [se], t[66] = se, t[67] = ce), (0, J.useEffect)(oe, ce);
|
|
14732
14739
|
let V;
|
|
14733
14740
|
t[68] === e ? V = t[69] : (V = async () => {
|
|
14734
|
-
let t =
|
|
14741
|
+
let t = ga();
|
|
14735
14742
|
return e.totalRows === 0 || !e.showColumnSummaries || t ? {
|
|
14736
14743
|
data: null,
|
|
14737
14744
|
stats: {},
|
|
@@ -14754,7 +14761,7 @@ var ME = (e) => {
|
|
|
14754
14761
|
de && c.error(de);
|
|
14755
14762
|
}, pe = [de], t[77] = de, t[78] = fe, t[79] = pe), (0, J.useEffect)(fe, pe), A) {
|
|
14756
14763
|
let n = e.totalRows !== "too_many" && e.totalRows > 0 ? Math.min(e.totalRows, e.pageSize) : e.pageSize, r;
|
|
14757
|
-
return t[80] === n ? r = t[81] : (r = /* @__PURE__ */ (0, Y.jsx)(
|
|
14764
|
+
return t[80] === n ? r = t[81] : (r = /* @__PURE__ */ (0, Y.jsx)(Mr, {
|
|
14758
14765
|
milliseconds: 200,
|
|
14759
14766
|
children: /* @__PURE__ */ (0, Y.jsx)(GS, { pageSize: n })
|
|
14760
14767
|
}), t[80] = n, t[81] = r), r;
|
|
@@ -14763,7 +14770,7 @@ var ME = (e) => {
|
|
|
14763
14770
|
if (k) {
|
|
14764
14771
|
c.error(k);
|
|
14765
14772
|
let e;
|
|
14766
|
-
t[82] === k ? e = t[83] : (e = !
|
|
14773
|
+
t[82] === k ? e = t[83] : (e = !ga() && /* @__PURE__ */ (0, Y.jsxs)(Fs, {
|
|
14767
14774
|
variant: "destructive",
|
|
14768
14775
|
className: "mb-2",
|
|
14769
14776
|
children: [/* @__PURE__ */ (0, Y.jsx)(Ps, { children: "Error" }), /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
@@ -14815,34 +14822,34 @@ var ME = (e) => {
|
|
|
14815
14822
|
rowHeaders: e.rowHeaders,
|
|
14816
14823
|
cellId: r
|
|
14817
14824
|
}) : we, t[105] = r, t[106] = we, t[107] = O?.rows, t[108] = y, t[109] = e.fieldTypes, t[110] = e.get_data_url, t[111] = e.rowHeaders, t[112] = e.showChartBuilder, t[113] = e.totalColumns, t[114] = e.totalRows, t[115] = Te) : Te = t[115];
|
|
14818
|
-
let
|
|
14819
|
-
return t[116] !== me || t[117] !== Te ? (
|
|
14825
|
+
let De;
|
|
14826
|
+
return t[116] !== me || t[117] !== Te ? (De = /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [me, Te] }), t[116] = me, t[117] = Te, t[118] = De) : De = t[118], De;
|
|
14820
14827
|
});
|
|
14821
14828
|
NE.displayName = "LoadingDataTableComponent";
|
|
14822
14829
|
var PE = (e) => {
|
|
14823
14830
|
let t = (0, X.c)(142), { label: n, data: r, rawData: i, totalRows: o, sizeBytes: s, sizeBytesIsLoading: c, maxColumns: l, pagination: u, selection: d, value: f, showFilters: p, showDownload: m, showPageSizeSelector: h, showColumnExplorer: g, showRowExplorer: _, showChartBuilder: v, showDataTypes: y, rowHeaders: b, fieldTypes: x, paginationState: S, setPaginationState: C, download_as: w, columnSummaries: T, className: E, setValue: D, sorting: O, setSorting: k, showSearch: A, searchQuery: j, setSearchQuery: M, filters: N, setFilters: P, reloading: F, freezeColumnsLeft: I, freezeColumnsRight: L, hiddenColumns: R, textJustifyColumns: ee, wrappedColumns: z, columnWidths: te, headerTooltip: B, totalColumns: ne, get_row_ids: re, cellStyles: ie, hoverTemplate: ae, cellHoverTexts: oe, toggleDisplayHeader: se, isChartBuilderOpen: ce, calculate_top_k_rows: V, preview_column: le, getRow: ue, cellId: de, maxHeight: fe } = e, pe = d, me = y, he = (0, J.useId)(), { locale: ge } = Xo(), [_e, ve] = (0, J.useState)(0), { isPanelOpen: ye, isAnyPanelOpen: be, togglePanel: xe, panelType: Se, setPanelType: Ce } = rE(he, de), we;
|
|
14824
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (we =
|
|
14831
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (we = ga(), t[0] = we) : we = t[0];
|
|
14825
14832
|
let Te = we, Ee;
|
|
14826
14833
|
bb0: {
|
|
14827
14834
|
if (!T) {
|
|
14828
|
-
Ee =
|
|
14835
|
+
Ee = Rr.EMPTY;
|
|
14829
14836
|
break bb0;
|
|
14830
14837
|
}
|
|
14831
14838
|
if (!x || !T.stats) {
|
|
14832
|
-
Ee =
|
|
14839
|
+
Ee = Rr.EMPTY;
|
|
14833
14840
|
break bb0;
|
|
14834
14841
|
}
|
|
14835
14842
|
let e;
|
|
14836
14843
|
if (t[1] !== T.bin_values || t[2] !== T.data || t[3] !== T.show_charts || t[4] !== T.stats || t[5] !== T.value_counts || t[6] !== x) {
|
|
14837
|
-
let n =
|
|
14838
|
-
e = new
|
|
14844
|
+
let n = un(x);
|
|
14845
|
+
e = new Rr(T.data || [], n, T.stats, T.bin_values, T.value_counts, { includeCharts: T.show_charts }), t[1] = T.bin_values, t[2] = T.data, t[3] = T.show_charts, t[4] = T.stats, t[5] = T.value_counts, t[6] = x, t[7] = e;
|
|
14839
14846
|
} else e = t[7];
|
|
14840
14847
|
Ee = e;
|
|
14841
14848
|
}
|
|
14842
14849
|
let De = Ee, Oe;
|
|
14843
14850
|
t[8] === b ? Oe = t[9] : (Oe = new Set(b.map(BE)), t[8] = b, t[9] = Oe);
|
|
14844
14851
|
let ke = Oe, Ae;
|
|
14845
|
-
t[10] !== r || t[11] !== x || t[12] !== ke ? (Ae = x ??
|
|
14852
|
+
t[10] !== r || t[11] !== x || t[12] !== ke ? (Ae = x ?? Zr(r).filter((e) => {
|
|
14846
14853
|
let [t] = e;
|
|
14847
14854
|
return !ke.has(t);
|
|
14848
14855
|
}), t[10] = r, t[11] = x, t[12] = ke, t[13] = Ae) : Ae = t[13];
|
|
@@ -14875,7 +14882,7 @@ var PE = (e) => {
|
|
|
14875
14882
|
let Fe = Pe, Ie = Ys(b), Le = Ys(ee), Re = Ys(z), ze = Ys(te), Be = Ys(De), Ve = Ys(Fe), He = Ne.length;
|
|
14876
14883
|
x || (me = !1), Te && (pe = null);
|
|
14877
14884
|
let Ue;
|
|
14878
|
-
t[20] !== V || t[21] !== Ve || t[22] !== B || t[23] !== Be || t[24] !== Ne || t[25] !== ze || t[26] !== Ie || t[27] !== Le || t[28] !== Re || t[29] !== pe || t[30] !== me ? (Ue =
|
|
14885
|
+
t[20] !== V || t[21] !== Ve || t[22] !== B || t[23] !== Be || t[24] !== Ne || t[25] !== ze || t[26] !== Ie || t[27] !== Le || t[28] !== Re || t[29] !== pe || t[30] !== me ? (Ue = kr({
|
|
14879
14886
|
rowHeaders: Ie,
|
|
14880
14887
|
selection: pe,
|
|
14881
14888
|
chartSpecModel: Be,
|
|
@@ -14904,7 +14911,7 @@ var PE = (e) => {
|
|
|
14904
14911
|
let Je = ns(qe), Ye;
|
|
14905
14912
|
t[38] !== S || t[39] !== C || t[40] !== ve || t[41] !== o ? (Ye = (e) => {
|
|
14906
14913
|
if (ve(e), e < 0 || typeof o == "number" && e >= o || o === "too_many") return;
|
|
14907
|
-
let t =
|
|
14914
|
+
let t = nr(e, S.pageIndex, S.pageSize);
|
|
14908
14915
|
t !== null && C((e) => ({
|
|
14909
14916
|
...e,
|
|
14910
14917
|
pageIndex: t
|
|
@@ -14934,7 +14941,7 @@ var PE = (e) => {
|
|
|
14934
14941
|
break bb2;
|
|
14935
14942
|
}
|
|
14936
14943
|
let e;
|
|
14937
|
-
t[51] !== nt || t[52] !== ue || t[53] !== Je || t[54] !== he || t[55] !== tt || t[56] !== je || t[57] !== Se || t[58] !== le || t[59] !== Ke || t[60] !== Ce || t[61] !== Xe || t[62] !== _ || t[63] !== ne || t[64] !== o || t[65] !== _e ? (e = (e) => /* @__PURE__ */ (0, Y.jsx)(
|
|
14944
|
+
t[51] !== nt || t[52] !== ue || t[53] !== Je || t[54] !== he || t[55] !== tt || t[56] !== je || t[57] !== Se || t[58] !== le || t[59] !== Ke || t[60] !== Ce || t[61] !== Xe || t[62] !== _ || t[63] !== ne || t[64] !== o || t[65] !== _e ? (e = (e) => /* @__PURE__ */ (0, Y.jsx)(zr, { children: /* @__PURE__ */ (0, Y.jsx)(xE, {
|
|
14938
14945
|
rowIdx: _e,
|
|
14939
14946
|
setRowIdx: Xe,
|
|
14940
14947
|
totalRows: o,
|
|
@@ -14978,10 +14985,10 @@ var PE = (e) => {
|
|
|
14978
14985
|
className: "mb-1 rounded",
|
|
14979
14986
|
children: [
|
|
14980
14987
|
"Showing the first ",
|
|
14981
|
-
/* @__PURE__ */ (0, Y.jsx)("strong", { children:
|
|
14988
|
+
/* @__PURE__ */ (0, Y.jsx)("strong", { children: la(r.length, ge) }),
|
|
14982
14989
|
" ",
|
|
14983
14990
|
"of ",
|
|
14984
|
-
/* @__PURE__ */ (0, Y.jsx)("strong", { children:
|
|
14991
|
+
/* @__PURE__ */ (0, Y.jsx)("strong", { children: la(o, ge) }),
|
|
14985
14992
|
" rows. Increase the table's ",
|
|
14986
14993
|
/* @__PURE__ */ (0, Y.jsx)("code", { children: "page_size" }),
|
|
14987
14994
|
" to embed more in the static export."
|
|
@@ -14995,7 +15002,7 @@ var PE = (e) => {
|
|
|
14995
15002
|
let pt = m ? w : void 0, mt = v && !ot, ht = (_ || nt) && !it && !ot, gt;
|
|
14996
15003
|
t[81] === ve ? gt = t[82] : (gt = (e) => ve(e), t[81] = ve, t[82] = gt);
|
|
14997
15004
|
let _t;
|
|
14998
|
-
t[83] !== V || t[84] !== oe || t[85] !== Qe || t[86] !== ie || t[87] !== E || t[88] !== We || t[89] !== r || t[90] !== N || t[91] !== I || t[92] !== L || t[93] !== re || t[94] !== et || t[95] !== Je || t[96] !== R || t[97] !== ae || t[98] !== be || t[99] !== ce || t[100] !== ye || t[101] !== fe || t[102] !== u || t[103] !== S || t[104] !== i || t[105] !== F || t[106] !== ct || t[107] !== Ke || t[108] !== j || t[109] !== pe || t[110] !== P || t[111] !== C || t[112] !== M || t[113] !== k || t[114] !== p || t[115] !== h || t[116] !== A || t[117] !== s || t[118] !== c || t[119] !== O || t[120] !== pt || t[121] !== mt || t[122] !== ht || t[123] !== gt || t[124] !== se || t[125] !== xe || t[126] !== ne || t[127] !== o || t[128] !== _e ? (_t = /* @__PURE__ */ (0, Y.jsx)(
|
|
15005
|
+
t[83] !== V || t[84] !== oe || t[85] !== Qe || t[86] !== ie || t[87] !== E || t[88] !== We || t[89] !== r || t[90] !== N || t[91] !== I || t[92] !== L || t[93] !== re || t[94] !== et || t[95] !== Je || t[96] !== R || t[97] !== ae || t[98] !== be || t[99] !== ce || t[100] !== ye || t[101] !== fe || t[102] !== u || t[103] !== S || t[104] !== i || t[105] !== F || t[106] !== ct || t[107] !== Ke || t[108] !== j || t[109] !== pe || t[110] !== P || t[111] !== C || t[112] !== M || t[113] !== k || t[114] !== p || t[115] !== h || t[116] !== A || t[117] !== s || t[118] !== c || t[119] !== O || t[120] !== pt || t[121] !== mt || t[122] !== ht || t[123] !== gt || t[124] !== se || t[125] !== xe || t[126] !== ne || t[127] !== o || t[128] !== _e ? (_t = /* @__PURE__ */ (0, Y.jsx)(yr, {
|
|
14999
15006
|
data: r,
|
|
15000
15007
|
rawData: i,
|
|
15001
15008
|
columns: We,
|
|
@@ -15053,7 +15060,7 @@ var PE = (e) => {
|
|
|
15053
15060
|
children: _t
|
|
15054
15061
|
}), t[130] = n, t[131] = _t, t[132] = vt) : vt = t[132];
|
|
15055
15062
|
let yt;
|
|
15056
|
-
t[133] !== De || t[134] !== vt ? (yt = /* @__PURE__ */ (0, Y.jsx)(
|
|
15063
|
+
t[133] !== De || t[134] !== vt ? (yt = /* @__PURE__ */ (0, Y.jsx)(gr, {
|
|
15057
15064
|
value: De,
|
|
15058
15065
|
children: vt
|
|
15059
15066
|
}), t[133] = De, t[134] = vt, t[135] = yt) : yt = t[135];
|
|
@@ -15069,8 +15076,8 @@ var PE = (e) => {
|
|
|
15069
15076
|
let t = (0, X.c)(2), { children: n } = e, r;
|
|
15070
15077
|
return t[0] === n ? r = t[1] : (r = /* @__PURE__ */ (0, Y.jsx)(Ua, { children: /* @__PURE__ */ (0, Y.jsx)(gs, {
|
|
15071
15078
|
store: os,
|
|
15072
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
15073
|
-
controller:
|
|
15079
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Jr, {
|
|
15080
|
+
controller: Xn,
|
|
15074
15081
|
children: n
|
|
15075
15082
|
})
|
|
15076
15083
|
}) }), t[0] = n, t[1] = r), r;
|
|
@@ -15135,13 +15142,13 @@ var UE = class {
|
|
|
15135
15142
|
e.setValue(n);
|
|
15136
15143
|
}, t[0] = e, t[1] = n);
|
|
15137
15144
|
let r = n, i = e.label, a = e.fullWidth, o;
|
|
15138
|
-
t[2] === e.value ? o = t[3] : (o =
|
|
15145
|
+
t[2] === e.value ? o = t[3] : (o = qr(e.value), t[2] = e.value, t[3] = o);
|
|
15139
15146
|
let s = e.label ?? "date picker", c;
|
|
15140
|
-
t[4] === e.start ? c = t[5] : (c =
|
|
15147
|
+
t[4] === e.start ? c = t[5] : (c = qr(e.start), t[4] = e.start, t[5] = c);
|
|
15141
15148
|
let l;
|
|
15142
|
-
t[6] === e.stop ? l = t[7] : (l =
|
|
15149
|
+
t[6] === e.stop ? l = t[7] : (l = qr(e.stop), t[6] = e.stop, t[7] = l);
|
|
15143
15150
|
let u;
|
|
15144
|
-
t[8] !== r || t[9] !== e.disabled || t[10] !== o || t[11] !== s || t[12] !== c || t[13] !== l ? (u = /* @__PURE__ */ (0, Y.jsx)(
|
|
15151
|
+
t[8] !== r || t[9] !== e.disabled || t[10] !== o || t[11] !== s || t[12] !== c || t[13] !== l ? (u = /* @__PURE__ */ (0, Y.jsx)(_n, {
|
|
15145
15152
|
granularity: "day",
|
|
15146
15153
|
value: o,
|
|
15147
15154
|
onChange: r,
|
|
@@ -15182,20 +15189,20 @@ var UE = class {
|
|
|
15182
15189
|
e.setValue(i);
|
|
15183
15190
|
}, t[0] = e, t[1] = n);
|
|
15184
15191
|
let r = n, i = e.label, a = e.fullWidth, o;
|
|
15185
|
-
t[2] === e.value[0] ? o = t[3] : (o =
|
|
15192
|
+
t[2] === e.value[0] ? o = t[3] : (o = qr(e.value[0]), t[2] = e.value[0], t[3] = o);
|
|
15186
15193
|
let s;
|
|
15187
|
-
t[4] === e.value[1] ? s = t[5] : (s =
|
|
15194
|
+
t[4] === e.value[1] ? s = t[5] : (s = qr(e.value[1]), t[4] = e.value[1], t[5] = s);
|
|
15188
15195
|
let c;
|
|
15189
15196
|
t[6] !== o || t[7] !== s ? (c = {
|
|
15190
15197
|
start: o,
|
|
15191
15198
|
end: s
|
|
15192
15199
|
}, t[6] = o, t[7] = s, t[8] = c) : c = t[8];
|
|
15193
15200
|
let l = e.label ?? "date range picker", u;
|
|
15194
|
-
t[9] === e.start ? u = t[10] : (u =
|
|
15201
|
+
t[9] === e.start ? u = t[10] : (u = qr(e.start), t[9] = e.start, t[10] = u);
|
|
15195
15202
|
let d;
|
|
15196
|
-
t[11] === e.stop ? d = t[12] : (d =
|
|
15203
|
+
t[11] === e.stop ? d = t[12] : (d = qr(e.stop), t[11] = e.stop, t[12] = d);
|
|
15197
15204
|
let f;
|
|
15198
|
-
t[13] !== r || t[14] !== e.disabled || t[15] !== c || t[16] !== l || t[17] !== u || t[18] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)(
|
|
15205
|
+
t[13] !== r || t[14] !== e.disabled || t[15] !== c || t[16] !== l || t[17] !== u || t[18] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)(Tn, {
|
|
15199
15206
|
granularity: "day",
|
|
15200
15207
|
value: c,
|
|
15201
15208
|
onChange: r,
|
|
@@ -15241,13 +15248,13 @@ var UE = class {
|
|
|
15241
15248
|
e.setValue(n);
|
|
15242
15249
|
}, t[0] = e, t[1] = n);
|
|
15243
15250
|
let r = n, i;
|
|
15244
|
-
t[2] === e.value ? i = t[3] : (i = e.value ?
|
|
15251
|
+
t[2] === e.value ? i = t[3] : (i = e.value ? fr(e.value) : void 0, t[2] = e.value, t[3] = i);
|
|
15245
15252
|
let a = i, o = e.label, s = e.fullWidth, c = e.precision, l = e.label ?? "date time picker", u;
|
|
15246
|
-
t[4] === e.start ? u = t[5] : (u =
|
|
15253
|
+
t[4] === e.start ? u = t[5] : (u = fr(e.start), t[4] = e.start, t[5] = u);
|
|
15247
15254
|
let d;
|
|
15248
|
-
t[6] === e.stop ? d = t[7] : (d =
|
|
15255
|
+
t[6] === e.stop ? d = t[7] : (d = fr(e.stop), t[6] = e.stop, t[7] = d);
|
|
15249
15256
|
let f;
|
|
15250
|
-
t[8] !== r || t[9] !== a || t[10] !== e.disabled || t[11] !== e.precision || t[12] !== l || t[13] !== u || t[14] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)(
|
|
15257
|
+
t[8] !== r || t[9] !== a || t[10] !== e.disabled || t[11] !== e.precision || t[12] !== l || t[13] !== u || t[14] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)(_n, {
|
|
15251
15258
|
granularity: c,
|
|
15252
15259
|
value: a,
|
|
15253
15260
|
onChange: r,
|
|
@@ -15380,7 +15387,7 @@ var $E = class {
|
|
|
15380
15387
|
}, e), t[10] = i, t[11] = e), g = r.map(e), t[7] = r, t[8] = i, t[9] = g;
|
|
15381
15388
|
} else g = t[9];
|
|
15382
15389
|
let _;
|
|
15383
|
-
t[12] !== c || t[13] !== u || t[14] !== f || t[15] !== p || t[16] !== m || t[17] !== h || t[18] !== g ? (_ = /* @__PURE__ */ (0, Y.jsxs)(
|
|
15390
|
+
t[12] !== c || t[13] !== u || t[14] !== f || t[15] !== p || t[16] !== m || t[17] !== h || t[18] !== g ? (_ = /* @__PURE__ */ (0, Y.jsxs)(Ei, {
|
|
15384
15391
|
"data-testid": "marimo-plugin-dropdown",
|
|
15385
15392
|
onChange: p,
|
|
15386
15393
|
className: m,
|
|
@@ -15396,7 +15403,7 @@ var $E = class {
|
|
|
15396
15403
|
fullWidth: s,
|
|
15397
15404
|
children: _
|
|
15398
15405
|
}), t[20] = s, t[21] = u, t[22] = n, t[23] = _, t[24] = v) : v = t[24], v;
|
|
15399
|
-
}, nD = J.lazy(() => import("./ConnectedDataExplorerComponent-
|
|
15406
|
+
}, nD = J.lazy(() => import("./ConnectedDataExplorerComponent-CwMXfDQR.js")), rD = xS("marimo-data-explorer").withData(W({
|
|
15400
15407
|
label: U().nullish(),
|
|
15401
15408
|
data: U()
|
|
15402
15409
|
})).renderer((e) => /* @__PURE__ */ (0, Y.jsx)(nD, {
|
|
@@ -15408,7 +15415,7 @@ var $E = class {
|
|
|
15408
15415
|
too_many_values: !1
|
|
15409
15416
|
})), sD = (e) => {
|
|
15410
15417
|
let t = (0, X.c)(4), { type: n } = e, r;
|
|
15411
|
-
t[0] === n ? r = t[1] : (r = () => n.startsWith("int") || n.startsWith("float") || n.startsWith("uint") || n.startsWith("number") || n.startsWith("complex") ? /* @__PURE__ */ (0, Y.jsx)(Au, { size: 14 }) : n.startsWith("object") || n.startsWith("string") ? /* @__PURE__ */ (0, Y.jsx)(Mu, { size: 14 }) : n.startsWith("date") || n.startsWith("time") ? /* @__PURE__ */ (0, Y.jsx)(
|
|
15418
|
+
t[0] === n ? r = t[1] : (r = () => n.startsWith("int") || n.startsWith("float") || n.startsWith("uint") || n.startsWith("number") || n.startsWith("complex") ? /* @__PURE__ */ (0, Y.jsx)(Au, { size: 14 }) : n.startsWith("object") || n.startsWith("string") ? /* @__PURE__ */ (0, Y.jsx)(Mu, { size: 14 }) : n.startsWith("date") || n.startsWith("time") ? /* @__PURE__ */ (0, Y.jsx)(si, { size: 14 }) : n.startsWith("bool") ? /* @__PURE__ */ (0, Y.jsx)(ui, { size: 14 }) : /* @__PURE__ */ (0, Y.jsx)(st, { size: 14 }), t[0] = n, t[1] = r);
|
|
15412
15419
|
let i = r, a;
|
|
15413
15420
|
return t[2] === i ? a = t[3] : (a = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
15414
15421
|
className: "border p-px border-border bg-(--slate-2) flex items-center justify-center rounded",
|
|
@@ -15427,7 +15434,7 @@ var $E = class {
|
|
|
15427
15434
|
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(yh, { children: [
|
|
15428
15435
|
/* @__PURE__ */ (0, Y.jsx)(bh, { children: i }),
|
|
15429
15436
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: a }),
|
|
15430
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
15437
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(ji, {
|
|
15431
15438
|
"data-testid": "marimo-plugin-data-frames-column-select",
|
|
15432
15439
|
value: e.value == null ? e.value : JSON.stringify(e.value),
|
|
15433
15440
|
onValueChange: (t) => {
|
|
@@ -15436,11 +15443,11 @@ var $E = class {
|
|
|
15436
15443
|
},
|
|
15437
15444
|
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
15438
15445
|
className: "flex items-center gap-1",
|
|
15439
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15446
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Ai, {
|
|
15440
15447
|
className: "min-w-[180px]",
|
|
15441
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
15448
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ci, { placeholder: "--" })
|
|
15442
15449
|
}), /* @__PURE__ */ (0, Y.jsx)(pD, {})]
|
|
15443
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
15450
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Di, { children: /* @__PURE__ */ (0, Y.jsxs)(ki, { children: [[...r.entries()].map(([e, t]) => /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
15444
15451
|
value: JSON.stringify(e),
|
|
15445
15452
|
children: /* @__PURE__ */ (0, Y.jsxs)("span", {
|
|
15446
15453
|
className: "flex items-center gap-2 flex-1",
|
|
@@ -15460,7 +15467,7 @@ var $E = class {
|
|
|
15460
15467
|
})
|
|
15461
15468
|
]
|
|
15462
15469
|
})
|
|
15463
|
-
}, e)), r.size === 0 && /* @__PURE__ */ (0, Y.jsx)(
|
|
15470
|
+
}, e)), r.size === 0 && /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
15464
15471
|
disabled: !0,
|
|
15465
15472
|
value: "--",
|
|
15466
15473
|
children: "No columns"
|
|
@@ -15497,7 +15504,7 @@ var $E = class {
|
|
|
15497
15504
|
return /* @__PURE__ */ (0, Y.jsxs)(yh, { children: [
|
|
15498
15505
|
/* @__PURE__ */ (0, Y.jsx)(bh, { children: a }),
|
|
15499
15506
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: c }),
|
|
15500
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
15507
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(vn, {
|
|
15501
15508
|
className: "min-w-[180px]",
|
|
15502
15509
|
placeholder: u,
|
|
15503
15510
|
displayValue: String,
|
|
@@ -15535,7 +15542,7 @@ var $E = class {
|
|
|
15535
15542
|
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(yh, { children: [
|
|
15536
15543
|
/* @__PURE__ */ (0, Y.jsx)(bh, { children: r }),
|
|
15537
15544
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: i }),
|
|
15538
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
15545
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(ta, {
|
|
15539
15546
|
...e,
|
|
15540
15547
|
value: e.value,
|
|
15541
15548
|
onValueChange: e.onChange,
|
|
@@ -15555,14 +15562,14 @@ var $E = class {
|
|
|
15555
15562
|
children: r
|
|
15556
15563
|
}),
|
|
15557
15564
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: i }),
|
|
15558
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
15565
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsx)(vn, {
|
|
15559
15566
|
className: "min-w-[180px]",
|
|
15560
15567
|
placeholder: a,
|
|
15561
15568
|
multiple: !1,
|
|
15562
15569
|
displayValue: (e) => e,
|
|
15563
15570
|
value: Array.isArray(e.value) ? e.value[0] : e.value,
|
|
15564
15571
|
onValueChange: e.onChange,
|
|
15565
|
-
children: d.map((e) => /* @__PURE__ */ (0, Y.jsx)(
|
|
15572
|
+
children: d.map((e) => /* @__PURE__ */ (0, Y.jsx)(En, {
|
|
15566
15573
|
value: e,
|
|
15567
15574
|
children: e
|
|
15568
15575
|
}, e))
|
|
@@ -15665,14 +15672,14 @@ var $E = class {
|
|
|
15665
15672
|
children: " "
|
|
15666
15673
|
}),
|
|
15667
15674
|
/* @__PURE__ */ (0, Y.jsx)(Sh, { children: o }),
|
|
15668
|
-
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
15675
|
+
/* @__PURE__ */ (0, Y.jsx)(xh, { children: /* @__PURE__ */ (0, Y.jsxs)(ji, {
|
|
15669
15676
|
"data-testid": "marimo-plugin-data-frames-filter-operator-select",
|
|
15670
15677
|
value: t.value,
|
|
15671
15678
|
onValueChange: t.onChange,
|
|
15672
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15679
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Ai, {
|
|
15673
15680
|
className: "min-w-[140px]",
|
|
15674
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
15675
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
15681
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ci, { placeholder: "--" })
|
|
15682
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Di, { children: /* @__PURE__ */ (0, Y.jsx)(ki, { children: i.map(yD) }) })]
|
|
15676
15683
|
}) }),
|
|
15677
15684
|
/* @__PURE__ */ (0, Y.jsx)(Ch, {})
|
|
15678
15685
|
] });
|
|
@@ -15715,7 +15722,7 @@ var $E = class {
|
|
|
15715
15722
|
];
|
|
15716
15723
|
function _D(e) {
|
|
15717
15724
|
let [t, n] = e;
|
|
15718
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
15725
|
+
return /* @__PURE__ */ (0, Y.jsx)(En, {
|
|
15719
15726
|
value: t,
|
|
15720
15727
|
children: /* @__PURE__ */ (0, Y.jsxs)("span", {
|
|
15721
15728
|
className: "flex items-center gap-2 flex-1",
|
|
@@ -15742,9 +15749,9 @@ function vD(e) {
|
|
|
15742
15749
|
return t === "column_id";
|
|
15743
15750
|
}
|
|
15744
15751
|
function yD(e) {
|
|
15745
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
15752
|
+
return /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
15746
15753
|
value: e,
|
|
15747
|
-
children:
|
|
15754
|
+
children: Si.startCase(e)
|
|
15748
15755
|
}, e);
|
|
15749
15756
|
}
|
|
15750
15757
|
//#endregion
|
|
@@ -15886,7 +15893,7 @@ var xD = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
15886
15893
|
"to automatically apply transformations."
|
|
15887
15894
|
] })]
|
|
15888
15895
|
}),
|
|
15889
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
15896
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ct, { className: "w-3 h-3 text-muted-foreground hover:text-foreground cursor-help" })
|
|
15890
15897
|
})]
|
|
15891
15898
|
})
|
|
15892
15899
|
]
|
|
@@ -15904,7 +15911,7 @@ var xD = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
15904
15911
|
className: l("flex flex-row min-h-[40px] items-center px-2 cursor-pointer hover:bg-accent/50 text-sm overflow-hidden hover-actions-parent border border-muted border-l-2 border-l-transparent", { "border-l-primary bg-accent text-accent-foreground": r === t }),
|
|
15905
15912
|
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
|
|
15906
15913
|
className: "grow text-ellipsis",
|
|
15907
|
-
children:
|
|
15914
|
+
children: Si.startCase(e.type)
|
|
15908
15915
|
}), /* @__PURE__ */ (0, Y.jsx)(P, {
|
|
15909
15916
|
className: "w-3 h-3 hover-action text-muted-foreground hover:text-destructive",
|
|
15910
15917
|
onClick: (e) => {
|
|
@@ -15941,24 +15948,24 @@ var xD = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
15941
15948
|
}), t[14] = c, t[15] = d, t[16] = f) : f = t[16], f;
|
|
15942
15949
|
}, CD = (e) => {
|
|
15943
15950
|
let t = (0, X.c)(12), { onAdd: n, children: r } = e, i;
|
|
15944
|
-
t[0] === r ? i = t[1] : (i = /* @__PURE__ */ (0, Y.jsx)(
|
|
15951
|
+
t[0] === r ? i = t[1] : (i = /* @__PURE__ */ (0, Y.jsx)(qi, {
|
|
15945
15952
|
asChild: !0,
|
|
15946
15953
|
children: r
|
|
15947
15954
|
}), t[0] = r, t[1] = i);
|
|
15948
15955
|
let a, o;
|
|
15949
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ (0, Y.jsx)(
|
|
15956
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ (0, Y.jsx)(Ui, { children: "Add Transform" }), o = /* @__PURE__ */ (0, Y.jsx)(aa, {}), t[2] = a, t[3] = o) : (a = t[2], o = t[3]);
|
|
15950
15957
|
let s;
|
|
15951
15958
|
t[4] === n ? s = t[5] : (s = Object.values(jC.options).map((e) => {
|
|
15952
15959
|
let t = Ph(e), r = wD[t.value];
|
|
15953
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
15960
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Zi, {
|
|
15954
15961
|
onSelect: (t) => {
|
|
15955
15962
|
t.stopPropagation(), n(e);
|
|
15956
15963
|
},
|
|
15957
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(r, { className: "w-3.5 h-3.5 mr-2" }), /* @__PURE__ */ (0, Y.jsx)("span", { children:
|
|
15964
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(r, { className: "w-3.5 h-3.5 mr-2" }), /* @__PURE__ */ (0, Y.jsx)("span", { children: Si.startCase(t.value) })]
|
|
15958
15965
|
}, t.value);
|
|
15959
15966
|
}), t[4] = n, t[5] = s);
|
|
15960
15967
|
let c;
|
|
15961
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, Y.jsx)(
|
|
15968
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, Y.jsx)(Zi, {
|
|
15962
15969
|
onSelect: TD,
|
|
15963
15970
|
children: /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
15964
15971
|
className: "underline text-primary text-xs cursor-pointer",
|
|
@@ -15966,23 +15973,23 @@ var xD = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
15966
15973
|
})
|
|
15967
15974
|
}, "_request_"), t[6] = c) : c = t[6];
|
|
15968
15975
|
let l;
|
|
15969
|
-
t[7] === s ? l = t[8] : (l = /* @__PURE__ */ (0, Y.jsxs)(
|
|
15976
|
+
t[7] === s ? l = t[8] : (l = /* @__PURE__ */ (0, Y.jsxs)(ea, {
|
|
15970
15977
|
className: "w-56",
|
|
15971
15978
|
children: [
|
|
15972
15979
|
a,
|
|
15973
15980
|
o,
|
|
15974
|
-
/* @__PURE__ */ (0, Y.jsxs)(
|
|
15981
|
+
/* @__PURE__ */ (0, Y.jsxs)(ia, { children: [s, c] })
|
|
15975
15982
|
]
|
|
15976
15983
|
}), t[7] = s, t[8] = l);
|
|
15977
15984
|
let u;
|
|
15978
|
-
return t[9] !== i || t[10] !== l ? (u = /* @__PURE__ */ (0, Y.jsxs)(
|
|
15985
|
+
return t[9] !== i || t[10] !== l ? (u = /* @__PURE__ */ (0, Y.jsxs)(oa, {
|
|
15979
15986
|
modal: !1,
|
|
15980
15987
|
children: [i, l]
|
|
15981
15988
|
}), t[9] = i, t[10] = l, t[11] = u) : u = t[11], u;
|
|
15982
15989
|
}, wD = {
|
|
15983
|
-
aggregate:
|
|
15984
|
-
column_conversion:
|
|
15985
|
-
filter_rows:
|
|
15990
|
+
aggregate: jt,
|
|
15991
|
+
column_conversion: nt,
|
|
15992
|
+
filter_rows: Sr,
|
|
15986
15993
|
group_by: Ku,
|
|
15987
15994
|
rename_column: La,
|
|
15988
15995
|
select_columns: nd,
|
|
@@ -15992,7 +15999,7 @@ var xD = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
15992
15999
|
explode_columns: ju,
|
|
15993
16000
|
expand_dict: Lu,
|
|
15994
16001
|
unique: Fu,
|
|
15995
|
-
pivot:
|
|
16002
|
+
pivot: Tt
|
|
15996
16003
|
};
|
|
15997
16004
|
function TD(e) {
|
|
15998
16005
|
e.stopPropagation(), window.open("https://github.com/marimo-team/marimo/issues/new?title=New%20dataframe%20transform:&labels=enhancement&template=feature_request.yaml", "_blank");
|
|
@@ -16078,27 +16085,27 @@ var ED = xS("marimo-dataframe").withData(W({
|
|
|
16078
16085
|
c
|
|
16079
16086
|
], t[13] = v, t[14] = c, t[15] = R, t[16] = ee) : ee = t[16], (0, J.useEffect)(L, ee);
|
|
16080
16087
|
let z;
|
|
16081
|
-
t[17] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ (0, Y.jsxs)(
|
|
16088
|
+
t[17] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ (0, Y.jsxs)(Mn, {
|
|
16082
16089
|
value: "transform",
|
|
16083
16090
|
className: "text-xs py-1",
|
|
16084
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
16091
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(jt, { className: "w-3 h-3 mr-2" }), "Transform"]
|
|
16085
16092
|
}), t[17] = z) : z = t[17];
|
|
16086
16093
|
let te;
|
|
16087
|
-
t[18] === D ? te = t[19] : (te = D && /* @__PURE__ */ (0, Y.jsxs)(
|
|
16094
|
+
t[18] === D ? te = t[19] : (te = D && /* @__PURE__ */ (0, Y.jsxs)(Mn, {
|
|
16088
16095
|
value: "python-code",
|
|
16089
16096
|
className: "text-xs py-1",
|
|
16090
16097
|
children: [/* @__PURE__ */ (0, Y.jsx)(Nu, { className: "w-3 h-3 mr-2" }), "Python Code"]
|
|
16091
16098
|
}), t[18] = D, t[19] = te);
|
|
16092
16099
|
let B;
|
|
16093
|
-
t[20] === O ? B = t[21] : (B = O && /* @__PURE__ */ (0, Y.jsxs)(
|
|
16100
|
+
t[20] === O ? B = t[21] : (B = O && /* @__PURE__ */ (0, Y.jsxs)(Mn, {
|
|
16094
16101
|
value: "sql-code",
|
|
16095
16102
|
className: "text-xs py-1",
|
|
16096
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
16103
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Qe, { className: "w-3 h-3 mr-2" }), "SQL Code"]
|
|
16097
16104
|
}), t[20] = O, t[21] = B);
|
|
16098
16105
|
let re;
|
|
16099
16106
|
t[22] === Symbol.for("react.memo_cache_sentinel") ? (re = /* @__PURE__ */ (0, Y.jsx)("div", { className: "grow" }), t[22] = re) : re = t[22];
|
|
16100
16107
|
let ie;
|
|
16101
|
-
t[23] !== te || t[24] !== B ? (ie = /* @__PURE__ */ (0, Y.jsxs)(
|
|
16108
|
+
t[23] !== te || t[24] !== B ? (ie = /* @__PURE__ */ (0, Y.jsxs)(An, {
|
|
16102
16109
|
className: "h-8",
|
|
16103
16110
|
children: [
|
|
16104
16111
|
z,
|
|
@@ -16119,7 +16126,7 @@ var ED = xS("marimo-dataframe").withData(W({
|
|
|
16119
16126
|
ds(e, s) || (c(e), j(e));
|
|
16120
16127
|
}, t[31] = c, t[32] = s, t[33] = se) : se = t[33];
|
|
16121
16128
|
let ce;
|
|
16122
|
-
t[34] !== E || t[35] !== n || t[36] !== u || t[37] !== A || t[38] !== o || t[39] !== se ? (ce = /* @__PURE__ */ (0, Y.jsx)(
|
|
16129
|
+
t[34] !== E || t[35] !== n || t[36] !== u || t[37] !== A || t[38] !== o || t[39] !== se ? (ce = /* @__PURE__ */ (0, Y.jsx)(Tr, {
|
|
16123
16130
|
value: "transform",
|
|
16124
16131
|
className: "mt-1 border rounded-t overflow-hidden",
|
|
16125
16132
|
children: /* @__PURE__ */ (0, Y.jsx)(xD, {
|
|
@@ -16134,7 +16141,7 @@ var ED = xS("marimo-dataframe").withData(W({
|
|
|
16134
16141
|
})
|
|
16135
16142
|
}), t[34] = E, t[35] = n, t[36] = u, t[37] = A, t[38] = o, t[39] = se, t[40] = ce) : ce = t[40];
|
|
16136
16143
|
let V;
|
|
16137
|
-
t[41] === D ? V = t[42] : (V = D && /* @__PURE__ */ (0, Y.jsx)(
|
|
16144
|
+
t[41] === D ? V = t[42] : (V = D && /* @__PURE__ */ (0, Y.jsx)(Tr, {
|
|
16138
16145
|
value: "python-code",
|
|
16139
16146
|
className: "mt-1 border rounded-t overflow-hidden",
|
|
16140
16147
|
children: /* @__PURE__ */ (0, Y.jsx)(xw, {
|
|
@@ -16145,7 +16152,7 @@ var ED = xS("marimo-dataframe").withData(W({
|
|
|
16145
16152
|
})
|
|
16146
16153
|
}), t[41] = D, t[42] = V);
|
|
16147
16154
|
let le;
|
|
16148
|
-
t[43] === O ? le = t[44] : (le = O && /* @__PURE__ */ (0, Y.jsx)(
|
|
16155
|
+
t[43] === O ? le = t[44] : (le = O && /* @__PURE__ */ (0, Y.jsx)(Tr, {
|
|
16149
16156
|
value: "sql-code",
|
|
16150
16157
|
className: "mt-1 border rounded-t overflow-hidden",
|
|
16151
16158
|
children: /* @__PURE__ */ (0, Y.jsx)(xw, {
|
|
@@ -16156,7 +16163,7 @@ var ED = xS("marimo-dataframe").withData(W({
|
|
|
16156
16163
|
})
|
|
16157
16164
|
}), t[43] = O, t[44] = le);
|
|
16158
16165
|
let ue;
|
|
16159
|
-
t[45] !== P || t[46] !== oe || t[47] !== ce || t[48] !== V || t[49] !== le ? (ue = /* @__PURE__ */ (0, Y.jsxs)(
|
|
16166
|
+
t[45] !== P || t[46] !== oe || t[47] !== ce || t[48] !== V || t[49] !== le ? (ue = /* @__PURE__ */ (0, Y.jsxs)(on, {
|
|
16160
16167
|
defaultValue: "transform",
|
|
16161
16168
|
onValueChange: P,
|
|
16162
16169
|
children: [
|
|
@@ -16268,12 +16275,12 @@ var MD = {
|
|
|
16268
16275
|
python: Ru,
|
|
16269
16276
|
code: Ru,
|
|
16270
16277
|
json: Lu,
|
|
16271
|
-
text:
|
|
16278
|
+
text: Ye,
|
|
16272
16279
|
image: qu,
|
|
16273
16280
|
audio: zu,
|
|
16274
16281
|
video: Bu,
|
|
16275
16282
|
data: Vu,
|
|
16276
|
-
pdf:
|
|
16283
|
+
pdf: Ye,
|
|
16277
16284
|
zip: Hu,
|
|
16278
16285
|
unknown: Da
|
|
16279
16286
|
};
|
|
@@ -16333,7 +16340,7 @@ function ID(e) {
|
|
|
16333
16340
|
let s = !r, c;
|
|
16334
16341
|
t[2] === s ? c = t[3] : (c = l({ "hidden group-hover:flex group-focus:flex": s }), t[2] = s, t[3] = c);
|
|
16335
16342
|
let u;
|
|
16336
|
-
t[4] !== r || t[5] !== e || t[6] !== i || t[7] !== c ? (u = /* @__PURE__ */ (0, Y.jsx)(
|
|
16343
|
+
t[4] !== r || t[5] !== e || t[6] !== i || t[7] !== c ? (u = /* @__PURE__ */ (0, Y.jsx)(Me, {
|
|
16337
16344
|
checked: r,
|
|
16338
16345
|
"aria-label": e,
|
|
16339
16346
|
tabIndex: -1,
|
|
@@ -16360,7 +16367,7 @@ function ID(e) {
|
|
|
16360
16367
|
}), t[18] = a, t[19] = s), s;
|
|
16361
16368
|
}
|
|
16362
16369
|
var LD = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i, label: a, restrictNavigation: o, list_directory: s, host: c }) => {
|
|
16363
|
-
let [u, d] =
|
|
16370
|
+
let [u, d] = yn(n), [f, p] = (0, J.useState)(!1), [m, h] = (0, J.useState)(!1), [g, v] = (0, J.useState)(0), y = (0, J.useRef)([]), b = (0, J.useRef)(null), S = (0, J.useRef)(!1), C = c.closest(`[${yt}]`)?.getAttribute(yt), { data: w, error: T, isPending: D } = Ns(() => s({ path: u }), [
|
|
16364
16371
|
u,
|
|
16365
16372
|
C,
|
|
16366
16373
|
s
|
|
@@ -16392,7 +16399,7 @@ var LD = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
16392
16399
|
kind: "danger",
|
|
16393
16400
|
children: T.message
|
|
16394
16401
|
});
|
|
16395
|
-
let L =
|
|
16402
|
+
let L = vt.guessDeliminator(n).deliminator, R = e.map((e) => /* @__PURE__ */ (0, Y.jsx)("li", { children: e.path }, e.id));
|
|
16396
16403
|
function ee(e) {
|
|
16397
16404
|
if (f) return;
|
|
16398
16405
|
if (p(!0), e === FD) {
|
|
@@ -16400,7 +16407,7 @@ var LD = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
16400
16407
|
p(!1);
|
|
16401
16408
|
return;
|
|
16402
16409
|
}
|
|
16403
|
-
e =
|
|
16410
|
+
e = ke.dirname(u), e === "" && (e = L);
|
|
16404
16411
|
}
|
|
16405
16412
|
let t = e.length < n.length;
|
|
16406
16413
|
if (o && t) {
|
|
@@ -16430,7 +16437,7 @@ var LD = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
16430
16437
|
M.has(n) ? t(e.filter((e) => e.path !== n)) : t(i ? [...e, o] : [o]);
|
|
16431
16438
|
}
|
|
16432
16439
|
function B() {
|
|
16433
|
-
t(e.filter((e) =>
|
|
16440
|
+
t(e.filter((e) => ke.dirname(e.path) !== u));
|
|
16434
16441
|
}
|
|
16435
16442
|
function re() {
|
|
16436
16443
|
let n = [];
|
|
@@ -16500,7 +16507,7 @@ var LD = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
16500
16507
|
delimiter: L,
|
|
16501
16508
|
initialPath: n,
|
|
16502
16509
|
restrictNavigation: o
|
|
16503
|
-
}), ce = r === "all" ?
|
|
16510
|
+
}), ce = r === "all" ? $e.of("file", "folder") : r === "directory" ? $e.of("folder") : $e.of("file");
|
|
16504
16511
|
return /* @__PURE__ */ (0, Y.jsxs)("div", { children: [
|
|
16505
16512
|
T && /* @__PURE__ */ (0, Y.jsx)(qo, {
|
|
16506
16513
|
kind: "danger",
|
|
@@ -16521,7 +16528,7 @@ var LD = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
16521
16528
|
}) })]
|
|
16522
16529
|
}) : t;
|
|
16523
16530
|
})(),
|
|
16524
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
16531
|
+
/* @__PURE__ */ (0, Y.jsx)(Ei, {
|
|
16525
16532
|
className: "mt-2 w-full",
|
|
16526
16533
|
placeholder: u,
|
|
16527
16534
|
value: u,
|
|
@@ -16544,13 +16551,13 @@ var LD = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
16544
16551
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2 bg-background/80 text-xs text-muted-foreground pointer-events-none z-10",
|
|
16545
16552
|
role: "status",
|
|
16546
16553
|
children: [/* @__PURE__ */ (0, Y.jsx)(ne, { size: "small" }), /* @__PURE__ */ (0, Y.jsx)("span", { children: "Listing files..." })]
|
|
16547
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
16554
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Pr, {
|
|
16548
16555
|
ref: b,
|
|
16549
16556
|
className: "cursor-pointer table-fixed",
|
|
16550
16557
|
role: "grid",
|
|
16551
16558
|
"aria-label": "File browser",
|
|
16552
16559
|
"aria-multiselectable": i,
|
|
16553
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
16560
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ur, { children: ie.map((e, t) => /* @__PURE__ */ (0, Y.jsxs)(Gr, {
|
|
16554
16561
|
role: "row",
|
|
16555
16562
|
ref: (e) => {
|
|
16556
16563
|
y.current[t] = e;
|
|
@@ -16561,7 +16568,7 @@ var LD = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
16561
16568
|
className: l("hover:bg-accent group select-none focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-inset", { "bg-primary/25 hover:bg-primary/35": e.isSelected }),
|
|
16562
16569
|
"aria-selected": e.canSelect ? e.isSelected : void 0,
|
|
16563
16570
|
onClick: e.onPrimary,
|
|
16564
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
16571
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Cr, {
|
|
16565
16572
|
role: "gridcell",
|
|
16566
16573
|
className: "w-[50px] pl-4",
|
|
16567
16574
|
children: /* @__PURE__ */ (0, Y.jsx)(ID, {
|
|
@@ -16571,7 +16578,7 @@ var LD = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
16571
16578
|
Icon: e.Icon,
|
|
16572
16579
|
onSelect: () => e.onToggleSelect?.()
|
|
16573
16580
|
})
|
|
16574
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
16581
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Cr, {
|
|
16575
16582
|
role: "gridcell",
|
|
16576
16583
|
children: e.name
|
|
16577
16584
|
})]
|
|
@@ -19278,7 +19285,7 @@ var Wk = (e) => {
|
|
|
19278
19285
|
variant: "secondary",
|
|
19279
19286
|
onClick: n,
|
|
19280
19287
|
className: "w-[50px]",
|
|
19281
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
19288
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ji, {
|
|
19282
19289
|
className: l("w-6 h-6 border border-input rounded-full"),
|
|
19283
19290
|
strokeWidth: 1.5,
|
|
19284
19291
|
fill: "var(--red-9)"
|
|
@@ -19294,7 +19301,7 @@ var Wk = (e) => {
|
|
|
19294
19301
|
className: "w-5 h-5 rounded-sm",
|
|
19295
19302
|
fill: "var(--red-9)",
|
|
19296
19303
|
strokeWidth: 1.5
|
|
19297
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
19304
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Ji, {
|
|
19298
19305
|
className: l("w-6 h-6 absolute opacity-20 animate-ping"),
|
|
19299
19306
|
fill: "var(--red-9)",
|
|
19300
19307
|
style: { animationDuration: "1.5s" },
|
|
@@ -19380,7 +19387,7 @@ function qk(e) {
|
|
|
19380
19387
|
let v = ns(_), y;
|
|
19381
19388
|
t[8] === f ? y = t[9] : (y = () => {
|
|
19382
19389
|
o.current?.stream.getTracks().forEach(Jk), o.current?.stop(), f.stop();
|
|
19383
|
-
}, t[8] = f, t[9] = y),
|
|
19390
|
+
}, t[8] = f, t[9] = y), li(y);
|
|
19384
19391
|
let b;
|
|
19385
19392
|
return t[10] !== s || t[11] !== v || t[12] !== u || t[13] !== i || t[14] !== m || t[15] !== g || t[16] !== f.time ? (b = {
|
|
19386
19393
|
start: m,
|
|
@@ -20015,7 +20022,7 @@ var yA = (e) => {
|
|
|
20015
20022
|
else if (e.type === "binary" && n && n.length > 0) t.receiveBinary(n[0]);
|
|
20016
20023
|
else if (e.type === "download" && n && n.length > 0) {
|
|
20017
20024
|
let t = e.format || "png", r = n[0], i = r.buffer.slice(r.byteOffset, r.byteOffset + r.byteLength);
|
|
20018
|
-
|
|
20025
|
+
Qr(new Blob([i], { type: `image/${t}` }), `figure.${t}`);
|
|
20019
20026
|
}
|
|
20020
20027
|
}
|
|
20021
20028
|
};
|
|
@@ -20103,14 +20110,14 @@ var yA = (e) => {
|
|
|
20103
20110
|
disabled: a,
|
|
20104
20111
|
onChange: e.setValue
|
|
20105
20112
|
}, t[2] = i, t[3] = e.setValue, t[4] = a, t[5] = o) : o = t[5];
|
|
20106
|
-
let { value: s, onChange: c } =
|
|
20113
|
+
let { value: s, onChange: c } = ra(o), u;
|
|
20107
20114
|
t[6] === c ? u = t[7] : (u = (e) => {
|
|
20108
20115
|
c(SA(e));
|
|
20109
20116
|
}, t[6] = c, t[7] = u);
|
|
20110
20117
|
let d = u, f = e.label, p = n, m = e.fullWidth, h = e.fullWidth && "w-full", g;
|
|
20111
20118
|
t[8] === h ? g = t[9] : (g = l("min-w-[3em]", h), t[8] = h, t[9] = g);
|
|
20112
20119
|
let _ = e.start ?? void 0, v = e.stop ?? void 0, y = s ?? NaN, b = e.label || "Number input", x;
|
|
20113
|
-
t[10] !== d || t[11] !== n || t[12] !== e.disabled || t[13] !== e.step || t[14] !== v || t[15] !== y || t[16] !== b || t[17] !== g || t[18] !== _ ? (x = /* @__PURE__ */ (0, Y.jsx)(
|
|
20120
|
+
t[10] !== d || t[11] !== n || t[12] !== e.disabled || t[13] !== e.step || t[14] !== v || t[15] !== y || t[16] !== b || t[17] !== g || t[18] !== _ ? (x = /* @__PURE__ */ (0, Y.jsx)(Hi, {
|
|
20114
20121
|
"data-testid": "marimo-plugin-number-input",
|
|
20115
20122
|
className: g,
|
|
20116
20123
|
minValue: _,
|
|
@@ -20581,7 +20588,7 @@ function fj(e) {
|
|
|
20581
20588
|
}, t[5] = n, t[6] = p);
|
|
20582
20589
|
let m;
|
|
20583
20590
|
t[7] !== a || t[8] !== n ? (m = [n, a], t[7] = a, t[8] = n, t[9] = m) : m = t[9], (0, J.useEffect)(p, m);
|
|
20584
|
-
let h =
|
|
20591
|
+
let h = vr(s) ?? s, g, _;
|
|
20585
20592
|
t[10] !== s.layout || t[11] !== h.layout ? (g = () => {
|
|
20586
20593
|
f((e) => dj(s.layout, h.layout, e));
|
|
20587
20594
|
}, _ = [s.layout, h.layout], t[10] = s.layout, t[11] = h.layout, t[12] = g, t[13] = _) : (g = t[12], _ = t[13]), (0, J.useEffect)(g, _);
|
|
@@ -20771,7 +20778,7 @@ var yj = class {
|
|
|
20771
20778
|
let r;
|
|
20772
20779
|
t[5] === n ? r = t[6] : (r = (e, t) => /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
20773
20780
|
className: "flex items-center space-x-2",
|
|
20774
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
20781
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Yn, {
|
|
20775
20782
|
value: e,
|
|
20776
20783
|
id: `${n}-${t.toString()}`
|
|
20777
20784
|
}), /* @__PURE__ */ (0, Y.jsx)(Jo, {
|
|
@@ -20782,7 +20789,7 @@ var yj = class {
|
|
|
20782
20789
|
}, t), t[5] = n, t[6] = r), d = e.options.map(r), t[2] = n, t[3] = e.options, t[4] = d;
|
|
20783
20790
|
} else d = t[4];
|
|
20784
20791
|
let f;
|
|
20785
|
-
t[7] !== e.disabled || t[8] !== e.setValue || t[9] !== a || t[10] !== c || t[11] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)(
|
|
20792
|
+
t[7] !== e.disabled || t[8] !== e.setValue || t[9] !== a || t[10] !== c || t[11] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)(Gn, {
|
|
20786
20793
|
"data-testid": "marimo-plugin-radio",
|
|
20787
20794
|
value: a,
|
|
20788
20795
|
onValueChange: o,
|
|
@@ -20866,7 +20873,7 @@ var yj = class {
|
|
|
20866
20873
|
})
|
|
20867
20874
|
}), n[23] = s.setFalse, n[24] = s.setTrue, n[25] = M) : M = n[25];
|
|
20868
20875
|
let N;
|
|
20869
|
-
n[26] !== c || n[27] !== i.value || n[28] !== a ? (N = i.value != null && i.value.length === 2 && /* @__PURE__ */ (0, Y.jsx)(ue, { children:
|
|
20876
|
+
n[26] !== c || n[27] !== i.value || n[28] !== a ? (N = i.value != null && i.value.length === 2 && /* @__PURE__ */ (0, Y.jsx)(ue, { children: zi(a(i.value[0]), { locale: c }) }, i.value[0]), n[26] = c, n[27] = i.value, n[28] = a, n[29] = N) : N = n[29];
|
|
20870
20877
|
let P;
|
|
20871
20878
|
n[30] === N ? P = n[31] : (P = /* @__PURE__ */ (0, Y.jsx)(pe, { children: N }), n[30] = N, n[31] = P);
|
|
20872
20879
|
let F;
|
|
@@ -20888,7 +20895,7 @@ var yj = class {
|
|
|
20888
20895
|
})
|
|
20889
20896
|
}), n[36] = s.setFalse, n[37] = s.setTrue, n[38] = I) : I = n[38];
|
|
20890
20897
|
let L;
|
|
20891
|
-
n[39] !== c || n[40] !== i.value || n[41] !== a ? (L = i.value != null && i.value.length === 2 && /* @__PURE__ */ (0, Y.jsx)(ue, { children:
|
|
20898
|
+
n[39] !== c || n[40] !== i.value || n[41] !== a ? (L = i.value != null && i.value.length === 2 && /* @__PURE__ */ (0, Y.jsx)(ue, { children: zi(a(i.value[1]), { locale: c }) }, i.value[1]), n[39] = c, n[40] = i.value, n[41] = a, n[42] = L) : L = n[42];
|
|
20892
20899
|
let R;
|
|
20893
20900
|
n[43] === L ? R = n[44] : (R = /* @__PURE__ */ (0, Y.jsx)(pe, { children: L }), n[43] = L, n[44] = R);
|
|
20894
20901
|
let ee;
|
|
@@ -20978,7 +20985,7 @@ var Sj = class {
|
|
|
20978
20985
|
let P;
|
|
20979
20986
|
t[34] !== _ || t[35] !== g || t[36] !== d || t[37] !== m ? (P = d && /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
20980
20987
|
className: "text-xs text-muted-foreground min-w-[16px]",
|
|
20981
|
-
children: `${
|
|
20988
|
+
children: `${zi(m(_[0]), { locale: g })}, ${zi(m(_[1]), { locale: g })}`
|
|
20982
20989
|
}), t[34] = _, t[35] = g, t[36] = d, t[37] = m, t[38] = P) : P = t[38];
|
|
20983
20990
|
let F;
|
|
20984
20991
|
t[39] !== N || t[40] !== P || t[41] !== E ? (F = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
@@ -21134,7 +21141,7 @@ var Sj = class {
|
|
|
21134
21141
|
className: l(s, "border mb-0 rounded", c && "border-r-0 rounded-tr-none rounded-br-none"),
|
|
21135
21142
|
onClick: o,
|
|
21136
21143
|
children: /* @__PURE__ */ (0, Y.jsx)(Zu, { className: l("w-3.5 h-3.5", i && "animate-spin") })
|
|
21137
|
-
}), /* @__PURE__ */ (0, Y.jsxs)(
|
|
21144
|
+
}), /* @__PURE__ */ (0, Y.jsxs)(Ei, {
|
|
21138
21145
|
"data-testid": "marimo-plugin-refresh-select",
|
|
21139
21146
|
onChange: (e) => {
|
|
21140
21147
|
r(e.target.value);
|
|
@@ -21196,13 +21203,13 @@ function Nj(e) {
|
|
|
21196
21203
|
r > 0 && r < n && (n = r);
|
|
21197
21204
|
}
|
|
21198
21205
|
(!Number.isFinite(n) || n <= 0) && (n = 1);
|
|
21199
|
-
let r =
|
|
21206
|
+
let r = sa(e, n);
|
|
21200
21207
|
return {
|
|
21201
21208
|
steps: e,
|
|
21202
21209
|
fractionDigits: r,
|
|
21203
|
-
minValue:
|
|
21204
|
-
maxValue:
|
|
21205
|
-
inputStep:
|
|
21210
|
+
minValue: Fi(t[0], r),
|
|
21211
|
+
maxValue: Fi(t[t.length - 1], r),
|
|
21212
|
+
inputStep: Fi(n, r),
|
|
21206
21213
|
formatOptions: {
|
|
21207
21214
|
minimumFractionDigits: 0,
|
|
21208
21215
|
maximumFractionDigits: r
|
|
@@ -21224,7 +21231,7 @@ var Pj = (e) => {
|
|
|
21224
21231
|
b(0), r(0);
|
|
21225
21232
|
return;
|
|
21226
21233
|
}
|
|
21227
|
-
let i =
|
|
21234
|
+
let i = Fi(e, n), a = Mj(t, i), o = Fi(t[y] ?? t[0], n);
|
|
21228
21235
|
a === y && i !== o && (a = i > o ? Math.min(y + 1, t.length - 1) : Math.max(y - 1, 0)), b(a), r(a);
|
|
21229
21236
|
return;
|
|
21230
21237
|
}
|
|
@@ -21233,7 +21240,7 @@ var Pj = (e) => {
|
|
|
21233
21240
|
}, t[5] = y, t[6] = r, t[7] = a, t[8] = w, t[9] = T) : T = t[9];
|
|
21234
21241
|
let E = T, D;
|
|
21235
21242
|
t[10] !== y || t[11] !== a || t[12] !== s || t[13] !== w || t[14] !== o || t[15] !== m ? (D = w ? {
|
|
21236
|
-
value:
|
|
21243
|
+
value: Fi(m(y), w.fractionDigits),
|
|
21237
21244
|
minValue: w.minValue,
|
|
21238
21245
|
maxValue: w.maxValue,
|
|
21239
21246
|
step: w.inputStep,
|
|
@@ -21277,10 +21284,10 @@ var Pj = (e) => {
|
|
|
21277
21284
|
let z;
|
|
21278
21285
|
t[41] !== y || t[42] !== v || t[43] !== f || t[44] !== m ? (z = f && /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
21279
21286
|
className: "text-xs text-muted-foreground min-w-[16px]",
|
|
21280
|
-
children:
|
|
21287
|
+
children: zi(m(y), { locale: v })
|
|
21281
21288
|
}), t[41] = y, t[42] = v, t[43] = f, t[44] = m, t[45] = z) : z = t[45];
|
|
21282
21289
|
let te;
|
|
21283
|
-
t[46] !== g || t[47] !== E || t[48] !== h || t[49] !== O || t[50] !== n ? (te = h && /* @__PURE__ */ (0, Y.jsx)(
|
|
21290
|
+
t[46] !== g || t[47] !== E || t[48] !== h || t[49] !== O || t[50] !== n ? (te = h && /* @__PURE__ */ (0, Y.jsx)(Hi, {
|
|
21284
21291
|
...O,
|
|
21285
21292
|
onChange: E,
|
|
21286
21293
|
className: "w-24",
|
|
@@ -21317,7 +21324,7 @@ var Pj = (e) => {
|
|
|
21317
21324
|
}
|
|
21318
21325
|
}, Ij = (e) => {
|
|
21319
21326
|
let t = (0, X.c)(9), { value: n, setValue: r, data: i } = e, a = (0, J.useId)(), o;
|
|
21320
|
-
t[0] !== i.disabled || t[1] !== a || t[2] !== r || t[3] !== n ? (o = /* @__PURE__ */ (0, Y.jsx)(
|
|
21327
|
+
t[0] !== i.disabled || t[1] !== a || t[2] !== r || t[3] !== n ? (o = /* @__PURE__ */ (0, Y.jsx)(lr, {
|
|
21321
21328
|
"data-testid": "marimo-plugin-switch",
|
|
21322
21329
|
checked: n,
|
|
21323
21330
|
onCheckedChange: r,
|
|
@@ -21364,14 +21371,14 @@ var Pj = (e) => {
|
|
|
21364
21371
|
let b;
|
|
21365
21372
|
if (t[8] !== p || t[9] !== n) {
|
|
21366
21373
|
let e;
|
|
21367
|
-
t[11] === p ? e = t[12] : (e = (e, t) => /* @__PURE__ */ (0, Y.jsx)(
|
|
21374
|
+
t[11] === p ? e = t[12] : (e = (e, t) => /* @__PURE__ */ (0, Y.jsx)(Mn, {
|
|
21368
21375
|
value: t.toString(),
|
|
21369
21376
|
className: l(p && "w-full justify-start"),
|
|
21370
21377
|
children: E({ html: e })
|
|
21371
21378
|
}, t), t[11] = p, t[12] = e), b = n.map(e), t[8] = p, t[9] = n, t[10] = b;
|
|
21372
21379
|
} else b = t[10];
|
|
21373
21380
|
let x;
|
|
21374
|
-
t[13] !== y || t[14] !== b ? (x = /* @__PURE__ */ (0, Y.jsx)(
|
|
21381
|
+
t[13] !== y || t[14] !== b ? (x = /* @__PURE__ */ (0, Y.jsx)(An, {
|
|
21375
21382
|
className: y,
|
|
21376
21383
|
children: b
|
|
21377
21384
|
}), t[13] = y, t[14] = b, t[15] = x) : x = t[15];
|
|
@@ -21385,7 +21392,7 @@ var Pj = (e) => {
|
|
|
21385
21392
|
children: w
|
|
21386
21393
|
}), t[20] = C, t[21] = w, t[22] = T) : T = t[22];
|
|
21387
21394
|
let D;
|
|
21388
|
-
t[23] !== f || t[24] !== c || t[25] !== i || t[26] !== T || t[27] !== _ || t[28] !== x ? (D = /* @__PURE__ */ (0, Y.jsxs)(
|
|
21395
|
+
t[23] !== f || t[24] !== c || t[25] !== i || t[26] !== T || t[27] !== _ || t[28] !== x ? (D = /* @__PURE__ */ (0, Y.jsxs)(on, {
|
|
21389
21396
|
value: c,
|
|
21390
21397
|
onValueChange: f,
|
|
21391
21398
|
orientation: i,
|
|
@@ -21401,7 +21408,7 @@ var Pj = (e) => {
|
|
|
21401
21408
|
}), t[30] = r, t[31] = D, t[32] = O) : O = t[32], O;
|
|
21402
21409
|
};
|
|
21403
21410
|
function zj(e, t) {
|
|
21404
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
21411
|
+
return /* @__PURE__ */ (0, Y.jsx)(Tr, {
|
|
21405
21412
|
value: t.toString(),
|
|
21406
21413
|
children: e
|
|
21407
21414
|
}, t);
|
|
@@ -21535,7 +21542,7 @@ var Bj = class {
|
|
|
21535
21542
|
passwordHasValue: H().optional()
|
|
21536
21543
|
});
|
|
21537
21544
|
render(e) {
|
|
21538
|
-
let t = e.data.kind === "password" ? e.host.closest(`[${
|
|
21545
|
+
let t = e.data.kind === "password" ? e.host.closest(`[${yt}]`)?.getAttribute(yt) : void 0;
|
|
21539
21546
|
return /* @__PURE__ */ (0, Y.jsx)(Wj, {
|
|
21540
21547
|
...e.data,
|
|
21541
21548
|
value: e.value,
|
|
@@ -21577,7 +21584,7 @@ var Bj = class {
|
|
|
21577
21584
|
let w = C, T;
|
|
21578
21585
|
if (e.debounce === !0) {
|
|
21579
21586
|
let n = y[e.kind], r = e.minLength != null && e.minLength > 0, i;
|
|
21580
|
-
t[15] !== x || t[16] !== w || t[17] !== f || t[18] !== s || t[19] !== e.disabled || t[20] !== e.kind || t[21] !== e.maxLength || t[22] !== e.minLength || t[23] !== u || t[24] !== n || t[25] !== r || t[26] !== o ? (i = /* @__PURE__ */ (0, Y.jsx)(
|
|
21587
|
+
t[15] !== x || t[16] !== w || t[17] !== f || t[18] !== s || t[19] !== e.disabled || t[20] !== e.kind || t[21] !== e.maxLength || t[22] !== e.minLength || t[23] !== u || t[24] !== n || t[25] !== r || t[26] !== o ? (i = /* @__PURE__ */ (0, Y.jsx)(Yi, {
|
|
21581
21588
|
"data-testid": "marimo-plugin-text-input",
|
|
21582
21589
|
type: e.kind,
|
|
21583
21590
|
icon: n,
|
|
@@ -21596,7 +21603,7 @@ var Bj = class {
|
|
|
21596
21603
|
let n = y[e.kind], r = e.minLength != null && e.minLength > 0, i;
|
|
21597
21604
|
t[28] === Symbol.for("react.memo_cache_sentinel") ? (i = (e) => m(e.currentTarget.value), t[28] = i) : i = t[28];
|
|
21598
21605
|
let a;
|
|
21599
|
-
t[29] !== x || t[30] !== w || t[31] !== f || t[32] !== s || t[33] !== e.debounce || t[34] !== e.disabled || t[35] !== e.kind || t[36] !== e.maxLength || t[37] !== e.minLength || t[38] !== u || t[39] !== n || t[40] !== r || t[41] !== o ? (a = /* @__PURE__ */ (0, Y.jsx)(
|
|
21606
|
+
t[29] !== x || t[30] !== w || t[31] !== f || t[32] !== s || t[33] !== e.debounce || t[34] !== e.disabled || t[35] !== e.kind || t[36] !== e.maxLength || t[37] !== e.minLength || t[38] !== u || t[39] !== n || t[40] !== r || t[41] !== o ? (a = /* @__PURE__ */ (0, Y.jsx)(ta, {
|
|
21600
21607
|
"data-testid": "marimo-plugin-text-input",
|
|
21601
21608
|
type: e.kind,
|
|
21602
21609
|
icon: n,
|
|
@@ -21619,7 +21626,7 @@ var Bj = class {
|
|
|
21619
21626
|
let a;
|
|
21620
21627
|
t[45] === Symbol.for("react.memo_cache_sentinel") ? (a = (e) => m(e.currentTarget.value), t[45] = a) : a = t[45];
|
|
21621
21628
|
let c;
|
|
21622
|
-
t[46] !== x || t[47] !== w || t[48] !== f || t[49] !== s || t[50] !== e.disabled || t[51] !== e.kind || t[52] !== e.maxLength || t[53] !== e.minLength || t[54] !== n || t[55] !== r || t[56] !== i || t[57] !== o ? (c = /* @__PURE__ */ (0, Y.jsx)(
|
|
21629
|
+
t[46] !== x || t[47] !== w || t[48] !== f || t[49] !== s || t[50] !== e.disabled || t[51] !== e.kind || t[52] !== e.maxLength || t[53] !== e.minLength || t[54] !== n || t[55] !== r || t[56] !== i || t[57] !== o ? (c = /* @__PURE__ */ (0, Y.jsx)(Xi, {
|
|
21623
21630
|
"data-testid": "marimo-plugin-text-input",
|
|
21624
21631
|
type: e.kind,
|
|
21625
21632
|
icon: n,
|
|
@@ -21653,7 +21660,7 @@ function Gj(e, t) {
|
|
|
21653
21660
|
}
|
|
21654
21661
|
//#endregion
|
|
21655
21662
|
//#region src/plugins/impl/vega/VegaPlugin.tsx
|
|
21656
|
-
var Kj = J.lazy(() => import("./vega-component-
|
|
21663
|
+
var Kj = J.lazy(() => import("./vega-component-tFOzgarw.js")), qj = class {
|
|
21657
21664
|
tagName = "marimo-vega";
|
|
21658
21665
|
validator = W({
|
|
21659
21666
|
spec: W({}).passthrough().transform((e) => e),
|
|
@@ -21731,7 +21738,7 @@ var Kj = J.lazy(() => import("./vega-component-D0QXopU8.js")), qj = class {
|
|
|
21731
21738
|
children: i
|
|
21732
21739
|
}), t[2] = i, t[3] = s);
|
|
21733
21740
|
let c;
|
|
21734
|
-
t[4] === n ? c = t[5] : (c = /* @__PURE__ */ (0, Y.jsx)(
|
|
21741
|
+
t[4] === n ? c = t[5] : (c = /* @__PURE__ */ (0, Y.jsx)(qn, {
|
|
21735
21742
|
html: n,
|
|
21736
21743
|
alwaysSanitizeHtml: !0
|
|
21737
21744
|
}), t[4] = n, t[5] = c);
|
|
@@ -21799,13 +21806,13 @@ var Qj = class {
|
|
|
21799
21806
|
return;
|
|
21800
21807
|
}
|
|
21801
21808
|
if (n.preventDefault(), !e.lazy) {
|
|
21802
|
-
|
|
21809
|
+
ri(e.data, e.filename ?? void 0);
|
|
21803
21810
|
return;
|
|
21804
21811
|
}
|
|
21805
21812
|
r(!0);
|
|
21806
21813
|
try {
|
|
21807
21814
|
let n = await t({});
|
|
21808
|
-
|
|
21815
|
+
ri(n.data || e.data, n.filename ?? e.filename ?? void 0);
|
|
21809
21816
|
} catch (e) {
|
|
21810
21817
|
x({
|
|
21811
21818
|
title: "Failed to download",
|
|
@@ -21814,7 +21821,7 @@ var Qj = class {
|
|
|
21814
21821
|
} finally {
|
|
21815
21822
|
r(!1);
|
|
21816
21823
|
}
|
|
21817
|
-
}, a = n ? F :
|
|
21824
|
+
}, a = n ? F : sr, o = e.label ? E({ html: e.label }) : "Download";
|
|
21818
21825
|
return /* @__PURE__ */ (0, Y.jsxs)("a", {
|
|
21819
21826
|
href: e.data,
|
|
21820
21827
|
download: e.filename ?? "",
|
|
@@ -21850,7 +21857,7 @@ var Qj = class {
|
|
|
21850
21857
|
});
|
|
21851
21858
|
render({ data: e }) {
|
|
21852
21859
|
let t = e.name === void 0 ? !1 : e.name || "";
|
|
21853
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
21860
|
+
return /* @__PURE__ */ (0, Y.jsx)(mr, {
|
|
21854
21861
|
data: e.jsonData,
|
|
21855
21862
|
format: "auto",
|
|
21856
21863
|
valueTypes: e.valueTypes,
|
|
@@ -21869,7 +21876,7 @@ var Qj = class {
|
|
|
21869
21876
|
root: null,
|
|
21870
21877
|
rootMargin: "0px"
|
|
21871
21878
|
}, t[0] = o) : o = t[0];
|
|
21872
|
-
let [s, c] =
|
|
21879
|
+
let [s, c] = xr(o);
|
|
21873
21880
|
c?.isIntersecting && !i && a(!0);
|
|
21874
21881
|
let l;
|
|
21875
21882
|
t[1] !== n || t[2] !== i ? (l = (e) => i ? n({}) : (e.previous(), Promise.resolve(void 0)), t[1] = n, t[2] = i, t[3] = l) : l = t[3];
|
|
@@ -21900,7 +21907,7 @@ var Qj = class {
|
|
|
21900
21907
|
]).transform((e) => e)
|
|
21901
21908
|
});
|
|
21902
21909
|
render({ data: e }) {
|
|
21903
|
-
return e.data ? /* @__PURE__ */ (0, Y.jsx)(
|
|
21910
|
+
return e.data ? /* @__PURE__ */ (0, Y.jsx)(Ar, { message: {
|
|
21904
21911
|
data: e.data,
|
|
21905
21912
|
channel: "output",
|
|
21906
21913
|
mimetype: e.mime
|
|
@@ -21920,11 +21927,11 @@ var Qj = class {
|
|
|
21920
21927
|
themeVariables: e.data.theme_variables
|
|
21921
21928
|
});
|
|
21922
21929
|
}
|
|
21923
|
-
}, _M = (0, J.lazy)(() => import("./mermaid-
|
|
21930
|
+
}, _M = (0, J.lazy)(() => import("./mermaid-Dnzoxjt1.js").then((e) => e.t));
|
|
21924
21931
|
//#endregion
|
|
21925
21932
|
//#region src/components/editor/chrome/panels/outline/useActiveOutline.tsx
|
|
21926
21933
|
function vM() {
|
|
21927
|
-
return
|
|
21934
|
+
return va() === "edit" ? document.getElementById("App") : void 0;
|
|
21928
21935
|
}
|
|
21929
21936
|
function yM(e) {
|
|
21930
21937
|
let t = (0, X.c)(7), [n, r] = (0, J.useState)(void 0), [i, a] = (0, J.useState)(void 0), o = (0, J.useRef)(null), s = (0, J.useRef)(null), c;
|
|
@@ -21936,7 +21943,7 @@ function yM(e) {
|
|
|
21936
21943
|
let n = e.target;
|
|
21937
21944
|
e.isIntersecting ? (!s.current || n.getBoundingClientRect().top < s.current.getBoundingClientRect().top) && (s.current = n, t = !0) : n === s.current && (s.current = null, t = !0);
|
|
21938
21945
|
}), t && s.current) {
|
|
21939
|
-
let e =
|
|
21946
|
+
let e = He(s.current), t = "id" in e ? e.id : e.path;
|
|
21940
21947
|
r(t), a(l.current.get(s.current));
|
|
21941
21948
|
}
|
|
21942
21949
|
}, {
|
|
@@ -21945,7 +21952,7 @@ function yM(e) {
|
|
|
21945
21952
|
threshold: 0
|
|
21946
21953
|
}), e.forEach((t) => {
|
|
21947
21954
|
if (t) {
|
|
21948
|
-
let n =
|
|
21955
|
+
let n = He(t[0]), r = e.map(bM).filter((e) => "id" in n ? e.id === n.id : e.textContent === t[0].textContent).indexOf(t[0]);
|
|
21949
21956
|
l.current.set(t[0], r), o.current?.observe(t[0]);
|
|
21950
21957
|
}
|
|
21951
21958
|
}), () => {
|
|
@@ -21990,7 +21997,7 @@ function CM(e, t) {
|
|
|
21990
21997
|
//#endregion
|
|
21991
21998
|
//#region src/components/editor/chrome/panels/outline/floating-outline.tsx
|
|
21992
21999
|
var wM = () => {
|
|
21993
|
-
let e = (0, X.c)(19), { items: t } = rs(
|
|
22000
|
+
let e = (0, X.c)(19), { items: t } = rs(tt), n;
|
|
21994
22001
|
e[0] === t ? n = e[1] : (n = xM(t), e[0] = t, e[1] = n);
|
|
21995
22002
|
let { activeHeaderId: r, activeOccurrences: i } = yM(n), [a, o] = J.useState(!1);
|
|
21996
22003
|
if (t.length < 2) return null;
|
|
@@ -22061,7 +22068,7 @@ var wM = () => {
|
|
|
22061
22068
|
children: s
|
|
22062
22069
|
}), t[8] = o, t[9] = s, t[10] = c) : c = t[10], c;
|
|
22063
22070
|
}, DM = (e) => {
|
|
22064
|
-
let t = (0, X.c)(12), { label: n } = e, { items: r } = rs(
|
|
22071
|
+
let t = (0, X.c)(12), { label: n } = e, { items: r } = rs(tt), i;
|
|
22065
22072
|
t[0] === r ? i = t[1] : (i = xM(r), t[0] = r, t[1] = i);
|
|
22066
22073
|
let { activeHeaderId: a, activeOccurrences: o } = yM(i);
|
|
22067
22074
|
if (r.length === 0) {
|
|
@@ -22871,7 +22878,7 @@ var wM = () => {
|
|
|
22871
22878
|
let t = (0, X.c)(24), { title: n, subtitle: r, progress: i, total: a, eta: o, rate: s } = e, c = typeof i == "number" ? "items-start" : "items-center", l;
|
|
22872
22879
|
t[0] !== i || t[1] !== a ? (l = () => typeof i == "number" && a != null && a > 0 ? /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
22873
22880
|
className: "flex gap-3 text-sm text-muted-foreground items-baseline",
|
|
22874
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
22881
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Bn, { value: MM(i / a * 100) }), /* @__PURE__ */ (0, Y.jsxs)("span", {
|
|
22875
22882
|
className: "shrink-0",
|
|
22876
22883
|
children: [
|
|
22877
22884
|
i,
|
|
@@ -23133,7 +23140,7 @@ var FM = (/* @__PURE__ */ i(((e) => {
|
|
|
23133
23140
|
});
|
|
23134
23141
|
}
|
|
23135
23142
|
}, RM = (e) => {
|
|
23136
|
-
let t = (0, X.c)(
|
|
23143
|
+
let t = (0, X.c)(11), { routes: n, children: r } = e, i = J.Children.count(r);
|
|
23137
23144
|
if (i !== n.length) throw Error(`Expected ${n.length} children, but got ${i}`);
|
|
23138
23145
|
let a;
|
|
23139
23146
|
t[0] === n ? a = t[1] : (a = new IM(n), t[0] = n, t[1] = a);
|
|
@@ -23155,14 +23162,9 @@ var FM = (/* @__PURE__ */ i(((e) => {
|
|
|
23155
23162
|
return window.addEventListener("hashchange", e), window.addEventListener("popstate", e), () => {
|
|
23156
23163
|
window.removeEventListener("hashchange", e), window.removeEventListener("popstate", e);
|
|
23157
23164
|
};
|
|
23158
|
-
}, p = [d], t[6] = d, t[7] = f, t[8] = p), (0, J.useEffect)(f, p), !c)
|
|
23159
|
-
let e;
|
|
23160
|
-
return t[9] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)(Y.Fragment, {}), t[9] = e) : e = t[9], e;
|
|
23161
|
-
}
|
|
23165
|
+
}, p = [d], t[6] = d, t[7] = f, t[8] = p), (0, J.useEffect)(f, p), !c) return null;
|
|
23162
23166
|
let m = n.indexOf(c), h;
|
|
23163
|
-
t[
|
|
23164
|
-
let g = h[m], _;
|
|
23165
|
-
return t[12] === g ? _ = t[13] : (_ = /* @__PURE__ */ (0, Y.jsx)(Y.Fragment, { children: g }), t[12] = g, t[13] = _), _;
|
|
23167
|
+
return t[9] === r ? h = t[10] : (h = J.Children.toArray(r), t[9] = r, t[10] = h), h[m];
|
|
23166
23168
|
}, zM = class {
|
|
23167
23169
|
tagName = "marimo-stat";
|
|
23168
23170
|
validator = W({
|
|
@@ -23183,10 +23185,10 @@ var FM = (/* @__PURE__ */ i(((e) => {
|
|
|
23183
23185
|
}
|
|
23184
23186
|
}, BM = (e) => {
|
|
23185
23187
|
let t = (0, X.c)(31), { value: n, label: r, caption: i, bordered: a, direction: o, target_direction: s, slot: u } = e, { locale: d } = Xo(), f;
|
|
23186
|
-
t[0] !== d || t[1] !== n ? (f = () => n == null ? /* @__PURE__ */ (0, Y.jsx)("i", { children: "No value" }) : typeof n == "string" ? n : typeof n == "number" ?
|
|
23188
|
+
t[0] !== d || t[1] !== n ? (f = () => n == null ? /* @__PURE__ */ (0, Y.jsx)("i", { children: "No value" }) : typeof n == "string" ? n : typeof n == "number" ? la(n, d) : typeof n == "boolean" ? n ? "True" : "False" : String(n), t[0] = d, t[1] = n, t[2] = f) : f = t[2];
|
|
23187
23189
|
let p = f, m = o === s, h = m ? "var(--grass-8)" : "var(--red-8)", g = m ? "var(--grass-9)" : "var(--red-9)", _;
|
|
23188
23190
|
t[3] === u ? _ = t[4] : (_ = () => {
|
|
23189
|
-
let e =
|
|
23191
|
+
let e = ti(u);
|
|
23190
23192
|
if (e?.[0]) {
|
|
23191
23193
|
let { mimetype: t, data: n } = e[0];
|
|
23192
23194
|
return t !== "text/html" && c.warn(`Expected text/html, got ${t}`), E({
|
|
@@ -23255,8 +23257,8 @@ var FM = (/* @__PURE__ */ i(((e) => {
|
|
|
23255
23257
|
tex: e.host.textContent || e.host.innerHTML
|
|
23256
23258
|
});
|
|
23257
23259
|
}
|
|
23258
|
-
}, HM = Ds(async () => (await import("./katex-
|
|
23259
|
-
await import("./mhchem-
|
|
23260
|
+
}, HM = Ds(async () => (await import("./katex-BNCmKUol.js").then((e) => e.n)).default), UM = Ds(async () => {
|
|
23261
|
+
await import("./mhchem-BEc7A1or.js");
|
|
23260
23262
|
}), WM = { "\\mbox": "\\text{#1}" };
|
|
23261
23263
|
async function GM(e, t) {
|
|
23262
23264
|
let [n] = await Promise.all([HM(), UM()]);
|
|
@@ -26426,7 +26428,7 @@ var nP = (0, ZN.WidthProvider)(ZN.Responsive), rP = [0, 0], iP = "grid-drag-hand
|
|
|
26426
26428
|
t[7] === v ? (y = t[8], b = t[9]) : ({isDragging: b, ...y} = v, t[7] = v, t[8] = y, t[9] = b);
|
|
26427
26429
|
let x = !o && !f, S, C, w, T, E, D, O, k, A, j, M, N, P, F, I, L, R, ee, z, te, B, ne, re, ie, ae, oe;
|
|
26428
26430
|
if (t[10] !== i || t[11] !== h || t[12] !== y || t[13] !== u || t[14] !== x || t[15] !== c || t[16] !== b || t[17] !== o || t[18] !== n || t[19] !== a || t[20] !== r) {
|
|
26429
|
-
let e =
|
|
26431
|
+
let e = mn.keyBy(n.cells, pP), s;
|
|
26430
26432
|
t[47] !== n || t[48] !== r ? (s = (e) => (t) => {
|
|
26431
26433
|
let i = new Set(n.scrollableCells);
|
|
26432
26434
|
t ? i.add(e) : i.delete(e), r({
|
|
@@ -26474,7 +26476,7 @@ var nP = (0, ZN.WidthProvider)(ZN.Responsive), rP = [0, 0], iP = "grid-drag-hand
|
|
|
26474
26476
|
cellId: t.id,
|
|
26475
26477
|
output: t.output,
|
|
26476
26478
|
status: t.status,
|
|
26477
|
-
stale:
|
|
26479
|
+
stale: Ot(t, !1),
|
|
26478
26480
|
isScrollable: o,
|
|
26479
26481
|
side: s,
|
|
26480
26482
|
hidden: t.errored || t.interrupted || t.stopped
|
|
@@ -26550,7 +26552,7 @@ var nP = (0, ZN.WidthProvider)(ZN.Responsive), rP = [0, 0], iP = "grid-drag-hand
|
|
|
26550
26552
|
cellId: e.id,
|
|
26551
26553
|
output: e.output,
|
|
26552
26554
|
status: e.status,
|
|
26553
|
-
stale:
|
|
26555
|
+
stale: Ot(e, !1),
|
|
26554
26556
|
isScrollable: !1,
|
|
26555
26557
|
hidden: !1
|
|
26556
26558
|
}, e.id), t[130] = a, t[131] = r), me = /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [ce, /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
@@ -26608,7 +26610,7 @@ var nP = (0, ZN.WidthProvider)(ZN.Responsive), rP = [0, 0], iP = "grid-drag-hand
|
|
|
26608
26610
|
output: e.output,
|
|
26609
26611
|
isScrollable: !1,
|
|
26610
26612
|
status: e.status,
|
|
26611
|
-
stale:
|
|
26613
|
+
stale: Ot(e, !1),
|
|
26612
26614
|
hidden: !1
|
|
26613
26615
|
})
|
|
26614
26616
|
}, e.id), t[146] = n.columns, t[147] = n.rowHeight, t[148] = a, t[149] = m) : m = t[149], ue = s.map(m);
|
|
@@ -26642,7 +26644,7 @@ var nP = (0, ZN.WidthProvider)(ZN.Responsive), rP = [0, 0], iP = "grid-drag-hand
|
|
|
26642
26644
|
let h = s && "invisible", g = c ? "overflow-y-auto" : "overflow-y-hidden", _ = u === "top" && "flex items-start", v = u === "bottom" && "flex items-end", y = u === "left" && "flex justify-start", b = u === "right" && "flex justify-end", x;
|
|
26643
26645
|
t[5] !== d || t[6] !== h || t[7] !== g || t[8] !== _ || t[9] !== v || t[10] !== y || t[11] !== b ? (x = l(d, "h-full w-full p-2 overflow-x-auto", h, g, _, v, y, b), t[5] = d, t[6] = h, t[7] = g, t[8] = _, t[9] = v, t[10] = y, t[11] = b, t[12] = x) : x = t[12];
|
|
26644
26646
|
let S;
|
|
26645
|
-
t[13] !== r || t[14] !== m || t[15] !== n || t[16] !== f ? (S = /* @__PURE__ */ (0, Y.jsx)(
|
|
26647
|
+
t[13] !== r || t[14] !== m || t[15] !== n || t[16] !== f ? (S = /* @__PURE__ */ (0, Y.jsx)(Ir, {
|
|
26646
26648
|
allowExpand: !1,
|
|
26647
26649
|
output: n,
|
|
26648
26650
|
cellId: r,
|
|
@@ -26672,7 +26674,7 @@ var sP = (e) => {
|
|
|
26672
26674
|
let c;
|
|
26673
26675
|
t[4] !== n.columns || t[5] !== s ? (c = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
26674
26676
|
className: "flex flex-row items-center gap-2",
|
|
26675
|
-
children: [o, /* @__PURE__ */ (0, Y.jsx)(
|
|
26677
|
+
children: [o, /* @__PURE__ */ (0, Y.jsx)(Hi, {
|
|
26676
26678
|
"data-testid": "grid-columns-input",
|
|
26677
26679
|
id: "columns",
|
|
26678
26680
|
value: n.columns,
|
|
@@ -26697,7 +26699,7 @@ var sP = (e) => {
|
|
|
26697
26699
|
let d;
|
|
26698
26700
|
t[11] !== n.rowHeight || t[12] !== u ? (d = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
26699
26701
|
className: "flex flex-row items-center gap-2",
|
|
26700
|
-
children: [l, /* @__PURE__ */ (0, Y.jsx)(
|
|
26702
|
+
children: [l, /* @__PURE__ */ (0, Y.jsx)(Hi, {
|
|
26701
26703
|
"data-testid": "grid-row-height-input",
|
|
26702
26704
|
id: "rowHeight",
|
|
26703
26705
|
value: n.rowHeight,
|
|
@@ -26722,7 +26724,7 @@ var sP = (e) => {
|
|
|
26722
26724
|
let m;
|
|
26723
26725
|
t[18] !== n.maxWidth || t[19] !== p ? (m = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
26724
26726
|
className: "flex flex-row items-center gap-2",
|
|
26725
|
-
children: [f, /* @__PURE__ */ (0, Y.jsx)(
|
|
26727
|
+
children: [f, /* @__PURE__ */ (0, Y.jsx)(Hi, {
|
|
26726
26728
|
"data-testid": "grid-max-width-input",
|
|
26727
26729
|
id: "maxWidth",
|
|
26728
26730
|
value: n.maxWidth,
|
|
@@ -26748,7 +26750,7 @@ var sP = (e) => {
|
|
|
26748
26750
|
let _;
|
|
26749
26751
|
t[25] !== n.bordered || t[26] !== g ? (_ = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
26750
26752
|
className: "flex flex-row items-center gap-2",
|
|
26751
|
-
children: [h, /* @__PURE__ */ (0, Y.jsx)(
|
|
26753
|
+
children: [h, /* @__PURE__ */ (0, Y.jsx)(lr, {
|
|
26752
26754
|
"data-testid": "grid-bordered-switch",
|
|
26753
26755
|
id: "lock",
|
|
26754
26756
|
checked: n.bordered,
|
|
@@ -26765,7 +26767,7 @@ var sP = (e) => {
|
|
|
26765
26767
|
let y;
|
|
26766
26768
|
t[29] !== i || t[30] !== a ? (y = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
26767
26769
|
className: "flex flex-row items-center gap-2",
|
|
26768
|
-
children: [v, /* @__PURE__ */ (0, Y.jsx)(
|
|
26770
|
+
children: [v, /* @__PURE__ */ (0, Y.jsx)(lr, {
|
|
26769
26771
|
"data-testid": "grid-lock-switch",
|
|
26770
26772
|
id: "lock",
|
|
26771
26773
|
checked: i,
|
|
@@ -26815,32 +26817,32 @@ var lP = (e) => {
|
|
|
26815
26817
|
let g = c === "side", _;
|
|
26816
26818
|
t[4] === u ? _ = t[5] : (_ = (e) => u(e ? "side" : void 0), t[4] = u, t[5] = _);
|
|
26817
26819
|
let v;
|
|
26818
|
-
t[6] === d ? v = t[7] : (v = /* @__PURE__ */ (0, Y.jsx)(
|
|
26820
|
+
t[6] === d ? v = t[7] : (v = /* @__PURE__ */ (0, Y.jsx)(qi, {
|
|
26819
26821
|
asChild: !0,
|
|
26820
26822
|
children: d ? /* @__PURE__ */ (0, Y.jsx)(d, { className: "h-4 w-4 opacity-60 hover:opacity-100" }) : /* @__PURE__ */ (0, Y.jsx)(Tu, { className: "h-4 w-4 opacity-60 hover:opacity-100" })
|
|
26821
26823
|
}), t[6] = d, t[7] = v);
|
|
26822
26824
|
let y;
|
|
26823
26825
|
t[8] !== a || t[9] !== i ? (y = Es.entries(dP).map((e) => {
|
|
26824
26826
|
let [t, n] = e;
|
|
26825
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
26827
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Zi, {
|
|
26826
26828
|
onSelect: () => a(t),
|
|
26827
26829
|
children: [
|
|
26828
26830
|
/* @__PURE__ */ (0, Y.jsx)(n, { className: "h-4 w-3 mr-2" }),
|
|
26829
26831
|
/* @__PURE__ */ (0, Y.jsx)("span", {
|
|
26830
26832
|
className: "flex-1",
|
|
26831
|
-
children:
|
|
26833
|
+
children: Si.startCase(t)
|
|
26832
26834
|
}),
|
|
26833
|
-
t === i && /* @__PURE__ */ (0, Y.jsx)(
|
|
26835
|
+
t === i && /* @__PURE__ */ (0, Y.jsx)(fi, { className: "h-4 w-4" })
|
|
26834
26836
|
]
|
|
26835
26837
|
}, t);
|
|
26836
26838
|
}), t[8] = a, t[9] = i, t[10] = y) : y = t[10];
|
|
26837
26839
|
let b;
|
|
26838
|
-
t[11] === y ? b = t[12] : (b = /* @__PURE__ */ (0, Y.jsx)(
|
|
26840
|
+
t[11] === y ? b = t[12] : (b = /* @__PURE__ */ (0, Y.jsx)(ea, {
|
|
26839
26841
|
side: "bottom",
|
|
26840
26842
|
children: y
|
|
26841
26843
|
}), t[11] = y, t[12] = b);
|
|
26842
26844
|
let x;
|
|
26843
|
-
t[13] !== g || t[14] !== _ || t[15] !== v || t[16] !== b ? (x = /* @__PURE__ */ (0, Y.jsxs)(
|
|
26845
|
+
t[13] !== g || t[14] !== _ || t[15] !== v || t[16] !== b ? (x = /* @__PURE__ */ (0, Y.jsxs)(oa, {
|
|
26844
26846
|
open: g,
|
|
26845
26847
|
onOpenChange: _,
|
|
26846
26848
|
children: [v, b]
|
|
@@ -26848,7 +26850,7 @@ var lP = (e) => {
|
|
|
26848
26850
|
let S = c === "scroll", C;
|
|
26849
26851
|
t[18] === u ? C = t[19] : (C = (e) => u(e ? "scroll" : void 0), t[18] = u, t[19] = C);
|
|
26850
26852
|
let w;
|
|
26851
|
-
t[20] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ (0, Y.jsx)(
|
|
26853
|
+
t[20] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ (0, Y.jsx)(qi, {
|
|
26852
26854
|
asChild: !0,
|
|
26853
26855
|
children: /* @__PURE__ */ (0, Y.jsx)(Qu, { className: "h-4 w-4 opacity-60 hover:opacity-100" })
|
|
26854
26856
|
}), t[20] = w) : w = t[20];
|
|
@@ -26860,30 +26862,30 @@ var lP = (e) => {
|
|
|
26860
26862
|
children: "Scrollable"
|
|
26861
26863
|
}), t[24] = E) : E = t[24];
|
|
26862
26864
|
let D;
|
|
26863
|
-
t[25] !== o || t[26] !== s ? (D = /* @__PURE__ */ (0, Y.jsx)(
|
|
26865
|
+
t[25] !== o || t[26] !== s ? (D = /* @__PURE__ */ (0, Y.jsx)(lr, {
|
|
26864
26866
|
"data-testid": "grid-scrollable-switch",
|
|
26865
26867
|
checked: o,
|
|
26866
26868
|
size: "sm",
|
|
26867
26869
|
onCheckedChange: s
|
|
26868
26870
|
}), t[25] = o, t[26] = s, t[27] = D) : D = t[27];
|
|
26869
26871
|
let O;
|
|
26870
|
-
t[28] !== T || t[29] !== D ? (O = /* @__PURE__ */ (0, Y.jsx)(
|
|
26872
|
+
t[28] !== T || t[29] !== D ? (O = /* @__PURE__ */ (0, Y.jsx)(ea, {
|
|
26871
26873
|
side: "bottom",
|
|
26872
|
-
children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
26874
|
+
children: /* @__PURE__ */ (0, Y.jsxs)(Zi, {
|
|
26873
26875
|
onSelect: T,
|
|
26874
26876
|
children: [E, D]
|
|
26875
26877
|
})
|
|
26876
26878
|
}), t[28] = T, t[29] = D, t[30] = O) : O = t[30];
|
|
26877
26879
|
let k;
|
|
26878
|
-
t[31] !== S || t[32] !== C || t[33] !== O ? (k = /* @__PURE__ */ (0, Y.jsxs)(
|
|
26880
|
+
t[31] !== S || t[32] !== C || t[33] !== O ? (k = /* @__PURE__ */ (0, Y.jsxs)(oa, {
|
|
26879
26881
|
open: S,
|
|
26880
26882
|
onOpenChange: C,
|
|
26881
26883
|
children: [w, O]
|
|
26882
26884
|
}), t[31] = S, t[32] = C, t[33] = O, t[34] = k) : k = t[34];
|
|
26883
26885
|
let A;
|
|
26884
|
-
t[35] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ (0, Y.jsx)(
|
|
26886
|
+
t[35] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ (0, Y.jsx)(Hr, { className: l(iP, "cursor-move", "h-4 w-4 opacity-60 hover:opacity-100") }), t[35] = A) : A = t[35];
|
|
26885
26887
|
let j;
|
|
26886
|
-
t[36] === r ? j = t[37] : (j = /* @__PURE__ */ (0, Y.jsx)(
|
|
26888
|
+
t[36] === r ? j = t[37] : (j = /* @__PURE__ */ (0, Y.jsx)(pi, {
|
|
26887
26889
|
className: "h-4 w-4 opacity-60 hover:opacity-100",
|
|
26888
26890
|
onClick: () => r()
|
|
26889
26891
|
}), t[36] = r, t[37] = j);
|
|
@@ -26975,7 +26977,7 @@ var gP = {
|
|
|
26975
26977
|
};
|
|
26976
26978
|
},
|
|
26977
26979
|
serializeLayout: (e, t) => {
|
|
26978
|
-
let n =
|
|
26980
|
+
let n = mn.keyBy(e.cells, (e) => e.i), r = t.map((t) => {
|
|
26979
26981
|
let r = n.get(t.id);
|
|
26980
26982
|
if (!r) return { position: null };
|
|
26981
26983
|
let i = { position: [
|
|
@@ -27054,10 +27056,10 @@ var yP = (e) => {
|
|
|
27054
27056
|
//#endregion
|
|
27055
27057
|
//#region src/components/editor/cell/useDeleteCell.tsx
|
|
27056
27058
|
function bP() {
|
|
27057
|
-
let e = (0, X.c)(4), { deleteCell: t, undoDeleteCell: n } =
|
|
27059
|
+
let e = (0, X.c)(4), { deleteCell: t, undoDeleteCell: n } = ot(), { sendDeleteCell: r } = kt(), i;
|
|
27058
27060
|
return e[0] !== t || e[1] !== r || e[2] !== n ? (i = (e) => {
|
|
27059
|
-
if (os.get(
|
|
27060
|
-
let { cellId: i } = e, a = (os.get(
|
|
27061
|
+
if (os.get(lt)) return;
|
|
27062
|
+
let { cellId: i } = e, a = (os.get(Ze).cellData[i]?.code ?? "").trim() === "";
|
|
27061
27063
|
if (t({ cellId: i }), r({ cellId: i }).catch(() => {
|
|
27062
27064
|
n();
|
|
27063
27065
|
}), !a) {
|
|
@@ -29530,7 +29532,7 @@ var ZL = (e) => {
|
|
|
29530
29532
|
//#region src/components/slides/minimap.tsx
|
|
29531
29533
|
function QL(e) {
|
|
29532
29534
|
if (!e || e === "slide") return null;
|
|
29533
|
-
let { label: t, description: n, Icon: r } =
|
|
29535
|
+
let { label: t, description: n, Icon: r } = or[e];
|
|
29534
29536
|
return {
|
|
29535
29537
|
label: t,
|
|
29536
29538
|
description: n,
|
|
@@ -29587,7 +29589,7 @@ function cR() {
|
|
|
29587
29589
|
return /* @__PURE__ */ new Set();
|
|
29588
29590
|
}
|
|
29589
29591
|
var lR = ({ cells: e, thumbnailWidth: t, canReorder: n, activeCellId: r, skippedIds: i, noOutputIds: a, slideTypes: o, onSlideClick: s }) => {
|
|
29590
|
-
let l =
|
|
29592
|
+
let l = it(), { moveCellToIndex: u, createNewCell: d } = ot(), f = bP(), p = (0, J.useRef)(null), m = sR(p), [h, g] = (0, J.useState)(null), [_, v] = (0, J.useState)(null), y = nR(t), b = (e, t) => {
|
|
29591
29593
|
d({
|
|
29592
29594
|
cellId: e,
|
|
29593
29595
|
before: t,
|
|
@@ -29671,7 +29673,7 @@ var lR = ({ cells: e, thumbnailWidth: t, canReorder: n, activeCellId: r, skipped
|
|
|
29671
29673
|
ref: p,
|
|
29672
29674
|
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
29673
29675
|
className: "text-xs text-gray-500 flex items-center gap-0.5",
|
|
29674
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
29676
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Ct, { className: "h-3 w-3" }), "Reordering is not supported in multi-column mode"]
|
|
29675
29677
|
}), e.map((e, t) => /* @__PURE__ */ (0, Y.jsx)(fR, {
|
|
29676
29678
|
cell: e,
|
|
29677
29679
|
dimensions: y,
|
|
@@ -29771,31 +29773,31 @@ var lR = ({ cells: e, thumbnailWidth: t, canReorder: n, activeCellId: r, skipped
|
|
|
29771
29773
|
let j = A;
|
|
29772
29774
|
if (!f && !u) return j;
|
|
29773
29775
|
let M;
|
|
29774
|
-
t[46] === j ? M = t[47] : (M = /* @__PURE__ */ (0, Y.jsx)(
|
|
29776
|
+
t[46] === j ? M = t[47] : (M = /* @__PURE__ */ (0, Y.jsx)(Kn, {
|
|
29775
29777
|
asChild: !0,
|
|
29776
29778
|
children: j
|
|
29777
29779
|
}), t[46] = j, t[47] = M);
|
|
29778
29780
|
let N;
|
|
29779
|
-
t[48] === f ? N = t[49] : (N = f && /* @__PURE__ */ (0, Y.jsxs)(
|
|
29781
|
+
t[48] === f ? N = t[49] : (N = f && /* @__PURE__ */ (0, Y.jsxs)(ai, {
|
|
29780
29782
|
onSelect: f,
|
|
29781
29783
|
children: [/* @__PURE__ */ (0, Y.jsx)(Ha, { className: "mr-2 h-3.5 w-3.5" }), "Add cell"]
|
|
29782
29784
|
}), t[48] = f, t[49] = N);
|
|
29783
29785
|
let F;
|
|
29784
|
-
t[50] === Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ (0, Y.jsx)(
|
|
29786
|
+
t[50] === Symbol.for("react.memo_cache_sentinel") ? (F = /* @__PURE__ */ (0, Y.jsx)(sn, {}), t[50] = F) : F = t[50];
|
|
29785
29787
|
let I;
|
|
29786
|
-
t[51] === u ? I = t[52] : (I = u && /* @__PURE__ */ (0, Y.jsxs)(
|
|
29788
|
+
t[51] === u ? I = t[52] : (I = u && /* @__PURE__ */ (0, Y.jsxs)(ai, {
|
|
29787
29789
|
variant: "danger",
|
|
29788
29790
|
onSelect: u,
|
|
29789
29791
|
children: [/* @__PURE__ */ (0, Y.jsx)(P, { className: "mr-2 h-3.5 w-3.5" }), "Delete cell"]
|
|
29790
29792
|
}), t[51] = u, t[52] = I);
|
|
29791
29793
|
let L;
|
|
29792
|
-
t[53] !== N || t[54] !== I ? (L = /* @__PURE__ */ (0, Y.jsxs)(
|
|
29794
|
+
t[53] !== N || t[54] !== I ? (L = /* @__PURE__ */ (0, Y.jsxs)(Rn, { children: [
|
|
29793
29795
|
N,
|
|
29794
29796
|
F,
|
|
29795
29797
|
I
|
|
29796
29798
|
] }), t[53] = N, t[54] = I, t[55] = L) : L = t[55];
|
|
29797
29799
|
let R;
|
|
29798
|
-
return t[56] !== M || t[57] !== L ? (R = /* @__PURE__ */ (0, Y.jsxs)(
|
|
29800
|
+
return t[56] !== M || t[57] !== L ? (R = /* @__PURE__ */ (0, Y.jsxs)(Dn, { children: [M, L] }), t[56] = M, t[57] = L, t[58] = R) : R = t[58], R;
|
|
29799
29801
|
}, pR = (e) => {
|
|
29800
29802
|
let t = (0, X.c)(10), { position: n, onInsert: r } = e, i = n === "below" ? "bottom-0 translate-y-1/2" : "top-0 -translate-y-1/2", a;
|
|
29801
29803
|
t[0] === i ? a = t[1] : (a = l("absolute left-0 right-0 z-30 flex h-3 items-center justify-center", "opacity-0 transition-opacity hover:opacity-80 focus-visible:opacity-100 focus:outline-hidden", i), t[0] = i, t[1] = a);
|
|
@@ -29855,11 +29857,11 @@ var lR = ({ cells: e, thumbnailWidth: t, canReorder: n, activeCellId: r, skipped
|
|
|
29855
29857
|
width: b / S,
|
|
29856
29858
|
height: x / S
|
|
29857
29859
|
},
|
|
29858
|
-
children: y ? /* @__PURE__ */ (0, Y.jsx)(hR, { code: n.code }) : /* @__PURE__ */ (0, Y.jsx)(
|
|
29860
|
+
children: y ? /* @__PURE__ */ (0, Y.jsx)(hR, { code: n.code }) : /* @__PURE__ */ (0, Y.jsx)(Yr, {
|
|
29859
29861
|
cellId: n.id,
|
|
29860
29862
|
status: n.status,
|
|
29861
29863
|
output: n.output,
|
|
29862
|
-
stale:
|
|
29864
|
+
stale: Ot(n, !1)
|
|
29863
29865
|
})
|
|
29864
29866
|
}), t[30] = n, t[31] = x, t[32] = y, t[33] = S, t[34] = k, t[35] = b, t[36] = P) : P = t[36];
|
|
29865
29867
|
let F;
|
|
@@ -29932,12 +29934,12 @@ function bR(e) {
|
|
|
29932
29934
|
}
|
|
29933
29935
|
//#endregion
|
|
29934
29936
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
29935
|
-
var xR = J.lazy(() => import("./reveal-component-
|
|
29936
|
-
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = rs(
|
|
29937
|
+
var xR = J.lazy(() => import("./reveal-component-DUPORxps.js")), SR = (e) => {
|
|
29938
|
+
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = rs(Ca), s = a === "read" || o, c = rs(_t) > 1, [l, u] = (0, J.useState)(null), d;
|
|
29937
29939
|
t[0] !== i || t[1] !== n ? (d = vP(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
29938
29940
|
let { slideCells: f, skippedIds: p, noOutputIds: m, slideTypes: h, startCellIndex: g } = d, _;
|
|
29939
29941
|
t[3] !== l || t[4] !== f || t[5] !== g ? (_ = l ? f.findIndex((e) => e.id === l) : g, t[3] = l, t[4] = f, t[5] = g, t[6] = _) : _ = t[6];
|
|
29940
|
-
let v = _, y = v === -1 ? g : v, b =
|
|
29942
|
+
let v = _, y = v === -1 ? g : v, b = Vr(o, window.location.search), x = s && l == null && window.location.hash.startsWith("#/"), S = b || x ? void 0 : y, C;
|
|
29941
29943
|
t[7] === f ? C = t[8] : (C = (e) => {
|
|
29942
29944
|
let t = f[e];
|
|
29943
29945
|
t && u(t.id);
|
|
@@ -30139,7 +30141,7 @@ var jR = (e) => {
|
|
|
30139
30141
|
let m;
|
|
30140
30142
|
t[12] === n ? m = t[13] : (m = () => n("bt"), t[12] = n, t[13] = m);
|
|
30141
30143
|
let h;
|
|
30142
|
-
t[14] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, Y.jsx)(
|
|
30144
|
+
t[14] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, Y.jsx)(ht, {
|
|
30143
30145
|
fontSize: 36,
|
|
30144
30146
|
className: "w-5 h-5"
|
|
30145
30147
|
}), t[14] = h) : h = t[14];
|
|
@@ -30158,7 +30160,7 @@ var jR = (e) => {
|
|
|
30158
30160
|
let v;
|
|
30159
30161
|
t[17] === n ? v = t[18] : (v = () => n("help"), t[17] = n, t[18] = v);
|
|
30160
30162
|
let y;
|
|
30161
|
-
t[19] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ (0, Y.jsx)(
|
|
30163
|
+
t[19] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ (0, Y.jsx)(pa, {
|
|
30162
30164
|
fontSize: 36,
|
|
30163
30165
|
className: "w-5 h-5"
|
|
30164
30166
|
}), t[19] = y) : y = t[19];
|
|
@@ -30220,13 +30222,13 @@ function MR(e = !0) {
|
|
|
30220
30222
|
//#endregion
|
|
30221
30223
|
//#region src/components/editor/actions/name-cell-input.tsx
|
|
30222
30224
|
var NR = (e) => {
|
|
30223
|
-
let t = (0, X.c)(12), { value: n, cellId: r, className: i } = e, { updateCellName: a } =
|
|
30225
|
+
let t = (0, X.c)(12), { value: n, cellId: r, className: i } = e, { updateCellName: a } = ot(), o;
|
|
30224
30226
|
t[0] !== r || t[1] !== a ? (o = (e) => a({
|
|
30225
30227
|
cellId: r,
|
|
30226
30228
|
name: e
|
|
30227
30229
|
}), t[0] = r, t[1] = a, t[2] = o) : o = t[2];
|
|
30228
30230
|
let s = PR(n, o);
|
|
30229
|
-
if (
|
|
30231
|
+
if (we(n)) return null;
|
|
30230
30232
|
let c = s.focusing ? "" : "text-ellipsis", u;
|
|
30231
30233
|
t[3] !== i || t[4] !== c ? (u = l("outline-hidden border hover:border-cyan-500/40 focus:border-cyan-500/40", c, i), t[3] = i, t[4] = c, t[5] = u) : u = t[5];
|
|
30232
30234
|
let d;
|
|
@@ -30248,28 +30250,28 @@ function PR(e, t) {
|
|
|
30248
30250
|
let n = (0, X.c)(13), [r, i] = (0, J.useState)(e), [a, o] = (0, J.useState)(!1), s;
|
|
30249
30251
|
n[0] !== t || n[1] !== e ? (s = (n) => {
|
|
30250
30252
|
if (n !== e) {
|
|
30251
|
-
if (!n ||
|
|
30253
|
+
if (!n || we(n)) {
|
|
30252
30254
|
t(n);
|
|
30253
30255
|
return;
|
|
30254
30256
|
}
|
|
30255
|
-
t(
|
|
30257
|
+
t(Fe(n, mt()));
|
|
30256
30258
|
}
|
|
30257
30259
|
}, n[0] = t, n[1] = e, n[2] = s) : s = n[2];
|
|
30258
30260
|
let c = s, l;
|
|
30259
|
-
n[3] === r ? l = n[4] : (l =
|
|
30261
|
+
n[3] === r ? l = n[4] : (l = we(r) ? "" : r, n[3] = r, n[4] = l);
|
|
30260
30262
|
let u;
|
|
30261
30263
|
n[5] === Symbol.for("react.memo_cache_sentinel") ? (u = (e) => {
|
|
30262
|
-
let t = e.target.value, n =
|
|
30264
|
+
let t = e.target.value, n = Oe(t);
|
|
30263
30265
|
i(n);
|
|
30264
30266
|
}, n[5] = u) : u = n[5];
|
|
30265
30267
|
let d;
|
|
30266
30268
|
n[6] === c ? d = n[7] : (d = (e) => {
|
|
30267
30269
|
if (e.target instanceof HTMLInputElement) {
|
|
30268
30270
|
let t = e.target.value;
|
|
30269
|
-
c(
|
|
30271
|
+
c(Oe(t));
|
|
30270
30272
|
} else if (e.target instanceof HTMLSpanElement) {
|
|
30271
30273
|
let t = e.target.innerText.trim();
|
|
30272
|
-
c(
|
|
30274
|
+
c(Oe(t)), e.target.scrollLeft = 0, o(!1);
|
|
30273
30275
|
}
|
|
30274
30276
|
}, n[6] = c, n[7] = d);
|
|
30275
30277
|
let f;
|
|
@@ -30290,7 +30292,7 @@ function FR(e) {
|
|
|
30290
30292
|
}
|
|
30291
30293
|
//#endregion
|
|
30292
30294
|
//#region src/components/editor/output/useWrapText.ts
|
|
30293
|
-
var IR =
|
|
30295
|
+
var IR = ge("marimo:console:wrapText", !1, St);
|
|
30294
30296
|
function LR() {
|
|
30295
30297
|
let e = (0, X.c)(3), [t, n] = as(IR), r;
|
|
30296
30298
|
return e[0] !== n || e[1] !== t ? (r = {
|
|
@@ -30315,13 +30317,13 @@ var zR = (e) => {
|
|
|
30315
30317
|
value: s,
|
|
30316
30318
|
setValue: c
|
|
30317
30319
|
}, t[0] = s, t[1] = u);
|
|
30318
|
-
let d = kR(u), { consoleOutputs: f, stale: p, interrupted: m, cellName: h, cellId: g, onSubmitDebugger: v, onClear: y, onRefactorWithAI: b, className: x } = e, S = RR(f), C = S.length > 0, T = MR(C), E =
|
|
30320
|
+
let d = kR(u), { consoleOutputs: f, stale: p, interrupted: m, cellName: h, cellId: g, onSubmitDebugger: v, onClear: y, onRefactorWithAI: b, className: x } = e, S = RR(f), C = S.length > 0, T = MR(C), E = zn(n, C), D;
|
|
30319
30321
|
if (t[2] === Symbol.for("react.memo_cache_sentinel") ? (D = () => {
|
|
30320
30322
|
let e = n.current;
|
|
30321
30323
|
if (!e) return;
|
|
30322
30324
|
let t = e.scrollHeight - e.clientHeight;
|
|
30323
30325
|
t - e.scrollTop < 120 && (e.scrollTop = t);
|
|
30324
|
-
}, t[2] = D) : D = t[2], (0, J.useLayoutEffect)(D), !C &&
|
|
30326
|
+
}, t[2] = D) : D = t[2], (0, J.useLayoutEffect)(D), !C && we(h)) return null;
|
|
30325
30327
|
let O, k, A, j, M, N, P, F, I, L;
|
|
30326
30328
|
if (t[3] !== g || t[4] !== x || t[5] !== S || t[6] !== C || t[7] !== d || t[8] !== m || t[9] !== a || t[10] !== E || t[11] !== y || t[12] !== b || t[13] !== v || t[14] !== T || t[15] !== o || t[16] !== i || t[17] !== p || t[18] !== s || t[19] !== r) {
|
|
30327
30329
|
let e = S.toReversed(), u = e.some(WR), f = e.findIndex(GR), h;
|
|
@@ -30342,7 +30344,7 @@ var zR = (e) => {
|
|
|
30342
30344
|
className: "p-1 rounded bg-transparent text-muted-foreground data-hovered:text-foreground data-selected:text-foreground",
|
|
30343
30345
|
isSelected: r,
|
|
30344
30346
|
onChange: i,
|
|
30345
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
30347
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Nr, { className: "h-4 w-4" })
|
|
30346
30348
|
}) })
|
|
30347
30349
|
}),
|
|
30348
30350
|
(E || a) && /* @__PURE__ */ (0, Y.jsx)(_, {
|
|
@@ -30353,10 +30355,10 @@ var zR = (e) => {
|
|
|
30353
30355
|
variant: null,
|
|
30354
30356
|
children: a ? /* @__PURE__ */ (0, Y.jsx)(me, {
|
|
30355
30357
|
content: "Collapse output",
|
|
30356
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
30358
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Lr, { className: "h-4 w-4" })
|
|
30357
30359
|
}) : /* @__PURE__ */ (0, Y.jsx)(me, {
|
|
30358
30360
|
content: "Expand output",
|
|
30359
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
30361
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Xr, { className: "h-4 w-4 " })
|
|
30360
30362
|
})
|
|
30361
30363
|
})
|
|
30362
30364
|
]
|
|
@@ -30383,7 +30385,7 @@ var zR = (e) => {
|
|
|
30383
30385
|
interrupted: m
|
|
30384
30386
|
}, t);
|
|
30385
30387
|
}
|
|
30386
|
-
return /* @__PURE__ */ (0, Y.jsx)(J.Fragment, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
30388
|
+
return /* @__PURE__ */ (0, Y.jsx)(J.Fragment, { children: /* @__PURE__ */ (0, Y.jsx)(Ar, {
|
|
30387
30389
|
cellId: g,
|
|
30388
30390
|
onRefactorWithAI: b,
|
|
30389
30391
|
message: e,
|
|
@@ -30419,7 +30421,7 @@ var zR = (e) => {
|
|
|
30419
30421
|
let m = o ? "password" : "text", h;
|
|
30420
30422
|
t[2] === r ? h = t[3] : (h = (e) => r(e.target.value), t[2] = r, t[3] = h);
|
|
30421
30423
|
let g;
|
|
30422
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, Y.jsx)(
|
|
30424
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, Y.jsx)(na, { className: "w-5 h-5" }), t[4] = g) : g = t[4];
|
|
30423
30425
|
let _;
|
|
30424
30426
|
t[5] !== f || t[6] !== d || t[7] !== u || t[8] !== c || t[9] !== r || t[10] !== n ? (_ = (e) => {
|
|
30425
30427
|
if (e.key === "ArrowUp") {
|
|
@@ -30433,7 +30435,7 @@ var zR = (e) => {
|
|
|
30433
30435
|
e.key === "Enter" && !e.shiftKey && (n && f(n), c(n), r(""), e.preventDefault(), e.stopPropagation()), e.key === "Enter" && e.metaKey && (e.preventDefault(), e.stopPropagation());
|
|
30434
30436
|
}, t[5] = f, t[6] = d, t[7] = u, t[8] = c, t[9] = r, t[10] = n, t[11] = _) : _ = t[11];
|
|
30435
30437
|
let v;
|
|
30436
|
-
t[12] !== m || t[13] !== h || t[14] !== _ || t[15] !== n ? (v = /* @__PURE__ */ (0, Y.jsx)(
|
|
30438
|
+
t[12] !== m || t[13] !== h || t[14] !== _ || t[15] !== n ? (v = /* @__PURE__ */ (0, Y.jsx)(Xi, {
|
|
30437
30439
|
"data-testid": "console-input",
|
|
30438
30440
|
"data-stdin-blocking": !0,
|
|
30439
30441
|
type: m,
|
|
@@ -30467,7 +30469,7 @@ var zR = (e) => {
|
|
|
30467
30469
|
t[2] !== o || t[3] !== i || t[4] !== r || t[5] !== s ? (l = !i && !s && /* @__PURE__ */ (0, Y.jsxs)("span", {
|
|
30468
30470
|
className: "inline-flex items-center gap-1 text-(--sky-11)",
|
|
30469
30471
|
"aria-label": "stdin response",
|
|
30470
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
30472
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(na, { className: "w-4 h-4 shrink-0 opacity-70" }), o ? r : /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
30471
30473
|
className: "italic opacity-70",
|
|
30472
30474
|
children: "(empty)"
|
|
30473
30475
|
})]
|
|
@@ -30477,7 +30479,7 @@ var zR = (e) => {
|
|
|
30477
30479
|
className: "flex gap-2 items-center",
|
|
30478
30480
|
children: [c, l]
|
|
30479
30481
|
}), t[7] = c, t[8] = l, t[9] = u) : u = t[9], u;
|
|
30480
|
-
}, UR = (e) => e ? /* @__PURE__ */ (0, Y.jsx)(
|
|
30482
|
+
}, UR = (e) => e ? /* @__PURE__ */ (0, Y.jsx)(oi, { text: e }) : null;
|
|
30481
30483
|
function WR(e) {
|
|
30482
30484
|
return typeof e.data == "string" && e.data.includes("(Pdb)");
|
|
30483
30485
|
}
|
|
@@ -30492,7 +30494,7 @@ function qR(e) {
|
|
|
30492
30494
|
}
|
|
30493
30495
|
//#endregion
|
|
30494
30496
|
//#region src/core/cells/readonly-code-display.ts
|
|
30495
|
-
var JR = new
|
|
30497
|
+
var JR = new Xe(), YR = new wt();
|
|
30496
30498
|
function XR(e) {
|
|
30497
30499
|
let t = e.trim();
|
|
30498
30500
|
return t ? JR.isSupported(t) ? {
|
|
@@ -30512,7 +30514,7 @@ function XR(e) {
|
|
|
30512
30514
|
//#endregion
|
|
30513
30515
|
//#region src/core/export/layout.ts
|
|
30514
30516
|
async function ZR() {
|
|
30515
|
-
return await
|
|
30517
|
+
return await Be(), Dz();
|
|
30516
30518
|
}
|
|
30517
30519
|
//#endregion
|
|
30518
30520
|
//#region src/core/static/virtual-file-tracker.ts
|
|
@@ -30553,13 +30555,13 @@ function ez(e) {
|
|
|
30553
30555
|
//#endregion
|
|
30554
30556
|
//#region src/core/static/download-html.ts
|
|
30555
30557
|
async function tz(e) {
|
|
30556
|
-
let t =
|
|
30558
|
+
let t = Ve(), { includeCode: n } = e, r = await t.exportAsHTML({
|
|
30557
30559
|
download: !0,
|
|
30558
30560
|
includeCode: n,
|
|
30559
30561
|
files: $R.INSTANCE.filenames(),
|
|
30560
30562
|
layout: await ZR()
|
|
30561
30563
|
});
|
|
30562
|
-
|
|
30564
|
+
ar(r);
|
|
30563
30565
|
}
|
|
30564
30566
|
//#endregion
|
|
30565
30567
|
//#region src/components/editor/renderers/vertical-layout/useDelayVisibility.ts
|
|
@@ -30575,7 +30577,7 @@ function rz(e, t) {
|
|
|
30575
30577
|
i(!1);
|
|
30576
30578
|
}, n);
|
|
30577
30579
|
return () => clearTimeout(r);
|
|
30578
|
-
}, n[0] = t, n[1] = e, n[2] = a) : a = n[2],
|
|
30580
|
+
}, n[0] = t, n[1] = e, n[2] = a) : a = n[2], di(a);
|
|
30579
30581
|
let o;
|
|
30580
30582
|
return n[3] === r ? o = n[4] : (o = { invisible: r }, n[3] = r, n[4] = o), o;
|
|
30581
30583
|
}
|
|
@@ -30584,10 +30586,10 @@ function rz(e, t) {
|
|
|
30584
30586
|
function iz({ showCodeInRunModePreference: e, kioskMode: t }) {
|
|
30585
30587
|
if (!e) return !1;
|
|
30586
30588
|
let n = new URLSearchParams(window.location.search).get(ss.showCode);
|
|
30587
|
-
return n === null ?
|
|
30589
|
+
return n === null ? ga() || da() || t : n === "true";
|
|
30588
30590
|
}
|
|
30589
30591
|
function az(e) {
|
|
30590
|
-
|
|
30592
|
+
ga() && ba((t) => {
|
|
30591
30593
|
t.set(ss.showCode, String(e));
|
|
30592
30594
|
});
|
|
30593
30595
|
}
|
|
@@ -30599,7 +30601,7 @@ function oz(e) {
|
|
|
30599
30601
|
}), [...t.entries()].toSorted(([e], [t]) => e - t);
|
|
30600
30602
|
}
|
|
30601
30603
|
function sz(e, t) {
|
|
30602
|
-
let n = new
|
|
30604
|
+
let n = new Te().isSupported(e), r = t !== null && !L(t);
|
|
30603
30605
|
return n && r || e.trim() === "";
|
|
30604
30606
|
}
|
|
30605
30607
|
//#endregion
|
|
@@ -30620,7 +30622,7 @@ var cz = (e) => {
|
|
|
30620
30622
|
children: h
|
|
30621
30623
|
}), t[12] = s, t[13] = h, t[14] = g) : g = t[14], g;
|
|
30622
30624
|
}, lz = (e) => {
|
|
30623
|
-
let t = (0, X.c)(33), { cells: n, appConfig: r, mode: i } = e, { invisible: a } = rz(n.length, i), o = rs(
|
|
30625
|
+
let t = (0, X.c)(33), { cells: n, appConfig: r, mode: i } = e, { invisible: a } = rz(n.length, i), o = rs(Ca), s = rs(Gs), [c] = ps(), u = rs(Us), d;
|
|
30624
30626
|
t[0] !== o || t[1] !== u ? (d = () => iz({
|
|
30625
30627
|
showCodeInRunModePreference: u,
|
|
30626
30628
|
kioskMode: o
|
|
@@ -30703,13 +30705,13 @@ var cz = (e) => {
|
|
|
30703
30705
|
]
|
|
30704
30706
|
}), t[28] = r, t[29] = a, t[30] = w, t[31] = T, t[32] = D) : D = t[32], D;
|
|
30705
30707
|
}, uz = (e) => {
|
|
30706
|
-
let t = (0, X.c)(26), { canShowCode: n, showCode: r, onToggleShowCode: i } = e, { readCode: a } =
|
|
30708
|
+
let t = (0, X.c)(26), { canShowCode: n, showCode: r, onToggleShowCode: i } = e, { readCode: a } = kt(), o = mz, s = hz, c;
|
|
30707
30709
|
t[0] === a ? c = t[1] : (c = async () => {
|
|
30708
30710
|
let e = await a();
|
|
30709
|
-
|
|
30711
|
+
Qr(new Blob([e.contents], { type: "text/plain" }), ln.toPY(document.title));
|
|
30710
30712
|
}, t[0] = a, t[1] = c);
|
|
30711
30713
|
let u = c, d;
|
|
30712
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (d =
|
|
30714
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = ga(), t[2] = d) : d = t[2];
|
|
30713
30715
|
let f = d, p;
|
|
30714
30716
|
if (t[3] !== n || t[4] !== u || t[5] !== i || t[6] !== r) {
|
|
30715
30717
|
if (p = [], n) {
|
|
@@ -30723,9 +30725,9 @@ var cz = (e) => {
|
|
|
30723
30725
|
children: "Show code"
|
|
30724
30726
|
}), t[8] = e, t[9] = n) : (e = t[8], n = t[9]);
|
|
30725
30727
|
let a;
|
|
30726
|
-
t[10] === r ? a = t[11] : (a = r && /* @__PURE__ */ (0, Y.jsx)(
|
|
30728
|
+
t[10] === r ? a = t[11] : (a = r && /* @__PURE__ */ (0, Y.jsx)(fi, { className: "h-4 w-4" }), t[10] = r, t[11] = a);
|
|
30727
30729
|
let o;
|
|
30728
|
-
t[12] !== i || t[13] !== a ? (o = /* @__PURE__ */ (0, Y.jsxs)(
|
|
30730
|
+
t[12] !== i || t[13] !== a ? (o = /* @__PURE__ */ (0, Y.jsxs)(Zi, {
|
|
30729
30731
|
onSelect: i,
|
|
30730
30732
|
"data-testid": "notebook-action-show-code",
|
|
30731
30733
|
children: [
|
|
@@ -30735,11 +30737,11 @@ var cz = (e) => {
|
|
|
30735
30737
|
]
|
|
30736
30738
|
}, "show-code"), t[12] = i, t[13] = a, t[14] = o) : o = t[14];
|
|
30737
30739
|
let s;
|
|
30738
|
-
t[15] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, Y.jsx)(
|
|
30740
|
+
t[15] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, Y.jsx)(aa, {}, "show-code-separator"), t[15] = s) : s = t[15], p.push(o, s);
|
|
30739
30741
|
}
|
|
30740
30742
|
if (!f) {
|
|
30741
30743
|
let e;
|
|
30742
|
-
if (t[16] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsxs)(
|
|
30744
|
+
if (t[16] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsxs)(Zi, {
|
|
30743
30745
|
onSelect: s,
|
|
30744
30746
|
"data-testid": "notebook-action-download-html",
|
|
30745
30747
|
children: [/* @__PURE__ */ (0, Y.jsx)(Uu, {
|
|
@@ -30749,22 +30751,22 @@ var cz = (e) => {
|
|
|
30749
30751
|
}), "Download as HTML"]
|
|
30750
30752
|
}, "download-html"), t[16] = e) : e = t[16], p.push(e), n) {
|
|
30751
30753
|
let e;
|
|
30752
|
-
t[17] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)(
|
|
30754
|
+
t[17] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)(Or, {
|
|
30753
30755
|
className: "mr-2",
|
|
30754
30756
|
size: 14,
|
|
30755
30757
|
strokeWidth: 1.5
|
|
30756
30758
|
}), t[17] = e) : e = t[17];
|
|
30757
30759
|
let n;
|
|
30758
|
-
t[18] === u ? n = t[19] : (n = /* @__PURE__ */ (0, Y.jsxs)(
|
|
30760
|
+
t[18] === u ? n = t[19] : (n = /* @__PURE__ */ (0, Y.jsxs)(Zi, {
|
|
30759
30761
|
onSelect: u,
|
|
30760
30762
|
"data-testid": "notebook-action-download-python",
|
|
30761
30763
|
children: [e, "Download notebook source"]
|
|
30762
30764
|
}, "download-python"), t[18] = u, t[19] = n), p.push(n);
|
|
30763
30765
|
}
|
|
30764
30766
|
let r;
|
|
30765
|
-
t[20] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ (0, Y.jsx)(
|
|
30767
|
+
t[20] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ (0, Y.jsx)(aa, {}, "download-separator"), t[20] = r) : r = t[20];
|
|
30766
30768
|
let i;
|
|
30767
|
-
t[21] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ (0, Y.jsxs)(
|
|
30769
|
+
t[21] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ (0, Y.jsxs)(Zi, {
|
|
30768
30770
|
onSelect: o,
|
|
30769
30771
|
"data-testid": "notebook-action-download-png",
|
|
30770
30772
|
children: [/* @__PURE__ */ (0, Y.jsx)(qu, {
|
|
@@ -30778,23 +30780,23 @@ var cz = (e) => {
|
|
|
30778
30780
|
} else p = t[7];
|
|
30779
30781
|
if (p.length === 0) return null;
|
|
30780
30782
|
let m;
|
|
30781
|
-
t[22] === Symbol.for("react.memo_cache_sentinel") ? (m = l("right-0 top-0 z-50 m-4 print:hidden flex gap-2",
|
|
30783
|
+
t[22] === Symbol.for("react.memo_cache_sentinel") ? (m = l("right-0 top-0 z-50 m-4 print:hidden flex gap-2", ga() ? "absolute" : "fixed"), t[22] = m) : m = t[22];
|
|
30782
30784
|
let h;
|
|
30783
|
-
t[23] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, Y.jsx)(
|
|
30785
|
+
t[23] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, Y.jsx)(qi, {
|
|
30784
30786
|
asChild: !0,
|
|
30785
30787
|
children: /* @__PURE__ */ (0, Y.jsx)(_, {
|
|
30786
30788
|
variant: "secondary",
|
|
30787
30789
|
size: "xs",
|
|
30788
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
30790
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Wr, { className: "w-4 h-4" })
|
|
30789
30791
|
})
|
|
30790
30792
|
}), t[23] = h) : h = t[23];
|
|
30791
30793
|
let g;
|
|
30792
30794
|
return t[24] === p ? g = t[25] : (g = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
30793
30795
|
"data-testid": "notebook-actions-dropdown",
|
|
30794
30796
|
className: m,
|
|
30795
|
-
children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
30797
|
+
children: /* @__PURE__ */ (0, Y.jsxs)(oa, {
|
|
30796
30798
|
modal: !1,
|
|
30797
|
-
children: [h, /* @__PURE__ */ (0, Y.jsx)(
|
|
30799
|
+
children: [h, /* @__PURE__ */ (0, Y.jsx)(ea, {
|
|
30798
30800
|
align: "end",
|
|
30799
30801
|
className: "print:hidden w-[220px]",
|
|
30800
30802
|
children: p
|
|
@@ -30803,7 +30805,7 @@ var cz = (e) => {
|
|
|
30803
30805
|
}), t[24] = p, t[25] = g), g;
|
|
30804
30806
|
}, dz = (0, J.memo)((e) => {
|
|
30805
30807
|
let t = (0, X.c)(57), { output: n, consoleOutputs: r, cellOutputArea: i, cellId: a, status: o, stopped: s, errored: c, config: u, interrupted: d, staleInputs: f, runStartTimestamp: p, code: m, showCode: h, mode: g, name: _, kiosk: v, showErrorTracebacks: y } = e, b = (0, J.useRef)(null), x;
|
|
30806
|
-
t[0] !== d || t[1] !== n || t[2] !== p || t[3] !== f || t[4] !== o ? (x =
|
|
30808
|
+
t[0] !== d || t[1] !== n || t[2] !== p || t[3] !== f || t[4] !== o ? (x = Ot({
|
|
30807
30809
|
status: o,
|
|
30808
30810
|
output: n,
|
|
30809
30811
|
interrupted: d,
|
|
@@ -30814,8 +30816,8 @@ var cz = (e) => {
|
|
|
30814
30816
|
t[6] === o ? C = t[7] : (C = ye(o), t[6] = o, t[7] = C);
|
|
30815
30817
|
let w = C, T = v && g !== "present", E;
|
|
30816
30818
|
if (t[8] !== m || t[9] !== c || t[10] !== T || t[11] !== h || t[12] !== s) {
|
|
30817
|
-
let e = new
|
|
30818
|
-
E = l("marimo-cell", "hover-actions-parent empty:invisible", !h && !T ?
|
|
30819
|
+
let e = new Te().isSupported(m);
|
|
30820
|
+
E = l("marimo-cell", "hover-actions-parent empty:invisible", !h && !T ? Se({
|
|
30819
30821
|
errored: c,
|
|
30820
30822
|
stopped: s
|
|
30821
30823
|
}) : {
|
|
@@ -30827,7 +30829,7 @@ var cz = (e) => {
|
|
|
30827
30829
|
let D = E;
|
|
30828
30830
|
if (g === "read" && h || T) {
|
|
30829
30831
|
let e;
|
|
30830
|
-
t[14] !== a || t[15] !== w || t[16] !== n || t[17] !== S ? (e = /* @__PURE__ */ (0, Y.jsx)(
|
|
30832
|
+
t[14] !== a || t[15] !== w || t[16] !== n || t[17] !== S ? (e = /* @__PURE__ */ (0, Y.jsx)(Ir, {
|
|
30831
30833
|
allowExpand: !0,
|
|
30832
30834
|
output: n,
|
|
30833
30835
|
className: ms.outputArea,
|
|
@@ -30840,7 +30842,7 @@ var cz = (e) => {
|
|
|
30840
30842
|
let c = s, l;
|
|
30841
30843
|
t[22] !== m || t[23] !== c ? (l = c ? null : XR(m), t[22] = m, t[23] = c, t[24] = l) : l = t[24];
|
|
30842
30844
|
let f = l, p;
|
|
30843
|
-
t[25] !== a || t[26] !== _ ? (p =
|
|
30845
|
+
t[25] !== a || t[26] !== _ ? (p = Kr(a, _), t[25] = a, t[26] = _, t[27] = p) : p = t[27];
|
|
30844
30846
|
let h = i === "above" && o, g;
|
|
30845
30847
|
t[28] !== u || t[29] !== f ? (g = f && /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
30846
30848
|
className: "tray",
|
|
@@ -30874,7 +30876,7 @@ var cz = (e) => {
|
|
|
30874
30876
|
]
|
|
30875
30877
|
}), t[37] = D, t[38] = v, t[39] = y, t[40] = p, t[41] = h, t[42] = g, t[43] = x) : x = t[43], x;
|
|
30876
30878
|
}
|
|
30877
|
-
if (
|
|
30879
|
+
if (Pe({
|
|
30878
30880
|
errored: c,
|
|
30879
30881
|
interrupted: d,
|
|
30880
30882
|
stopped: s,
|
|
@@ -30882,9 +30884,9 @@ var cz = (e) => {
|
|
|
30882
30884
|
showErrorTracebacks: y
|
|
30883
30885
|
})) return null;
|
|
30884
30886
|
let O;
|
|
30885
|
-
t[44] !== a || t[45] !== _ ? (O =
|
|
30887
|
+
t[44] !== a || t[45] !== _ ? (O = Kr(a, _), t[44] = a, t[45] = _, t[46] = O) : O = t[46];
|
|
30886
30888
|
let k = g === "edit", A;
|
|
30887
|
-
t[47] !== a || t[48] !== w || t[49] !== n || t[50] !== S || t[51] !== k ? (A = /* @__PURE__ */ (0, Y.jsx)(
|
|
30889
|
+
t[47] !== a || t[48] !== w || t[49] !== n || t[50] !== S || t[51] !== k ? (A = /* @__PURE__ */ (0, Y.jsx)(Ir, {
|
|
30888
30890
|
allowExpand: k,
|
|
30889
30891
|
output: n,
|
|
30890
30892
|
className: ms.outputArea,
|
|
@@ -30917,10 +30919,10 @@ function pz(e) {
|
|
|
30917
30919
|
}
|
|
30918
30920
|
async function mz() {
|
|
30919
30921
|
let e = document.getElementById("App");
|
|
30920
|
-
e && await
|
|
30922
|
+
e && await ni({
|
|
30921
30923
|
element: e,
|
|
30922
30924
|
filename: document.title,
|
|
30923
|
-
prepare:
|
|
30925
|
+
prepare: tr
|
|
30924
30926
|
});
|
|
30925
30927
|
}
|
|
30926
30928
|
async function hz() {
|
|
@@ -30972,7 +30974,7 @@ function Sz(e, t) {
|
|
|
30972
30974
|
selectedLayout: t
|
|
30973
30975
|
};
|
|
30974
30976
|
}
|
|
30975
|
-
var { valueAtom: Cz, useActions: wz } =
|
|
30977
|
+
var { valueAtom: Cz, useActions: wz } = ci(xz, {
|
|
30976
30978
|
setLayoutView: Sz,
|
|
30977
30979
|
setLayoutData: ({ pendingLayout: e, ...t }, n) => ({
|
|
30978
30980
|
...t,
|
|
@@ -31012,11 +31014,11 @@ function Ez({ state: e, plugin: t, cells: n }) {
|
|
|
31012
31014
|
}) : t.getInitialLayout(n));
|
|
31013
31015
|
}
|
|
31014
31016
|
function Dz() {
|
|
31015
|
-
let e =
|
|
31017
|
+
let e = Je(), t = os.get(Cz), { selectedLayout: n } = t;
|
|
31016
31018
|
if (n === "vertical") return null;
|
|
31017
31019
|
let r = _z.find((e) => e.type === n);
|
|
31018
31020
|
if (r === void 0) return c.error(`Unknown layout type: ${n}`), null;
|
|
31019
|
-
let i =
|
|
31021
|
+
let i = Ce(e), a = Ez({
|
|
31020
31022
|
state: t,
|
|
31021
31023
|
plugin: r,
|
|
31022
31024
|
cells: i
|
|
@@ -31032,7 +31034,7 @@ function Oz(e) {
|
|
|
31032
31034
|
let { codes: t, names: n, configs: r, cell_ids: i, last_executed_code: a, last_execution_time: o } = e, s = a || {}, c = o || {};
|
|
31033
31035
|
return t.map((e, t) => {
|
|
31034
31036
|
let a = i[t], o = s[a];
|
|
31035
|
-
return
|
|
31037
|
+
return Dt({
|
|
31036
31038
|
id: a,
|
|
31037
31039
|
code: e,
|
|
31038
31040
|
edited: o ? o !== e : !1,
|
|
@@ -31072,7 +31074,7 @@ function jz(e, t) {
|
|
|
31072
31074
|
return;
|
|
31073
31075
|
}
|
|
31074
31076
|
let { objectIds: y, values: b } = Az(), x = g ? Object.fromEntries(n.map((e) => [e.id, e.code])) : void 0;
|
|
31075
|
-
|
|
31077
|
+
Ve().sendInstantiate({
|
|
31076
31078
|
objectIds: y,
|
|
31077
31079
|
values: b,
|
|
31078
31080
|
autoRun: r,
|
|
@@ -31323,10 +31325,10 @@ function Qz(e) {
|
|
|
31323
31325
|
return null;
|
|
31324
31326
|
}
|
|
31325
31327
|
function $z(e) {
|
|
31326
|
-
return
|
|
31328
|
+
return Ge(e) ? e.schemaVersion === 1 && typeof e.appId == "string" && (e.dependencies === void 0 || Array.isArray(e.dependencies) && e.dependencies.every((e) => typeof e == "string")) && Array.isArray(e.cells) && e.cells.every(eB) : !1;
|
|
31327
31329
|
}
|
|
31328
31330
|
function eB(e) {
|
|
31329
|
-
return
|
|
31331
|
+
return Ge(e) ? typeof e.cellId == "string" && typeof e.code == "string" && typeof e.outputHtml == "string" && typeof e.outputMimetype == "string" && typeof e.reactive == "boolean" && typeof e.displayCode == "boolean" && typeof e.displayOutput == "boolean" : !1;
|
|
31330
31332
|
}
|
|
31331
31333
|
//#endregion
|
|
31332
31334
|
//#region src/core/islands/components/IslandControls.tsx
|
|
@@ -31346,7 +31348,7 @@ var tB = (e) => {
|
|
|
31346
31348
|
children: a
|
|
31347
31349
|
}), t[3] = a, t[4] = n, t[5] = o) : o = t[5], o;
|
|
31348
31350
|
}, nB = (e) => {
|
|
31349
|
-
let t = (0, X.c)(18), { cellId: n, codeCallback: r, visible: i } = e, { sendRun: a } =
|
|
31351
|
+
let t = (0, X.c)(18), { cellId: n, codeCallback: r, visible: i } = e, { sendRun: a } = kt(), o;
|
|
31350
31352
|
t[0] === r ? o = t[1] : (o = () => {
|
|
31351
31353
|
S(r());
|
|
31352
31354
|
}, t[0] = r, t[1] = o);
|
|
@@ -31420,7 +31422,7 @@ var aB = (e) => {
|
|
|
31420
31422
|
let t = (0, X.c)(19), { cellId: n, codeCallback: r, alwaysShowRun: i, children: a } = e, o = rB(i), s = (0, J.useRef)(null), c;
|
|
31421
31423
|
t[0] === n ? c = t[1] : (c = (e) => e.cellRuntime[n], t[0] = n, t[1] = c);
|
|
31422
31424
|
let l = c, u;
|
|
31423
|
-
t[2] === l ? u = t[3] : (u =
|
|
31425
|
+
t[2] === l ? u = t[3] : (u = et(Ze, l), t[2] = l, t[3] = u);
|
|
31424
31426
|
let d = rs(u), f = rs(Ks);
|
|
31425
31427
|
if (oB(s, d?.status ?? "idle"), !f || !d?.output) {
|
|
31426
31428
|
let e;
|
|
@@ -31435,7 +31437,7 @@ var aB = (e) => {
|
|
|
31435
31437
|
return t[6] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)("div", { ref: s }), t[6] = e) : e = t[6], e;
|
|
31436
31438
|
}
|
|
31437
31439
|
let p;
|
|
31438
|
-
t[7] === d.output ? p = t[8] : (p = /* @__PURE__ */ (0, Y.jsx)(
|
|
31440
|
+
t[7] === d.output ? p = t[8] : (p = /* @__PURE__ */ (0, Y.jsx)(Ar, { message: d.output }), t[7] = d.output, t[8] = p);
|
|
31439
31441
|
let m;
|
|
31440
31442
|
t[9] === d ? m = t[10] : (m = /* @__PURE__ */ (0, Y.jsx)(sB, { state: d }), t[9] = d, t[10] = m);
|
|
31441
31443
|
let h;
|
|
@@ -31510,7 +31512,7 @@ var sB = (e) => {
|
|
|
31510
31512
|
return Yz(this);
|
|
31511
31513
|
}
|
|
31512
31514
|
getCellIdFromIndex(e) {
|
|
31513
|
-
let { cellIds: t } = os.get(
|
|
31515
|
+
let { cellIds: t } = os.get(Ze);
|
|
31514
31516
|
return t.inOrderIds.at(e);
|
|
31515
31517
|
}
|
|
31516
31518
|
connectedCallback() {
|
|
@@ -31524,7 +31526,7 @@ var sB = (e) => {
|
|
|
31524
31526
|
};
|
|
31525
31527
|
syncCellIdsSubscription() {
|
|
31526
31528
|
if (this.isReactive) {
|
|
31527
|
-
this.unsubscribeCellIds ??= os.sub(
|
|
31529
|
+
this.unsubscribeCellIds ??= os.sub(pt, () => {
|
|
31528
31530
|
this.runtimeCellId = this.cellId, this.renderIsland();
|
|
31529
31531
|
});
|
|
31530
31532
|
return;
|
|
@@ -31537,7 +31539,7 @@ var sB = (e) => {
|
|
|
31537
31539
|
code: r,
|
|
31538
31540
|
output: t
|
|
31539
31541
|
});
|
|
31540
|
-
let i = (this.querySelector(e.editorTagName)?.parentElement)?.getAttribute(
|
|
31542
|
+
let i = (this.querySelector(e.editorTagName)?.parentElement)?.getAttribute(je);
|
|
31541
31543
|
return {
|
|
31542
31544
|
html: t,
|
|
31543
31545
|
codeCallback: n && i ? () => {
|
|
@@ -31596,7 +31598,7 @@ function pB() {
|
|
|
31596
31598
|
//#region src/core/islands/bootstrap.ts
|
|
31597
31599
|
async function mB(e) {
|
|
31598
31600
|
let t = e.store || os, n = e.root || document, r = e.bridge;
|
|
31599
|
-
t.set(
|
|
31601
|
+
t.set(be, r), t.set(ma, "read"), t.set(Ws, null), e.autoInitializePlugins !== !1 && YM();
|
|
31600
31602
|
let i = Array.from(n.querySelectorAll(yu.ISLAND));
|
|
31601
31603
|
if (i.length === 0) {
|
|
31602
31604
|
c.log("No islands found, skipping initialization");
|
|
@@ -31604,8 +31606,8 @@ async function mB(e) {
|
|
|
31604
31606
|
}
|
|
31605
31607
|
c.log(`Initializing ${i.length} island(s)`);
|
|
31606
31608
|
for (let e of i) e.classList.add(Cu.NAMESPACE);
|
|
31607
|
-
let a =
|
|
31608
|
-
t.set(
|
|
31609
|
+
let a = bt((e) => {
|
|
31610
|
+
t.set(Ze, (t) => dt(t, e));
|
|
31609
31611
|
});
|
|
31610
31612
|
t.sub(Js, () => {
|
|
31611
31613
|
let e = t.get(Js), r = n.querySelectorAll(yu.ISLAND);
|
|
@@ -31624,7 +31626,7 @@ async function mB(e) {
|
|
|
31624
31626
|
}
|
|
31625
31627
|
function hB(e, t, n, r) {
|
|
31626
31628
|
try {
|
|
31627
|
-
let i =
|
|
31629
|
+
let i = Ae(e);
|
|
31628
31630
|
switch (c.debug("Islands received message:", i.op), i.op) {
|
|
31629
31631
|
case "banner":
|
|
31630
31632
|
case "missing-package-alert":
|
|
@@ -31710,7 +31712,7 @@ function hB(e, t, n, r) {
|
|
|
31710
31712
|
return;
|
|
31711
31713
|
case "consumer-capabilities": return;
|
|
31712
31714
|
default:
|
|
31713
|
-
|
|
31715
|
+
mi(i);
|
|
31714
31716
|
return;
|
|
31715
31717
|
}
|
|
31716
31718
|
} catch (e) {
|
|
@@ -31969,12 +31971,12 @@ var MB = class {
|
|
|
31969
31971
|
store;
|
|
31970
31972
|
root;
|
|
31971
31973
|
session;
|
|
31972
|
-
sessionReady = new
|
|
31974
|
+
sessionReady = new fa();
|
|
31973
31975
|
nextSessionGeneration = 0;
|
|
31974
31976
|
activeSessionGenerations = /* @__PURE__ */ new Set();
|
|
31975
31977
|
appTransition = Promise.resolve();
|
|
31976
|
-
workerReady = new
|
|
31977
|
-
initialized = new
|
|
31978
|
+
workerReady = new fa();
|
|
31979
|
+
initialized = new fa();
|
|
31978
31980
|
constructor(e = {}) {
|
|
31979
31981
|
this.store = e.store || os, this.root = e.root || document;
|
|
31980
31982
|
try {
|
|
@@ -32017,7 +32019,7 @@ var MB = class {
|
|
|
32017
32019
|
appId: n.id,
|
|
32018
32020
|
sessionGeneration: ++this.nextSessionGeneration
|
|
32019
32021
|
}, a = this.session, o = t && a !== void 0;
|
|
32020
|
-
this.activeSessionGenerations.add(r.sessionGeneration), o && this.store.set(
|
|
32022
|
+
this.activeSessionGenerations.add(r.sessionGeneration), o && this.store.set(Ze, Et()), (t || !a) && (t && this.sessionReady.status !== "pending" && (this.sessionReady = new fa()), this.session = {
|
|
32021
32023
|
...r,
|
|
32022
32024
|
code: t ? e : void 0
|
|
32023
32025
|
});
|
|
@@ -32035,7 +32037,7 @@ var MB = class {
|
|
|
32035
32037
|
t?.code === void 0 || e && t.appId !== e || (this.activeSessionGenerations.delete(t.sessionGeneration), await this.rpc.proxy.request.stopSession({
|
|
32036
32038
|
appId: t.appId,
|
|
32037
32039
|
sessionGeneration: t.sessionGeneration
|
|
32038
|
-
}), this.store.set(Ws, null), this.session = void 0, this.sessionReady = new
|
|
32040
|
+
}), this.store.set(Ws, null), this.session = void 0, this.sessionReady = new fa(), this.store.set(Ze, Et()));
|
|
32039
32041
|
});
|
|
32040
32042
|
}
|
|
32041
32043
|
enqueueAppTransition(e) {
|
|
@@ -32051,7 +32053,7 @@ var MB = class {
|
|
|
32051
32053
|
sendComponentValues = async (e) => (await this.putControlRequest({
|
|
32052
32054
|
type: "update-ui-element",
|
|
32053
32055
|
...e,
|
|
32054
|
-
token:
|
|
32056
|
+
token: he()
|
|
32055
32057
|
}), null);
|
|
32056
32058
|
sendInstantiate = async () => null;
|
|
32057
32059
|
sendFunctionRequest = async (e) => (await this.putControlRequest({
|