@oomol-lab/open-flow 0.1.0-alpha.9 → 0.1.0-beta.2
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-BkZns-oZ.js +504 -0
- package/dist/browser/diagnostics-giPSzyMo.js +9346 -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-B_PbUobB.js} +13 -13
- package/dist/browser/flow-authoring-node.d.ts +4 -2
- package/dist/browser/flow-authoring.d.ts +2 -1
- package/dist/browser/flow-authoring.js +400 -100
- 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-DAMLVMcF.js} +18416 -16444
- 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 +46 -1
- package/dist/browser/workbench.js +1132 -1474
- 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 +80 -29
- package/dist/common/control-api-errors.d.ts +24 -0
- package/dist/common/control-api.d.ts +54 -7
- package/dist/common/control-api.js +226 -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 -851
- package/dist/common/integration-trigger.d.ts +1 -0
- 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/provider-triggers.js +4 -1
- 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/createResourceDialog-A64dDFCG.js +0 -467
- package/dist/browser/field-CKGQHCIi.js +0 -312
|
@@ -1,467 +0,0 @@
|
|
|
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";
|
|
3
|
-
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";
|
|
6
|
-
//#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
|
-
d: "M18 6 6 18",
|
|
9
|
-
key: "1bl5f8"
|
|
10
|
-
}], ["path", {
|
|
11
|
-
d: "m6 6 12 12",
|
|
12
|
-
key: "d8bk6v"
|
|
13
|
-
}]]), U = /*#__PURE__*/ R.createContext(void 0);
|
|
14
|
-
process.env.NODE_ENV !== "production" && (U.displayName = "DialogRootContext");
|
|
15
|
-
function W(e) {
|
|
16
|
-
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
|
-
return t;
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
//#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
|
|
25
|
-
}, 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")
|
|
29
|
-
};
|
|
30
|
-
return a("div", e, {
|
|
31
|
-
state: f,
|
|
32
|
-
ref: [c.context.backdropRef, t],
|
|
33
|
-
stateAttributesMapping: le,
|
|
34
|
-
props: [{
|
|
35
|
-
role: "presentation",
|
|
36
|
-
hidden: !d,
|
|
37
|
-
style: {
|
|
38
|
-
userSelect: "none",
|
|
39
|
-
WebkitUserSelect: "none"
|
|
40
|
-
}
|
|
41
|
-
}, s],
|
|
42
|
-
enabled: o || !u
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
process.env.NODE_ENV !== "production" && (G.displayName = "DialogBackdrop");
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/close/DialogClose.js
|
|
48
|
-
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
|
-
function d(e) {
|
|
51
|
-
u && l.setOpen(!1, E(y, e.nativeEvent));
|
|
52
|
-
}
|
|
53
|
-
let { getButtonProps: f, buttonRef: p } = b({
|
|
54
|
-
disabled: i,
|
|
55
|
-
native: o
|
|
56
|
-
});
|
|
57
|
-
return a("button", e, {
|
|
58
|
-
state: { disabled: i },
|
|
59
|
-
ref: [t, p],
|
|
60
|
-
props: [
|
|
61
|
-
{ onClick: d },
|
|
62
|
-
c,
|
|
63
|
-
f
|
|
64
|
-
]
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
process.env.NODE_ENV !== "production" && (K.displayName = "DialogClose");
|
|
68
|
-
//#endregion
|
|
69
|
-
//#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
|
-
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;
|
|
74
|
-
}({}), q = /*#__PURE__*/ R.createContext(void 0);
|
|
75
|
-
process.env.NODE_ENV !== "production" && (q.displayName = "DialogPortalContext");
|
|
76
|
-
function fe() {
|
|
77
|
-
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
|
-
return e;
|
|
80
|
-
}
|
|
81
|
-
//#endregion
|
|
82
|
-
//#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,
|
|
86
|
-
nestedDialogOpen(e) {
|
|
87
|
-
return e ? { [de.nestedDialogOpen]: "" } : null;
|
|
88
|
-
}
|
|
89
|
-
}, 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,
|
|
94
|
-
onComplete() {
|
|
95
|
-
b && u.context.onOpenChangeComplete?.(!0);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
function E(e) {
|
|
99
|
-
return e !== "touch" || u.context.popupRef.current;
|
|
100
|
-
}
|
|
101
|
-
let D = i === void 0 ? E : i, O = a("div", e, {
|
|
102
|
-
state: {
|
|
103
|
-
open: b,
|
|
104
|
-
nested: v,
|
|
105
|
-
transitionStatus: w,
|
|
106
|
-
nestedDialogOpen: y > 0
|
|
107
|
-
},
|
|
108
|
-
props: [
|
|
109
|
-
m,
|
|
110
|
-
{
|
|
111
|
-
"aria-labelledby": S ?? void 0,
|
|
112
|
-
"aria-describedby": d ?? void 0,
|
|
113
|
-
role: T,
|
|
114
|
-
tabIndex: -1,
|
|
115
|
-
hidden: !g,
|
|
116
|
-
onKeyDown(e) {
|
|
117
|
-
_.has(e.key) && e.stopPropagation();
|
|
118
|
-
},
|
|
119
|
-
style: { [ue.nestedDialogs]: y }
|
|
120
|
-
},
|
|
121
|
-
l
|
|
122
|
-
],
|
|
123
|
-
ref: [
|
|
124
|
-
t,
|
|
125
|
-
u.context.popupRef,
|
|
126
|
-
u.useStateSetter("popupElement")
|
|
127
|
-
],
|
|
128
|
-
stateAttributesMapping: pe
|
|
129
|
-
});
|
|
130
|
-
return /*#__PURE__*/ B(C, {
|
|
131
|
-
context: p,
|
|
132
|
-
openInteractionType: x,
|
|
133
|
-
disabled: !g,
|
|
134
|
-
closeOnFocusOut: !f,
|
|
135
|
-
initialFocus: D,
|
|
136
|
-
returnFocus: r,
|
|
137
|
-
modal: h !== !1,
|
|
138
|
-
restoreFocus: "popup",
|
|
139
|
-
children: O
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
process.env.NODE_ENV !== "production" && (J.displayName = "DialogPopup");
|
|
143
|
-
//#endregion
|
|
144
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/portal/DialogPortal.js
|
|
145
|
-
var Y = /*#__PURE__*/ R.forwardRef(function(e, t) {
|
|
146
|
-
let { keepMounted: n = !1, ...r } = e, { store: i } = W(), a = i.useState("mounted"), o = i.useState("modal"), s = i.useState("open");
|
|
147
|
-
return a || n ? /*#__PURE__*/ B(q.Provider, {
|
|
148
|
-
value: n,
|
|
149
|
-
children: /*#__PURE__*/ V(u, {
|
|
150
|
-
ref: t,
|
|
151
|
-
...r,
|
|
152
|
-
children: [a && o === !0 && /*#__PURE__*/ B(j, {
|
|
153
|
-
ref: i.context.internalBackdropRef,
|
|
154
|
-
inert: M(!s)
|
|
155
|
-
}), e.children]
|
|
156
|
-
})
|
|
157
|
-
}) : null;
|
|
158
|
-
});
|
|
159
|
-
process.env.NODE_ENV !== "production" && (Y.displayName = "DialogPortal");
|
|
160
|
-
//#endregion
|
|
161
|
-
//#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));
|
|
167
|
-
}, [n]);
|
|
168
|
-
R.useImperativeHandle(a, () => ({
|
|
169
|
-
unmount: g,
|
|
170
|
-
close: _
|
|
171
|
-
}), [g, _]);
|
|
172
|
-
let v = re({
|
|
173
|
-
popupStore: n,
|
|
174
|
-
onOpenChange: n.setOpen,
|
|
175
|
-
treatPopupAsFloatingElement: !0
|
|
176
|
-
}), [y, b] = R.useState(0), [S, C] = R.useState(0), T = y === 0, D = I(v), O = e(v, {
|
|
177
|
-
outsidePressEvent() {
|
|
178
|
-
return n.context.internalBackdropRef.current || n.context.backdropRef.current ? "intentional" : {
|
|
179
|
-
mouse: u === "trap-focus" ? "sloppy" : "intentional",
|
|
180
|
-
touch: "sloppy"
|
|
181
|
-
};
|
|
182
|
-
},
|
|
183
|
-
outsidePress(e) {
|
|
184
|
-
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) {
|
|
187
|
-
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
|
-
}
|
|
190
|
-
return !1;
|
|
191
|
-
},
|
|
192
|
-
escapeKey: T
|
|
193
|
-
});
|
|
194
|
-
h(c && u === !0, d);
|
|
195
|
-
let { getReferenceProps: k, getFloatingProps: A, getTriggerProps: j } = r([D, O]);
|
|
196
|
-
n.useContextCallback("onNestedDialogOpen", (e, t) => {
|
|
197
|
-
b(e), C(t);
|
|
198
|
-
}), 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();
|
|
202
|
-
}), [
|
|
203
|
-
o,
|
|
204
|
-
c,
|
|
205
|
-
y,
|
|
206
|
-
S,
|
|
207
|
-
i
|
|
208
|
-
]);
|
|
209
|
-
let M = R.useMemo(() => k(m), [k, m]), N = R.useMemo(() => j(m), [j, m]), P = R.useMemo(() => A(), [A]);
|
|
210
|
-
n.useSyncedValues({
|
|
211
|
-
openMethod: p,
|
|
212
|
-
activeTriggerProps: M,
|
|
213
|
-
inactiveTriggerProps: N,
|
|
214
|
-
popupProps: P,
|
|
215
|
-
floatingRootContext: v,
|
|
216
|
-
nestedOpenDialogCount: y,
|
|
217
|
-
nestedOpenDrawerCount: S
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
//#endregion
|
|
221
|
-
//#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 {
|
|
235
|
-
constructor(e) {
|
|
236
|
-
super(_e(e), {
|
|
237
|
-
popupRef: /*#__PURE__*/ R.createRef(),
|
|
238
|
-
backdropRef: /*#__PURE__*/ R.createRef(),
|
|
239
|
-
internalBackdropRef: /*#__PURE__*/ R.createRef(),
|
|
240
|
-
outsidePressEnabledRef: { current: !0 },
|
|
241
|
-
triggerElements: new o(),
|
|
242
|
-
onOpenChange: void 0,
|
|
243
|
-
onOpenChangeComplete: void 0
|
|
244
|
-
}, he);
|
|
245
|
-
}
|
|
246
|
-
setOpen = (e, t) => {
|
|
247
|
-
if (t.preventUnmountOnClose = () => {
|
|
248
|
-
this.set("preventUnmountingOnClose", !0);
|
|
249
|
-
}, !e && t.trigger == null && this.state.activeTriggerId != null && (t.trigger = this.state.activeTriggerElement ?? void 0), this.context.onOpenChange?.(e, t), t.isCanceled) return;
|
|
250
|
-
this.state.floatingRootContext.dispatchOpenChange(e, t);
|
|
251
|
-
let n = { open: e }, r = t.trigger?.id ?? null;
|
|
252
|
-
(r || e) && (n.activeTriggerId = r, n.activeTriggerElement = t.trigger ?? null), this.update(n);
|
|
253
|
-
};
|
|
254
|
-
static useStore(t, n) {
|
|
255
|
-
let r = T(() => new e(n)).current;
|
|
256
|
-
return t ?? r;
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
function _e(e = {}) {
|
|
260
|
-
return {
|
|
261
|
-
...P(),
|
|
262
|
-
modal: !0,
|
|
263
|
-
disablePointerDismissal: !1,
|
|
264
|
-
popupElement: null,
|
|
265
|
-
viewportElement: null,
|
|
266
|
-
descriptionElementId: void 0,
|
|
267
|
-
titleElementId: void 0,
|
|
268
|
-
openMethod: null,
|
|
269
|
-
nested: !1,
|
|
270
|
-
nestedOpenDialogCount: 0,
|
|
271
|
-
nestedOpenDrawerCount: 0,
|
|
272
|
-
role: "dialog",
|
|
273
|
-
...e
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
//#endregion
|
|
277
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/root/DialogRoot.js
|
|
278
|
-
var X = /*#__PURE__*/ R.createContext(!1);
|
|
279
|
-
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, {
|
|
282
|
-
open: r,
|
|
283
|
-
openProp: n,
|
|
284
|
-
activeTriggerId: d,
|
|
285
|
-
triggerIdProp: u,
|
|
286
|
-
modal: s,
|
|
287
|
-
disablePointerDismissal: o,
|
|
288
|
-
nested: m
|
|
289
|
-
});
|
|
290
|
-
S(() => {
|
|
291
|
-
n === void 0 && h.state.open === !1 && r === !0 && h.update({
|
|
292
|
-
open: !0,
|
|
293
|
-
activeTriggerId: d
|
|
294
|
-
});
|
|
295
|
-
}), h.useControlledProp("openProp", n), h.useControlledProp("triggerIdProp", u), h.useSyncedValues({
|
|
296
|
-
disablePointerDismissal: o,
|
|
297
|
-
nested: m,
|
|
298
|
-
modal: s
|
|
299
|
-
}), h.useContextCallback("onOpenChange", i), h.useContextCallback("onOpenChangeComplete", a);
|
|
300
|
-
let g = h.useState("payload");
|
|
301
|
-
me({
|
|
302
|
-
store: h,
|
|
303
|
-
actionsRef: c,
|
|
304
|
-
parentContext: f?.store.context,
|
|
305
|
-
isDrawer: p,
|
|
306
|
-
onOpenChange: i,
|
|
307
|
-
triggerIdProp: u
|
|
308
|
-
});
|
|
309
|
-
let _ = R.useMemo(() => ({ store: h }), [h]);
|
|
310
|
-
return /*#__PURE__*/ B(X.Provider, {
|
|
311
|
-
value: !1,
|
|
312
|
-
children: /*#__PURE__*/ B(U.Provider, {
|
|
313
|
-
value: _,
|
|
314
|
-
children: typeof t == "function" ? t({ payload: g }) : t
|
|
315
|
-
})
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
//#endregion
|
|
319
|
-
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+b87d06724be9db7a/node_modules/@base-ui/react/esm/dialog/title/DialogTitle.js
|
|
320
|
-
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, {
|
|
323
|
-
ref: t,
|
|
324
|
-
props: [{ id: u }, c]
|
|
325
|
-
});
|
|
326
|
-
});
|
|
327
|
-
process.env.NODE_ENV !== "production" && (Z.displayName = "DialogTitle");
|
|
328
|
-
//#endregion
|
|
329
|
-
//#region src/ui/browser/dialog.tsx
|
|
330
|
-
function ye(e) {
|
|
331
|
-
return /* @__PURE__ */ B(ve, {
|
|
332
|
-
"data-slot": "dialog",
|
|
333
|
-
...e
|
|
334
|
-
});
|
|
335
|
-
}
|
|
336
|
-
function be(e) {
|
|
337
|
-
return /* @__PURE__ */ B(Y, {
|
|
338
|
-
"data-slot": "dialog-portal",
|
|
339
|
-
...e
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
function Q(e) {
|
|
343
|
-
return /* @__PURE__ */ B(K, {
|
|
344
|
-
"data-slot": "dialog-close",
|
|
345
|
-
...e
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
function xe({ className: e, ...t }) {
|
|
349
|
-
return /* @__PURE__ */ B(G, {
|
|
350
|
-
"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
|
-
...t
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
function Se({ children: e, className: t, closeLabel: n = "Close", container: r, showCloseButton: a = !0, ...o }) {
|
|
356
|
-
return /* @__PURE__ */ V(be, {
|
|
357
|
-
container: r,
|
|
358
|
-
children: [/* @__PURE__ */ B(xe, {}), /* @__PURE__ */ V(J, {
|
|
359
|
-
"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, {
|
|
363
|
-
"data-slot": "dialog-close",
|
|
364
|
-
render: /* @__PURE__ */ B(p, {
|
|
365
|
-
className: "absolute top-2 right-2",
|
|
366
|
-
size: "icon-sm",
|
|
367
|
-
variant: "ghost"
|
|
368
|
-
}),
|
|
369
|
-
children: [/* @__PURE__ */ B(H, {}), /* @__PURE__ */ B("span", {
|
|
370
|
-
className: "sr-only",
|
|
371
|
-
children: n
|
|
372
|
-
})]
|
|
373
|
-
})]
|
|
374
|
-
})]
|
|
375
|
-
});
|
|
376
|
-
}
|
|
377
|
-
function Ce({ className: e, ...t }) {
|
|
378
|
-
return /* @__PURE__ */ B("div", {
|
|
379
|
-
"data-slot": "dialog-header",
|
|
380
|
-
className: i("flex flex-col gap-2", e),
|
|
381
|
-
...t
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
function $({ className: e, ...t }) {
|
|
385
|
-
return /* @__PURE__ */ B("div", {
|
|
386
|
-
"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
|
-
...t
|
|
389
|
-
});
|
|
390
|
-
}
|
|
391
|
-
function we({ className: e, ...t }) {
|
|
392
|
-
return /* @__PURE__ */ B(Z, {
|
|
393
|
-
"data-slot": "dialog-title",
|
|
394
|
-
className: i("text-base leading-none font-medium", e),
|
|
395
|
-
...t
|
|
396
|
-
});
|
|
397
|
-
}
|
|
398
|
-
//#endregion
|
|
399
|
-
//#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,
|
|
404
|
-
onOpenChangeComplete: (e) => {
|
|
405
|
-
e || a(!1);
|
|
406
|
-
},
|
|
407
|
-
open: m,
|
|
408
|
-
children: /* @__PURE__ */ B(Se, {
|
|
409
|
-
container: f.current,
|
|
410
|
-
initialFocus: () => d.current,
|
|
411
|
-
showCloseButton: !1,
|
|
412
|
-
children: /* @__PURE__ */ V("form", {
|
|
413
|
-
className: "flex flex-col gap-4",
|
|
414
|
-
onSubmit: o,
|
|
415
|
-
children: [
|
|
416
|
-
/* @__PURE__ */ V(Ce, {
|
|
417
|
-
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, {
|
|
421
|
-
size: "icon-sm",
|
|
422
|
-
variant: "ghost"
|
|
423
|
-
}),
|
|
424
|
-
type: "button",
|
|
425
|
-
children: /* @__PURE__ */ B(k, { name: "close" })
|
|
426
|
-
})]
|
|
427
|
-
}),
|
|
428
|
-
/* @__PURE__ */ B(te, { children: /* @__PURE__ */ V(ie, {
|
|
429
|
-
"data-invalid": g,
|
|
430
|
-
children: [
|
|
431
|
-
/* @__PURE__ */ B(N, {
|
|
432
|
-
htmlFor: e,
|
|
433
|
-
children: n
|
|
434
|
-
}),
|
|
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
|
|
445
|
-
}),
|
|
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
|
-
})] })
|
|
461
|
-
]
|
|
462
|
-
})
|
|
463
|
-
})
|
|
464
|
-
})] });
|
|
465
|
-
}
|
|
466
|
-
//#endregion
|
|
467
|
-
export { Te as default };
|