@lunora/studio 1.0.0-alpha.29 → 1.0.0-alpha.30

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.
Files changed (165) hide show
  1. package/dist/index.js +28 -28
  2. package/dist/mount.js +1 -1
  3. package/dist/{packem_shared/ApiTab-vo8uhE29.js → packem_chunks/ApiTab.js} +5 -5
  4. package/dist/{packem_shared/AuditPanel-CBjYR6S5.js → packem_chunks/AuditPanel.js} +12 -12
  5. package/dist/{packem_shared/ExportImportPanel-DtDEy4OD.js → packem_chunks/ExportImportPanel.js} +10 -10
  6. package/dist/{packem_shared/FileBrowser-DqLRjqsM.js → packem_chunks/FileBrowser.js} +15 -15
  7. package/dist/{packem_shared/FunctionRunner-BmRkCvT4.js → packem_chunks/FunctionRunner.js} +10 -10
  8. package/dist/{packem_shared/FunctionStatsPanel-Bi3kyQvu.js → packem_chunks/FunctionStatsPanel.js} +13 -13
  9. package/dist/{packem_shared/HealthPanel-C7IPO6Ts.js → packem_chunks/HealthPanel.js} +12 -12
  10. package/dist/{packem_shared/InsightsPanel-BD29GXXd.js → packem_chunks/InsightsPanel.js} +11 -11
  11. package/dist/{packem_shared/LogsPanel-2JhE1qep.js → packem_chunks/LogsPanel.js} +13 -13
  12. package/dist/{packem_shared/MailPanel-DwNsuFJC.js → packem_chunks/MailPanel.js} +10 -10
  13. package/dist/{packem_shared/metrics-panel-3FSfzgEX.js → packem_chunks/MetricsPanel.js} +17 -284
  14. package/dist/{packem_shared/MigrationsPanel-Z1DmSSzf.js → packem_chunks/MigrationsPanel.js} +16 -16
  15. package/dist/{packem_shared/PitrPanel-3mec0LTF.js → packem_chunks/PitrPanel.js} +9 -9
  16. package/dist/{packem_shared/SchemaViewer-nxDV7dZJ.js → packem_chunks/SchemaViewer.js} +15 -15
  17. package/dist/{packem_shared/SecurityAdvisorPanel-5tYrJdvn.js → packem_chunks/SecurityAdvisorPanel.js} +4 -4
  18. package/dist/{packem_shared/SettingsPanel-SijRekVc.js → packem_chunks/SettingsPanel.js} +7 -7
  19. package/dist/{packem_shared/sql-editor-panel-DBuIpCXk.js → packem_chunks/SqlEditorPanel.js} +12 -252
  20. package/dist/{packem_shared/table-editor-7iSgi3te.js → packem_chunks/TableEditor.js} +7 -101
  21. package/dist/packem_chunks/analytics-panel.js +261 -0
  22. package/dist/packem_chunks/auth-config-panel.js +179 -0
  23. package/dist/packem_chunks/auth-sessions-panel.js +175 -0
  24. package/dist/packem_chunks/dashboards-panel.js +779 -0
  25. package/dist/packem_chunks/fanout-panel.js +481 -0
  26. package/dist/packem_chunks/flags-panel.js +176 -0
  27. package/dist/packem_chunks/kv-browser.js +1896 -0
  28. package/dist/packem_chunks/log-drains-panel.js +273 -0
  29. package/dist/packem_chunks/organizations-panel.js +670 -0
  30. package/dist/packem_chunks/payments-panel.js +185 -0
  31. package/dist/packem_chunks/permissions-panel.js +804 -0
  32. package/dist/packem_chunks/queues-panel.js +147 -0
  33. package/dist/packem_chunks/rls-panel.js +313 -0
  34. package/dist/packem_chunks/schedule-panel.js +831 -0
  35. package/dist/packem_chunks/sparkline.js +79 -0
  36. package/dist/packem_chunks/storage-rules-panel.js +138 -0
  37. package/dist/packem_chunks/subscriptions-panel.js +236 -0
  38. package/dist/packem_chunks/users-panel.js +1265 -0
  39. package/dist/packem_chunks/vector-browser.js +281 -0
  40. package/dist/packem_chunks/workflows-panel.js +562 -0
  41. package/dist/packem_shared/{ApiDocsPanel-BSSgtcVf.js → ApiDocsPanel-B6u_wnz-.js} +1 -1
  42. package/dist/packem_shared/{ApiReferencePanel-D24xOjCw.js → ApiReferencePanel-Drz4UO0a.js} +2 -1
  43. package/dist/packem_shared/{CommandPalette-L-CuSRUc.js → CommandPalette-B5BertvU.js} +1 -1
  44. package/dist/packem_shared/{DataBrowser-DBKOIVKS.js → DataBrowser-ANTHLWWh.js} +6 -5
  45. package/dist/packem_shared/{GlobalDataBrowser-DOjhvhKa.js → GlobalDataBrowser-CjgTG_wa.js} +4 -4
  46. package/dist/packem_shared/{HomePanel-dJIkHY_i.js → HomePanel-c2FodE9t.js} +4 -4
  47. package/dist/packem_shared/{OpenRpcReferencePanel-Dq0yyVWz.js → OpenRpcReferencePanel-CspFdbUT.js} +2 -1
  48. package/dist/packem_shared/{ScheduledJobs--Z9GTmKb.js → ScheduledJobs-BEJXtsBn.js} +2 -2
  49. package/dist/packem_shared/Studio-CVTtA_sB.js +16 -0
  50. package/dist/packem_shared/{StudioApp-wxioPfiP.js → StudioApp-BSYV2fz6.js} +1 -1
  51. package/dist/packem_shared/{bar-chart-CzJAgqkp.js → bar-chart-Bb__F5-u.js} +1 -1
  52. package/dist/packem_shared/browser-storage-d03UsV7v.js +249 -0
  53. package/dist/packem_shared/{cf-links-2cktDedA.js → cf-links-BZfRdxSE.js} +1 -1
  54. package/dist/packem_shared/{data-grid-CrapHxR-.js → data-grid-Dsg6nRjo.js} +1 -1
  55. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +96 -0
  56. package/dist/packem_shared/{grid-features-DnTbXXNb.js → grid-features-D7nNzBYm.js} +4 -99
  57. package/dist/packem_shared/{home-panel-VdQI_8oX.js → home-panel-aOR_drVv.js} +24 -87
  58. package/dist/packem_shared/{internal-CvMZCVd6.js → internal-FcNZ3beb.js} +1 -1
  59. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +100 -0
  60. package/dist/packem_shared/{reference-view-DVyk5kXj.js → reference-view-Doy1XlQq.js} +4 -44
  61. package/dist/packem_shared/select-UkNYCT3s.js +273 -0
  62. package/dist/packem_shared/skeleton-CGhL0p20.js +45 -0
  63. package/dist/packem_shared/{sparkline-10dG-_f0.js → sparkline-KgMPHS4u.js} +1 -1
  64. package/dist/packem_shared/studio-dMTJ-kRR.js +3987 -0
  65. package/dist/packem_shared/{table-list-sidebar-BbSgfLJ2.js → table-list-sidebar-VMo0ftxD.js} +1 -1
  66. package/dist/packem_shared/{use-admin-query-CFl5GUg_.js → use-admin-query-BViPA3US.js} +2 -2
  67. package/dist/packem_shared/use-auth-capabilities-BHkoBnbZ.js +32 -0
  68. package/dist/standalone/chunk-2DS7JLWL.js +13 -0
  69. package/dist/standalone/chunk-2K47A3P6.js +1 -0
  70. package/dist/standalone/chunk-2NGUNNGW.js +1 -0
  71. package/dist/standalone/chunk-2PDQ4KZ6.js +1 -0
  72. package/dist/standalone/chunk-3BP4BTLR.js +4 -0
  73. package/dist/standalone/chunk-3OA7PECS.js +6 -0
  74. package/dist/standalone/chunk-4QHKBC77.js +1 -0
  75. package/dist/standalone/chunk-57LYXHXH.js +1 -0
  76. package/dist/standalone/chunk-5NSZVXCS.js +1 -0
  77. package/dist/standalone/chunk-5OIBXYZM.js +1 -0
  78. package/dist/standalone/chunk-63XKJQTQ.js +1 -0
  79. package/dist/standalone/chunk-6RC6L33K.js +4 -0
  80. package/dist/standalone/chunk-6VTGE3WJ.js +1 -0
  81. package/dist/standalone/chunk-7PBZKXYA.js +1 -0
  82. package/dist/standalone/chunk-7POIIWC5.js +3 -0
  83. package/dist/standalone/chunk-7RYIQKZA.js +1 -0
  84. package/dist/standalone/chunk-7TJJXVSE.js +1 -0
  85. package/dist/standalone/chunk-AB6QGMBF.js +1 -0
  86. package/dist/standalone/chunk-AHILM3ZP.js +1 -0
  87. package/dist/standalone/chunk-AQGOX5DK.js +1 -0
  88. package/dist/standalone/chunk-ASLGNHAX.js +1 -0
  89. package/dist/standalone/chunk-BHTPZS7L.js +4 -0
  90. package/dist/standalone/chunk-BJGBHGK3.js +1 -0
  91. package/dist/standalone/chunk-D7HKX4DI.js +1 -0
  92. package/dist/standalone/chunk-DGWTR4G7.js +1 -0
  93. package/dist/standalone/chunk-DSX53PBM.js +1 -0
  94. package/dist/standalone/chunk-DV2MNASX.js +1 -0
  95. package/dist/standalone/chunk-DWDILV2E.js +1 -0
  96. package/dist/standalone/chunk-E7AVZZKO.js +1 -0
  97. package/dist/standalone/chunk-EGJX34WM.js +1 -0
  98. package/dist/standalone/chunk-FCR3HKFV.js +1 -0
  99. package/dist/standalone/chunk-FKO3HO6I.js +4 -0
  100. package/dist/standalone/chunk-FQKNJSRA.js +76 -0
  101. package/dist/standalone/chunk-G2TFEWEQ.js +4 -0
  102. package/dist/standalone/chunk-GABMIICA.js +1 -0
  103. package/dist/standalone/chunk-GTM65MVX.js +1 -0
  104. package/dist/standalone/chunk-GZXPPJVK.js +1 -0
  105. package/dist/standalone/chunk-HFBRE65A.js +1 -0
  106. package/dist/standalone/chunk-HFMQNUBC.js +1 -0
  107. package/dist/standalone/chunk-HG7Q5B3H.js +1 -0
  108. package/dist/standalone/chunk-HTQL7AXU.js +1 -0
  109. package/dist/standalone/chunk-HV7G6DFP.js +5 -0
  110. package/dist/standalone/chunk-ITLLHEVG.js +1 -0
  111. package/dist/standalone/chunk-J6J54MBP.js +1 -0
  112. package/dist/standalone/chunk-JSEXCW5Q.js +1 -0
  113. package/dist/standalone/chunk-KEGAWN6Y.js +1 -0
  114. package/dist/standalone/chunk-KG3QTFWE.js +1 -0
  115. package/dist/standalone/chunk-KGS7KM4A.js +2 -0
  116. package/dist/standalone/chunk-KODWGUAB.js +1 -0
  117. package/dist/standalone/chunk-KZ6INM5M.js +1 -0
  118. package/dist/standalone/chunk-MGFEVTRI.js +1 -0
  119. package/dist/standalone/chunk-N2QDG3MW.js +1 -0
  120. package/dist/standalone/chunk-N4JI6VQD.js +1 -0
  121. package/dist/standalone/chunk-NNISYDNI.js +1 -0
  122. package/dist/standalone/chunk-O4PXDNR3.js +1 -0
  123. package/dist/standalone/chunk-O77VNUFD.js +1 -0
  124. package/dist/standalone/chunk-OD2POGPJ.js +1 -0
  125. package/dist/standalone/chunk-OXCK3ZUG.js +1 -0
  126. package/dist/standalone/chunk-P7DSVO4U.js +1 -0
  127. package/dist/standalone/chunk-PKAM3N5C.js +1 -0
  128. package/dist/standalone/chunk-QGXGBHQO.js +1 -0
  129. package/dist/standalone/chunk-QHA3TAEJ.js +1 -0
  130. package/dist/standalone/chunk-QQWC62X7.js +1 -0
  131. package/dist/standalone/chunk-RMYA7NAH.js +1 -0
  132. package/dist/standalone/chunk-RRCPZMC2.js +22 -0
  133. package/dist/standalone/chunk-S53RUBW5.js +1 -0
  134. package/dist/standalone/chunk-SB4GT6PK.js +1 -0
  135. package/dist/standalone/chunk-SEU5V7I6.js +1 -0
  136. package/dist/standalone/chunk-SHIOUDOT.js +1 -0
  137. package/dist/standalone/chunk-SIDRSX7Y.js +1 -0
  138. package/dist/standalone/chunk-SVR644RF.js +1 -0
  139. package/dist/standalone/chunk-TAD43CG5.js +1 -0
  140. package/dist/standalone/chunk-TBMYIZIO.js +1 -0
  141. package/dist/standalone/chunk-TICVNLPM.js +1 -0
  142. package/dist/standalone/chunk-TQ36RWOP.js +1 -0
  143. package/dist/standalone/chunk-UGMRUEBU.js +1 -0
  144. package/dist/standalone/chunk-UII66UVF.js +1 -0
  145. package/dist/standalone/chunk-VJPQUBN6.js +8 -0
  146. package/dist/standalone/chunk-VLXV72QE.js +1 -0
  147. package/dist/standalone/chunk-VMJKJWG6.js +1 -0
  148. package/dist/standalone/chunk-VPDPN5RR.js +2 -0
  149. package/dist/standalone/chunk-VSEGZA3J.js +1 -0
  150. package/dist/standalone/chunk-VXBZQIGY.js +4 -0
  151. package/dist/standalone/chunk-W7PCVQTE.js +1 -0
  152. package/dist/standalone/chunk-XLILSHPE.js +1 -0
  153. package/dist/standalone/chunk-XURNGQSS.js +1 -0
  154. package/dist/standalone/chunk-YJGANMU7.js +18 -0
  155. package/dist/standalone/chunk-YQQJ4N6U.js +1 -0
  156. package/dist/standalone/chunk-ZH7UES4T.js +2 -0
  157. package/dist/standalone/chunk-ZPUO7FNI.js +1 -0
  158. package/dist/standalone/chunk-ZQCVDXDL.js +1 -0
  159. package/dist/standalone/studio.js +104 -268
  160. package/package.json +1 -1
  161. package/dist/packem_shared/MetricsPanel-CRa4ITlq.js +0 -19
  162. package/dist/packem_shared/SqlEditorPanel-DI4obotI.js +0 -13
  163. package/dist/packem_shared/Studio-B_L5Q2-X.js +0 -33
  164. package/dist/packem_shared/TableEditor-1T-5KYtr.js +0 -11
  165. package/dist/packem_shared/studio-Dm6H5DHS.js +0 -13388
