@oomol-lab/open-flow 0.1.0-alpha.8 → 0.1.0-beta.1

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 (55) hide show
  1. package/README.md +5 -1
  2. package/dist/browser/{createResourceDialog-A64dDFCG.js → createResourceDialog-DXQz0thK.js} +228 -191
  3. package/dist/browser/diagnostics-BGoGFvHA.js +9237 -0
  4. package/dist/browser/{dist-DhsGR_K3.js → dist-3Mj8q8Pr.js} +27 -27
  5. package/dist/browser/{dist-n9WmBm5w.js → dist-BKuSVKCC.js} +1 -1
  6. package/dist/browser/{dist-DQVavPcf.js → dist-BMqL-qR5.js} +469 -903
  7. package/dist/browser/{dist-D5mdziGP.js → dist-BN4ZCyOB.js} +9 -9
  8. package/dist/browser/{dist-CVtP-E2c.js → dist-BpopSHwP.js} +1 -1
  9. package/dist/browser/{dist-B0Q2Mn0n.js → dist-CJpzJrLM.js} +191 -191
  10. package/dist/browser/{dist-DXgEYMFx.js → dist-CPuF50D9.js} +196 -196
  11. package/dist/browser/{dist-CUkceEvN.js → dist-CUSrALSX.js} +113 -113
  12. package/dist/browser/dist-CeSZ2xSM.js +444 -0
  13. package/dist/browser/{dist-Bc9TvHYl.js → dist-DUzA0Ukh.js} +20 -20
  14. package/dist/browser/{dist-DWzdGVm9.js → dist-DWADUsVB.js} +74 -74
  15. package/dist/browser/{esm-YIGXG-Js.js → esm-DGQbgYoJ.js} +13 -13
  16. package/dist/browser/flow-authoring-node.d.ts +3 -1
  17. package/dist/browser/flow-authoring.d.ts +2 -1
  18. package/dist/browser/flow-authoring.js +386 -96
  19. package/dist/browser/flow-change.d.ts +9 -4
  20. package/dist/browser/flow-change.js +49 -46
  21. package/dist/browser/{flowRunInputEditorStore-DXOyyY7o.js → flowRunInputEditorStore-BeyUSWpO.js} +1644 -908
  22. package/dist/browser/{flowWorkspace-D7-rBA1-.js → flowWorkspace-DwyxAOBH.js} +18384 -16381
  23. package/dist/browser/getPseudoElementBounds-ESJExRFX.js +7642 -0
  24. package/dist/browser/languages-DgJehE1g.js +62 -0
  25. package/dist/browser/lib-C5Ipyfps.js +7856 -0
  26. package/dist/browser/licenses.md +119 -1
  27. package/dist/browser/main-DmjVyuWr.js +76 -0
  28. package/dist/browser/{markdownContent-ColGUxHy.js → markdownContent-DdlIRN3_.js} +4811 -4795
  29. package/dist/browser/theme.css +63 -0
  30. package/dist/browser/theme.css.d.ts +1 -0
  31. package/dist/browser/typeScriptSession-mPCiA9sV.js +2579 -0
  32. package/dist/browser/workbench-contract.d.ts +2 -1
  33. package/dist/browser/workbench.css +1 -1
  34. package/dist/browser/workbench.d.ts +45 -1
  35. package/dist/browser/workbench.js +982 -1328
  36. package/dist/browser/workbenchSelect-B2s1HV-Y.js +1374 -0
  37. package/dist/common/connector-action.d.ts +6 -0
  38. package/dist/common/connector-action.js +37 -29
  39. package/dist/common/control-api-conformance.js +45 -4
  40. package/dist/common/control-api-errors.d.ts +16 -0
  41. package/dist/common/control-api.d.ts +20 -6
  42. package/dist/common/control-api.js +151 -95
  43. package/dist/common/flow-encoding.d.ts +2 -2
  44. package/dist/common/flow-encoding.js +4 -1
  45. package/dist/common/flow-semantics.d.ts +3 -0
  46. package/dist/common/flow-semantics.js +939 -844
  47. package/dist/common/licenses.md +1 -25
  48. package/dist/common/localization.d.ts +21 -0
  49. package/dist/common/localization.js +62 -0
  50. package/dist/common/scheduler.d.ts +5 -5
  51. package/dist/common/scheduler.js +250 -236
  52. package/package.json +10 -1
  53. package/dist/browser/addNodeOptions-DRndy4EK.js +0 -6910
  54. package/dist/browser/createLucideIcon-CqjqCezK.js +0 -5537
  55. package/dist/browser/field-CKGQHCIi.js +0 -312
