@burdenoff/fe-libs 2026.1027.4 → 2026.1027.6
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/_virtual/_rolldown/runtime.js +2 -5
- package/dist/chrome/ProfileSwitcher.js +106 -105
- package/dist/node_modules/@openuidev/devtools/dist/index.js +34 -35
- package/dist/node_modules/@openuidev/lang-core/dist/index.js +826 -828
- package/dist/node_modules/@openuidev/react-lang/dist/index.js +6 -7
- package/dist/shared/assistant/openui/library.js +73 -73
- package/package.json +1 -1
- package/dist/node_modules/react-dom/cjs/react-dom-client.development.js +0 -11168
- package/dist/node_modules/react-dom/cjs/react-dom-client.production.js +0 -7384
- package/dist/node_modules/react-dom/client.js +0 -19
- package/dist/node_modules/scheduler/cjs/scheduler.development.js +0 -203
- package/dist/node_modules/scheduler/cjs/scheduler.production.js +0 -203
- package/dist/node_modules/scheduler/index.js +0 -10
- package/dist/node_modules/zod/v4/classic/errors.js +0 -23
- package/dist/node_modules/zod/v4/classic/iso.js +0 -31
- package/dist/node_modules/zod/v4/classic/parse.js +0 -6
- package/dist/node_modules/zod/v4/classic/schemas.js +0 -339
- package/dist/node_modules/zod/v4/core/api.js +0 -491
- package/dist/node_modules/zod/v4/core/checks.js +0 -283
- package/dist/node_modules/zod/v4/core/core.js +0 -44
- package/dist/node_modules/zod/v4/core/doc.js +0 -23
- package/dist/node_modules/zod/v4/core/errors.js +0 -41
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -306
- package/dist/node_modules/zod/v4/core/parse.js +0 -68
- package/dist/node_modules/zod/v4/core/regexes.js +0 -25
- package/dist/node_modules/zod/v4/core/registries.js +0 -40
- package/dist/node_modules/zod/v4/core/schemas.js +0 -796
- package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -222
- package/dist/node_modules/zod/v4/core/util.js +0 -266
- package/dist/node_modules/zod/v4/core/versions.js +0 -8
|
@@ -15,9 +15,6 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
15
15
|
}, u = (n, r, a) => (a = n == null ? {} : e(i(n)), l(r || !n || !n.__esModule ? t(a, "default", {
|
|
16
16
|
value: n,
|
|
17
17
|
enumerable: !0
|
|
18
|
-
}) : a, n)), d = (e) => a.call(e, "module.exports") ? e["module.exports"] : l(t({}, "__esModule", { value: !0 }), e)
|
|
19
|
-
if (typeof require < "u") return require.apply(this, arguments);
|
|
20
|
-
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
21
|
-
});
|
|
18
|
+
}) : a, n)), d = (e) => a.call(e, "module.exports") ? e["module.exports"] : l(t({}, "__esModule", { value: !0 }), e);
|
|
22
19
|
//#endregion
|
|
23
|
-
export { s as __commonJSMin, o as __esmMin, c as __exportAll,
|
|
20
|
+
export { s as __commonJSMin, o as __esmMin, c as __exportAll, d as __toCommonJS, u as __toESM };
|
|
@@ -1,59 +1,60 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { isInstalledApp as e } from "../shared/native/platform.js";
|
|
2
|
+
import { useShellLabel as t } from "../shared/providers/shell/useShellLabel.js";
|
|
3
|
+
import { Sheet as n, SheetContent as r, SheetHeader as i, SheetTitle as a } from "../ui/sheet.js";
|
|
4
|
+
import { useAssistantControl as o } from "../shared/assistant/appControls/useAssistantControl.js";
|
|
5
|
+
import { useIsMobile as s } from "./contextSwitcher/useIsMobile.js";
|
|
6
|
+
import { useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
7
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
7
8
|
//#region src/chrome/ProfileSwitcher.tsx
|
|
8
|
-
var
|
|
9
|
-
let [
|
|
10
|
-
|
|
11
|
-
let
|
|
12
|
-
if (
|
|
13
|
-
let e =
|
|
9
|
+
var h = ({ user: h, accounts: g = [], activeAccountId: _, onViewProfile: v, onLogout: y, onSwitchAccount: b, onAddAccount: x, onRemoveAccount: S, compact: C = !1 }) => {
|
|
10
|
+
let [w, T] = d(!1), E = u(null), D = t(), O = s() && e(), k = u(y);
|
|
11
|
+
k.current = y;
|
|
12
|
+
let A = y !== void 0;
|
|
13
|
+
if (o("account.logout", l(() => A ? { run: () => {
|
|
14
|
+
let e = k.current;
|
|
14
15
|
return e ? (e(), { status: "done" }) : { status: "failed" };
|
|
15
|
-
} } : null, [
|
|
16
|
-
if (
|
|
16
|
+
} } : null, [A])), c(() => {
|
|
17
|
+
if (O) return;
|
|
17
18
|
let e = (e) => {
|
|
18
|
-
|
|
19
|
+
E.current && !E.current.contains(e.target) && T(!1);
|
|
19
20
|
};
|
|
20
|
-
if (
|
|
21
|
-
}, [
|
|
22
|
-
let
|
|
23
|
-
onClick: () =>
|
|
24
|
-
className: `flex items-center gap-2 p-2 rounded-button hover:bg-bg-sunken transition-colors ${
|
|
25
|
-
"aria-label":
|
|
26
|
-
"aria-expanded":
|
|
21
|
+
if (w) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
22
|
+
}, [w, O]), !h) return null;
|
|
23
|
+
let j = `${h.firstName.charAt(0)}${h.lastName.charAt(0)}`.toUpperCase(), M = g.length > 1, N = g.find((e) => e.id === _), P = g.filter((e) => e.id !== _), F = /* @__PURE__ */ m("button", {
|
|
24
|
+
onClick: () => T(!w),
|
|
25
|
+
className: `flex items-center gap-2 p-2 rounded-button hover:bg-bg-sunken transition-colors ${w ? "bg-bg-sunken" : ""}`,
|
|
26
|
+
"aria-label": D("appShell.userMenu", "User menu"),
|
|
27
|
+
"aria-expanded": w,
|
|
27
28
|
children: [
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ p("div", {
|
|
29
30
|
className: "size-8 rounded-full bg-action-primary-bg flex items-center justify-center flex-shrink-0",
|
|
30
|
-
children:
|
|
31
|
-
src:
|
|
32
|
-
alt: `${
|
|
31
|
+
children: h.avatar ? /* @__PURE__ */ p("img", {
|
|
32
|
+
src: h.avatar,
|
|
33
|
+
alt: `${h.firstName} ${h.lastName}`,
|
|
33
34
|
className: "w-full h-full rounded-full object-cover"
|
|
34
|
-
}) : /* @__PURE__ */
|
|
35
|
+
}) : /* @__PURE__ */ p("span", {
|
|
35
36
|
className: "text-action-primary-text font-semibold text-sm",
|
|
36
|
-
children:
|
|
37
|
+
children: j
|
|
37
38
|
})
|
|
38
39
|
}),
|
|
39
|
-
!
|
|
40
|
+
!C && /* @__PURE__ */ m("span", {
|
|
40
41
|
className: "text-body-sm font-medium text-text-primary",
|
|
41
42
|
children: [
|
|
42
|
-
|
|
43
|
+
h.firstName,
|
|
43
44
|
" ",
|
|
44
|
-
|
|
45
|
+
h.lastName
|
|
45
46
|
]
|
|
46
47
|
}),
|
|
47
|
-
!
|
|
48
|
+
!C && M && /* @__PURE__ */ p("span", {
|
|
48
49
|
className: "text-xs bg-action-primary-bg text-action-primary-text rounded-full size-5 flex items-center justify-center font-semibold",
|
|
49
|
-
children:
|
|
50
|
+
children: g.length
|
|
50
51
|
}),
|
|
51
|
-
!
|
|
52
|
-
className: `w-4 h-4 text-text-secondary transition-transform ${
|
|
52
|
+
!C && /* @__PURE__ */ p("svg", {
|
|
53
|
+
className: `w-4 h-4 text-text-secondary transition-transform ${w ? "rotate-180" : ""}`,
|
|
53
54
|
fill: "none",
|
|
54
55
|
stroke: "currentColor",
|
|
55
56
|
viewBox: "0 0 24 24",
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
+
children: /* @__PURE__ */ p("path", {
|
|
57
58
|
strokeLinecap: "round",
|
|
58
59
|
strokeLinejoin: "round",
|
|
59
60
|
strokeWidth: 2,
|
|
@@ -61,113 +62,113 @@ var m = ({ user: m, accounts: h = [], activeAccountId: g, onViewProfile: _, onLo
|
|
|
61
62
|
})
|
|
62
63
|
})
|
|
63
64
|
]
|
|
64
|
-
}),
|
|
65
|
-
!
|
|
65
|
+
}), I = () => /* @__PURE__ */ m(f, { children: [
|
|
66
|
+
!M && /* @__PURE__ */ m("div", {
|
|
66
67
|
className: "px-6 py-4 text-center border-b border-border-subtle",
|
|
67
68
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ p("div", {
|
|
69
70
|
className: "size-20 mx-auto mb-3 rounded-full bg-action-primary-bg flex items-center justify-center",
|
|
70
|
-
children:
|
|
71
|
-
src:
|
|
72
|
-
alt:
|
|
71
|
+
children: h.avatar ? /* @__PURE__ */ p("img", {
|
|
72
|
+
src: h.avatar,
|
|
73
|
+
alt: h.firstName,
|
|
73
74
|
className: "w-full h-full rounded-full object-cover"
|
|
74
|
-
}) : /* @__PURE__ */
|
|
75
|
+
}) : /* @__PURE__ */ p("span", {
|
|
75
76
|
className: "text-action-primary-text font-bold text-2xl",
|
|
76
|
-
children:
|
|
77
|
+
children: j
|
|
77
78
|
})
|
|
78
79
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ p("h3", {
|
|
80
81
|
className: "text-base font-semibold text-text-primary mb-1",
|
|
81
|
-
children:
|
|
82
|
+
children: D("userMenu.greeting", "Hi, {{name}}!", { name: h.firstName })
|
|
82
83
|
}),
|
|
83
|
-
|
|
84
|
+
h.email && /* @__PURE__ */ p("p", {
|
|
84
85
|
className: "text-body-sm text-text-secondary truncate",
|
|
85
|
-
children:
|
|
86
|
+
children: h.email
|
|
86
87
|
})
|
|
87
88
|
]
|
|
88
89
|
}),
|
|
89
|
-
|
|
90
|
+
M && N && /* @__PURE__ */ m("div", {
|
|
90
91
|
className: "px-4 py-3 border-b border-border-subtle",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ m("p", {
|
|
92
93
|
className: "text-body-sm font-semibold text-text-primary",
|
|
93
94
|
children: [
|
|
94
|
-
|
|
95
|
+
N.firstName,
|
|
95
96
|
" ",
|
|
96
|
-
|
|
97
|
+
N.lastName
|
|
97
98
|
]
|
|
98
|
-
}), /* @__PURE__ */
|
|
99
|
+
}), /* @__PURE__ */ p("p", {
|
|
99
100
|
className: "text-xs text-text-muted mt-0.5 truncate",
|
|
100
|
-
children:
|
|
101
|
+
children: N.email
|
|
101
102
|
})]
|
|
102
103
|
}),
|
|
103
|
-
|
|
104
|
+
v && /* @__PURE__ */ p("div", {
|
|
104
105
|
className: "px-4 py-2",
|
|
105
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ p("button", {
|
|
106
107
|
type: "button",
|
|
107
108
|
onClick: () => {
|
|
108
|
-
|
|
109
|
+
v(), T(!1);
|
|
109
110
|
},
|
|
110
111
|
className: "w-full px-4 py-2.5 text-body-sm font-medium text-text-primary bg-bg-surface hover:bg-bg-sunken rounded-button border border-border-subtle transition-colors",
|
|
111
|
-
children:
|
|
112
|
+
children: D("userMenu.viewProfile", "View Profile")
|
|
112
113
|
})
|
|
113
114
|
}),
|
|
114
|
-
|
|
115
|
+
M && P.length > 0 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
115
116
|
className: "px-4 pt-2 pb-1",
|
|
116
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ p("p", {
|
|
117
118
|
className: "text-[11px] font-medium text-text-muted uppercase tracking-wider",
|
|
118
|
-
children:
|
|
119
|
+
children: D("auth.security.switchAccount", "Switch Account")
|
|
119
120
|
})
|
|
120
|
-
}), /* @__PURE__ */
|
|
121
|
-
className: `${
|
|
122
|
-
children:
|
|
121
|
+
}), /* @__PURE__ */ p("div", {
|
|
122
|
+
className: `${P.length >= 3 ? "max-h-48 overflow-y-auto" : ""}`,
|
|
123
|
+
children: P.map((e) => {
|
|
123
124
|
let t = `${e.firstName?.charAt(0) || ""}${e.lastName?.charAt(0) || ""}`.toUpperCase();
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ p("div", {
|
|
125
126
|
className: "px-4 py-2 hover:bg-bg-sunken transition-colors group",
|
|
126
|
-
children: /* @__PURE__ */
|
|
127
|
+
children: /* @__PURE__ */ m("div", {
|
|
127
128
|
className: "flex items-center gap-3",
|
|
128
129
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ p("div", {
|
|
130
131
|
className: "size-10 rounded-full bg-action-primary-bg flex items-center justify-center flex-shrink-0",
|
|
131
|
-
children: e.avatar ? /* @__PURE__ */
|
|
132
|
+
children: e.avatar ? /* @__PURE__ */ p("img", {
|
|
132
133
|
src: e.avatar,
|
|
133
134
|
alt: e.name,
|
|
134
135
|
className: "w-full h-full rounded-full object-cover"
|
|
135
|
-
}) : /* @__PURE__ */
|
|
136
|
+
}) : /* @__PURE__ */ p("span", {
|
|
136
137
|
className: "text-action-primary-text font-semibold text-sm",
|
|
137
138
|
children: t
|
|
138
139
|
})
|
|
139
140
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ m("button", {
|
|
141
142
|
type: "button",
|
|
142
143
|
onClick: () => {
|
|
143
|
-
|
|
144
|
+
b && (b(e), T(!1));
|
|
144
145
|
},
|
|
145
146
|
className: "flex-1 text-left min-w-0",
|
|
146
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ m("p", {
|
|
147
148
|
className: "text-body-sm font-medium text-text-primary truncate",
|
|
148
149
|
children: [
|
|
149
150
|
e.firstName,
|
|
150
151
|
" ",
|
|
151
152
|
e.lastName
|
|
152
153
|
]
|
|
153
|
-
}), /* @__PURE__ */
|
|
154
|
+
}), /* @__PURE__ */ p("p", {
|
|
154
155
|
className: "text-xs text-text-muted truncate",
|
|
155
156
|
children: e.email
|
|
156
157
|
})]
|
|
157
158
|
}),
|
|
158
|
-
|
|
159
|
+
S && /* @__PURE__ */ p("button", {
|
|
159
160
|
type: "button",
|
|
160
161
|
onClick: (t) => {
|
|
161
|
-
t.stopPropagation(),
|
|
162
|
+
t.stopPropagation(), S(e.id);
|
|
162
163
|
},
|
|
163
164
|
className: "size-6 flex items-center justify-center rounded-full hover:bg-status-error-bg-subtle text-text-muted hover:text-status-error-text transition-colors opacity-0 group-hover:opacity-100",
|
|
164
|
-
"aria-label":
|
|
165
|
-
children: /* @__PURE__ */
|
|
165
|
+
"aria-label": D("appShell.removeAccount", "Remove account"),
|
|
166
|
+
children: /* @__PURE__ */ p("svg", {
|
|
166
167
|
className: "size-4",
|
|
167
168
|
fill: "none",
|
|
168
169
|
stroke: "currentColor",
|
|
169
170
|
viewBox: "0 0 24 24",
|
|
170
|
-
children: /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ p("path", {
|
|
171
172
|
strokeLinecap: "round",
|
|
172
173
|
strokeLinejoin: "round",
|
|
173
174
|
strokeWidth: 2,
|
|
@@ -180,78 +181,78 @@ var m = ({ user: m, accounts: h = [], activeAccountId: g, onViewProfile: _, onLo
|
|
|
180
181
|
}, e.id);
|
|
181
182
|
})
|
|
182
183
|
})] }),
|
|
183
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ p("div", {
|
|
184
185
|
className: "px-4 py-3 border-t border-border-subtle",
|
|
185
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ m("div", {
|
|
186
187
|
className: "grid grid-cols-2 gap-2",
|
|
187
|
-
children: [
|
|
188
|
+
children: [x && /* @__PURE__ */ m("button", {
|
|
188
189
|
type: "button",
|
|
189
190
|
onClick: () => {
|
|
190
|
-
|
|
191
|
+
x(), T(!1);
|
|
191
192
|
},
|
|
192
193
|
className: "flex items-center justify-center gap-2 px-3 py-2.5 text-body-sm font-medium text-text-primary bg-bg-surface hover:bg-bg-sunken rounded-button border border-border-subtle transition-colors",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ p("svg", {
|
|
194
195
|
className: "size-4",
|
|
195
196
|
fill: "none",
|
|
196
197
|
stroke: "currentColor",
|
|
197
198
|
viewBox: "0 0 24 24",
|
|
198
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ p("path", {
|
|
199
200
|
strokeLinecap: "round",
|
|
200
201
|
strokeLinejoin: "round",
|
|
201
202
|
strokeWidth: 2,
|
|
202
203
|
d: "M12 4v16m8-8H4"
|
|
203
204
|
})
|
|
204
|
-
}), /* @__PURE__ */
|
|
205
|
-
}),
|
|
205
|
+
}), /* @__PURE__ */ p("span", { children: D("auth.profileMenu.addAccount", "Add account") })]
|
|
206
|
+
}), y && /* @__PURE__ */ m("button", {
|
|
206
207
|
type: "button",
|
|
207
208
|
onClick: () => {
|
|
208
|
-
|
|
209
|
+
y(), T(!1);
|
|
209
210
|
},
|
|
210
211
|
className: "flex items-center justify-center gap-2 px-3 py-2.5 text-body-sm font-medium text-text-primary bg-bg-surface hover:bg-bg-sunken rounded-button border border-border-subtle transition-colors",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ p("svg", {
|
|
212
213
|
className: "size-4",
|
|
213
214
|
fill: "none",
|
|
214
215
|
stroke: "currentColor",
|
|
215
216
|
viewBox: "0 0 24 24",
|
|
216
|
-
children: /* @__PURE__ */
|
|
217
|
+
children: /* @__PURE__ */ p("path", {
|
|
217
218
|
strokeLinecap: "round",
|
|
218
219
|
strokeLinejoin: "round",
|
|
219
220
|
strokeWidth: 2,
|
|
220
221
|
d: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
|
|
221
222
|
})
|
|
222
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ p("span", { children: D("auth.security.signOutDialogConfirm", "Sign out") })]
|
|
223
224
|
})]
|
|
224
225
|
})
|
|
225
226
|
})
|
|
226
227
|
] });
|
|
227
|
-
return
|
|
228
|
+
return O ? /* @__PURE__ */ m("div", {
|
|
228
229
|
className: "relative",
|
|
229
|
-
children: [
|
|
230
|
-
open:
|
|
231
|
-
onOpenChange:
|
|
232
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: [F, /* @__PURE__ */ p(n, {
|
|
231
|
+
open: w,
|
|
232
|
+
onOpenChange: T,
|
|
233
|
+
children: /* @__PURE__ */ m(r, {
|
|
233
234
|
side: "bottom",
|
|
234
235
|
className: "h-[70vh] flex flex-col p-0",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ p(i, {
|
|
236
237
|
className: "px-4 pt-4 pb-2 border-b border-border-subtle",
|
|
237
|
-
children: /* @__PURE__ */
|
|
238
|
+
children: /* @__PURE__ */ p(a, {
|
|
238
239
|
className: "text-text-primary",
|
|
239
|
-
children:
|
|
240
|
+
children: D("appShell.userMenuSheetTitle", "Account")
|
|
240
241
|
})
|
|
241
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ p("div", {
|
|
242
243
|
className: "flex-1 overflow-y-auto",
|
|
243
|
-
children:
|
|
244
|
+
children: I()
|
|
244
245
|
})]
|
|
245
246
|
})
|
|
246
247
|
})]
|
|
247
|
-
}) : /* @__PURE__ */
|
|
248
|
+
}) : /* @__PURE__ */ m("div", {
|
|
248
249
|
className: "relative",
|
|
249
|
-
ref:
|
|
250
|
-
children: [
|
|
250
|
+
ref: E,
|
|
251
|
+
children: [F, w && /* @__PURE__ */ p("div", {
|
|
251
252
|
className: "absolute right-0 mt-2 w-[calc(100vw-1.5rem)] sm:w-72 max-w-72 bg-bg-elevated border border-border-subtle rounded-card shadow-[var(--shadow-elevation-4)] overflow-hidden z-50 animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200",
|
|
252
|
-
children:
|
|
253
|
+
children: I()
|
|
253
254
|
})]
|
|
254
255
|
});
|
|
255
256
|
};
|
|
256
257
|
//#endregion
|
|
257
|
-
export {
|
|
258
|
+
export { h as ProfileSwitcher };
|
|
@@ -1,60 +1,59 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { useEffect as t } from "react";
|
|
2
|
+
import { useEffect as e } from "react";
|
|
4
3
|
//#region node_modules/@openuidev/devtools/dist/index.mjs
|
|
5
|
-
var
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
return
|
|
4
|
+
var t = /^\d+(\.\d+){0,2}$/;
|
|
5
|
+
function n(e) {
|
|
6
|
+
let n = e?.trim();
|
|
7
|
+
return n ? t.test(n) ? n : null : "latest";
|
|
9
8
|
}
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
let t =
|
|
9
|
+
var r = 300 * 1e3;
|
|
10
|
+
function i(e) {
|
|
11
|
+
let t = n(e);
|
|
13
12
|
if (t === null) return null;
|
|
14
|
-
let
|
|
15
|
-
return /^\d+\.\d+\.\d+$/.test(t) ?
|
|
13
|
+
let i = `https://cdn.jsdelivr.net/npm/@openuidev/devtools@${t}/dist/devtools.browser.js`;
|
|
14
|
+
return /^\d+\.\d+\.\d+$/.test(t) ? i : `${i}?t=${Math.floor(Date.now() / r)}`;
|
|
16
15
|
}
|
|
17
|
-
function
|
|
18
|
-
let { version:
|
|
19
|
-
if (!(
|
|
20
|
-
let
|
|
21
|
-
if (
|
|
22
|
-
let
|
|
23
|
-
|
|
16
|
+
function a(e = {}) {
|
|
17
|
+
let { version: t, enabled: n, ...r } = e;
|
|
18
|
+
if (!(n ?? (typeof process > "u" || process.env.NODE_ENV !== "production")) || typeof document > "u") return () => {};
|
|
19
|
+
let a = i(t);
|
|
20
|
+
if (a === null) return console.warn(`[@openuidev/devtools] invalid version "${t?.trim()}" — use a major ("0"), minor ("0.1"), or exact ("0.1.0") pin. Widget not mounted.`), () => {};
|
|
21
|
+
let o = !1, s = () => {
|
|
22
|
+
o = !0;
|
|
24
23
|
};
|
|
25
24
|
return Promise.all([
|
|
26
25
|
import(
|
|
27
26
|
/* webpackIgnore: true */
|
|
28
27
|
/* @vite-ignore */
|
|
29
|
-
|
|
28
|
+
a
|
|
30
29
|
),
|
|
31
30
|
import("react"),
|
|
32
31
|
import("react-dom"),
|
|
33
|
-
import("
|
|
34
|
-
]).then(([e, t,
|
|
35
|
-
if (
|
|
36
|
-
let
|
|
37
|
-
|
|
32
|
+
import("react-dom/client")
|
|
33
|
+
]).then(([e, t, i, a]) => {
|
|
34
|
+
if (o) return;
|
|
35
|
+
let c = () => {
|
|
36
|
+
o || (s = e.mountOpenUIDevtools({
|
|
38
37
|
React: t,
|
|
39
|
-
ReactDOM:
|
|
38
|
+
ReactDOM: i,
|
|
40
39
|
ReactDOMClient: a,
|
|
41
40
|
loadReactLang: () => import("../../react-lang/dist/index.js"),
|
|
42
41
|
props: {
|
|
43
|
-
...
|
|
44
|
-
enabled:
|
|
42
|
+
...r,
|
|
43
|
+
enabled: n
|
|
45
44
|
}
|
|
46
45
|
}));
|
|
47
46
|
};
|
|
48
|
-
document.body ?
|
|
49
|
-
}).catch(() => {}), () =>
|
|
47
|
+
document.body ? c() : document.addEventListener("DOMContentLoaded", c, { once: !0 });
|
|
48
|
+
}).catch(() => {}), () => s();
|
|
50
49
|
}
|
|
51
|
-
function
|
|
52
|
-
let { enabled: n, position: r, maxEvents: i, errorsOnly:
|
|
53
|
-
return
|
|
50
|
+
function o(t) {
|
|
51
|
+
let { enabled: n, position: r, maxEvents: i, errorsOnly: o, autoOpenOnError: s, theme: c, version: l, __autoMounted: u } = t;
|
|
52
|
+
return e(() => a({
|
|
54
53
|
enabled: n,
|
|
55
54
|
position: r,
|
|
56
55
|
maxEvents: i,
|
|
57
|
-
errorsOnly:
|
|
56
|
+
errorsOnly: o,
|
|
58
57
|
autoOpenOnError: s,
|
|
59
58
|
theme: c,
|
|
60
59
|
version: l,
|
|
@@ -63,7 +62,7 @@ function s(e) {
|
|
|
63
62
|
n,
|
|
64
63
|
r,
|
|
65
64
|
i,
|
|
66
|
-
|
|
65
|
+
o,
|
|
67
66
|
s,
|
|
68
67
|
c,
|
|
69
68
|
l,
|
|
@@ -71,4 +70,4 @@ function s(e) {
|
|
|
71
70
|
]), null;
|
|
72
71
|
}
|
|
73
72
|
//#endregion
|
|
74
|
-
export {
|
|
73
|
+
export { o as OpenUIDevtools };
|