@nongt/visql 0.4.2 → 0.5.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
1
  import { jsx as n, jsxs as P } from "react/jsx-runtime";
2
- import { useMemo as H, useState as w, useRef as A, useLayoutEffect as G } from "react";
3
- import { P as K } from "./PipelineEditor-BoFPDUmi.js";
4
- import Q from "@emotion/cache";
5
- import { CacheProvider as U } from "@emotion/react";
6
- import { TextField as R, Menu as J, ListSubheader as _, MenuItem as $, Box as y, createFilterOptions as X, Autocomplete as D, Select as Y, InputBase as Z, Button as ee, IconButton as te, Tooltip as oe, Chip as re } from "@mui/material";
7
- import { createTheme as ne, alpha as E, ThemeProvider as ie } from "@mui/material/styles";
8
- import le from "clsx";
9
- import { Plus as ue } from "iconoir-react";
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-Cx_c0xZL.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
10
  import { t as L } from "./tokens-BTaVMSOx.js";
11
- import { i as se, f as ce } from "./calendarDate-CYlr9TvX.js";
12
- function ae(e, t) {
13
- return ne({
11
+ import { i as ce, f as ae } from "./calendarDate-CYlr9TvX.js";
12
+ function de(e, t) {
13
+ return ie({
14
14
  palette: {
15
15
  primary: { main: e.accent },
16
16
  secondary: { main: e.secondary },
@@ -68,7 +68,7 @@ function ae(e, t) {
68
68
  }
69
69
  });
70
70
  }
71
- const j = {
71
+ const q = {
72
72
  "& .MuiOutlinedInput-root": {
73
73
  borderTopLeftRadius: 0,
74
74
  borderBottomLeftRadius: 0,
@@ -76,47 +76,51 @@ const j = {
76
76
  }
77
77
  };
78
78
  let W;
79
- function de() {
79
+ function pe() {
80
80
  if (!W) {
81
- const e = Q({ key: "qb" }), t = e.insert.bind(e);
82
- e.insert = (r, u, s, c) => t(
83
- r,
84
- u.styles.startsWith("@layer") ? u : { ...u, styles: `@layer qb-mui {${u.styles}}` },
81
+ const e = U({ key: "qb" }), t = e.insert.bind(e);
82
+ e.insert = (o, i, s, c) => t(
83
+ o,
84
+ i.styles.startsWith("@layer") ? i : { ...i, styles: `@layer qb-mui {${i.styles}}` },
85
85
  s,
86
86
  c
87
87
  ), W = e;
88
88
  }
89
89
  return W;
90
90
  }
91
- const pe = ({ tokens: e, fontFamily: t, children: r }) => {
92
- const u = H(() => ae(e, t), [e, t]);
93
- return /* @__PURE__ */ n(U, { value: de(), children: /* @__PURE__ */ n(ie, { theme: u, children: r }) });
94
- }, me = ({ children: e, ...t }) => /* @__PURE__ */ n(oe, { disableInteractive: !0, ...t, children: e }), fe = ({ children: e, ...t }) => /* @__PURE__ */ n(te, { ...t, children: e }), he = ({ children: e, ...t }) => /* @__PURE__ */ n(ee, { ...t, children: e }), xe = ({
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 = ({
95
99
  value: e,
96
100
  onChange: t,
97
- onBlur: r,
98
- type: u,
101
+ onBlur: o,
102
+ type: i,
99
103
  placeholder: s,
100
104
  className: c,
101
- inputClassName: l,
102
- grouped: m,
105
+ inputClassName: u,
106
+ grouped: f,
103
107
  disabled: d,
104
108
  readOnly: b,
105
109
  inline: I,
106
- maxLength: f
110
+ maxLength: m
107
111
  }) => I ? (
108
112
  // No box: the editor's classes are all there is to it.
109
113
  /* @__PURE__ */ n(
110
- Z,
114
+ ee,
111
115
  {
112
116
  disabled: d,
113
117
  className: c,
114
118
  value: e,
115
119
  onChange: t && ((h) => t(h.currentTarget.value)),
116
- onBlur: r,
120
+ onBlur: o,
117
121
  placeholder: s,
118
122
  sx: { font: "inherit", color: "inherit" },
119
- slotProps: { input: { className: l, readOnly: b, maxLength: f } }
123
+ slotProps: { input: { className: u, readOnly: b, maxLength: m } }
120
124
  }
121
125
  )
122
126
  ) : /* @__PURE__ */ n(
@@ -124,75 +128,75 @@ const pe = ({ tokens: e, fontFamily: t, children: r }) => {
124
128
  {
125
129
  disabled: d,
126
130
  className: c,
127
- sx: m ? j : void 0,
131
+ sx: f ? q : void 0,
128
132
  value: e,
129
133
  onChange: t && ((h) => t(h.currentTarget.value)),
130
- onBlur: r,
131
- type: u,
134
+ onBlur: o,
135
+ type: i,
132
136
  placeholder: s,
133
137
  slotProps: {
134
138
  htmlInput: {
135
- className: l,
139
+ className: u,
136
140
  readOnly: b,
137
- maxLength: f,
138
- ...u === "number" ? { inputMode: "numeric" } : {}
141
+ maxLength: m,
142
+ ...i === "number" ? { inputMode: "numeric" } : {}
139
143
  }
140
144
  }
141
145
  }
142
- ), be = ({
146
+ ), Ie = ({
143
147
  value: e,
144
148
  options: t,
145
- onChange: r,
146
- density: u = "normal",
149
+ onChange: o,
150
+ density: i = "normal",
147
151
  className: s,
148
152
  grouped: c,
149
- disabled: l
153
+ disabled: u
150
154
  }) => {
151
- const m = u === "compact";
155
+ const f = i === "compact";
152
156
  return /* @__PURE__ */ n(
153
- Y,
157
+ Z,
154
158
  {
155
159
  className: s,
156
- disabled: l,
160
+ disabled: u,
157
161
  value: e,
158
- size: m ? "small" : void 0,
159
- onChange: (d) => r(d.target.value),
162
+ size: f ? "small" : void 0,
163
+ onChange: (d) => o(d.target.value),
160
164
  sx: {
161
165
  ...c ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0, height: 38 } : {},
162
- ...m ? { fontSize: "0.75rem", height: 26, ".MuiSelect-select": { py: 0.25 } } : {}
166
+ ...f ? { fontSize: "0.75rem", height: 26, ".MuiSelect-select": { py: 0.25 } } : {}
163
167
  },
164
168
  children: t.map((d) => /* @__PURE__ */ n(
165
- $,
169
+ D,
166
170
  {
167
171
  value: d.value,
168
- dense: m,
169
- sx: m ? { fontSize: "0.75rem" } : void 0,
172
+ dense: f,
173
+ sx: f ? { fontSize: "0.75rem" } : void 0,
170
174
  children: d.label
171
175
  },
172
176
  d.value
173
177
  ))
174
178
  }
175
179
  );
176
- }, Ie = ({
180
+ }, Me = ({
177
181
  value: e,
178
182
  onChange: t,
179
- className: r,
180
- grouped: u,
183
+ className: o,
184
+ grouped: i,
181
185
  disabled: s
182
186
  }) => /* @__PURE__ */ n(
183
187
  R,
184
188
  {
185
189
  type: "date",
186
190
  disabled: s,
187
- className: r,
188
- sx: u ? j : void 0,
189
- value: e ? se(e) : "",
190
- onChange: (c) => t == null ? void 0 : t(ce(c.currentTarget.value))
191
+ 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))
191
195
  }
192
- ), Me = { input: "input", clear: "clear" }, ge = {
196
+ ), ge = { input: "input", clear: "clear" }, ye = {
193
197
  paper: { className: "w-fit" },
194
198
  popper: { sx: { minWidth: "max-content" } }
195
- }, q = {
199
+ }, V = {
196
200
  fontWeight: 700,
197
201
  lineHeight: "32px",
198
202
  borderTop: 1,
@@ -204,7 +208,7 @@ const pe = ({ tokens: e, fontFamily: t, children: r }) => {
204
208
  const t = E(e.text.primary, 0.04);
205
209
  return `linear-gradient(${t}, ${t})`;
206
210
  }
207
- }, ye = { ...q, top: -8, whiteSpace: "nowrap" }, Se = {
211
+ }, Se = { ...V, top: -8, whiteSpace: "nowrap" }, ve = {
208
212
  borderTop: 1,
209
213
  borderColor: "divider",
210
214
  color: "primary.main",
@@ -212,19 +216,19 @@ const pe = ({ tokens: e, fontFamily: t, children: r }) => {
212
216
  gap: 1,
213
217
  whiteSpace: "nowrap"
214
218
  };
215
- function ve({
219
+ function Oe({
216
220
  options: e,
217
221
  value: t,
218
- onChange: r,
219
- inputValue: u,
222
+ onChange: o,
223
+ inputValue: i,
220
224
  onInputChange: s,
221
225
  getOptionLabel: c,
222
- getOptionKey: l,
223
- searchText: m,
226
+ getOptionKey: u,
227
+ searchText: f,
224
228
  groupBy: d,
225
229
  groupTone: b,
226
230
  freeSolo: I,
227
- isAction: f,
231
+ isAction: m,
228
232
  label: h,
229
233
  placeholder: S,
230
234
  noOptionsText: v,
@@ -232,74 +236,74 @@ function ve({
232
236
  className: k,
233
237
  inputClassName: O,
234
238
  grouped: B,
235
- appearance: C = "light",
236
- disabled: i,
239
+ appearance: N = "light",
240
+ disabled: l,
237
241
  autoFocus: a
238
242
  }) {
239
- const p = (o) => typeof o == "string" || !c ? String(o) : c(o), F = (o) => typeof o == "string" || !l ? p(o) : l(o), N = C === "dark", V = X(m ? { stringify: m } : {});
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 } : {});
240
244
  return /* @__PURE__ */ n(
241
- D,
245
+ j,
242
246
  {
243
- filterOptions: (o, x) => {
244
- const M = o.some((T) => p(T).toLowerCase() === x.inputValue.toLowerCase()) ? o : V(o, x);
245
- return f ? o.filter((T) => f(T) || M.includes(T)) : M;
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;
246
250
  },
247
251
  className: k,
248
- disabled: i,
252
+ disabled: l,
249
253
  openOnFocus: a,
250
254
  freeSolo: I,
251
255
  ...v === void 0 ? {} : { noOptionsText: v },
252
256
  forcePopupIcon: I && e.length > 0 ? !0 : "auto",
253
257
  options: e,
254
258
  value: t,
255
- onChange: r && ((o, x) => r(x)),
256
- inputValue: u,
257
- onInputChange: s && ((o, x, M) => s(x, Me[M] ?? "reset")),
259
+ onChange: o && ((r, x) => o(x)),
260
+ inputValue: i,
261
+ onInputChange: s && ((r, x, M) => s(x, ge[M] ?? "reset")),
258
262
  getOptionLabel: p,
259
263
  getOptionKey: F,
260
264
  groupBy: d,
261
- renderGroup: (o) => /* @__PURE__ */ P("li", { children: [
262
- o.group !== "" && /* @__PURE__ */ n(
263
- _,
265
+ renderGroup: (r) => /* @__PURE__ */ P("li", { children: [
266
+ r.group !== "" && /* @__PURE__ */ n(
267
+ $,
264
268
  {
265
269
  component: "div",
266
270
  sx: {
267
- ...ye,
268
- ...(b == null ? void 0 : b(o.group)) === "accent" ? { color: "primary.main" } : {}
271
+ ...Se,
272
+ ...(b == null ? void 0 : b(r.group)) === "accent" ? { color: "primary.main" } : {}
269
273
  },
270
- children: o.group
274
+ children: r.group
271
275
  }
272
276
  ),
273
- /* @__PURE__ */ n(y, { component: "ul", sx: { p: 0 }, children: o.children })
274
- ] }, o.key),
275
- renderOption: ({ key: o, ...x }, M) => f != null && f(M) ? /* @__PURE__ */ P(y, { component: "li", ...x, sx: Se, children: [
276
- /* @__PURE__ */ n(ue, { width: 14, height: 14, strokeWidth: 2.2 }),
277
+ /* @__PURE__ */ n(y, { component: "ul", sx: { p: 0 }, children: r.children })
278
+ ] }, 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 }),
277
281
  p(M)
278
- ] }, o) : /* @__PURE__ */ n("li", { ...x, className: le(x.className, "text-nowrap"), children: p(M) }, o),
279
- slotProps: ge,
282
+ ] }, r) : /* @__PURE__ */ n("li", { ...x, className: ue(x.className, "text-nowrap"), children: p(M) }, r),
283
+ slotProps: ye,
280
284
  sx: {
281
285
  ...B ? {
282
286
  "& .MuiOutlinedInput-root": { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 }
283
287
  } : {},
284
- ...N ? {
288
+ ...H ? {
285
289
  "& .MuiAutocomplete-popupIndicator": { color: L("nodeInputIcon") },
286
290
  "& .MuiAutocomplete-clearIndicator": { color: L("nodeInputIcon") }
287
291
  } : {}
288
292
  },
289
- renderInput: (o) => /* @__PURE__ */ n(
293
+ renderInput: (r) => /* @__PURE__ */ n(
290
294
  R,
291
295
  {
292
- ...o,
296
+ ...r,
293
297
  label: h,
294
298
  placeholder: S,
295
299
  autoFocus: a,
296
300
  slotProps: {
297
- input: o.InputProps,
301
+ input: r.InputProps,
298
302
  // A given inputClassName replaces MUI's own input class (callers
299
303
  // that size the input themselves also set its padding); without
300
304
  // one, MUI's styling stays as is.
301
305
  htmlInput: {
302
- ...o.inputProps,
306
+ ...r.inputProps,
303
307
  ...O ? { className: O } : {},
304
308
  maxLength: g
305
309
  }
@@ -312,7 +316,7 @@ function ve({
312
316
  transform: "translate(15px, -6px) scale(0.75)"
313
317
  }
314
318
  } : {},
315
- ...N ? {
319
+ ...H ? {
316
320
  "& .MuiInputBase-root": {
317
321
  bgcolor: "transparent",
318
322
  color: L("nodeInputText")
@@ -325,77 +329,77 @@ function ve({
325
329
  }
326
330
  );
327
331
  }
328
- const Oe = { danger: "error.main", warning: "warning.main" }, Pe = { ...q, top: 0 }, Be = ({
332
+ const Pe = { danger: "error.main", warning: "warning.main" }, Be = { ...V, top: 0 }, Te = ({
329
333
  anchorEl: e,
330
334
  open: t,
331
- onClose: r,
332
- sections: u
333
- }) => /* @__PURE__ */ n(J, { anchorEl: e, open: t, onClose: r, children: u.flatMap((s, c) => [
334
- ...s.title ? [/* @__PURE__ */ n(_, { sx: Pe, children: s.title }, `section-${c}`)] : [],
335
- ...s.items.map((l) => /* @__PURE__ */ P(
336
- $,
335
+ 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,
337
341
  {
338
342
  dense: !0,
339
- selected: l.selected,
340
- disabled: l.disabled,
341
- onClick: l.onClick,
343
+ selected: u.selected,
344
+ disabled: u.disabled,
345
+ onClick: u.onClick,
342
346
  sx: { pl: 2, gap: 1, alignItems: "flex-start" },
343
347
  children: [
344
- l.icon && /* @__PURE__ */ n(
348
+ u.icon && /* @__PURE__ */ n(
345
349
  y,
346
350
  {
347
351
  component: "span",
348
352
  sx: {
349
353
  display: "flex",
350
354
  pt: "2px",
351
- color: l.tone && Oe[l.tone]
355
+ color: u.tone && Pe[u.tone]
352
356
  },
353
- children: l.icon
357
+ children: u.icon
354
358
  }
355
359
  ),
356
360
  /* @__PURE__ */ P(y, { component: "span", sx: { display: "flex", flexDirection: "column" }, children: [
357
- l.label,
358
- l.detail && /* @__PURE__ */ n(y, { component: "span", sx: { fontSize: "0.7rem", color: "text.secondary" }, children: l.detail })
361
+ u.label,
362
+ u.detail && /* @__PURE__ */ n(y, { component: "span", sx: { fontSize: "0.7rem", color: "text.secondary" }, children: u.detail })
359
363
  ] })
360
364
  ]
361
365
  },
362
- l.key
366
+ u.key
363
367
  ))
364
368
  ]) }), z = 38;
365
- function Te({
369
+ function we({
366
370
  items: e,
367
371
  options: t,
368
- onChange: r,
369
- canAdd: u,
372
+ onChange: o,
373
+ canAdd: i,
370
374
  placeholder: s,
371
375
  maxLength: c,
372
- className: l,
373
- grouped: m,
376
+ className: u,
377
+ grouped: f,
374
378
  disabled: d
375
379
  }) {
376
- const [b, I] = w(""), [f, h] = w(!1), [S, v] = w(!1), [g, k] = w(0), O = A(null);
377
- G(() => {
380
+ const [b, I] = w(""), [m, h] = w(!1), [S, v] = w(!1), [g, k] = w(0), O = G(null);
381
+ K(() => {
378
382
  var p;
379
- const i = [...O.current.querySelectorAll(".MuiAutocomplete-tag")], a = ((p = i[0]) == null ? void 0 : p.offsetTop) ?? 0;
380
- k(S ? 0 : i.filter((F) => F.offsetTop > a + 4).length);
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);
381
385
  }, [e, S, g]);
382
- const B = (i) => u && !u(i) ? !1 : (I(""), r == null || r([...e, i]), !0);
386
+ const B = (l) => i && !i(l) ? !1 : (I(""), o == null || o([...e, l]), !0);
383
387
  return /* @__PURE__ */ P(
384
388
  y,
385
389
  {
386
390
  ref: O,
387
- className: l,
391
+ className: u,
388
392
  sx: { position: "relative", display: "inline-flex" },
389
393
  onFocus: () => v(!0),
390
- onBlur: (i) => {
391
- if (i.currentTarget.contains(i.relatedTarget)) return;
394
+ onBlur: (l) => {
395
+ if (l.currentTarget.contains(l.relatedTarget)) return;
392
396
  v(!1);
393
397
  const a = b.trim();
394
398
  a !== "" && !B(a) && I(""), h(!1);
395
399
  },
396
400
  children: [
397
401
  /* @__PURE__ */ n(
398
- D,
402
+ j,
399
403
  {
400
404
  multiple: !0,
401
405
  freeSolo: !t,
@@ -405,19 +409,19 @@ function Te({
405
409
  options: t ?? [],
406
410
  value: e,
407
411
  inputValue: b,
408
- onInputChange: (i, a, p) => {
412
+ onInputChange: (l, a, p) => {
409
413
  p === "input" && (h(!1), I(a));
410
414
  },
411
- onChange: (i, a, p) => {
415
+ onChange: (l, a, p) => {
412
416
  if (p === "createOption") {
413
417
  h(!B(String(a[a.length - 1]).trim()));
414
418
  return;
415
419
  }
416
- I(""), r == null || r(a);
420
+ I(""), o == null || o(a);
417
421
  },
418
- getOptionLabel: (i) => i.label,
419
- getOptionKey: (i) => i.key,
420
- isOptionEqualToValue: (i, a) => i.key === a.key,
422
+ getOptionLabel: (l) => l.label,
423
+ getOptionKey: (l) => l.key,
424
+ isOptionEqualToValue: (l, a) => l.key === a.key,
421
425
  filterSelectedOptions: !0,
422
426
  slotProps: {
423
427
  paper: { className: "w-fit" },
@@ -432,7 +436,7 @@ function Te({
432
436
  minHeight: z,
433
437
  // A row of chips (24px, 2px margins) fills the 38px exactly.
434
438
  py: "5px",
435
- ...m ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : {},
439
+ ...f ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : {},
436
440
  // Collapsed: one row, room on the right for the `+N`. Clipped,
437
441
  // not hidden: an overflow-hidden box can still be scrolled, and
438
442
  // focusing the input (rows down) scrolls it — left that way once
@@ -451,22 +455,22 @@ function Te({
451
455
  }
452
456
  }
453
457
  },
454
- renderInput: (i) => /* @__PURE__ */ n(
458
+ renderInput: (l) => /* @__PURE__ */ n(
455
459
  R,
456
460
  {
457
- ...i,
458
- error: f,
461
+ ...l,
462
+ error: m,
459
463
  placeholder: e.length ? void 0 : s,
460
464
  slotProps: {
461
- input: i.InputProps,
462
- htmlInput: { ...i.inputProps, maxLength: c }
465
+ input: l.InputProps,
466
+ htmlInput: { ...l.inputProps, maxLength: c }
463
467
  }
464
468
  }
465
469
  )
466
470
  }
467
471
  ),
468
472
  g > 0 && /* @__PURE__ */ n(
469
- re,
473
+ ne,
470
474
  {
471
475
  "data-testid": "list-more",
472
476
  size: "small",
@@ -483,28 +487,30 @@ function Te({
483
487
  }
484
488
  );
485
489
  }
486
- const we = {
487
- Provider: pe,
490
+ const Le = {
491
+ Provider: fe,
488
492
  Tooltip: me,
489
- IconButton: fe,
490
- Button: he,
491
- TextField: xe,
492
- Select: be,
493
- Combobox: ve,
494
- Menu: Be,
493
+ IconButton: he,
494
+ Button: xe,
495
+ TextField: be,
496
+ Select: Ie,
497
+ Combobox: Oe,
498
+ Menu: Te,
495
499
  // A light native-date field; the MUI X picker is an opt-in (MuiDatePicker,
496
500
  // `@nongt/visql/mui-date-pickers`) so this kit doesn't need MUI X/date-fns.
497
- DatePicker: Ie,
501
+ DatePicker: Me,
498
502
  // IN's values: an Autocomplete of chips (plain @mui/material).
499
- ListInput: Te
500
- }, $e = ({ components: e, ...t }) => {
501
- const r = H(
502
- () => ({ ...we, ...e }),
503
- [e]
504
- );
505
- return /* @__PURE__ */ n(K, { ...t, components: r });
506
- };
503
+ ListInput: we
504
+ }, De = C(
505
+ ({ components: e, ...t }, o) => {
506
+ const i = _(
507
+ () => ({ ...Le, ...e }),
508
+ [e]
509
+ );
510
+ return /* @__PURE__ */ n(Q, { ...t, ref: o, components: i });
511
+ }
512
+ );
507
513
  export {
508
- $e as QueryBuilder,
509
- we as muiComponents
514
+ De as QueryBuilder,
515
+ Le as muiComponents
510
516
  };
@@ -5,8 +5,7 @@ import type { DatePickerProps } from '../../core/ui/types.js';
5
5
  *
6
6
  * <QueryBuilder components={{ DatePicker: MuiDatePicker }} />
7
7
  *
8
- * Needs @mui/x-date-pickers and date-fns. Brings its own date-fns adapter,
9
- * or uses the host's LocalizationProvider (its locale/adapter) if there is
10
- * one. */
8
+ * Needs a LocalizationProvider above it: the entries wrap it in one (see
9
+ * muiPickers.tsx, hostPickers.tsx). */
11
10
  declare const MuiDatePicker: ({ className, grouped, value, onChange, disabled, }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
12
11
  export default MuiDatePicker;
@@ -1,5 +1,5 @@
1
1
  import type { UIComponents } from '../../core/ui/types.js';
2
- import { type PipelineEditorProps } from '../../features/queryEditor/PipelineEditor.js';
2
+ import { type PipelineEditorHandle, type PipelineEditorProps } from '../../features/queryEditor/PipelineEditor.js';
3
3
  export interface MuiQueryBuilderProps extends Omit<PipelineEditorProps, 'components'> {
4
4
  /** Override single UI primitives; everything else is the MUI kit. */
5
5
  components?: Partial<UIComponents>;
@@ -8,5 +8,5 @@ export interface MuiQueryBuilderProps extends Omit<PipelineEditorProps, 'compone
8
8
  * want. Needs @mui/material, @emotion/react, @emotion/styled and
9
9
  * @emotion/cache installed (plus @mui/x-date-pickers and date-fns only when
10
10
  * plugging in MuiDatePicker from `@nongt/visql/mui-date-pickers`). */
11
- declare const QueryBuilder: ({ components, ...props }: MuiQueryBuilderProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const QueryBuilder: import("react").ForwardRefExoticComponent<MuiQueryBuilderProps & import("react").RefAttributes<PipelineEditorHandle>>;
12
12
  export default QueryBuilder;
@@ -3,8 +3,8 @@ import type { ButtonProps, ComboboxProps, DatePickerProps, IconButtonProps, Menu
3
3
  * up: the editor's emotion cache and theme (built from the color tokens). */
4
4
  export declare const MuiProvider: ({ tokens, fontFamily, children }: UIProviderProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export declare const MuiTooltip: ({ children, ...rest }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
6
- export declare const MuiIconButton: ({ children, ...rest }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
7
- export declare const MuiButton: ({ children, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
6
+ export declare const MuiIconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
7
+ export declare const MuiButton: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
8
8
  export declare const MuiTextField: ({ value, onChange, onBlur, type, placeholder, className, inputClassName, grouped, disabled, readOnly, inline, maxLength, }: TextFieldProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export declare const MuiSelect: ({ value, options, onChange, density, className, grouped, disabled, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
10
10
  /** The kit's default date input: a plain MUI text field of type "date"
@@ -0,0 +1,8 @@
1
+ import { type ComponentType } from 'react';
2
+ /** `Picker`, which needs the app's LocalizationProvider above the editor:
3
+ * without one it throws, saying so. Its adapter must work with `Date`
4
+ * values (a date-fns one, any version). */
5
+ export default function withHostPickers<P extends object>(Picker: ComponentType<P>): {
6
+ (props: P): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
@@ -1,6 +1,7 @@
1
- import { type ReactNode } from 'react';
2
- /** `children` with a date-fns adapter — or the host's LocalizationProvider
1
+ import { type ComponentType } from 'react';
2
+ /** `Picker` with a date-fns adapter — or the host's LocalizationProvider
3
3
  * (its locale and adapter) when there is one. */
4
- export default function PickersProvider({ children }: {
5
- children: ReactNode;
6
- }): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
4
+ export default function withDateFns<P extends object>(Picker: ComponentType<P>): {
5
+ (props: P): import("react/jsx-runtime").JSX.Element;
6
+ displayName: string;
7
+ };
@@ -1,7 +1,7 @@
1
1
  import type { ButtonProps, ComboboxProps, DatePickerProps, DateTimePickerProps, TimePickerProps, IconButtonProps, ListInputProps, MenuProps, SelectProps, TextFieldProps, TooltipProps } from './types.js';
2
2
  export declare const Tooltip: (props: TooltipProps) => import("react/jsx-runtime").JSX.Element;
3
- export declare const IconButton: ({ navigation, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
4
- export declare const Button: ({ showsValue, pressed, ...rest }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
4
+ export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
5
5
  export declare const TextField: (props: TextFieldProps) => import("react/jsx-runtime").JSX.Element;
6
6
  export declare const Select: (props: SelectProps) => import("react/jsx-runtime").JSX.Element;
7
7
  export declare function Combobox<T>(props: ComboboxProps<T>): import("react/jsx-runtime").JSX.Element;