@@ -1,10 +1,11 @@
1
- import { A as e, At as t, Bn as n, D as r, Gn as i, Jn as a, O as o, On as s, Ot as c, Pr as l, R as u, S as d, T as f, Wn as p, Y as m, _ as h, b as g, c as _, ct as v, dt as y, er as b, ht as x, it as S, j as C, kn as w, lr as T, lt as E, nt as D, rr as O, st as k, t as A, v as j, y as M } from "./createLucideIcon-CqjqCezK.js";
2
- import { a as N, c as P, d as ee, i as te, l as ne, n as F, o as I, r as L, s as re, t as ie, u as ae } from "./field-CKGQHCIi.js";
1
+ import { a as e } from "./main-DmjVyuWr.js";
2
+ import { B as t, Ct as n, F as r, Ft as i, It as a, Jn as o, Kn as s, L as c, Lt as l, M as u, Mt as d, Nn as f, Ot as p, P as m, Pn as h, Qn as g, R as _, Tt as v, Ut as y, V as b, Vn as x, W as S, Xn as C, Yn as w, Z as T, an as E, c as D, er as O, et as ee, fr as k, i as A, lr as j, lt as M, n as te, nn as N, nt as P, o as ne, p as F, qn as I, rr as L, vr as re, x as ie, z as ae, zt as oe } from "./getPseudoElementBounds-ESJExRFX.js";
3
+ import { t as se } from "./workbenchSelect-B2s1HV-Y.js";
3
4
  import * as R from "react";
4
- import { useEffect as oe, useRef as z, useState as se } from "react";
5
- import { Fragment as ce, jsx as B, jsxs as V } from "react/jsx-runtime";
5
+ import { useEffect as ce, useRef as z, useState as le } from "react";
6
+ import { Fragment as ue, jsx as B, jsxs as V } from "react/jsx-runtime";
6
7
  //#region ../../node_modules/.bun/lucide-react@0.468.0+f4eacebf2041cd4f/node_modules/lucide-react/dist/esm/icons/x.js
