@xyd-js/cli 0.1.0-xyd.18 → 0.1.0-xyd.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.
Files changed (80) hide show
  1. package/.cli/dist/index.d.ts +1 -0
  2. package/.cli/dist/index.js +12417 -0
  3. package/.cli/host/.react-router/types/app/+types/root.ts +40 -0
  4. package/.cli/host/app/root.tsx +23 -0
  5. package/.cli/host/app/routes.ts +5 -0
  6. package/.cli/host/node_modules/.vite/deps/@mdx-js_mdx.js +81 -0
  7. package/.cli/host/node_modules/.vite/deps/@mdx-js_mdx.js.map +7 -0
  8. package/.cli/host/node_modules/.vite/deps/@mdx-js_rollup.js +4003 -0
  9. package/.cli/host/node_modules/.vite/deps/@mdx-js_rollup.js.map +7 -0
  10. package/.cli/host/node_modules/.vite/deps/@radix-ui_react-icons.js +7531 -0
  11. package/.cli/host/node_modules/.vite/deps/@radix-ui_react-icons.js.map +7 -0
  12. package/.cli/host/node_modules/.vite/deps/@radix-ui_react-tabs.js +917 -0
  13. package/.cli/host/node_modules/.vite/deps/@radix-ui_react-tabs.js.map +7 -0
  14. package/.cli/host/node_modules/.vite/deps/_metadata.json +157 -0
  15. package/.cli/host/node_modules/.vite/deps/chunk-2TUXWMP5.js +46 -0
  16. package/.cli/host/node_modules/.vite/deps/chunk-2TUXWMP5.js.map +7 -0
  17. package/.cli/host/node_modules/.vite/deps/chunk-DNIFH2K7.js +3461 -0
  18. package/.cli/host/node_modules/.vite/deps/chunk-DNIFH2K7.js.map +7 -0
  19. package/.cli/host/node_modules/.vite/deps/chunk-ERHH4CDL.js +23875 -0
  20. package/.cli/host/node_modules/.vite/deps/chunk-ERHH4CDL.js.map +7 -0
  21. package/.cli/host/node_modules/.vite/deps/chunk-ETJV5QNK.js +27 -0
  22. package/.cli/host/node_modules/.vite/deps/chunk-ETJV5QNK.js.map +7 -0
  23. package/.cli/host/node_modules/.vite/deps/chunk-GPEJJ3KZ.js +1906 -0
  24. package/.cli/host/node_modules/.vite/deps/chunk-GPEJJ3KZ.js.map +7 -0
  25. package/.cli/host/node_modules/.vite/deps/chunk-IVP26VTC.js +21 -0
  26. package/.cli/host/node_modules/.vite/deps/chunk-IVP26VTC.js.map +7 -0
  27. package/.cli/host/node_modules/.vite/deps/chunk-MJUUSK53.js +894 -0
  28. package/.cli/host/node_modules/.vite/deps/chunk-MJUUSK53.js.map +7 -0
  29. package/.cli/host/node_modules/.vite/deps/chunk-NHN7DW4J.js +928 -0
  30. package/.cli/host/node_modules/.vite/deps/chunk-NHN7DW4J.js.map +7 -0
  31. package/.cli/host/node_modules/.vite/deps/chunk-OO6QDGMA.js +10609 -0
  32. package/.cli/host/node_modules/.vite/deps/chunk-OO6QDGMA.js.map +7 -0
  33. package/.cli/host/node_modules/.vite/deps/chunk-OUN4SSIE.js +205 -0
  34. package/.cli/host/node_modules/.vite/deps/chunk-OUN4SSIE.js.map +7 -0
  35. package/.cli/host/node_modules/.vite/deps/chunk-TKNG6GUJ.js +894 -0
  36. package/.cli/host/node_modules/.vite/deps/chunk-TKNG6GUJ.js.map +7 -0
  37. package/.cli/host/node_modules/.vite/deps/chunk-TM4FKLNO.js +21628 -0
  38. package/.cli/host/node_modules/.vite/deps/chunk-TM4FKLNO.js.map +7 -0
  39. package/.cli/host/node_modules/.vite/deps/chunk-V2IF7L2E.js +12 -0
  40. package/.cli/host/node_modules/.vite/deps/chunk-V2IF7L2E.js.map +7 -0
  41. package/.cli/host/node_modules/.vite/deps/gray-matter.js +3492 -0
  42. package/.cli/host/node_modules/.vite/deps/gray-matter.js.map +7 -0
  43. package/.cli/host/node_modules/.vite/deps/lucide-react.js +34742 -0
  44. package/.cli/host/node_modules/.vite/deps/lucide-react.js.map +7 -0
  45. package/.cli/host/node_modules/.vite/deps/package.json +3 -0
  46. package/.cli/host/node_modules/.vite/deps/react-dom.js +7 -0
  47. package/.cli/host/node_modules/.vite/deps/react-dom.js.map +7 -0
  48. package/.cli/host/node_modules/.vite/deps/react-dom_client.js +39 -0
  49. package/.cli/host/node_modules/.vite/deps/react-dom_client.js.map +7 -0
  50. package/.cli/host/node_modules/.vite/deps/react-router.js +243 -0
  51. package/.cli/host/node_modules/.vite/deps/react-router.js.map +7 -0
  52. package/.cli/host/node_modules/.vite/deps/react-router_dom.js +212 -0
  53. package/.cli/host/node_modules/.vite/deps/react-router_dom.js.map +7 -0
  54. package/.cli/host/node_modules/.vite/deps/react.js +6 -0
  55. package/.cli/host/node_modules/.vite/deps/react.js.map +7 -0
  56. package/.cli/host/node_modules/.vite/deps/react_jsx-dev-runtime.js +913 -0
  57. package/.cli/host/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +7 -0
  58. package/.cli/host/node_modules/.vite/deps/react_jsx-runtime.js +7 -0
  59. package/.cli/host/node_modules/.vite/deps/react_jsx-runtime.js.map +7 -0
  60. package/.cli/host/node_modules/.vite/deps/remark-frontmatter.js +428 -0
  61. package/.cli/host/node_modules/.vite/deps/remark-frontmatter.js.map +7 -0
  62. package/.cli/host/node_modules/.vite/deps/remark-gfm.js +3122 -0
  63. package/.cli/host/node_modules/.vite/deps/remark-gfm.js.map +7 -0
  64. package/.cli/host/node_modules/.vite/deps/remark-mdx-frontmatter.js +10482 -0
  65. package/.cli/host/node_modules/.vite/deps/remark-mdx-frontmatter.js.map +7 -0
  66. package/.cli/host/node_modules/.vite/deps/unist-util-visit.js +14 -0
  67. package/.cli/host/node_modules/.vite/deps/unist-util-visit.js.map +7 -0
  68. package/.cli/host/node_modules/.vite/deps/vfile.js +8 -0
  69. package/.cli/host/node_modules/.vite/deps/vfile.js.map +7 -0
  70. package/.cli/host/package.json +43 -0
  71. package/.cli/host/postcss.config.cjs +5 -0
  72. package/.cli/host/react-router.config.ts +8 -0
  73. package/.cli/host/tsconfig.json +22 -0
  74. package/.cli/host/vite.config.ts +9 -0
  75. package/.cli/plugins/xyd-plugin-zero/src/pages/api-reference.tsx +406 -0
  76. package/.cli/plugins/xyd-plugin-zero/src/pages/docs.tsx +166 -0
  77. package/.cli/plugins/xyd-plugin-zero/src/pages/root.tsx +37 -0
  78. package/bin.js +3 -0
  79. package/package.json +15 -13
  80. package/postinstall.js +0 -15