@@ -5,10 +5,10 @@ import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
5
5
  import { C as Card, a as CardContent } from './card-DURq3ElK.js';
6
6
  import { E as EmptyState } from './empty-state-DY_oe0k6.js';
7
7
  import { T as Table, a as TableHeader, b as TableRow, c as TableHead, d as TableBody, e as TableCell } from './table-DsCa9Qp9.js';
8
- import { b as useClientQuery } from './use-admin-query-CFl5GUg_.js';
8
+ import { a as useClientQuery } from './use-admin-query-BViPA3US.js';
9
9
  import { useAutoRefresh } from './DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js';
10
10
  import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
11
- import { f as fireAndForget, b as formatTimestamp, e as errorMessage } from './internal-CvMZCVd6.js';
11
+ import { f as fireAndForget, g as formatTimestamp, e as errorMessage } from './internal-FcNZ3beb.js';
12
12
  import { jsxDEV } from 'react/jsx-dev-runtime';
13
13
 
14
14
  const formatScheduledFor = (value) => Number.isFinite(value) ? formatTimestamp(value, "—") : "—";
@@ -0,0 +1,16 @@
1
+ import 'react/compiler-runtime';
2
+ import '@tanstack/react-router';
3
+ import 'react';
4
+ export { S as Studio } from './studio-dMTJ-kRR.js';
5
+ import './ErrorBoundary-BzAApI7J.js';
6
+ import './badge-B2PKA1-5.js';
7
+ import './input-XH4r1Pt1.js';
8
+ import './skeleton-CGhL0p20.js';
9
+ import './home-panel-aOR_drVv.js';
10
+ import './DEFAULT_LOCALE-CiX4W7Kr.js';
11
+ import './StudioI18nProvider-B-tDCZIi.js';
12
+ import './data-view-params-Cd6yRVbv.js';
13
+ import './internal-FcNZ3beb.js';
14
+ import './utils-B05Dmz_H.js';
15
+ import './CommandPalette-B5BertvU.js';
16
+ import 'react/jsx-dev-runtime';
@@ -3,7 +3,7 @@ import { LunoraClient } from '@lunora/client';
3
3
  import { LunoraProvider } from '@lunora/react';
