@mcp-use/inspector 20.0.0-beta.0 → 20.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/cdn/{AnimatePresence-B4HhIdgq.js → AnimatePresence-Dcw-FOy8.js} +50 -50
- package/dist/cdn/ChatTab-DBl6dHVH.js +6744 -0
- package/dist/cdn/{CheckboxIndicator-BF2cKfbA.js → CheckboxIndicator-Bt4IICtv.js} +77 -77
- package/dist/cdn/{ConnectionSettingsForm-iwNW86ZU.js → ConnectionSettingsForm-BFsZpwK4.js} +348 -292
- package/dist/cdn/ConnectionSettingsTab-DDk06dhT.js +150 -0
- package/dist/cdn/{ElicitationTab-upPXq2q7.js → ElicitationTab-CL1KJ0bz.js} +39 -39
- package/dist/cdn/{FormContext-Cl51-7O7.js → FormContext-tmgN_Vdr.js} +1 -1
- package/dist/cdn/{InspectorContext-DzXtgyTx.js → InspectorContext-UjtEbNod.js} +1 -21
- package/dist/cdn/{JSONDisplay-D3RcyO9z.js → JSONDisplay-BFxf5oEu.js} +18 -18
- package/dist/cdn/{ListTabHeader-8lULn-90.js → ListTabHeader-Cv-GmtGF.js} +19 -19
- package/dist/cdn/{ManufactOAuthCallback-DEM8mhWD.js → ManufactOAuthCallback-B98kSYCj.js} +1 -1
- package/dist/cdn/MarkdownRenderer-DQflNTGo.js +3610 -0
- package/dist/cdn/{NotificationsTab-CWopTIzT.js → NotificationsTab-CeImSrhx.js} +13 -13
- package/dist/cdn/{OAuthCallback-BxuOVgdb.js → OAuthCallback-C4n2hqKU.js} +1 -1
- package/dist/cdn/PromptsTab-C84YLTSM.js +901 -0
- package/dist/cdn/{ResourcesTab-BczUMFil.js → ResourcesTab-CCa5bIHE.js} +35 -55
- package/dist/cdn/{SamplingTab-6u5s845G.js → SamplingTab-Bt9z8yQ2.js} +35 -35
- package/dist/cdn/{ServerMetadataTab-DS0eiyyD.js → ServerMetadataTab-CvrKX8fz.js} +12 -12
- package/dist/cdn/{StatusIcon-BGXOEU2u.js → StatusIcon-D0-ARyOh.js} +6 -6
- package/dist/cdn/{ToolsTab-CUhwP4rZ.js → ToolsTab-v9zgWmM6.js} +103 -137
- package/dist/cdn/{ViewPreview-CxJc1Kht.js → ViewPreview-DsPwZAwO.js} +2 -2
- package/dist/cdn/{WidgetWrapper-BJJtLqMb.js → WidgetWrapper-CwlpDv17.js} +529 -530
- package/dist/cdn/card-DgiYnSg-.js +41 -0
- package/dist/cdn/{checkbox-B4oUG6Rr.js → checkbox-By0FklhG.js} +6 -6
- package/dist/cdn/{dialog-Dnl-pZsY.js → dialog-BsDpuJd3.js} +151 -151
- package/dist/cdn/{dist-mRDqCgKU.js → dist-B0eL32Gb.js} +114 -113
- package/dist/cdn/{dist-DjXr_YO3.js → dist-DaMB0Su9.js} +1 -1
- package/dist/cdn/{index-browser-CVUwR-Bu.js → index-browser-QDjRGsPo.js} +1 -1
- package/dist/cdn/{input-BLxOA7V-.js → input-C2OBd4PJ.js} +4787 -2842
- package/dist/cdn/inspector.css +1 -1
- package/dist/cdn/inspector.js +7424 -7443
- package/dist/cdn/{label-CBvG613A.js → label-B9Jmm9be.js} +10 -10
- package/dist/cdn/{manufact-auth-0TVxpeTA.js → manufact-auth-BQMHhbLV.js} +142 -106
- package/dist/cdn/{not-found-BcNNsTjS.js → not-found-DEtSM_Wd.js} +7 -7
- package/dist/cdn/providerMeta-BQIfHuNL.js +379 -0
- package/dist/cdn/{react-yUi9mVK4.js → react-Dn8PWXwP.js} +33 -27
- package/dist/cdn/{select-BZ_IoKxg.js → select-DDdiIPR2.js} +726 -726
- package/dist/cdn/{shared-uMiV6Fx1.js → shared-DaILIQPP.js} +29 -29
- package/dist/cdn/{popover-C_SSrXT0.js → sheet-Br_l2kry.js} +694 -622
- package/dist/cdn/{spinner-CWcJhIY_.js → spinner-jQtC7EBj.js} +5 -5
- package/dist/cdn/{switch-DtQOLb9R.js → switch-C3IyQuid.js} +104 -104
- package/dist/cdn/{tabs-subtle-C5cy35sY.js → tabs-subtle-CkdI6Mac.js} +147 -147
- package/dist/cdn/{telemetry-Ct6pVkM1.js → telemetry-DGoIGfIS.js} +3 -3
- package/dist/cdn/{textarea-Bj-CT7hC.js → textarea-DSbwcFVt.js} +6 -6
- package/dist/cdn/{useAriaLabelledBy-Bm9qHGK6.js → useAriaLabelledBy-DqAdnppm.js} +1 -1
- package/dist/cdn/{useCompositeItem-CNJ6MXdi.js → useCompositeItem-BRqEzYh-.js} +2 -2
- package/dist/cdn/{useConfig-CwxZ6Quj.js → useConfig-CTb6GZbt.js} +73 -46
- package/dist/cdn/{useViewHostProps-C7vjco2m.js → useViewHostProps-DIIlz3tJ.js} +1 -1
- package/dist/cli.js +141 -25
- package/dist/client/auth/manufact-auth.d.ts +3 -1
- package/dist/client/auth/manufact-auth.d.ts.map +1 -1
- package/dist/client/components/ChatTab.d.ts +1 -8
- package/dist/client/components/ChatTab.d.ts.map +1 -1
- package/dist/client/components/ResourcesTab.d.ts.map +1 -1
- package/dist/client/components/chat/ChatHeader.d.ts +7 -2
- package/dist/client/components/chat/ChatHeader.d.ts.map +1 -1
- package/dist/client/components/chat/ChatLandingForm.d.ts +4 -2
- package/dist/client/components/chat/ChatLandingForm.d.ts.map +1 -1
- package/dist/client/components/chat/ChatManagedNotice.d.ts +10 -0
- package/dist/client/components/chat/ChatManagedNotice.d.ts.map +1 -0
- package/dist/client/components/chat/ChatScrollTopFade.d.ts +7 -0
- package/dist/client/components/chat/ChatScrollTopFade.d.ts.map +1 -0
- package/dist/client/components/chat/ConfigurationDialog.d.ts +11 -9
- package/dist/client/components/chat/ConfigurationDialog.d.ts.map +1 -1
- package/dist/client/components/chat/ConfigureEmptyState.d.ts +1 -6
- package/dist/client/components/chat/ConfigureEmptyState.d.ts.map +1 -1
- package/dist/client/components/chat/StreamingAssistantContent.d.ts.map +1 -1
- package/dist/client/components/chat/chatModeStorage.d.ts +11 -0
- package/dist/client/components/chat/chatModeStorage.d.ts.map +1 -0
- package/dist/client/components/chat/managedChatNotice.d.ts +16 -0
- package/dist/client/components/chat/managedChatNotice.d.ts.map +1 -0
- package/dist/client/components/chat/providerMeta.d.ts +11 -0
- package/dist/client/components/chat/providerMeta.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessages.d.ts +7 -5
- package/dist/client/components/chat/useChatMessages.d.ts.map +1 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts +4 -6
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +1 -1
- package/dist/client/components/chat/useChatScrollToBottom.d.ts +1 -0
- package/dist/client/components/chat/useChatScrollToBottom.d.ts.map +1 -1
- package/dist/client/components/chat/useConfig.d.ts +1 -1
- package/dist/client/components/chat/useConfig.d.ts.map +1 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts +1 -1
- package/dist/client/components/chat/useHostedChatMode.d.ts.map +1 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts +2 -1
- package/dist/client/components/shared/MarkdownRenderer.d.ts.map +1 -1
- package/dist/client/components/tools/useToolsTabNavigation.d.ts.map +1 -1
- package/dist/client/components/ui/MeshGradientCanvas.d.ts +13 -0
- package/dist/client/components/ui/MeshGradientCanvas.d.ts.map +1 -0
- package/dist/client/components/ui/chat-message.d.ts +1 -1
- package/dist/client/components/ui/chat-message.d.ts.map +1 -1
- package/dist/client/components/ui/file-thumbnail.d.ts.map +1 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts +3 -1
- package/dist/client/components/ui/mesh-tab-background.d.ts.map +1 -1
- package/dist/client/context/InspectorContext.d.ts.map +1 -1
- package/dist/client/index.js +2577 -2165
- package/dist/client/telemetry/utils.d.ts.map +1 -1
- package/dist/server/asset-urls.d.ts +18 -0
- package/dist/server/asset-urls.d.ts.map +1 -0
- package/dist/server/asset-urls.js +17 -0
- package/dist/server/cdn-shell.d.ts +3 -3
- package/dist/server/cdn-shell.d.ts.map +1 -1
- package/dist/server/cdn-shell.js +5 -3
- package/dist/server/chunk-H6ZCIKBS.js +63 -0
- package/dist/server/{chunk-ESODOPDD.js → chunk-J4FNYLBF.js} +4 -0
- package/dist/server/{chunk-TPHRVELX.js → chunk-K2DPKTIS.js} +27 -9
- package/dist/server/{chunk-THQ67TSE.js → chunk-LIM6NAUS.js} +2 -9
- package/dist/server/chunk-M5TZA42I.js +54 -0
- package/dist/server/{chunk-K2V2SDQD.js → chunk-OWR2BIBW.js} +1 -1
- package/dist/server/{chunk-J67FVPHF.js → chunk-R6RQMIXL.js} +2 -2
- package/dist/server/{chunk-5B3SXGZP.js → chunk-UJLXHNQP.js} +1 -1
- package/dist/server/{chunk-6XWDZEFF.js → chunk-XCNS5CIW.js} +8 -3
- package/dist/server/cli.js +8 -6
- package/dist/server/create-dev-api-app.js +3 -3
- package/dist/server/dev-callback-redirect.d.ts +3 -0
- package/dist/server/dev-callback-redirect.d.ts.map +1 -0
- package/dist/server/dev-callback-redirect.js +18 -0
- package/dist/server/favicon-static.d.ts.map +1 -1
- package/dist/server/favicon-static.js +1 -1
- package/dist/server/index.js +9 -7
- package/dist/server/middleware.js +9 -7
- package/dist/server/proxy/index.js +1 -1
- package/dist/server/proxy/mcp-proxy.d.ts +2 -0
- package/dist/server/proxy/mcp-proxy.d.ts.map +1 -1
- package/dist/server/proxy/mcp-proxy.js +3 -1
- package/dist/server/proxy-routes.js +2 -2
- package/dist/server/server.js +3 -3
- package/dist/server/static-assets.d.ts +5 -0
- package/dist/server/static-assets.d.ts.map +1 -0
- package/dist/server/static-assets.js +9 -0
- package/dist/server/version.js +1 -1
- package/dist/server/vite-dev-api-plugin.js +3 -3
- package/dist/web/assets/{AnimatePresence-CthXziG2.js → AnimatePresence-C5p0yiY1.js} +2 -2
- package/dist/web/assets/ChatTab-C2FtENBM.js +18 -0
- package/dist/web/assets/ConnectionSettingsTab-B2sUjytG.js +1 -0
- package/dist/web/assets/ElicitationTab-DwH08kDC.js +1 -0
- package/dist/web/assets/{FormContext-Cqc_A12u.js → FormContext-DH2caWKO.js} +1 -1
- package/dist/web/assets/ListTabHeader-R17w_JsB.js +1 -0
- package/dist/web/assets/{ManufactOAuthCallback-B-tdkUA2.js → ManufactOAuthCallback-Btu4B6u6.js} +1 -1
- package/dist/web/assets/MarkdownRenderer-DpIEt9wb.js +47 -0
- package/dist/web/assets/{NotificationsTab-BgLjxuos.js → NotificationsTab-CHB8mtSz.js} +1 -1
- package/dist/web/assets/{OAuthCallback-Bp-jLoQs.js → OAuthCallback-DV4MgX4Z.js} +1 -1
- package/dist/web/assets/PromptsTab-0GIapoSs.js +15 -0
- package/dist/web/assets/ResourcesTab-N9xjsI_b.js +2 -0
- package/dist/web/assets/SamplingTab-Dw0vpi4t.js +1 -0
- package/dist/web/assets/ServerMetadataTab-D-eQpLBF.js +1 -0
- package/dist/web/assets/ToolsTab-BMrMJ5JV.js +8 -0
- package/dist/web/assets/ViewPreview-N_cpEO0W.js +1 -0
- package/dist/web/assets/WidgetWrapper-pDgNVq9y.js +34 -0
- package/dist/web/assets/checkbox-CrnXSMh2.js +1 -0
- package/dist/web/assets/dist-CeWSydFI.js +21 -0
- package/dist/web/assets/index-Cfuv_gb3.js +475 -0
- package/dist/web/assets/index-fBX3akc8.css +1 -0
- package/dist/web/assets/input-CLYhA7PK.js +1 -0
- package/dist/web/assets/{label-B5Q_Zr8M.js → label-Cdim77Jw.js} +1 -1
- package/dist/web/assets/select-CJ57-Bor.js +1 -0
- package/dist/web/assets/shared-B1GD9FMm.js +1 -0
- package/dist/web/assets/{tabs-subtle-Dxgism9f.js → tabs-subtle-CG5cjC_N.js} +1 -1
- package/dist/web/assets/textarea-DLAmNVf_.js +1 -0
- package/dist/web/assets/useConfig-BTp15Lle.js +1 -0
- package/dist/web/assets/{useViewHostProps-BgsQ2yYl.js → useViewHostProps-BQlaFC2Q.js} +1 -1
- package/dist/web/index.html +8 -9
- package/package.json +5 -12
- package/dist/cdn/ChatTab-5ya_YTFV.js +0 -13218
- package/dist/cdn/ConnectionSettingsTab-CeK83dxn.js +0 -145
- package/dist/cdn/PromptsTab-Cspfnl6n.js +0 -4400
- package/dist/cdn/bundle-mjs-B0nmHDtp.js +0 -1953
- package/dist/cdn/card-DqjqAq0o.js +0 -41
- package/dist/cdn/chunk-BO2N2NFS-Cy167e0X.js +0 -17500
- package/dist/cdn/highlighted-body-OFNGDK62-CoReNbTX.js +0 -36
- package/dist/cdn/mermaid-GHXKKRXX-DgVIbk-D.js +0 -2
- package/dist/cdn/pdf-CxFT9FER.js +0 -16291
- package/dist/cdn/sheet-CerCdhxz.js +0 -78
- package/dist/cdn/useHostedSession-BA39Aegc.js +0 -153
- package/dist/cdn/useMCPPrompts-D3_Hla_z.js +0 -104
- package/dist/client/components/chat/streamdown-code-slim.d.ts +0 -4
- package/dist/client/components/chat/streamdown-code-slim.d.ts.map +0 -1
- package/dist/web/assets/ChatTab-CiAqtqhj.js +0 -460
- package/dist/web/assets/ConnectionSettingsTab-CTh6MFKE.js +0 -1
- package/dist/web/assets/ElicitationTab-B3Eg0_Jm.js +0 -1
- package/dist/web/assets/ListTabHeader-G-nQX18m.js +0 -1
- package/dist/web/assets/PromptsTab-CA-SZs43.js +0 -61
- package/dist/web/assets/ResourcesTab-DdMIW_af.js +0 -2
- package/dist/web/assets/SamplingTab-DjyDG01W.js +0 -1
- package/dist/web/assets/ServerMetadataTab-Q4PlqP_B.js +0 -1
- package/dist/web/assets/ToolsTab-BHk8GCmd.js +0 -8
- package/dist/web/assets/ViewPreview-DWtmwzCb.js +0 -1
- package/dist/web/assets/WidgetWrapper-B43lqbld.js +0 -34
- package/dist/web/assets/bundle-mjs-8puS6ou7.js +0 -1
- package/dist/web/assets/checkbox-_GzEPQic.js +0 -1
- package/dist/web/assets/chunk-BO2N2NFS-BdIeB5Lr.js +0 -131
- package/dist/web/assets/dist-DQjEDTKs.js +0 -21
- package/dist/web/assets/highlighted-body-OFNGDK62-Dp3e1QHL.js +0 -1
- package/dist/web/assets/index-Bbn-6QR2.js +0 -475
- package/dist/web/assets/index-BjH-Qp85.css +0 -1
- package/dist/web/assets/input-CjmxOFr6.js +0 -1
- package/dist/web/assets/mermaid-GHXKKRXX-yq1lkD3x.js +0 -1
- package/dist/web/assets/pdf-C3cfS_Ha.js +0 -54
- package/dist/web/assets/select-C0xlfLAa.js +0 -1
- package/dist/web/assets/shared-Dfwy7nyg.js +0 -1
- package/dist/web/assets/sheet-CRPrEqAa.js +0 -1
- package/dist/web/assets/textarea-Ci09-en6.js +0 -1
- package/dist/web/assets/useConfig-b1f_iVFH.js +0 -1
- package/dist/web/assets/useMCPPrompts-CPskz9af.js +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Rr as e } from "./input-C2OBd4PJ.js";
|
|
2
|
+
import { t } from "./jsx-runtime-CIxvMpEo.js";
|
|
3
3
|
import { t as n } from "./loader-circle-BLy9A_pp.js";
|
|
4
4
|
//#region src/client/components/ui/spinner.tsx
|
|
5
|
-
var r =
|
|
6
|
-
function i({ className:
|
|
5
|
+
var r = t();
|
|
6
|
+
function i({ className: t, ...i }) {
|
|
7
7
|
return /* @__PURE__ */ (0, r.jsx)(n, {
|
|
8
8
|
role: "status",
|
|
9
9
|
"aria-label": "Loading",
|
|
10
|
-
className:
|
|
10
|
+
className: e("size-4 animate-spin", t),
|
|
11
11
|
...i
|
|
12
12
|
});
|
|
13
13
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { s as e, t } from "./react-BIs9pQ3H.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as ce } from "./label-
|
|
5
|
-
import { c as le } from "./select-
|
|
6
|
-
import { c as R, i as ue, l as de, o as fe, r as pe, t as me } from "./FormContext-
|
|
7
|
-
import { t as he } from "./useAriaLabelledBy-
|
|
2
|
+
import { A as n, B as r, D as i, E as a, F as o, I as s, L as c, M as l, Mn as u, N as d, Nn as f, O as p, Or as m, P as h, R as g, Rr as _, S as v, Sr as y, T as b, U as x, Yn as S, _ as C, _r as w, an as T, b as E, br as D, dr as O, f as k, g as A, gr as ee, h as te, in as ne, j as re, k as j, m as M, pr as ie, s as N, v as ae, w as oe, x as P, xr as se, y as F, z as I } from "./input-C2OBd4PJ.js";
|
|
3
|
+
import { t as L } from "./jsx-runtime-CIxvMpEo.js";
|
|
4
|
+
import { n as ce } from "./label-B9Jmm9be.js";
|
|
5
|
+
import { c as le } from "./select-DDdiIPR2.js";
|
|
6
|
+
import { c as R, i as ue, l as de, o as fe, r as pe, t as me } from "./FormContext-tmgN_Vdr.js";
|
|
7
|
+
import { t as he } from "./useAriaLabelledBy-DqAdnppm.js";
|
|
8
8
|
//#region ../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/wrap.mjs
|
|
9
9
|
var ge = (e, t, n) => {
|
|
10
10
|
let r = t - e;
|
|
@@ -14,7 +14,7 @@ var ge = (e, t, n) => {
|
|
|
14
14
|
//#region ../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/easing/utils/get-easing-for-segment.mjs
|
|
15
15
|
/*#__NO_SIDE_EFFECTS__*/
|
|
16
16
|
function z(e, t) {
|
|
17
|
-
return
|
|
17
|
+
return h(e) ? e[ge(0, e.length, t)] : e;
|
|
18
18
|
}
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region ../../node_modules/.pnpm/motion-dom@12.42.2/node_modules/motion-dom/dist/es/animation/GroupAnimation.mjs
|
|
@@ -114,7 +114,7 @@ var _e = class extends ae {
|
|
|
114
114
|
delete t.output[e];
|
|
115
115
|
}
|
|
116
116
|
measureInstanceViewportBox() {
|
|
117
|
-
return
|
|
117
|
+
return E();
|
|
118
118
|
}
|
|
119
119
|
build(e, t) {
|
|
120
120
|
Object.assign(e.output, t);
|
|
@@ -127,7 +127,7 @@ var _e = class extends ae {
|
|
|
127
127
|
}
|
|
128
128
|
}, W = /* @__PURE__ */ e(t(), 1);
|
|
129
129
|
function ve(e) {
|
|
130
|
-
let t =
|
|
130
|
+
let t = x(() => i(e)), { isStatic: n } = (0, W.useContext)(M);
|
|
131
131
|
if (n) {
|
|
132
132
|
let [, n] = (0, W.useState)(e);
|
|
133
133
|
(0, W.useEffect)(() => t.on("change", n), []);
|
|
@@ -142,7 +142,7 @@ function G(e) {
|
|
|
142
142
|
//#endregion
|
|
143
143
|
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.mjs
|
|
144
144
|
function K(e, t, n, r) {
|
|
145
|
-
return e == null ? [] : typeof e == "string" && G(t) ?
|
|
145
|
+
return e == null ? [] : typeof e == "string" && G(t) ? oe(e, n, r) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e.filter((e) => e != null) : [e];
|
|
146
146
|
}
|
|
147
147
|
//#endregion
|
|
148
148
|
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs
|
|
@@ -157,16 +157,16 @@ function q(e, t, n, r) {
|
|
|
157
157
|
//#endregion
|
|
158
158
|
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/sequence/utils/edit.mjs
|
|
159
159
|
function J(e, t, n) {
|
|
160
|
-
for (let
|
|
161
|
-
let a = e[
|
|
162
|
-
a.at > t && a.at < n && (
|
|
160
|
+
for (let i = 0; i < e.length; i++) {
|
|
161
|
+
let a = e[i];
|
|
162
|
+
a.at > t && a.at < n && (r(e, a), i--);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
function be(e, t, n, r, i, a) {
|
|
166
166
|
J(e, i, a);
|
|
167
167
|
for (let o = 0; o < t.length; o++) e.push({
|
|
168
168
|
value: t[o],
|
|
169
|
-
at:
|
|
169
|
+
at: d(i, a, r[o]),
|
|
170
170
|
easing: /* @__PURE__ */ z(n, o)
|
|
171
171
|
});
|
|
172
172
|
}
|
|
@@ -184,21 +184,21 @@ function Se(e, t) {
|
|
|
184
184
|
//#endregion
|
|
185
185
|
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/sequence/create.mjs
|
|
186
186
|
var Ce = "easeInOut", Y = 20;
|
|
187
|
-
function we(e, { defaultTransition: t = {}, ...
|
|
188
|
-
let d = t.duration || .3, f = /* @__PURE__ */ new Map(),
|
|
189
|
-
for (let
|
|
190
|
-
let
|
|
191
|
-
if (typeof
|
|
192
|
-
g.set(
|
|
187
|
+
function we(e, { defaultTransition: t = {}, ...r } = {}, i, u) {
|
|
188
|
+
let d = t.duration || .3, f = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), h = {}, g = /* @__PURE__ */ new Map(), _ = 0, v = 0, y = 0;
|
|
189
|
+
for (let r = 0; r < e.length; r++) {
|
|
190
|
+
let c = e[r];
|
|
191
|
+
if (typeof c == "string") {
|
|
192
|
+
g.set(c, v);
|
|
193
193
|
continue;
|
|
194
|
-
} else if (!Array.isArray(
|
|
195
|
-
g.set(
|
|
194
|
+
} else if (!Array.isArray(c)) {
|
|
195
|
+
g.set(c.name, q(v, c.at, _, g));
|
|
196
196
|
continue;
|
|
197
197
|
}
|
|
198
|
-
let [f, b, x = {}] =
|
|
198
|
+
let [f, b, x = {}] = c;
|
|
199
199
|
x.at !== void 0 && (v = q(v, x.at, _, g));
|
|
200
|
-
let S = 0, C = (e,
|
|
201
|
-
let f = De(e), { delay:
|
|
200
|
+
let S = 0, C = (e, r, i, a = 0, c = 0) => {
|
|
201
|
+
let f = De(e), { delay: m = 0, times: h = j(f), type: g = t.type || "keyframes", repeat: _, repeatType: b, repeatDelay: x = 0, ...C } = r, { ease: w = t.ease || "easeOut", duration: T } = r, E = typeof m == "function" ? m(a, c) : m, D = f.length, O = p(g) ? g : u?.[g || "keyframes"];
|
|
202
202
|
if (D <= 2 && O) {
|
|
203
203
|
let e = 100;
|
|
204
204
|
if (D === 2 && Ae(f)) {
|
|
@@ -209,66 +209,66 @@ function we(e, { defaultTransition: t = {}, ...n } = {}, i, a) {
|
|
|
209
209
|
...t,
|
|
210
210
|
...C
|
|
211
211
|
};
|
|
212
|
-
T !== void 0 && (n.duration =
|
|
213
|
-
let r =
|
|
212
|
+
T !== void 0 && (n.duration = s(T));
|
|
213
|
+
let r = l(n, e, O);
|
|
214
214
|
w = r.ease, T = r.duration;
|
|
215
215
|
}
|
|
216
216
|
T ??= d;
|
|
217
217
|
let k = v + E;
|
|
218
218
|
h.length === 1 && h[0] === 0 && (h[1] = 1);
|
|
219
219
|
let A = h.length - f.length;
|
|
220
|
-
if (A > 0 &&
|
|
220
|
+
if (A > 0 && n(h, A), f.length === 1 && f.unshift(null), _ && I(_ < Y, `Sequence segments can't repeat ${_} times — ignoring repeat option. Use a value below ${Y} or apply repeat at the sequence level instead.`), _ && _ < Y) {
|
|
221
221
|
let e = T > 0 ? x / T : 0;
|
|
222
222
|
T = ye(T, _, x);
|
|
223
223
|
let t = [...f], n = [...h];
|
|
224
224
|
w = Array.isArray(w) ? [...w] : [w];
|
|
225
|
-
let r = [...w], i = b === "reverse" || b === "mirror", a = t,
|
|
226
|
-
i && (a = [...t].reverse(), b === "reverse" && (
|
|
227
|
-
for (let
|
|
228
|
-
let c = i &&
|
|
225
|
+
let r = [...w], i = b === "reverse" || b === "mirror", a = t, s = r;
|
|
226
|
+
i && (a = [...t].reverse(), b === "reverse" && (s = [...r].reverse().map((e) => typeof e == "function" ? o(e) : e)));
|
|
227
|
+
for (let o = 0; o < _; o++) {
|
|
228
|
+
let c = i && o % 2 == 0, l = c ? a : t, u = c ? s : r, d = (o + 1) * (1 + e);
|
|
229
229
|
e > 0 && (f.push(f[f.length - 1]), h.push(d), w.push("linear")), f.push(...l);
|
|
230
230
|
for (let e = 0; e < l.length; e++) h.push(n[e] + d), w.push(e === 0 ? "linear" : /* @__PURE__ */ z(u, e - 1));
|
|
231
231
|
}
|
|
232
232
|
xe(h, _, e);
|
|
233
233
|
}
|
|
234
|
-
let
|
|
235
|
-
be(i, f, w, h, k,
|
|
234
|
+
let ee = k + T;
|
|
235
|
+
be(i, f, w, h, k, ee), S = Math.max(E + T, S), y = Math.max(ee, y);
|
|
236
236
|
};
|
|
237
|
-
if (
|
|
238
|
-
let e = Te(f,
|
|
237
|
+
if (a(f)) {
|
|
238
|
+
let e = Te(f, m);
|
|
239
239
|
C(b, x, Ee("default", e));
|
|
240
240
|
} else {
|
|
241
241
|
let e = K(f, b, i, h), t = e.length;
|
|
242
242
|
for (let n = 0; n < t; n++) {
|
|
243
243
|
b = b, x = x;
|
|
244
|
-
let r = e[n], i = Te(r,
|
|
244
|
+
let r = e[n], i = Te(r, m);
|
|
245
245
|
for (let e in b) C(b[e], Oe(x, e), Ee(e, i), n, t);
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
_ = v, v += S;
|
|
249
249
|
}
|
|
250
|
-
return
|
|
250
|
+
return m.forEach((e, n) => {
|
|
251
251
|
for (let i in e) {
|
|
252
252
|
let a = e[i];
|
|
253
253
|
a.sort(Se);
|
|
254
|
-
let o = [], s = [],
|
|
254
|
+
let o = [], s = [], l = [];
|
|
255
255
|
for (let e = 0; e < a.length; e++) {
|
|
256
256
|
let { at: t, value: n, easing: r } = a[e];
|
|
257
|
-
o.push(n), s.push(
|
|
257
|
+
o.push(n), s.push(c(0, y, t)), l.push(r || "easeOut");
|
|
258
258
|
}
|
|
259
|
-
s[0] !== 0 && (s.unshift(0), o.unshift(o[0]),
|
|
259
|
+
s[0] !== 0 && (s.unshift(0), o.unshift(o[0]), l.unshift(Ce)), s[s.length - 1] !== 1 && (s.push(1), o.push(null)), f.has(n) || f.set(n, {
|
|
260
260
|
keyframes: {},
|
|
261
261
|
transition: {}
|
|
262
262
|
});
|
|
263
|
-
let u = f.get(
|
|
263
|
+
let u = f.get(n);
|
|
264
264
|
u.keyframes[i] = o;
|
|
265
265
|
let { type: d, ...p } = t;
|
|
266
266
|
u.transition[i] = {
|
|
267
267
|
...p,
|
|
268
268
|
duration: y,
|
|
269
|
-
ease:
|
|
269
|
+
ease: l,
|
|
270
270
|
times: s,
|
|
271
|
-
...
|
|
271
|
+
...r
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
274
|
}), f;
|
|
@@ -305,8 +305,8 @@ function je(e) {
|
|
|
305
305
|
},
|
|
306
306
|
latestValues: {}
|
|
307
307
|
}
|
|
308
|
-
}, n =
|
|
309
|
-
n.mount(e),
|
|
308
|
+
}, n = v(e) && !P(e) ? new A(t) : new C(t);
|
|
309
|
+
n.mount(e), F.set(e, n);
|
|
310
310
|
}
|
|
311
311
|
function Me(e) {
|
|
312
312
|
let t = new _e({
|
|
@@ -317,12 +317,12 @@ function Me(e) {
|
|
|
317
317
|
latestValues: {}
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
|
-
t.mount(e),
|
|
320
|
+
t.mount(e), F.set(e, t);
|
|
321
321
|
}
|
|
322
322
|
//#endregion
|
|
323
323
|
//#region ../../node_modules/.pnpm/framer-motion@12.42.2_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/framer-motion/dist/es/animation/animate/subject.mjs
|
|
324
324
|
function Ne(e, t) {
|
|
325
|
-
return
|
|
325
|
+
return a(e) || typeof e == "number" || typeof e == "string" && !G(t);
|
|
326
326
|
}
|
|
327
327
|
function Pe(e, t, n, r) {
|
|
328
328
|
let i = [];
|
|
@@ -330,12 +330,12 @@ function Pe(e, t, n, r) {
|
|
|
330
330
|
else {
|
|
331
331
|
if (e == null) return i;
|
|
332
332
|
let a = K(e, t, r), o = a.length;
|
|
333
|
-
|
|
333
|
+
g(!!o, "No valid elements provided.", "no-valid-elements");
|
|
334
334
|
for (let e = 0; e < o; e++) {
|
|
335
335
|
let r = a[e], s = r instanceof Element ? je : Me;
|
|
336
|
-
|
|
337
|
-
let c =
|
|
338
|
-
"delay" in l && typeof l.delay == "function" && (l.delay = l.delay(e, o)), i.push(...
|
|
336
|
+
F.has(r) || s(r);
|
|
337
|
+
let c = F.get(r), l = { ...n };
|
|
338
|
+
"delay" in l && typeof l.delay == "function" && (l.delay = l.delay(e, o)), i.push(...b(c, {
|
|
339
339
|
...t,
|
|
340
340
|
transition: l
|
|
341
341
|
}, {}));
|
|
@@ -349,7 +349,7 @@ function Fe(e, t, n) {
|
|
|
349
349
|
let r = [];
|
|
350
350
|
return we(e.map((e) => {
|
|
351
351
|
if (Array.isArray(e) && typeof e[0] == "function") {
|
|
352
|
-
let t = e[0], n =
|
|
352
|
+
let t = e[0], n = i(0);
|
|
353
353
|
return n.on("change", t), e.length === 1 ? [n, [0, 1]] : e.length === 2 ? [
|
|
354
354
|
n,
|
|
355
355
|
[0, 1],
|
|
@@ -361,7 +361,7 @@ function Fe(e, t, n) {
|
|
|
361
361
|
];
|
|
362
362
|
}
|
|
363
363
|
return e;
|
|
364
|
-
}), t, n, { spring:
|
|
364
|
+
}), t, n, { spring: re }).forEach(({ keyframes: e, transition: t }, n) => {
|
|
365
365
|
r.push(...Pe(n, e, t));
|
|
366
366
|
}), r;
|
|
367
367
|
}
|
|
@@ -371,10 +371,10 @@ function Ie(e) {
|
|
|
371
371
|
return Array.isArray(e) && e.some(Array.isArray);
|
|
372
372
|
}
|
|
373
373
|
function Le(e = {}) {
|
|
374
|
-
let { scope: t, reduceMotion: n, skipAnimations:
|
|
374
|
+
let { scope: t, reduceMotion: n, skipAnimations: i } = e;
|
|
375
375
|
function a(e, a, o) {
|
|
376
376
|
let s = [], c, l = {};
|
|
377
|
-
if (n !== void 0 && (l.reduceMotion = n),
|
|
377
|
+
if (n !== void 0 && (l.reduceMotion = n), i !== void 0 && (l.skipAnimations = i), Ie(e)) {
|
|
378
378
|
let { onComplete: n, ...r } = a || {};
|
|
379
379
|
typeof n == "function" && (c = n), s = Fe(e, {
|
|
380
380
|
...l,
|
|
@@ -389,7 +389,7 @@ function Le(e = {}) {
|
|
|
389
389
|
}
|
|
390
390
|
let u = new H(s);
|
|
391
391
|
return c && u.finished.then(c), t && (t.animations.push(u), u.finished.then(() => {
|
|
392
|
-
|
|
392
|
+
r(t.animations, u);
|
|
393
393
|
})), u;
|
|
394
394
|
}
|
|
395
395
|
return a;
|
|
@@ -398,7 +398,7 @@ var Re = Le(), ze = /*#__PURE__*/ W.createContext(void 0);
|
|
|
398
398
|
process.env.NODE_ENV !== "production" && (ze.displayName = "SwitchRootContext");
|
|
399
399
|
function Be() {
|
|
400
400
|
let e = W.useContext(ze);
|
|
401
|
-
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ?
|
|
401
|
+
if (e === void 0) throw Error(process.env.NODE_ENV === "production" ? D(63) : "Base UI: SwitchRootContext is missing. Switch parts must be placed within <Switch.Root>.");
|
|
402
402
|
return e;
|
|
403
403
|
}
|
|
404
404
|
//#endregion
|
|
@@ -410,44 +410,44 @@ var Ve = /*#__PURE__*/ function(e) {
|
|
|
410
410
|
checked(e) {
|
|
411
411
|
return e ? { [Ve.checked]: "" } : { [Ve.unchecked]: "" };
|
|
412
412
|
}
|
|
413
|
-
}, X =
|
|
414
|
-
let { checked: n, className: r, defaultChecked: i, "aria-labelledby": a, form: o, id: s, inputRef: c, name: l, nativeButton:
|
|
413
|
+
}, X = L(), Ue = /*#__PURE__*/ W.forwardRef(function(e, t) {
|
|
414
|
+
let { checked: n, className: r, defaultChecked: i, "aria-labelledby": a, form: o, id: s, inputRef: c, name: l, nativeButton: d = !1, onCheckedChange: p, readOnly: h = !1, required: g = !1, disabled: _ = !1, render: v, uncheckedValue: b, value: x, style: C, ...E } = e, { clearErrors: D } = me(), { state: k, setTouched: A, setDirty: te, validityData: re, setFilled: j, setFocused: M, validationMode: N, disabled: ae, name: oe, validation: P } = fe(), { labelId: F } = pe(), I = ae || _, L = oe ?? l, R = W.useRef(null), ge = ee(R, c, P.inputRef), z = W.useRef(null), B = f(), V = le({
|
|
415
415
|
id: s,
|
|
416
416
|
implicit: !1,
|
|
417
417
|
controlRef: z
|
|
418
|
-
}), H =
|
|
418
|
+
}), H = d ? void 0 : V, [U, _e] = ce({
|
|
419
419
|
controlled: n,
|
|
420
420
|
default: !!i,
|
|
421
421
|
name: "Switch",
|
|
422
422
|
state: "checked"
|
|
423
423
|
});
|
|
424
|
-
ue(z, B, U, void 0, !I, l),
|
|
425
|
-
R.current &&
|
|
426
|
-
}, [R,
|
|
427
|
-
D(L),
|
|
424
|
+
ue(z, B, U, void 0, !I, l), y(() => {
|
|
425
|
+
R.current && j(R.current.checked);
|
|
426
|
+
}, [R, j]), de(U, () => {
|
|
427
|
+
D(L), te(U !== re.initialValue), j(U), P.change(U);
|
|
428
428
|
});
|
|
429
|
-
let { getButtonProps: ve, buttonRef: G } =
|
|
429
|
+
let { getButtonProps: ve, buttonRef: G } = w({
|
|
430
430
|
disabled: I,
|
|
431
|
-
native:
|
|
432
|
-
}), K = he(a,
|
|
433
|
-
id:
|
|
431
|
+
native: d
|
|
432
|
+
}), K = he(a, F, R, !d, H), ye = {
|
|
433
|
+
id: d ? V : B,
|
|
434
434
|
role: "switch",
|
|
435
435
|
"aria-checked": U,
|
|
436
|
-
"aria-readonly":
|
|
436
|
+
"aria-readonly": h || void 0,
|
|
437
437
|
"aria-required": g || void 0,
|
|
438
438
|
"aria-labelledby": K,
|
|
439
439
|
onFocus() {
|
|
440
|
-
I ||
|
|
440
|
+
I || M(!0);
|
|
441
441
|
},
|
|
442
442
|
onBlur() {
|
|
443
443
|
let e = R.current;
|
|
444
|
-
!e || I || (A(!0),
|
|
444
|
+
!e || I || (A(!0), M(!1), N === "onBlur" && P.commit(e.checked));
|
|
445
445
|
},
|
|
446
446
|
onClick(e) {
|
|
447
|
-
if (
|
|
447
|
+
if (h || I) return;
|
|
448
448
|
e.preventDefault();
|
|
449
449
|
let t = R.current;
|
|
450
|
-
t && t.dispatchEvent(new (
|
|
450
|
+
t && t.dispatchEvent(new (m(t)).PointerEvent("click", {
|
|
451
451
|
bubbles: !0,
|
|
452
452
|
shiftKey: e.shiftKey,
|
|
453
453
|
ctrlKey: e.ctrlKey,
|
|
@@ -462,36 +462,36 @@ var Ve = /*#__PURE__*/ function(e) {
|
|
|
462
462
|
id: H,
|
|
463
463
|
name: L,
|
|
464
464
|
required: g,
|
|
465
|
-
style: L ?
|
|
465
|
+
style: L ? T : ne,
|
|
466
466
|
tabIndex: -1,
|
|
467
467
|
type: "checkbox",
|
|
468
468
|
"aria-hidden": !0,
|
|
469
469
|
ref: ge,
|
|
470
470
|
onChange(e) {
|
|
471
471
|
if (e.nativeEvent.defaultPrevented) return;
|
|
472
|
-
if (
|
|
472
|
+
if (h) {
|
|
473
473
|
e.preventDefault();
|
|
474
474
|
return;
|
|
475
475
|
}
|
|
476
|
-
let t = e.currentTarget.checked, n =
|
|
477
|
-
|
|
476
|
+
let t = e.currentTarget.checked, n = u(S, e.nativeEvent);
|
|
477
|
+
p?.(t, n), !n.isCanceled && _e(t);
|
|
478
478
|
},
|
|
479
479
|
onFocus() {
|
|
480
480
|
z.current?.focus();
|
|
481
481
|
}
|
|
482
|
-
}, (e) =>
|
|
483
|
-
...
|
|
482
|
+
}, (e) => P.getValidationProps(I, e), x === void 0 ? ie : { value: x }), J = W.useMemo(() => ({
|
|
483
|
+
...k,
|
|
484
484
|
checked: U,
|
|
485
485
|
disabled: I,
|
|
486
|
-
readOnly:
|
|
486
|
+
readOnly: h,
|
|
487
487
|
required: g
|
|
488
488
|
}), [
|
|
489
|
-
|
|
489
|
+
k,
|
|
490
490
|
U,
|
|
491
491
|
I,
|
|
492
|
-
|
|
492
|
+
h,
|
|
493
493
|
g
|
|
494
|
-
]), be =
|
|
494
|
+
]), be = O("span", e, {
|
|
495
495
|
state: J,
|
|
496
496
|
ref: [
|
|
497
497
|
t,
|
|
@@ -500,9 +500,9 @@ var Ve = /*#__PURE__*/ function(e) {
|
|
|
500
500
|
],
|
|
501
501
|
props: [
|
|
502
502
|
ye,
|
|
503
|
-
|
|
503
|
+
E,
|
|
504
504
|
ve,
|
|
505
|
-
(e) =>
|
|
505
|
+
(e) => P.getValidationProps(I, e)
|
|
506
506
|
],
|
|
507
507
|
stateAttributesMapping: He
|
|
508
508
|
});
|
|
@@ -510,11 +510,11 @@ var Ve = /*#__PURE__*/ function(e) {
|
|
|
510
510
|
value: J,
|
|
511
511
|
children: [
|
|
512
512
|
be,
|
|
513
|
-
!U && L &&
|
|
513
|
+
!U && L && b !== void 0 && /*#__PURE__*/ (0, X.jsx)("input", {
|
|
514
514
|
type: "hidden",
|
|
515
515
|
form: o,
|
|
516
516
|
name: L,
|
|
517
|
-
value:
|
|
517
|
+
value: b,
|
|
518
518
|
disabled: I
|
|
519
519
|
}),
|
|
520
520
|
/*#__PURE__*/ (0, X.jsx)("input", {
|
|
@@ -529,7 +529,7 @@ process.env.NODE_ENV !== "production" && (Ue.displayName = "SwitchRoot");
|
|
|
529
529
|
//#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/switch/thumb/SwitchThumb.mjs
|
|
530
530
|
var Z = /*#__PURE__*/ W.forwardRef(function(e, t) {
|
|
531
531
|
let { render: n, className: r, style: i, ...a } = e;
|
|
532
|
-
return
|
|
532
|
+
return O("span", e, {
|
|
533
533
|
state: Be(),
|
|
534
534
|
ref: t,
|
|
535
535
|
stateAttributesMapping: He,
|
|
@@ -544,20 +544,20 @@ function Je(e) {
|
|
|
544
544
|
return "label" in e && typeof e.label == "string";
|
|
545
545
|
}
|
|
546
546
|
var Ye = (0, W.forwardRef)(({ label: e, checked: t, onToggle: n, disabled: r = !1, thumbTransition: i, uncheckedTrackColor: a, uncheckedTrackColorHovered: o, className: s, ...c }, l) => {
|
|
547
|
-
let u = (0, W.useId)(), d = (0, W.useRef)(!1), [f, p] = (0, W.useState)(!1), [m, h] = (0, W.useState)(!1), g = (0, W.useRef)(!1),
|
|
547
|
+
let u = (0, W.useId)(), d = (0, W.useRef)(!1), [f, p] = (0, W.useState)(!1), [m, h] = (0, W.useState)(!1), g = (0, W.useRef)(!1), v = (0, W.useRef)(!1), y = (0, W.useRef)(null), b = ve(t ? 16 : $);
|
|
548
548
|
(0, W.useEffect)(() => {
|
|
549
549
|
d.current = !0;
|
|
550
550
|
}, []);
|
|
551
551
|
let x = m ? 20 : f ? 18 : Q, S = m ? Q - Ke : Q, C = m ? 4 : $, w = x - Q, T = t ? 16 - w : $;
|
|
552
552
|
(0, W.useEffect)(() => {
|
|
553
|
-
g.current || (d.current ? Re(b, T, i ??
|
|
553
|
+
g.current || (d.current ? Re(b, T, i ?? N.moderate) : b.set(T));
|
|
554
554
|
}, [
|
|
555
555
|
T,
|
|
556
556
|
b,
|
|
557
557
|
i
|
|
558
558
|
]);
|
|
559
559
|
let E = (0, W.useCallback)((e) => {
|
|
560
|
-
r || e.pointerType === "mouse" && e.button !== 0 || (h(!0), g.current = !1,
|
|
560
|
+
r || e.pointerType === "mouse" && e.button !== 0 || (h(!0), g.current = !1, v.current = !1, y.current = {
|
|
561
561
|
clientX: e.clientX,
|
|
562
562
|
originX: b.get()
|
|
563
563
|
}, e.currentTarget.setPointerCapture(e.pointerId));
|
|
@@ -571,8 +571,8 @@ var Ye = (0, W.forwardRef)(({ label: e, checked: t, onToggle: n, disabled: r = !
|
|
|
571
571
|
let n = $, r = We - $ - 20, i = y.current.originX + t;
|
|
572
572
|
b.set(Math.max(n, Math.min(r, i)));
|
|
573
573
|
}, [b]), O = (0, W.useCallback)((e) => {
|
|
574
|
-
y.current &&= (h(!1), g.current && (
|
|
575
|
-
|
|
574
|
+
y.current &&= (h(!1), g.current && (v.current = !0, g.current = !1, e && (b.get() > 14 / 2 === t ? Re(b, t ? 16 : $, i ?? N.moderate) : n()), requestAnimationFrame(() => {
|
|
575
|
+
v.current = !1;
|
|
576
576
|
})), null);
|
|
577
577
|
}, [
|
|
578
578
|
t,
|
|
@@ -582,7 +582,7 @@ var Ye = (0, W.forwardRef)(({ label: e, checked: t, onToggle: n, disabled: r = !
|
|
|
582
582
|
]);
|
|
583
583
|
return /* @__PURE__ */ (0, X.jsxs)("div", {
|
|
584
584
|
ref: l,
|
|
585
|
-
className:
|
|
585
|
+
className: _("relative z-10 flex items-center gap-2.5 px-3 py-2 cursor-pointer select-none touch-none", r && "opacity-50 pointer-events-none", s),
|
|
586
586
|
onPointerEnter: (e) => {
|
|
587
587
|
e.pointerType === "mouse" && p(!0);
|
|
588
588
|
},
|
|
@@ -591,21 +591,21 @@ var Ye = (0, W.forwardRef)(({ label: e, checked: t, onToggle: n, disabled: r = !
|
|
|
591
591
|
onPointerMove: D,
|
|
592
592
|
onPointerUp: () => O(!0),
|
|
593
593
|
onPointerCancel: () => {
|
|
594
|
-
y.current &&= (h(!1), g.current && (g.current = !1, Re(b, t ? 16 : $, i ??
|
|
594
|
+
y.current &&= (h(!1), g.current && (g.current = !1, Re(b, t ? 16 : $, i ?? N.moderate)), null);
|
|
595
595
|
},
|
|
596
596
|
onClick: () => {
|
|
597
|
-
r ||
|
|
597
|
+
r || v.current || n();
|
|
598
598
|
},
|
|
599
599
|
...c,
|
|
600
600
|
children: [/* @__PURE__ */ (0, X.jsx)(Ue, {
|
|
601
601
|
checked: t,
|
|
602
602
|
"aria-labelledby": u,
|
|
603
603
|
onCheckedChange: () => {
|
|
604
|
-
|
|
604
|
+
v.current || n();
|
|
605
605
|
},
|
|
606
606
|
disabled: r,
|
|
607
607
|
tabIndex: 0,
|
|
608
|
-
className:
|
|
608
|
+
className: _("relative shrink-0 rounded-full outline-none cursor-pointer", "transition-colors duration-80", "focus-visible:ring-1 focus-visible:ring-[color:var(--focus-ring,#6B97FF)] focus-visible:ring-offset-2 focus-visible:ring-offset-background"),
|
|
609
609
|
style: {
|
|
610
610
|
width: We,
|
|
611
611
|
height: Ge,
|
|
@@ -614,7 +614,7 @@ var Ye = (0, W.forwardRef)(({ label: e, checked: t, onToggle: n, disabled: r = !
|
|
|
614
614
|
onClick: (e) => e.stopPropagation(),
|
|
615
615
|
children: /* @__PURE__ */ (0, X.jsx)(Z, { render: (e) => {
|
|
616
616
|
let { style: t, onDrag: n, onDragStart: r, onDragEnd: a, onAnimationStart: o, onAnimationEnd: s, onAnimationIteration: c, ...l } = e;
|
|
617
|
-
return /* @__PURE__ */ (0, X.jsx)(
|
|
617
|
+
return /* @__PURE__ */ (0, X.jsx)(k.span, {
|
|
618
618
|
...l,
|
|
619
619
|
className: "absolute top-0 left-0 block rounded-full bg-white shadow-sm",
|
|
620
620
|
initial: !1,
|
|
@@ -627,12 +627,12 @@ var Ye = (0, W.forwardRef)(({ label: e, checked: t, onToggle: n, disabled: r = !
|
|
|
627
627
|
width: x,
|
|
628
628
|
height: S
|
|
629
629
|
},
|
|
630
|
-
transition: d.current ? i ??
|
|
630
|
+
transition: d.current ? i ?? N.moderate : { duration: 0 }
|
|
631
631
|
});
|
|
632
632
|
} })
|
|
633
633
|
}), /* @__PURE__ */ (0, X.jsx)("span", {
|
|
634
634
|
id: u,
|
|
635
|
-
className:
|
|
635
|
+
className: _("text-[13px] [text-box:trim-both_cap_alphabetic] transition-[color] duration-80", t ? "text-foreground" : "text-muted-foreground"),
|
|
636
636
|
children: e
|
|
637
637
|
})]
|
|
638
638
|
});
|
|
@@ -647,8 +647,8 @@ var Xe = (0, W.forwardRef)(({ checked: e, defaultChecked: t = !1, onCheckedChang
|
|
|
647
647
|
onCheckedChange: (t) => {
|
|
648
648
|
e === void 0 && s(t), n?.(t);
|
|
649
649
|
},
|
|
650
|
-
className:
|
|
651
|
-
children: /* @__PURE__ */ (0, X.jsx)(Z, { className:
|
|
650
|
+
className: _("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-colors duration-80", "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[color:var(--focus-ring,#6B97FF)]", "disabled:cursor-not-allowed disabled:opacity-50", "data-checked:bg-primary data-unchecked:bg-input", i),
|
|
651
|
+
children: /* @__PURE__ */ (0, X.jsx)(Z, { className: _("pointer-events-none block size-4 rounded-full bg-background shadow-sm ring-0 transition-transform duration-80", "data-checked:translate-x-4 data-unchecked:translate-x-0") })
|
|
652
652
|
});
|
|
653
653
|
});
|
|
654
654
|
Xe.displayName = "ShadcnSwitch";
|