@@ -0,0 +1,917 @@
1
+ "use client";
2
+ import {
3
+ require_jsx_runtime
4
+ } from "./chunk-NHN7DW4J.js";
5
+ import {
6
+ require_react_dom
7
+ } from "./chunk-TM4FKLNO.js";
8
+ import {
9
+ require_react
10
+ } from "./chunk-GPEJJ3KZ.js";
11
+ import {
12
+ __toESM
13
+ } from "./chunk-2TUXWMP5.js";
14
+
15
+ // ../node_modules/.pnpm/@radix-ui+react-tabs@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18.3.18_qsyrobternj736o5ex7scdd3r4/node_modules/@radix-ui/react-tabs/dist/index.mjs
16
+ var React13 = __toESM(require_react(), 1);
17
+
18
+ // ../node_modules/.pnpm/@radix-ui+primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.mjs
19
+ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
20
+ return function handleEvent(event) {
21
+ originalEventHandler == null ? void 0 : originalEventHandler(event);
22
+ if (checkForDefaultPrevented === false || !event.defaultPrevented) {
23
+ return ourEventHandler == null ? void 0 : ourEventHandler(event);
24
+ }
25
+ };
26
+ }
27
+
28
+ // ../node_modules/.pnpm/@radix-ui+react-context@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs
29
+ var React = __toESM(require_react(), 1);
30
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
31
+ function createContextScope(scopeName, createContextScopeDeps = []) {
32
+ let defaultContexts = [];
33
+ function createContext3(rootComponentName, defaultContext) {
34
+ const BaseContext = React.createContext(defaultContext);
35
+ const index = defaultContexts.length;
36
+ defaultContexts = [...defaultContexts, defaultContext];
37
+ const Provider = (props) => {
38
+ var _a;
39
+ const { scope, children, ...context } = props;
40
+ const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
41
+ const value = React.useMemo(() => context, Object.values(context));
42
+ return (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
43
+ };
44
+ Provider.displayName = rootComponentName + "Provider";
45
+ function useContext22(consumerName, scope) {
46
+ var _a;
47
+ const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
48
+ const context = React.useContext(Context);
49
+ if (context) return context;
50
+ if (defaultContext !== void 0) return defaultContext;
51
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
52
+ }
53
+ return [Provider, useContext22];
54
+ }
55
+ const createScope = () => {
56
+ const scopeContexts = defaultContexts.map((defaultContext) => {
57
+ return React.createContext(defaultContext);
58
+ });
59
+ return function useScope(scope) {
60
+ const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
61
+ return React.useMemo(
62
+ () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
63
+ [scope, contexts]
64
+ );
65
+ };
66
+ };
67
+ createScope.scopeName = scopeName;
68
+ return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
69
+ }
70
+ function composeContextScopes(...scopes) {
71
+ const baseScope = scopes[0];
72
+ if (scopes.length === 1) return baseScope;
73
+ const createScope = () => {
74
+ const scopeHooks = scopes.map((createScope2) => ({
75
+ useScope: createScope2(),
76
+ scopeName: createScope2.scopeName
77
+ }));
78
+ return function useComposedScopes(overrideScopes) {
79
+ const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
80
+ const scopeProps = useScope(overrideScopes);
81
+ const currentScope = scopeProps[`__scope${scopeName}`];
82
+ return { ...nextScopes2, ...currentScope };
83
+ }, {});
84
+ return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
85
+ };
86
+ };
87
+ createScope.scopeName = baseScope.scopeName;
88
+ return createScope;
89
+ }
90
+
91
+ // ../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react_bkbd3syfptkiebtjifbhjosaba/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
92
+ var React11 = __toESM(require_react(), 1);
93
+
94
+ // ../node_modules/.pnpm/@radix-ui+react-collection@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@1_du3umibpgknzrmwryvhzp3lgou/node_modules/@radix-ui/react-collection/dist/index.mjs
95
+ var import_react = __toESM(require_react(), 1);
96
+
97
+ // ../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
98
+ var React2 = __toESM(require_react(), 1);
99
+ function setRef(ref, value) {
100
+ if (typeof ref === "function") {
101
+ return ref(value);
102
+ } else if (ref !== null && ref !== void 0) {
103
+ ref.current = value;
104
+ }
105
+ }
106
+ function composeRefs(...refs) {
107
+ return (node) => {
108
+ let hasCleanup = false;
109
+ const cleanups = refs.map((ref) => {
110
+ const cleanup = setRef(ref, node);
111
+ if (!hasCleanup && typeof cleanup == "function") {
112
+ hasCleanup = true;
113
+ }
114
+ return cleanup;
115
+ });
116
+ if (hasCleanup) {
117
+ return () => {
118
+ for (let i = 0; i < cleanups.length; i++) {
119
+ const cleanup = cleanups[i];
120
+ if (typeof cleanup == "function") {
121
+ cleanup();
122
+ } else {
123
+ setRef(refs[i], null);
124
+ }
125
+ }
126
+ };
127
+ }
128
+ };
129
+ }
130
+ function useComposedRefs(...refs) {
131
+ return React2.useCallback(composeRefs(...refs), refs);
132
+ }
133
+
134
+ // ../node_modules/.pnpm/@radix-ui+react-slot@1.1.1_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
135
+ var React3 = __toESM(require_react(), 1);
136
+ var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
137
+ var Slot = React3.forwardRef((props, forwardedRef) => {
138
+ const { children, ...slotProps } = props;
139
+ const childrenArray = React3.Children.toArray(children);
140
+ const slottable = childrenArray.find(isSlottable);
141
+ if (slottable) {
142
+ const newElement = slottable.props.children;
143
+ const newChildren = childrenArray.map((child) => {
144
+ if (child === slottable) {
145
+ if (React3.Children.count(newElement) > 1) return React3.Children.only(null);
146
+ return React3.isValidElement(newElement) ? newElement.props.children : null;
147
+ } else {
148
+ return child;
149
+ }
150
+ });
151
+ return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
152
+ }
153
+ return (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
154
+ });
155
+ Slot.displayName = "Slot";
156
+ var SlotClone = React3.forwardRef((props, forwardedRef) => {
157
+ const { children, ...slotProps } = props;
158
+ if (React3.isValidElement(children)) {
159
+ const childrenRef = getElementRef(children);
160
+ return React3.cloneElement(children, {
161
+ ...mergeProps(slotProps, children.props),
162
+ // @ts-ignore
163
+ ref: forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef
164
+ });
165
+ }
166
+ return React3.Children.count(children) > 1 ? React3.Children.only(null) : null;
167
+ });
168
+ SlotClone.displayName = "SlotClone";
169
+ var Slottable = ({ children }) => {
170
+ return (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children });
171
+ };
172
+ function isSlottable(child) {
173
+ return React3.isValidElement(child) && child.type === Slottable;
174
+ }
175
+ function mergeProps(slotProps, childProps) {
176
+ const overrideProps = { ...childProps };
177
+ for (const propName in childProps) {
178
+ const slotPropValue = slotProps[propName];
179
+ const childPropValue = childProps[propName];
180
+ const isHandler = /^on[A-Z]/.test(propName);
181
+ if (isHandler) {
182
+ if (slotPropValue && childPropValue) {
183
+ overrideProps[propName] = (...args) => {
184
+ childPropValue(...args);
185
+ slotPropValue(...args);
186
+ };
187
+ } else if (slotPropValue) {
188
+ overrideProps[propName] = slotPropValue;
189
+ }
190
+ } else if (propName === "style") {
191
+ overrideProps[propName] = { ...slotPropValue, ...childPropValue };
192
+ } else if (propName === "className") {
193
+ overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
194
+ }
195
+ }
196
+ return { ...slotProps, ...overrideProps };
197
+ }
198
+ function getElementRef(element) {
199
+ var _a, _b;
200
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
201
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
202
+ if (mayWarn) {
203
+ return element.ref;
204
+ }
205
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
206
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
207
+ if (mayWarn) {
208
+ return element.props.ref;
209
+ }
210
+ return element.props.ref || element.ref;
211
+ }
212
+
213
+ // ../node_modules/.pnpm/@radix-ui+react-collection@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@1_du3umibpgknzrmwryvhzp3lgou/node_modules/@radix-ui/react-collection/dist/index.mjs
214
+ var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
215
+ function createCollection(name) {
216
+ const PROVIDER_NAME = name + "CollectionProvider";
217
+ const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
218
+ const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
219
+ PROVIDER_NAME,
220
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
221
+ );
222
+ const CollectionProvider = (props) => {
223
+ const { scope, children } = props;
224
+ const ref = import_react.default.useRef(null);
225
+ const itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
226
+ return (0, import_jsx_runtime3.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
227
+ };
228
+ CollectionProvider.displayName = PROVIDER_NAME;
229
+ const COLLECTION_SLOT_NAME = name + "CollectionSlot";
230
+ const CollectionSlot = import_react.default.forwardRef(
231
+ (props, forwardedRef) => {
232
+ const { scope, children } = props;
233
+ const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
234
+ const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
235
+ return (0, import_jsx_runtime3.jsx)(Slot, { ref: composedRefs, children });
236
+ }
237
+ );
238
+ CollectionSlot.displayName = COLLECTION_SLOT_NAME;
239
+ const ITEM_SLOT_NAME = name + "CollectionItemSlot";
240
+ const ITEM_DATA_ATTR = "data-radix-collection-item";
241
+ const CollectionItemSlot = import_react.default.forwardRef(
242
+ (props, forwardedRef) => {
243
+ const { scope, children, ...itemData } = props;
244
+ const ref = import_react.default.useRef(null);
245
+ const composedRefs = useComposedRefs(forwardedRef, ref);
246
+ const context = useCollectionContext(ITEM_SLOT_NAME, scope);
247
+ import_react.default.useEffect(() => {
248
+ context.itemMap.set(ref, { ref, ...itemData });
249
+ return () => void context.itemMap.delete(ref);
250
+ });
251
+ return (0, import_jsx_runtime3.jsx)(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
252
+ }
253
+ );
254
+ CollectionItemSlot.displayName = ITEM_SLOT_NAME;
255
+ function useCollection2(scope) {
256
+ const context = useCollectionContext(name + "CollectionConsumer", scope);
257
+ const getItems = import_react.default.useCallback(() => {
258
+ const collectionNode = context.collectionRef.current;
259
+ if (!collectionNode) return [];
260
+ const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
261
+ const items = Array.from(context.itemMap.values());
262
+ const orderedItems = items.sort(
263
+ (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
264
+ );
265
+ return orderedItems;
266
+ }, [context.collectionRef, context.itemMap]);
267
+ return getItems;
268
+ }
269
+ return [
270
+ { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
271
+ useCollection2,
272
+ createCollectionScope2
273
+ ];
274
+ }
275
+
276
+ // ../node_modules/.pnpm/@radix-ui+react-id@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
277
+ var React6 = __toESM(require_react(), 1);
278
+
279
+ // ../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
280
+ var React5 = __toESM(require_react(), 1);
281
+ var useLayoutEffect2 = Boolean(globalThis == null ? void 0 : globalThis.document) ? React5.useLayoutEffect : () => {
282
+ };
283
+
284
+ // ../node_modules/.pnpm/@radix-ui+react-id@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
285
+ var useReactId = React6["useId".toString()] || (() => void 0);
286
+ var count = 0;
287
+ function useId(deterministicId) {
288
+ const [id, setId] = React6.useState(useReactId());
289
+ useLayoutEffect2(() => {
290
+ if (!deterministicId) setId((reactId) => reactId ?? String(count++));
291
+ }, [deterministicId]);
292
+ return deterministicId || (id ? `radix-${id}` : "");
293
+ }
294
+
295
+ // ../node_modules/.pnpm/@radix-ui+react-primitive@2.0.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18_sspjpiczol7qxzbuuyfihuep4u/node_modules/@radix-ui/react-primitive/dist/index.mjs
296
+ var React7 = __toESM(require_react(), 1);
297
+ var ReactDOM = __toESM(require_react_dom(), 1);
298
+ var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
299
+ var NODES = [
300
+ "a",
301
+ "button",
302
+ "div",
303
+ "form",
304
+ "h2",
305
+ "h3",
306
+ "img",
307
+ "input",
308
+ "label",
309
+ "li",
310
+ "nav",
311
+ "ol",
312
+ "p",
313
+ "span",
314
+ "svg",
315
+ "ul"
316
+ ];
317
+ var Primitive = NODES.reduce((primitive, node) => {
318
+ const Node = React7.forwardRef((props, forwardedRef) => {
319
+ const { asChild, ...primitiveProps } = props;
320
+ const Comp = asChild ? Slot : node;
321
+ if (typeof window !== "undefined") {
322
+ window[Symbol.for("radix-ui")] = true;
323
+ }
324
+ return (0, import_jsx_runtime4.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
325
+ });
326
+ Node.displayName = `Primitive.${node}`;
327
+ return { ...primitive, [node]: Node };
328
+ }, {});
329
+
330
+ // ../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
331
+ var React8 = __toESM(require_react(), 1);
332
+ function useCallbackRef(callback) {
333
+ const callbackRef = React8.useRef(callback);
334
+ React8.useEffect(() => {
335
+ callbackRef.current = callback;
336
+ });
337
+ return React8.useMemo(() => (...args) => {
338
+ var _a;
339
+ return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
340
+ }, []);
341
+ }
342
+
343
+ // ../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
344
+ var React9 = __toESM(require_react(), 1);
345
+ function useControllableState({
346
+ prop,
347
+ defaultProp,
348
+ onChange = () => {
349
+ }
350
+ }) {
351
+ const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
352
+ const isControlled = prop !== void 0;
353
+ const value = isControlled ? prop : uncontrolledProp;
354
+ const handleChange = useCallbackRef(onChange);
355
+ const setValue = React9.useCallback(
356
+ (nextValue) => {
357
+ if (isControlled) {
358
+ const setter = nextValue;
359
+ const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
360
+ if (value2 !== prop) handleChange(value2);
361
+ } else {
362
+ setUncontrolledProp(nextValue);
363
+ }
364
+ },
365
+ [isControlled, prop, setUncontrolledProp, handleChange]
366
+ );
367
+ return [value, setValue];
368
+ }
369
+ function useUncontrolledState({
370
+ defaultProp,
371
+ onChange
372
+ }) {
373
+ const uncontrolledState = React9.useState(defaultProp);
374
+ const [value] = uncontrolledState;
375
+ const prevValueRef = React9.useRef(value);
376
+ const handleChange = useCallbackRef(onChange);
377
+ React9.useEffect(() => {
378
+ if (prevValueRef.current !== value) {
379
+ handleChange(value);
380
+ prevValueRef.current = value;
381
+ }
382
+ }, [value, prevValueRef, handleChange]);
383
+ return uncontrolledState;
384
+ }
385
+
386
+ // ../node_modules/.pnpm/@radix-ui+react-direction@1.1.0_@types+react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-direction/dist/index.mjs
387
+ var React10 = __toESM(require_react(), 1);
388
+ var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
389
+ var DirectionContext = React10.createContext(void 0);
390
+ function useDirection(localDir) {
391
+ const globalDir = React10.useContext(DirectionContext);
392
+ return localDir || globalDir || "ltr";
393
+ }
394
+
395
+ // ../node_modules/.pnpm/@radix-ui+react-roving-focus@1.1.1_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react_bkbd3syfptkiebtjifbhjosaba/node_modules/@radix-ui/react-roving-focus/dist/index.mjs
396
+ var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
397
+ var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
398
+ var EVENT_OPTIONS = { bubbles: false, cancelable: true };
399
+ var GROUP_NAME = "RovingFocusGroup";
400
+ var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
401
+ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
402
+ GROUP_NAME,
403
+ [createCollectionScope]
404
+ );
405
+ var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
406
+ var RovingFocusGroup = React11.forwardRef(
407
+ (props, forwardedRef) => {
408
+ return (0, import_jsx_runtime6.jsx)(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: (0, import_jsx_runtime6.jsx)(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: (0, import_jsx_runtime6.jsx)(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
409
+ }
410
+ );
411
+ RovingFocusGroup.displayName = GROUP_NAME;
412
+ var RovingFocusGroupImpl = React11.forwardRef((props, forwardedRef) => {
413
+ const {
414
+ __scopeRovingFocusGroup,
415
+ orientation,
416
+ loop = false,
417
+ dir,
418
+ currentTabStopId: currentTabStopIdProp,
419
+ defaultCurrentTabStopId,
420
+ onCurrentTabStopIdChange,
421
+ onEntryFocus,
422
+ preventScrollOnEntryFocus = false,
423
+ ...groupProps
424
+ } = props;
425
+ const ref = React11.useRef(null);
426
+ const composedRefs = useComposedRefs(forwardedRef, ref);
427
+ const direction = useDirection(dir);
428
+ const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
429
+ prop: currentTabStopIdProp,
430
+ defaultProp: defaultCurrentTabStopId,
431
+ onChange: onCurrentTabStopIdChange
432
+ });
433
+ const [isTabbingBackOut, setIsTabbingBackOut] = React11.useState(false);
434
+ const handleEntryFocus = useCallbackRef(onEntryFocus);
435
+ const getItems = useCollection(__scopeRovingFocusGroup);
436
+ const isClickFocusRef = React11.useRef(false);
437
+ const [focusableItemsCount, setFocusableItemsCount] = React11.useState(0);
438
+ React11.useEffect(() => {
439
+ const node = ref.current;
440
+ if (node) {
441
+ node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
442
+ return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
443
+ }
444
+ }, [handleEntryFocus]);
445
+ return (0, import_jsx_runtime6.jsx)(
446
+ RovingFocusProvider,
447
+ {
448
+ scope: __scopeRovingFocusGroup,
449
+ orientation,
450
+ dir: direction,
451
+ loop,
452
+ currentTabStopId,
453
+ onItemFocus: React11.useCallback(
454
+ (tabStopId) => setCurrentTabStopId(tabStopId),
455
+ [setCurrentTabStopId]
456
+ ),
457
+ onItemShiftTab: React11.useCallback(() => setIsTabbingBackOut(true), []),
458
+ onFocusableItemAdd: React11.useCallback(
459
+ () => setFocusableItemsCount((prevCount) => prevCount + 1),
460
+ []
461
+ ),
462
+ onFocusableItemRemove: React11.useCallback(
463
+ () => setFocusableItemsCount((prevCount) => prevCount - 1),
464
+ []
465
+ ),
466
+ children: (0, import_jsx_runtime6.jsx)(
467
+ Primitive.div,
468
+ {
469
+ tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
470
+ "data-orientation": orientation,
471
+ ...groupProps,
472
+ ref: composedRefs,
473
+ style: { outline: "none", ...props.style },
474
+ onMouseDown: composeEventHandlers(props.onMouseDown, () => {
475
+ isClickFocusRef.current = true;
476
+ }),
477
+ onFocus: composeEventHandlers(props.onFocus, (event) => {
478
+ const isKeyboardFocus = !isClickFocusRef.current;
479
+ if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
480
+ const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
481
+ event.currentTarget.dispatchEvent(entryFocusEvent);
482
+ if (!entryFocusEvent.defaultPrevented) {
483
+ const items = getItems().filter((item) => item.focusable);
484
+ const activeItem = items.find((item) => item.active);
485
+ const currentItem = items.find((item) => item.id === currentTabStopId);
486
+ const candidateItems = [activeItem, currentItem, ...items].filter(
487
+ Boolean
488
+ );
489
+ const candidateNodes = candidateItems.map((item) => item.ref.current);
490
+ focusFirst(candidateNodes, preventScrollOnEntryFocus);
491
+ }
492
+ }
493
+ isClickFocusRef.current = false;
494
+ }),
495
+ onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
496
+ }
497
+ )
498
+ }
499
+ );
500
+ });
501
+ var ITEM_NAME = "RovingFocusGroupItem";
502
+ var RovingFocusGroupItem = React11.forwardRef(
503
+ (props, forwardedRef) => {
504
+ const {
505
+ __scopeRovingFocusGroup,
506
+ focusable = true,
507
+ active = false,
508
+ tabStopId,
509
+ ...itemProps
510
+ } = props;
511
+ const autoId = useId();
512
+ const id = tabStopId || autoId;
513
+ const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);
514
+ const isCurrentTabStop = context.currentTabStopId === id;
515
+ const getItems = useCollection(__scopeRovingFocusGroup);
516
+ const { onFocusableItemAdd, onFocusableItemRemove } = context;
517
+ React11.useEffect(() => {
518
+ if (focusable) {
519
+ onFocusableItemAdd();
520
+ return () => onFocusableItemRemove();
521
+ }
522
+ }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
523
+ return (0, import_jsx_runtime6.jsx)(
524
+ Collection.ItemSlot,
525
+ {
526
+ scope: __scopeRovingFocusGroup,
527
+ id,
528
+ focusable,
529
+ active,
530
+ children: (0, import_jsx_runtime6.jsx)(
531
+ Primitive.span,
532
+ {
533
+ tabIndex: isCurrentTabStop ? 0 : -1,
534
+ "data-orientation": context.orientation,
535
+ ...itemProps,
536
+ ref: forwardedRef,
537
+ onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
538
+ if (!focusable) event.preventDefault();
539
+ else context.onItemFocus(id);
540
+ }),
541
+ onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
542
+ onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
543
+ if (event.key === "Tab" && event.shiftKey) {
544
+ context.onItemShiftTab();
545
+ return;
546
+ }
547
+ if (event.target !== event.currentTarget) return;
548
+ const focusIntent = getFocusIntent(event, context.orientation, context.dir);
549
+ if (focusIntent !== void 0) {
550
+ if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
551
+ event.preventDefault();
552
+ const items = getItems().filter((item) => item.focusable);
553
+ let candidateNodes = items.map((item) => item.ref.current);
554
+ if (focusIntent === "last") candidateNodes.reverse();
555
+ else if (focusIntent === "prev" || focusIntent === "next") {
556
+ if (focusIntent === "prev") candidateNodes.reverse();
557
+ const currentIndex = candidateNodes.indexOf(event.currentTarget);
558
+ candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
559
+ }
560
+ setTimeout(() => focusFirst(candidateNodes));
561
+ }
562
+ })
563
+ }
564
+ )
565
+ }
566
+ );
567
+ }
568
+ );
569
+ RovingFocusGroupItem.displayName = ITEM_NAME;
570
+ var MAP_KEY_TO_FOCUS_INTENT = {
571
+ ArrowLeft: "prev",
572
+ ArrowUp: "prev",
573
+ ArrowRight: "next",
574
+ ArrowDown: "next",
575
+ PageUp: "first",
576
+ Home: "first",
577
+ PageDown: "last",
578
+ End: "last"
579
+ };
580
+ function getDirectionAwareKey(key, dir) {
581
+ if (dir !== "rtl") return key;
582
+ return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
583
+ }
584
+ function getFocusIntent(event, orientation, dir) {
585
+ const key = getDirectionAwareKey(event.key, dir);
586
+ if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
587
+ if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
588
+ return MAP_KEY_TO_FOCUS_INTENT[key];
589
+ }
590
+ function focusFirst(candidates, preventScroll = false) {
591
+ const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
592
+ for (const candidate of candidates) {
593
+ if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
594
+ candidate.focus({ preventScroll });
595
+ if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
596
+ }
597
+ }
598
+ function wrapArray(array, startIndex) {
599
+ return array.map((_, index) => array[(startIndex + index) % array.length]);
600
+ }
601
+ var Root = RovingFocusGroup;
602
+ var Item = RovingFocusGroupItem;
603
+
604
+ // ../node_modules/.pnpm/@radix-ui+react-presence@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18._pqwkltkxenlrsgmgun6icjiigu/node_modules/@radix-ui/react-presence/dist/index.mjs
605
+ var React22 = __toESM(require_react(), 1);
606
+ var React12 = __toESM(require_react(), 1);
607
+ function useStateMachine(initialState, machine) {
608
+ return React12.useReducer((state, event) => {
609
+ const nextState = machine[state][event];
610
+ return nextState ?? state;
611
+ }, initialState);
612
+ }
613
+ var Presence = (props) => {
614
+ const { present, children } = props;
615
+ const presence = usePresence(present);
616
+ const child = typeof children === "function" ? children({ present: presence.isPresent }) : React22.Children.only(children);
617
+ const ref = useComposedRefs(presence.ref, getElementRef2(child));
618
+ const forceMount = typeof children === "function";
619
+ return forceMount || presence.isPresent ? React22.cloneElement(child, { ref }) : null;
620
+ };
621
+ Presence.displayName = "Presence";
622
+ function usePresence(present) {
623
+ const [node, setNode] = React22.useState();
624
+ const stylesRef = React22.useRef({});
625
+ const prevPresentRef = React22.useRef(present);
626
+ const prevAnimationNameRef = React22.useRef("none");
627
+ const initialState = present ? "mounted" : "unmounted";
628
+ const [state, send] = useStateMachine(initialState, {
629
+ mounted: {
630
+ UNMOUNT: "unmounted",
631
+ ANIMATION_OUT: "unmountSuspended"
632
+ },
633
+ unmountSuspended: {
634
+ MOUNT: "mounted",
635
+ ANIMATION_END: "unmounted"
636
+ },
637
+ unmounted: {
638
+ MOUNT: "mounted"
639
+ }
640
+ });
641
+ React22.useEffect(() => {
642
+ const currentAnimationName = getAnimationName(stylesRef.current);
643
+ prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
644
+ }, [state]);
645
+ useLayoutEffect2(() => {
646
+ const styles = stylesRef.current;
647
+ const wasPresent = prevPresentRef.current;
648
+ const hasPresentChanged = wasPresent !== present;
649
+ if (hasPresentChanged) {
650
+ const prevAnimationName = prevAnimationNameRef.current;
651
+ const currentAnimationName = getAnimationName(styles);
652
+ if (present) {
653
+ send("MOUNT");
654
+ } else if (currentAnimationName === "none" || (styles == null ? void 0 : styles.display) === "none") {
655
+ send("UNMOUNT");
656
+ } else {
657
+ const isAnimating = prevAnimationName !== currentAnimationName;
658
+ if (wasPresent && isAnimating) {
659
+ send("ANIMATION_OUT");
660
+ } else {
661
+ send("UNMOUNT");
662
+ }
663
+ }
664
+ prevPresentRef.current = present;
665
+ }
666
+ }, [present, send]);
667
+ useLayoutEffect2(() => {
668
+ if (node) {
669
+ let timeoutId;
670
+ const ownerWindow = node.ownerDocument.defaultView ?? window;
671
+ const handleAnimationEnd = (event) => {
672
+ const currentAnimationName = getAnimationName(stylesRef.current);
673
+ const isCurrentAnimation = currentAnimationName.includes(event.animationName);
674
+ if (event.target === node && isCurrentAnimation) {
675
+ send("ANIMATION_END");
676
+ if (!prevPresentRef.current) {
677
+ const currentFillMode = node.style.animationFillMode;
678
+ node.style.animationFillMode = "forwards";
679
+ timeoutId = ownerWindow.setTimeout(() => {
680
+ if (node.style.animationFillMode === "forwards") {
681
+ node.style.animationFillMode = currentFillMode;
682
+ }
683
+ });
684
+ }
685
+ }
686
+ };
687
+ const handleAnimationStart = (event) => {
688
+ if (event.target === node) {
689
+ prevAnimationNameRef.current = getAnimationName(stylesRef.current);
690
+ }
691
+ };
692
+ node.addEventListener("animationstart", handleAnimationStart);
693
+ node.addEventListener("animationcancel", handleAnimationEnd);
694
+ node.addEventListener("animationend", handleAnimationEnd);
695
+ return () => {
696
+ ownerWindow.clearTimeout(timeoutId);
697
+ node.removeEventListener("animationstart", handleAnimationStart);
698
+ node.removeEventListener("animationcancel", handleAnimationEnd);
699
+ node.removeEventListener("animationend", handleAnimationEnd);
700
+ };
701
+ } else {
702
+ send("ANIMATION_END");
703
+ }
704
+ }, [node, send]);
705
+ return {
706
+ isPresent: ["mounted", "unmountSuspended"].includes(state),
707
+ ref: React22.useCallback((node2) => {
708
+ if (node2) stylesRef.current = getComputedStyle(node2);
709
+ setNode(node2);
710
+ }, [])
711
+ };
712
+ }
713
+ function getAnimationName(styles) {
714
+ return (styles == null ? void 0 : styles.animationName) || "none";
715
+ }
716
+ function getElementRef2(element) {
717
+ var _a, _b;
718
+ let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
719
+ let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
720
+ if (mayWarn) {
721
+ return element.ref;
722
+ }
723
+ getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
724
+ mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
725
+ if (mayWarn) {
726
+ return element.props.ref;
727
+ }
728
+ return element.props.ref || element.ref;
729
+ }
730
+
731
+ // ../node_modules/.pnpm/@radix-ui+react-tabs@1.1.2_@types+react-dom@18.3.5_@types+react@18.3.18__@types+react@18.3.18_qsyrobternj736o5ex7scdd3r4/node_modules/@radix-ui/react-tabs/dist/index.mjs
732
+ var import_jsx_runtime7 = __toESM(require_jsx_runtime(), 1);
733
+ var TABS_NAME = "Tabs";
734
+ var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
735
+ createRovingFocusGroupScope
736
+ ]);
737
+ var useRovingFocusGroupScope = createRovingFocusGroupScope();
738
+ var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
739
+ var Tabs = React13.forwardRef(
740
+ (props, forwardedRef) => {
741
+ const {
742
+ __scopeTabs,
743
+ value: valueProp,
744
+ onValueChange,
745
+ defaultValue,
746
+ orientation = "horizontal",
747
+ dir,
748
+ activationMode = "automatic",
749
+ ...tabsProps
750
+ } = props;
751
+ const direction = useDirection(dir);
752
+ const [value, setValue] = useControllableState({
753
+ prop: valueProp,
754
+ onChange: onValueChange,
755
+ defaultProp: defaultValue
756
+ });
757
+ return (0, import_jsx_runtime7.jsx)(
758
+ TabsProvider,
759
+ {
760
+ scope: __scopeTabs,
761
+ baseId: useId(),
762
+ value,
763
+ onValueChange: setValue,
764
+ orientation,
765
+ dir: direction,
766
+ activationMode,
767
+ children: (0, import_jsx_runtime7.jsx)(
768
+ Primitive.div,
769
+ {
770
+ dir: direction,
771
+ "data-orientation": orientation,
772
+ ...tabsProps,
773
+ ref: forwardedRef
774
+ }
775
+ )
776
+ }
777
+ );
778
+ }
779
+ );
780
+ Tabs.displayName = TABS_NAME;
781
+ var TAB_LIST_NAME = "TabsList";
782
+ var TabsList = React13.forwardRef(
783
+ (props, forwardedRef) => {
784
+ const { __scopeTabs, loop = true, ...listProps } = props;
785
+ const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
786
+ const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
787
+ return (0, import_jsx_runtime7.jsx)(
788
+ Root,
789
+ {
790
+ asChild: true,
791
+ ...rovingFocusGroupScope,
792
+ orientation: context.orientation,
793
+ dir: context.dir,
794
+ loop,
795
+ children: (0, import_jsx_runtime7.jsx)(
796
+ Primitive.div,
797
+ {
798
+ role: "tablist",
799
+ "aria-orientation": context.orientation,
800
+ ...listProps,
801
+ ref: forwardedRef
802
+ }
803
+ )
804
+ }
805
+ );
806
+ }
807
+ );
808
+ TabsList.displayName = TAB_LIST_NAME;
809
+ var TRIGGER_NAME = "TabsTrigger";
810
+ var TabsTrigger = React13.forwardRef(
811
+ (props, forwardedRef) => {
812
+ const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
813
+ const context = useTabsContext(TRIGGER_NAME, __scopeTabs);
814
+ const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
815
+ const triggerId = makeTriggerId(context.baseId, value);
816
+ const contentId = makeContentId(context.baseId, value);
817
+ const isSelected = value === context.value;
818
+ return (0, import_jsx_runtime7.jsx)(
819
+ Item,
820
+ {
821
+ asChild: true,
822
+ ...rovingFocusGroupScope,
823
+ focusable: !disabled,
824
+ active: isSelected,
825
+ children: (0, import_jsx_runtime7.jsx)(
826
+ Primitive.button,
827
+ {
828
+ type: "button",
829
+ role: "tab",
830
+ "aria-selected": isSelected,
831
+ "aria-controls": contentId,
832
+ "data-state": isSelected ? "active" : "inactive",
833
+ "data-disabled": disabled ? "" : void 0,
834
+ disabled,
835
+ id: triggerId,
836
+ ...triggerProps,
837
+ ref: forwardedRef,
838
+ onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
839
+ if (!disabled && event.button === 0 && event.ctrlKey === false) {
840
+ context.onValueChange(value);
841
+ } else {
842
+ event.preventDefault();
843
+ }
844
+ }),
845
+ onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
846
+ if ([" ", "Enter"].includes(event.key)) context.onValueChange(value);
847
+ }),
848
+ onFocus: composeEventHandlers(props.onFocus, () => {
849
+ const isAutomaticActivation = context.activationMode !== "manual";
850
+ if (!isSelected && !disabled && isAutomaticActivation) {
851
+ context.onValueChange(value);
852
+ }
853
+ })
854
+ }
855
+ )
856
+ }
857
+ );
858
+ }
859
+ );
860
+ TabsTrigger.displayName = TRIGGER_NAME;
861
+ var CONTENT_NAME = "TabsContent";
862
+ var TabsContent = React13.forwardRef(
863
+ (props, forwardedRef) => {
864
+ const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
865
+ const context = useTabsContext(CONTENT_NAME, __scopeTabs);
866
+ const triggerId = makeTriggerId(context.baseId, value);
867
+ const contentId = makeContentId(context.baseId, value);
868
+ const isSelected = value === context.value;
869
+ const isMountAnimationPreventedRef = React13.useRef(isSelected);
870
+ React13.useEffect(() => {
871
+ const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
872
+ return () => cancelAnimationFrame(rAF);
873
+ }, []);
874
+ return (0, import_jsx_runtime7.jsx)(Presence, { present: forceMount || isSelected, children: ({ present }) => (0, import_jsx_runtime7.jsx)(
875
+ Primitive.div,
876
+ {
877
+ "data-state": isSelected ? "active" : "inactive",
878
+ "data-orientation": context.orientation,
879
+ role: "tabpanel",
880
+ "aria-labelledby": triggerId,
881
+ hidden: !present,
882
+ id: contentId,
883
+ tabIndex: 0,
884
+ ...contentProps,
885
+ ref: forwardedRef,
886
+ style: {
887
+ ...props.style,
888
+ animationDuration: isMountAnimationPreventedRef.current ? "0s" : void 0
889
+ },
890
+ children: present && children
891
+ }
892
+ ) });
893
+ }
894
+ );
895
+ TabsContent.displayName = CONTENT_NAME;
896
+ function makeTriggerId(baseId, value) {
897
+ return `${baseId}-trigger-${value}`;
898
+ }
899
+ function makeContentId(baseId, value) {
900
+ return `${baseId}-content-${value}`;
901
+ }
902
+ var Root2 = Tabs;
903
+ var List = TabsList;
904
+ var Trigger = TabsTrigger;
905
+ var Content = TabsContent;
906
+ export {
907
+ Content,
908
+ List,
909
+ Root2 as Root,
910
+ Tabs,
911
+ TabsContent,
912
+ TabsList,
913
+ TabsTrigger,
914
+ Trigger,
915
+ createTabsScope
916
+ };
917
+ //# sourceMappingURL=@radix-ui_react-tabs.js.map