@mcp-use/inspector 20.0.0-beta.14 → 20.0.0-beta.15
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/cdn/inspector.js +76858 -9272
- package/dist/cli.js +1 -1
- package/dist/server/cdn-shell.js +2 -2
- package/dist/server/{chunk-3XD7J5NX.js → chunk-WNQGHIZ3.js} +1 -1
- package/dist/server/{chunk-DLHO3Q42.js → chunk-XKCUJ6ZJ.js} +1 -1
- package/dist/server/{chunk-N3VXWLT6.js → chunk-ZPGABKXL.js} +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/middleware.js +3 -3
- package/dist/server/version.js +1 -1
- package/dist/web/assets/index-Bqfsh_Rp.js +643 -0
- package/dist/web/index.html +2 -10
- package/package.json +1 -1
- package/dist/cdn/AnimatePresence-D1bZ5_-l.js +0 -394
- package/dist/cdn/ChatTab-D_2TXR3X.js +0 -6811
- package/dist/cdn/CheckboxIndicator-BjF73mGX.js +0 -252
- package/dist/cdn/ConnectionSettingsForm-BqH0PcZF.js +0 -929
- package/dist/cdn/ConnectionSettingsTab-Duhb1uQP.js +0 -151
- package/dist/cdn/ElicitationTab-PEmEDvC5.js +0 -655
- package/dist/cdn/FormContext-NtUiZclE.js +0 -135
- package/dist/cdn/InspectorContext-BBKCdfmK.js +0 -123
- package/dist/cdn/JSONDisplay-BJqMz7Ny.js +0 -324
- package/dist/cdn/ListTabHeader-DzmTtN1e.js +0 -89
- package/dist/cdn/MCPAppsDebugControls-w5NRWhlZ.js +0 -2174
- package/dist/cdn/ManufactOAuthCallback-ChbbjFIT.js +0 -31
- package/dist/cdn/MarkdownRenderer-BIsUE0bf.js +0 -3610
- package/dist/cdn/McpAppsViewPanel-B3_76u7O.js +0 -56
- package/dist/cdn/NotificationsTab-B7uebqMV.js +0 -290
- package/dist/cdn/OAuthCallback-CtLoXa3h.js +0 -58
- package/dist/cdn/PromptsTab-DpE0XLzk.js +0 -902
- package/dist/cdn/ResourcesTab-DQS24z5p.js +0 -566
- package/dist/cdn/SamplingTab-ZDeu0CjJ.js +0 -659
- package/dist/cdn/ServerMetadataTab-BM3VhSLf.js +0 -244
- package/dist/cdn/StatusIcon-Q3n3YRtE.js +0 -65
- package/dist/cdn/ToolsTab-LtviZSWA.js +0 -2045
- package/dist/cdn/ViewPreview-BwC_tbF_.js +0 -238
- package/dist/cdn/WidgetDebugContext-B6yoOVVV.js +0 -314
- package/dist/cdn/WidgetWrapper-BlbQAh_X.js +0 -12
- package/dist/cdn/basePath-B8HuhIMu.js +0 -25
- package/dist/cdn/bell-GrTZcnD2.js +0 -10
- package/dist/cdn/browser-DG2Z8392.js +0 -42
- package/dist/cdn/brush-CelVvMGp.js +0 -17
- package/dist/cdn/button-CB4uOoUV.js +0 -2509
- package/dist/cdn/card-BA-DQk-G.js +0 -41
- package/dist/cdn/cfWorker-Bxcs9rNe.js +0 -10799
- package/dist/cdn/checkbox-kwVa4gRX.js +0 -20
- package/dist/cdn/chunk-QUQL4437-XnDcYQEx.js +0 -1508
- package/dist/cdn/clock-YMF8Gtw5.js +0 -12
- package/dist/cdn/code-C8sN2OGR.js +0 -10
- package/dist/cdn/createLucideIcon-BONxC1L5.js +0 -213
- package/dist/cdn/dialog-CJGnC5Ag.js +0 -1028
- package/dist/cdn/dist-CHKts0NS.js +0 -2307
- package/dist/cdn/dist-CTJnCYmk.js +0 -616
- package/dist/cdn/external-link-Bo4lQxr1.js +0 -17
- package/dist/cdn/eye-pSGG7nvf.js +0 -29
- package/dist/cdn/folder-open-aM8CPtBO.js +0 -7
- package/dist/cdn/hash-DDs2vE1k.js +0 -33
- package/dist/cdn/history-BfUFpL1d.js +0 -17
- package/dist/cdn/index-browser-DO-sd0TA.js +0 -1853
- package/dist/cdn/info-BMkB68mB.js +0 -19
- package/dist/cdn/input-BCpgLXU1.js +0 -9654
- package/dist/cdn/inspector-settings-layout-0VDsjeqb.js +0 -4
- package/dist/cdn/label-A0UGV8FE.js +0 -60
- package/dist/cdn/loader-circle-BKRHJEB7.js +0 -7
- package/dist/cdn/manufact-auth-BQMHhbLV.js +0 -423
- package/dist/cdn/maximize-2-DdrB_spi.js +0 -21
- package/dist/cdn/maximize-hSOCz133.js +0 -21
- package/dist/cdn/message-square-D3tKB3uJ.js +0 -7
- package/dist/cdn/not-found-BajFyZpp.js +0 -32
- package/dist/cdn/play-B1leulYf.js +0 -7
- package/dist/cdn/providerMeta-CjGU4rID.js +0 -436
- package/dist/cdn/react-BDA-xrgK.js +0 -5421
- package/dist/cdn/react-BIs9pQ3H.js +0 -926
- package/dist/cdn/refresh-cw-CyvXrS91.js +0 -21
- package/dist/cdn/save-CmdEPUAm.js +0 -34
- package/dist/cdn/schemaHelpers-DTV38jGq.js +0 -16
- package/dist/cdn/select-CCFHjOGk.js +0 -2595
- package/dist/cdn/servers-Dd0Vcp81.js +0 -30
- package/dist/cdn/shared-CJVHJhag.js +0 -1700
- package/dist/cdn/sheet-oyq1mIyg.js +0 -2078
- package/dist/cdn/sparkles-CxeZpVtX.js +0 -23
- package/dist/cdn/spinner-Be1GlSGX.js +0 -15
- package/dist/cdn/square-check-big-C_4wbfwF.js +0 -10
- package/dist/cdn/switch-DHXEA_N5.js +0 -665
- package/dist/cdn/tabs-subtle-Dubd6Kj8.js +0 -788
- package/dist/cdn/telemetry-e4uEESP7.js +0 -208
- package/dist/cdn/textarea-CwmI8_uI.js +0 -14
- package/dist/cdn/trash-2-BhumJAFE.js +0 -25
- package/dist/cdn/useAriaLabelledBy-Cra6w3YY.js +0 -30
- package/dist/cdn/useCompositeItem-Dhnm-7el.js +0 -26
- package/dist/cdn/useConfig-Dw_6Ztzr.js +0 -235
- package/dist/cdn/useSavedRequests-mSIsDd4c.js +0 -51
- package/dist/cdn/useViewHostProps-BPApUBaM.js +0 -364
- package/dist/cdn/wrench-DvK20LUT.js +0 -7
- package/dist/cdn/x-EilKPiCX.js +0 -10
- package/dist/cdn/zap-0Wr9QO7N.js +0 -10
- package/dist/web/assets/AnimatePresence-FfDQQNFJ.js +0 -9
- package/dist/web/assets/ChatTab-BhoU_ges.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-vJcr7uI3.js +0 -1
- package/dist/web/assets/ElicitationTab-4my-wtXf.js +0 -1
- package/dist/web/assets/FormContext-sV-yByKz.js +0 -1
- package/dist/web/assets/ListTabHeader-CrGae306.js +0 -1
- package/dist/web/assets/MCPAppsDebugControls-Cd4s9mr1.js +0 -34
- package/dist/web/assets/ManufactOAuthCallback-CCRWJhuT.js +0 -1
- package/dist/web/assets/MarkdownRenderer-BUDZYHqm.js +0 -47
- package/dist/web/assets/McpAppsViewPanel-Cil7Fdy4.js +0 -1
- package/dist/web/assets/NotificationsTab-Bl3O5PRb.js +0 -1
- package/dist/web/assets/OAuthCallback-CceVgo-9.js +0 -1
- package/dist/web/assets/PromptsTab-8lSxb8x-.js +0 -15
- package/dist/web/assets/ResourcesTab-DtGfgsPv.js +0 -2
- package/dist/web/assets/SamplingTab-XC-DTfOo.js +0 -1
- package/dist/web/assets/ServerMetadataTab-C5d_dI3_.js +0 -1
- package/dist/web/assets/ToolsTab-DuHPXItY.js +0 -8
- package/dist/web/assets/ViewPreview-DXswO9q8.js +0 -1
- package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +0 -1
- package/dist/web/assets/brush-DX0UZ_pI.js +0 -1
- package/dist/web/assets/button-C8Xa2k4x.js +0 -1
- package/dist/web/assets/checkbox-DAfdiGl1.js +0 -1
- package/dist/web/assets/code-B14rVdNt.js +0 -1
- package/dist/web/assets/createLucideIcon-BEHeJH0M.js +0 -1
- package/dist/web/assets/dist-C2Y1wkk6.js +0 -21
- package/dist/web/assets/index-tu5-QdSJ.js +0 -499
- package/dist/web/assets/input-C0OQCUZy.js +0 -1
- package/dist/web/assets/inspector-settings-layout-yjKRJDai.js +0 -1
- package/dist/web/assets/label-CI7JWQOo.js +0 -1
- package/dist/web/assets/maximize-2-Br1WQzT2.js +0 -1
- package/dist/web/assets/maximize-CJNgRe6S.js +0 -1
- package/dist/web/assets/react-CU_d2d5K.js +0 -1
- package/dist/web/assets/refresh-cw-B5iaAZKn.js +0 -1
- package/dist/web/assets/save-TM6fvNrt.js +0 -1
- package/dist/web/assets/schemaHelpers-DLNTQr_6.js +0 -1
- package/dist/web/assets/select-D6jzbLJn.js +0 -1
- package/dist/web/assets/shared-c1Yr-wvV.js +0 -1
- package/dist/web/assets/sparkles-BGYTDThM.js +0 -1
- package/dist/web/assets/tabs-subtle-CHvFXVIA.js +0 -1
- package/dist/web/assets/textarea-CRTXuRmE.js +0 -1
- package/dist/web/assets/useConfig-9UVqLmR_.js +0 -1
- package/dist/web/assets/useViewHostProps-BBoPQYEl.js +0 -1
- package/dist/web/assets/zap-BDWHCVHU.js +0 -1
|
@@ -1,788 +0,0 @@
|
|
|
1
|
-
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { Gn as n, Jn as r, Mn as i, Nn as a, Qt as o, Vn as s, X as c, Xt as l, Yn as u, Zt as d, c as f, en as p, f as m, hn as h, mn as g, on as _, pn as v, s as y, tn as b } from "./input-BCpgLXU1.js";
|
|
3
|
-
import { n as x } from "./createLucideIcon-BONxC1L5.js";
|
|
4
|
-
import { H as S, U as C, a as w, d as T, f as E, g as D, m as O, o as k, s as A, u as j, v as M } from "./button-CB4uOoUV.js";
|
|
5
|
-
import { n as N } from "./label-A0UGV8FE.js";
|
|
6
|
-
import { _ as P, a as F, c as I, d as L, f as R, g as z, h as B, i as V, l as H, n as U, o as W, p as G, r as ee, s as K, t as q, v as J } from "./AnimatePresence-D1bZ5_-l.js";
|
|
7
|
-
import { t as Y } from "./useCompositeItem-Dhnm-7el.js";
|
|
8
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/tabs/root/TabsRootContext.mjs
|
|
9
|
-
var X = /* @__PURE__ */ e(t(), 1), Z = /*#__PURE__*/ X.createContext(void 0);
|
|
10
|
-
process.env.NODE_ENV !== "production" && (Z.displayName = "TabsRootContext");
|
|
11
|
-
function Q() {
|
|
12
|
-
let e = X.useContext(Z);
|
|
13
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? O(64) : "Base UI: TabsRootContext is missing. Tabs parts must be placed within <Tabs.Root>.");
|
|
14
|
-
return e;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/tabs/root/TabsRootDataAttributes.mjs
|
|
18
|
-
var te = /*#__PURE__*/ function(e) {
|
|
19
|
-
return e.activationDirection = "data-activation-direction", e.orientation = "data-orientation", e;
|
|
20
|
-
}({}), ne = { tabActivationDirection: (e) => ({ [te.activationDirection]: e }) }, $ = x(), re = /*#__PURE__*/ X.forwardRef(function(e, t) {
|
|
21
|
-
let { className: a, defaultValue: o = 0, onValueChange: c, orientation: l = "horizontal", render: u, value: d, style: f, ...p } = e, m = e.defaultValue !== void 0, h = X.useRef([]), [g, _] = X.useState(() => /* @__PURE__ */ new Map()), [v, y] = N({
|
|
22
|
-
controlled: d,
|
|
23
|
-
default: o,
|
|
24
|
-
name: "Tabs",
|
|
25
|
-
state: "value"
|
|
26
|
-
}), b = d !== void 0, [x, S] = X.useState(() => /* @__PURE__ */ new Map()), C = X.useRef(void 0), T = X.useCallback((e) => {
|
|
27
|
-
if (e === void 0) return null;
|
|
28
|
-
for (let [t, n] of x.entries()) if (n != null && e === (n.value ?? n.index)) return t;
|
|
29
|
-
return null;
|
|
30
|
-
}, [x]), [E, O] = X.useState(() => ({
|
|
31
|
-
previousValue: v,
|
|
32
|
-
tabActivationDirection: "none"
|
|
33
|
-
})), { previousValue: k, tabActivationDirection: A } = E, j = A, P = !1;
|
|
34
|
-
k !== v && (j = ie(k, v, l, x), P = k != null && v != null && T(v) == null);
|
|
35
|
-
let F = P ? k : v, I = k !== F || A !== j;
|
|
36
|
-
D(() => {
|
|
37
|
-
I && O({
|
|
38
|
-
previousValue: F,
|
|
39
|
-
tabActivationDirection: j
|
|
40
|
-
});
|
|
41
|
-
}, [
|
|
42
|
-
F,
|
|
43
|
-
I,
|
|
44
|
-
j
|
|
45
|
-
]);
|
|
46
|
-
let L = M((e, t) => {
|
|
47
|
-
t.activationDirection = ie(v, e, l, x), c?.(e, t), !t.isCanceled && y(e);
|
|
48
|
-
}), R = M((e, t) => {
|
|
49
|
-
c?.(e, i(t, void 0, void 0, { activationDirection: "none" }));
|
|
50
|
-
}), z = M((e, t) => {
|
|
51
|
-
_((n) => {
|
|
52
|
-
if (n.get(e) === t) return n;
|
|
53
|
-
let r = new Map(n);
|
|
54
|
-
return r.set(e, t), r;
|
|
55
|
-
});
|
|
56
|
-
}), B = M((e, t) => {
|
|
57
|
-
_((n) => {
|
|
58
|
-
if (!n.has(e) || n.get(e) !== t) return n;
|
|
59
|
-
let r = new Map(n);
|
|
60
|
-
return r.delete(e), r;
|
|
61
|
-
});
|
|
62
|
-
}), V = X.useCallback((e) => g.get(e), [g]), H = X.useCallback((e) => {
|
|
63
|
-
for (let t of x.values()) if (e === t?.value) return t?.id;
|
|
64
|
-
}, [x]), U = X.useMemo(() => ({
|
|
65
|
-
getTabElementBySelectedValue: T,
|
|
66
|
-
getTabIdByPanelValue: H,
|
|
67
|
-
getTabPanelIdByValue: V,
|
|
68
|
-
onValueChange: L,
|
|
69
|
-
orientation: l,
|
|
70
|
-
registerMountedTabPanel: z,
|
|
71
|
-
setTabMap: S,
|
|
72
|
-
unregisterMountedTabPanel: B,
|
|
73
|
-
tabActivationDirection: j,
|
|
74
|
-
value: v
|
|
75
|
-
}), [
|
|
76
|
-
T,
|
|
77
|
-
H,
|
|
78
|
-
V,
|
|
79
|
-
L,
|
|
80
|
-
l,
|
|
81
|
-
z,
|
|
82
|
-
S,
|
|
83
|
-
B,
|
|
84
|
-
j,
|
|
85
|
-
v
|
|
86
|
-
]), W = X.useMemo(() => {
|
|
87
|
-
for (let e of x.values()) if (e != null && e.value === v) return e;
|
|
88
|
-
}, [x, v]), G = X.useMemo(() => {
|
|
89
|
-
for (let e of x.values()) if (e != null && !e.disabled) return e.value;
|
|
90
|
-
}, [x]), K = X.useRef(!m), q = X.useRef(o), J = X.useRef(m), Y = X.useRef(!1);
|
|
91
|
-
D(() => {
|
|
92
|
-
if (b) return;
|
|
93
|
-
function e(e, t) {
|
|
94
|
-
y(e), O((t) => t.previousValue === e && t.tabActivationDirection === "none" ? t : {
|
|
95
|
-
previousValue: e,
|
|
96
|
-
tabActivationDirection: "none"
|
|
97
|
-
}), R(e, t), K.current = !1;
|
|
98
|
-
}
|
|
99
|
-
if (x.size === 0) {
|
|
100
|
-
Y.current && v !== null && !C.current?.isConnected && e(null, r);
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
Y.current = !0, C.current = x.keys().next().value;
|
|
104
|
-
let t = W?.disabled, i = W == null && v !== null;
|
|
105
|
-
if (!t && v === q.current && (J.current = !1), J.current && t && v === q.current) return;
|
|
106
|
-
let a = K.current;
|
|
107
|
-
if (t || i) {
|
|
108
|
-
let i = G ?? null;
|
|
109
|
-
if (v === i) {
|
|
110
|
-
K.current = !1;
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
let o = r;
|
|
114
|
-
a ? o = n : t && (o = s), e(i, o);
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
a && W != null && (R(v, n), K.current = !1);
|
|
118
|
-
}, [
|
|
119
|
-
G,
|
|
120
|
-
b,
|
|
121
|
-
R,
|
|
122
|
-
W,
|
|
123
|
-
y,
|
|
124
|
-
x,
|
|
125
|
-
v
|
|
126
|
-
]);
|
|
127
|
-
let Q = w("div", e, {
|
|
128
|
-
state: {
|
|
129
|
-
orientation: l,
|
|
130
|
-
tabActivationDirection: j
|
|
131
|
-
},
|
|
132
|
-
ref: t,
|
|
133
|
-
props: p,
|
|
134
|
-
stateAttributesMapping: ne
|
|
135
|
-
});
|
|
136
|
-
return /*#__PURE__*/ (0, $.jsx)(Z.Provider, {
|
|
137
|
-
value: U,
|
|
138
|
-
children: /*#__PURE__*/ (0, $.jsx)(ee, {
|
|
139
|
-
elementsRef: h,
|
|
140
|
-
children: Q
|
|
141
|
-
})
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
process.env.NODE_ENV !== "production" && (re.displayName = "TabsRoot");
|
|
145
|
-
function ie(e, t, n, r) {
|
|
146
|
-
if (e == null || t == null) return "none";
|
|
147
|
-
let i = null, a = null;
|
|
148
|
-
for (let [n, o] of r.entries()) {
|
|
149
|
-
if (o == null) continue;
|
|
150
|
-
let r = o.value ?? o.index;
|
|
151
|
-
if (e === r && (i = n), t === r && (a = n), i != null && a != null) break;
|
|
152
|
-
}
|
|
153
|
-
if (i == null || a == null) return i !== a && (typeof e == "number" || typeof e == "string") && typeof e == typeof t ? n === "horizontal" ? t > e ? "right" : "left" : t > e ? "down" : "up" : "none";
|
|
154
|
-
let o = i.getBoundingClientRect(), s = a.getBoundingClientRect();
|
|
155
|
-
if (n === "horizontal") {
|
|
156
|
-
if (s.left < o.left) return "left";
|
|
157
|
-
if (s.left > o.left) return "right";
|
|
158
|
-
} else {
|
|
159
|
-
if (s.top < o.top) return "up";
|
|
160
|
-
if (s.top > o.top) return "down";
|
|
161
|
-
}
|
|
162
|
-
return "none";
|
|
163
|
-
}
|
|
164
|
-
//#endregion
|
|
165
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/composite/constants.mjs
|
|
166
|
-
var ae = "data-composite-item-active", oe = /*#__PURE__*/ X.createContext(void 0);
|
|
167
|
-
process.env.NODE_ENV !== "production" && (oe.displayName = "TabsListContext");
|
|
168
|
-
function se() {
|
|
169
|
-
let e = X.useContext(oe);
|
|
170
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? O(65) : "Base UI: TabsListContext is missing. TabsList parts must be placed within <Tabs.List>.");
|
|
171
|
-
return e;
|
|
172
|
-
}
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/tabs/tab/TabsTab.mjs
|
|
175
|
-
var ce = /*#__PURE__*/ X.forwardRef(function(e, t) {
|
|
176
|
-
let { className: n, disabled: r = !1, render: o, value: s, id: c, nativeButton: l = !0, style: d, ...f } = e, { value: p, getTabPanelIdByValue: m, orientation: h, tabActivationDirection: y } = Q(), { activateOnFocus: b, highlightedTabIndex: x, onTabActivation: S, registerTabResizeObserverElement: C, setHighlightedTabIndex: E, tabsListElement: O } = se(), k = a(c), { compositeProps: A, compositeRef: j, index: M } = Y({ metadata: X.useMemo(() => ({
|
|
177
|
-
disabled: r,
|
|
178
|
-
id: k,
|
|
179
|
-
value: s
|
|
180
|
-
}), [
|
|
181
|
-
r,
|
|
182
|
-
k,
|
|
183
|
-
s
|
|
184
|
-
]) }), N = s === p, P = X.useRef(!1), F = X.useRef(null);
|
|
185
|
-
D(() => {
|
|
186
|
-
let e = F.current;
|
|
187
|
-
if (e) return C(e);
|
|
188
|
-
}, [C]), D(() => {
|
|
189
|
-
if (P.current) {
|
|
190
|
-
P.current = !1;
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
if (!(N && M > -1 && x !== M)) return;
|
|
194
|
-
let e = O;
|
|
195
|
-
if (e != null) {
|
|
196
|
-
let t = v(_(e));
|
|
197
|
-
if (t && g(e, t)) return;
|
|
198
|
-
}
|
|
199
|
-
r || E(M);
|
|
200
|
-
}, [
|
|
201
|
-
N,
|
|
202
|
-
M,
|
|
203
|
-
x,
|
|
204
|
-
E,
|
|
205
|
-
r,
|
|
206
|
-
O
|
|
207
|
-
]);
|
|
208
|
-
let { getButtonProps: I, buttonRef: L } = T({
|
|
209
|
-
disabled: r,
|
|
210
|
-
native: l,
|
|
211
|
-
focusableWhenDisabled: !0
|
|
212
|
-
}), R = m(s), z = X.useRef(!1), B = X.useRef(!1);
|
|
213
|
-
function V(e) {
|
|
214
|
-
N || r || S(s, i(u, e.nativeEvent, void 0, { activationDirection: "none" }));
|
|
215
|
-
}
|
|
216
|
-
function H(e) {
|
|
217
|
-
N || (M > -1 && !r && E(M), !r && b && (!z.current || z.current && B.current) && S(s, i(u, e.nativeEvent, void 0, { activationDirection: "none" })));
|
|
218
|
-
}
|
|
219
|
-
function U(e) {
|
|
220
|
-
if (N || r) return;
|
|
221
|
-
z.current = !0;
|
|
222
|
-
function t() {
|
|
223
|
-
z.current = !1, B.current = !1;
|
|
224
|
-
}
|
|
225
|
-
(!e.button || e.button === 0) && (B.current = !0, _(e.currentTarget).addEventListener("pointerup", t, { once: !0 }));
|
|
226
|
-
}
|
|
227
|
-
return w("button", e, {
|
|
228
|
-
state: {
|
|
229
|
-
disabled: r,
|
|
230
|
-
active: N,
|
|
231
|
-
orientation: h,
|
|
232
|
-
tabActivationDirection: y
|
|
233
|
-
},
|
|
234
|
-
ref: [
|
|
235
|
-
t,
|
|
236
|
-
L,
|
|
237
|
-
j,
|
|
238
|
-
F
|
|
239
|
-
],
|
|
240
|
-
props: [
|
|
241
|
-
A,
|
|
242
|
-
{
|
|
243
|
-
role: "tab",
|
|
244
|
-
"aria-controls": R,
|
|
245
|
-
"aria-selected": N,
|
|
246
|
-
id: k,
|
|
247
|
-
onClick: V,
|
|
248
|
-
onFocus: H,
|
|
249
|
-
onPointerDown: U,
|
|
250
|
-
[ae]: N ? "" : void 0,
|
|
251
|
-
onKeyDownCapture() {
|
|
252
|
-
P.current = !0;
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
f,
|
|
256
|
-
I
|
|
257
|
-
],
|
|
258
|
-
stateAttributesMapping: ne
|
|
259
|
-
});
|
|
260
|
-
});
|
|
261
|
-
process.env.NODE_ENV !== "production" && (ce.displayName = "TabsTab");
|
|
262
|
-
//#endregion
|
|
263
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/composite/root/useCompositeRoot.mjs
|
|
264
|
-
var le = [];
|
|
265
|
-
function ue(e) {
|
|
266
|
-
let { loopFocus: t = !0, orientation: n = "both", grid: r, onLoop: i, direction: a, highlightedIndex: s, onHighlightedIndexChange: c, rootRef: u, enableHomeAndEndKeys: f = !1, stopEventPropagation: m = !1, disabledIndices: g, modifierKeys: _ = le } = e, [v, y] = X.useState(0), x = r != null, S = X.useRef(null), C = j(S, u), w = X.useRef([]), T = X.useRef(!1), E = s ?? v, O = M((e, t = !1) => {
|
|
267
|
-
if ((c ?? y)(e), t) {
|
|
268
|
-
let t = w.current[e];
|
|
269
|
-
J(S.current, t, a, n);
|
|
270
|
-
}
|
|
271
|
-
}), k = M((e) => {
|
|
272
|
-
if (e.size === 0 || T.current) return;
|
|
273
|
-
T.current = !0;
|
|
274
|
-
let t = Array.from(e.keys()), r = t.find((e) => e?.hasAttribute("data-composite-item-active")) ?? null, i = r ? t.indexOf(r) : -1;
|
|
275
|
-
if (i !== -1) O(i);
|
|
276
|
-
else if (b(t, E, g)) {
|
|
277
|
-
let e = l(t, { disabledIndices: g });
|
|
278
|
-
p(t, e) || O(e);
|
|
279
|
-
}
|
|
280
|
-
J(S.current, r, a, n);
|
|
281
|
-
});
|
|
282
|
-
D(() => {
|
|
283
|
-
if (g == null || s != null || !T.current) return;
|
|
284
|
-
let e = w.current;
|
|
285
|
-
if (b(e, E, g)) {
|
|
286
|
-
let t = l(e, { disabledIndices: g });
|
|
287
|
-
p(e, t) || O(t);
|
|
288
|
-
}
|
|
289
|
-
}, [
|
|
290
|
-
g,
|
|
291
|
-
s,
|
|
292
|
-
E,
|
|
293
|
-
w,
|
|
294
|
-
O
|
|
295
|
-
]);
|
|
296
|
-
let A = M((e, t, n) => i ? i(e, t, n, w) : n), N = M((e) => {
|
|
297
|
-
let s = f ? H : F;
|
|
298
|
-
if (!s.has(e.key) || de(e, _) || !S.current) return;
|
|
299
|
-
let c = a === "rtl", u = c ? W : K, v = {
|
|
300
|
-
horizontal: u,
|
|
301
|
-
vertical: V,
|
|
302
|
-
both: u
|
|
303
|
-
}[n], y = c ? K : W, b = {
|
|
304
|
-
horizontal: y,
|
|
305
|
-
vertical: I,
|
|
306
|
-
both: y
|
|
307
|
-
}[n], C = h(e.nativeEvent);
|
|
308
|
-
if (C != null && P(C) && !U(C)) {
|
|
309
|
-
let t = C.selectionStart, n = C.selectionEnd, r = C.value ?? "";
|
|
310
|
-
if (t == null || e.shiftKey || t !== n || e.key !== b && t < r.length || e.key !== v && t > 0) return;
|
|
311
|
-
}
|
|
312
|
-
let T = E, D = o(w, g), k = d(w, g);
|
|
313
|
-
r != null && (T = r({
|
|
314
|
-
disabledIndices: g,
|
|
315
|
-
elementsRef: w,
|
|
316
|
-
event: e,
|
|
317
|
-
highlightedIndex: E,
|
|
318
|
-
loopFocus: t,
|
|
319
|
-
maxIndex: k,
|
|
320
|
-
minIndex: D,
|
|
321
|
-
onLoop: A,
|
|
322
|
-
orientation: n,
|
|
323
|
-
rtl: c
|
|
324
|
-
}));
|
|
325
|
-
let j = {
|
|
326
|
-
horizontal: [u],
|
|
327
|
-
vertical: [V],
|
|
328
|
-
both: [u, V]
|
|
329
|
-
}[n], M = {
|
|
330
|
-
horizontal: [y],
|
|
331
|
-
vertical: [I],
|
|
332
|
-
both: [y, I]
|
|
333
|
-
}[n], N = x ? s : {
|
|
334
|
-
horizontal: f ? R : L,
|
|
335
|
-
vertical: f ? z : B,
|
|
336
|
-
both: s
|
|
337
|
-
}[n];
|
|
338
|
-
f && (e.key === "Home" ? T = D : e.key === "End" && (T = k)), T === E && (j.includes(e.key) || M.includes(e.key)) && (t && T === k && j.includes(e.key) ? (T = D, i && (T = i(e, E, T, w))) : t && T === D && M.includes(e.key) ? (T = k, i && (T = i(e, E, T, w))) : T = l(w.current, {
|
|
339
|
-
startingIndex: T,
|
|
340
|
-
decrement: M.includes(e.key),
|
|
341
|
-
disabledIndices: g
|
|
342
|
-
})), T !== E && !p(w.current, T) && (m && e.stopPropagation(), N.has(e.key) && e.preventDefault(), O(T, !0), queueMicrotask(() => {
|
|
343
|
-
w.current[T]?.focus();
|
|
344
|
-
}));
|
|
345
|
-
});
|
|
346
|
-
return {
|
|
347
|
-
props: {
|
|
348
|
-
ref: C,
|
|
349
|
-
onFocus(e) {
|
|
350
|
-
let t = S.current, n = h(e.nativeEvent);
|
|
351
|
-
!t || n == null || !P(n) || n.setSelectionRange(0, n.value.length ?? 0);
|
|
352
|
-
},
|
|
353
|
-
onKeyDown: N
|
|
354
|
-
},
|
|
355
|
-
highlightedIndex: E,
|
|
356
|
-
onHighlightedIndexChange: O,
|
|
357
|
-
elementsRef: w,
|
|
358
|
-
disabledIndices: g,
|
|
359
|
-
onMapChange: k,
|
|
360
|
-
relayKeyboardEvent: N
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
function de(e, t) {
|
|
364
|
-
for (let n of G.values()) if (!t.includes(n) && e.getModifierState(n)) return !0;
|
|
365
|
-
return !1;
|
|
366
|
-
}
|
|
367
|
-
//#endregion
|
|
368
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/internals/composite/root/CompositeRoot.mjs
|
|
369
|
-
function fe(e) {
|
|
370
|
-
let { render: t, className: n, style: r, refs: i = k, props: a = k, state: o = A, stateAttributesMapping: s, highlightedIndex: l, onHighlightedIndexChange: u, orientation: d, grid: f, loopFocus: p, onLoop: m, enableHomeAndEndKeys: h, onMapChange: g, stopEventPropagation: _ = !0, rootRef: v, disabledIndices: y, modifierKeys: b, highlightItemOnHover: x = !1, tag: S = "div", ...C } = e, { props: T, highlightedIndex: D, onHighlightedIndexChange: O, elementsRef: j, onMapChange: M, relayKeyboardEvent: N } = ue({
|
|
371
|
-
grid: f,
|
|
372
|
-
loopFocus: p,
|
|
373
|
-
onLoop: m,
|
|
374
|
-
orientation: d,
|
|
375
|
-
highlightedIndex: l,
|
|
376
|
-
onHighlightedIndexChange: u,
|
|
377
|
-
rootRef: v,
|
|
378
|
-
stopEventPropagation: _,
|
|
379
|
-
enableHomeAndEndKeys: h,
|
|
380
|
-
direction: c(),
|
|
381
|
-
disabledIndices: y,
|
|
382
|
-
modifierKeys: b
|
|
383
|
-
}), P = w(S, e, {
|
|
384
|
-
state: o,
|
|
385
|
-
ref: i,
|
|
386
|
-
props: [
|
|
387
|
-
T,
|
|
388
|
-
...a,
|
|
389
|
-
C
|
|
390
|
-
],
|
|
391
|
-
stateAttributesMapping: s
|
|
392
|
-
}), F = X.useMemo(() => ({
|
|
393
|
-
highlightedIndex: D,
|
|
394
|
-
onHighlightedIndexChange: O,
|
|
395
|
-
highlightItemOnHover: x,
|
|
396
|
-
relayKeyboardEvent: N
|
|
397
|
-
}), [
|
|
398
|
-
D,
|
|
399
|
-
O,
|
|
400
|
-
x,
|
|
401
|
-
N
|
|
402
|
-
]);
|
|
403
|
-
return /*#__PURE__*/ (0, $.jsx)(E.Provider, {
|
|
404
|
-
value: F,
|
|
405
|
-
children: /*#__PURE__*/ (0, $.jsx)(ee, {
|
|
406
|
-
elementsRef: j,
|
|
407
|
-
onMapChange: (e) => {
|
|
408
|
-
g?.(e), M(e);
|
|
409
|
-
},
|
|
410
|
-
children: P
|
|
411
|
-
})
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
//#endregion
|
|
415
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@types+react@19.2.17_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@base-ui/react/tabs/list/TabsList.mjs
|
|
416
|
-
var pe = /*#__PURE__*/ X.forwardRef(function(e, t) {
|
|
417
|
-
let { activateOnFocus: n = !1, className: r, loopFocus: i = !0, render: a, style: o, ...s } = e, { onValueChange: c, orientation: l, value: u, setTabMap: d, tabActivationDirection: f } = Q(), [p, m] = X.useState(0), [h, g] = X.useState(null), _ = X.useRef(/* @__PURE__ */ new Set()), v = X.useRef(/* @__PURE__ */ new Set()), y = X.useRef(null);
|
|
418
|
-
D(() => {
|
|
419
|
-
if (typeof ResizeObserver > "u") return;
|
|
420
|
-
let e = new ResizeObserver(() => {
|
|
421
|
-
_.current.forEach((e) => {
|
|
422
|
-
e();
|
|
423
|
-
});
|
|
424
|
-
});
|
|
425
|
-
return y.current = e, h && e.observe(h), v.current.forEach((t) => {
|
|
426
|
-
e.observe(t);
|
|
427
|
-
}), () => {
|
|
428
|
-
e.disconnect(), y.current = null;
|
|
429
|
-
};
|
|
430
|
-
}, [h]);
|
|
431
|
-
let b = M((e) => (_.current.add(e), () => {
|
|
432
|
-
_.current.delete(e);
|
|
433
|
-
})), x = M((e) => (v.current.add(e), y.current?.observe(e), () => {
|
|
434
|
-
v.current.delete(e), y.current?.unobserve(e);
|
|
435
|
-
})), S = M((e, t) => {
|
|
436
|
-
e !== u && c(e, t);
|
|
437
|
-
}), C = {
|
|
438
|
-
orientation: l,
|
|
439
|
-
tabActivationDirection: f
|
|
440
|
-
}, w = {
|
|
441
|
-
"aria-orientation": l === "vertical" ? "vertical" : void 0,
|
|
442
|
-
role: "tablist"
|
|
443
|
-
}, T = X.useMemo(() => ({
|
|
444
|
-
activateOnFocus: n,
|
|
445
|
-
highlightedTabIndex: p,
|
|
446
|
-
registerIndicatorUpdateListener: b,
|
|
447
|
-
registerTabResizeObserverElement: x,
|
|
448
|
-
onTabActivation: S,
|
|
449
|
-
setHighlightedTabIndex: m,
|
|
450
|
-
tabsListElement: h
|
|
451
|
-
}), [
|
|
452
|
-
n,
|
|
453
|
-
p,
|
|
454
|
-
b,
|
|
455
|
-
x,
|
|
456
|
-
S,
|
|
457
|
-
m,
|
|
458
|
-
h
|
|
459
|
-
]);
|
|
460
|
-
return /*#__PURE__*/ (0, $.jsx)(oe.Provider, {
|
|
461
|
-
value: T,
|
|
462
|
-
children: /*#__PURE__*/ (0, $.jsx)(fe, {
|
|
463
|
-
render: a,
|
|
464
|
-
className: r,
|
|
465
|
-
style: o,
|
|
466
|
-
state: C,
|
|
467
|
-
refs: [t, g],
|
|
468
|
-
props: [w, s],
|
|
469
|
-
stateAttributesMapping: ne,
|
|
470
|
-
highlightedIndex: p,
|
|
471
|
-
enableHomeAndEndKeys: !0,
|
|
472
|
-
loopFocus: i,
|
|
473
|
-
orientation: l,
|
|
474
|
-
onHighlightedIndexChange: m,
|
|
475
|
-
onMapChange: d,
|
|
476
|
-
disabledIndices: k
|
|
477
|
-
})
|
|
478
|
-
});
|
|
479
|
-
});
|
|
480
|
-
process.env.NODE_ENV !== "production" && (pe.displayName = "TabsList");
|
|
481
|
-
//#endregion
|
|
482
|
-
//#region src/client/hooks/use-proximity-hover-index.ts
|
|
483
|
-
function me(e, t) {
|
|
484
|
-
let n = e.getBoundingClientRect(), r = t === "x" ? e.offsetWidth : e.offsetHeight, i = t === "x" ? n.width : n.height;
|
|
485
|
-
return r > 0 ? i / r : 1;
|
|
486
|
-
}
|
|
487
|
-
function he(e, t) {
|
|
488
|
-
let n = e.getBoundingClientRect(), r = me(e, "x"), i = me(e, "y"), a = [];
|
|
489
|
-
return t.forEach((t, o) => {
|
|
490
|
-
let s = t.getBoundingClientRect();
|
|
491
|
-
a[o] = {
|
|
492
|
-
top: (s.top - n.top) / i + e.scrollTop,
|
|
493
|
-
left: (s.left - n.left) / r + e.scrollLeft,
|
|
494
|
-
width: t.offsetWidth,
|
|
495
|
-
height: t.offsetHeight
|
|
496
|
-
};
|
|
497
|
-
}), a;
|
|
498
|
-
}
|
|
499
|
-
function ge(e, t, n, r) {
|
|
500
|
-
let i = r === "x" ? t : n, a = null, o = Infinity, s = null;
|
|
501
|
-
return e.forEach((e, t) => {
|
|
502
|
-
let n = e.getBoundingClientRect(), c = r === "x" ? n.left : n.top, l = r === "x" ? n.right : n.bottom;
|
|
503
|
-
i >= c && i <= l && (s = t);
|
|
504
|
-
let u = (c + l) / 2, d = Math.abs(i - u);
|
|
505
|
-
d < o && (o = d, a = t);
|
|
506
|
-
}), s ?? a;
|
|
507
|
-
}
|
|
508
|
-
function _e(e, t) {
|
|
509
|
-
if (e.length !== t.length) return !0;
|
|
510
|
-
for (let n = 0; n < t.length; n++) {
|
|
511
|
-
let r = e[n], i = t[n];
|
|
512
|
-
if (r !== i && (!r || !i || r.top !== i.top || r.left !== i.left || r.width !== i.width || r.height !== i.height)) return !0;
|
|
513
|
-
}
|
|
514
|
-
return !1;
|
|
515
|
-
}
|
|
516
|
-
function ve(e, t = {}) {
|
|
517
|
-
let { axis: n = "y" } = t, r = (0, X.useRef)(/* @__PURE__ */ new Map()), [i, a] = (0, X.useState)(null), [o, s] = (0, X.useState)([]), c = (0, X.useRef)([]), l = (0, X.useRef)(0), u = (0, X.useRef)(null), d = (0, X.useRef)(null), f = (0, X.useRef)(null), p = (0, X.useCallback)(() => {
|
|
518
|
-
let t = e.current;
|
|
519
|
-
if (!t) return;
|
|
520
|
-
let n = he(t, r.current);
|
|
521
|
-
_e(c.current, n) && (c.current = n, s(n));
|
|
522
|
-
}, [e]), m = (0, X.useCallback)((e, t) => {
|
|
523
|
-
a(ge(r.current, e, t, n));
|
|
524
|
-
}, [n]), h = (0, X.useCallback)((e, t) => {
|
|
525
|
-
t ? r.current.set(e, t) : r.current.delete(e), d.current !== null && cancelAnimationFrame(d.current), d.current = requestAnimationFrame(() => {
|
|
526
|
-
d.current = null, p();
|
|
527
|
-
});
|
|
528
|
-
}, [p]), g = (0, X.useCallback)((e) => {
|
|
529
|
-
f.current = {
|
|
530
|
-
x: e.clientX,
|
|
531
|
-
y: e.clientY
|
|
532
|
-
}, u.current !== null && cancelAnimationFrame(u.current), u.current = requestAnimationFrame(() => {
|
|
533
|
-
u.current = null, p(), m(e.clientX, e.clientY);
|
|
534
|
-
});
|
|
535
|
-
}, [p, m]), _ = (0, X.useCallback)(() => {
|
|
536
|
-
l.current += 1;
|
|
537
|
-
}, []), v = (0, X.useCallback)(() => {
|
|
538
|
-
u.current !== null && (cancelAnimationFrame(u.current), u.current = null), f.current = null, a(null);
|
|
539
|
-
}, []);
|
|
540
|
-
return (0, X.useEffect)(() => {
|
|
541
|
-
let t = e.current;
|
|
542
|
-
if (!t || typeof ResizeObserver > "u") return;
|
|
543
|
-
let n = new ResizeObserver(() => {
|
|
544
|
-
d.current !== null && cancelAnimationFrame(d.current), d.current = requestAnimationFrame(() => {
|
|
545
|
-
d.current = null, p();
|
|
546
|
-
});
|
|
547
|
-
});
|
|
548
|
-
return n.observe(t), () => n.disconnect();
|
|
549
|
-
}, [e, p]), (0, X.useEffect)(() => {
|
|
550
|
-
let t = e.current;
|
|
551
|
-
if (!t) return;
|
|
552
|
-
let n = () => {
|
|
553
|
-
p();
|
|
554
|
-
let e = f.current;
|
|
555
|
-
e && m(e.x, e.y);
|
|
556
|
-
};
|
|
557
|
-
return t.addEventListener("scroll", n, {
|
|
558
|
-
capture: !0,
|
|
559
|
-
passive: !0
|
|
560
|
-
}), () => t.removeEventListener("scroll", n, { capture: !0 });
|
|
561
|
-
}, [
|
|
562
|
-
e,
|
|
563
|
-
p,
|
|
564
|
-
m
|
|
565
|
-
]), (0, X.useEffect)(() => () => {
|
|
566
|
-
u.current !== null && cancelAnimationFrame(u.current), d.current !== null && cancelAnimationFrame(d.current);
|
|
567
|
-
}, []), {
|
|
568
|
-
activeIndex: i,
|
|
569
|
-
setActiveIndex: a,
|
|
570
|
-
itemRects: o,
|
|
571
|
-
sessionRef: l,
|
|
572
|
-
handlers: {
|
|
573
|
-
onMouseMove: g,
|
|
574
|
-
onMouseEnter: _,
|
|
575
|
-
onMouseLeave: v
|
|
576
|
-
},
|
|
577
|
-
registerItem: h,
|
|
578
|
-
measureItems: p
|
|
579
|
-
};
|
|
580
|
-
}
|
|
581
|
-
//#endregion
|
|
582
|
-
//#region src/client/components/ui/tabs-subtle.tsx
|
|
583
|
-
var ye = (0, X.createContext)(null);
|
|
584
|
-
function be() {
|
|
585
|
-
let e = (0, X.useContext)(ye);
|
|
586
|
-
if (!e) throw Error("useTabsSubtle must be used within a TabsSubtle");
|
|
587
|
-
return e;
|
|
588
|
-
}
|
|
589
|
-
var xe = (0, X.forwardRef)(({ children: e, selectedIndex: t, onSelect: n, idPrefix: r, activeLabel: i = !1, className: a, ...o }, s) => {
|
|
590
|
-
let c = (0, X.useRef)(null), l = (0, X.useRef)(!1), u = S(), { activeIndex: d, setActiveIndex: f, itemRects: p, handlers: h, registerItem: g, measureItems: _ } = ve(c, { axis: "x" }), v = (0, X.useRef)(/* @__PURE__ */ new Map()), b = (0, X.useCallback)((e, t) => {
|
|
591
|
-
g(e, t), t ? v.current.set(e, t) : v.current.delete(e);
|
|
592
|
-
}, [g]);
|
|
593
|
-
(0, X.useEffect)(() => {
|
|
594
|
-
_();
|
|
595
|
-
}, [_, e]), (0, X.useEffect)(() => {
|
|
596
|
-
let e = v.current;
|
|
597
|
-
if (e.size === 0) return;
|
|
598
|
-
let t = new ResizeObserver(() => _());
|
|
599
|
-
return e.forEach((e) => t.observe(e)), () => t.disconnect();
|
|
600
|
-
}, [_, e]);
|
|
601
|
-
let x = (0, X.useCallback)((e) => {
|
|
602
|
-
l.current = !0, h.onMouseMove(e);
|
|
603
|
-
}, [h]), w = (0, X.useCallback)(() => {
|
|
604
|
-
l.current = !1, h.onMouseLeave();
|
|
605
|
-
}, [h]), [T, E] = (0, X.useState)(null), D = p[t], O = d === null ? null : p[d], k = T === null ? null : p[T], A = d === t, j = d !== null && !A;
|
|
606
|
-
return /* @__PURE__ */ (0, $.jsx)(ye.Provider, {
|
|
607
|
-
value: {
|
|
608
|
-
registerTab: b,
|
|
609
|
-
hoveredIndex: d,
|
|
610
|
-
selectedIndex: t,
|
|
611
|
-
idPrefix: r,
|
|
612
|
-
activeLabel: i
|
|
613
|
-
},
|
|
614
|
-
children: /* @__PURE__ */ (0, $.jsx)(re, {
|
|
615
|
-
value: t,
|
|
616
|
-
onValueChange: (e) => {
|
|
617
|
-
typeof e == "number" && n(e);
|
|
618
|
-
},
|
|
619
|
-
render: /* @__PURE__ */ (0, $.jsxs)(pe, {
|
|
620
|
-
activateOnFocus: !1,
|
|
621
|
-
ref: (e) => {
|
|
622
|
-
c.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
|
|
623
|
-
},
|
|
624
|
-
onMouseMove: x,
|
|
625
|
-
onMouseLeave: w,
|
|
626
|
-
onFocus: (e) => {
|
|
627
|
-
let t = e.target.closest("[data-proximity-index]")?.getAttribute("data-proximity-index");
|
|
628
|
-
if (t != null) {
|
|
629
|
-
let n = Number(t);
|
|
630
|
-
f(n), E(e.target.matches(":focus-visible") ? n : null);
|
|
631
|
-
}
|
|
632
|
-
},
|
|
633
|
-
onBlur: (e) => {
|
|
634
|
-
c.current?.contains(e.relatedTarget) || (E(null), !l.current && f(null));
|
|
635
|
-
},
|
|
636
|
-
className: C("relative flex items-center gap-0.5 select-none overflow-x-auto max-w-full -mx-1 px-1 -my-1 py-1", a),
|
|
637
|
-
...o,
|
|
638
|
-
children: [
|
|
639
|
-
D && /* @__PURE__ */ (0, $.jsx)(m.div, {
|
|
640
|
-
className: C("absolute bg-accent pointer-events-none", u.bg),
|
|
641
|
-
initial: !1,
|
|
642
|
-
animate: {
|
|
643
|
-
left: D.left,
|
|
644
|
-
width: D.width,
|
|
645
|
-
top: D.top,
|
|
646
|
-
height: D.height,
|
|
647
|
-
opacity: j ? .8 : 1
|
|
648
|
-
},
|
|
649
|
-
transition: {
|
|
650
|
-
...y.moderate,
|
|
651
|
-
opacity: { duration: .08 }
|
|
652
|
-
}
|
|
653
|
-
}),
|
|
654
|
-
/* @__PURE__ */ (0, $.jsx)(q, { children: O && !A && D && /* @__PURE__ */ (0, $.jsx)(m.div, {
|
|
655
|
-
className: C("absolute bg-accent pointer-events-none", u.bg),
|
|
656
|
-
initial: {
|
|
657
|
-
left: D.left,
|
|
658
|
-
width: D.width,
|
|
659
|
-
top: D.top,
|
|
660
|
-
height: D.height,
|
|
661
|
-
opacity: 0
|
|
662
|
-
},
|
|
663
|
-
animate: {
|
|
664
|
-
left: O.left,
|
|
665
|
-
width: O.width,
|
|
666
|
-
top: O.top,
|
|
667
|
-
height: O.height,
|
|
668
|
-
opacity: .4
|
|
669
|
-
},
|
|
670
|
-
exit: !l.current && D ? {
|
|
671
|
-
left: D.left,
|
|
672
|
-
width: D.width,
|
|
673
|
-
top: D.top,
|
|
674
|
-
height: D.height,
|
|
675
|
-
opacity: 0,
|
|
676
|
-
transition: {
|
|
677
|
-
...y.moderate,
|
|
678
|
-
opacity: { duration: .06 }
|
|
679
|
-
}
|
|
680
|
-
} : {
|
|
681
|
-
opacity: 0,
|
|
682
|
-
transition: y.fast.exit
|
|
683
|
-
},
|
|
684
|
-
transition: {
|
|
685
|
-
...y.fast,
|
|
686
|
-
opacity: { duration: .08 }
|
|
687
|
-
}
|
|
688
|
-
}) }),
|
|
689
|
-
/* @__PURE__ */ (0, $.jsx)(q, { children: k && /* @__PURE__ */ (0, $.jsx)(m.div, {
|
|
690
|
-
className: C("absolute pointer-events-none z-20 border border-[color:var(--focus-ring,#6B97FF)]", u.focusRing),
|
|
691
|
-
initial: !1,
|
|
692
|
-
animate: {
|
|
693
|
-
left: k.left - 2,
|
|
694
|
-
top: k.top - 2,
|
|
695
|
-
width: k.width + 4,
|
|
696
|
-
height: k.height + 4
|
|
697
|
-
},
|
|
698
|
-
exit: {
|
|
699
|
-
opacity: 0,
|
|
700
|
-
transition: y.fast.exit
|
|
701
|
-
},
|
|
702
|
-
transition: {
|
|
703
|
-
...y.fast,
|
|
704
|
-
opacity: { duration: .08 }
|
|
705
|
-
}
|
|
706
|
-
}) }),
|
|
707
|
-
e
|
|
708
|
-
]
|
|
709
|
-
})
|
|
710
|
-
})
|
|
711
|
-
});
|
|
712
|
-
});
|
|
713
|
-
xe.displayName = "TabsSubtle";
|
|
714
|
-
var Se = (0, X.forwardRef)(({ icon: e, label: t, index: n, className: r, ...i }, a) => {
|
|
715
|
-
let o = (0, X.useRef)(null), s = S(), { registerTab: c, hoveredIndex: l, selectedIndex: u, idPrefix: d, activeLabel: p } = be();
|
|
716
|
-
(0, X.useEffect)(() => (c(n, o.current), () => c(n, null)), [n, c]);
|
|
717
|
-
let h = u === n, g = l === n || h, _ = p && !!e, v = !_ || h, b = /* @__PURE__ */ (0, $.jsxs)("span", {
|
|
718
|
-
className: "inline-grid",
|
|
719
|
-
children: [/* @__PURE__ */ (0, $.jsx)("span", {
|
|
720
|
-
className: "col-start-1 row-start-1 invisible [text-box:trim-both_cap_alphabetic]",
|
|
721
|
-
style: { fontVariationSettings: f.semibold },
|
|
722
|
-
"aria-hidden": "true",
|
|
723
|
-
children: t
|
|
724
|
-
}), /* @__PURE__ */ (0, $.jsx)("span", {
|
|
725
|
-
className: C("col-start-1 row-start-1 transition-[color,font-variation-settings] duration-80 [text-box:trim-both_cap_alphabetic]", g ? "text-foreground" : "text-muted-foreground"),
|
|
726
|
-
style: { fontVariationSettings: h ? f.semibold : f.normal },
|
|
727
|
-
children: t
|
|
728
|
-
})]
|
|
729
|
-
});
|
|
730
|
-
return /* @__PURE__ */ (0, $.jsxs)(ce, {
|
|
731
|
-
ref: (e) => {
|
|
732
|
-
let t = e;
|
|
733
|
-
o.current = t, typeof a == "function" ? a(t) : a && (a.current = t);
|
|
734
|
-
},
|
|
735
|
-
value: n,
|
|
736
|
-
"data-proximity-index": n,
|
|
737
|
-
id: d ? `${d}-tab-${n}` : void 0,
|
|
738
|
-
"aria-controls": d ? `${d}-panel-${n}` : void 0,
|
|
739
|
-
"aria-label": _ && !v ? t : void 0,
|
|
740
|
-
className: C("relative z-10 flex items-center px-2 cursor-pointer bg-transparent border-none outline-none text-xs", _ ? "h-7" : "h-7 gap-1.5", s.bg, r),
|
|
741
|
-
...i,
|
|
742
|
-
children: [e && /* @__PURE__ */ (0, $.jsx)(e, {
|
|
743
|
-
size: 14,
|
|
744
|
-
strokeWidth: g ? 2 : 1.5,
|
|
745
|
-
className: C("shrink-0 transition-[color,stroke-width] duration-80", g ? "text-foreground" : "text-muted-foreground")
|
|
746
|
-
}), _ ? /* @__PURE__ */ (0, $.jsx)(q, { children: v && /* @__PURE__ */ (0, $.jsx)(m.span, {
|
|
747
|
-
className: "overflow-hidden",
|
|
748
|
-
initial: {
|
|
749
|
-
width: 0,
|
|
750
|
-
opacity: 0,
|
|
751
|
-
marginLeft: 0
|
|
752
|
-
},
|
|
753
|
-
animate: {
|
|
754
|
-
width: "auto",
|
|
755
|
-
opacity: 1,
|
|
756
|
-
marginLeft: 6
|
|
757
|
-
},
|
|
758
|
-
exit: {
|
|
759
|
-
width: 0,
|
|
760
|
-
opacity: 0,
|
|
761
|
-
marginLeft: 0
|
|
762
|
-
},
|
|
763
|
-
transition: {
|
|
764
|
-
...y.fast,
|
|
765
|
-
opacity: { duration: .06 }
|
|
766
|
-
},
|
|
767
|
-
children: b
|
|
768
|
-
}, "label") }) : b]
|
|
769
|
-
});
|
|
770
|
-
});
|
|
771
|
-
Se.displayName = "TabsSubtleItem";
|
|
772
|
-
var Ce = (0, X.forwardRef)(({ index: e, selectedIndex: t, idPrefix: n, children: r, className: i, ...a }, o) => {
|
|
773
|
-
let s = t === e;
|
|
774
|
-
return /* @__PURE__ */ (0, $.jsx)("div", {
|
|
775
|
-
ref: o,
|
|
776
|
-
id: `${n}-panel-${e}`,
|
|
777
|
-
role: "tabpanel",
|
|
778
|
-
"aria-labelledby": `${n}-tab-${e}`,
|
|
779
|
-
hidden: !s,
|
|
780
|
-
tabIndex: -1,
|
|
781
|
-
className: C("outline-none", i),
|
|
782
|
-
...a,
|
|
783
|
-
children: s && r
|
|
784
|
-
});
|
|
785
|
-
});
|
|
786
|
-
Ce.displayName = "TabsSubtlePanel";
|
|
787
|
-
//#endregion
|
|
788
|
-
export { ae as a, fe as i, Se as n, Ce as r, xe as t };
|