sunpeak 0.2.5 → 0.3.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 (78) hide show
  1. package/README.md +32 -17
  2. package/dist/chatgpt/chatgpt-simulator-types.d.ts +8 -0
  3. package/dist/chatgpt/chatgpt-simulator.d.ts +11 -0
  4. package/dist/chatgpt/conversation.d.ts +11 -0
  5. package/dist/chatgpt/index.d.ts +3 -0
  6. package/dist/chatgpt/mcp-provider.d.ts +25 -0
  7. package/dist/chatgpt/mock-openai.d.ts +61 -0
  8. package/dist/chatgpt/openai-provider.d.ts +19 -0
  9. package/dist/chatgpt/openai-types.d.ts +81 -0
  10. package/dist/chatgpt/simple-sidebar.d.ts +22 -0
  11. package/dist/chatgpt/theme-provider.d.ts +13 -0
  12. package/dist/hooks/index.d.ts +14 -0
  13. package/dist/hooks/use-display-mode.d.ts +2 -0
  14. package/dist/hooks/use-locale.d.ts +1 -0
  15. package/dist/hooks/use-max-height.d.ts +1 -0
  16. package/dist/hooks/use-mobile.d.ts +1 -0
  17. package/dist/hooks/use-safe-area.d.ts +2 -0
  18. package/dist/hooks/use-theme.d.ts +2 -0
  19. package/dist/hooks/use-tool-input.d.ts +2 -0
  20. package/dist/hooks/use-tool-response-metadata.d.ts +2 -0
  21. package/dist/hooks/use-user-agent.d.ts +2 -0
  22. package/dist/hooks/use-view.d.ts +2 -0
  23. package/dist/hooks/use-widget-api.d.ts +8 -0
  24. package/dist/hooks/use-widget-global.d.ts +9 -0
  25. package/dist/hooks/use-widget-props.d.ts +1 -0
  26. package/dist/hooks/use-widget-state.d.ts +4 -0
  27. package/dist/index.cjs +3310 -666
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.ts +5 -366
  30. package/dist/index.js +3325 -640
  31. package/dist/index.js.map +1 -1
  32. package/dist/lib/index.d.ts +2 -0
  33. package/dist/lib/media-queries.d.ts +3 -0
  34. package/dist/lib/utils.d.ts +2 -0
  35. package/dist/mcp/index.cjs +799 -64
  36. package/dist/mcp/index.cjs.map +1 -1
  37. package/dist/mcp/index.d.ts +1 -12
  38. package/dist/mcp/index.js +786 -44
  39. package/dist/mcp/index.js.map +1 -1
  40. package/dist/mcp/server.d.ts +10 -0
  41. package/dist/mcp/types.d.ts +74 -0
  42. package/dist/providers/index.d.ts +40 -0
  43. package/dist/providers/types.d.ts +71 -0
  44. package/dist/style.css +5014 -0
  45. package/dist/test/setup.d.ts +0 -0
  46. package/dist/types/index.d.ts +2 -0
  47. package/package.json +11 -19
  48. package/template/README.md +3 -6
  49. package/template/dev/main.tsx +0 -1
  50. package/template/mcp/server.ts +1 -1
  51. package/template/package.json +4 -14
  52. package/template/src/App.tsx +7 -8
  53. package/template/src/components/index.ts +2 -2
  54. package/template/src/components/openai-card.test.tsx +73 -0
  55. package/template/src/components/openai-card.tsx +126 -0
  56. package/template/src/components/openai-carousel.test.tsx +84 -0
  57. package/template/src/components/openai-carousel.tsx +178 -0
  58. package/template/src/styles/globals.css +5 -216
  59. package/template/vite.config.build.ts +61 -0
  60. package/dist/index.d.cts +0 -366
  61. package/dist/mcp/index.d.cts +0 -12
  62. package/dist/styles/chatgpt/index.css +0 -146
  63. package/dist/styles/globals.css +0 -219
  64. package/template/components.json +0 -21
  65. package/template/dev/styles.css +0 -6
  66. package/template/postcss.config.js +0 -5
  67. package/template/src/components/shadcn/button.tsx +0 -60
  68. package/template/src/components/shadcn/card.tsx +0 -76
  69. package/template/src/components/shadcn/carousel.tsx +0 -260
  70. package/template/src/components/shadcn/index.ts +0 -5
  71. package/template/src/components/shadcn/label.tsx +0 -24
  72. package/template/src/components/shadcn/select.tsx +0 -157
  73. package/template/src/components/sunpeak-card.test.tsx +0 -76
  74. package/template/src/components/sunpeak-card.tsx +0 -171
  75. package/template/src/components/sunpeak-carousel.test.tsx +0 -42
  76. package/template/src/components/sunpeak-carousel.tsx +0 -160
  77. package/template/src/styles/chatgpt.css +0 -146
  78. package/template/tsup.config.ts +0 -50
package/dist/index.js CHANGED
@@ -1,61 +1,20 @@
1
- import * as React3 from 'react';
2
- import { useSyncExternalStore, useMemo, useState, useEffect, useCallback, useLayoutEffect } from 'react';
3
- import { jsxs, jsx } from 'react/jsx-runtime';
4
- import { Slot } from '@radix-ui/react-slot';
5
- import { cva } from 'class-variance-authority';
6
- import { ChevronDown, ChevronUp, Check, XIcon } from 'lucide-react';
7
- import { clsx } from 'clsx';
8
- import { twMerge } from 'tailwind-merge';
9
- import * as SheetPrimitive from '@radix-ui/react-dialog';
10
- import * as TooltipPrimitive from '@radix-ui/react-tooltip';
11
- import * as SelectPrimitive from '@radix-ui/react-select';
12
- import * as LabelPrimitive from '@radix-ui/react-label';
13
-
14
1
  var __defProp = Object.defineProperty;
15
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
16
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
17
- var ThemeProviderContext = React3.createContext(
18
- void 0
19
- );
20
- function ThemeProvider({
21
- children,
22
- defaultTheme = "light",
23
- theme: controlledTheme,
24
- ...props
25
- }) {
26
- const [internalTheme] = React3.useState(defaultTheme);
27
- const theme = controlledTheme ?? internalTheme;
28
- React3.useEffect(() => {
29
- const root = window.document.documentElement;
30
- root.classList.remove("light", "dark");
31
- root.classList.add(theme);
32
- }, [theme]);
33
- const value = {
34
- theme
35
- };
36
- return /* @__PURE__ */ jsx(ThemeProviderContext.Provider, { ...props, value, children });
37
- }
38
- var useThemeContext = () => {
39
- const context = React3.useContext(ThemeProviderContext);
40
- if (context === void 0)
41
- throw new Error("useThemeContext must be used within a ThemeProvider");
42
- return context;
43
- };
44
-
45
- // src/types/openai.ts
46
- var SET_GLOBALS_EVENT_TYPE = "openai:set_globals";
47
- var SetGlobalsEvent = class extends CustomEvent {
4
+ import * as React from "react";
5
+ import { useSyncExternalStore, useMemo, useState, useEffect, useCallback, useRef, useLayoutEffect } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ const SET_GLOBALS_EVENT_TYPE = "openai:set_globals";
8
+ class SetGlobalsEvent extends CustomEvent {
48
9
  constructor() {
49
10
  super(...arguments);
50
11
  __publicField(this, "type", SET_GLOBALS_EVENT_TYPE);
51
12
  }
52
- };
53
-
54
- // src/providers/openai.ts
13
+ }
55
14
  function isOpenAiAvailable() {
56
15
  return typeof window !== "undefined" && window.openai != null;
57
16
  }
58
- var OpenAiProvider = class {
17
+ class OpenAiProvider {
59
18
  constructor() {
60
19
  __publicField(this, "id", "openai");
61
20
  }
@@ -83,32 +42,31 @@ var OpenAiProvider = class {
83
42
  };
84
43
  }
85
44
  getAPI() {
45
+ var _a, _b, _c, _d, _e, _f, _g;
86
46
  if (typeof window === "undefined" || !window.openai) {
87
47
  return null;
88
48
  }
89
49
  const api = window.openai;
90
50
  return {
91
- callTool: api.callTool?.bind(api),
92
- sendFollowUpMessage: api.sendFollowUpMessage?.bind(api),
93
- openExternal: api.openExternal?.bind(api),
94
- requestDisplayMode: api.requestDisplayMode?.bind(api),
95
- requestModal: api.requestModal?.bind(api),
96
- notifyIntrinsicHeight: api.notifyIntrinsicHeight?.bind(api),
97
- setWidgetState: api.setWidgetState?.bind(api)
51
+ callTool: (_a = api.callTool) == null ? void 0 : _a.bind(api),
52
+ sendFollowUpMessage: (_b = api.sendFollowUpMessage) == null ? void 0 : _b.bind(api),
53
+ openExternal: (_c = api.openExternal) == null ? void 0 : _c.bind(api),
54
+ requestDisplayMode: (_d = api.requestDisplayMode) == null ? void 0 : _d.bind(api),
55
+ requestModal: (_e = api.requestModal) == null ? void 0 : _e.bind(api),
56
+ notifyIntrinsicHeight: (_f = api.notifyIntrinsicHeight) == null ? void 0 : _f.bind(api),
57
+ setWidgetState: (_g = api.setWidgetState) == null ? void 0 : _g.bind(api)
98
58
  };
99
59
  }
100
- };
101
- var openAiProvider = null;
60
+ }
61
+ let openAiProvider = null;
102
62
  function getOpenAiProvider() {
103
63
  if (!openAiProvider) {
104
64
  openAiProvider = new OpenAiProvider();
105
65
  }
106
66
  return openAiProvider;
107
67
  }