7
- var H = A("X", [["path", {
8
+ var H = i("X", [["path", {
8
9
  d: "M18 6 6 18",
9
10
  key: "1bl5f8"
10
11
  }], ["path", {
@@ -14,52 +15,52 @@ var H = A("X", [["path", {
14
15
  process.env.NODE_ENV !== "production" && (U.displayName = "DialogRootContext");
15
16
  function W(e) {
16
17
  let t = R.useContext(U);
17
- if (e === !1 && t === void 0) throw Error(process.env.NODE_ENV === "production" ? O(27) : "Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");
18
+ if (e === !1 && t === void 0) throw Error(process.env.NODE_ENV === "production" ? k(27) : "Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");
18
19
  return t;
19
20
  }
20
21
  //#endregion
21
22
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/backdrop/DialogBackdrop.js
22
- var le = {
23
- ...d,
24
- ...t
23
+ var de = {
24
+ ...v,
25
+ ...E
25
26
  }, G = /*#__PURE__*/ R.forwardRef(function(e, t) {
26
- let { render: n, className: r, style: i, forceRender: o = !1, ...s } = e, { store: c } = W(), l = c.useState("open"), u = c.useState("nested"), d = c.useState("mounted"), f = {
27
- open: l,
28
- transitionStatus: c.useState("transitionStatus")
27
+ let { render: n, className: r, style: i, forceRender: a = !1, ...o } = e, { store: s } = W(), c = s.useState("open"), l = s.useState("nested"), u = s.useState("mounted"), d = {
28
+ open: c,
29
+ transitionStatus: s.useState("transitionStatus")
29
30
  };
30
- return a("div", e, {
31
- state: f,
32
- ref: [c.context.backdropRef, t],
33
- stateAttributesMapping: le,
31
+ return L("div", e, {
32
+ state: d,
33
+ ref: [s.context.backdropRef, t],
34
+ stateAttributesMapping: de,
34
35
  props: [{
35
36
  role: "presentation",
36
- hidden: !d,
37
+ hidden: !u,
37
38
  style: {
38
39
  userSelect: "none",
39
40
  WebkitUserSelect: "none"
40
41
  }
41
- }, s],
42
- enabled: o || !u
42
+ }, o],
43
+ enabled: a || !l
43
44
  });
44
45
  });
45
46
  process.env.NODE_ENV !== "production" && (G.displayName = "DialogBackdrop");
46
47
  //#endregion
47
48
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/close/DialogClose.js
48
49
  var K = /*#__PURE__*/ R.forwardRef(function(e, t) {
49
- let { render: n, className: r, disabled: i = !1, nativeButton: o = !0, style: s, ...c } = e, { store: l } = W(), u = l.useState("open");
50
+ let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, style: o, ...s } = e, { store: c } = W(), u = c.useState("open");
50
51
  function d(e) {
51
- u && l.setOpen(!1, E(y, e.nativeEvent));
52
+ u && c.setOpen(!1, l(oe, e.nativeEvent));
52
53
  }
53
- let { getButtonProps: f, buttonRef: p } = b({
54
+ let { getButtonProps: f, buttonRef: p } = j({
54
55
  disabled: i,
55
- native: o
56
+ native: a
56
57
  });
57
- return a("button", e, {
58
+ return L("button", e, {
58
59
  state: { disabled: i },
59
60
  ref: [t, p],
60
61
  props: [
61
62
  { onClick: d },
62
- c,
63
+ s,
63
64
  f
64
65
  ]
65
66
  });
@@ -67,76 +68,76 @@ var K = /*#__PURE__*/ R.forwardRef(function(e, t) {
67
68
  process.env.NODE_ENV !== "production" && (K.displayName = "DialogClose");
68
69
  //#endregion
69
70
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/popup/DialogPopupCssVars.js
70
- var ue = /*#__PURE__*/ function(e) {
71
+ var fe = /*#__PURE__*/ function(e) {
71
72
  return e.nestedDialogs = "--nested-dialogs", e;
72
- }({}), de = function(e) {
73
- return e[e.open = g.open] = "open", e[e.closed = g.closed] = "closed", e[e.startingStyle = g.startingStyle] = "startingStyle", e[e.endingStyle = g.endingStyle] = "endingStyle", e.nested = "data-nested", e.nestedDialogOpen = "data-nested-dialog-open", e;
73
+ }({}), pe = function(e) {
74
+ return e[e.open = n.open] = "open", e[e.closed = n.closed] = "closed", e[e.startingStyle = n.startingStyle] = "startingStyle", e[e.endingStyle = n.endingStyle] = "endingStyle", e.nested = "data-nested", e.nestedDialogOpen = "data-nested-dialog-open", e;
74
75
  }({}), q = /*#__PURE__*/ R.createContext(void 0);
75
76
  process.env.NODE_ENV !== "production" && (q.displayName = "DialogPortalContext");
76
- function fe() {
77
+ function me() {
77
78
  let e = R.useContext(q);
78
- if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? O(26) : "Base UI: <Dialog.Portal> is missing.");
79
+ if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? k(26) : "Base UI: <Dialog.Portal> is missing.");
79
80
  return e;
80
81
  }
81
82
  //#endregion
82
83
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/popup/DialogPopup.js
83
- var pe = {
84
- ...d,
85
- ...t,
84
+ var he = {
85
+ ...v,
86
+ ...E,
86
87
  nestedDialogOpen(e) {
87
- return e ? { [de.nestedDialogOpen]: "" } : null;
88
+ return e ? { [pe.nestedDialogOpen]: "" } : null;
88
89
  }
89
90
  }, J = /*#__PURE__*/ R.forwardRef(function(e, t) {
90
- let { className: n, finalFocus: r, initialFocus: i, render: o, style: s, ...l } = e, { store: u } = W(), d = u.useState("descriptionElementId"), f = u.useState("disablePointerDismissal"), p = u.useState("floatingRootContext"), m = u.useState("popupProps"), h = u.useState("modal"), g = u.useState("mounted"), v = u.useState("nested"), y = u.useState("nestedOpenDialogCount"), b = u.useState("open"), x = u.useState("openMethod"), S = u.useState("titleElementId"), w = u.useState("transitionStatus"), T = u.useState("role");
91
- fe(), c({
92
- open: b,
93
- ref: u.context.popupRef,
91
+ let { className: n, finalFocus: r, initialFocus: i, render: a, style: o, ...s } = e, { store: c } = W(), l = c.useState("descriptionElementId"), u = c.useState("disablePointerDismissal"), d = c.useState("floatingRootContext"), f = c.useState("popupProps"), p = c.useState("modal"), m = c.useState("mounted"), h = c.useState("nested"), g = c.useState("nestedOpenDialogCount"), _ = c.useState("open"), v = c.useState("openMethod"), y = c.useState("titleElementId"), b = c.useState("transitionStatus"), x = c.useState("role");
92
+ me(), N({
93
+ open: _,
94
+ ref: c.context.popupRef,
94
95
  onComplete() {
95
- b && u.context.onOpenChangeComplete?.(!0);
96
+ _ && c.context.onOpenChangeComplete?.(!0);
96
97
  }
97
98
  });
98
- function E(e) {
99
- return e !== "touch" || u.context.popupRef.current;
99
+ function S(e) {
100
+ return e !== "touch" || c.context.popupRef.current;
100
101
  }
101
- let D = i === void 0 ? E : i, O = a("div", e, {
102
+ let C = i === void 0 ? S : i, w = L("div", e, {
102
103
  state: {
103
- open: b,
104
- nested: v,
105
- transitionStatus: w,
106
- nestedDialogOpen: y > 0
104
+ open: _,
105
+ nested: h,
106
+ transitionStatus: b,
107
+ nestedDialogOpen: g > 0
107
108
  },
108
109
  props: [
109
- m,
110
+ f,
110
111
  {
111
- "aria-labelledby": S ?? void 0,
112
- "aria-describedby": d ?? void 0,
113
- role: T,
112
+ "aria-labelledby": y ?? void 0,
113
+ "aria-describedby": l ?? void 0,
114
+ role: x,
114
115
  tabIndex: -1,
115
- hidden: !g,
116
+ hidden: !m,
116
117
  onKeyDown(e) {
117
- _.has(e.key) && e.stopPropagation();
118
+ ie.has(e.key) && e.stopPropagation();
118
119
  },
119
- style: { [ue.nestedDialogs]: y }
120
+ style: { [fe.nestedDialogs]: g }
120
121
  },
121
- l
122
+ s
122
123
  ],
123
124
  ref: [
124
125
  t,
125
- u.context.popupRef,
126
- u.useStateSetter("popupElement")
126
+ c.context.popupRef,
127
+ c.useStateSetter("popupElement")
127
128
  ],
128
- stateAttributesMapping: pe
129
+ stateAttributesMapping: he
129
130
  });
130
- return /*#__PURE__*/ B(C, {
131
- context: p,
132
- openInteractionType: x,
133
- disabled: !g,
134
- closeOnFocusOut: !f,
135
- initialFocus: D,
131
+ return /*#__PURE__*/ B(P, {
132
+ context: d,
133
+ openInteractionType: v,
134
+ disabled: !m,
135
+ closeOnFocusOut: !u,
136
+ initialFocus: C,
136
137
  returnFocus: r,
137
- modal: h !== !1,
138
+ modal: p !== !1,
138
139
  restoreFocus: "popup",
139
- children: O
140
+ children: w
140
141
  });
141
142
  });
142
143
  process.env.NODE_ENV !== "production" && (J.displayName = "DialogPopup");
@@ -146,12 +147,12 @@ var Y = /*#__PURE__*/ R.forwardRef(function(e, t) {
146
147
  let { keepMounted: n = !1, ...r } = e, { store: i } = W(), a = i.useState("mounted"), o = i.useState("modal"), s = i.useState("open");
147
148
  return a || n ? /*#__PURE__*/ B(q.Provider, {
148
149
  value: n,
149
- children: /*#__PURE__*/ V(u, {
150
+ children: /*#__PURE__*/ V(M, {
150
151
  ref: t,
151
152
  ...r,
152
- children: [a && o === !0 && /*#__PURE__*/ B(j, {
153
+ children: [a && o === !0 && /*#__PURE__*/ B(D, {
153
154
  ref: i.context.internalBackdropRef,
154
- inert: M(!s)
155
+ inert: F(!s)
155
156
  }), e.children]
156
157
  })
157
158
  }) : null;
@@ -159,89 +160,89 @@ var Y = /*#__PURE__*/ R.forwardRef(function(e, t) {
159
160
  process.env.NODE_ENV !== "production" && (Y.displayName = "DialogPortal");
160
161
  //#endregion
161
162
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/root/useDialogRoot.js
162
- function me(t) {
163
- let { store: n, parentContext: i, actionsRef: a, isDrawer: o } = t, c = n.useState("open"), l = n.useState("disablePointerDismissal"), u = n.useState("modal"), d = n.useState("popupElement"), { openMethod: p, triggerProps: m } = f(c);
164
- ae(n);
165
- let { forceUnmount: g } = ee(c, n), _ = R.useCallback(() => {
166
- n.setOpen(!1, E(x));
163
+ function ge(e) {
164
+ let { store: n, parentContext: i, actionsRef: a, isDrawer: o } = e, s = n.useState("open"), c = n.useState("disablePointerDismissal"), d = n.useState("modal"), p = n.useState("popupElement"), { openMethod: g, triggerProps: _ } = te(s);
165
+ t(n);
166
+ let { forceUnmount: v } = b(s, n), x = R.useCallback(() => {
167
+ n.setOpen(!1, l(y));
167
168
  }, [n]);
168
169
  R.useImperativeHandle(a, () => ({
169
- unmount: g,
170
- close: _
171
- }), [g, _]);
172
- let v = re({
170
+ unmount: v,
171
+ close: x
172
+ }), [v, x]);
173
+ let S = r({
173
174
  popupStore: n,
174
175
  onOpenChange: n.setOpen,
175
176
  treatPopupAsFloatingElement: !0
176
- }), [y, b] = R.useState(0), [S, C] = R.useState(0), T = y === 0, D = I(v), O = e(v, {
177
+ }), [C, w] = R.useState(0), [T, E] = R.useState(0), D = C === 0, O = u(S), k = ee(S, {
177
178
  outsidePressEvent() {
178
179
  return n.context.internalBackdropRef.current || n.context.backdropRef.current ? "intentional" : {
179
- mouse: u === "trap-focus" ? "sloppy" : "intentional",
180
+ mouse: d === "trap-focus" ? "sloppy" : "intentional",
180
181
  touch: "sloppy"
181
182
  };
182
183
  },
183
184
  outsidePress(e) {
184
185
  if (!n.context.outsidePressEnabledRef.current || "button" in e && e.button !== 0 || "touches" in e && e.touches.length !== 1) return !1;
185
- let t = w(e);
186
- if (T && !l) {
186
+ let t = h(e);
187
+ if (D && !c) {
187
188
  let e = t;
188
- return u && (n.context.internalBackdropRef.current || n.context.backdropRef.current) ? n.context.internalBackdropRef.current === e || n.context.backdropRef.current === e || s(e, d) && !e?.hasAttribute("data-base-ui-portal") : !0;
189
+ return d && (n.context.internalBackdropRef.current || n.context.backdropRef.current) ? n.context.internalBackdropRef.current === e || n.context.backdropRef.current === e || f(e, p) && !e?.hasAttribute("data-base-ui-portal") : !0;
189
190
  }
190
191
  return !1;
191
192
  },
192
- escapeKey: T
193
+ escapeKey: D
193
194
  });
194
- h(c && u === !0, d);
195
- let { getReferenceProps: k, getFloatingProps: A, getTriggerProps: j } = r([D, O]);
195
+ ne(s && d === !0, p);
196
+ let { getReferenceProps: A, getFloatingProps: j, getTriggerProps: M } = m([O, k]);
196
197
  n.useContextCallback("onNestedDialogOpen", (e, t) => {
197
- b(e), C(t);
198
+ w(e), E(t);
198
199
  }), n.useContextCallback("onNestedDialogClose", () => {
199
- b(0), C(0);
200
- }), R.useEffect(() => (i?.onNestedDialogOpen && c && i.onNestedDialogOpen(y + 1, S + +!!o), i?.onNestedDialogClose && !c && i.onNestedDialogClose(), () => {
201
- i?.onNestedDialogClose && c && i.onNestedDialogClose();
200
+ w(0), E(0);
201
+ }), R.useEffect(() => (i?.onNestedDialogOpen && s && i.onNestedDialogOpen(C + 1, T + +!!o), i?.onNestedDialogClose && !s && i.onNestedDialogClose(), () => {
202
+ i?.onNestedDialogClose && s && i.onNestedDialogClose();
202
203
  }), [
203
204
  o,
204
- c,
205
- y,
206
- S,
205
+ s,
206
+ C,
207
+ T,
207
208
  i
208
209
  ]);
209
- let M = R.useMemo(() => k(m), [k, m]), N = R.useMemo(() => j(m), [j, m]), P = R.useMemo(() => A(), [A]);
210
+ let N = R.useMemo(() => A(_), [A, _]), P = R.useMemo(() => M(_), [M, _]), F = R.useMemo(() => j(), [j]);
210
211
  n.useSyncedValues({
211
- openMethod: p,
212
- activeTriggerProps: M,
213
- inactiveTriggerProps: N,
214
- popupProps: P,
215
- floatingRootContext: v,
216
- nestedOpenDialogCount: y,
217
- nestedOpenDrawerCount: S
212
+ openMethod: g,
213
+ activeTriggerProps: N,
214
+ inactiveTriggerProps: P,
215
+ popupProps: F,
216
+ floatingRootContext: S,
217
+ nestedOpenDialogCount: C,
218
+ nestedOpenDrawerCount: T
218
219
  });
219
220
  }
220
221
  //#endregion
221
222
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/store/DialogStore.js
222
- var he = {
223
- ...ne,
224
- modal: D((e) => e.modal),
225
- nested: D((e) => e.nested),
226
- nestedOpenDialogCount: D((e) => e.nestedOpenDialogCount),
227
- nestedOpenDrawerCount: D((e) => e.nestedOpenDrawerCount),
228
- disablePointerDismissal: D((e) => e.disablePointerDismissal),
229
- openMethod: D((e) => e.openMethod),
230
- descriptionElementId: D((e) => e.descriptionElementId),
231
- titleElementId: D((e) => e.titleElementId),
232
- viewportElement: D((e) => e.viewportElement),
233
- role: D((e) => e.role)
234
- }, ge = class e extends m {
223
+ var _e = {
224
+ ..._,
225
+ modal: T((e) => e.modal),
226
+ nested: T((e) => e.nested),
227
+ nestedOpenDialogCount: T((e) => e.nestedOpenDialogCount),
228
+ nestedOpenDrawerCount: T((e) => e.nestedOpenDrawerCount),
229
+ disablePointerDismissal: T((e) => e.disablePointerDismissal),
230
+ openMethod: T((e) => e.openMethod),
231
+ descriptionElementId: T((e) => e.descriptionElementId),
232
+ titleElementId: T((e) => e.titleElementId),
233
+ viewportElement: T((e) => e.viewportElement),
234
+ role: T((e) => e.role)
235
+ }, ve = class e extends S {
235
236
  constructor(e) {
236
- super(_e(e), {
237
+ super(ye(e), {
237
238
  popupRef: /*#__PURE__*/ R.createRef(),
238
239
  backdropRef: /*#__PURE__*/ R.createRef(),
239
240
  internalBackdropRef: /*#__PURE__*/ R.createRef(),
240
241
  outsidePressEnabledRef: { current: !0 },
241
- triggerElements: new o(),
242
+ triggerElements: new ae(),
242
243
  onOpenChange: void 0,
243
244
  onOpenChangeComplete: void 0
244
- }, he);
245
+ }, _e);
245
246
  }
246
247
  setOpen = (e, t) => {
247
248
  if (t.preventUnmountOnClose = () => {
@@ -252,13 +253,13 @@ var he = {
252
253
  (r || e) && (n.activeTriggerId = r, n.activeTriggerElement = t.trigger ?? null), this.update(n);
253
254
  };
254
255
  static useStore(t, n) {
255
- let r = T(() => new e(n)).current;
256
+ let r = re(() => new e(n)).current;
256
257
  return t ?? r;
257
258
  }
258
259
  };
259
- function _e(e = {}) {
260
+ function ye(e = {}) {
260
261
  return {
261
- ...P(),
262
+ ...c(),
262
263
  modal: !0,
263
264
  disablePointerDismissal: !1,
264
265
  popupElement: null,
@@ -277,8 +278,8 @@ function _e(e = {}) {
277
278
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/root/DialogRoot.js
278
279
  var X = /*#__PURE__*/ R.createContext(!1);
279
280
  process.env.NODE_ENV !== "production" && (X.displayName = "IsDrawerContext");
280
- function ve(e) {
281
- let { children: t, open: n, defaultOpen: r = !1, onOpenChange: i, onOpenChangeComplete: a, disablePointerDismissal: o = !1, modal: s = !0, actionsRef: c, handle: l, triggerId: u, defaultTriggerId: d = null } = e, f = W(!0), p = R.useContext(X), m = !!f, h = ge.useStore(l?.store, {
281
+ function be(e) {
282
+ let { children: t, open: n, defaultOpen: r = !1, onOpenChange: i, onOpenChangeComplete: a, disablePointerDismissal: o = !1, modal: s = !0, actionsRef: c, handle: l, triggerId: u, defaultTriggerId: d = null } = e, f = W(!0), p = R.useContext(X), m = !!f, h = ve.useStore(l?.store, {
282
283
  open: r,
283
284
  openProp: n,
284
285
  activeTriggerId: d,
@@ -287,7 +288,7 @@ function ve(e) {
287
288
  disablePointerDismissal: o,
288
289
  nested: m
289
290
  });
290
- S(() => {
291
+ A(() => {
291
292
  n === void 0 && h.state.open === !1 && r === !0 && h.update({
292
293
  open: !0,
293
294
  activeTriggerId: d
@@ -298,7 +299,7 @@ function ve(e) {
298
299
  modal: s
299
300
  }), h.useContextCallback("onOpenChange", i), h.useContextCallback("onOpenChangeComplete", a);
300
301
  let g = h.useState("payload");
301
- me({
302
+ ge({
302
303
  store: h,
303
304
  actionsRef: c,
304
305
  parentContext: f?.store.context,
@@ -318,22 +319,22 @@ function ve(e) {
318
319
  //#endregion
319
320
  //#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/title/DialogTitle.js
320
321
  var Z = /*#__PURE__*/ R.forwardRef(function(e, t) {
321
- let { render: r, className: i, style: o, id: s, ...c } = e, { store: l } = W(), u = n(s);
322
- return l.useSyncedValueWithCleanup("titleElementId", u), a("h2", e, {
322
+ let { render: n, className: r, style: i, id: a, ...o } = e, { store: s } = W(), c = x(a);
323
+ return s.useSyncedValueWithCleanup("titleElementId", c), L("h2", e, {
323
324
  ref: t,
324
- props: [{ id: u }, c]
325
+ props: [{ id: c }, o]
325
326
  });
326
327
  });
327
328
  process.env.NODE_ENV !== "production" && (Z.displayName = "DialogTitle");
328
329
  //#endregion
329
330
  //#region src/ui/browser/dialog.tsx
330
- function ye(e) {
331
- return /* @__PURE__ */ B(ve, {
331
+ function xe(e) {
332
+ return /* @__PURE__ */ B(be, {
332
333
  "data-slot": "dialog",
333
334
  ...e
334
335
  });
335
336
  }
336
- function be(e) {
337
+ function Se(e) {
337
338
  return /* @__PURE__ */ B(Y, {
338
339
  "data-slot": "dialog-portal",
339
340
  ...e
@@ -345,23 +346,23 @@ function Q(e) {
345
346
  ...e
346
347
  });
347
348
  }
348
- function xe({ className: e, ...t }) {
349
+ function Ce({ className: e, ...t }) {
349
350
  return /* @__PURE__ */ B(G, {
350
351
  "data-slot": "dialog-overlay",
351
- className: i("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:animate-none motion-reduce:transition-none", e),
352
+ className: O("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 motion-reduce:animate-none motion-reduce:transition-none", e),
352
353
  ...t
353
354
  });
354
355
  }
355
- function Se({ children: e, className: t, closeLabel: n = "Close", container: r, showCloseButton: a = !0, ...o }) {
356
- return /* @__PURE__ */ V(be, {
356
+ function $({ children: e, className: t, closeLabel: n = "Close", container: r, showCloseButton: i = !0, ...a }) {
357
+ return /* @__PURE__ */ V(Se, {
357
358
  container: r,
358
- children: [/* @__PURE__ */ B(xe, {}), /* @__PURE__ */ V(J, {
359
+ children: [/* @__PURE__ */ B(Ce, {}), /* @__PURE__ */ V(J, {
359
360
  "data-slot": "dialog-content",
360
- className: i("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", t),
361
- ...o,
362
- children: [e, a && /* @__PURE__ */ V(K, {
361
+ className: O("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", t),
362
+ ...a,
363
+ children: [e, i && /* @__PURE__ */ V(K, {
363
364
  "data-slot": "dialog-close",
364
- render: /* @__PURE__ */ B(p, {
365
+ render: /* @__PURE__ */ B(g, {
365
366
  className: "absolute top-2 right-2",
366
367
  size: "icon-sm",
367
368
  variant: "ghost"
@@ -374,94 +375,130 @@ function Se({ children: e, className: t, closeLabel: n = "Close", container: r,
374
375
  })]
375
376
  });
376
377
  }
377
- function Ce({ className: e, ...t }) {
378
+ function we({ className: e, ...t }) {
378
379
  return /* @__PURE__ */ B("div", {
379
380
  "data-slot": "dialog-header",
380
- className: i("flex flex-col gap-2", e),
381
+ className: O("flex flex-col gap-2", e),
381
382
  ...t
382
383
  });
383
384
  }
384
- function $({ className: e, ...t }) {
385
+ function Te({ className: e, ...t }) {
385
386
  return /* @__PURE__ */ B("div", {
386
387
  "data-slot": "dialog-footer",
387
- className: i("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", e),
388
+ className: O("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", e),
388
389
  ...t
389
390
  });
390
391
  }
391
- function we({ className: e, ...t }) {
392
+ function Ee({ className: e, ...t }) {
392
393
  return /* @__PURE__ */ B(Z, {
393
394
  "data-slot": "dialog-title",
394
- className: i("text-base leading-none font-medium", e),
395
+ className: O("text-base leading-none font-medium", e),
395
396
  ...t
396
397
  });
397
398
  }
398
399
  //#endregion
399
400
  //#region src/workbench/browser/runtime/shell/createResourceDialog.tsx
400
- function Te({ id: e, issue: t, label: n, name: r, onNameChange: i, onOpenChange: a, onSubmit: o, pending: s, title: c }) {
401
- let u = l(), d = z(null), f = z(null), [m, h] = se(!1), g = r.length > 0 && t != null, _ = u(g ? `resource.nameIssue.${t}` : "resource.nameHint", { max: 80 }), y = `${e}-message`;
402
- return oe(() => h(!0), []), /* @__PURE__ */ V(ce, { children: [/* @__PURE__ */ B("div", { ref: f }), /* @__PURE__ */ B(ye, {
403
- onOpenChange: h,
401
+ function De({ disabled: t, field: n, id: r, issue: i, label: c, name: l, onNameChange: u, onOpenChange: f, onSubmit: m, pending: h, title: _ }) {
402
+ let v = e(), y = z(null), b = z(null), [x, S] = le(!1), T = l.length > 0 && i != null, E = v(T ? `resource.nameIssue.${i}` : "resource.nameHint", { max: 80 }), D = `${r}-message`, O = `${r}-option`;
403
+ return ce(() => S(!0), []), /* @__PURE__ */ V(ue, { children: [/* @__PURE__ */ B("div", { ref: b }), /* @__PURE__ */ B(xe, {
404
+ onOpenChange: S,
404
405
  onOpenChangeComplete: (e) => {
405
- e || a(!1);
406
+ e || f(!1);
406
407
  },
407
- open: m,
408
- children: /* @__PURE__ */ B(Se, {
409
- container: f.current,
410
- initialFocus: () => d.current,
408
+ open: x,
409
+ children: /* @__PURE__ */ B($, {
410
+ container: b.current,
411
+ initialFocus: () => y.current,
411
412
  showCloseButton: !1,
412
413
  children: /* @__PURE__ */ V("form", {
413
414
  className: "flex flex-col gap-4",
414
- onSubmit: o,
415
+ onSubmit: m,
415
416
  children: [
416
- /* @__PURE__ */ V(Ce, {
417
+ /* @__PURE__ */ V(we, {
417
418
  className: "flex-row items-center justify-between",
418
- children: [/* @__PURE__ */ B(we, { children: c }), /* @__PURE__ */ B(Q, {
419
- "aria-label": u("common.cancel"),
420
- render: /* @__PURE__ */ B(p, {
419
+ children: [/* @__PURE__ */ B(Ee, { children: _ }), /* @__PURE__ */ B(Q, {
420
+ "aria-label": v("common.cancel"),
421
+ render: /* @__PURE__ */ B(g, {
421
422
  size: "icon-sm",
422
423
  variant: "ghost"
423
424
  }),
424
425
  type: "button",
425
- children: /* @__PURE__ */ B(k, { name: "close" })
426
+ children: /* @__PURE__ */ B(p, { name: "close" })
426
427
  })]
427
428
  }),
428
- /* @__PURE__ */ B(te, { children: /* @__PURE__ */ V(ie, {
429
- "data-invalid": g,
430
- children: [
431
- /* @__PURE__ */ B(N, {
432
- htmlFor: e,
433
- children: n
429
+ /* @__PURE__ */ V(w, {
430
+ className: "gap-4",
431
+ children: [/* @__PURE__ */ V(s, {
432
+ "data-invalid": T,
433
+ children: [
434
+ /* @__PURE__ */ B(C, {
435
+ htmlFor: r,
436
+ children: c
437
+ }),
438
+ /* @__PURE__ */ B(a, {
439
+ autoComplete: "off",
440
+ "aria-describedby": D,
441
+ "aria-invalid": T,
442
+ id: r,
443
+ name: "resource-name",
444
+ onChange: (e) => u(e.target.value),
445
+ ref: y,
446
+ required: !0,
447
+ value: l
448
+ }),
449
+ B(T ? o : I, {
450
+ id: D,
451
+ children: E
452
+ })
453
+ ]
454
+ }), n != null && /* @__PURE__ */ V(s, { children: [
455
+ /* @__PURE__ */ B(C, {
456
+ htmlFor: n.state == "ready" ? O : void 0,
457
+ children: n.label
434
458
  }),
435
- /* @__PURE__ */ B(v, {
436
- autoComplete: "off",
437
- "aria-describedby": y,
438
- "aria-invalid": g,
439
- id: e,
440
- name: "resource-name",
441
- onChange: (e) => i(e.target.value),
442
- ref: d,
443
- required: !0,
444
- value: r
459
+ n.state == "ready" ? /* @__PURE__ */ B(se, {
460
+ ariaLabel: n.ariaLabel,
461
+ className: "w-full",
462
+ id: O,
463
+ onValueChange: n.onValueChange,
464
+ options: n.options,
465
+ portalRoot: b.current,
466
+ value: n.value
467
+ }) : /* @__PURE__ */ V("div", {
468
+ className: "flex min-h-9 items-center gap-2 rounded-lg border bg-muted/30 px-3 py-2 text-sm text-muted-foreground",
469
+ role: n.state == "error" ? "alert" : "status",
470
+ children: [
471
+ n.state == "loading" && /* @__PURE__ */ B(d, { "aria-hidden": "true" }),
472
+ /* @__PURE__ */ B("span", { children: n.status }),
473
+ n.state == "error" && /* @__PURE__ */ B(g, {
474
+ className: "ml-auto bg-background",
475
+ onClick: n.onRetry,
476
+ size: "sm",
477
+ type: "button",
478
+ variant: "outline",
479
+ children: n.retry
480
+ })
481
+ ]
445
482
  }),
446
- B(g ? L : F, {
447
- id: y,
448
- children: _
449
- })
450
- ]
451
- }) }),
452
- /* @__PURE__ */ V($, { children: [/* @__PURE__ */ B(Q, {
453
- render: /* @__PURE__ */ B(p, { variant: "outline" }),
454
- type: "button",
455
- children: u("common.cancel")
456
- }), /* @__PURE__ */ B(p, {
457
- disabled: s || t != null,
458
- type: "submit",
459
- children: u(s ? "common.creating" : "common.create")
460
- })] })
483
+ /* @__PURE__ */ B(I, { children: n.description })
484
+ ] })]
485
+ }),
486
+ /* @__PURE__ */ V(Te, {
487
+ className: "mx-0 mb-0 border-0 bg-transparent p-0 pt-1",
488
+ children: [/* @__PURE__ */ B(Q, {
489
+ render: /* @__PURE__ */ B(g, { variant: "outline" }),
490
+ type: "button",
491
+ children: v("common.cancel")
492
+ }), /* @__PURE__ */ B(g, {
493
+ disabled: t || h || i != null,
494
+ type: "submit",
495
+ children: v(h ? "common.creating" : "common.create")
496
+ })]
497
+ })
461
498
  ]
462
499
  })
463
500
  })
464
501
  })] });
465
502
  }
466
503
  //#endregion
467
- export { Te as default };
504
+ export { De as default };