@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.
- package/README.md +5 -1
- package/dist/browser/{createResourceDialog-A64dDFCG.js → createResourceDialog-DXQz0thK.js} +228 -191
- package/dist/browser/diagnostics-BGoGFvHA.js +9237 -0
- package/dist/browser/{dist-DhsGR_K3.js → dist-3Mj8q8Pr.js} +27 -27
- package/dist/browser/{dist-n9WmBm5w.js → dist-BKuSVKCC.js} +1 -1
- package/dist/browser/{dist-DQVavPcf.js → dist-BMqL-qR5.js} +469 -903
- package/dist/browser/{dist-D5mdziGP.js → dist-BN4ZCyOB.js} +9 -9
- package/dist/browser/{dist-CVtP-E2c.js → dist-BpopSHwP.js} +1 -1
- package/dist/browser/{dist-B0Q2Mn0n.js → dist-CJpzJrLM.js} +191 -191
- package/dist/browser/{dist-DXgEYMFx.js → dist-CPuF50D9.js} +196 -196
- package/dist/browser/{dist-CUkceEvN.js → dist-CUSrALSX.js} +113 -113
- package/dist/browser/dist-CeSZ2xSM.js +444 -0
- package/dist/browser/{dist-Bc9TvHYl.js → dist-DUzA0Ukh.js} +20 -20
- package/dist/browser/{dist-DWzdGVm9.js → dist-DWADUsVB.js} +74 -74
- package/dist/browser/{esm-YIGXG-Js.js → esm-DGQbgYoJ.js} +13 -13
- package/dist/browser/flow-authoring-node.d.ts +3 -1
- package/dist/browser/flow-authoring.d.ts +2 -1
- package/dist/browser/flow-authoring.js +386 -96
- package/dist/browser/flow-change.d.ts +9 -4
- package/dist/browser/flow-change.js +49 -46
- package/dist/browser/{flowRunInputEditorStore-DXOyyY7o.js → flowRunInputEditorStore-BeyUSWpO.js} +1644 -908
- package/dist/browser/{flowWorkspace-D7-rBA1-.js → flowWorkspace-DwyxAOBH.js} +18384 -16381
- package/dist/browser/getPseudoElementBounds-ESJExRFX.js +7642 -0
- package/dist/browser/languages-DgJehE1g.js +62 -0
- package/dist/browser/lib-C5Ipyfps.js +7856 -0
- package/dist/browser/licenses.md +119 -1
- package/dist/browser/main-DmjVyuWr.js +76 -0
- package/dist/browser/{markdownContent-ColGUxHy.js → markdownContent-DdlIRN3_.js} +4811 -4795
- package/dist/browser/theme.css +63 -0
- package/dist/browser/theme.css.d.ts +1 -0
- package/dist/browser/typeScriptSession-mPCiA9sV.js +2579 -0
- package/dist/browser/workbench-contract.d.ts +2 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.d.ts +45 -1
- package/dist/browser/workbench.js +982 -1328
- package/dist/browser/workbenchSelect-B2s1HV-Y.js +1374 -0
- package/dist/common/connector-action.d.ts +6 -0
- package/dist/common/connector-action.js +37 -29
- package/dist/common/control-api-conformance.js +45 -4
- package/dist/common/control-api-errors.d.ts +16 -0
- package/dist/common/control-api.d.ts +20 -6
- package/dist/common/control-api.js +151 -95
- package/dist/common/flow-encoding.d.ts +2 -2
- package/dist/common/flow-encoding.js +4 -1
- package/dist/common/flow-semantics.d.ts +3 -0
- package/dist/common/flow-semantics.js +939 -844
- package/dist/common/licenses.md +1 -25
- package/dist/common/localization.d.ts +21 -0
- package/dist/common/localization.js +62 -0
- package/dist/common/scheduler.d.ts +5 -5
- package/dist/common/scheduler.js +250 -236
- package/package.json +10 -1
- package/dist/browser/addNodeOptions-DRndy4EK.js +0 -6910
- package/dist/browser/createLucideIcon-CqjqCezK.js +0 -5537
- package/dist/browser/field-CKGQHCIi.js +0 -312
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
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
|
|
5
|
-
import { Fragment as
|
|
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 =
|
|
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" ?
|
|
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
|
|
23
|
-
...
|
|
24
|
-
...
|
|
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:
|
|
27
|
-
open:
|
|
28
|
-
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
|
|
31
|
-
state:
|
|
32
|
-
ref: [
|
|
33
|
-
stateAttributesMapping:
|
|
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: !
|
|
37
|
+
hidden: !u,
|
|
37
38
|
style: {
|
|
38
39
|
userSelect: "none",
|
|
39
40
|
WebkitUserSelect: "none"
|
|
40
41
|
}
|
|
41
|
-
},
|
|
42
|
-
enabled:
|
|
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:
|
|
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 &&
|
|
52
|
+
u && c.setOpen(!1, l(oe, e.nativeEvent));
|
|
52
53
|
}
|
|
53
|
-
let { getButtonProps: f, buttonRef: p } =
|
|
54
|
+
let { getButtonProps: f, buttonRef: p } = j({
|
|
54
55
|
disabled: i,
|
|
55
|
-
native:
|
|
56
|
+
native: a
|
|
56
57
|
});
|
|
57
|
-
return
|
|
58
|
+
return L("button", e, {
|
|
58
59
|
state: { disabled: i },
|
|
59
60
|
ref: [t, p],
|
|
60
61
|
props: [
|
|
61
62
|
{ onClick: d },
|
|
62
|
-
|
|
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
|
|
71
|
+
var fe = /*#__PURE__*/ function(e) {
|
|
71
72
|
return e.nestedDialogs = "--nested-dialogs", e;
|
|
72
|
-
}({}),
|
|
73
|
-
return e[e.open =
|
|
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
|
|
77
|
+
function me() {
|
|
77
78
|
let e = R.useContext(q);
|
|
78
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ?
|
|
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
|
|
84
|
-
...
|
|
85
|
-
...
|
|
84
|
+
var he = {
|
|
85
|
+
...v,
|
|
86
|
+
...E,
|
|
86
87
|
nestedDialogOpen(e) {
|
|
87
|
-
return e ? { [
|
|
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:
|
|
91
|
-
|
|
92
|
-
open:
|
|
93
|
-
ref:
|
|
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
|
-
|
|
96
|
+
_ && c.context.onOpenChangeComplete?.(!0);
|
|
96
97
|
}
|
|
97
98
|
});
|
|
98
|
-
function
|
|
99
|
-
return e !== "touch" ||
|
|
99
|
+
function S(e) {
|
|
100
|
+
return e !== "touch" || c.context.popupRef.current;
|
|
100
101
|
}
|
|
101
|
-
let
|
|
102
|
+
let C = i === void 0 ? S : i, w = L("div", e, {
|
|
102
103
|
state: {
|
|
103
|
-
open:
|
|
104
|
-
nested:
|
|
105
|
-
transitionStatus:
|
|
106
|
-
nestedDialogOpen:
|
|
104
|
+
open: _,
|
|
105
|
+
nested: h,
|
|
106
|
+
transitionStatus: b,
|
|
107
|
+
nestedDialogOpen: g > 0
|
|
107
108
|
},
|
|
108
109
|
props: [
|
|
109
|
-
|
|
110
|
+
f,
|
|
110
111
|
{
|
|
111
|
-
"aria-labelledby":
|
|
112
|
-
"aria-describedby":
|
|
113
|
-
role:
|
|
112
|
+
"aria-labelledby": y ?? void 0,
|
|
113
|
+
"aria-describedby": l ?? void 0,
|
|
114
|
+
role: x,
|
|
114
115
|
tabIndex: -1,
|
|
115
|
-
hidden: !
|
|
116
|
+
hidden: !m,
|
|
116
117
|
onKeyDown(e) {
|
|
117
|
-
|
|
118
|
+
ie.has(e.key) && e.stopPropagation();
|
|
118
119
|
},
|
|
119
|
-
style: { [
|
|
120
|
+
style: { [fe.nestedDialogs]: g }
|
|
120
121
|
},
|
|
121
|
-
|
|
122
|
+
s
|
|
122
123
|
],
|
|
123
124
|
ref: [
|
|
124
125
|
t,
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
c.context.popupRef,
|
|
127
|
+
c.useStateSetter("popupElement")
|
|
127
128
|
],
|
|
128
|
-
stateAttributesMapping:
|
|
129
|
+
stateAttributesMapping: he
|
|
129
130
|
});
|
|
130
|
-
return /*#__PURE__*/ B(
|
|
131
|
-
context:
|
|
132
|
-
openInteractionType:
|
|
133
|
-
disabled: !
|
|
134
|
-
closeOnFocusOut: !
|
|
135
|
-
initialFocus:
|
|
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:
|
|
138
|
+
modal: p !== !1,
|
|
138
139
|
restoreFocus: "popup",
|
|
139
|
-
children:
|
|
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(
|
|
150
|
+
children: /*#__PURE__*/ V(M, {
|
|
150
151
|
ref: t,
|
|
151
152
|
...r,
|
|
152
|
-
children: [a && o === !0 && /*#__PURE__*/ B(
|
|
153
|
+
children: [a && o === !0 && /*#__PURE__*/ B(D, {
|
|
153
154
|
ref: i.context.internalBackdropRef,
|
|
154
|
-
inert:
|
|
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
|
|
163
|
-
let { store: n, parentContext: i, actionsRef: a, isDrawer: o } =
|
|
164
|
-
|
|
165
|
-
let { forceUnmount:
|
|
166
|
-
n.setOpen(!1,
|
|
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:
|
|
170
|
-
close:
|
|
171
|
-
}), [
|
|
172
|
-
let
|
|
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
|
-
}), [
|
|
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:
|
|
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 =
|
|
186
|
-
if (
|
|
186
|
+
let t = h(e);
|
|
187
|
+
if (D && !c) {
|
|
187
188
|
let e = t;
|
|
188
|
-
return
|
|
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:
|
|
193
|
+
escapeKey: D
|
|
193
194
|
});
|
|
194
|
-
|
|
195
|
-
let { getReferenceProps:
|
|
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
|
-
|
|
198
|
+
w(e), E(t);
|
|
198
199
|
}), n.useContextCallback("onNestedDialogClose", () => {
|
|
199
|
-
|
|
200
|
-
}), R.useEffect(() => (i?.onNestedDialogOpen &&
|
|
201
|
-
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
|
-
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
s,
|
|
206
|
+
C,
|
|
207
|
+
T,
|
|
207
208
|
i
|
|
208
209
|
]);
|
|
209
|
-
let
|
|
210
|
+
let N = R.useMemo(() => A(_), [A, _]), P = R.useMemo(() => M(_), [M, _]), F = R.useMemo(() => j(), [j]);
|
|
210
211
|
n.useSyncedValues({
|
|
211
|
-
openMethod:
|
|
212
|
-
activeTriggerProps:
|
|
213
|
-
inactiveTriggerProps:
|
|
214
|
-
popupProps:
|
|
215
|
-
floatingRootContext:
|
|
216
|
-
nestedOpenDialogCount:
|
|
217
|
-
nestedOpenDrawerCount:
|
|
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
|
|
223
|
-
...
|
|
224
|
-
modal:
|
|
225
|
-
nested:
|
|
226
|
-
nestedOpenDialogCount:
|
|
227
|
-
nestedOpenDrawerCount:
|
|
228
|
-
disablePointerDismissal:
|
|
229
|
-
openMethod:
|
|
230
|
-
descriptionElementId:
|
|
231
|
-
titleElementId:
|
|
232
|
-
viewportElement:
|
|
233
|
-
role:
|
|
234
|
-
},
|
|
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(
|
|
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
|
|
242
|
+
triggerElements: new ae(),
|
|
242
243
|
onOpenChange: void 0,
|
|
243
244
|
onOpenChangeComplete: void 0
|
|
244
|
-
},
|
|
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 =
|
|
256
|
+
let r = re(() => new e(n)).current;
|
|
256
257
|
return t ?? r;
|
|
257
258
|
}
|
|
258
259
|
};
|
|
259
|
-
function
|
|
260
|
+
function ye(e = {}) {
|
|
260
261
|
return {
|
|
261
|
-
...
|
|
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
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
322
|
-
return
|
|
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:
|
|
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
|
|
331
|
-
return /* @__PURE__ */ B(
|
|
331
|
+
function xe(e) {
|
|
332
|
+
return /* @__PURE__ */ B(be, {
|
|
332
333
|
"data-slot": "dialog",
|
|
333
334
|
...e
|
|
334
335
|
});
|
|
335
336
|
}
|
|
336
|
-
function
|
|
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
|
|
349
|
+
function Ce({ className: e, ...t }) {
|
|
349
350
|
return /* @__PURE__ */ B(G, {
|
|
350
351
|
"data-slot": "dialog-overlay",
|
|
351
|
-
className:
|
|
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
|
|
356
|
-
return /* @__PURE__ */ V(
|
|
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(
|
|
359
|
+
children: [/* @__PURE__ */ B(Ce, {}), /* @__PURE__ */ V(J, {
|
|
359
360
|
"data-slot": "dialog-content",
|
|
360
|
-
className:
|
|
361
|
-
...
|
|
362
|
-
children: [e,
|
|
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(
|
|
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
|
|
378
|
+
function we({ className: e, ...t }) {
|
|
378
379
|
return /* @__PURE__ */ B("div", {
|
|
379
380
|
"data-slot": "dialog-header",
|
|
380
|
-
className:
|
|
381
|
+
className: O("flex flex-col gap-2", e),
|
|
381
382
|
...t
|
|
382
383
|
});
|
|
383
384
|
}
|
|
384
|
-
function
|
|
385
|
+
function Te({ className: e, ...t }) {
|
|
385
386
|
return /* @__PURE__ */ B("div", {
|
|
386
387
|
"data-slot": "dialog-footer",
|
|
387
|
-
className:
|
|
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
|
|
392
|
+
function Ee({ className: e, ...t }) {
|
|
392
393
|
return /* @__PURE__ */ B(Z, {
|
|
393
394
|
"data-slot": "dialog-title",
|
|
394
|
-
className:
|
|
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
|
|
401
|
-
let
|
|
402
|
-
return
|
|
403
|
-
onOpenChange:
|
|
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 ||
|
|
406
|
+
e || f(!1);
|
|
406
407
|
},
|
|
407
|
-
open:
|
|
408
|
-
children: /* @__PURE__ */ B(
|
|
409
|
-
container:
|
|
410
|
-
initialFocus: () =>
|
|
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:
|
|
415
|
+
onSubmit: m,
|
|
415
416
|
children: [
|
|
416
|
-
/* @__PURE__ */ V(
|
|
417
|
+
/* @__PURE__ */ V(we, {
|
|
417
418
|
className: "flex-row items-center justify-between",
|
|
418
|
-
children: [/* @__PURE__ */ B(
|
|
419
|
-
"aria-label":
|
|
420
|
-
render: /* @__PURE__ */ B(
|
|
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(
|
|
426
|
+
children: /* @__PURE__ */ B(p, { name: "close" })
|
|
426
427
|
})]
|
|
427
428
|
}),
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
-
"
|
|
430
|
-
children: [
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
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(
|
|
436
|
-
|
|
437
|
-
"
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
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(
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
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 {
|
|
504
|
+
export { De as default };
|