4
4
  import { useState, useEffect } from 'react';
5
5
  import { ErrorBoundary } from './ErrorBoundary-BzAApI7J.js';
6
- import { u as useTheme, B as BrandMark, T as ThemeProvider, a as TooltipProvider, S as Studio } from './studio-Dm6H5DHS.js';
6
+ import { u as useTheme, B as BrandMark, T as ThemeProvider, a as TooltipProvider, S as Studio } from './studio-dMTJ-kRR.js';
7
7
  import useDebounced from './useDebounced-Dxncpg6z.js';
8
8
  import { useT, createStudioI18n } from './DEFAULT_LOCALE-CiX4W7Kr.js';
9
9
  import { StudioI18nProvider } from './StudioI18nProvider-B-tDCZIi.js';
@@ -4,7 +4,7 @@ import { useMotionValue, useSpring, useTransform, useMotionValueEvent, motion, u
4
4
  import * as React from 'react';
5
5
  import { useId, useEffect, useState, use, createContext, useRef } from 'react';
6
6
  import * as RechartsPrimitive from 'recharts';
7
- import { ZIndexLayer, ResponsiveContainer, LineChart, Line, BarChart, Bar as Bar$1, AreaChart, Area, XAxis as XAxis$1, ReferenceLine, Rectangle } from 'recharts';
7
+ import { ZIndexLayer, ResponsiveContainer, LineChart, Line, BarChart, Bar as Bar$1, AreaChart, Area, ReferenceLine, Rectangle, XAxis as XAxis$1 } from 'recharts';
8
8
  import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
9
9
  import { c as cn } from './utils-B05Dmz_H.js';
10
10
 
@@ -0,0 +1,249 @@
1
+ import { c } from 'react/compiler-runtime';
2
+ import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
3
+ import { d as formatCell } from './internal-FcNZ3beb.js';
4
+ import { X as XAxis, B as Bar, T as Tooltip, E as EvilBarChart } from './bar-chart-Bb__F5-u.js';
5
+ import { jsxDEV } from 'react/jsx-dev-runtime';
6
+ import { cva } from 'class-variance-authority';
7
+ import { c as cn } from './utils-B05Dmz_H.js';
8
+ import { useState, useEffect } from 'react';
9
+
10
+ const MAX_BARS = 50;
11
+ const RESULT_CHART_CONFIG = {
12
+ value: {
13
+ colors: {
14
+ dark: ["var(--chart-1)"],
15
+ light: ["var(--chart-1)"]
16
+ },
17
+ label: "value"
18
+ }
19
+ };
20
+ const pickColumns = (result) => {
21
+ const value = result.columns.find((column) => result.rows.length > 0 && result.rows.every((row) => typeof row[column] === "number")) ?? null;
22
+ const label = result.columns.find((column) => column !== value) ?? null;
23
+ return {
24
+ label,
25
+ value
26
+ };
27
+ };
28
+ const SqlResultChart = (t0) => {
29
+ const $ = c(15);
30
+ const {
31
+ result
32
+ } = t0;
33
+ const t = useT();
34
+ let t1;
35
+ if ($[0] !== result) {
36
+ t1 = pickColumns(result);
37
+ $[0] = result;
38
+ $[1] = t1;
39
+ } else {
40
+ t1 = $[1];
41
+ }
42
+ const {
43
+ label,
44
+ value
45
+ } = t1;
46
+ let t2;
47
+ if ($[2] !== label || $[3] !== result || $[4] !== value) {
48
+ t2 = value === null ? [] : result.rows.slice(0, MAX_BARS).map((row, index) => ({
49
+ label: label === null ? `#${(index + 1).toString()}` : formatCell(row[label]),
50
+ value: Number(row[value]) || 0
51
+ }));
52
+ $[2] = label;
53
+ $[3] = result;
54
+ $[4] = value;
55
+ $[5] = t2;
56
+ } else {
57
+ t2 = $[5];
58
+ }
59
+ const data = t2;
60
+ if (value === null) {
61
+ let t32;
62
+ if ($[6] !== t) {
63
+ t32 = t("No numeric column to chart.");
64
+ $[6] = t;
65
+ $[7] = t32;
66
+ } else {
67
+ t32 = $[7];
68
+ }
69
+ let t42;
70
+ if ($[8] !== t32) {
71
+ t42 = /* @__PURE__ */ jsxDEV("p", {
72
+ className: "p-4 text-sm text-muted-foreground",
73
+ "data-testid": "sql-chart-empty",
74
+ children: t32
75
+ }, void 0, false);
76
+ $[8] = t32;
77
+ $[9] = t42;
78
+ } else {
79
+ t42 = $[9];
80
+ }
81
+ return t42;
82
+ }
83
+ let t3;
84
+ let t4;
85
+ let t5;
86
+ if ($[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
87
+ t3 = /* @__PURE__ */ jsxDEV(XAxis, {
88
+ dataKey: "label"
89
+ }, void 0, false);
90
+ t4 = /* @__PURE__ */ jsxDEV(Bar, {
91
+ dataKey: "value"
92
+ }, void 0, false);
93
+ t5 = /* @__PURE__ */ jsxDEV(Tooltip, {}, void 0, false);
94
+ $[10] = t3;
95
+ $[11] = t4;
96
+ $[12] = t5;
97
+ } else {
98
+ t3 = $[10];
99
+ t4 = $[11];
100
+ t5 = $[12];
101
+ }
102
+ let t6;
103
+ if ($[13] !== data) {
104
+ t6 = /* @__PURE__ */ jsxDEV("div", {
105
+ className: "h-80 w-full p-3",
106
+ "data-testid": "sql-chart",
107
+ children: /* @__PURE__ */ jsxDEV(EvilBarChart, {
108
+ className: "h-full w-full",
109
+ config: RESULT_CHART_CONFIG,
110
+ data,
111
+ children: [t3, t4, t5]
112
+ }, void 0, true)
113
+ }, void 0, false);
114
+ $[13] = data;
115
+ $[14] = t6;
116
+ } else {
117
+ t6 = $[14];
118
+ }
119
+ return t6;
120
+ };
121
+
122
+ const alertVariants = cva("flex items-start gap-2 rounded-md border px-3 py-2 text-sm [&>svg]:mt-0.5 [&>svg]:size-4 [&>svg]:shrink-0", {
123
+ defaultVariants: {
124
+ variant: "default"
125
+ },
126
+ variants: {
127
+ variant: {
128
+ default: "border-border bg-muted/40 text-foreground",
129
+ destructive: "border-destructive/40 bg-destructive/5 text-destructive",
130
+ warning: "border-amber-500/40 bg-amber-500/5 text-amber-700 dark:text-amber-400"
131
+ }
132
+ }
133
+ });
134
+ const Alert = (t0) => {
135
+ const $ = c(10);
136
+ const {
137
+ children,
138
+ className,
139
+ icon,
140
+ testId,
141
+ variant
142
+ } = t0;
143
+ let t1;
144
+ if ($[0] !== className || $[1] !== variant) {
145
+ t1 = cn(alertVariants({
146
+ variant
147
+ }), className);
148
+ $[0] = className;
149
+ $[1] = variant;
150
+ $[2] = t1;
151
+ } else {
152
+ t1 = $[2];
153
+ }
154
+ let t2;
155
+ if ($[3] !== children) {
156
+ t2 = /* @__PURE__ */ jsxDEV("div", {
157
+ className: "min-w-0 flex-1",
158
+ children
159
+ }, void 0, false);
160
+ $[3] = children;
161
+ $[4] = t2;
162
+ } else {
163
+ t2 = $[4];
164
+ }
165
+ let t3;
166
+ if ($[5] !== icon || $[6] !== t1 || $[7] !== t2 || $[8] !== testId) {
167
+ t3 = /* @__PURE__ */ jsxDEV("div", {
168
+ className: t1,
169
+ "data-testid": testId,
170
+ role: "alert",
171
+ children: [icon, t2]
172
+ }, void 0, true);
173
+ $[5] = icon;
174
+ $[6] = t1;
175
+ $[7] = t2;
176
+ $[8] = testId;
177
+ $[9] = t3;
178
+ } else {
179
+ t3 = $[9];
180
+ }
181
+ return t3;
182
+ };
183
+
184
+ const store = () => {
185
+ try {
186
+ return globalThis.localStorage;
187
+ } catch {
188
+ return void 0;
189
+ }
190
+ };
191
+ const loadJsonArray = function(key) {
192
+ try {
193
+ const raw = store()?.getItem(key) ?? void 0;
194
+ const parsed = raw === void 0 ? [] : JSON.parse(raw);
195
+ return Array.isArray(parsed) ? parsed : [];
196
+ } catch {
197
+ return [];
198
+ }
199
+ };
200
+ const saveJson = (key, value) => {
201
+ const storage = store();
202
+ if (storage === void 0) {
203
+ return;
204
+ }
205
+ try {
206
+ storage.setItem(key, JSON.stringify(value));
207
+ } catch {
208
+ }
209
+ };
210
+ const usePersistedList = function(key) {
211
+ const $ = c(8);
212
+ let t0;
213
+ if ($[0] !== key) {
214
+ t0 = () => loadJsonArray(key);
215
+ $[0] = key;
216
+ $[1] = t0;
217
+ } else {
218
+ t0 = $[1];
219
+ }
220
+ const [value, setValue] = useState(t0);
221
+ let t1;
222
+ let t2;
223
+ if ($[2] !== key || $[3] !== value) {
224
+ t1 = () => {
225
+ saveJson(key, value);
226
+ };
227
+ t2 = [key, value];
228
+ $[2] = key;
229
+ $[3] = value;
230
+ $[4] = t1;
231
+ $[5] = t2;
232
+ } else {
233
+ t1 = $[4];
234
+ t2 = $[5];
235
+ }
236
+ useEffect(t1, t2);
237
+ let t3;
238
+ if ($[6] !== value) {
239
+ t3 = [value, setValue];
240
+ $[6] = value;
241
+ $[7] = t3;
242
+ } else {
243
+ t3 = $[7];
244
+ }
245
+ return t3;
246
+ };
247
+ const newId = (prefix) => globalThis.crypto?.randomUUID?.() ?? `${prefix}-${globalThis.performance.now().toString(36)}`;
248
+
249
+ export { Alert as A, SqlResultChart as S, newId as n, usePersistedList as u };
@@ -5,4 +5,4 @@ const CLOUDFLARE_R2_URL = `${CLOUDFLARE_DASH}/r2`;
5
5
  const CLOUDFLARE_D1_URL = `${CLOUDFLARE_DASH}/workers/d1`;
6
6
  const CLOUDFLARE_DURABLE_OBJECTS_URL = `${CLOUDFLARE_DASH}/workers/durable-objects`;
7
7
 
8
- export { CLOUDFLARE_OBSERVABILITY_URL as C, CLOUDFLARE_WORKERS_URL as a, CLOUDFLARE_D1_URL as b, CLOUDFLARE_DURABLE_OBJECTS_URL as c, CLOUDFLARE_R2_URL as d };
8
+ export { CLOUDFLARE_D1_URL as C, CLOUDFLARE_OBSERVABILITY_URL as a, CLOUDFLARE_WORKERS_URL as b, CLOUDFLARE_DURABLE_OBJECTS_URL as c, CLOUDFLARE_R2_URL as d };
@@ -1,6 +1,6 @@
1
1
  import { c } from 'react/compiler-runtime';
2
2
  import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
3
- import { g as formatCell } from './internal-CvMZCVd6.js';
3
+ import { d as formatCell } from './internal-FcNZ3beb.js';
4
4
  import { jsxDEV } from 'react/jsx-dev-runtime';
5
5
 
6
6
  const CellValue = (t0) => {
@@ -0,0 +1,96 @@
1
+ const VALID_OPERATORS = /* @__PURE__ */ new Set(["contains", "eq", "gt", "gte", "lt", "lte", "ne"]);
2
+ const stringParameter = (raw) => {
3
+ if (typeof raw !== "string") {
4
+ return void 0;
5
+ }
6
+ const value = raw.trim();
7
+ return value === "" ? void 0 : value;
8
+ };
9
+ const isFilterClause = (entry) => {
10
+ if (entry === null || typeof entry !== "object") {
11
+ return false;
12
+ }
13
+ const candidate = entry;
14
+ return typeof candidate.column === "string" && typeof candidate.operator === "string" && VALID_OPERATORS.has(candidate.operator);
15
+ };
16
+ const parseFilters = (raw) => {
17
+ if (typeof raw !== "string" || raw === "") {
18
+ return [];
19
+ }
20
+ try {
21
+ const parsed = JSON.parse(raw);
22
+ return Array.isArray(parsed) ? parsed.filter(isFilterClause) : [];
23
+ } catch {
24
+ return [];
25
+ }
26
+ };
27
+ const parseOrder = (raw) => {
28
+ if (typeof raw !== "string" || raw === "") {
29
+ return void 0;
30
+ }
31
+ const separator = raw.lastIndexOf(":");
32
+ if (separator <= 0) {
33
+ return void 0;
34
+ }
35
+ const column = raw.slice(0, separator);
36
+ const direction = raw.slice(separator + 1);
37
+ if (direction !== "asc" && direction !== "desc") {
38
+ return void 0;
39
+ }
40
+ return {
41
+ column,
42
+ direction
43
+ };
44
+ };
45
+ const validateDataViewSearch = (search) => {
46
+ const validated = {};
47
+ if (search["schema"] === "global") {
48
+ validated.schema = "global";
49
+ }
50
+ const table = stringParameter(search["table"]);
51
+ if (table !== void 0) {
52
+ validated.table = table;
53
+ }
54
+ const shard = stringParameter(search["shard"]);
55
+ if (shard !== void 0) {
56
+ validated.shard = shard;
57
+ }
58
+ const searchText = stringParameter(search["search"]);
59
+ if (searchText !== void 0) {
60
+ validated.search = searchText;
61
+ }
62
+ const order = stringParameter(search["order"]);
63
+ if (order !== void 0 && parseOrder(order) !== void 0) {
64
+ validated.order = order;
65
+ }
66
+ const filters = stringParameter(search["filters"]);
67
+ if (filters !== void 0 && parseFilters(filters).length > 0) {
68
+ validated.filters = filters;
69
+ }
70
+ return validated;
71
+ };
72
+ const searchToDataView = (search) => {
73
+ const filters = parseFilters(search["filters"]);
74
+ const orderBy = parseOrder(search["order"]);
75
+ return {
76
+ filters: filters.length > 0 ? filters : void 0,
77
+ orderBy,
78
+ search: typeof search["search"] === "string" && search["search"] !== "" ? search["search"] : void 0,
79
+ shard: typeof search["shard"] === "string" && search["shard"] !== "" ? search["shard"] : void 0,
80
+ table: typeof search["table"] === "string" && search["table"] !== "" ? search["table"] : void 0,
81
+ tier: search["schema"] === "global" ? "global" : "shard"
82
+ };
83
+ };
84
+ const dataViewToSearch = (view) => {
85
+ const filters = view.filters ?? [];
86
+ return {
87
+ filters: filters.length > 0 ? JSON.stringify(filters) : void 0,
88
+ order: view.orderBy === void 0 ? void 0 : `${view.orderBy.column}:${view.orderBy.direction}`,
89
+ schema: view.tier === "global" ? "global" : void 0,
90
+ search: view.search !== void 0 && view.search !== "" ? view.search : void 0,
91
+ shard: view.shard !== void 0 && view.shard !== "" ? view.shard : void 0,
92
+ table: view.table !== void 0 && view.table !== "" ? view.table : void 0
93
+ };
94
+ };
95
+
96
+ export { dataViewToSearch as d, searchToDataView as s, validateDataViewSearch as v };
@@ -2,105 +2,10 @@ import { c } from 'react/compiler-runtime';
2
2
  import { useState } from 'react';
3
3
  import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
4
4
  import { D as DropdownMenuTrigger, a as DropdownMenuLabel, b as DropdownMenuItem, c as DropdownMenuContent, d as DropdownMenu, e as DropdownMenuCheckboxItem, f as DropdownMenuSeparator, g as DropdownMenuGroup } from './dropdown-menu-WY4B_eJO.js';
5
- import { c as cn } from './utils-B05Dmz_H.js';
6
- import { jsxDEV } from 'react/jsx-dev-runtime';
5
+ import { M as ModalShell } from './modal-shell-hyaJvIJ6.js';
7
6
  import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
8
- import { g as formatCell, f as fireAndForget } from './internal-CvMZCVd6.js';
9
-
10
- const OVERLAY_BY_VARIANT = {
11
- dialog: "fixed inset-0 z-[1000] flex justify-center bg-black/20 pt-[10vh]",
12
- drawer: "fixed inset-0 z-[1000] flex justify-end bg-black/20"
13
- };
14
- const PANEL_BY_VARIANT = {
15
- dialog: "flex h-fit w-[min(28rem,92vw)] flex-col gap-3 rounded-lg border border-border bg-background p-4 shadow-xl",
16
- drawer: "flex h-full w-[min(34rem,100vw)] flex-col gap-4 overflow-auto border-l border-border bg-background p-4 shadow-xl"
17
- };
18
- const ModalShell = (t0) => {
19
- const $ = c(18);
20
- const {
21
- className,
22
- children,
23
- label,
24
- onClose,
25
- panelTestId,
26
- testId,
27
- variant
28
- } = t0;
29
- let t1;
30
- if ($[0] !== onClose) {
31
- t1 = (event) => {
32
- if (event.target === event.currentTarget) {
33
- onClose();
34
- }
35
- };
36
- $[0] = onClose;
37
- $[1] = t1;
38
- } else {
39
- t1 = $[1];
40
- }
41
- const onOverlayClick = t1;
42
- let t2;
43
- if ($[2] !== onClose) {
44
- t2 = (event_0) => {
45
- if (event_0.key === "Escape") {
46
- onClose();
47
- }
48
- };
49
- $[2] = onClose;
50
- $[3] = t2;
51
- } else {
52
- t2 = $[3];
53
- }
54
- const onOverlayKeyDown = t2;
55
- const t3 = OVERLAY_BY_VARIANT[variant];
56
- const t4 = PANEL_BY_VARIANT[variant];
57
- let t5;
58
- if ($[4] !== className || $[5] !== t4) {
59
- t5 = cn(t4, className);
60
- $[4] = className;
61
- $[5] = t4;
62
- $[6] = t5;
63
- } else {
64
- t5 = $[6];
65
- }
66
- let t6;
67
- if ($[7] !== children || $[8] !== label || $[9] !== panelTestId || $[10] !== t5) {
68
- t6 = /* @__PURE__ */ jsxDEV("div", {
69
- "aria-label": label,
70
- className: t5,
71
- "data-testid": panelTestId,
72
- role: "dialog",
73
- children
74
- }, void 0, false);
75
- $[7] = children;
76
- $[8] = label;
77
- $[9] = panelTestId;
78
- $[10] = t5;
79
- $[11] = t6;
80
- } else {
81
- t6 = $[11];
82
- }
83
- let t7;
84
- if ($[12] !== onOverlayClick || $[13] !== onOverlayKeyDown || $[14] !== t3 || $[15] !== t6 || $[16] !== testId) {
85
- t7 = /* @__PURE__ */ jsxDEV("div", {
86
- className: t3,
87
- "data-testid": testId,
88
- onClick: onOverlayClick,
89
- onKeyDown: onOverlayKeyDown,
90
- role: "presentation",
91
- children: t6
92
- }, void 0, false);
93
- $[12] = onOverlayClick;
94
- $[13] = onOverlayKeyDown;
95
- $[14] = t3;
96
- $[15] = t6;
97
- $[16] = testId;
98
- $[17] = t7;
99
- } else {
100
- t7 = $[17];
101
- }
102
- return t7;
103
- };
7
+ import { d as formatCell, f as fireAndForget } from './internal-FcNZ3beb.js';
8
+ import { jsxDEV } from 'react/jsx-dev-runtime';
104
9
 
105
10
  const CONTROL_BTN = "inline-flex items-center gap-1 rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50";
106
11
  const CSV_QUOTE_RE = /["\n,]/u;
@@ -837,4 +742,4 @@ function _temp2(row) {
837
742
  return row.id;
838
743
  }
839
744
 
840
- export { CellDetailDialog as C, ExportMenu as E, GridActionsBar as G, ModalShell as M, SelectionBar as S };
745
+ export { CellDetailDialog as C, ExportMenu as E, GridActionsBar as G, SelectionBar as S };