@nongt/visql 0.6.1 → 0.8.0

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/mui.js CHANGED
@@ -1,16 +1,16 @@
1
- import { jsx as n, jsxs as P } from "react/jsx-runtime";
2
- import { forwardRef as C, useMemo as _, useState as w, useRef as G, useLayoutEffect as K } from "react";
3
- import { P as Q } from "./PipelineEditor-X83xfPeC.js";
4
- import U from "@emotion/cache";
5
- import { CacheProvider as J } from "@emotion/react";
6
- import { TextField as R, Menu as X, ListSubheader as $, MenuItem as D, Box as y, createFilterOptions as Y, Autocomplete as j, Select as Z, InputBase as ee, Button as te, IconButton as oe, Tooltip as re, Chip as ne } from "@mui/material";
7
- import { createTheme as ie, alpha as E, ThemeProvider as le } from "@mui/material/styles";
8
- import ue from "clsx";
9
- import { Plus as se } from "iconoir-react";
10
- import { t as L } from "./tokens-BTaVMSOx.js";
11
- import { i as ce, f as ae } from "./calendarDate-CYlr9TvX.js";
12
- function de(e, t) {
13
- return ie({
1
+ import { jsx as n, Fragment as ee, jsxs as B } from "react/jsx-runtime";
2
+ import { forwardRef as _, useContext as te, createContext as oe, useMemo as z, useState as L, useRef as re, useLayoutEffect as ne } from "react";
3
+ import { P as ie } from "./PipelineEditor-DtT1TPgd.js";
4
+ import le from "@emotion/cache";
5
+ import { CacheProvider as D, __unsafe_useEmotionCache as ue } from "@emotion/react";
6
+ import { TextField as C, Menu as se, ListSubheader as A, MenuItem as G, Box as g, createFilterOptions as ce, Autocomplete as K, Select as ae, InputBase as de, Button as pe, IconButton as me, Tooltip as fe, Chip as he } from "@mui/material";
7
+ import { createTheme as xe, alpha as H, ThemeProvider as Q, useTheme as be } from "@mui/material/styles";
8
+ import Me from "clsx";
9
+ import { Plus as Ie } from "iconoir-react";
10
+ import { t as R } from "./tokens-BTaVMSOx.js";
11
+ import { i as ye, f as ge } from "./calendarDate-CYlr9TvX.js";
12
+ function ve(e, t) {
13
+ return xe({
14
14
  palette: {
15
15
  primary: { main: e.accent },
16
16
  secondary: { main: e.secondary },
@@ -60,7 +60,7 @@ function de(e, t) {
60
60
  // Preserve the button's own color at 25% when disabled,
61
61
  // instead of MUI's default flat gray.
62
62
  "&.MuiIconButton-colorSecondary.Mui-disabled": {
63
- color: E(e.secondary, 0.25)
63
+ color: H(e.secondary, 0.25)
64
64
  }
65
65
  }
66
66
  }
@@ -68,7 +68,7 @@ function de(e, t) {
68
68
  }
69
69
  });
70
70
  }
71
- const q = {
71
+ const U = {
72
72
  "& .MuiOutlinedInput-root": {
73
73
  borderTopLeftRadius: 0,
74
74
  borderBottomLeftRadius: 0,
@@ -76,139 +76,149 @@ const q = {
76
76
  }
77
77
  };
78
78
  let W;
79
- function pe() {
79
+ function Se() {
80
80
  if (!W) {
81
- const e = U({ key: "qb" }), t = e.insert.bind(e);
82
- e.insert = (o, i, s, c) => t(
81
+ const e = le({ key: "qb" }), t = e.insert.bind(e);
82
+ e.insert = (o, u, s, c) => t(
83
83
  o,
84
- i.styles.startsWith("@layer") ? i : { ...i, styles: `@layer qb-mui {${i.styles}}` },
84
+ u.styles.startsWith("@layer") ? u : { ...u, styles: `@layer qb-mui {${u.styles}}` },
85
85
  s,
86
86
  c
87
87
  ), W = e;
88
88
  }
89
89
  return W;
90
90
  }
91
- const fe = ({ tokens: e, fontFamily: t, children: o }) => {
92
- const i = _(() => de(e, t), [e, t]);
93
- return /* @__PURE__ */ n(J, { value: pe(), children: /* @__PURE__ */ n(le, { theme: i, children: o }) });
94
- }, me = ({ children: e, ...t }) => /* @__PURE__ */ n(re, { disableInteractive: !0, ...t, children: e }), he = C(
95
- ({ children: e, ...t }, o) => /* @__PURE__ */ n(oe, { ref: o, ...t, children: e })
96
- ), xe = C(
97
- ({ children: e, ...t }, o) => /* @__PURE__ */ n(te, { ref: o, ...t, children: e })
98
- ), be = ({
91
+ const J = oe(void 0), Pe = ({ tokens: e, fontFamily: t, children: o }) => {
92
+ const u = z(() => ve(e, t), [e, t]), s = ue(), c = be(), i = z(() => ({ cache: s, theme: c }), [s, c]);
93
+ return /* @__PURE__ */ n(J.Provider, { value: i, children: /* @__PURE__ */ n(D, { value: Se(), children: /* @__PURE__ */ n(Q, { theme: u, children: o }) }) });
94
+ }, Te = ({ children: e }) => {
95
+ const t = te(J);
96
+ if (!t) return /* @__PURE__ */ n(ee, { children: e });
97
+ const o = /* @__PURE__ */ n(Q, { theme: t.theme, children: e });
98
+ return t.cache ? /* @__PURE__ */ n(D, { value: t.cache, children: o }) : o;
99
+ }, Be = ({ children: e, ...t }) => /* @__PURE__ */ n(fe, { disableInteractive: !0, ...t, children: e }), we = _(
100
+ ({ children: e, ...t }, o) => /* @__PURE__ */ n(me, { ref: o, ...t, children: e })
101
+ ), Oe = _(
102
+ ({ children: e, ...t }, o) => /* @__PURE__ */ n(pe, { ref: o, ...t, children: e })
103
+ ), Le = ({
99
104
  value: e,
100
105
  onChange: t,
101
106
  onBlur: o,
102
- type: i,
107
+ type: u,
103
108
  placeholder: s,
104
109
  className: c,
105
- inputClassName: u,
106
- grouped: f,
107
- disabled: d,
110
+ inputClassName: i,
111
+ grouped: p,
112
+ disabled: a,
108
113
  readOnly: b,
109
- inline: I,
110
- maxLength: m
111
- }) => I ? (
114
+ inline: x,
115
+ maxLength: v
116
+ }) => x ? (
112
117
  // No box: the editor's classes are all there is to it.
113
118
  /* @__PURE__ */ n(
114
- ee,
119
+ de,
115
120
  {
116
- disabled: d,
121
+ disabled: a,
117
122
  className: c,
118
123
  value: e,
119
- onChange: t && ((h) => t(h.currentTarget.value)),
124
+ onChange: t && ((f) => t(f.currentTarget.value)),
120
125
  onBlur: o,
121
126
  placeholder: s,
122
127
  sx: { font: "inherit", color: "inherit" },
123
- slotProps: { input: { className: u, readOnly: b, maxLength: m } }
128
+ slotProps: { input: { className: i, readOnly: b, maxLength: v } }
124
129
  }
125
130
  )
126
131
  ) : /* @__PURE__ */ n(
127
- R,
132
+ C,
128
133
  {
129
- disabled: d,
134
+ disabled: a,
130
135
  className: c,
131
- sx: f ? q : void 0,
136
+ sx: p ? U : void 0,
132
137
  value: e,
133
- onChange: t && ((h) => t(h.currentTarget.value)),
138
+ onChange: t && ((f) => t(f.currentTarget.value)),
134
139
  onBlur: o,
135
- type: i,
140
+ type: u,
136
141
  placeholder: s,
137
142
  slotProps: {
138
143
  htmlInput: {
139
- className: u,
144
+ className: i,
140
145
  readOnly: b,
141
- maxLength: m,
142
- ...i === "number" ? { inputMode: "numeric" } : {}
146
+ maxLength: v,
147
+ ...u === "number" ? { inputMode: "numeric" } : {}
143
148
  }
144
149
  }
145
150
  }
146
- ), Ie = ({
151
+ ), Re = ({
147
152
  value: e,
148
153
  options: t,
149
154
  onChange: o,
150
- density: i = "normal",
155
+ density: u = "normal",
151
156
  className: s,
152
157
  grouped: c,
153
- disabled: u
158
+ disabled: i
154
159
  }) => {
155
- const f = i === "compact";
160
+ const p = u === "compact";
156
161
  return /* @__PURE__ */ n(
157
- Z,
162
+ ae,
158
163
  {
159
164
  className: s,
160
- disabled: u,
165
+ disabled: i,
161
166
  value: e,
162
- size: f ? "small" : void 0,
163
- onChange: (d) => o(d.target.value),
167
+ size: p ? "small" : void 0,
168
+ onChange: (a) => o(a.target.value),
164
169
  sx: {
165
170
  ...c ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0, height: 38 } : {},
166
- ...f ? { fontSize: "0.75rem", height: 26, ".MuiSelect-select": { py: 0.25 } } : {}
171
+ ...p ? { fontSize: "0.75rem", height: 26, ".MuiSelect-select": { py: 0.25 } } : {}
167
172
  },
168
- children: t.map((d) => /* @__PURE__ */ n(
169
- D,
173
+ children: t.map((a) => /* @__PURE__ */ n(
174
+ G,
170
175
  {
171
- value: d.value,
172
- dense: f,
173
- sx: f ? { fontSize: "0.75rem" } : void 0,
174
- children: d.label
176
+ value: a.value,
177
+ dense: p,
178
+ sx: p ? { fontSize: "0.75rem" } : void 0,
179
+ children: a.label
175
180
  },
176
- d.value
181
+ a.value
177
182
  ))
178
183
  }
179
184
  );
180
- }, Me = ({
185
+ }, Ce = ({
181
186
  value: e,
182
187
  onChange: t,
183
188
  className: o,
184
- grouped: i,
189
+ grouped: u,
185
190
  disabled: s
186
191
  }) => /* @__PURE__ */ n(
187
- R,
192
+ C,
188
193
  {
189
194
  type: "date",
190
195
  disabled: s,
191
196
  className: o,
192
- sx: i ? q : void 0,
193
- value: e ? ce(e) : "",
194
- onChange: (c) => t == null ? void 0 : t(ae(c.currentTarget.value))
197
+ sx: u ? U : void 0,
198
+ value: e ? ye(e) : "",
199
+ onChange: (c) => t == null ? void 0 : t(ge(c.currentTarget.value))
195
200
  }
196
- ), ge = { input: "input", clear: "clear" }, ye = {
201
+ ), Ee = { input: "input", clear: "clear" }, Fe = {
197
202
  paper: { className: "w-fit" },
198
203
  popper: { sx: { minWidth: "max-content" } }
199
- }, V = {
204
+ }, X = {
200
205
  fontWeight: 700,
201
206
  lineHeight: "32px",
202
207
  borderTop: 1,
203
208
  borderBottom: 1,
204
- borderColor: ({ palette: e }) => E(e.text.primary, 0.07),
209
+ borderColor: ({ palette: e }) => H(e.text.primary, 0.07),
205
210
  boxShadow: "0 3px 4px -3px rgba(0, 0, 0, 0.18)",
206
211
  bgcolor: "background.paper",
207
212
  backgroundImage: ({ palette: e }) => {
208
- const t = E(e.text.primary, 0.04);
213
+ const t = H(e.text.primary, 0.04);
209
214
  return `linear-gradient(${t}, ${t})`;
210
215
  }
211
- }, Se = { ...V, top: -8, whiteSpace: "nowrap" }, ve = {
216
+ }, We = { ...X, top: -8, whiteSpace: "nowrap" }, ke = {
217
+ fontSize: "0.7rem",
218
+ color: "text.secondary",
219
+ whiteSpace: "normal",
220
+ maxWidth: 320
221
+ }, ze = {
212
222
  borderTop: 1,
213
223
  borderColor: "divider",
214
224
  color: "primary.main",
@@ -216,87 +226,93 @@ const fe = ({ tokens: e, fontFamily: t, children: o }) => {
216
226
  gap: 1,
217
227
  whiteSpace: "nowrap"
218
228
  };
219
- function Oe({
229
+ function He({
220
230
  options: e,
221
231
  value: t,
222
232
  onChange: o,
223
- inputValue: i,
233
+ inputValue: u,
224
234
  onInputChange: s,
225
235
  getOptionLabel: c,
226
- getOptionKey: u,
227
- searchText: f,
228
- groupBy: d,
229
- groupTone: b,
230
- freeSolo: I,
231
- isAction: m,
232
- label: h,
233
- placeholder: S,
234
- noOptionsText: v,
235
- maxLength: g,
236
- className: k,
237
- inputClassName: O,
238
- grouped: B,
239
- appearance: N = "light",
240
- disabled: l,
241
- autoFocus: a
236
+ getOptionKey: i,
237
+ getOptionDetail: p,
238
+ renderOption: a,
239
+ matches: b,
240
+ searchText: x,
241
+ groupBy: v,
242
+ groupTone: f,
243
+ freeSolo: S,
244
+ isAction: M,
245
+ label: I,
246
+ placeholder: E,
247
+ noOptionsText: w,
248
+ maxLength: O,
249
+ className: N,
250
+ inputClassName: l,
251
+ grouped: d,
252
+ appearance: y = "light",
253
+ disabled: F,
254
+ autoFocus: V
242
255
  }) {
243
- const p = (r) => typeof r == "string" || !c ? String(r) : c(r), F = (r) => typeof r == "string" || !u ? p(r) : u(r), H = N === "dark", A = Y(f ? { stringify: f } : {});
256
+ const P = (r) => typeof r == "string" || !c ? String(r) : c(r), Y = (r) => typeof r == "string" || !i ? P(r) : i(r), $ = (r) => p == null ? void 0 : p(r), j = y === "dark", Z = ce(x ? { stringify: x } : {});
244
257
  return /* @__PURE__ */ n(
245
- j,
258
+ K,
246
259
  {
247
- filterOptions: (r, x) => {
248
- const M = r.some((T) => p(T).toLowerCase() === x.inputValue.toLowerCase()) ? r : A(r, x);
249
- return m ? r.filter((T) => m(T) || M.includes(T)) : M;
260
+ filterOptions: (r, m) => {
261
+ const h = b && m.inputValue ? r.filter((T) => b(T, m.inputValue)) : Z(r, m), q = r.some((T) => P(T).toLowerCase() === m.inputValue.toLowerCase()) ? r : h;
262
+ return M ? r.filter((T) => M(T) || q.includes(T)) : q;
250
263
  },
251
- className: k,
252
- disabled: l,
253
- openOnFocus: a,
254
- freeSolo: I,
255
- ...v === void 0 ? {} : { noOptionsText: v },
256
- forcePopupIcon: I && e.length > 0 ? !0 : "auto",
264
+ className: N,
265
+ disabled: F,
266
+ openOnFocus: V,
267
+ freeSolo: S,
268
+ ...w === void 0 ? {} : { noOptionsText: w },
269
+ forcePopupIcon: S && e.length > 0 ? !0 : "auto",
257
270
  options: e,
258
271
  value: t,
259
- onChange: o && ((r, x) => o(x)),
260
- inputValue: i,
261
- onInputChange: s && ((r, x, M) => s(x, ge[M] ?? "reset")),
262
- getOptionLabel: p,
263
- getOptionKey: F,
264
- groupBy: d,
265
- renderGroup: (r) => /* @__PURE__ */ P("li", { children: [
272
+ onChange: o && ((r, m) => o(m)),
273
+ inputValue: u,
274
+ onInputChange: s && ((r, m, h) => s(m, Ee[h] ?? "reset")),
275
+ getOptionLabel: P,
276
+ getOptionKey: Y,
277
+ groupBy: v,
278
+ renderGroup: (r) => /* @__PURE__ */ B("li", { children: [
266
279
  r.group !== "" && /* @__PURE__ */ n(
267
- $,
280
+ A,
268
281
  {
269
282
  component: "div",
270
283
  sx: {
271
- ...Se,
272
- ...(b == null ? void 0 : b(r.group)) === "accent" ? { color: "primary.main" } : {}
284
+ ...We,
285
+ ...(f == null ? void 0 : f(r.group)) === "accent" ? { color: "primary.main" } : {}
273
286
  },
274
287
  children: r.group
275
288
  }
276
289
  ),
277
- /* @__PURE__ */ n(y, { component: "ul", sx: { p: 0 }, children: r.children })
290
+ /* @__PURE__ */ n(g, { component: "ul", sx: { p: 0 }, children: r.children })
278
291
  ] }, r.key),
279
- renderOption: ({ key: r, ...x }, M) => m != null && m(M) ? /* @__PURE__ */ P(y, { component: "li", ...x, sx: ve, children: [
280
- /* @__PURE__ */ n(se, { width: 14, height: 14, strokeWidth: 2.2 }),
281
- p(M)
282
- ] }, r) : /* @__PURE__ */ n("li", { ...x, className: ue(x.className, "text-nowrap"), children: p(M) }, r),
283
- slotProps: ye,
292
+ renderOption: ({ key: r, ...m }, h) => M != null && M(h) ? /* @__PURE__ */ B(g, { component: "li", ...m, sx: ze, children: [
293
+ /* @__PURE__ */ n(Ie, { width: 14, height: 14, strokeWidth: 2.2 }),
294
+ P(h)
295
+ ] }, r) : /* @__PURE__ */ n("li", { ...m, className: Me(m.className, "text-nowrap"), children: (a == null ? void 0 : a(h)) ?? ($(h) ? /* @__PURE__ */ B(g, { component: "span", sx: { display: "flex", flexDirection: "column" }, children: [
296
+ P(h),
297
+ /* @__PURE__ */ n(g, { component: "span", sx: ke, children: $(h) })
298
+ ] }) : P(h)) }, r),
299
+ slotProps: Fe,
284
300
  sx: {
285
- ...B ? {
301
+ ...d ? {
286
302
  "& .MuiOutlinedInput-root": { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 }
287
303
  } : {},
288
- ...H ? {
289
- "& .MuiAutocomplete-popupIndicator": { color: L("nodeInputIcon") },
290
- "& .MuiAutocomplete-clearIndicator": { color: L("nodeInputIcon") }
304
+ ...j ? {
305
+ "& .MuiAutocomplete-popupIndicator": { color: R("nodeInputIcon") },
306
+ "& .MuiAutocomplete-clearIndicator": { color: R("nodeInputIcon") }
291
307
  } : {}
292
308
  },
293
309
  renderInput: (r) => /* @__PURE__ */ n(
294
- R,
310
+ C,
295
311
  {
296
312
  ...r,
297
- label: h,
298
- placeholder: S,
299
- autoFocus: a,
313
+ label: I,
314
+ placeholder: E,
315
+ autoFocus: V,
300
316
  slotProps: {
301
317
  input: r.InputProps,
302
318
  // A given inputClassName replaces MUI's own input class (callers
@@ -304,24 +320,24 @@ function Oe({
304
320
  // one, MUI's styling stays as is.
305
321
  htmlInput: {
306
322
  ...r.inputProps,
307
- ...O ? { className: O } : {},
308
- maxLength: g
323
+ ...l ? { className: l } : {},
324
+ maxLength: O
309
325
  }
310
326
  },
311
327
  sx: {
312
328
  // A floating label only explains an empty field — once focused,
313
329
  // tuck it up into the outline instead of hovering over the text.
314
- ...h ? {
330
+ ...I ? {
315
331
  "& .MuiInputLabel-root.Mui-focused": {
316
332
  transform: "translate(15px, -6px) scale(0.75)"
317
333
  }
318
334
  } : {},
319
- ...H ? {
335
+ ...j ? {
320
336
  "& .MuiInputBase-root": {
321
337
  bgcolor: "transparent",
322
- color: L("nodeInputText")
338
+ color: R("nodeInputText")
323
339
  },
324
- "& .MuiOutlinedInput-notchedOutline": { borderColor: L("nodeInputBorder") }
340
+ "& .MuiOutlinedInput-notchedOutline": { borderColor: R("nodeInputBorder") }
325
341
  } : {}
326
342
  }
327
343
  }
@@ -329,99 +345,99 @@ function Oe({
329
345
  }
330
346
  );
331
347
  }
332
- const Pe = { danger: "error.main", warning: "warning.main" }, Be = { ...V, top: 0 }, Te = ({
348
+ const _e = { danger: "error.main", warning: "warning.main" }, Ne = { ...X, top: 0 }, Ve = ({
333
349
  anchorEl: e,
334
350
  open: t,
335
351
  onClose: o,
336
- sections: i
337
- }) => /* @__PURE__ */ n(X, { anchorEl: e, open: t, onClose: o, children: i.flatMap((s, c) => [
338
- ...s.title ? [/* @__PURE__ */ n($, { sx: Be, children: s.title }, `section-${c}`)] : [],
339
- ...s.items.map((u) => /* @__PURE__ */ P(
340
- D,
352
+ sections: u
353
+ }) => /* @__PURE__ */ n(se, { anchorEl: e, open: t, onClose: o, children: u.flatMap((s, c) => [
354
+ ...s.title ? [/* @__PURE__ */ n(A, { sx: Ne, children: s.title }, `section-${c}`)] : [],
355
+ ...s.items.map((i) => /* @__PURE__ */ B(
356
+ G,
341
357
  {
342
358
  dense: !0,
343
- selected: u.selected,
344
- disabled: u.disabled,
345
- onClick: u.onClick,
359
+ selected: i.selected,
360
+ disabled: i.disabled,
361
+ onClick: i.onClick,
346
362
  sx: { pl: 2, gap: 1, alignItems: "flex-start" },
347
363
  children: [
348
- u.icon && /* @__PURE__ */ n(
349
- y,
364
+ i.icon && /* @__PURE__ */ n(
365
+ g,
350
366
  {
351
367
  component: "span",
352
368
  sx: {
353
369
  display: "flex",
354
370
  pt: "2px",
355
- color: u.tone && Pe[u.tone]
371
+ color: i.tone && _e[i.tone]
356
372
  },
357
- children: u.icon
373
+ children: i.icon
358
374
  }
359
375
  ),
360
- /* @__PURE__ */ P(y, { component: "span", sx: { display: "flex", flexDirection: "column" }, children: [
361
- u.label,
362
- u.detail && /* @__PURE__ */ n(y, { component: "span", sx: { fontSize: "0.7rem", color: "text.secondary" }, children: u.detail })
376
+ /* @__PURE__ */ B(g, { component: "span", sx: { display: "flex", flexDirection: "column" }, children: [
377
+ i.label,
378
+ i.detail && /* @__PURE__ */ n(g, { component: "span", sx: { fontSize: "0.7rem", color: "text.secondary" }, children: i.detail })
363
379
  ] })
364
380
  ]
365
381
  },
366
- u.key
382
+ i.key
367
383
  ))
368
- ]) }), z = 38;
369
- function we({
384
+ ]) }), k = 38;
385
+ function $e({
370
386
  items: e,
371
387
  options: t,
372
388
  onChange: o,
373
- canAdd: i,
389
+ canAdd: u,
374
390
  placeholder: s,
375
391
  maxLength: c,
376
- className: u,
377
- grouped: f,
378
- disabled: d
392
+ className: i,
393
+ grouped: p,
394
+ disabled: a
379
395
  }) {
380
- const [b, I] = w(""), [m, h] = w(!1), [S, v] = w(!1), [g, k] = w(0), O = G(null);
381
- K(() => {
382
- var p;
383
- const l = [...O.current.querySelectorAll(".MuiAutocomplete-tag")], a = ((p = l[0]) == null ? void 0 : p.offsetTop) ?? 0;
384
- k(S ? 0 : l.filter((F) => F.offsetTop > a + 4).length);
385
- }, [e, S, g]);
386
- const B = (l) => i && !i(l) ? !1 : (I(""), o == null || o([...e, l]), !0);
387
- return /* @__PURE__ */ P(
388
- y,
396
+ const [b, x] = L(""), [v, f] = L(!1), [S, M] = L(!1), [I, E] = L(0), w = re(null);
397
+ ne(() => {
398
+ var y;
399
+ const l = [...w.current.querySelectorAll(".MuiAutocomplete-tag")], d = ((y = l[0]) == null ? void 0 : y.offsetTop) ?? 0;
400
+ E(S ? 0 : l.filter((F) => F.offsetTop > d + 4).length);
401
+ }, [e, S, I]);
402
+ const O = (l) => u && !u(l) ? !1 : (x(""), o == null || o([...e, l]), !0);
403
+ return /* @__PURE__ */ B(
404
+ g,
389
405
  {
390
- ref: O,
391
- className: u,
406
+ ref: w,
407
+ className: i,
392
408
  sx: { position: "relative", display: "inline-flex" },
393
- onFocus: () => v(!0),
409
+ onFocus: () => M(!0),
394
410
  onBlur: (l) => {
395
411
  if (l.currentTarget.contains(l.relatedTarget)) return;
396
- v(!1);
397
- const a = b.trim();
398
- a !== "" && !B(a) && I(""), h(!1);
412
+ M(!1);
413
+ const d = b.trim();
414
+ d !== "" && !O(d) && x(""), f(!1);
399
415
  },
400
416
  children: [
401
417
  /* @__PURE__ */ n(
402
- j,
418
+ K,
403
419
  {
404
420
  multiple: !0,
405
421
  freeSolo: !t,
406
422
  disableClearable: !0,
407
- disabled: d,
423
+ disabled: a,
408
424
  size: "small",
409
425
  options: t ?? [],
410
426
  value: e,
411
427
  inputValue: b,
412
- onInputChange: (l, a, p) => {
413
- p === "input" && (h(!1), I(a));
428
+ onInputChange: (l, d, y) => {
429
+ y === "input" && (f(!1), x(d));
414
430
  },
415
- onChange: (l, a, p) => {
416
- if (p === "createOption") {
417
- h(!B(String(a[a.length - 1]).trim()));
431
+ onChange: (l, d, y) => {
432
+ if (y === "createOption") {
433
+ f(!O(String(d[d.length - 1]).trim()));
418
434
  return;
419
435
  }
420
- I(""), o == null || o(a);
436
+ x(""), o == null || o(d);
421
437
  },
422
438
  getOptionLabel: (l) => l.label,
423
439
  getOptionKey: (l) => l.key,
424
- isOptionEqualToValue: (l, a) => l.key === a.key,
440
+ isOptionEqualToValue: (l, d) => l.key === d.key,
425
441
  filterSelectedOptions: !0,
426
442
  slotProps: {
427
443
  paper: { className: "w-fit" },
@@ -433,22 +449,22 @@ function we({
433
449
  maxWidth: 360,
434
450
  // (As specific as MUI's own small-field padding, to replace it.)
435
451
  "& .MuiOutlinedInput-root.MuiInputBase-sizeSmall": {
436
- minHeight: z,
452
+ minHeight: k,
437
453
  // A row of chips (24px, 2px margins) fills the 38px exactly.
438
454
  py: "5px",
439
- ...f ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : {},
455
+ ...p ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : {},
440
456
  // Collapsed: one row, room on the right for the `+N`. Clipped,
441
457
  // not hidden: an overflow-hidden box can still be scrolled, and
442
458
  // focusing the input (rows down) scrolls it — left that way once
443
459
  // collapsed again.
444
460
  ...S ? {} : {
445
- maxHeight: z,
461
+ maxHeight: k,
446
462
  overflow: "clip",
447
- ...g > 0 ? {
463
+ ...I > 0 ? {
448
464
  pr: "44px",
449
465
  // The chips past the first row (its first children): the
450
466
  // top of the next row would show in the padding below.
451
- [`& > .MuiAutocomplete-tag:nth-child(n+${e.length - g + 1})`]: {
467
+ [`& > .MuiAutocomplete-tag:nth-child(n+${e.length - I + 1})`]: {
452
468
  visibility: "hidden"
453
469
  }
454
470
  } : {}
@@ -456,10 +472,10 @@ function we({
456
472
  }
457
473
  },
458
474
  renderInput: (l) => /* @__PURE__ */ n(
459
- R,
475
+ C,
460
476
  {
461
477
  ...l,
462
- error: m,
478
+ error: v,
463
479
  placeholder: e.length ? void 0 : s,
464
480
  slotProps: {
465
481
  input: l.InputProps,
@@ -469,16 +485,16 @@ function we({
469
485
  )
470
486
  }
471
487
  ),
472
- g > 0 && /* @__PURE__ */ n(
473
- ne,
488
+ I > 0 && /* @__PURE__ */ n(
489
+ he,
474
490
  {
475
491
  "data-testid": "list-more",
476
492
  size: "small",
477
- label: `+${g}`,
493
+ label: `+${I}`,
478
494
  sx: {
479
495
  position: "absolute",
480
496
  right: 8,
481
- top: (z - 24) / 2,
497
+ top: (k - 24) / 2,
482
498
  pointerEvents: "none"
483
499
  }
484
500
  }
@@ -487,30 +503,32 @@ function we({
487
503
  }
488
504
  );
489
505
  }
490
- const Le = {
491
- Provider: fe,
492
- Tooltip: me,
493
- IconButton: he,
494
- Button: xe,
495
- TextField: be,
496
- Select: Ie,
497
- Combobox: Oe,
498
- Menu: Te,
506
+ const je = {
507
+ Provider: Pe,
508
+ Tooltip: Be,
509
+ IconButton: we,
510
+ Button: Oe,
511
+ TextField: Le,
512
+ Select: Re,
513
+ Combobox: He,
514
+ Menu: Ve,
499
515
  // A light native-date field; the MUI X picker is an opt-in (MuiDatePicker,
500
516
  // `@nongt/visql/mui-date-pickers`) so this kit doesn't need MUI X/date-fns.
501
- DatePicker: Me,
517
+ DatePicker: Ce,
502
518
  // IN's values: an Autocomplete of chips (plain @mui/material).
503
- ListInput: we
504
- }, De = C(
519
+ ListInput: $e,
520
+ // The host's own UI inside the editor, in the host's cache and theme.
521
+ HostContent: Te
522
+ }, et = _(
505
523
  ({ components: e, ...t }, o) => {
506
- const i = _(
507
- () => ({ ...Le, ...e }),
524
+ const u = z(
525
+ () => ({ ...je, ...e }),
508
526
  [e]
509
527
  );
510
- return /* @__PURE__ */ n(Q, { ...t, ref: o, components: i });
528
+ return /* @__PURE__ */ n(ie, { ...t, ref: o, components: u });
511
529
  }
512
530
  );
513
531
  export {
514
- De as QueryBuilder,
515
- Le as muiComponents
532
+ et as QueryBuilder,
533
+ je as muiComponents
516
534
  };