@mcp-use/inspector 20.0.0-beta.6 → 20.0.0-beta.8
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/{AnimatePresence-Dcw-FOy8.js → AnimatePresence-D1bZ5_-l.js} +79 -78
- package/dist/cdn/{ChatTab-D6J3Gyp7.js → ChatTab-C-Ysv6Zf.js} +1951 -1932
- package/dist/cdn/CheckboxIndicator-BjF73mGX.js +252 -0
- package/dist/cdn/{ConnectionSettingsForm-CWQueI8J.js → ConnectionSettingsForm-CNuMa6jp.js} +202 -202
- package/dist/cdn/{ConnectionSettingsTab-FGyt3QaI.js → ConnectionSettingsTab-qSVQ1aIF.js} +36 -35
- package/dist/cdn/{ElicitationTab-CL1KJ0bz.js → ElicitationTab-PEmEDvC5.js} +47 -46
- package/dist/cdn/{FormContext-tmgN_Vdr.js → FormContext-NtUiZclE.js} +26 -26
- package/dist/cdn/{InspectorContext-UjtEbNod.js → InspectorContext-BBKCdfmK.js} +1 -1
- package/dist/cdn/{JSONDisplay-BFxf5oEu.js → JSONDisplay-BJqMz7Ny.js} +22 -22
- package/dist/cdn/{ListTabHeader-Cv-GmtGF.js → ListTabHeader-DzmTtN1e.js} +20 -19
- package/dist/cdn/{WidgetWrapper-CruwjBOd.js → MCPAppsDebugControls-BpP-Ifap.js} +514 -550
- package/dist/cdn/{ManufactOAuthCallback-B98kSYCj.js → ManufactOAuthCallback-ChbbjFIT.js} +2 -2
- package/dist/cdn/{MarkdownRenderer-gLqUICEd.js → MarkdownRenderer-CK_6n3T9.js} +23 -23
- package/dist/cdn/McpAppsViewPanel-jlsYQ7uS.js +56 -0
- package/dist/cdn/{NotificationsTab-CeImSrhx.js → NotificationsTab-B7uebqMV.js} +21 -21
- package/dist/cdn/{OAuthCallback-Bg2bP-o9.js → OAuthCallback--NZdLoWx.js} +3 -3
- package/dist/cdn/PromptsTab-DSGYL32k.js +902 -0
- package/dist/cdn/{ResourcesTab-CQkKni-P.js → ResourcesTab-d3wxN7xC.js} +116 -114
- package/dist/cdn/{SamplingTab-D8q-iCMc.js → SamplingTab-DETdWNJk.js} +34 -33
- package/dist/cdn/{ServerMetadataTab-CvrKX8fz.js → ServerMetadataTab-BM3VhSLf.js} +9 -9
- package/dist/cdn/{StatusIcon-D0-ARyOh.js → StatusIcon-Q3n3YRtE.js} +10 -11
- package/dist/cdn/{ToolsTab-6xaVH43x.js → ToolsTab-BMcnfEWg.js} +665 -653
- package/dist/cdn/{ViewPreview-Ohh6JwOn.js → ViewPreview-CBhrVdwx.js} +3 -3
- package/dist/cdn/{WidgetDebugContext-D4usL_MA.js → WidgetDebugContext-B6yoOVVV.js} +1 -11
- package/dist/cdn/WidgetWrapper-BlbQAh_X.js +12 -0
- package/dist/cdn/{bell-CGjAO_0s.js → bell-GrTZcnD2.js} +1 -1
- package/dist/cdn/{browser-CbQIH4w2.js → browser-DG2Z8392.js} +1 -1
- package/dist/cdn/{brush-B_mKhyxG.js → brush-CelVvMGp.js} +1 -1
- package/dist/cdn/button-CB4uOoUV.js +2509 -0
- package/dist/cdn/card-BA-DQk-G.js +41 -0
- package/dist/cdn/{checkbox-By0FklhG.js → checkbox-kwVa4gRX.js} +7 -7
- package/dist/cdn/{clock-CmUbSx_B.js → clock-YMF8Gtw5.js} +1 -1
- package/dist/cdn/{code-V_0nf5rg.js → code-C8sN2OGR.js} +1 -1
- package/dist/cdn/{jsx-runtime-CIxvMpEo.js → createLucideIcon-BONxC1L5.js} +57 -24
- package/dist/cdn/{dialog-BsDpuJd3.js → dialog-CJGnC5Ag.js} +171 -171
- package/dist/cdn/{dist-DaMB0Su9.js → dist-CTJnCYmk.js} +1 -1
- package/dist/cdn/{dist-CXHFvGre.js → dist-SxRsB1iS.js} +3 -3
- package/dist/cdn/{external-link-CjmfT6rW.js → external-link-Bo4lQxr1.js} +1 -1
- package/dist/cdn/{eye-B7H96av8.js → eye-pSGG7nvf.js} +1 -1
- package/dist/cdn/{folder-open-B3lu2rG_.js → folder-open-aM8CPtBO.js} +1 -1
- package/dist/cdn/{hash-BVQnWi7q.js → hash-DDs2vE1k.js} +1 -1
- package/dist/cdn/{history-Csw4rb44.js → history-BfUFpL1d.js} +1 -1
- package/dist/cdn/{index-browser-DkQOzkvX.js → index-browser-Dm3R1Mfe.js} +1 -1
- package/dist/cdn/{info-CNiOwqkf.js → info-BMkB68mB.js} +1 -1
- package/dist/cdn/{input-C2OBd4PJ.js → input-BCpgLXU1.js} +2993 -5499
- package/dist/cdn/inspector.css +1 -1
- package/dist/cdn/inspector.js +7106 -7140
- package/dist/cdn/{label-B9Jmm9be.js → label-A0UGV8FE.js} +9 -9
- package/dist/cdn/{loader-circle-BLy9A_pp.js → loader-circle-BKRHJEB7.js} +1 -1
- package/dist/cdn/{maximize-2-CH5Lq90B.js → maximize-2-DdrB_spi.js} +1 -1
- package/dist/cdn/{maximize-BALCV_ep.js → maximize-hSOCz133.js} +1 -1
- package/dist/cdn/{message-square-BnxdpJxZ.js → message-square-D3tKB3uJ.js} +1 -1
- package/dist/cdn/{not-found-DEtSM_Wd.js → not-found-BajFyZpp.js} +9 -11
- package/dist/cdn/{play-vuZ5PLnI.js → play-B1leulYf.js} +1 -1
- package/dist/cdn/providerMeta-CjGU4rID.js +436 -0
- package/dist/cdn/{react-BLtCruam.js → react-Bl-hSkvn.js} +562 -512
- package/dist/cdn/{refresh-cw-BXY-Pa0U.js → refresh-cw-CyvXrS91.js} +1 -1
- package/dist/cdn/{save-Tgil_AJZ.js → save-CmdEPUAm.js} +1 -1
- package/dist/cdn/{select-DDdiIPR2.js → select-CCFHjOGk.js} +808 -807
- package/dist/cdn/{servers-Dm72iTpY.js → servers-Dd0Vcp81.js} +5 -1
- package/dist/cdn/{shared-DaILIQPP.js → shared-CJVHJhag.js} +36 -36
- package/dist/cdn/{sheet-Br_l2kry.js → sheet-oyq1mIyg.js} +620 -619
- package/dist/cdn/{sparkles-BntO2rDR.js → sparkles-CxeZpVtX.js} +1 -1
- package/dist/cdn/spinner-Be1GlSGX.js +15 -0
- package/dist/cdn/{square-check-big-BvwQ17Bl.js → square-check-big-C_4wbfwF.js} +1 -1
- package/dist/cdn/{switch-C3IyQuid.js → switch-DHXEA_N5.js} +190 -189
- package/dist/cdn/{tabs-subtle-CkdI6Mac.js → tabs-subtle-Dubd6Kj8.js} +269 -268
- package/dist/cdn/{telemetry-C7Ytz2BG.js → telemetry-DjQn_Xm9.js} +2 -2
- package/dist/cdn/{textarea-DSbwcFVt.js → textarea-CwmI8_uI.js} +6 -6
- package/dist/cdn/{trash-2-RwpJY5SL.js → trash-2-BhumJAFE.js} +1 -1
- package/dist/cdn/{useAriaLabelledBy-DqAdnppm.js → useAriaLabelledBy-Cra6w3YY.js} +2 -1
- package/dist/cdn/{useCompositeItem-BRqEzYh-.js → useCompositeItem-Dhnm-7el.js} +3 -3
- package/dist/cdn/{useConfig-BW6uQf2m.js → useConfig-B_adtnP1.js} +2 -2
- package/dist/cdn/{useSavedRequests-Ci2I919u.js → useSavedRequests-mSIsDd4c.js} +1 -1
- package/dist/cdn/{useViewHostProps-CINeSkth.js → useViewHostProps-CDOm2w6u.js} +124 -109
- package/dist/cdn/{wrench-DzGmCfnb.js → wrench-DvK20LUT.js} +1 -1
- package/dist/cdn/{x-C3vRQIYu.js → x-EilKPiCX.js} +1 -1
- package/dist/cdn/{zap-Mb-pbw2X.js → zap-0Wr9QO7N.js} +1 -1
- package/dist/cli.js +61 -2
- package/dist/client/components/ChatTab.d.ts.map +1 -1
- package/dist/client/components/MCPAppsDebugControls.d.ts.map +1 -1
- package/dist/client/components/ToolsTab.d.ts.map +1 -1
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
- package/dist/client/components/chat/ToolResultRenderer.d.ts.map +1 -1
- package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts +29 -0
- package/dist/client/components/mcp-apps/McpAppsViewPanel.d.ts.map +1 -0
- package/dist/client/components/tools/ToolExecutionPanel.d.ts.map +1 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts +2 -1
- package/dist/client/components/tools/ToolResultDisplay.d.ts.map +1 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +1 -1
- package/dist/client/components/ui/mesh-animation-pause.d.ts +14 -0
- package/dist/client/components/ui/mesh-animation-pause.d.ts.map +1 -0
- package/dist/client/components/ui/mesh-gradient-colors.d.ts +6 -0
- package/dist/client/components/ui/mesh-gradient-colors.d.ts.map +1 -0
- package/dist/client/components/ui/mesh-tab-background.d.ts +1 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -1
- package/dist/client/components/ui/not-found.d.ts.map +1 -1
- package/dist/client/context/WidgetDebugContext.d.ts +1 -11
- package/dist/client/context/WidgetDebugContext.d.ts.map +1 -1
- package/dist/client/hooks/useDeviceViewport.d.ts +1 -5
- package/dist/client/hooks/useDeviceViewport.d.ts.map +1 -1
- package/dist/client/hooks/useViewHostProps.d.ts +1 -1
- package/dist/client/hooks/useViewHostProps.d.ts.map +1 -1
- package/dist/client/index.js +2087 -1861
- package/dist/client/utils/servers.d.ts +5 -0
- package/dist/client/utils/servers.d.ts.map +1 -1
- package/dist/server/cdn-shell.d.ts.map +1 -1
- package/dist/server/cdn-shell.js +2 -2
- package/dist/server/{chunk-GBY4WAVP.js → chunk-BD3ROXCC.js} +1 -1
- package/dist/server/{chunk-NUHI6MJ6.js → chunk-BPXKTFQ5.js} +1 -1
- package/dist/server/{chunk-IFF5T5J4.js → chunk-XTVIGRTB.js} +61 -2
- 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/AnimatePresence-FfDQQNFJ.js +9 -0
- package/dist/web/assets/ChatTab-DxD-KLW_.js +18 -0
- package/dist/web/assets/ConnectionSettingsTab-pO6p0U0f.js +1 -0
- package/dist/web/assets/ElicitationTab-o5_z6gqe.js +1 -0
- package/dist/web/assets/FormContext-sV-yByKz.js +1 -0
- package/dist/web/assets/ListTabHeader-CrGae306.js +1 -0
- package/dist/web/assets/MCPAppsDebugControls-CZW1uZdH.js +34 -0
- package/dist/web/assets/{ManufactOAuthCallback-BRO6TPkZ.js → ManufactOAuthCallback-BnWhf5bW.js} +1 -1
- package/dist/web/assets/{MarkdownRenderer-gaJFjbtr.js → MarkdownRenderer-gUUHRIm1.js} +2 -2
- package/dist/web/assets/McpAppsViewPanel-CDJDb4t-.js +1 -0
- package/dist/web/assets/{NotificationsTab-LYcfRjyd.js → NotificationsTab-CkJ5E_sR.js} +1 -1
- package/dist/web/assets/{OAuthCallback-D8UItgTB.js → OAuthCallback-Dv_mFcua.js} +1 -1
- package/dist/web/assets/PromptsTab-CLwWFf6d.js +15 -0
- package/dist/web/assets/ResourcesTab-B8cnuq-m.js +2 -0
- package/dist/web/assets/SamplingTab-BjYHYRHX.js +1 -0
- package/dist/web/assets/ServerMetadataTab-CPlclbb7.js +1 -0
- package/dist/web/assets/ToolsTab-BSSwvp4Q.js +8 -0
- package/dist/web/assets/{ViewPreview--z6jL0Zg.js → ViewPreview-C_LJdgt9.js} +1 -1
- package/dist/web/assets/WidgetWrapper-cv_BM1bY.js +1 -0
- package/dist/web/assets/{brush--0LobUi4.js → brush-DX0UZ_pI.js} +1 -1
- package/dist/web/assets/button-C8Xa2k4x.js +1 -0
- package/dist/web/assets/checkbox-BuuDhnpk.js +1 -0
- package/dist/web/assets/code-B14rVdNt.js +1 -0
- package/dist/web/assets/createLucideIcon-BEHeJH0M.js +1 -0
- package/dist/web/assets/{dist-B8sA8Zml.js → dist-C39gcmyH.js} +4 -4
- package/dist/web/assets/index-CyvvaDNR.js +499 -0
- package/dist/web/assets/index-bCIH1Sdx.css +1 -0
- package/dist/web/assets/input-C0OQCUZy.js +1 -0
- package/dist/web/assets/{label-Cdim77Jw.js → label-CI7JWQOo.js} +1 -1
- package/dist/web/assets/{maximize-2-BTT9QQU9.js → maximize-2-Br1WQzT2.js} +1 -1
- package/dist/web/assets/{maximize-_O55kFcr.js → maximize-CJNgRe6S.js} +1 -1
- package/dist/web/assets/{refresh-cw-C9wQl8_d.js → refresh-cw-B5iaAZKn.js} +1 -1
- package/dist/web/assets/{save-B-MsgxX9.js → save-TM6fvNrt.js} +1 -1
- package/dist/web/assets/select-D6jzbLJn.js +1 -0
- package/dist/web/assets/shared-Chk1rURG.js +1 -0
- package/dist/web/assets/{sparkles-2OAsc1aP.js → sparkles-BGYTDThM.js} +1 -1
- package/dist/web/assets/tabs-subtle-CK4nucyB.js +1 -0
- package/dist/web/assets/textarea-CRTXuRmE.js +1 -0
- package/dist/web/assets/{useConfig-BAsKhUxf.js → useConfig-CgQbKjVT.js} +1 -1
- package/dist/web/assets/useViewHostProps-DFI7Ywo7.js +1 -0
- package/dist/web/assets/{zap-Du2Uc5pa.js → zap-BDWHCVHU.js} +1 -1
- package/dist/web/index.html +10 -10
- package/package.json +2 -2
- package/dist/cdn/CheckboxIndicator-Bt4IICtv.js +0 -251
- package/dist/cdn/PromptsTab-C4LuwyWN.js +0 -901
- package/dist/cdn/card-DgiYnSg-.js +0 -41
- package/dist/cdn/createLucideIcon-C5fZZ6oB.js +0 -38
- package/dist/cdn/providerMeta-BQIfHuNL.js +0 -379
- package/dist/cdn/spinner-jQtC7EBj.js +0 -15
- package/dist/web/assets/AnimatePresence-C5p0yiY1.js +0 -9
- package/dist/web/assets/ChatTab-CsBPVCSc.js +0 -18
- package/dist/web/assets/ConnectionSettingsTab-DQTXfnl1.js +0 -1
- package/dist/web/assets/ElicitationTab-_FKB7nNG.js +0 -1
- package/dist/web/assets/FormContext-DH2caWKO.js +0 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +0 -1
- package/dist/web/assets/PromptsTab-B2uVMRR2.js +0 -15
- package/dist/web/assets/ResourcesTab-DhOZYPjE.js +0 -2
- package/dist/web/assets/SamplingTab-C-oY2hoi.js +0 -1
- package/dist/web/assets/ServerMetadataTab-BkTxO5KS.js +0 -1
- package/dist/web/assets/ToolsTab-DupHgo7A.js +0 -8
- package/dist/web/assets/WidgetWrapper-CZaEVEw4.js +0 -34
- package/dist/web/assets/checkbox-BQ9mI_6k.js +0 -1
- package/dist/web/assets/code-tME-5H6D.js +0 -1
- package/dist/web/assets/createLucideIcon-B3b8EU0b.js +0 -1
- package/dist/web/assets/index-C_fCIJ4C.js +0 -492
- package/dist/web/assets/index-fBX3akc8.css +0 -1
- package/dist/web/assets/input-CLYhA7PK.js +0 -1
- package/dist/web/assets/jsx-runtime-Cjj9sGSy.js +0 -1
- package/dist/web/assets/select-CJ57-Bor.js +0 -1
- package/dist/web/assets/shared-CCC9rTz4.js +0 -1
- package/dist/web/assets/tabs-subtle-246ABJqx.js +0 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +0 -1
- package/dist/web/assets/useViewHostProps-CV5zBxUb.js +0 -1
|
@@ -1,141 +1,142 @@
|
|
|
1
1
|
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import { Gn as n, Jn as r,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
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";
|
|
7
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
|
|
8
9
|
var X = /* @__PURE__ */ e(t(), 1), Z = /*#__PURE__*/ X.createContext(void 0);
|
|
9
10
|
process.env.NODE_ENV !== "production" && (Z.displayName = "TabsRootContext");
|
|
10
11
|
function Q() {
|
|
11
12
|
let e = X.useContext(Z);
|
|
12
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ?
|
|
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>.");
|
|
13
14
|
return e;
|
|
14
15
|
}
|
|
15
16
|
//#endregion
|
|
16
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
|
|
17
18
|
var te = /*#__PURE__*/ function(e) {
|
|
18
19
|
return e.activationDirection = "data-activation-direction", e.orientation = "data-orientation", e;
|
|
19
|
-
}({}), ne = { tabActivationDirection: (e) => ({ [te.activationDirection]: e }) }, $ =
|
|
20
|
-
let { className:
|
|
21
|
-
controlled:
|
|
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,
|
|
22
23
|
default: o,
|
|
23
24
|
name: "Tabs",
|
|
24
25
|
state: "value"
|
|
25
|
-
}),
|
|
26
|
+
}), b = d !== void 0, [x, S] = X.useState(() => /* @__PURE__ */ new Map()), C = X.useRef(void 0), T = X.useCallback((e) => {
|
|
26
27
|
if (e === void 0) return null;
|
|
27
|
-
for (let [t, n] of
|
|
28
|
+
for (let [t, n] of x.entries()) if (n != null && e === (n.value ?? n.index)) return t;
|
|
28
29
|
return null;
|
|
29
|
-
}, [
|
|
30
|
-
previousValue:
|
|
30
|
+
}, [x]), [E, O] = X.useState(() => ({
|
|
31
|
+
previousValue: v,
|
|
31
32
|
tabActivationDirection: "none"
|
|
32
|
-
})), { previousValue: k, tabActivationDirection: A } =
|
|
33
|
-
k !==
|
|
34
|
-
let F = P ? k :
|
|
35
|
-
|
|
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(() => {
|
|
36
37
|
I && O({
|
|
37
38
|
previousValue: F,
|
|
38
|
-
tabActivationDirection:
|
|
39
|
+
tabActivationDirection: j
|
|
39
40
|
});
|
|
40
41
|
}, [
|
|
41
42
|
F,
|
|
42
43
|
I,
|
|
43
|
-
|
|
44
|
+
j
|
|
44
45
|
]);
|
|
45
|
-
let L =
|
|
46
|
-
t.activationDirection = ie(
|
|
47
|
-
}), R =
|
|
48
|
-
|
|
49
|
-
}), z =
|
|
50
|
-
|
|
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) => {
|
|
51
52
|
if (n.get(e) === t) return n;
|
|
52
53
|
let r = new Map(n);
|
|
53
54
|
return r.set(e, t), r;
|
|
54
55
|
});
|
|
55
|
-
}), B =
|
|
56
|
-
|
|
56
|
+
}), B = M((e, t) => {
|
|
57
|
+
_((n) => {
|
|
57
58
|
if (!n.has(e) || n.get(e) !== t) return n;
|
|
58
59
|
let r = new Map(n);
|
|
59
60
|
return r.delete(e), r;
|
|
60
61
|
});
|
|
61
|
-
}), V = X.useCallback((e) =>
|
|
62
|
-
for (let t of
|
|
63
|
-
}, [
|
|
64
|
-
getTabElementBySelectedValue:
|
|
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,
|
|
65
66
|
getTabIdByPanelValue: H,
|
|
66
67
|
getTabPanelIdByValue: V,
|
|
67
68
|
onValueChange: L,
|
|
68
|
-
orientation:
|
|
69
|
+
orientation: l,
|
|
69
70
|
registerMountedTabPanel: z,
|
|
70
|
-
setTabMap:
|
|
71
|
+
setTabMap: S,
|
|
71
72
|
unregisterMountedTabPanel: B,
|
|
72
|
-
tabActivationDirection:
|
|
73
|
-
value:
|
|
73
|
+
tabActivationDirection: j,
|
|
74
|
+
value: v
|
|
74
75
|
}), [
|
|
75
|
-
|
|
76
|
+
T,
|
|
76
77
|
H,
|
|
77
78
|
V,
|
|
78
79
|
L,
|
|
79
|
-
|
|
80
|
+
l,
|
|
80
81
|
z,
|
|
81
|
-
|
|
82
|
+
S,
|
|
82
83
|
B,
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
j,
|
|
85
|
+
v
|
|
85
86
|
]), W = X.useMemo(() => {
|
|
86
|
-
for (let e of
|
|
87
|
-
}, [
|
|
88
|
-
for (let e of
|
|
89
|
-
}, [
|
|
90
|
-
|
|
91
|
-
if (
|
|
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;
|
|
92
93
|
function e(e, t) {
|
|
93
|
-
|
|
94
|
+
y(e), O((t) => t.previousValue === e && t.tabActivationDirection === "none" ? t : {
|
|
94
95
|
previousValue: e,
|
|
95
96
|
tabActivationDirection: "none"
|
|
96
97
|
}), R(e, t), K.current = !1;
|
|
97
98
|
}
|
|
98
|
-
if (
|
|
99
|
-
Y.current &&
|
|
99
|
+
if (x.size === 0) {
|
|
100
|
+
Y.current && v !== null && !C.current?.isConnected && e(null, r);
|
|
100
101
|
return;
|
|
101
102
|
}
|
|
102
|
-
Y.current = !0,
|
|
103
|
-
let t = W?.disabled, i = W == null &&
|
|
104
|
-
if (!t &&
|
|
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;
|
|
105
106
|
let a = K.current;
|
|
106
107
|
if (t || i) {
|
|
107
108
|
let i = G ?? null;
|
|
108
|
-
if (
|
|
109
|
+
if (v === i) {
|
|
109
110
|
K.current = !1;
|
|
110
111
|
return;
|
|
111
112
|
}
|
|
112
113
|
let o = r;
|
|
113
|
-
a ? o = n : t && (o =
|
|
114
|
+
a ? o = n : t && (o = s), e(i, o);
|
|
114
115
|
return;
|
|
115
116
|
}
|
|
116
|
-
a && W != null && (R(
|
|
117
|
+
a && W != null && (R(v, n), K.current = !1);
|
|
117
118
|
}, [
|
|
118
119
|
G,
|
|
119
|
-
|
|
120
|
+
b,
|
|
120
121
|
R,
|
|
121
122
|
W,
|
|
123
|
+
y,
|
|
122
124
|
x,
|
|
123
|
-
|
|
124
|
-
b
|
|
125
|
+
v
|
|
125
126
|
]);
|
|
126
|
-
let Q =
|
|
127
|
+
let Q = w("div", e, {
|
|
127
128
|
state: {
|
|
128
|
-
orientation:
|
|
129
|
-
tabActivationDirection:
|
|
129
|
+
orientation: l,
|
|
130
|
+
tabActivationDirection: j
|
|
130
131
|
},
|
|
131
132
|
ref: t,
|
|
132
|
-
props:
|
|
133
|
+
props: p,
|
|
133
134
|
stateAttributesMapping: ne
|
|
134
135
|
});
|
|
135
136
|
return /*#__PURE__*/ (0, $.jsx)(Z.Provider, {
|
|
136
137
|
value: U,
|
|
137
138
|
children: /*#__PURE__*/ (0, $.jsx)(ee, {
|
|
138
|
-
elementsRef:
|
|
139
|
+
elementsRef: h,
|
|
139
140
|
children: Q
|
|
140
141
|
})
|
|
141
142
|
});
|
|
@@ -166,13 +167,13 @@ var ae = "data-composite-item-active", oe = /*#__PURE__*/ X.createContext(void 0
|
|
|
166
167
|
process.env.NODE_ENV !== "production" && (oe.displayName = "TabsListContext");
|
|
167
168
|
function se() {
|
|
168
169
|
let e = X.useContext(oe);
|
|
169
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ?
|
|
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>.");
|
|
170
171
|
return e;
|
|
171
172
|
}
|
|
172
173
|
//#endregion
|
|
173
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
|
|
174
175
|
var ce = /*#__PURE__*/ X.forwardRef(function(e, t) {
|
|
175
|
-
let { className: n, disabled: r = !1, render:
|
|
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(() => ({
|
|
176
177
|
disabled: r,
|
|
177
178
|
id: k,
|
|
178
179
|
value: s
|
|
@@ -180,11 +181,11 @@ var ce = /*#__PURE__*/ X.forwardRef(function(e, t) {
|
|
|
180
181
|
r,
|
|
181
182
|
k,
|
|
182
183
|
s
|
|
183
|
-
]) }), N = s ===
|
|
184
|
-
|
|
184
|
+
]) }), N = s === p, P = X.useRef(!1), F = X.useRef(null);
|
|
185
|
+
D(() => {
|
|
185
186
|
let e = F.current;
|
|
186
187
|
if (e) return C(e);
|
|
187
|
-
}, [C]),
|
|
188
|
+
}, [C]), D(() => {
|
|
188
189
|
if (P.current) {
|
|
189
190
|
P.current = !1;
|
|
190
191
|
return;
|
|
@@ -192,28 +193,28 @@ var ce = /*#__PURE__*/ X.forwardRef(function(e, t) {
|
|
|
192
193
|
if (!(N && M > -1 && x !== M)) return;
|
|
193
194
|
let e = O;
|
|
194
195
|
if (e != null) {
|
|
195
|
-
let t =
|
|
196
|
-
if (t &&
|
|
196
|
+
let t = v(_(e));
|
|
197
|
+
if (t && g(e, t)) return;
|
|
197
198
|
}
|
|
198
|
-
r ||
|
|
199
|
+
r || E(M);
|
|
199
200
|
}, [
|
|
200
201
|
N,
|
|
201
202
|
M,
|
|
202
203
|
x,
|
|
203
|
-
|
|
204
|
+
E,
|
|
204
205
|
r,
|
|
205
206
|
O
|
|
206
207
|
]);
|
|
207
|
-
let { getButtonProps: I, buttonRef: L } =
|
|
208
|
+
let { getButtonProps: I, buttonRef: L } = T({
|
|
208
209
|
disabled: r,
|
|
209
|
-
native:
|
|
210
|
+
native: l,
|
|
210
211
|
focusableWhenDisabled: !0
|
|
211
|
-
}), R =
|
|
212
|
+
}), R = m(s), z = X.useRef(!1), B = X.useRef(!1);
|
|
212
213
|
function V(e) {
|
|
213
|
-
N || r || S(s,
|
|
214
|
+
N || r || S(s, i(u, e.nativeEvent, void 0, { activationDirection: "none" }));
|
|
214
215
|
}
|
|
215
216
|
function H(e) {
|
|
216
|
-
N || (M > -1 && !r &&
|
|
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" })));
|
|
217
218
|
}
|
|
218
219
|
function U(e) {
|
|
219
220
|
if (N || r) return;
|
|
@@ -221,13 +222,13 @@ var ce = /*#__PURE__*/ X.forwardRef(function(e, t) {
|
|
|
221
222
|
function t() {
|
|
222
223
|
z.current = !1, B.current = !1;
|
|
223
224
|
}
|
|
224
|
-
(!e.button || e.button === 0) && (B.current = !0,
|
|
225
|
+
(!e.button || e.button === 0) && (B.current = !0, _(e.currentTarget).addEventListener("pointerup", t, { once: !0 }));
|
|
225
226
|
}
|
|
226
|
-
return
|
|
227
|
+
return w("button", e, {
|
|
227
228
|
state: {
|
|
228
229
|
disabled: r,
|
|
229
230
|
active: N,
|
|
230
|
-
orientation:
|
|
231
|
+
orientation: h,
|
|
231
232
|
tabActivationDirection: y
|
|
232
233
|
},
|
|
233
234
|
ref: [
|
|
@@ -262,100 +263,100 @@ process.env.NODE_ENV !== "production" && (ce.displayName = "TabsTab");
|
|
|
262
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
|
|
263
264
|
var le = [];
|
|
264
265
|
function ue(e) {
|
|
265
|
-
let { loopFocus: t = !0, orientation: n = "both", grid: r, onLoop: i, direction: a, highlightedIndex:
|
|
266
|
-
if ((c ??
|
|
267
|
-
let t =
|
|
268
|
-
J(
|
|
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);
|
|
269
270
|
}
|
|
270
|
-
}),
|
|
271
|
-
if (e.size === 0 ||
|
|
272
|
-
|
|
271
|
+
}), k = M((e) => {
|
|
272
|
+
if (e.size === 0 || T.current) return;
|
|
273
|
+
T.current = !0;
|
|
273
274
|
let t = Array.from(e.keys()), r = t.find((e) => e?.hasAttribute("data-composite-item-active")) ?? null, i = r ? t.indexOf(r) : -1;
|
|
274
275
|
if (i !== -1) O(i);
|
|
275
|
-
else if (
|
|
276
|
-
let e =
|
|
277
|
-
|
|
276
|
+
else if (b(t, E, g)) {
|
|
277
|
+
let e = l(t, { disabledIndices: g });
|
|
278
|
+
p(t, e) || O(e);
|
|
278
279
|
}
|
|
279
|
-
J(
|
|
280
|
+
J(S.current, r, a, n);
|
|
280
281
|
});
|
|
281
|
-
|
|
282
|
-
if (
|
|
283
|
-
let e =
|
|
284
|
-
if (
|
|
285
|
-
let t =
|
|
286
|
-
|
|
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);
|
|
287
288
|
}
|
|
288
289
|
}, [
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
290
|
+
g,
|
|
291
|
+
s,
|
|
292
|
+
E,
|
|
293
|
+
w,
|
|
293
294
|
O
|
|
294
295
|
]);
|
|
295
|
-
let
|
|
296
|
-
let
|
|
297
|
-
if (!
|
|
298
|
-
let c = a === "rtl",
|
|
299
|
-
horizontal:
|
|
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,
|
|
300
301
|
vertical: V,
|
|
301
|
-
both:
|
|
302
|
-
}[n],
|
|
303
|
-
horizontal:
|
|
302
|
+
both: u
|
|
303
|
+
}[n], y = c ? K : W, b = {
|
|
304
|
+
horizontal: y,
|
|
304
305
|
vertical: I,
|
|
305
|
-
both:
|
|
306
|
-
}[n],
|
|
307
|
-
if (
|
|
308
|
-
let t =
|
|
309
|
-
if (t == null || e.shiftKey || t !== n || e.key !==
|
|
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;
|
|
310
311
|
}
|
|
311
|
-
let
|
|
312
|
-
r != null && (
|
|
313
|
-
disabledIndices:
|
|
314
|
-
elementsRef:
|
|
312
|
+
let T = E, D = o(w, g), k = d(w, g);
|
|
313
|
+
r != null && (T = r({
|
|
314
|
+
disabledIndices: g,
|
|
315
|
+
elementsRef: w,
|
|
315
316
|
event: e,
|
|
316
|
-
highlightedIndex:
|
|
317
|
+
highlightedIndex: E,
|
|
317
318
|
loopFocus: t,
|
|
318
319
|
maxIndex: k,
|
|
319
|
-
minIndex:
|
|
320
|
-
onLoop:
|
|
320
|
+
minIndex: D,
|
|
321
|
+
onLoop: A,
|
|
321
322
|
orientation: n,
|
|
322
323
|
rtl: c
|
|
323
324
|
}));
|
|
324
|
-
let
|
|
325
|
-
horizontal: [
|
|
325
|
+
let j = {
|
|
326
|
+
horizontal: [u],
|
|
326
327
|
vertical: [V],
|
|
327
|
-
both: [
|
|
328
|
-
}[n],
|
|
329
|
-
horizontal: [
|
|
328
|
+
both: [u, V]
|
|
329
|
+
}[n], M = {
|
|
330
|
+
horizontal: [y],
|
|
330
331
|
vertical: [I],
|
|
331
|
-
both: [
|
|
332
|
-
}[n], N =
|
|
333
|
-
horizontal:
|
|
334
|
-
vertical:
|
|
335
|
-
both:
|
|
332
|
+
both: [y, I]
|
|
333
|
+
}[n], N = x ? s : {
|
|
334
|
+
horizontal: f ? R : L,
|
|
335
|
+
vertical: f ? z : B,
|
|
336
|
+
both: s
|
|
336
337
|
}[n];
|
|
337
|
-
|
|
338
|
-
startingIndex:
|
|
339
|
-
decrement:
|
|
340
|
-
disabledIndices:
|
|
341
|
-
})),
|
|
342
|
-
|
|
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();
|
|
343
344
|
}));
|
|
344
345
|
});
|
|
345
346
|
return {
|
|
346
347
|
props: {
|
|
347
|
-
ref:
|
|
348
|
+
ref: C,
|
|
348
349
|
onFocus(e) {
|
|
349
|
-
let t =
|
|
350
|
+
let t = S.current, n = h(e.nativeEvent);
|
|
350
351
|
!t || n == null || !P(n) || n.setSelectionRange(0, n.value.length ?? 0);
|
|
351
352
|
},
|
|
352
353
|
onKeyDown: N
|
|
353
354
|
},
|
|
354
|
-
highlightedIndex:
|
|
355
|
+
highlightedIndex: E,
|
|
355
356
|
onHighlightedIndexChange: O,
|
|
356
|
-
elementsRef:
|
|
357
|
-
disabledIndices:
|
|
358
|
-
onMapChange:
|
|
357
|
+
elementsRef: w,
|
|
358
|
+
disabledIndices: g,
|
|
359
|
+
onMapChange: k,
|
|
359
360
|
relayKeyboardEvent: N
|
|
360
361
|
};
|
|
361
362
|
}
|
|
@@ -366,40 +367,40 @@ function de(e, t) {
|
|
|
366
367
|
//#endregion
|
|
367
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
|
|
368
369
|
function fe(e) {
|
|
369
|
-
let { render: t, className: n, style: r, refs: i =
|
|
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({
|
|
370
371
|
grid: f,
|
|
371
372
|
loopFocus: p,
|
|
372
373
|
onLoop: m,
|
|
373
|
-
orientation:
|
|
374
|
-
highlightedIndex:
|
|
375
|
-
onHighlightedIndexChange:
|
|
376
|
-
rootRef:
|
|
374
|
+
orientation: d,
|
|
375
|
+
highlightedIndex: l,
|
|
376
|
+
onHighlightedIndexChange: u,
|
|
377
|
+
rootRef: v,
|
|
377
378
|
stopEventPropagation: _,
|
|
378
379
|
enableHomeAndEndKeys: h,
|
|
379
|
-
direction:
|
|
380
|
-
disabledIndices:
|
|
381
|
-
modifierKeys:
|
|
382
|
-
}), P =
|
|
380
|
+
direction: c(),
|
|
381
|
+
disabledIndices: y,
|
|
382
|
+
modifierKeys: b
|
|
383
|
+
}), P = w(S, e, {
|
|
383
384
|
state: o,
|
|
384
385
|
ref: i,
|
|
385
386
|
props: [
|
|
386
|
-
|
|
387
|
+
T,
|
|
387
388
|
...a,
|
|
388
|
-
|
|
389
|
+
C
|
|
389
390
|
],
|
|
390
391
|
stateAttributesMapping: s
|
|
391
392
|
}), F = X.useMemo(() => ({
|
|
392
|
-
highlightedIndex:
|
|
393
|
-
onHighlightedIndexChange:
|
|
394
|
-
highlightItemOnHover:
|
|
393
|
+
highlightedIndex: D,
|
|
394
|
+
onHighlightedIndexChange: O,
|
|
395
|
+
highlightItemOnHover: x,
|
|
395
396
|
relayKeyboardEvent: N
|
|
396
397
|
}), [
|
|
398
|
+
D,
|
|
397
399
|
O,
|
|
398
|
-
|
|
399
|
-
C,
|
|
400
|
+
x,
|
|
400
401
|
N
|
|
401
402
|
]);
|
|
402
|
-
return /*#__PURE__*/ (0, $.jsx)(
|
|
403
|
+
return /*#__PURE__*/ (0, $.jsx)(E.Provider, {
|
|
403
404
|
value: F,
|
|
404
405
|
children: /*#__PURE__*/ (0, $.jsx)(ee, {
|
|
405
406
|
elementsRef: j,
|
|
@@ -413,66 +414,66 @@ function fe(e) {
|
|
|
413
414
|
//#endregion
|
|
414
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
|
|
415
416
|
var pe = /*#__PURE__*/ X.forwardRef(function(e, t) {
|
|
416
|
-
let { activateOnFocus: n = !1, className: r, loopFocus: i = !0, render: a, style: o, ...s } = e, { onValueChange: c, orientation:
|
|
417
|
-
|
|
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(() => {
|
|
418
419
|
if (typeof ResizeObserver > "u") return;
|
|
419
420
|
let e = new ResizeObserver(() => {
|
|
420
|
-
|
|
421
|
+
_.current.forEach((e) => {
|
|
421
422
|
e();
|
|
422
423
|
});
|
|
423
424
|
});
|
|
424
|
-
return
|
|
425
|
+
return y.current = e, h && e.observe(h), v.current.forEach((t) => {
|
|
425
426
|
e.observe(t);
|
|
426
427
|
}), () => {
|
|
427
|
-
e.disconnect(),
|
|
428
|
+
e.disconnect(), y.current = null;
|
|
428
429
|
};
|
|
429
|
-
}, [
|
|
430
|
-
let
|
|
431
|
-
|
|
432
|
-
})),
|
|
433
|
-
|
|
434
|
-
})),
|
|
435
|
-
e !==
|
|
436
|
-
}),
|
|
437
|
-
orientation:
|
|
438
|
-
tabActivationDirection:
|
|
439
|
-
},
|
|
440
|
-
"aria-orientation":
|
|
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,
|
|
441
442
|
role: "tablist"
|
|
442
|
-
},
|
|
443
|
+
}, T = X.useMemo(() => ({
|
|
443
444
|
activateOnFocus: n,
|
|
444
|
-
highlightedTabIndex:
|
|
445
|
-
registerIndicatorUpdateListener:
|
|
446
|
-
registerTabResizeObserverElement:
|
|
447
|
-
onTabActivation:
|
|
448
|
-
setHighlightedTabIndex:
|
|
449
|
-
tabsListElement:
|
|
445
|
+
highlightedTabIndex: p,
|
|
446
|
+
registerIndicatorUpdateListener: b,
|
|
447
|
+
registerTabResizeObserverElement: x,
|
|
448
|
+
onTabActivation: S,
|
|
449
|
+
setHighlightedTabIndex: m,
|
|
450
|
+
tabsListElement: h
|
|
450
451
|
}), [
|
|
451
452
|
n,
|
|
452
|
-
|
|
453
|
+
p,
|
|
454
|
+
b,
|
|
455
|
+
x,
|
|
453
456
|
S,
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
h,
|
|
457
|
-
g
|
|
457
|
+
m,
|
|
458
|
+
h
|
|
458
459
|
]);
|
|
459
460
|
return /*#__PURE__*/ (0, $.jsx)(oe.Provider, {
|
|
460
|
-
value:
|
|
461
|
+
value: T,
|
|
461
462
|
children: /*#__PURE__*/ (0, $.jsx)(fe, {
|
|
462
463
|
render: a,
|
|
463
464
|
className: r,
|
|
464
465
|
style: o,
|
|
465
|
-
state:
|
|
466
|
-
refs: [t,
|
|
467
|
-
props: [
|
|
466
|
+
state: C,
|
|
467
|
+
refs: [t, g],
|
|
468
|
+
props: [w, s],
|
|
468
469
|
stateAttributesMapping: ne,
|
|
469
|
-
highlightedIndex:
|
|
470
|
+
highlightedIndex: p,
|
|
470
471
|
enableHomeAndEndKeys: !0,
|
|
471
472
|
loopFocus: i,
|
|
472
|
-
orientation:
|
|
473
|
-
onHighlightedIndexChange:
|
|
474
|
-
onMapChange:
|
|
475
|
-
disabledIndices:
|
|
473
|
+
orientation: l,
|
|
474
|
+
onHighlightedIndexChange: m,
|
|
475
|
+
onMapChange: d,
|
|
476
|
+
disabledIndices: k
|
|
476
477
|
})
|
|
477
478
|
});
|
|
478
479
|
});
|
|
@@ -585,30 +586,30 @@ function be() {
|
|
|
585
586
|
if (!e) throw Error("useTabsSubtle must be used within a TabsSubtle");
|
|
586
587
|
return e;
|
|
587
588
|
}
|
|
588
|
-
var xe = (0, X.forwardRef)(({ children: e, selectedIndex: t, onSelect: n, idPrefix: r, activeLabel:
|
|
589
|
-
let
|
|
590
|
-
|
|
591
|
-
}, [
|
|
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]);
|
|
592
593
|
(0, X.useEffect)(() => {
|
|
593
|
-
|
|
594
|
-
}, [
|
|
595
|
-
let e =
|
|
594
|
+
_();
|
|
595
|
+
}, [_, e]), (0, X.useEffect)(() => {
|
|
596
|
+
let e = v.current;
|
|
596
597
|
if (e.size === 0) return;
|
|
597
|
-
let t = new ResizeObserver(() =>
|
|
598
|
+
let t = new ResizeObserver(() => _());
|
|
598
599
|
return e.forEach((e) => t.observe(e)), () => t.disconnect();
|
|
599
|
-
}, [
|
|
600
|
-
let
|
|
601
|
-
|
|
602
|
-
}, [
|
|
603
|
-
|
|
604
|
-
}, [
|
|
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;
|
|
605
606
|
return /* @__PURE__ */ (0, $.jsx)(ye.Provider, {
|
|
606
607
|
value: {
|
|
607
|
-
registerTab:
|
|
608
|
-
hoveredIndex:
|
|
608
|
+
registerTab: b,
|
|
609
|
+
hoveredIndex: d,
|
|
609
610
|
selectedIndex: t,
|
|
610
611
|
idPrefix: r,
|
|
611
|
-
activeLabel:
|
|
612
|
+
activeLabel: i
|
|
612
613
|
},
|
|
613
614
|
children: /* @__PURE__ */ (0, $.jsx)(re, {
|
|
614
615
|
value: t,
|
|
@@ -618,75 +619,75 @@ var xe = (0, X.forwardRef)(({ children: e, selectedIndex: t, onSelect: n, idPref
|
|
|
618
619
|
render: /* @__PURE__ */ (0, $.jsxs)(pe, {
|
|
619
620
|
activateOnFocus: !1,
|
|
620
621
|
ref: (e) => {
|
|
621
|
-
|
|
622
|
+
c.current = e, typeof s == "function" ? s(e) : s && (s.current = e);
|
|
622
623
|
},
|
|
623
|
-
onMouseMove:
|
|
624
|
-
onMouseLeave:
|
|
624
|
+
onMouseMove: x,
|
|
625
|
+
onMouseLeave: w,
|
|
625
626
|
onFocus: (e) => {
|
|
626
627
|
let t = e.target.closest("[data-proximity-index]")?.getAttribute("data-proximity-index");
|
|
627
628
|
if (t != null) {
|
|
628
629
|
let n = Number(t);
|
|
629
|
-
|
|
630
|
+
f(n), E(e.target.matches(":focus-visible") ? n : null);
|
|
630
631
|
}
|
|
631
632
|
},
|
|
632
633
|
onBlur: (e) => {
|
|
633
|
-
|
|
634
|
+
c.current?.contains(e.relatedTarget) || (E(null), !l.current && f(null));
|
|
634
635
|
},
|
|
635
|
-
className:
|
|
636
|
-
...
|
|
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,
|
|
637
638
|
children: [
|
|
638
|
-
|
|
639
|
-
className:
|
|
639
|
+
D && /* @__PURE__ */ (0, $.jsx)(m.div, {
|
|
640
|
+
className: C("absolute bg-accent pointer-events-none", u.bg),
|
|
640
641
|
initial: !1,
|
|
641
642
|
animate: {
|
|
642
|
-
left:
|
|
643
|
-
width:
|
|
644
|
-
top:
|
|
645
|
-
height:
|
|
643
|
+
left: D.left,
|
|
644
|
+
width: D.width,
|
|
645
|
+
top: D.top,
|
|
646
|
+
height: D.height,
|
|
646
647
|
opacity: j ? .8 : 1
|
|
647
648
|
},
|
|
648
649
|
transition: {
|
|
649
|
-
...
|
|
650
|
+
...y.moderate,
|
|
650
651
|
opacity: { duration: .08 }
|
|
651
652
|
}
|
|
652
653
|
}),
|
|
653
|
-
/* @__PURE__ */ (0, $.jsx)(q, { children:
|
|
654
|
-
className:
|
|
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),
|
|
655
656
|
initial: {
|
|
656
|
-
left:
|
|
657
|
-
width:
|
|
658
|
-
top:
|
|
659
|
-
height:
|
|
657
|
+
left: D.left,
|
|
658
|
+
width: D.width,
|
|
659
|
+
top: D.top,
|
|
660
|
+
height: D.height,
|
|
660
661
|
opacity: 0
|
|
661
662
|
},
|
|
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 ? {
|
|
663
671
|
left: D.left,
|
|
664
672
|
width: D.width,
|
|
665
673
|
top: D.top,
|
|
666
674
|
height: D.height,
|
|
667
|
-
opacity: .4
|
|
668
|
-
},
|
|
669
|
-
exit: !d.current && E ? {
|
|
670
|
-
left: E.left,
|
|
671
|
-
width: E.width,
|
|
672
|
-
top: E.top,
|
|
673
|
-
height: E.height,
|
|
674
675
|
opacity: 0,
|
|
675
676
|
transition: {
|
|
676
|
-
...
|
|
677
|
+
...y.moderate,
|
|
677
678
|
opacity: { duration: .06 }
|
|
678
679
|
}
|
|
679
680
|
} : {
|
|
680
681
|
opacity: 0,
|
|
681
|
-
transition:
|
|
682
|
+
transition: y.fast.exit
|
|
682
683
|
},
|
|
683
684
|
transition: {
|
|
684
|
-
...
|
|
685
|
+
...y.fast,
|
|
685
686
|
opacity: { duration: .08 }
|
|
686
687
|
}
|
|
687
688
|
}) }),
|
|
688
|
-
/* @__PURE__ */ (0, $.jsx)(q, { children: k && /* @__PURE__ */ (0, $.jsx)(
|
|
689
|
-
className:
|
|
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),
|
|
690
691
|
initial: !1,
|
|
691
692
|
animate: {
|
|
692
693
|
left: k.left - 2,
|
|
@@ -696,10 +697,10 @@ var xe = (0, X.forwardRef)(({ children: e, selectedIndex: t, onSelect: n, idPref
|
|
|
696
697
|
},
|
|
697
698
|
exit: {
|
|
698
699
|
opacity: 0,
|
|
699
|
-
transition:
|
|
700
|
+
transition: y.fast.exit
|
|
700
701
|
},
|
|
701
702
|
transition: {
|
|
702
|
-
...
|
|
703
|
+
...y.fast,
|
|
703
704
|
opacity: { duration: .08 }
|
|
704
705
|
}
|
|
705
706
|
}) }),
|
|
@@ -710,39 +711,39 @@ var xe = (0, X.forwardRef)(({ children: e, selectedIndex: t, onSelect: n, idPref
|
|
|
710
711
|
});
|
|
711
712
|
});
|
|
712
713
|
xe.displayName = "TabsSubtle";
|
|
713
|
-
var Se = (0, X.forwardRef)(({ icon: e, label: t, index: n, className: r, ...
|
|
714
|
-
let
|
|
715
|
-
(0, X.useEffect)(() => (
|
|
716
|
-
let h =
|
|
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", {
|
|
717
718
|
className: "inline-grid",
|
|
718
719
|
children: [/* @__PURE__ */ (0, $.jsx)("span", {
|
|
719
720
|
className: "col-start-1 row-start-1 invisible [text-box:trim-both_cap_alphabetic]",
|
|
720
|
-
style: { fontVariationSettings:
|
|
721
|
+
style: { fontVariationSettings: f.semibold },
|
|
721
722
|
"aria-hidden": "true",
|
|
722
723
|
children: t
|
|
723
724
|
}), /* @__PURE__ */ (0, $.jsx)("span", {
|
|
724
|
-
className:
|
|
725
|
-
style: { fontVariationSettings: h ?
|
|
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 },
|
|
726
727
|
children: t
|
|
727
728
|
})]
|
|
728
729
|
});
|
|
729
730
|
return /* @__PURE__ */ (0, $.jsxs)(ce, {
|
|
730
731
|
ref: (e) => {
|
|
731
732
|
let t = e;
|
|
732
|
-
|
|
733
|
+
o.current = t, typeof a == "function" ? a(t) : a && (a.current = t);
|
|
733
734
|
},
|
|
734
735
|
value: n,
|
|
735
736
|
"data-proximity-index": n,
|
|
736
|
-
id:
|
|
737
|
-
"aria-controls":
|
|
738
|
-
"aria-label":
|
|
739
|
-
className:
|
|
740
|
-
...
|
|
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,
|
|
741
742
|
children: [e && /* @__PURE__ */ (0, $.jsx)(e, {
|
|
742
743
|
size: 14,
|
|
743
744
|
strokeWidth: g ? 2 : 1.5,
|
|
744
|
-
className:
|
|
745
|
-
}),
|
|
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, {
|
|
746
747
|
className: "overflow-hidden",
|
|
747
748
|
initial: {
|
|
748
749
|
width: 0,
|
|
@@ -760,11 +761,11 @@ var Se = (0, X.forwardRef)(({ icon: e, label: t, index: n, className: r, ...a },
|
|
|
760
761
|
marginLeft: 0
|
|
761
762
|
},
|
|
762
763
|
transition: {
|
|
763
|
-
...
|
|
764
|
+
...y.fast,
|
|
764
765
|
opacity: { duration: .06 }
|
|
765
766
|
},
|
|
766
|
-
children:
|
|
767
|
-
}, "label") }) :
|
|
767
|
+
children: b
|
|
768
|
+
}, "label") }) : b]
|
|
768
769
|
});
|
|
769
770
|
});
|
|
770
771
|
Se.displayName = "TabsSubtleItem";
|
|
@@ -777,7 +778,7 @@ var Ce = (0, X.forwardRef)(({ index: e, selectedIndex: t, idPrefix: n, children:
|
|
|
777
778
|
"aria-labelledby": `${n}-tab-${e}`,
|
|
778
779
|
hidden: !s,
|
|
779
780
|
tabIndex: -1,
|
|
780
|
-
className:
|
|
781
|
+
className: C("outline-none", i),
|
|
781
782
|
...a,
|
|
782
783
|
children: s && r
|
|
783
784
|
});
|