108
-
109
- // src/providers/index.ts
110
- var cachedProvider = null;
111
- var detectionComplete = false;
68
+ let cachedProvider = null;
69
+ let detectionComplete = false;
112
70
  function getProvider() {
113
71
  if (detectionComplete) {
114
72
  return cachedProvider;
@@ -124,23 +82,21 @@ function isProviderAvailable() {
124
82
  }
125
83
  function getGlobal(key) {
126
84
  const provider = getProvider();
127
- return provider?.getGlobal(key) ?? null;
85
+ return (provider == null ? void 0 : provider.getGlobal(key)) ?? null;
128
86
  }
129
87
  function subscribeToGlobal(key, onChange) {
130
88
  const provider = getProvider();
131
- return provider?.subscribe(key, onChange) ?? (() => {
89
+ return (provider == null ? void 0 : provider.subscribe(key, onChange)) ?? (() => {
132
90
  });
133
91
  }
134
92
  function getAPI() {
135
93
  const provider = getProvider();
136
- return provider?.getAPI() ?? null;
94
+ return (provider == null ? void 0 : provider.getAPI()) ?? null;
137
95
  }
138
96
  function resetProviderCache() {
139
97
  cachedProvider = null;
140
98
  detectionComplete = false;
141
99
  }
142
-
143
- // src/hooks/use-widget-global.ts
144
100
  function useWidgetGlobal(key) {
145
101
  return useSyncExternalStore(
146
102
  (onChange) => subscribeToGlobal(key, onChange),
@@ -151,25 +107,19 @@ function useWidgetGlobal(key) {
151
107
  function useWidgetAPI() {
152
108
  return useMemo(() => getAPI(), []);
153
109
  }
154
-
155
- // src/hooks/use-display-mode.ts
156
- var useDisplayMode = () => {
110
+ const useDisplayMode = () => {
157
111
  return useWidgetGlobal("displayMode");
158
112
  };
159
-
160
- // src/hooks/use-locale.ts
161
- var useLocale = () => {
113
+ const useLocale = () => {
162
114
  return useWidgetGlobal("locale");
163
115
  };
164
-
165
- // src/hooks/use-max-height.ts
166
- var useMaxHeight = () => {
116
+ const useMaxHeight = () => {
167
117
  return useWidgetGlobal("maxHeight");
168
118
  };
169
- var MOBILE_BREAKPOINT = 768;
119
+ const MOBILE_BREAKPOINT = 768;
170
120
  function useIsMobile() {
171
- const [isMobile, setIsMobile] = React3.useState(void 0);
172
- React3.useEffect(() => {
121
+ const [isMobile, setIsMobile] = React.useState(void 0);
122
+ React.useEffect(() => {
173
123
  const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
174
124
  const onChange = () => {
175
125
  setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
@@ -180,38 +130,24 @@ function useIsMobile() {
180
130
  }, []);
181
131
  return !!isMobile;
182
132
  }
183
-
184
- // src/hooks/use-safe-area.ts
185
- var useSafeArea = () => {
133
+ const useSafeArea = () => {
186
134
  return useWidgetGlobal("safeArea");
187
135
  };
188
-
189
- // src/hooks/use-theme.ts
190
- var useTheme = () => {
136
+ const useTheme = () => {
191
137
  return useWidgetGlobal("theme");
192
138
  };
193
-
194
- // src/hooks/use-tool-input.ts
195
139
  function useToolInput() {
196
140
  return useWidgetGlobal("toolInput");
197
141
  }
198
-
199
- // src/hooks/use-tool-response-metadata.ts
200
142
  function useToolResponseMetadata() {
201
143
  return useWidgetGlobal("toolResponseMetadata");
202
144
  }
203
-
204
- // src/hooks/use-user-agent.ts
205
- var useUserAgent = () => {
145
+ const useUserAgent = () => {
206
146
  return useWidgetGlobal("userAgent");
207
147
  };
208
-
209
- // src/hooks/use-view.ts
210
148
  function useView() {
211
149
  return useWidgetGlobal("view");
212
150
  }
213
-
214
- // src/hooks/use-widget-props.ts
215
151
  function useWidgetProps(defaultState) {
216
152
  const props = useWidgetGlobal("toolOutput");
217
153
  const fallback = typeof defaultState === "function" ? defaultState() : defaultState ?? null;
@@ -233,7 +169,7 @@ function useWidgetState(defaultState) {
233
169
  (state) => {
234
170
  _setWidgetState((prevState) => {
235
171
  const newState = typeof state === "function" ? state(prevState) : state;
236
- if (newState != null && api?.setWidgetState) {
172
+ if (newState != null && (api == null ? void 0 : api.setWidgetState)) {
237
173
  api.setWidgetState(newState);
238
174
  }
239
175
  return newState;
@@ -243,517 +179,3196 @@ function useWidgetState(defaultState) {
243
179
  );
244
180
  return [widgetState, setWidgetState];
245
181
  }
246
- function cn(...inputs) {
247
- return twMerge(clsx(inputs));
248
- }
249
-
250
- // src/lib/media-queries.ts
251
- function matchMediaQuery(query) {
252
- return window.matchMedia(query).matches;
253
- }
254
- function createMediaQueryFn(query) {
255
- return () => matchMediaQuery(query);
256
- }
257
- var prefersReducedMotion = createMediaQueryFn(
258
- "(prefers-reduced-motion: reduce)"
259
- );
260
- var isPrimarilyTouchDevice = createMediaQueryFn("(pointer: coarse)");
261
- var isHoverAvailable = createMediaQueryFn("(hover: hover)");
262
- function Sheet({ ...props }) {
263
- return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
182
+ const ChevronDown = (props) => jsx("svg", { width: "1em", height: "1em", viewBox: "0 0 24 24", fill: "currentColor", ...props, children: jsx("path", { fillRule: "evenodd", d: "M4.293 8.293a1 1 0 0 1 1.414 0L12 14.586l6.293-6.293a1 1 0 1 1 1.414 1.414l-7 7a1 1 0 0 1-1.414 0l-7-7a1 1 0 0 1 0-1.414Z", clipRule: "evenodd" }) });
183
+ function SimpleSidebar({ children, controls }) {
184
+ return /* @__PURE__ */ jsxs("div", { className: "flex min-h-screen w-full", children: [
185
+ /* @__PURE__ */ jsx("aside", { className: "hidden md:flex w-64 flex-col border-r border-subtle bg-background", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ jsx("div", { className: "space-y-6", children: /* @__PURE__ */ jsxs("div", { children: [
186
+ /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold mb-4", children: "Controls" }),
187
+ controls
188
+ ] }) }) }) }),
189
+ /* @__PURE__ */ jsx("main", { className: "flex-1 overflow-auto", children })
190
+ ] });
264
191
  }
265
- function SheetPortal({
266
- ...props
267
- }) {
268
- return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
192
+ function SidebarControl({ label, children }) {
193
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
194
+ /* @__PURE__ */ jsx("label", { className: "text-xs font-medium text-secondary", children: label }),
195
+ children
196
+ ] });
269
197
  }
270
- function SheetOverlay({
271
- className,
272
- ...props
273
- }) {
274
- return /* @__PURE__ */ jsx(
275
- SheetPrimitive.Overlay,
276
- {
277
- "data-slot": "sheet-overlay",
278
- className: cn(
279
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
280
- className
281
- ),
282
- ...props
198
+ function SidebarSelect({ value, onChange, options, placeholder }) {
199
+ const [isOpen, setIsOpen] = useState(false);
200
+ const [highlightedIndex, setHighlightedIndex] = useState(-1);
201
+ const containerRef = useRef(null);
202
+ const listRef = useRef(null);
203
+ const selectedOption = options.find((opt) => opt.value === value);
204
+ useEffect(() => {
205
+ const handleClickOutside = (event) => {
206
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
207
+ setIsOpen(false);
208
+ }
209
+ };
210
+ const handleKeyDown = (event) => {
211
+ if (!isOpen) return;
212
+ switch (event.key) {
213
+ case "Escape":
214
+ setIsOpen(false);
215
+ break;
216
+ case "ArrowDown":
217
+ event.preventDefault();
218
+ setHighlightedIndex(
219
+ (prev) => prev < options.length - 1 ? prev + 1 : 0
220
+ );
221
+ break;
222
+ case "ArrowUp":
223
+ event.preventDefault();
224
+ setHighlightedIndex(
225
+ (prev) => prev > 0 ? prev - 1 : options.length - 1
226
+ );
227
+ break;
228
+ case "Enter":
229
+ event.preventDefault();
230
+ if (highlightedIndex >= 0 && highlightedIndex < options.length) {
231
+ onChange(options[highlightedIndex].value);
232
+ setIsOpen(false);
233
+ }
234
+ break;
235
+ }
236
+ };
237
+ document.addEventListener("mousedown", handleClickOutside);
238
+ document.addEventListener("keydown", handleKeyDown);
239
+ return () => {
240
+ document.removeEventListener("mousedown", handleClickOutside);
241
+ document.removeEventListener("keydown", handleKeyDown);
242
+ };
243
+ }, [isOpen, highlightedIndex, options, onChange]);
244
+ const handleToggle = () => {
245
+ if (!isOpen) {
246
+ const selectedIndex = options.findIndex((opt) => opt.value === value);
247
+ setHighlightedIndex(selectedIndex >= 0 ? selectedIndex : 0);
283
248
  }
284
- );
285
- }
286
- function SheetContent({
287
- className,
288
- children,
289
- side = "right",
290
- ...props
291
- }) {
292
- return /* @__PURE__ */ jsxs(SheetPortal, { children: [
293
- /* @__PURE__ */ jsx(SheetOverlay, {}),
249
+ setIsOpen(!isOpen);
250
+ };
251
+ return /* @__PURE__ */ jsxs("div", { ref: containerRef, className: "relative", children: [
294
252
  /* @__PURE__ */ jsxs(
295
- SheetPrimitive.Content,
253
+ "button",
296
254
  {
297
- "data-slot": "sheet-content",
298
- className: cn(
299
- "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
300
- side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
301
- side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
302
- side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
303
- side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
304
- className
305
- ),
306
- ...props,
255
+ type: "button",
256
+ onClick: handleToggle,
257
+ className: `
258
+ relative inline-flex items-center justify-between w-full
259
+ h-[var(--control-size-sm)] px-[var(--control-gutter-sm)]
260
+ rounded-[var(--control-radius-sm)]
261
+ text-[var(--control-font-size-md)] font-normal leading-[var(--font-text-md-line-height)]
262
+ text-left cursor-pointer select-none whitespace-nowrap
263
+ transition-[color] duration-[var(--transition-duration-basic)] ease-[var(--transition-ease-basic)]
264
+ before:absolute before:inset-0 before:block before:rounded-[inherit]
265
+ before:bg-transparent before:transition-[opacity,background-color,transform,box-shadow,border-color]
266
+ before:duration-[var(--transition-duration-basic)] before:ease-[var(--transition-ease-basic)]
267
+ before:shadow-[0_0_0_1px_var(--input-outline-border-color)_inset]
268
+ hover:before:shadow-[0_0_0_1px_var(--input-outline-border-color-hover)_inset]
269
+ focus:outline-none focus-visible:after:outline focus-visible:after:outline-2
270
+ focus-visible:after:outline-[var(--color-ring)] focus-visible:after:outline-offset-[-1px]
271
+ after:absolute after:inset-0 after:block after:rounded-[inherit] after:pointer-events-none
272
+ after:transition-[transform] after:duration-[var(--transition-duration-basic)] after:ease-[var(--transition-ease-basic)]
273
+ ${isOpen ? "before:shadow-[0_0_0_1px_var(--input-outline-border-color-hover)_inset]" : ""}
274
+ ${!selectedOption ? "text-[var(--input-placeholder-text-color)]" : ""}
275
+ `,
276
+ "aria-expanded": isOpen,
277
+ "aria-haspopup": "listbox",
307
278
  children: [
308
- children,
309
- /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
310
- /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
311
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
312
- ] })
279
+ /* @__PURE__ */ jsx("span", { className: "relative flex-1 overflow-hidden text-ellipsis whitespace-nowrap", children: (selectedOption == null ? void 0 : selectedOption.label) || placeholder || "Select..." }),
280
+ /* @__PURE__ */ jsx("span", { className: "relative flex items-center gap-[var(--spacing)]", children: /* @__PURE__ */ jsx(
281
+ ChevronDown,
282
+ {
283
+ className: `
284
+ relative text-secondary opacity-75
285
+ transition-opacity duration-[var(--transition-duration-basic)] ease-[var(--transition-ease-basic)]
286
+ ${isOpen ? "opacity-100" : ""}
287
+ `
288
+ }
289
+ ) })
313
290
  ]
314
291
  }
292
+ ),
293
+ isOpen && /* @__PURE__ */ jsx(
294
+ "div",
295
+ {
296
+ ref: listRef,
297
+ className: `
298
+ absolute z-50 mt-1 w-full min-w-[200px]
299
+ rounded-[var(--menu-radius)] bg-[var(--color-surface-elevated)]
300
+ shadow-[var(--shadow)] [box-shadow:var(--shadow),var(--shadow-hairline)]
301
+ text-[var(--menu-font-size)] leading-[var(--menu-line-height)]
302
+ select-none origin-top
303
+ animate-in fade-in-0 zoom-in-95 duration-200
304
+ `,
305
+ role: "listbox",
306
+ children: /* @__PURE__ */ jsx("div", { className: "flex flex-col max-h-[min(400px,calc(100vh-200px))] focus:outline-none", children: /* @__PURE__ */ jsx("div", { className: "overflow-auto flex-1 p-[var(--menu-gutter)]", children: options.map((option, index) => /* @__PURE__ */ jsx(
307
+ "div",
308
+ {
309
+ role: "option",
310
+ "aria-selected": option.value === value,
311
+ onClick: () => {
312
+ onChange(option.value);
313
+ setIsOpen(false);
314
+ },
315
+ onMouseEnter: () => setHighlightedIndex(index),
316
+ className: `
317
+ relative px-[var(--menu-item-padding-x,12px)] py-[var(--menu-item-padding-y,8px)]
318
+ cursor-pointer break-words scroll-m-[15px]
319
+ before:absolute before:inset-0 before:block
320
+ before:rounded-[calc(var(--menu-radius)-var(--menu-gutter))]
321
+ before:bg-[var(--menu-item-background-color)]
322
+ before:opacity-0 before:scale-[0.98]
323
+ before:transition-[opacity,background-color,transform]
324
+ before:duration-[var(--transition-duration-basic)]
325
+ before:ease-[var(--cubic-enter)]
326
+ ${option.value === value ? "font-semibold" : ""}
327
+ ${highlightedIndex === index ? "before:opacity-100 before:scale-100" : ""}
328
+ `,
329
+ children: /* @__PURE__ */ jsx("span", { className: "relative flex items-center gap-[var(--spacing)]", children: option.label })
330
+ },
331
+ option.value
332
+ )) }) })
333
+ }
315
334
  )
316
335
  ] });
317
336
  }
318
- function SheetHeader({ className, ...props }) {
319
- return /* @__PURE__ */ jsx(
320
- "div",
321
- {
322
- "data-slot": "sheet-header",
323
- className: cn("flex flex-col gap-1.5 p-4", className),
324
- ...props
325
- }
326
- );
337
+ function r(e) {
338
+ var t, f, n = "";
339
+ if ("string" == typeof e || "number" == typeof e) n += e;
340
+ else if ("object" == typeof e) if (Array.isArray(e)) {
341
+ var o = e.length;
342
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
343
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
344
+ return n;
327
345
  }
328
- function SheetTitle({
329
- className,
330
- ...props
331
- }) {
332
- return /* @__PURE__ */ jsx(
333
- SheetPrimitive.Title,
334
- {
335
- "data-slot": "sheet-title",
336
- className: cn("text-foreground font-semibold", className),
337
- ...props
338
- }
339
- );
346
+ function clsx() {
347
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
348
+ return n;
340
349
  }
341
- function SheetDescription({
342
- className,
343
- ...props
344
- }) {
345
- return /* @__PURE__ */ jsx(
346
- SheetPrimitive.Description,
347
- {
348
- "data-slot": "sheet-description",
349
- className: cn("text-muted-foreground text-sm", className),
350
- ...props
350
+ const concatArrays = (array1, array2) => {
351
+ const combinedArray = new Array(array1.length + array2.length);
352
+ for (let i = 0; i < array1.length; i++) {
353
+ combinedArray[i] = array1[i];
354
+ }
355
+ for (let i = 0; i < array2.length; i++) {
356
+ combinedArray[array1.length + i] = array2[i];
357
+ }
358
+ return combinedArray;
359
+ };
360
+ const createClassValidatorObject = (classGroupId, validator) => ({
361
+ classGroupId,
362
+ validator
363
+ });
364
+ const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
365
+ nextPart,
366
+ validators,
367
+ classGroupId
368
+ });
369
+ const CLASS_PART_SEPARATOR = "-";
370
+ const EMPTY_CONFLICTS = [];
371
+ const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
372
+ const createClassGroupUtils = (config) => {
373
+ const classMap = createClassMap(config);
374
+ const {
375
+ conflictingClassGroups,
376
+ conflictingClassGroupModifiers
377
+ } = config;
378
+ const getClassGroupId = (className) => {
379
+ if (className.startsWith("[") && className.endsWith("]")) {
380
+ return getGroupIdForArbitraryProperty(className);
351
381
  }
352
- );
353
- }
354
- function TooltipProvider({
355
- delayDuration = 0,
356
- ...props
357
- }) {
358
- return /* @__PURE__ */ jsx(
359
- TooltipPrimitive.Provider,
360
- {
361
- "data-slot": "tooltip-provider",
362
- delayDuration,
363
- ...props
382
+ const classParts = className.split(CLASS_PART_SEPARATOR);
383
+ const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
384
+ return getGroupRecursive(classParts, startIndex, classMap);
385
+ };
386
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
387
+ if (hasPostfixModifier) {
388
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
389
+ const baseConflicts = conflictingClassGroups[classGroupId];
390
+ if (modifierConflicts) {
391
+ if (baseConflicts) {
392
+ return concatArrays(baseConflicts, modifierConflicts);
393
+ }
394
+ return modifierConflicts;
395
+ }
396
+ return baseConflicts || EMPTY_CONFLICTS;
364
397
  }
365
- );
366
- }
367
- var SIDEBAR_COOKIE_NAME = "sidebar_state";
368
- var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
369
- var SIDEBAR_WIDTH = "16rem";
370
- var SIDEBAR_WIDTH_MOBILE = "18rem";
371
- var SIDEBAR_WIDTH_ICON = "3rem";
372
- var SIDEBAR_KEYBOARD_SHORTCUT = "b";
373
- var SidebarContext = React3.createContext(null);
374
- function useSidebar() {
375
- const context = React3.useContext(SidebarContext);
376
- if (!context) {
377
- throw new Error("useSidebar must be used within a SidebarProvider.");
398
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
399
+ };
400
+ return {
401
+ getClassGroupId,
402
+ getConflictingClassGroupIds
403
+ };
404
+ };
405
+ const getGroupRecursive = (classParts, startIndex, classPartObject) => {
406
+ const classPathsLength = classParts.length - startIndex;
407
+ if (classPathsLength === 0) {
408
+ return classPartObject.classGroupId;
378
409
  }
379
- return context;
380
- }
381
- function SidebarProvider({
382
- defaultOpen = true,
383
- open: openProp,
384
- onOpenChange: setOpenProp,
385
- className,
386
- style,
387
- children,
388
- ...props
389
- }) {
390
- const isMobile = useIsMobile();
391
- const [openMobile, setOpenMobile] = React3.useState(false);
392
- const [_open, _setOpen] = React3.useState(defaultOpen);
393
- const open = openProp ?? _open;
394
- const setOpen = React3.useCallback(
395
- (value) => {
396
- const openState = typeof value === "function" ? value(open) : value;
397
- if (setOpenProp) {
398
- setOpenProp(openState);
399
- } else {
400
- _setOpen(openState);
410
+ const currentClassPart = classParts[startIndex];
411
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
412
+ if (nextClassPartObject) {
413
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
414
+ if (result) return result;
415
+ }
416
+ const validators = classPartObject.validators;
417
+ if (validators === null) {
418
+ return void 0;
419
+ }
420
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
421
+ const validatorsLength = validators.length;
422
+ for (let i = 0; i < validatorsLength; i++) {
423
+ const validatorObj = validators[i];
424
+ if (validatorObj.validator(classRest)) {
425
+ return validatorObj.classGroupId;
426
+ }
427
+ }
428
+ return void 0;
429
+ };
430
+ const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
431
+ const content = className.slice(1, -1);
432
+ const colonIndex = content.indexOf(":");
433
+ const property = content.slice(0, colonIndex);
434
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
435
+ })();
436
+ const createClassMap = (config) => {
437
+ const {
438
+ theme,
439
+ classGroups
440
+ } = config;
441
+ return processClassGroups(classGroups, theme);
442
+ };
443
+ const processClassGroups = (classGroups, theme) => {
444
+ const classMap = createClassPartObject();
445
+ for (const classGroupId in classGroups) {
446
+ const group = classGroups[classGroupId];
447
+ processClassesRecursively(group, classMap, classGroupId, theme);
448
+ }
449
+ return classMap;
450
+ };
451
+ const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
452
+ const len = classGroup.length;
453
+ for (let i = 0; i < len; i++) {
454
+ const classDefinition = classGroup[i];
455
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
456
+ }
457
+ };
458
+ const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
459
+ if (typeof classDefinition === "string") {
460
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
461
+ return;
462
+ }
463
+ if (typeof classDefinition === "function") {
464
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
465
+ return;
466
+ }
467
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
468
+ };
469
+ const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
470
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
471
+ classPartObjectToEdit.classGroupId = classGroupId;
472
+ };
473
+ const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
474
+ if (isThemeGetter(classDefinition)) {
475
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
476
+ return;
477
+ }
478
+ if (classPartObject.validators === null) {
479
+ classPartObject.validators = [];
480
+ }
481
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
482
+ };
483
+ const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
484
+ const entries = Object.entries(classDefinition);
485
+ const len = entries.length;
486
+ for (let i = 0; i < len; i++) {
487
+ const [key, value] = entries[i];
488
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
489
+ }
490
+ };
491
+ const getPart = (classPartObject, path) => {
492
+ let current = classPartObject;
493
+ const parts = path.split(CLASS_PART_SEPARATOR);
494
+ const len = parts.length;
495
+ for (let i = 0; i < len; i++) {
496
+ const part = parts[i];
497
+ let next = current.nextPart.get(part);
498
+ if (!next) {
499
+ next = createClassPartObject();
500
+ current.nextPart.set(part, next);
501
+ }
502
+ current = next;
503
+ }
504
+ return current;
505
+ };
506
+ const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
507
+ const createLruCache = (maxCacheSize) => {
508
+ if (maxCacheSize < 1) {
509
+ return {
510
+ get: () => void 0,
511
+ set: () => {
512
+ }
513
+ };
514
+ }
515
+ let cacheSize = 0;
516
+ let cache = /* @__PURE__ */ Object.create(null);
517
+ let previousCache = /* @__PURE__ */ Object.create(null);
518
+ const update = (key, value) => {
519
+ cache[key] = value;
520
+ cacheSize++;
521
+ if (cacheSize > maxCacheSize) {
522
+ cacheSize = 0;
523
+ previousCache = cache;
524
+ cache = /* @__PURE__ */ Object.create(null);
525
+ }
526
+ };
527
+ return {
528
+ get(key) {
529
+ let value = cache[key];
530
+ if (value !== void 0) {
531
+ return value;
532
+ }
533
+ if ((value = previousCache[key]) !== void 0) {
534
+ update(key, value);
535
+ return value;
401
536
  }
402
- document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
403
537
  },
404
- [setOpenProp, open]
405
- );
406
- const toggleSidebar = React3.useCallback(() => {
407
- return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
408
- }, [isMobile, setOpen, setOpenMobile]);
409
- React3.useEffect(() => {
410
- const handleKeyDown = (event) => {
411
- if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
412
- event.preventDefault();
413
- toggleSidebar();
538
+ set(key, value) {
539
+ if (key in cache) {
540
+ cache[key] = value;
541
+ } else {
542
+ update(key, value);
414
543
  }
415
- };
416
- window.addEventListener("keydown", handleKeyDown);
417
- return () => window.removeEventListener("keydown", handleKeyDown);
418
- }, [toggleSidebar]);
419
- const state = open ? "expanded" : "collapsed";
420
- const contextValue = React3.useMemo(
421
- () => ({
422
- state,
423
- open,
424
- setOpen,
425
- isMobile,
426
- openMobile,
427
- setOpenMobile,
428
- toggleSidebar
429
- }),
430
- [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
431
- );
432
- return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
433
- "div",
434
- {
435
- "data-slot": "sidebar-wrapper",
436
- style: {
437
- "--sidebar-width": SIDEBAR_WIDTH,
438
- "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
439
- ...style
440
- },
441
- className: cn(
442
- "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
443
- className
444
- ),
445
- ...props,
446
- children
447
544
  }
448
- ) }) });
449
- }
450
- function Sidebar({
451
- side = "left",
452
- variant = "sidebar",
453
- collapsible = "offcanvas",
454
- className,
455
- children,
456
- ...props
457
- }) {
458
- const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
459
- if (collapsible === "none") {
460
- return /* @__PURE__ */ jsx(
461
- "div",
462
- {
463
- "data-slot": "sidebar",
464
- className: cn(
465
- "bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
466
- className
467
- ),
468
- ...props,
469
- children
545
+ };
546
+ };
547
+ const IMPORTANT_MODIFIER = "!";
548
+ const MODIFIER_SEPARATOR = ":";
549
+ const EMPTY_MODIFIERS = [];
550
+ const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
551
+ modifiers,
552
+ hasImportantModifier,
553
+ baseClassName,
554
+ maybePostfixModifierPosition,
555
+ isExternal
556
+ });
557
+ const createParseClassName = (config) => {
558
+ const {
559
+ prefix,
560
+ experimentalParseClassName
561
+ } = config;
562
+ let parseClassName = (className) => {
563
+ const modifiers = [];
564
+ let bracketDepth = 0;
565
+ let parenDepth = 0;
566
+ let modifierStart = 0;
567
+ let postfixModifierPosition;
568
+ const len = className.length;
569
+ for (let index = 0; index < len; index++) {
570
+ const currentCharacter = className[index];
571
+ if (bracketDepth === 0 && parenDepth === 0) {
572
+ if (currentCharacter === MODIFIER_SEPARATOR) {
573
+ modifiers.push(className.slice(modifierStart, index));
574
+ modifierStart = index + 1;
575
+ continue;
576
+ }
577
+ if (currentCharacter === "/") {
578
+ postfixModifierPosition = index;
579
+ continue;
580
+ }
470
581
  }
471
- );
582
+ if (currentCharacter === "[") bracketDepth++;
583
+ else if (currentCharacter === "]") bracketDepth--;
584
+ else if (currentCharacter === "(") parenDepth++;
585
+ else if (currentCharacter === ")") parenDepth--;
586
+ }
587
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
588
+ let baseClassName = baseClassNameWithImportantModifier;
589
+ let hasImportantModifier = false;
590
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
591
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
592
+ hasImportantModifier = true;
593
+ } else if (
594
+ /**
595
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
596
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
597
+ */
598
+ baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
599
+ ) {
600
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
601
+ hasImportantModifier = true;
602
+ }
603
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
604
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
605
+ };
606
+ if (prefix) {
607
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
608
+ const parseClassNameOriginal = parseClassName;
609
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
472
610
  }
473
- if (isMobile) {
474
- return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
475
- SheetContent,
476
- {
477
- "data-sidebar": "sidebar",
478
- "data-slot": "sidebar",
479
- "data-mobile": "true",
480
- className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
481
- style: {
482
- "--sidebar-width": SIDEBAR_WIDTH_MOBILE
483
- },
484
- side,
485
- children: [
486
- /* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
487
- /* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
488
- /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
489
- ] }),
490
- /* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
491
- ]
492
- }
493
- ) });
611
+ if (experimentalParseClassName) {
612
+ const parseClassNameOriginal = parseClassName;
613
+ parseClassName = (className) => experimentalParseClassName({
614
+ className,
615
+ parseClassName: parseClassNameOriginal
616
+ });
494
617
  }
495
- return /* @__PURE__ */ jsxs(
496
- "div",
497
- {
498
- className: "group peer text-sidebar-foreground hidden md:block",
499
- "data-state": state,
500
- "data-collapsible": state === "collapsed" ? collapsible : "",
501
- "data-variant": variant,
502
- "data-side": side,
503
- "data-slot": "sidebar",
504
- children: [
505
- /* @__PURE__ */ jsx(
506
- "div",
507
- {
508
- "data-slot": "sidebar-gap",
509
- className: cn(
510
- "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
511
- "group-data-[collapsible=offcanvas]:w-0",
512
- "group-data-[side=right]:rotate-180",
513
- variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
514
- )
515
- }
516
- ),
517
- /* @__PURE__ */ jsx(
518
- "div",
519
- {
520
- "data-slot": "sidebar-container",
521
- className: cn(
522
- "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
523
- side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
524
- variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
525
- className
526
- ),
527
- ...props,
528
- children: /* @__PURE__ */ jsx(
529
- "div",
530
- {
531
- "data-sidebar": "sidebar",
532
- "data-slot": "sidebar-inner",
533
- className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
534
- children
535
- }
536
- )
537
- }
538
- )
539
- ]
618
+ return parseClassName;
619
+ };
620
+ const createSortModifiers = (config) => {
621
+ const modifierWeights = /* @__PURE__ */ new Map();
622
+ config.orderSensitiveModifiers.forEach((mod, index) => {
623
+ modifierWeights.set(mod, 1e6 + index);
624
+ });
625
+ return (modifiers) => {
626
+ const result = [];
627
+ let currentSegment = [];
628
+ for (let i = 0; i < modifiers.length; i++) {
629
+ const modifier = modifiers[i];
630
+ const isArbitrary = modifier[0] === "[";
631
+ const isOrderSensitive = modifierWeights.has(modifier);
632
+ if (isArbitrary || isOrderSensitive) {
633
+ if (currentSegment.length > 0) {
634
+ currentSegment.sort();
635
+ result.push(...currentSegment);
636
+ currentSegment = [];
637
+ }
638
+ result.push(modifier);
639
+ } else {
640
+ currentSegment.push(modifier);
641
+ }
540
642
  }
541
- );
542
- }
543
- function SidebarInset({ className, ...props }) {
544
- return /* @__PURE__ */ jsx(
545
- "main",
546
- {
547
- "data-slot": "sidebar-inset",
548
- className: cn(
549
- "bg-background relative flex w-full flex-1 flex-col",
550
- "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
551
- className
552
- ),
553
- ...props
643
+ if (currentSegment.length > 0) {
644
+ currentSegment.sort();
645
+ result.push(...currentSegment);
554
646
  }
555
- );
556
- }
557
- function SidebarContent({ className, ...props }) {
558
- return /* @__PURE__ */ jsx(
559
- "div",
560
- {
561
- "data-slot": "sidebar-content",
562
- "data-sidebar": "content",
563
- className: cn(
564
- "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
565
- className
566
- ),
567
- ...props
647
+ return result;
648
+ };
649
+ };
650
+ const createConfigUtils = (config) => ({
651
+ cache: createLruCache(config.cacheSize),
652
+ parseClassName: createParseClassName(config),
653
+ sortModifiers: createSortModifiers(config),
654
+ ...createClassGroupUtils(config)
655
+ });
656
+ const SPLIT_CLASSES_REGEX = /\s+/;
657
+ const mergeClassList = (classList, configUtils) => {
658
+ const {
659
+ parseClassName,
660
+ getClassGroupId,
661
+ getConflictingClassGroupIds,
662
+ sortModifiers
663
+ } = configUtils;
664
+ const classGroupsInConflict = [];
665
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
666
+ let result = "";
667
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
668
+ const originalClassName = classNames[index];
669
+ const {
670
+ isExternal,
671
+ modifiers,
672
+ hasImportantModifier,
673
+ baseClassName,
674
+ maybePostfixModifierPosition
675
+ } = parseClassName(originalClassName);
676
+ if (isExternal) {
677
+ result = originalClassName + (result.length > 0 ? " " + result : result);
678
+ continue;
568
679
  }
569
- );
570
- }
571
- function SidebarGroup({ className, ...props }) {
572
- return /* @__PURE__ */ jsx(
573
- "div",
574
- {
575
- "data-slot": "sidebar-group",
576
- "data-sidebar": "group",
577
- className: cn("relative flex w-full min-w-0 flex-col p-2", className),
578
- ...props
680
+ let hasPostfixModifier = !!maybePostfixModifierPosition;
681
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
682
+ if (!classGroupId) {
683
+ if (!hasPostfixModifier) {
684
+ result = originalClassName + (result.length > 0 ? " " + result : result);
685
+ continue;
686
+ }
687
+ classGroupId = getClassGroupId(baseClassName);
688
+ if (!classGroupId) {
689
+ result = originalClassName + (result.length > 0 ? " " + result : result);
690
+ continue;
691
+ }
692
+ hasPostfixModifier = false;
579
693
  }
580
- );
581
- }
582
- function SidebarGroupLabel({
583
- className,
584
- asChild = false,
585
- ...props
586
- }) {
587
- const Comp = asChild ? Slot : "div";
588
- return /* @__PURE__ */ jsx(
589
- Comp,
590
- {
591
- "data-slot": "sidebar-group-label",
592
- "data-sidebar": "group-label",
593
- className: cn(
594
- "text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
595
- "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
596
- className
597
- ),
598
- ...props
694
+ const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
695
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
696
+ const classId = modifierId + classGroupId;
697
+ if (classGroupsInConflict.indexOf(classId) > -1) {
698
+ continue;
599
699
  }
600
- );
601
- }
602
- function SidebarGroupContent({
603
- className,
604
- ...props
605
- }) {
606
- return /* @__PURE__ */ jsx(
607
- "div",
608
- {
609
- "data-slot": "sidebar-group-content",
610
- "data-sidebar": "group-content",
611
- className: cn("w-full text-sm", className),
612
- ...props
700
+ classGroupsInConflict.push(classId);
701
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
702
+ for (let i = 0; i < conflictGroups.length; ++i) {
703
+ const group = conflictGroups[i];
704
+ classGroupsInConflict.push(modifierId + group);
613
705
  }
614
- );
615
- }
616
- cva(
617
- "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
618
- {
619
- variants: {
620
- variant: {
621
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
622
- outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
623
- },
624
- size: {
625
- default: "h-8 text-sm",
626
- sm: "h-7 text-xs",
627
- lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
706
+ result = originalClassName + (result.length > 0 ? " " + result : result);
707
+ }
708
+ return result;
709
+ };
710
+ const twJoin = (...classLists) => {
711
+ let index = 0;
712
+ let argument;
713
+ let resolvedValue;
714
+ let string = "";
715
+ while (index < classLists.length) {
716
+ if (argument = classLists[index++]) {
717
+ if (resolvedValue = toValue(argument)) {
718
+ string && (string += " ");
719
+ string += resolvedValue;
628
720
  }
629
- },
630
- defaultVariants: {
631
- variant: "default",
632
- size: "default"
633
721
  }
634
722
  }
635
- );
636
- var Select = SelectPrimitive.Root;
637
- var SelectValue = SelectPrimitive.Value;
638
- var SelectTrigger = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
639
- SelectPrimitive.Trigger,
640
- {
641
- ref,
642
- className: cn(
643
- "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
644
- className
645
- ),
646
- ...props,
647
- children: [
648
- children,
649
- /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
650
- ]
651
- }
652
- ));
653
- SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
654
- var SelectScrollUpButton = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
655
- SelectPrimitive.ScrollUpButton,
656
- {
657
- ref,
658
- className: cn(
659
- "flex cursor-default items-center justify-center py-1",
660
- className
661
- ),
662
- ...props,
663
- children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
664
- }
665
- ));
666
- SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
667
- var SelectScrollDownButton = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
668
- SelectPrimitive.ScrollDownButton,
669
- {
670
- ref,
671
- className: cn(
672
- "flex cursor-default items-center justify-center py-1",
673
- className
674
- ),
675
- ...props,
676
- children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
677
- }
678
- ));
679
- SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
680
- var SelectContent = React3.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
681
- SelectPrimitive.Content,
682
- {
683
- ref,
684
- className: cn(
685
- "relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
686
- position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
687
- className
688
- ),
689
- position,
690
- ...props,
691
- children: [
692
- /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
693
- /* @__PURE__ */ jsx(
694
- SelectPrimitive.Viewport,
695
- {
696
- className: cn(
697
- "p-1",
698
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
699
- ),
700
- children
701
- }
702
- ),
703
- /* @__PURE__ */ jsx(SelectScrollDownButton, {})
704
- ]
723
+ return string;
724
+ };
725
+ const toValue = (mix) => {
726
+ if (typeof mix === "string") {
727
+ return mix;
705
728
  }
706
- ) }));
707
- SelectContent.displayName = SelectPrimitive.Content.displayName;
708
- var SelectLabel = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
709
- SelectPrimitive.Label,
710
- {
711
- ref,
712
- className: cn("px-2 py-1.5 text-sm font-semibold", className),
713
- ...props
729
+ let resolvedValue;
730
+ let string = "";
731
+ for (let k = 0; k < mix.length; k++) {
732
+ if (mix[k]) {
733
+ if (resolvedValue = toValue(mix[k])) {
734
+ string && (string += " ");
735
+ string += resolvedValue;
736
+ }
737
+ }
714
738
  }
715
- ));
716
- SelectLabel.displayName = SelectPrimitive.Label.displayName;
717
- var SelectItem = React3.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
718
- SelectPrimitive.Item,
719
- {
720
- ref,
721
- className: cn(
722
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
723
- className
724
- ),
725
- ...props,
726
- children: [
727
- /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
728
- /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
729
- ]
739
+ return string;
740
+ };
741
+ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
742
+ let configUtils;
743
+ let cacheGet;
744
+ let cacheSet;
745
+ let functionToCall;
746
+ const initTailwindMerge = (classList) => {
747
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
748
+ configUtils = createConfigUtils(config);
749
+ cacheGet = configUtils.cache.get;
750
+ cacheSet = configUtils.cache.set;
751
+ functionToCall = tailwindMerge;
752
+ return tailwindMerge(classList);
753
+ };
754
+ const tailwindMerge = (classList) => {
755
+ const cachedResult = cacheGet(classList);
756
+ if (cachedResult) {
757
+ return cachedResult;
758
+ }
759
+ const result = mergeClassList(classList, configUtils);
760
+ cacheSet(classList, result);
761
+ return result;
762
+ };
763
+ functionToCall = initTailwindMerge;
764
+ return (...args) => functionToCall(twJoin(...args));
765
+ };
766
+ const fallbackThemeArr = [];
767
+ const fromTheme = (key) => {
768
+ const themeGetter = (theme) => theme[key] || fallbackThemeArr;
769
+ themeGetter.isThemeGetter = true;
770
+ return themeGetter;
771
+ };
772
+ const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
773
+ const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
774
+ const fractionRegex = /^\d+\/\d+$/;
775
+ const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
776
+ const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/;
777
+ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
778
+ const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
779
+ const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
780
+ const isFraction = (value) => fractionRegex.test(value);
781
+ const isNumber = (value) => !!value && !Number.isNaN(Number(value));
782
+ const isInteger = (value) => !!value && Number.isInteger(Number(value));
783
+ const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
784
+ const isTshirtSize = (value) => tshirtUnitRegex.test(value);
785
+ const isAny = () => true;
786
+ const isLengthOnly = (value) => (
787
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
788
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
789
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
790
+ lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
791
+ );
792
+ const isNever = () => false;
793
+ const isShadow = (value) => shadowRegex.test(value);
794
+ const isImage = (value) => imageRegex.test(value);
795
+ const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
796
+ const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
797
+ const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
798
+ const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
799
+ const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
800
+ const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
801
+ const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
802
+ const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
803
+ const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
804
+ const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
805
+ const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
806
+ const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
807
+ const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
808
+ const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
809
+ const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
810
+ const getIsArbitraryValue = (value, testLabel, testValue) => {
811
+ const result = arbitraryValueRegex.exec(value);
812
+ if (result) {
813
+ if (result[1]) {
814
+ return testLabel(result[1]);
815
+ }
816
+ return testValue(result[2]);
730
817
  }
731
- ));
732
- SelectItem.displayName = SelectPrimitive.Item.displayName;
733
- var SelectSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
734
- SelectPrimitive.Separator,
735
- {
736
- ref,
737
- className: cn("-mx-1 my-1 h-px bg-muted", className),
738
- ...props
818
+ return false;
819
+ };
820
+ const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
821
+ const result = arbitraryVariableRegex.exec(value);
822
+ if (result) {
823
+ if (result[1]) {
824
+ return testLabel(result[1]);
825
+ }
826
+ return shouldMatchNoLabel;
739
827
  }
740
- ));
741
- SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
742
- var labelVariants = cva(
743
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
828
+ return false;
829
+ };
830
+ const isLabelPosition = (label) => label === "position" || label === "percentage";
831
+ const isLabelImage = (label) => label === "image" || label === "url";
832
+ const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
833
+ const isLabelLength = (label) => label === "length";
834
+ const isLabelNumber = (label) => label === "number";
835
+ const isLabelFamilyName = (label) => label === "family-name";
836
+ const isLabelShadow = (label) => label === "shadow";
837
+ const getDefaultConfig = () => {
838
+ const themeColor = fromTheme("color");
839
+ const themeFont = fromTheme("font");
840
+ const themeText = fromTheme("text");
841
+ const themeFontWeight = fromTheme("font-weight");
842
+ const themeTracking = fromTheme("tracking");
843
+ const themeLeading = fromTheme("leading");
844
+ const themeBreakpoint = fromTheme("breakpoint");
845
+ const themeContainer = fromTheme("container");
846
+ const themeSpacing = fromTheme("spacing");
847
+ const themeRadius = fromTheme("radius");
848
+ const themeShadow = fromTheme("shadow");
849
+ const themeInsetShadow = fromTheme("inset-shadow");
850
+ const themeTextShadow = fromTheme("text-shadow");
851
+ const themeDropShadow = fromTheme("drop-shadow");
852
+ const themeBlur = fromTheme("blur");
853
+ const themePerspective = fromTheme("perspective");
854
+ const themeAspect = fromTheme("aspect");
855
+ const themeEase = fromTheme("ease");
856
+ const themeAnimate = fromTheme("animate");
857
+ const scaleBreak = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
858
+ const scalePosition = () => [
859
+ "center",
860
+ "top",
861
+ "bottom",
862
+ "left",
863
+ "right",
864
+ "top-left",
865
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
866
+ "left-top",
867
+ "top-right",
868
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
869
+ "right-top",
870
+ "bottom-right",
871
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
872
+ "right-bottom",
873
+ "bottom-left",
874
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
875
+ "left-bottom"
876
+ ];
877
+ const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
878
+ const scaleOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
879
+ const scaleOverscroll = () => ["auto", "contain", "none"];
880
+ const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
881
+ const scaleInset = () => [isFraction, "full", "auto", ...scaleUnambiguousSpacing()];
882
+ const scaleGridTemplateColsRows = () => [isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue];
883
+ const scaleGridColRowStartAndEnd = () => ["auto", {
884
+ span: ["full", isInteger, isArbitraryVariable, isArbitraryValue]
885
+ }, isInteger, isArbitraryVariable, isArbitraryValue];
886
+ const scaleGridColRowStartOrEnd = () => [isInteger, "auto", isArbitraryVariable, isArbitraryValue];
887
+ const scaleGridAutoColsRows = () => ["auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue];
888
+ const scaleAlignPrimaryAxis = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"];
889
+ const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"];
890
+ const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
891
+ const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
892
+ const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
893
+ const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
894
+ position: [isArbitraryVariable, isArbitraryValue]
895
+ }];
896
+ const scaleBgRepeat = () => ["no-repeat", {
897
+ repeat: ["", "x", "y", "space", "round"]
898
+ }];
899
+ const scaleBgSize = () => ["auto", "cover", "contain", isArbitraryVariableSize, isArbitrarySize, {
900
+ size: [isArbitraryVariable, isArbitraryValue]
901
+ }];
902
+ const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
903
+ const scaleRadius = () => [
904
+ // Deprecated since Tailwind CSS v4.0.0
905
+ "",
906
+ "none",
907
+ "full",
908
+ themeRadius,
909
+ isArbitraryVariable,
910
+ isArbitraryValue
911
+ ];
912
+ const scaleBorderWidth = () => ["", isNumber, isArbitraryVariableLength, isArbitraryLength];
913
+ const scaleLineStyle = () => ["solid", "dashed", "dotted", "double"];
914
+ const scaleBlendMode = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
915
+ const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
916
+ const scaleBlur = () => [
917
+ // Deprecated since Tailwind CSS v4.0.0
918
+ "",
919
+ "none",
920
+ themeBlur,
921
+ isArbitraryVariable,
922
+ isArbitraryValue
923
+ ];
924
+ const scaleRotate = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
925
+ const scaleScale = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
926
+ const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
927
+ const scaleTranslate = () => [isFraction, "full", ...scaleUnambiguousSpacing()];
928
+ return {
929
+ cacheSize: 500,
930
+ theme: {
931
+ animate: ["spin", "ping", "pulse", "bounce"],
932
+ aspect: ["video"],
933
+ blur: [isTshirtSize],
934
+ breakpoint: [isTshirtSize],
935
+ color: [isAny],
936
+ container: [isTshirtSize],
937
+ "drop-shadow": [isTshirtSize],
938
+ ease: ["in", "out", "in-out"],
939
+ font: [isAnyNonArbitrary],
940
+ "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
941
+ "inset-shadow": [isTshirtSize],
942
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
943
+ perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
944
+ radius: [isTshirtSize],
945
+ shadow: [isTshirtSize],
946
+ spacing: ["px", isNumber],
947
+ text: [isTshirtSize],
948
+ "text-shadow": [isTshirtSize],
949
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
950
+ },
951
+ classGroups: {
952
+ // --------------
953
+ // --- Layout ---
954
+ // --------------
955
+ /**
956
+ * Aspect Ratio
957
+ * @see https://tailwindcss.com/docs/aspect-ratio
958
+ */
959
+ aspect: [{
960
+ aspect: ["auto", "square", isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
961
+ }],
962
+ /**
963
+ * Container
964
+ * @see https://tailwindcss.com/docs/container
965
+ * @deprecated since Tailwind CSS v4.0.0
966
+ */
967
+ container: ["container"],
968
+ /**
969
+ * Columns
970
+ * @see https://tailwindcss.com/docs/columns
971
+ */
972
+ columns: [{
973
+ columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
974
+ }],
975
+ /**
976
+ * Break After
977
+ * @see https://tailwindcss.com/docs/break-after
978
+ */
979
+ "break-after": [{
980
+ "break-after": scaleBreak()
981
+ }],
982
+ /**
983
+ * Break Before
984
+ * @see https://tailwindcss.com/docs/break-before
985
+ */
986
+ "break-before": [{
987
+ "break-before": scaleBreak()
988
+ }],
989
+ /**
990
+ * Break Inside
991
+ * @see https://tailwindcss.com/docs/break-inside
992
+ */
993
+ "break-inside": [{
994
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
995
+ }],
996
+ /**
997
+ * Box Decoration Break
998
+ * @see https://tailwindcss.com/docs/box-decoration-break
999
+ */
1000
+ "box-decoration": [{
1001
+ "box-decoration": ["slice", "clone"]
1002
+ }],
1003
+ /**
1004
+ * Box Sizing
1005
+ * @see https://tailwindcss.com/docs/box-sizing
1006
+ */
1007
+ box: [{
1008
+ box: ["border", "content"]
1009
+ }],
1010
+ /**
1011
+ * Display
1012
+ * @see https://tailwindcss.com/docs/display
1013
+ */
1014
+ display: ["block", "inline-block", "inline", "flex", "inline-flex", "table", "inline-table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row-group", "table-row", "flow-root", "grid", "inline-grid", "contents", "list-item", "hidden"],
1015
+ /**
1016
+ * Screen Reader Only
1017
+ * @see https://tailwindcss.com/docs/display#screen-reader-only
1018
+ */
1019
+ sr: ["sr-only", "not-sr-only"],
1020
+ /**
1021
+ * Floats
1022
+ * @see https://tailwindcss.com/docs/float
1023
+ */
1024
+ float: [{
1025
+ float: ["right", "left", "none", "start", "end"]
1026
+ }],
1027
+ /**
1028
+ * Clear
1029
+ * @see https://tailwindcss.com/docs/clear
1030
+ */
1031
+ clear: [{
1032
+ clear: ["left", "right", "both", "none", "start", "end"]
1033
+ }],
1034
+ /**
1035
+ * Isolation
1036
+ * @see https://tailwindcss.com/docs/isolation
1037
+ */
1038
+ isolation: ["isolate", "isolation-auto"],
1039
+ /**
1040
+ * Object Fit
1041
+ * @see https://tailwindcss.com/docs/object-fit
1042
+ */
1043
+ "object-fit": [{
1044
+ object: ["contain", "cover", "fill", "none", "scale-down"]
1045
+ }],
1046
+ /**
1047
+ * Object Position
1048
+ * @see https://tailwindcss.com/docs/object-position
1049
+ */
1050
+ "object-position": [{
1051
+ object: scalePositionWithArbitrary()
1052
+ }],
1053
+ /**
1054
+ * Overflow
1055
+ * @see https://tailwindcss.com/docs/overflow
1056
+ */
1057
+ overflow: [{
1058
+ overflow: scaleOverflow()
1059
+ }],
1060
+ /**
1061
+ * Overflow X
1062
+ * @see https://tailwindcss.com/docs/overflow
1063
+ */
1064
+ "overflow-x": [{
1065
+ "overflow-x": scaleOverflow()
1066
+ }],
1067
+ /**
1068
+ * Overflow Y
1069
+ * @see https://tailwindcss.com/docs/overflow
1070
+ */
1071
+ "overflow-y": [{
1072
+ "overflow-y": scaleOverflow()
1073
+ }],
1074
+ /**
1075
+ * Overscroll Behavior
1076
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1077
+ */
1078
+ overscroll: [{
1079
+ overscroll: scaleOverscroll()
1080
+ }],
1081
+ /**
1082
+ * Overscroll Behavior X
1083
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1084
+ */
1085
+ "overscroll-x": [{
1086
+ "overscroll-x": scaleOverscroll()
1087
+ }],
1088
+ /**
1089
+ * Overscroll Behavior Y
1090
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1091
+ */
1092
+ "overscroll-y": [{
1093
+ "overscroll-y": scaleOverscroll()
1094
+ }],
1095
+ /**
1096
+ * Position
1097
+ * @see https://tailwindcss.com/docs/position
1098
+ */
1099
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
1100
+ /**
1101
+ * Top / Right / Bottom / Left
1102
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1103
+ */
1104
+ inset: [{
1105
+ inset: scaleInset()
1106
+ }],
1107
+ /**
1108
+ * Right / Left
1109
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1110
+ */
1111
+ "inset-x": [{
1112
+ "inset-x": scaleInset()
1113
+ }],
1114
+ /**
1115
+ * Top / Bottom
1116
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1117
+ */
1118
+ "inset-y": [{
1119
+ "inset-y": scaleInset()
1120
+ }],
1121
+ /**
1122
+ * Start
1123
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1124
+ */
1125
+ start: [{
1126
+ start: scaleInset()
1127
+ }],
1128
+ /**
1129
+ * End
1130
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1131
+ */
1132
+ end: [{
1133
+ end: scaleInset()
1134
+ }],
1135
+ /**
1136
+ * Top
1137
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1138
+ */
1139
+ top: [{
1140
+ top: scaleInset()
1141
+ }],
1142
+ /**
1143
+ * Right
1144
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1145
+ */
1146
+ right: [{
1147
+ right: scaleInset()
1148
+ }],
1149
+ /**
1150
+ * Bottom
1151
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1152
+ */
1153
+ bottom: [{
1154
+ bottom: scaleInset()
1155
+ }],
1156
+ /**
1157
+ * Left
1158
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1159
+ */
1160
+ left: [{
1161
+ left: scaleInset()
1162
+ }],
1163
+ /**
1164
+ * Visibility
1165
+ * @see https://tailwindcss.com/docs/visibility
1166
+ */
1167
+ visibility: ["visible", "invisible", "collapse"],
1168
+ /**
1169
+ * Z-Index
1170
+ * @see https://tailwindcss.com/docs/z-index
1171
+ */
1172
+ z: [{
1173
+ z: [isInteger, "auto", isArbitraryVariable, isArbitraryValue]
1174
+ }],
1175
+ // ------------------------
1176
+ // --- Flexbox and Grid ---
1177
+ // ------------------------
1178
+ /**
1179
+ * Flex Basis
1180
+ * @see https://tailwindcss.com/docs/flex-basis
1181
+ */
1182
+ basis: [{
1183
+ basis: [isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing()]
1184
+ }],
1185
+ /**
1186
+ * Flex Direction
1187
+ * @see https://tailwindcss.com/docs/flex-direction
1188
+ */
1189
+ "flex-direction": [{
1190
+ flex: ["row", "row-reverse", "col", "col-reverse"]
1191
+ }],
1192
+ /**
1193
+ * Flex Wrap
1194
+ * @see https://tailwindcss.com/docs/flex-wrap
1195
+ */
1196
+ "flex-wrap": [{
1197
+ flex: ["nowrap", "wrap", "wrap-reverse"]
1198
+ }],
1199
+ /**
1200
+ * Flex
1201
+ * @see https://tailwindcss.com/docs/flex
1202
+ */
1203
+ flex: [{
1204
+ flex: [isNumber, isFraction, "auto", "initial", "none", isArbitraryValue]
1205
+ }],
1206
+ /**
1207
+ * Flex Grow
1208
+ * @see https://tailwindcss.com/docs/flex-grow
1209
+ */
1210
+ grow: [{
1211
+ grow: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1212
+ }],
1213
+ /**
1214
+ * Flex Shrink
1215
+ * @see https://tailwindcss.com/docs/flex-shrink
1216
+ */
1217
+ shrink: [{
1218
+ shrink: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1219
+ }],
1220
+ /**
1221
+ * Order
1222
+ * @see https://tailwindcss.com/docs/order
1223
+ */
1224
+ order: [{
1225
+ order: [isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue]
1226
+ }],
1227
+ /**
1228
+ * Grid Template Columns
1229
+ * @see https://tailwindcss.com/docs/grid-template-columns
1230
+ */
1231
+ "grid-cols": [{
1232
+ "grid-cols": scaleGridTemplateColsRows()
1233
+ }],
1234
+ /**
1235
+ * Grid Column Start / End
1236
+ * @see https://tailwindcss.com/docs/grid-column
1237
+ */
1238
+ "col-start-end": [{
1239
+ col: scaleGridColRowStartAndEnd()
1240
+ }],
1241
+ /**
1242
+ * Grid Column Start
1243
+ * @see https://tailwindcss.com/docs/grid-column
1244
+ */
1245
+ "col-start": [{
1246
+ "col-start": scaleGridColRowStartOrEnd()
1247
+ }],
1248
+ /**
1249
+ * Grid Column End
1250
+ * @see https://tailwindcss.com/docs/grid-column
1251
+ */
1252
+ "col-end": [{
1253
+ "col-end": scaleGridColRowStartOrEnd()
1254
+ }],
1255
+ /**
1256
+ * Grid Template Rows
1257
+ * @see https://tailwindcss.com/docs/grid-template-rows
1258
+ */
1259
+ "grid-rows": [{
1260
+ "grid-rows": scaleGridTemplateColsRows()
1261
+ }],
1262
+ /**
1263
+ * Grid Row Start / End
1264
+ * @see https://tailwindcss.com/docs/grid-row
1265
+ */
1266
+ "row-start-end": [{
1267
+ row: scaleGridColRowStartAndEnd()
1268
+ }],
1269
+ /**
1270
+ * Grid Row Start
1271
+ * @see https://tailwindcss.com/docs/grid-row
1272
+ */
1273
+ "row-start": [{
1274
+ "row-start": scaleGridColRowStartOrEnd()
1275
+ }],
1276
+ /**
1277
+ * Grid Row End
1278
+ * @see https://tailwindcss.com/docs/grid-row
1279
+ */
1280
+ "row-end": [{
1281
+ "row-end": scaleGridColRowStartOrEnd()
1282
+ }],
1283
+ /**
1284
+ * Grid Auto Flow
1285
+ * @see https://tailwindcss.com/docs/grid-auto-flow
1286
+ */
1287
+ "grid-flow": [{
1288
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
1289
+ }],
1290
+ /**
1291
+ * Grid Auto Columns
1292
+ * @see https://tailwindcss.com/docs/grid-auto-columns
1293
+ */
1294
+ "auto-cols": [{
1295
+ "auto-cols": scaleGridAutoColsRows()
1296
+ }],
1297
+ /**
1298
+ * Grid Auto Rows
1299
+ * @see https://tailwindcss.com/docs/grid-auto-rows
1300
+ */
1301
+ "auto-rows": [{
1302
+ "auto-rows": scaleGridAutoColsRows()
1303
+ }],
1304
+ /**
1305
+ * Gap
1306
+ * @see https://tailwindcss.com/docs/gap
1307
+ */
1308
+ gap: [{
1309
+ gap: scaleUnambiguousSpacing()
1310
+ }],
1311
+ /**
1312
+ * Gap X
1313
+ * @see https://tailwindcss.com/docs/gap
1314
+ */
1315
+ "gap-x": [{
1316
+ "gap-x": scaleUnambiguousSpacing()
1317
+ }],
1318
+ /**
1319
+ * Gap Y
1320
+ * @see https://tailwindcss.com/docs/gap
1321
+ */
1322
+ "gap-y": [{
1323
+ "gap-y": scaleUnambiguousSpacing()
1324
+ }],
1325
+ /**
1326
+ * Justify Content
1327
+ * @see https://tailwindcss.com/docs/justify-content
1328
+ */
1329
+ "justify-content": [{
1330
+ justify: [...scaleAlignPrimaryAxis(), "normal"]
1331
+ }],
1332
+ /**
1333
+ * Justify Items
1334
+ * @see https://tailwindcss.com/docs/justify-items
1335
+ */
1336
+ "justify-items": [{
1337
+ "justify-items": [...scaleAlignSecondaryAxis(), "normal"]
1338
+ }],
1339
+ /**
1340
+ * Justify Self
1341
+ * @see https://tailwindcss.com/docs/justify-self
1342
+ */
1343
+ "justify-self": [{
1344
+ "justify-self": ["auto", ...scaleAlignSecondaryAxis()]
1345
+ }],
1346
+ /**
1347
+ * Align Content
1348
+ * @see https://tailwindcss.com/docs/align-content
1349
+ */
1350
+ "align-content": [{
1351
+ content: ["normal", ...scaleAlignPrimaryAxis()]
1352
+ }],
1353
+ /**
1354
+ * Align Items
1355
+ * @see https://tailwindcss.com/docs/align-items
1356
+ */
1357
+ "align-items": [{
1358
+ items: [...scaleAlignSecondaryAxis(), {
1359
+ baseline: ["", "last"]
1360
+ }]
1361
+ }],
1362
+ /**
1363
+ * Align Self
1364
+ * @see https://tailwindcss.com/docs/align-self
1365
+ */
1366
+ "align-self": [{
1367
+ self: ["auto", ...scaleAlignSecondaryAxis(), {
1368
+ baseline: ["", "last"]
1369
+ }]
1370
+ }],
1371
+ /**
1372
+ * Place Content
1373
+ * @see https://tailwindcss.com/docs/place-content
1374
+ */
1375
+ "place-content": [{
1376
+ "place-content": scaleAlignPrimaryAxis()
1377
+ }],
1378
+ /**
1379
+ * Place Items
1380
+ * @see https://tailwindcss.com/docs/place-items
1381
+ */
1382
+ "place-items": [{
1383
+ "place-items": [...scaleAlignSecondaryAxis(), "baseline"]
1384
+ }],
1385
+ /**
1386
+ * Place Self
1387
+ * @see https://tailwindcss.com/docs/place-self
1388
+ */
1389
+ "place-self": [{
1390
+ "place-self": ["auto", ...scaleAlignSecondaryAxis()]
1391
+ }],
1392
+ // Spacing
1393
+ /**
1394
+ * Padding
1395
+ * @see https://tailwindcss.com/docs/padding
1396
+ */
1397
+ p: [{
1398
+ p: scaleUnambiguousSpacing()
1399
+ }],
1400
+ /**
1401
+ * Padding X
1402
+ * @see https://tailwindcss.com/docs/padding
1403
+ */
1404
+ px: [{
1405
+ px: scaleUnambiguousSpacing()
1406
+ }],
1407
+ /**
1408
+ * Padding Y
1409
+ * @see https://tailwindcss.com/docs/padding
1410
+ */
1411
+ py: [{
1412
+ py: scaleUnambiguousSpacing()
1413
+ }],
1414
+ /**
1415
+ * Padding Start
1416
+ * @see https://tailwindcss.com/docs/padding
1417
+ */
1418
+ ps: [{
1419
+ ps: scaleUnambiguousSpacing()
1420
+ }],
1421
+ /**
1422
+ * Padding End
1423
+ * @see https://tailwindcss.com/docs/padding
1424
+ */
1425
+ pe: [{
1426
+ pe: scaleUnambiguousSpacing()
1427
+ }],
1428
+ /**
1429
+ * Padding Top
1430
+ * @see https://tailwindcss.com/docs/padding
1431
+ */
1432
+ pt: [{
1433
+ pt: scaleUnambiguousSpacing()
1434
+ }],
1435
+ /**
1436
+ * Padding Right
1437
+ * @see https://tailwindcss.com/docs/padding
1438
+ */
1439
+ pr: [{
1440
+ pr: scaleUnambiguousSpacing()
1441
+ }],
1442
+ /**
1443
+ * Padding Bottom
1444
+ * @see https://tailwindcss.com/docs/padding
1445
+ */
1446
+ pb: [{
1447
+ pb: scaleUnambiguousSpacing()
1448
+ }],
1449
+ /**
1450
+ * Padding Left
1451
+ * @see https://tailwindcss.com/docs/padding
1452
+ */
1453
+ pl: [{
1454
+ pl: scaleUnambiguousSpacing()
1455
+ }],
1456
+ /**
1457
+ * Margin
1458
+ * @see https://tailwindcss.com/docs/margin
1459
+ */
1460
+ m: [{
1461
+ m: scaleMargin()
1462
+ }],
1463
+ /**
1464
+ * Margin X
1465
+ * @see https://tailwindcss.com/docs/margin
1466
+ */
1467
+ mx: [{
1468
+ mx: scaleMargin()
1469
+ }],
1470
+ /**
1471
+ * Margin Y
1472
+ * @see https://tailwindcss.com/docs/margin
1473
+ */
1474
+ my: [{
1475
+ my: scaleMargin()
1476
+ }],
1477
+ /**
1478
+ * Margin Start
1479
+ * @see https://tailwindcss.com/docs/margin
1480
+ */
1481
+ ms: [{
1482
+ ms: scaleMargin()
1483
+ }],
1484
+ /**
1485
+ * Margin End
1486
+ * @see https://tailwindcss.com/docs/margin
1487
+ */
1488
+ me: [{
1489
+ me: scaleMargin()
1490
+ }],
1491
+ /**
1492
+ * Margin Top
1493
+ * @see https://tailwindcss.com/docs/margin
1494
+ */
1495
+ mt: [{
1496
+ mt: scaleMargin()
1497
+ }],
1498
+ /**
1499
+ * Margin Right
1500
+ * @see https://tailwindcss.com/docs/margin
1501
+ */
1502
+ mr: [{
1503
+ mr: scaleMargin()
1504
+ }],
1505
+ /**
1506
+ * Margin Bottom
1507
+ * @see https://tailwindcss.com/docs/margin
1508
+ */
1509
+ mb: [{
1510
+ mb: scaleMargin()
1511
+ }],
1512
+ /**
1513
+ * Margin Left
1514
+ * @see https://tailwindcss.com/docs/margin
1515
+ */
1516
+ ml: [{
1517
+ ml: scaleMargin()
1518
+ }],
1519
+ /**
1520
+ * Space Between X
1521
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1522
+ */
1523
+ "space-x": [{
1524
+ "space-x": scaleUnambiguousSpacing()
1525
+ }],
1526
+ /**
1527
+ * Space Between X Reverse
1528
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1529
+ */
1530
+ "space-x-reverse": ["space-x-reverse"],
1531
+ /**
1532
+ * Space Between Y
1533
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1534
+ */
1535
+ "space-y": [{
1536
+ "space-y": scaleUnambiguousSpacing()
1537
+ }],
1538
+ /**
1539
+ * Space Between Y Reverse
1540
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1541
+ */
1542
+ "space-y-reverse": ["space-y-reverse"],
1543
+ // --------------
1544
+ // --- Sizing ---
1545
+ // --------------
1546
+ /**
1547
+ * Size
1548
+ * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1549
+ */
1550
+ size: [{
1551
+ size: scaleSizing()
1552
+ }],
1553
+ /**
1554
+ * Width
1555
+ * @see https://tailwindcss.com/docs/width
1556
+ */
1557
+ w: [{
1558
+ w: [themeContainer, "screen", ...scaleSizing()]
1559
+ }],
1560
+ /**
1561
+ * Min-Width
1562
+ * @see https://tailwindcss.com/docs/min-width
1563
+ */
1564
+ "min-w": [{
1565
+ "min-w": [
1566
+ themeContainer,
1567
+ "screen",
1568
+ /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1569
+ "none",
1570
+ ...scaleSizing()
1571
+ ]
1572
+ }],
1573
+ /**
1574
+ * Max-Width
1575
+ * @see https://tailwindcss.com/docs/max-width
1576
+ */
1577
+ "max-w": [{
1578
+ "max-w": [
1579
+ themeContainer,
1580
+ "screen",
1581
+ "none",
1582
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1583
+ "prose",
1584
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1585
+ {
1586
+ screen: [themeBreakpoint]
1587
+ },
1588
+ ...scaleSizing()
1589
+ ]
1590
+ }],
1591
+ /**
1592
+ * Height
1593
+ * @see https://tailwindcss.com/docs/height
1594
+ */
1595
+ h: [{
1596
+ h: ["screen", "lh", ...scaleSizing()]
1597
+ }],
1598
+ /**
1599
+ * Min-Height
1600
+ * @see https://tailwindcss.com/docs/min-height
1601
+ */
1602
+ "min-h": [{
1603
+ "min-h": ["screen", "lh", "none", ...scaleSizing()]
1604
+ }],
1605
+ /**
1606
+ * Max-Height
1607
+ * @see https://tailwindcss.com/docs/max-height
1608
+ */
1609
+ "max-h": [{
1610
+ "max-h": ["screen", "lh", ...scaleSizing()]
1611
+ }],
1612
+ // ------------------
1613
+ // --- Typography ---
1614
+ // ------------------
1615
+ /**
1616
+ * Font Size
1617
+ * @see https://tailwindcss.com/docs/font-size
1618
+ */
1619
+ "font-size": [{
1620
+ text: ["base", themeText, isArbitraryVariableLength, isArbitraryLength]
1621
+ }],
1622
+ /**
1623
+ * Font Smoothing
1624
+ * @see https://tailwindcss.com/docs/font-smoothing
1625
+ */
1626
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1627
+ /**
1628
+ * Font Style
1629
+ * @see https://tailwindcss.com/docs/font-style
1630
+ */
1631
+ "font-style": ["italic", "not-italic"],
1632
+ /**
1633
+ * Font Weight
1634
+ * @see https://tailwindcss.com/docs/font-weight
1635
+ */
1636
+ "font-weight": [{
1637
+ font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
1638
+ }],
1639
+ /**
1640
+ * Font Stretch
1641
+ * @see https://tailwindcss.com/docs/font-stretch
1642
+ */
1643
+ "font-stretch": [{
1644
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", isPercent, isArbitraryValue]
1645
+ }],
1646
+ /**
1647
+ * Font Family
1648
+ * @see https://tailwindcss.com/docs/font-family
1649
+ */
1650
+ "font-family": [{
1651
+ font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
1652
+ }],
1653
+ /**
1654
+ * Font Variant Numeric
1655
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1656
+ */
1657
+ "fvn-normal": ["normal-nums"],
1658
+ /**
1659
+ * Font Variant Numeric
1660
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1661
+ */
1662
+ "fvn-ordinal": ["ordinal"],
1663
+ /**
1664
+ * Font Variant Numeric
1665
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1666
+ */
1667
+ "fvn-slashed-zero": ["slashed-zero"],
1668
+ /**
1669
+ * Font Variant Numeric
1670
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1671
+ */
1672
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1673
+ /**
1674
+ * Font Variant Numeric
1675
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1676
+ */
1677
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1678
+ /**
1679
+ * Font Variant Numeric
1680
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1681
+ */
1682
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1683
+ /**
1684
+ * Letter Spacing
1685
+ * @see https://tailwindcss.com/docs/letter-spacing
1686
+ */
1687
+ tracking: [{
1688
+ tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
1689
+ }],
1690
+ /**
1691
+ * Line Clamp
1692
+ * @see https://tailwindcss.com/docs/line-clamp
1693
+ */
1694
+ "line-clamp": [{
1695
+ "line-clamp": [isNumber, "none", isArbitraryVariable, isArbitraryNumber]
1696
+ }],
1697
+ /**
1698
+ * Line Height
1699
+ * @see https://tailwindcss.com/docs/line-height
1700
+ */
1701
+ leading: [{
1702
+ leading: [
1703
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1704
+ themeLeading,
1705
+ ...scaleUnambiguousSpacing()
1706
+ ]
1707
+ }],
1708
+ /**
1709
+ * List Style Image
1710
+ * @see https://tailwindcss.com/docs/list-style-image
1711
+ */
1712
+ "list-image": [{
1713
+ "list-image": ["none", isArbitraryVariable, isArbitraryValue]
1714
+ }],
1715
+ /**
1716
+ * List Style Position
1717
+ * @see https://tailwindcss.com/docs/list-style-position
1718
+ */
1719
+ "list-style-position": [{
1720
+ list: ["inside", "outside"]
1721
+ }],
1722
+ /**
1723
+ * List Style Type
1724
+ * @see https://tailwindcss.com/docs/list-style-type
1725
+ */
1726
+ "list-style-type": [{
1727
+ list: ["disc", "decimal", "none", isArbitraryVariable, isArbitraryValue]
1728
+ }],
1729
+ /**
1730
+ * Text Alignment
1731
+ * @see https://tailwindcss.com/docs/text-align
1732
+ */
1733
+ "text-alignment": [{
1734
+ text: ["left", "center", "right", "justify", "start", "end"]
1735
+ }],
1736
+ /**
1737
+ * Placeholder Color
1738
+ * @deprecated since Tailwind CSS v3.0.0
1739
+ * @see https://v3.tailwindcss.com/docs/placeholder-color
1740
+ */
1741
+ "placeholder-color": [{
1742
+ placeholder: scaleColor()
1743
+ }],
1744
+ /**
1745
+ * Text Color
1746
+ * @see https://tailwindcss.com/docs/text-color
1747
+ */
1748
+ "text-color": [{
1749
+ text: scaleColor()
1750
+ }],
1751
+ /**
1752
+ * Text Decoration
1753
+ * @see https://tailwindcss.com/docs/text-decoration
1754
+ */
1755
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1756
+ /**
1757
+ * Text Decoration Style
1758
+ * @see https://tailwindcss.com/docs/text-decoration-style
1759
+ */
1760
+ "text-decoration-style": [{
1761
+ decoration: [...scaleLineStyle(), "wavy"]
1762
+ }],
1763
+ /**
1764
+ * Text Decoration Thickness
1765
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1766
+ */
1767
+ "text-decoration-thickness": [{
1768
+ decoration: [isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength]
1769
+ }],
1770
+ /**
1771
+ * Text Decoration Color
1772
+ * @see https://tailwindcss.com/docs/text-decoration-color
1773
+ */
1774
+ "text-decoration-color": [{
1775
+ decoration: scaleColor()
1776
+ }],
1777
+ /**
1778
+ * Text Underline Offset
1779
+ * @see https://tailwindcss.com/docs/text-underline-offset
1780
+ */
1781
+ "underline-offset": [{
1782
+ "underline-offset": [isNumber, "auto", isArbitraryVariable, isArbitraryValue]
1783
+ }],
1784
+ /**
1785
+ * Text Transform
1786
+ * @see https://tailwindcss.com/docs/text-transform
1787
+ */
1788
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1789
+ /**
1790
+ * Text Overflow
1791
+ * @see https://tailwindcss.com/docs/text-overflow
1792
+ */
1793
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1794
+ /**
1795
+ * Text Wrap
1796
+ * @see https://tailwindcss.com/docs/text-wrap
1797
+ */
1798
+ "text-wrap": [{
1799
+ text: ["wrap", "nowrap", "balance", "pretty"]
1800
+ }],
1801
+ /**
1802
+ * Text Indent
1803
+ * @see https://tailwindcss.com/docs/text-indent
1804
+ */
1805
+ indent: [{
1806
+ indent: scaleUnambiguousSpacing()
1807
+ }],
1808
+ /**
1809
+ * Vertical Alignment
1810
+ * @see https://tailwindcss.com/docs/vertical-align
1811
+ */
1812
+ "vertical-align": [{
1813
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryVariable, isArbitraryValue]
1814
+ }],
1815
+ /**
1816
+ * Whitespace
1817
+ * @see https://tailwindcss.com/docs/whitespace
1818
+ */
1819
+ whitespace: [{
1820
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1821
+ }],
1822
+ /**
1823
+ * Word Break
1824
+ * @see https://tailwindcss.com/docs/word-break
1825
+ */
1826
+ break: [{
1827
+ break: ["normal", "words", "all", "keep"]
1828
+ }],
1829
+ /**
1830
+ * Overflow Wrap
1831
+ * @see https://tailwindcss.com/docs/overflow-wrap
1832
+ */
1833
+ wrap: [{
1834
+ wrap: ["break-word", "anywhere", "normal"]
1835
+ }],
1836
+ /**
1837
+ * Hyphens
1838
+ * @see https://tailwindcss.com/docs/hyphens
1839
+ */
1840
+ hyphens: [{
1841
+ hyphens: ["none", "manual", "auto"]
1842
+ }],
1843
+ /**
1844
+ * Content
1845
+ * @see https://tailwindcss.com/docs/content
1846
+ */
1847
+ content: [{
1848
+ content: ["none", isArbitraryVariable, isArbitraryValue]
1849
+ }],
1850
+ // -------------------
1851
+ // --- Backgrounds ---
1852
+ // -------------------
1853
+ /**
1854
+ * Background Attachment
1855
+ * @see https://tailwindcss.com/docs/background-attachment
1856
+ */
1857
+ "bg-attachment": [{
1858
+ bg: ["fixed", "local", "scroll"]
1859
+ }],
1860
+ /**
1861
+ * Background Clip
1862
+ * @see https://tailwindcss.com/docs/background-clip
1863
+ */
1864
+ "bg-clip": [{
1865
+ "bg-clip": ["border", "padding", "content", "text"]
1866
+ }],
1867
+ /**
1868
+ * Background Origin
1869
+ * @see https://tailwindcss.com/docs/background-origin
1870
+ */
1871
+ "bg-origin": [{
1872
+ "bg-origin": ["border", "padding", "content"]
1873
+ }],
1874
+ /**
1875
+ * Background Position
1876
+ * @see https://tailwindcss.com/docs/background-position
1877
+ */
1878
+ "bg-position": [{
1879
+ bg: scaleBgPosition()
1880
+ }],
1881
+ /**
1882
+ * Background Repeat
1883
+ * @see https://tailwindcss.com/docs/background-repeat
1884
+ */
1885
+ "bg-repeat": [{
1886
+ bg: scaleBgRepeat()
1887
+ }],
1888
+ /**
1889
+ * Background Size
1890
+ * @see https://tailwindcss.com/docs/background-size
1891
+ */
1892
+ "bg-size": [{
1893
+ bg: scaleBgSize()
1894
+ }],
1895
+ /**
1896
+ * Background Image
1897
+ * @see https://tailwindcss.com/docs/background-image
1898
+ */
1899
+ "bg-image": [{
1900
+ bg: ["none", {
1901
+ linear: [{
1902
+ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1903
+ }, isInteger, isArbitraryVariable, isArbitraryValue],
1904
+ radial: ["", isArbitraryVariable, isArbitraryValue],
1905
+ conic: [isInteger, isArbitraryVariable, isArbitraryValue]
1906
+ }, isArbitraryVariableImage, isArbitraryImage]
1907
+ }],
1908
+ /**
1909
+ * Background Color
1910
+ * @see https://tailwindcss.com/docs/background-color
1911
+ */
1912
+ "bg-color": [{
1913
+ bg: scaleColor()
1914
+ }],
1915
+ /**
1916
+ * Gradient Color Stops From Position
1917
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1918
+ */
1919
+ "gradient-from-pos": [{
1920
+ from: scaleGradientStopPosition()
1921
+ }],
1922
+ /**
1923
+ * Gradient Color Stops Via Position
1924
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1925
+ */
1926
+ "gradient-via-pos": [{
1927
+ via: scaleGradientStopPosition()
1928
+ }],
1929
+ /**
1930
+ * Gradient Color Stops To Position
1931
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1932
+ */
1933
+ "gradient-to-pos": [{
1934
+ to: scaleGradientStopPosition()
1935
+ }],
1936
+ /**
1937
+ * Gradient Color Stops From
1938
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1939
+ */
1940
+ "gradient-from": [{
1941
+ from: scaleColor()
1942
+ }],
1943
+ /**
1944
+ * Gradient Color Stops Via
1945
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1946
+ */
1947
+ "gradient-via": [{
1948
+ via: scaleColor()
1949
+ }],
1950
+ /**
1951
+ * Gradient Color Stops To
1952
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1953
+ */
1954
+ "gradient-to": [{
1955
+ to: scaleColor()
1956
+ }],
1957
+ // ---------------
1958
+ // --- Borders ---
1959
+ // ---------------
1960
+ /**
1961
+ * Border Radius
1962
+ * @see https://tailwindcss.com/docs/border-radius
1963
+ */
1964
+ rounded: [{
1965
+ rounded: scaleRadius()
1966
+ }],
1967
+ /**
1968
+ * Border Radius Start
1969
+ * @see https://tailwindcss.com/docs/border-radius
1970
+ */
1971
+ "rounded-s": [{
1972
+ "rounded-s": scaleRadius()
1973
+ }],
1974
+ /**
1975
+ * Border Radius End
1976
+ * @see https://tailwindcss.com/docs/border-radius
1977
+ */
1978
+ "rounded-e": [{
1979
+ "rounded-e": scaleRadius()
1980
+ }],
1981
+ /**
1982
+ * Border Radius Top
1983
+ * @see https://tailwindcss.com/docs/border-radius
1984
+ */
1985
+ "rounded-t": [{
1986
+ "rounded-t": scaleRadius()
1987
+ }],
1988
+ /**
1989
+ * Border Radius Right
1990
+ * @see https://tailwindcss.com/docs/border-radius
1991
+ */
1992
+ "rounded-r": [{
1993
+ "rounded-r": scaleRadius()
1994
+ }],
1995
+ /**
1996
+ * Border Radius Bottom
1997
+ * @see https://tailwindcss.com/docs/border-radius
1998
+ */
1999
+ "rounded-b": [{
2000
+ "rounded-b": scaleRadius()
2001
+ }],
2002
+ /**
2003
+ * Border Radius Left
2004
+ * @see https://tailwindcss.com/docs/border-radius
2005
+ */
2006
+ "rounded-l": [{
2007
+ "rounded-l": scaleRadius()
2008
+ }],
2009
+ /**
2010
+ * Border Radius Start Start
2011
+ * @see https://tailwindcss.com/docs/border-radius
2012
+ */
2013
+ "rounded-ss": [{
2014
+ "rounded-ss": scaleRadius()
2015
+ }],
2016
+ /**
2017
+ * Border Radius Start End
2018
+ * @see https://tailwindcss.com/docs/border-radius
2019
+ */
2020
+ "rounded-se": [{
2021
+ "rounded-se": scaleRadius()
2022
+ }],
2023
+ /**
2024
+ * Border Radius End End
2025
+ * @see https://tailwindcss.com/docs/border-radius
2026
+ */
2027
+ "rounded-ee": [{
2028
+ "rounded-ee": scaleRadius()
2029
+ }],
2030
+ /**
2031
+ * Border Radius End Start
2032
+ * @see https://tailwindcss.com/docs/border-radius
2033
+ */
2034
+ "rounded-es": [{
2035
+ "rounded-es": scaleRadius()
2036
+ }],
2037
+ /**
2038
+ * Border Radius Top Left
2039
+ * @see https://tailwindcss.com/docs/border-radius
2040
+ */
2041
+ "rounded-tl": [{
2042
+ "rounded-tl": scaleRadius()
2043
+ }],
2044
+ /**
2045
+ * Border Radius Top Right
2046
+ * @see https://tailwindcss.com/docs/border-radius
2047
+ */
2048
+ "rounded-tr": [{
2049
+ "rounded-tr": scaleRadius()
2050
+ }],
2051
+ /**
2052
+ * Border Radius Bottom Right
2053
+ * @see https://tailwindcss.com/docs/border-radius
2054
+ */
2055
+ "rounded-br": [{
2056
+ "rounded-br": scaleRadius()
2057
+ }],
2058
+ /**
2059
+ * Border Radius Bottom Left
2060
+ * @see https://tailwindcss.com/docs/border-radius
2061
+ */
2062
+ "rounded-bl": [{
2063
+ "rounded-bl": scaleRadius()
2064
+ }],
2065
+ /**
2066
+ * Border Width
2067
+ * @see https://tailwindcss.com/docs/border-width
2068
+ */
2069
+ "border-w": [{
2070
+ border: scaleBorderWidth()
2071
+ }],
2072
+ /**
2073
+ * Border Width X
2074
+ * @see https://tailwindcss.com/docs/border-width
2075
+ */
2076
+ "border-w-x": [{
2077
+ "border-x": scaleBorderWidth()
2078
+ }],
2079
+ /**
2080
+ * Border Width Y
2081
+ * @see https://tailwindcss.com/docs/border-width
2082
+ */
2083
+ "border-w-y": [{
2084
+ "border-y": scaleBorderWidth()
2085
+ }],
2086
+ /**
2087
+ * Border Width Start
2088
+ * @see https://tailwindcss.com/docs/border-width
2089
+ */
2090
+ "border-w-s": [{
2091
+ "border-s": scaleBorderWidth()
2092
+ }],
2093
+ /**
2094
+ * Border Width End
2095
+ * @see https://tailwindcss.com/docs/border-width
2096
+ */
2097
+ "border-w-e": [{
2098
+ "border-e": scaleBorderWidth()
2099
+ }],
2100
+ /**
2101
+ * Border Width Top
2102
+ * @see https://tailwindcss.com/docs/border-width
2103
+ */
2104
+ "border-w-t": [{
2105
+ "border-t": scaleBorderWidth()
2106
+ }],
2107
+ /**
2108
+ * Border Width Right
2109
+ * @see https://tailwindcss.com/docs/border-width
2110
+ */
2111
+ "border-w-r": [{
2112
+ "border-r": scaleBorderWidth()
2113
+ }],
2114
+ /**
2115
+ * Border Width Bottom
2116
+ * @see https://tailwindcss.com/docs/border-width
2117
+ */
2118
+ "border-w-b": [{
2119
+ "border-b": scaleBorderWidth()
2120
+ }],
2121
+ /**
2122
+ * Border Width Left
2123
+ * @see https://tailwindcss.com/docs/border-width
2124
+ */
2125
+ "border-w-l": [{
2126
+ "border-l": scaleBorderWidth()
2127
+ }],
2128
+ /**
2129
+ * Divide Width X
2130
+ * @see https://tailwindcss.com/docs/border-width#between-children
2131
+ */
2132
+ "divide-x": [{
2133
+ "divide-x": scaleBorderWidth()
2134
+ }],
2135
+ /**
2136
+ * Divide Width X Reverse
2137
+ * @see https://tailwindcss.com/docs/border-width#between-children
2138
+ */
2139
+ "divide-x-reverse": ["divide-x-reverse"],
2140
+ /**
2141
+ * Divide Width Y
2142
+ * @see https://tailwindcss.com/docs/border-width#between-children
2143
+ */
2144
+ "divide-y": [{
2145
+ "divide-y": scaleBorderWidth()
2146
+ }],
2147
+ /**
2148
+ * Divide Width Y Reverse
2149
+ * @see https://tailwindcss.com/docs/border-width#between-children
2150
+ */
2151
+ "divide-y-reverse": ["divide-y-reverse"],
2152
+ /**
2153
+ * Border Style
2154
+ * @see https://tailwindcss.com/docs/border-style
2155
+ */
2156
+ "border-style": [{
2157
+ border: [...scaleLineStyle(), "hidden", "none"]
2158
+ }],
2159
+ /**
2160
+ * Divide Style
2161
+ * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
2162
+ */
2163
+ "divide-style": [{
2164
+ divide: [...scaleLineStyle(), "hidden", "none"]
2165
+ }],
2166
+ /**
2167
+ * Border Color
2168
+ * @see https://tailwindcss.com/docs/border-color
2169
+ */
2170
+ "border-color": [{
2171
+ border: scaleColor()
2172
+ }],
2173
+ /**
2174
+ * Border Color X
2175
+ * @see https://tailwindcss.com/docs/border-color
2176
+ */
2177
+ "border-color-x": [{
2178
+ "border-x": scaleColor()
2179
+ }],
2180
+ /**
2181
+ * Border Color Y
2182
+ * @see https://tailwindcss.com/docs/border-color
2183
+ */
2184
+ "border-color-y": [{
2185
+ "border-y": scaleColor()
2186
+ }],
2187
+ /**
2188
+ * Border Color S
2189
+ * @see https://tailwindcss.com/docs/border-color
2190
+ */
2191
+ "border-color-s": [{
2192
+ "border-s": scaleColor()
2193
+ }],
2194
+ /**
2195
+ * Border Color E
2196
+ * @see https://tailwindcss.com/docs/border-color
2197
+ */
2198
+ "border-color-e": [{
2199
+ "border-e": scaleColor()
2200
+ }],
2201
+ /**
2202
+ * Border Color Top
2203
+ * @see https://tailwindcss.com/docs/border-color
2204
+ */
2205
+ "border-color-t": [{
2206
+ "border-t": scaleColor()
2207
+ }],
2208
+ /**
2209
+ * Border Color Right
2210
+ * @see https://tailwindcss.com/docs/border-color
2211
+ */
2212
+ "border-color-r": [{
2213
+ "border-r": scaleColor()
2214
+ }],
2215
+ /**
2216
+ * Border Color Bottom
2217
+ * @see https://tailwindcss.com/docs/border-color
2218
+ */
2219
+ "border-color-b": [{
2220
+ "border-b": scaleColor()
2221
+ }],
2222
+ /**
2223
+ * Border Color Left
2224
+ * @see https://tailwindcss.com/docs/border-color
2225
+ */
2226
+ "border-color-l": [{
2227
+ "border-l": scaleColor()
2228
+ }],
2229
+ /**
2230
+ * Divide Color
2231
+ * @see https://tailwindcss.com/docs/divide-color
2232
+ */
2233
+ "divide-color": [{
2234
+ divide: scaleColor()
2235
+ }],
2236
+ /**
2237
+ * Outline Style
2238
+ * @see https://tailwindcss.com/docs/outline-style
2239
+ */
2240
+ "outline-style": [{
2241
+ outline: [...scaleLineStyle(), "none", "hidden"]
2242
+ }],
2243
+ /**
2244
+ * Outline Offset
2245
+ * @see https://tailwindcss.com/docs/outline-offset
2246
+ */
2247
+ "outline-offset": [{
2248
+ "outline-offset": [isNumber, isArbitraryVariable, isArbitraryValue]
2249
+ }],
2250
+ /**
2251
+ * Outline Width
2252
+ * @see https://tailwindcss.com/docs/outline-width
2253
+ */
2254
+ "outline-w": [{
2255
+ outline: ["", isNumber, isArbitraryVariableLength, isArbitraryLength]
2256
+ }],
2257
+ /**
2258
+ * Outline Color
2259
+ * @see https://tailwindcss.com/docs/outline-color
2260
+ */
2261
+ "outline-color": [{
2262
+ outline: scaleColor()
2263
+ }],
2264
+ // ---------------
2265
+ // --- Effects ---
2266
+ // ---------------
2267
+ /**
2268
+ * Box Shadow
2269
+ * @see https://tailwindcss.com/docs/box-shadow
2270
+ */
2271
+ shadow: [{
2272
+ shadow: [
2273
+ // Deprecated since Tailwind CSS v4.0.0
2274
+ "",
2275
+ "none",
2276
+ themeShadow,
2277
+ isArbitraryVariableShadow,
2278
+ isArbitraryShadow
2279
+ ]
2280
+ }],
2281
+ /**
2282
+ * Box Shadow Color
2283
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
2284
+ */
2285
+ "shadow-color": [{
2286
+ shadow: scaleColor()
2287
+ }],
2288
+ /**
2289
+ * Inset Box Shadow
2290
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
2291
+ */
2292
+ "inset-shadow": [{
2293
+ "inset-shadow": ["none", themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
2294
+ }],
2295
+ /**
2296
+ * Inset Box Shadow Color
2297
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
2298
+ */
2299
+ "inset-shadow-color": [{
2300
+ "inset-shadow": scaleColor()
2301
+ }],
2302
+ /**
2303
+ * Ring Width
2304
+ * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
2305
+ */
2306
+ "ring-w": [{
2307
+ ring: scaleBorderWidth()
2308
+ }],
2309
+ /**
2310
+ * Ring Width Inset
2311
+ * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
2312
+ * @deprecated since Tailwind CSS v4.0.0
2313
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2314
+ */
2315
+ "ring-w-inset": ["ring-inset"],
2316
+ /**
2317
+ * Ring Color
2318
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
2319
+ */
2320
+ "ring-color": [{
2321
+ ring: scaleColor()
2322
+ }],
2323
+ /**
2324
+ * Ring Offset Width
2325
+ * @see https://v3.tailwindcss.com/docs/ring-offset-width
2326
+ * @deprecated since Tailwind CSS v4.0.0
2327
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2328
+ */
2329
+ "ring-offset-w": [{
2330
+ "ring-offset": [isNumber, isArbitraryLength]
2331
+ }],
2332
+ /**
2333
+ * Ring Offset Color
2334
+ * @see https://v3.tailwindcss.com/docs/ring-offset-color
2335
+ * @deprecated since Tailwind CSS v4.0.0
2336
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2337
+ */
2338
+ "ring-offset-color": [{
2339
+ "ring-offset": scaleColor()
2340
+ }],
2341
+ /**
2342
+ * Inset Ring Width
2343
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
2344
+ */
2345
+ "inset-ring-w": [{
2346
+ "inset-ring": scaleBorderWidth()
2347
+ }],
2348
+ /**
2349
+ * Inset Ring Color
2350
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
2351
+ */
2352
+ "inset-ring-color": [{
2353
+ "inset-ring": scaleColor()
2354
+ }],
2355
+ /**
2356
+ * Text Shadow
2357
+ * @see https://tailwindcss.com/docs/text-shadow
2358
+ */
2359
+ "text-shadow": [{
2360
+ "text-shadow": ["none", themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
2361
+ }],
2362
+ /**
2363
+ * Text Shadow Color
2364
+ * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
2365
+ */
2366
+ "text-shadow-color": [{
2367
+ "text-shadow": scaleColor()
2368
+ }],
2369
+ /**
2370
+ * Opacity
2371
+ * @see https://tailwindcss.com/docs/opacity
2372
+ */
2373
+ opacity: [{
2374
+ opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
2375
+ }],
2376
+ /**
2377
+ * Mix Blend Mode
2378
+ * @see https://tailwindcss.com/docs/mix-blend-mode
2379
+ */
2380
+ "mix-blend": [{
2381
+ "mix-blend": [...scaleBlendMode(), "plus-darker", "plus-lighter"]
2382
+ }],
2383
+ /**
2384
+ * Background Blend Mode
2385
+ * @see https://tailwindcss.com/docs/background-blend-mode
2386
+ */
2387
+ "bg-blend": [{
2388
+ "bg-blend": scaleBlendMode()
2389
+ }],
2390
+ /**
2391
+ * Mask Clip
2392
+ * @see https://tailwindcss.com/docs/mask-clip
2393
+ */
2394
+ "mask-clip": [{
2395
+ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
2396
+ }, "mask-no-clip"],
2397
+ /**
2398
+ * Mask Composite
2399
+ * @see https://tailwindcss.com/docs/mask-composite
2400
+ */
2401
+ "mask-composite": [{
2402
+ mask: ["add", "subtract", "intersect", "exclude"]
2403
+ }],
2404
+ /**
2405
+ * Mask Image
2406
+ * @see https://tailwindcss.com/docs/mask-image
2407
+ */
2408
+ "mask-image-linear-pos": [{
2409
+ "mask-linear": [isNumber]
2410
+ }],
2411
+ "mask-image-linear-from-pos": [{
2412
+ "mask-linear-from": scaleMaskImagePosition()
2413
+ }],
2414
+ "mask-image-linear-to-pos": [{
2415
+ "mask-linear-to": scaleMaskImagePosition()
2416
+ }],
2417
+ "mask-image-linear-from-color": [{
2418
+ "mask-linear-from": scaleColor()
2419
+ }],
2420
+ "mask-image-linear-to-color": [{
2421
+ "mask-linear-to": scaleColor()
2422
+ }],
2423
+ "mask-image-t-from-pos": [{
2424
+ "mask-t-from": scaleMaskImagePosition()
2425
+ }],
2426
+ "mask-image-t-to-pos": [{
2427
+ "mask-t-to": scaleMaskImagePosition()
2428
+ }],
2429
+ "mask-image-t-from-color": [{
2430
+ "mask-t-from": scaleColor()
2431
+ }],
2432
+ "mask-image-t-to-color": [{
2433
+ "mask-t-to": scaleColor()
2434
+ }],
2435
+ "mask-image-r-from-pos": [{
2436
+ "mask-r-from": scaleMaskImagePosition()
2437
+ }],
2438
+ "mask-image-r-to-pos": [{
2439
+ "mask-r-to": scaleMaskImagePosition()
2440
+ }],
2441
+ "mask-image-r-from-color": [{
2442
+ "mask-r-from": scaleColor()
2443
+ }],
2444
+ "mask-image-r-to-color": [{
2445
+ "mask-r-to": scaleColor()
2446
+ }],
2447
+ "mask-image-b-from-pos": [{
2448
+ "mask-b-from": scaleMaskImagePosition()
2449
+ }],
2450
+ "mask-image-b-to-pos": [{
2451
+ "mask-b-to": scaleMaskImagePosition()
2452
+ }],
2453
+ "mask-image-b-from-color": [{
2454
+ "mask-b-from": scaleColor()
2455
+ }],
2456
+ "mask-image-b-to-color": [{
2457
+ "mask-b-to": scaleColor()
2458
+ }],
2459
+ "mask-image-l-from-pos": [{
2460
+ "mask-l-from": scaleMaskImagePosition()
2461
+ }],
2462
+ "mask-image-l-to-pos": [{
2463
+ "mask-l-to": scaleMaskImagePosition()
2464
+ }],
2465
+ "mask-image-l-from-color": [{
2466
+ "mask-l-from": scaleColor()
2467
+ }],
2468
+ "mask-image-l-to-color": [{
2469
+ "mask-l-to": scaleColor()
2470
+ }],
2471
+ "mask-image-x-from-pos": [{
2472
+ "mask-x-from": scaleMaskImagePosition()
2473
+ }],
2474
+ "mask-image-x-to-pos": [{
2475
+ "mask-x-to": scaleMaskImagePosition()
2476
+ }],
2477
+ "mask-image-x-from-color": [{
2478
+ "mask-x-from": scaleColor()
2479
+ }],
2480
+ "mask-image-x-to-color": [{
2481
+ "mask-x-to": scaleColor()
2482
+ }],
2483
+ "mask-image-y-from-pos": [{
2484
+ "mask-y-from": scaleMaskImagePosition()
2485
+ }],
2486
+ "mask-image-y-to-pos": [{
2487
+ "mask-y-to": scaleMaskImagePosition()
2488
+ }],
2489
+ "mask-image-y-from-color": [{
2490
+ "mask-y-from": scaleColor()
2491
+ }],
2492
+ "mask-image-y-to-color": [{
2493
+ "mask-y-to": scaleColor()
2494
+ }],
2495
+ "mask-image-radial": [{
2496
+ "mask-radial": [isArbitraryVariable, isArbitraryValue]
2497
+ }],
2498
+ "mask-image-radial-from-pos": [{
2499
+ "mask-radial-from": scaleMaskImagePosition()
2500
+ }],
2501
+ "mask-image-radial-to-pos": [{
2502
+ "mask-radial-to": scaleMaskImagePosition()
2503
+ }],
2504
+ "mask-image-radial-from-color": [{
2505
+ "mask-radial-from": scaleColor()
2506
+ }],
2507
+ "mask-image-radial-to-color": [{
2508
+ "mask-radial-to": scaleColor()
2509
+ }],
2510
+ "mask-image-radial-shape": [{
2511
+ "mask-radial": ["circle", "ellipse"]
2512
+ }],
2513
+ "mask-image-radial-size": [{
2514
+ "mask-radial": [{
2515
+ closest: ["side", "corner"],
2516
+ farthest: ["side", "corner"]
2517
+ }]
2518
+ }],
2519
+ "mask-image-radial-pos": [{
2520
+ "mask-radial-at": scalePosition()
2521
+ }],
2522
+ "mask-image-conic-pos": [{
2523
+ "mask-conic": [isNumber]
2524
+ }],
2525
+ "mask-image-conic-from-pos": [{
2526
+ "mask-conic-from": scaleMaskImagePosition()
2527
+ }],
2528
+ "mask-image-conic-to-pos": [{
2529
+ "mask-conic-to": scaleMaskImagePosition()
2530
+ }],
2531
+ "mask-image-conic-from-color": [{
2532
+ "mask-conic-from": scaleColor()
2533
+ }],
2534
+ "mask-image-conic-to-color": [{
2535
+ "mask-conic-to": scaleColor()
2536
+ }],
2537
+ /**
2538
+ * Mask Mode
2539
+ * @see https://tailwindcss.com/docs/mask-mode
2540
+ */
2541
+ "mask-mode": [{
2542
+ mask: ["alpha", "luminance", "match"]
2543
+ }],
2544
+ /**
2545
+ * Mask Origin
2546
+ * @see https://tailwindcss.com/docs/mask-origin
2547
+ */
2548
+ "mask-origin": [{
2549
+ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
2550
+ }],
2551
+ /**
2552
+ * Mask Position
2553
+ * @see https://tailwindcss.com/docs/mask-position
2554
+ */
2555
+ "mask-position": [{
2556
+ mask: scaleBgPosition()
2557
+ }],
2558
+ /**
2559
+ * Mask Repeat
2560
+ * @see https://tailwindcss.com/docs/mask-repeat
2561
+ */
2562
+ "mask-repeat": [{
2563
+ mask: scaleBgRepeat()
2564
+ }],
2565
+ /**
2566
+ * Mask Size
2567
+ * @see https://tailwindcss.com/docs/mask-size
2568
+ */
2569
+ "mask-size": [{
2570
+ mask: scaleBgSize()
2571
+ }],
2572
+ /**
2573
+ * Mask Type
2574
+ * @see https://tailwindcss.com/docs/mask-type
2575
+ */
2576
+ "mask-type": [{
2577
+ "mask-type": ["alpha", "luminance"]
2578
+ }],
2579
+ /**
2580
+ * Mask Image
2581
+ * @see https://tailwindcss.com/docs/mask-image
2582
+ */
2583
+ "mask-image": [{
2584
+ mask: ["none", isArbitraryVariable, isArbitraryValue]
2585
+ }],
2586
+ // ---------------
2587
+ // --- Filters ---
2588
+ // ---------------
2589
+ /**
2590
+ * Filter
2591
+ * @see https://tailwindcss.com/docs/filter
2592
+ */
2593
+ filter: [{
2594
+ filter: [
2595
+ // Deprecated since Tailwind CSS v3.0.0
2596
+ "",
2597
+ "none",
2598
+ isArbitraryVariable,
2599
+ isArbitraryValue
2600
+ ]
2601
+ }],
2602
+ /**
2603
+ * Blur
2604
+ * @see https://tailwindcss.com/docs/blur
2605
+ */
2606
+ blur: [{
2607
+ blur: scaleBlur()
2608
+ }],
2609
+ /**
2610
+ * Brightness
2611
+ * @see https://tailwindcss.com/docs/brightness
2612
+ */
2613
+ brightness: [{
2614
+ brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
2615
+ }],
2616
+ /**
2617
+ * Contrast
2618
+ * @see https://tailwindcss.com/docs/contrast
2619
+ */
2620
+ contrast: [{
2621
+ contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
2622
+ }],
2623
+ /**
2624
+ * Drop Shadow
2625
+ * @see https://tailwindcss.com/docs/drop-shadow
2626
+ */
2627
+ "drop-shadow": [{
2628
+ "drop-shadow": [
2629
+ // Deprecated since Tailwind CSS v4.0.0
2630
+ "",
2631
+ "none",
2632
+ themeDropShadow,
2633
+ isArbitraryVariableShadow,
2634
+ isArbitraryShadow
2635
+ ]
2636
+ }],
2637
+ /**
2638
+ * Drop Shadow Color
2639
+ * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
2640
+ */
2641
+ "drop-shadow-color": [{
2642
+ "drop-shadow": scaleColor()
2643
+ }],
2644
+ /**
2645
+ * Grayscale
2646
+ * @see https://tailwindcss.com/docs/grayscale
2647
+ */
2648
+ grayscale: [{
2649
+ grayscale: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2650
+ }],
2651
+ /**
2652
+ * Hue Rotate
2653
+ * @see https://tailwindcss.com/docs/hue-rotate
2654
+ */
2655
+ "hue-rotate": [{
2656
+ "hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2657
+ }],
2658
+ /**
2659
+ * Invert
2660
+ * @see https://tailwindcss.com/docs/invert
2661
+ */
2662
+ invert: [{
2663
+ invert: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2664
+ }],
2665
+ /**
2666
+ * Saturate
2667
+ * @see https://tailwindcss.com/docs/saturate
2668
+ */
2669
+ saturate: [{
2670
+ saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
2671
+ }],
2672
+ /**
2673
+ * Sepia
2674
+ * @see https://tailwindcss.com/docs/sepia
2675
+ */
2676
+ sepia: [{
2677
+ sepia: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2678
+ }],
2679
+ /**
2680
+ * Backdrop Filter
2681
+ * @see https://tailwindcss.com/docs/backdrop-filter
2682
+ */
2683
+ "backdrop-filter": [{
2684
+ "backdrop-filter": [
2685
+ // Deprecated since Tailwind CSS v3.0.0
2686
+ "",
2687
+ "none",
2688
+ isArbitraryVariable,
2689
+ isArbitraryValue
2690
+ ]
2691
+ }],
2692
+ /**
2693
+ * Backdrop Blur
2694
+ * @see https://tailwindcss.com/docs/backdrop-blur
2695
+ */
2696
+ "backdrop-blur": [{
2697
+ "backdrop-blur": scaleBlur()
2698
+ }],
2699
+ /**
2700
+ * Backdrop Brightness
2701
+ * @see https://tailwindcss.com/docs/backdrop-brightness
2702
+ */
2703
+ "backdrop-brightness": [{
2704
+ "backdrop-brightness": [isNumber, isArbitraryVariable, isArbitraryValue]
2705
+ }],
2706
+ /**
2707
+ * Backdrop Contrast
2708
+ * @see https://tailwindcss.com/docs/backdrop-contrast
2709
+ */
2710
+ "backdrop-contrast": [{
2711
+ "backdrop-contrast": [isNumber, isArbitraryVariable, isArbitraryValue]
2712
+ }],
2713
+ /**
2714
+ * Backdrop Grayscale
2715
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
2716
+ */
2717
+ "backdrop-grayscale": [{
2718
+ "backdrop-grayscale": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2719
+ }],
2720
+ /**
2721
+ * Backdrop Hue Rotate
2722
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2723
+ */
2724
+ "backdrop-hue-rotate": [{
2725
+ "backdrop-hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2726
+ }],
2727
+ /**
2728
+ * Backdrop Invert
2729
+ * @see https://tailwindcss.com/docs/backdrop-invert
2730
+ */
2731
+ "backdrop-invert": [{
2732
+ "backdrop-invert": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2733
+ }],
2734
+ /**
2735
+ * Backdrop Opacity
2736
+ * @see https://tailwindcss.com/docs/backdrop-opacity
2737
+ */
2738
+ "backdrop-opacity": [{
2739
+ "backdrop-opacity": [isNumber, isArbitraryVariable, isArbitraryValue]
2740
+ }],
2741
+ /**
2742
+ * Backdrop Saturate
2743
+ * @see https://tailwindcss.com/docs/backdrop-saturate
2744
+ */
2745
+ "backdrop-saturate": [{
2746
+ "backdrop-saturate": [isNumber, isArbitraryVariable, isArbitraryValue]
2747
+ }],
2748
+ /**
2749
+ * Backdrop Sepia
2750
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2751
+ */
2752
+ "backdrop-sepia": [{
2753
+ "backdrop-sepia": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2754
+ }],
2755
+ // --------------
2756
+ // --- Tables ---
2757
+ // --------------
2758
+ /**
2759
+ * Border Collapse
2760
+ * @see https://tailwindcss.com/docs/border-collapse
2761
+ */
2762
+ "border-collapse": [{
2763
+ border: ["collapse", "separate"]
2764
+ }],
2765
+ /**
2766
+ * Border Spacing
2767
+ * @see https://tailwindcss.com/docs/border-spacing
2768
+ */
2769
+ "border-spacing": [{
2770
+ "border-spacing": scaleUnambiguousSpacing()
2771
+ }],
2772
+ /**
2773
+ * Border Spacing X
2774
+ * @see https://tailwindcss.com/docs/border-spacing
2775
+ */
2776
+ "border-spacing-x": [{
2777
+ "border-spacing-x": scaleUnambiguousSpacing()
2778
+ }],
2779
+ /**
2780
+ * Border Spacing Y
2781
+ * @see https://tailwindcss.com/docs/border-spacing
2782
+ */
2783
+ "border-spacing-y": [{
2784
+ "border-spacing-y": scaleUnambiguousSpacing()
2785
+ }],
2786
+ /**
2787
+ * Table Layout
2788
+ * @see https://tailwindcss.com/docs/table-layout
2789
+ */
2790
+ "table-layout": [{
2791
+ table: ["auto", "fixed"]
2792
+ }],
2793
+ /**
2794
+ * Caption Side
2795
+ * @see https://tailwindcss.com/docs/caption-side
2796
+ */
2797
+ caption: [{
2798
+ caption: ["top", "bottom"]
2799
+ }],
2800
+ // ---------------------------------
2801
+ // --- Transitions and Animation ---
2802
+ // ---------------------------------
2803
+ /**
2804
+ * Transition Property
2805
+ * @see https://tailwindcss.com/docs/transition-property
2806
+ */
2807
+ transition: [{
2808
+ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", isArbitraryVariable, isArbitraryValue]
2809
+ }],
2810
+ /**
2811
+ * Transition Behavior
2812
+ * @see https://tailwindcss.com/docs/transition-behavior
2813
+ */
2814
+ "transition-behavior": [{
2815
+ transition: ["normal", "discrete"]
2816
+ }],
2817
+ /**
2818
+ * Transition Duration
2819
+ * @see https://tailwindcss.com/docs/transition-duration
2820
+ */
2821
+ duration: [{
2822
+ duration: [isNumber, "initial", isArbitraryVariable, isArbitraryValue]
2823
+ }],
2824
+ /**
2825
+ * Transition Timing Function
2826
+ * @see https://tailwindcss.com/docs/transition-timing-function
2827
+ */
2828
+ ease: [{
2829
+ ease: ["linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue]
2830
+ }],
2831
+ /**
2832
+ * Transition Delay
2833
+ * @see https://tailwindcss.com/docs/transition-delay
2834
+ */
2835
+ delay: [{
2836
+ delay: [isNumber, isArbitraryVariable, isArbitraryValue]
2837
+ }],
2838
+ /**
2839
+ * Animation
2840
+ * @see https://tailwindcss.com/docs/animation
2841
+ */
2842
+ animate: [{
2843
+ animate: ["none", themeAnimate, isArbitraryVariable, isArbitraryValue]
2844
+ }],
2845
+ // ------------------
2846
+ // --- Transforms ---
2847
+ // ------------------
2848
+ /**
2849
+ * Backface Visibility
2850
+ * @see https://tailwindcss.com/docs/backface-visibility
2851
+ */
2852
+ backface: [{
2853
+ backface: ["hidden", "visible"]
2854
+ }],
2855
+ /**
2856
+ * Perspective
2857
+ * @see https://tailwindcss.com/docs/perspective
2858
+ */
2859
+ perspective: [{
2860
+ perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
2861
+ }],
2862
+ /**
2863
+ * Perspective Origin
2864
+ * @see https://tailwindcss.com/docs/perspective-origin
2865
+ */
2866
+ "perspective-origin": [{
2867
+ "perspective-origin": scalePositionWithArbitrary()
2868
+ }],
2869
+ /**
2870
+ * Rotate
2871
+ * @see https://tailwindcss.com/docs/rotate
2872
+ */
2873
+ rotate: [{
2874
+ rotate: scaleRotate()
2875
+ }],
2876
+ /**
2877
+ * Rotate X
2878
+ * @see https://tailwindcss.com/docs/rotate
2879
+ */
2880
+ "rotate-x": [{
2881
+ "rotate-x": scaleRotate()
2882
+ }],
2883
+ /**
2884
+ * Rotate Y
2885
+ * @see https://tailwindcss.com/docs/rotate
2886
+ */
2887
+ "rotate-y": [{
2888
+ "rotate-y": scaleRotate()
2889
+ }],
2890
+ /**
2891
+ * Rotate Z
2892
+ * @see https://tailwindcss.com/docs/rotate
2893
+ */
2894
+ "rotate-z": [{
2895
+ "rotate-z": scaleRotate()
2896
+ }],
2897
+ /**
2898
+ * Scale
2899
+ * @see https://tailwindcss.com/docs/scale
2900
+ */
2901
+ scale: [{
2902
+ scale: scaleScale()
2903
+ }],
2904
+ /**
2905
+ * Scale X
2906
+ * @see https://tailwindcss.com/docs/scale
2907
+ */
2908
+ "scale-x": [{
2909
+ "scale-x": scaleScale()
2910
+ }],
2911
+ /**
2912
+ * Scale Y
2913
+ * @see https://tailwindcss.com/docs/scale
2914
+ */
2915
+ "scale-y": [{
2916
+ "scale-y": scaleScale()
2917
+ }],
2918
+ /**
2919
+ * Scale Z
2920
+ * @see https://tailwindcss.com/docs/scale
2921
+ */
2922
+ "scale-z": [{
2923
+ "scale-z": scaleScale()
2924
+ }],
2925
+ /**
2926
+ * Scale 3D
2927
+ * @see https://tailwindcss.com/docs/scale
2928
+ */
2929
+ "scale-3d": ["scale-3d"],
2930
+ /**
2931
+ * Skew
2932
+ * @see https://tailwindcss.com/docs/skew
2933
+ */
2934
+ skew: [{
2935
+ skew: scaleSkew()
2936
+ }],
2937
+ /**
2938
+ * Skew X
2939
+ * @see https://tailwindcss.com/docs/skew
2940
+ */
2941
+ "skew-x": [{
2942
+ "skew-x": scaleSkew()
2943
+ }],
2944
+ /**
2945
+ * Skew Y
2946
+ * @see https://tailwindcss.com/docs/skew
2947
+ */
2948
+ "skew-y": [{
2949
+ "skew-y": scaleSkew()
2950
+ }],
2951
+ /**
2952
+ * Transform
2953
+ * @see https://tailwindcss.com/docs/transform
2954
+ */
2955
+ transform: [{
2956
+ transform: [isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu"]
2957
+ }],
2958
+ /**
2959
+ * Transform Origin
2960
+ * @see https://tailwindcss.com/docs/transform-origin
2961
+ */
2962
+ "transform-origin": [{
2963
+ origin: scalePositionWithArbitrary()
2964
+ }],
2965
+ /**
2966
+ * Transform Style
2967
+ * @see https://tailwindcss.com/docs/transform-style
2968
+ */
2969
+ "transform-style": [{
2970
+ transform: ["3d", "flat"]
2971
+ }],
2972
+ /**
2973
+ * Translate
2974
+ * @see https://tailwindcss.com/docs/translate
2975
+ */
2976
+ translate: [{
2977
+ translate: scaleTranslate()
2978
+ }],
2979
+ /**
2980
+ * Translate X
2981
+ * @see https://tailwindcss.com/docs/translate
2982
+ */
2983
+ "translate-x": [{
2984
+ "translate-x": scaleTranslate()
2985
+ }],
2986
+ /**
2987
+ * Translate Y
2988
+ * @see https://tailwindcss.com/docs/translate
2989
+ */
2990
+ "translate-y": [{
2991
+ "translate-y": scaleTranslate()
2992
+ }],
2993
+ /**
2994
+ * Translate Z
2995
+ * @see https://tailwindcss.com/docs/translate
2996
+ */
2997
+ "translate-z": [{
2998
+ "translate-z": scaleTranslate()
2999
+ }],
3000
+ /**
3001
+ * Translate None
3002
+ * @see https://tailwindcss.com/docs/translate
3003
+ */
3004
+ "translate-none": ["translate-none"],
3005
+ // ---------------------
3006
+ // --- Interactivity ---
3007
+ // ---------------------
3008
+ /**
3009
+ * Accent Color
3010
+ * @see https://tailwindcss.com/docs/accent-color
3011
+ */
3012
+ accent: [{
3013
+ accent: scaleColor()
3014
+ }],
3015
+ /**
3016
+ * Appearance
3017
+ * @see https://tailwindcss.com/docs/appearance
3018
+ */
3019
+ appearance: [{
3020
+ appearance: ["none", "auto"]
3021
+ }],
3022
+ /**
3023
+ * Caret Color
3024
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
3025
+ */
3026
+ "caret-color": [{
3027
+ caret: scaleColor()
3028
+ }],
3029
+ /**
3030
+ * Color Scheme
3031
+ * @see https://tailwindcss.com/docs/color-scheme
3032
+ */
3033
+ "color-scheme": [{
3034
+ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
3035
+ }],
3036
+ /**
3037
+ * Cursor
3038
+ * @see https://tailwindcss.com/docs/cursor
3039
+ */
3040
+ cursor: [{
3041
+ cursor: ["auto", "default", "pointer", "wait", "text", "move", "help", "not-allowed", "none", "context-menu", "progress", "cell", "crosshair", "vertical-text", "alias", "copy", "no-drop", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out", isArbitraryVariable, isArbitraryValue]
3042
+ }],
3043
+ /**
3044
+ * Field Sizing
3045
+ * @see https://tailwindcss.com/docs/field-sizing
3046
+ */
3047
+ "field-sizing": [{
3048
+ "field-sizing": ["fixed", "content"]
3049
+ }],
3050
+ /**
3051
+ * Pointer Events
3052
+ * @see https://tailwindcss.com/docs/pointer-events
3053
+ */
3054
+ "pointer-events": [{
3055
+ "pointer-events": ["auto", "none"]
3056
+ }],
3057
+ /**
3058
+ * Resize
3059
+ * @see https://tailwindcss.com/docs/resize
3060
+ */
3061
+ resize: [{
3062
+ resize: ["none", "", "y", "x"]
3063
+ }],
3064
+ /**
3065
+ * Scroll Behavior
3066
+ * @see https://tailwindcss.com/docs/scroll-behavior
3067
+ */
3068
+ "scroll-behavior": [{
3069
+ scroll: ["auto", "smooth"]
3070
+ }],
3071
+ /**
3072
+ * Scroll Margin
3073
+ * @see https://tailwindcss.com/docs/scroll-margin
3074
+ */
3075
+ "scroll-m": [{
3076
+ "scroll-m": scaleUnambiguousSpacing()
3077
+ }],
3078
+ /**
3079
+ * Scroll Margin X
3080
+ * @see https://tailwindcss.com/docs/scroll-margin
3081
+ */
3082
+ "scroll-mx": [{
3083
+ "scroll-mx": scaleUnambiguousSpacing()
3084
+ }],
3085
+ /**
3086
+ * Scroll Margin Y
3087
+ * @see https://tailwindcss.com/docs/scroll-margin
3088
+ */
3089
+ "scroll-my": [{
3090
+ "scroll-my": scaleUnambiguousSpacing()
3091
+ }],
3092
+ /**
3093
+ * Scroll Margin Start
3094
+ * @see https://tailwindcss.com/docs/scroll-margin
3095
+ */
3096
+ "scroll-ms": [{
3097
+ "scroll-ms": scaleUnambiguousSpacing()
3098
+ }],
3099
+ /**
3100
+ * Scroll Margin End
3101
+ * @see https://tailwindcss.com/docs/scroll-margin
3102
+ */
3103
+ "scroll-me": [{
3104
+ "scroll-me": scaleUnambiguousSpacing()
3105
+ }],
3106
+ /**
3107
+ * Scroll Margin Top
3108
+ * @see https://tailwindcss.com/docs/scroll-margin
3109
+ */
3110
+ "scroll-mt": [{
3111
+ "scroll-mt": scaleUnambiguousSpacing()
3112
+ }],
3113
+ /**
3114
+ * Scroll Margin Right
3115
+ * @see https://tailwindcss.com/docs/scroll-margin
3116
+ */
3117
+ "scroll-mr": [{
3118
+ "scroll-mr": scaleUnambiguousSpacing()
3119
+ }],
3120
+ /**
3121
+ * Scroll Margin Bottom
3122
+ * @see https://tailwindcss.com/docs/scroll-margin
3123
+ */
3124
+ "scroll-mb": [{
3125
+ "scroll-mb": scaleUnambiguousSpacing()
3126
+ }],
3127
+ /**
3128
+ * Scroll Margin Left
3129
+ * @see https://tailwindcss.com/docs/scroll-margin
3130
+ */
3131
+ "scroll-ml": [{
3132
+ "scroll-ml": scaleUnambiguousSpacing()
3133
+ }],
3134
+ /**
3135
+ * Scroll Padding
3136
+ * @see https://tailwindcss.com/docs/scroll-padding
3137
+ */
3138
+ "scroll-p": [{
3139
+ "scroll-p": scaleUnambiguousSpacing()
3140
+ }],
3141
+ /**
3142
+ * Scroll Padding X
3143
+ * @see https://tailwindcss.com/docs/scroll-padding
3144
+ */
3145
+ "scroll-px": [{
3146
+ "scroll-px": scaleUnambiguousSpacing()
3147
+ }],
3148
+ /**
3149
+ * Scroll Padding Y
3150
+ * @see https://tailwindcss.com/docs/scroll-padding
3151
+ */
3152
+ "scroll-py": [{
3153
+ "scroll-py": scaleUnambiguousSpacing()
3154
+ }],
3155
+ /**
3156
+ * Scroll Padding Start
3157
+ * @see https://tailwindcss.com/docs/scroll-padding
3158
+ */
3159
+ "scroll-ps": [{
3160
+ "scroll-ps": scaleUnambiguousSpacing()
3161
+ }],
3162
+ /**
3163
+ * Scroll Padding End
3164
+ * @see https://tailwindcss.com/docs/scroll-padding
3165
+ */
3166
+ "scroll-pe": [{
3167
+ "scroll-pe": scaleUnambiguousSpacing()
3168
+ }],
3169
+ /**
3170
+ * Scroll Padding Top
3171
+ * @see https://tailwindcss.com/docs/scroll-padding
3172
+ */
3173
+ "scroll-pt": [{
3174
+ "scroll-pt": scaleUnambiguousSpacing()
3175
+ }],
3176
+ /**
3177
+ * Scroll Padding Right
3178
+ * @see https://tailwindcss.com/docs/scroll-padding
3179
+ */
3180
+ "scroll-pr": [{
3181
+ "scroll-pr": scaleUnambiguousSpacing()
3182
+ }],
3183
+ /**
3184
+ * Scroll Padding Bottom
3185
+ * @see https://tailwindcss.com/docs/scroll-padding
3186
+ */
3187
+ "scroll-pb": [{
3188
+ "scroll-pb": scaleUnambiguousSpacing()
3189
+ }],
3190
+ /**
3191
+ * Scroll Padding Left
3192
+ * @see https://tailwindcss.com/docs/scroll-padding
3193
+ */
3194
+ "scroll-pl": [{
3195
+ "scroll-pl": scaleUnambiguousSpacing()
3196
+ }],
3197
+ /**
3198
+ * Scroll Snap Align
3199
+ * @see https://tailwindcss.com/docs/scroll-snap-align
3200
+ */
3201
+ "snap-align": [{
3202
+ snap: ["start", "end", "center", "align-none"]
3203
+ }],
3204
+ /**
3205
+ * Scroll Snap Stop
3206
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
3207
+ */
3208
+ "snap-stop": [{
3209
+ snap: ["normal", "always"]
3210
+ }],
3211
+ /**
3212
+ * Scroll Snap Type
3213
+ * @see https://tailwindcss.com/docs/scroll-snap-type
3214
+ */
3215
+ "snap-type": [{
3216
+ snap: ["none", "x", "y", "both"]
3217
+ }],
3218
+ /**
3219
+ * Scroll Snap Type Strictness
3220
+ * @see https://tailwindcss.com/docs/scroll-snap-type
3221
+ */
3222
+ "snap-strictness": [{
3223
+ snap: ["mandatory", "proximity"]
3224
+ }],
3225
+ /**
3226
+ * Touch Action
3227
+ * @see https://tailwindcss.com/docs/touch-action
3228
+ */
3229
+ touch: [{
3230
+ touch: ["auto", "none", "manipulation"]
3231
+ }],
3232
+ /**
3233
+ * Touch Action X
3234
+ * @see https://tailwindcss.com/docs/touch-action
3235
+ */
3236
+ "touch-x": [{
3237
+ "touch-pan": ["x", "left", "right"]
3238
+ }],
3239
+ /**
3240
+ * Touch Action Y
3241
+ * @see https://tailwindcss.com/docs/touch-action
3242
+ */
3243
+ "touch-y": [{
3244
+ "touch-pan": ["y", "up", "down"]
3245
+ }],
3246
+ /**
3247
+ * Touch Action Pinch Zoom
3248
+ * @see https://tailwindcss.com/docs/touch-action
3249
+ */
3250
+ "touch-pz": ["touch-pinch-zoom"],
3251
+ /**
3252
+ * User Select
3253
+ * @see https://tailwindcss.com/docs/user-select
3254
+ */
3255
+ select: [{
3256
+ select: ["none", "text", "all", "auto"]
3257
+ }],
3258
+ /**
3259
+ * Will Change
3260
+ * @see https://tailwindcss.com/docs/will-change
3261
+ */
3262
+ "will-change": [{
3263
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryVariable, isArbitraryValue]
3264
+ }],
3265
+ // -----------
3266
+ // --- SVG ---
3267
+ // -----------
3268
+ /**
3269
+ * Fill
3270
+ * @see https://tailwindcss.com/docs/fill
3271
+ */
3272
+ fill: [{
3273
+ fill: ["none", ...scaleColor()]
3274
+ }],
3275
+ /**
3276
+ * Stroke Width
3277
+ * @see https://tailwindcss.com/docs/stroke-width
3278
+ */
3279
+ "stroke-w": [{
3280
+ stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
3281
+ }],
3282
+ /**
3283
+ * Stroke
3284
+ * @see https://tailwindcss.com/docs/stroke
3285
+ */
3286
+ stroke: [{
3287
+ stroke: ["none", ...scaleColor()]
3288
+ }],
3289
+ // ---------------------
3290
+ // --- Accessibility ---
3291
+ // ---------------------
3292
+ /**
3293
+ * Forced Color Adjust
3294
+ * @see https://tailwindcss.com/docs/forced-color-adjust
3295
+ */
3296
+ "forced-color-adjust": [{
3297
+ "forced-color-adjust": ["auto", "none"]
3298
+ }]
3299
+ },
3300
+ conflictingClassGroups: {
3301
+ overflow: ["overflow-x", "overflow-y"],
3302
+ overscroll: ["overscroll-x", "overscroll-y"],
3303
+ inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
3304
+ "inset-x": ["right", "left"],
3305
+ "inset-y": ["top", "bottom"],
3306
+ flex: ["basis", "grow", "shrink"],
3307
+ gap: ["gap-x", "gap-y"],
3308
+ p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
3309
+ px: ["pr", "pl"],
3310
+ py: ["pt", "pb"],
3311
+ m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
3312
+ mx: ["mr", "ml"],
3313
+ my: ["mt", "mb"],
3314
+ size: ["w", "h"],
3315
+ "font-size": ["leading"],
3316
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
3317
+ "fvn-ordinal": ["fvn-normal"],
3318
+ "fvn-slashed-zero": ["fvn-normal"],
3319
+ "fvn-figure": ["fvn-normal"],
3320
+ "fvn-spacing": ["fvn-normal"],
3321
+ "fvn-fraction": ["fvn-normal"],
3322
+ "line-clamp": ["display", "overflow"],
3323
+ rounded: ["rounded-s", "rounded-e", "rounded-t", "rounded-r", "rounded-b", "rounded-l", "rounded-ss", "rounded-se", "rounded-ee", "rounded-es", "rounded-tl", "rounded-tr", "rounded-br", "rounded-bl"],
3324
+ "rounded-s": ["rounded-ss", "rounded-es"],
3325
+ "rounded-e": ["rounded-se", "rounded-ee"],
3326
+ "rounded-t": ["rounded-tl", "rounded-tr"],
3327
+ "rounded-r": ["rounded-tr", "rounded-br"],
3328
+ "rounded-b": ["rounded-br", "rounded-bl"],
3329
+ "rounded-l": ["rounded-tl", "rounded-bl"],
3330
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
3331
+ "border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
3332
+ "border-w-x": ["border-w-r", "border-w-l"],
3333
+ "border-w-y": ["border-w-t", "border-w-b"],
3334
+ "border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
3335
+ "border-color-x": ["border-color-r", "border-color-l"],
3336
+ "border-color-y": ["border-color-t", "border-color-b"],
3337
+ translate: ["translate-x", "translate-y", "translate-none"],
3338
+ "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
3339
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
3340
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
3341
+ "scroll-my": ["scroll-mt", "scroll-mb"],
3342
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
3343
+ "scroll-px": ["scroll-pr", "scroll-pl"],
3344
+ "scroll-py": ["scroll-pt", "scroll-pb"],
3345
+ touch: ["touch-x", "touch-y", "touch-pz"],
3346
+ "touch-x": ["touch"],
3347
+ "touch-y": ["touch"],
3348
+ "touch-pz": ["touch"]
3349
+ },
3350
+ conflictingClassGroupModifiers: {
3351
+ "font-size": ["leading"]
3352
+ },
3353
+ orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
3354
+ };
3355
+ };
3356
+ const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
3357
+ function cn(...inputs) {
3358
+ return twMerge(clsx(inputs));
3359
+ }
3360
+ function matchMediaQuery(query) {
3361
+ return window.matchMedia(query).matches;
3362
+ }
3363
+ function createMediaQueryFn(query) {
3364
+ return () => matchMediaQuery(query);
3365
+ }
3366
+ const prefersReducedMotion = createMediaQueryFn(
3367
+ "(prefers-reduced-motion: reduce)"
744
3368
  );
745
- var Label2 = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
746
- LabelPrimitive.Root,
747
- {
748
- ref,
749
- className: cn(labelVariants(), className),
750
- ...props
751
- }
752
- ));
753
- Label2.displayName = LabelPrimitive.Root.displayName;
754
-
755
- // src/types/simulator.ts
756
- var SCREEN_WIDTHS = {
3369
+ const isPrimarilyTouchDevice = createMediaQueryFn("(pointer: coarse)");
3370
+ const isHoverAvailable = createMediaQueryFn("(hover: hover)");
3371
+ const SCREEN_WIDTHS = {
757
3372
  "mobile-s": 375,
758
3373
  "mobile-l": 425,
759
3374
  tablet: 768,
@@ -769,10 +3384,10 @@ function Conversation({
769
3384
  const displayMode = useDisplayMode() ?? "inline";
770
3385
  const containerWidth = screenWidth === "full" ? "100%" : `${SCREEN_WIDTHS[screenWidth]}px`;
771
3386
  if (displayMode === "fullscreen") {
772
- return /* @__PURE__ */ jsx(SidebarInset, { className: "flex flex-col bg-background", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children }) });
3387
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col bg-surface w-full flex-1", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children }) });
773
3388
  }
774
- return /* @__PURE__ */ jsxs(SidebarInset, { className: "flex flex-col bg-background", children: [
775
- /* @__PURE__ */ jsx("header", { className: "h-12 border-b border-border bg-background flex items-center px-4 text-lg", children: /* @__PURE__ */ jsx("span", { className: "text-foreground", children: "ChatGPT" }) }),
3389
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col bg-surface w-full h-full flex-1", children: [
3390
+ /* @__PURE__ */ jsx("header", { className: "h-12 border-b border-subtle bg-surface flex items-center px-4 text-lg", children: /* @__PURE__ */ jsx("span", { className: "text-foreground", children: "ChatGPT" }) }),
776
3391
  /* @__PURE__ */ jsxs(
777
3392
  "div",
778
3393
  {
@@ -793,7 +3408,7 @@ function Conversation({
793
3408
  {
794
3409
  "data-message-author-role": "user",
795
3410
  className: "min-h-8 relative flex w-full flex-col items-end gap-2 text-start break-words whitespace-normal",
796
- children: /* @__PURE__ */ jsx("div", { className: "flex w-full flex-col gap-1 empty:hidden items-end", children: /* @__PURE__ */ jsx("div", { className: "bg-secondary text-secondary-foreground relative rounded-[18px] px-4 py-3 max-w-[70%]", children: /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap", children: userMessage }) }) })
3411
+ children: /* @__PURE__ */ jsx("div", { className: "flex w-full flex-col gap-1 empty:hidden items-end", children: /* @__PURE__ */ jsx("div", { className: "bg-[var(--color-background-primary-soft)] relative rounded-[18px] px-4 py-3 max-w-[70%]", children: /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap", children: userMessage }) }) })
797
3412
  }
798
3413
  ) }) }) })
799
3414
  ]
@@ -837,13 +3452,14 @@ function Conversation({
837
3452
  }
838
3453
  )
839
3454
  ] }),
840
- /* @__PURE__ */ jsx("footer", { className: "bg-background", children: /* @__PURE__ */ jsx("div", { className: "max-w-[48rem] mx-auto px-4 py-4", children: /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(
3455
+ /* @__PURE__ */ jsx("footer", { className: "bg-surface", children: /* @__PURE__ */ jsx("div", { className: "max-w-[48rem] mx-auto px-4 py-4", children: /* @__PURE__ */ jsx("div", { className: "relative", children: /* @__PURE__ */ jsx(
841
3456
  "input",
842
3457
  {
843
3458
  type: "text",
3459
+ name: "userInput",
844
3460
  disabled: true,
845
3461
  placeholder: "Message ChatGPT",
846
- className: "w-full bg-secondary text-secondary-foreground placeholder:text-muted-foreground rounded-3xl px-5 py-3 pr-12 outline-none"
3462
+ className: "w-full bg-[var(--color-background-primary)] dark:bg-[#303030] text-secondary-foreground placeholder:text-muted-foreground rounded-3xl px-5 py-3 pr-12 shadow-md light:border border-[#0000000f]"
847
3463
  }
848
3464
  ) }) }) })
849
3465
  ]
@@ -851,9 +3467,7 @@ function Conversation({
851
3467
  )
852
3468
  ] });
853
3469
  }
854
-
855
- // src/components/simulator/mock-openai.ts
856
- var MockOpenAI = class {
3470
+ class MockOpenAI {
857
3471
  constructor() {
858
3472
  __publicField(this, "theme", "light");
859
3473
  __publicField(this, "userAgent", {
@@ -933,20 +3547,20 @@ var MockOpenAI = class {
933
3547
  });
934
3548
  }
935
3549
  }
936
- };
3550
+ }
937
3551
  function initMockOpenAI(initialData) {
938
3552
  if (typeof window !== "undefined") {
939
3553
  const mock = new MockOpenAI();
940
- if (initialData?.theme !== void 0) {
3554
+ if ((initialData == null ? void 0 : initialData.theme) !== void 0) {
941
3555
  mock.theme = initialData.theme;
942
3556
  }
943
- if (initialData?.displayMode !== void 0) {
3557
+ if ((initialData == null ? void 0 : initialData.displayMode) !== void 0) {
944
3558
  mock.displayMode = initialData.displayMode;
945
3559
  }
946
- if (initialData?.toolOutput !== void 0) {
3560
+ if ((initialData == null ? void 0 : initialData.toolOutput) !== void 0) {
947
3561
  mock.toolOutput = initialData.toolOutput;
948
3562
  }
949
- if (initialData?.widgetState !== void 0) {
3563
+ if ((initialData == null ? void 0 : initialData.widgetState) !== void 0) {
950
3564
  mock.widgetState = initialData.widgetState;
951
3565
  }
952
3566
  window.openai = mock;
@@ -954,8 +3568,44 @@ function initMockOpenAI(initialData) {
954
3568
  }
955
3569
  return new MockOpenAI();
956
3570
  }
957
- var DEFAULT_THEME = "dark";
958
- var DEFAULT_DISPLAY_MODE = "inline";
3571
+ function applyDocumentTheme(theme) {
3572
+ const htmlTag = document.documentElement;
3573
+ htmlTag.setAttribute("data-theme", theme);
3574
+ htmlTag.style.colorScheme = theme;
3575
+ }
3576
+ const ThemeProviderContext = React.createContext(
3577
+ void 0
3578
+ );
3579
+ function ThemeProvider({
3580
+ children,
3581
+ defaultTheme = "light",
3582
+ theme: controlledTheme,
3583
+ ...props
3584
+ }) {
3585
+ const [internalTheme] = React.useState(defaultTheme);
3586
+ const theme = controlledTheme ?? internalTheme;
3587
+ React.useLayoutEffect(() => {
3588
+ if (typeof window !== "undefined" && typeof document !== "undefined") {
3589
+ try {
3590
+ applyDocumentTheme(theme);
3591
+ } catch (error) {
3592
+ console.warn("Failed to apply document theme:", error);
3593
+ }
3594
+ }
3595
+ }, [theme]);
3596
+ const value = {
3597
+ theme
3598
+ };
3599
+ return /* @__PURE__ */ jsx(ThemeProviderContext.Provider, { ...props, value, children });
3600
+ }
3601
+ const useThemeContext = () => {
3602
+ const context = React.useContext(ThemeProviderContext);
3603
+ if (context === void 0)
3604
+ throw new Error("useThemeContext must be used within a ThemeProvider");
3605
+ return context;
3606
+ };
3607
+ const DEFAULT_THEME = "dark";
3608
+ const DEFAULT_DISPLAY_MODE = "inline";
959
3609
  function ChatGPTSimulator({
960
3610
  children,
961
3611
  appName,
@@ -964,7 +3614,7 @@ function ChatGPTSimulator({
964
3614
  toolOutput = null,
965
3615
  widgetState = null
966
3616
  }) {
967
- const [screenWidth, setScreenWidth] = React3.useState("full");
3617
+ const [screenWidth, setScreenWidth] = React.useState("full");
968
3618
  const mock = useMemo(
969
3619
  () => initMockOpenAI({
970
3620
  theme: DEFAULT_THEME,
@@ -992,58 +3642,93 @@ function ChatGPTSimulator({
992
3642
  }
993
3643
  };
994
3644
  }, []);
995
- return /* @__PURE__ */ jsx(ThemeProvider, { theme, children: /* @__PURE__ */ jsxs(SidebarProvider, { defaultOpen: true, children: [
996
- /* @__PURE__ */ jsx(Sidebar, { children: /* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsxs(SidebarGroup, { children: [
997
- /* @__PURE__ */ jsx(SidebarGroupLabel, { className: "text-md", children: "Controls" }),
998
- /* @__PURE__ */ jsxs(SidebarGroupContent, { className: "space-y-4", children: [
999
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1000
- /* @__PURE__ */ jsx(Label2, { htmlFor: "theme-select", className: "text-xs", children: "Theme" }),
1001
- /* @__PURE__ */ jsxs(Select, { value: theme, onValueChange: (value) => mock.setTheme(value), children: [
1002
- /* @__PURE__ */ jsx(SelectTrigger, { id: "theme-select", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
1003
- /* @__PURE__ */ jsxs(SelectContent, { children: [
1004
- /* @__PURE__ */ jsx(SelectItem, { value: "light", children: "Light" }),
1005
- /* @__PURE__ */ jsx(SelectItem, { value: "dark", children: "Dark" })
1006
- ] })
1007
- ] })
1008
- ] }),
1009
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1010
- /* @__PURE__ */ jsx(Label2, { htmlFor: "display-mode-select", className: "text-xs", children: "Display Mode" }),
1011
- /* @__PURE__ */ jsxs(Select, { value: displayMode, onValueChange: (value) => mock.setDisplayMode(value), children: [
1012
- /* @__PURE__ */ jsx(SelectTrigger, { id: "display-mode-select", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
1013
- /* @__PURE__ */ jsxs(SelectContent, { children: [
1014
- /* @__PURE__ */ jsx(SelectItem, { value: "inline", children: "Inline" }),
1015
- /* @__PURE__ */ jsx(SelectItem, { value: "pip", children: "Picture in Picture" }),
1016
- /* @__PURE__ */ jsx(SelectItem, { value: "fullscreen", children: "Fullscreen" })
1017
- ] })
1018
- ] })
1019
- ] }),
1020
- /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
1021
- /* @__PURE__ */ jsx(Label2, { htmlFor: "screen-width-select", className: "text-xs", children: "Body Width" }),
1022
- /* @__PURE__ */ jsxs(Select, { value: screenWidth, onValueChange: (value) => setScreenWidth(value), children: [
1023
- /* @__PURE__ */ jsx(SelectTrigger, { id: "screen-width-select", children: /* @__PURE__ */ jsx(SelectValue, {}) }),
1024
- /* @__PURE__ */ jsxs(SelectContent, { children: [
1025
- /* @__PURE__ */ jsx(SelectItem, { value: "mobile-s", children: "Mobile S (375px)" }),
1026
- /* @__PURE__ */ jsx(SelectItem, { value: "mobile-l", children: "Mobile L (425px)" }),
1027
- /* @__PURE__ */ jsx(SelectItem, { value: "tablet", children: "Tablet (768px)" }),
1028
- /* @__PURE__ */ jsx(SelectItem, { value: "full", children: "100% (Full)" })
1029
- ] })
1030
- ] })
1031
- ] })
1032
- ] })
1033
- ] }) }) }),
1034
- /* @__PURE__ */ jsx(
1035
- Conversation,
1036
- {
1037
- screenWidth,
1038
- appName,
1039
- appIcon,
1040
- userMessage,
1041
- children
1042
- }
1043
- )
1044
- ] }) });
3645
+ return /* @__PURE__ */ jsx(ThemeProvider, { theme, children: /* @__PURE__ */ jsx(
3646
+ SimpleSidebar,
3647
+ {
3648
+ controls: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
3649
+ /* @__PURE__ */ jsx(SidebarControl, { label: "Theme", children: /* @__PURE__ */ jsx(
3650
+ SidebarSelect,
3651
+ {
3652
+ value: theme,
3653
+ onChange: (value) => mock.setTheme(value),
3654
+ options: [
3655
+ { value: "light", label: "Light" },
3656
+ { value: "dark", label: "Dark" }
3657
+ ]
3658
+ }
3659
+ ) }),
3660
+ /* @__PURE__ */ jsx(SidebarControl, { label: "Display Mode", children: /* @__PURE__ */ jsx(
3661
+ SidebarSelect,
3662
+ {
3663
+ value: displayMode,
3664
+ onChange: (value) => mock.setDisplayMode(value),
3665
+ options: [
3666
+ { value: "inline", label: "Inline" },
3667
+ { value: "pip", label: "Picture in Picture" },
3668
+ { value: "fullscreen", label: "Fullscreen" }
3669
+ ]
3670
+ }
3671
+ ) }),
3672
+ /* @__PURE__ */ jsx(SidebarControl, { label: "Body Width", children: /* @__PURE__ */ jsx(
3673
+ SidebarSelect,
3674
+ {
3675
+ value: screenWidth,
3676
+ onChange: (value) => setScreenWidth(value),
3677
+ options: [
3678
+ { value: "mobile-s", label: "Mobile S (375px)" },
3679
+ { value: "mobile-l", label: "Mobile L (425px)" },
3680
+ { value: "tablet", label: "Tablet (768px)" },
3681
+ { value: "full", label: "100% (Full)" }
3682
+ ]
3683
+ }
3684
+ ) })
3685
+ ] }),
3686
+ children: /* @__PURE__ */ jsx(
3687
+ Conversation,
3688
+ {
3689
+ screenWidth,
3690
+ appName,
3691
+ appIcon,
3692
+ userMessage,
3693
+ children
3694
+ }
3695
+ )
3696
+ }
3697
+ ) });
1045
3698
  }
1046
-
1047
- export { ChatGPTSimulator, SCREEN_WIDTHS, SET_GLOBALS_EVENT_TYPE, SetGlobalsEvent, ThemeProvider, cn, getAPI, getGlobal, getOpenAiProvider, getProvider, initMockOpenAI, isHoverAvailable, isOpenAiAvailable, isPrimarilyTouchDevice, isProviderAvailable, prefersReducedMotion, resetProviderCache, subscribeToGlobal, useDisplayMode, useIsMobile, useLocale, useMaxHeight, useSafeArea, useTheme, useThemeContext, useToolInput, useToolResponseMetadata, useUserAgent, useView, useWidgetAPI, useWidgetGlobal, useWidgetProps, useWidgetState };
3699
+ export {
3700
+ ChatGPTSimulator,
3701
+ SCREEN_WIDTHS,
3702
+ SET_GLOBALS_EVENT_TYPE,
3703
+ SetGlobalsEvent,
3704
+ ThemeProvider,
3705
+ cn,
3706
+ getAPI,
3707
+ getGlobal,
3708
+ getOpenAiProvider,
3709
+ getProvider,
3710
+ initMockOpenAI,
3711
+ isHoverAvailable,
3712
+ isOpenAiAvailable,
3713
+ isPrimarilyTouchDevice,
3714
+ isProviderAvailable,
3715
+ prefersReducedMotion,
3716
+ resetProviderCache,
3717
+ subscribeToGlobal,
3718
+ useDisplayMode,
3719
+ useIsMobile,
3720
+ useLocale,
3721
+ useMaxHeight,
3722
+ useSafeArea,
3723
+ useTheme,
3724
+ useThemeContext,
3725
+ useToolInput,
3726
+ useToolResponseMetadata,
3727
+ useUserAgent,
3728
+ useView,
3729
+ useWidgetAPI,
3730
+ useWidgetGlobal,
3731
+ useWidgetProps,
3732
+ useWidgetState
3733
+ };
1048
3734
  //# sourceMappingURL=index.js.map
1049
- //# sourceMappingURL=index.js.map