@pxlabz/tracey-react 0.0.1

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 (135) hide show
  1. package/README.md +83 -0
  2. package/dist/LauncherTrigger-5pNAvA05.js +1056 -0
  3. package/dist/LauncherTrigger-5pNAvA05.js.map +1 -0
  4. package/dist/LauncherTrigger-DjXDXHTm.cjs +1055 -0
  5. package/dist/LauncherTrigger-DjXDXHTm.cjs.map +1 -0
  6. package/dist/__tests__/api-client.test.d.ts +2 -0
  7. package/dist/__tests__/api-client.test.d.ts.map +1 -0
  8. package/dist/__tests__/events.test.d.ts +2 -0
  9. package/dist/__tests__/events.test.d.ts.map +1 -0
  10. package/dist/__tests__/survey-logic.test.d.ts +2 -0
  11. package/dist/__tests__/survey-logic.test.d.ts.map +1 -0
  12. package/dist/components/announcements/AnnouncementBell.d.ts +9 -0
  13. package/dist/components/announcements/AnnouncementBell.d.ts.map +1 -0
  14. package/dist/components/announcements/AnnouncementList.d.ts +7 -0
  15. package/dist/components/announcements/AnnouncementList.d.ts.map +1 -0
  16. package/dist/components/announcements/AnnouncementModal.d.ts +9 -0
  17. package/dist/components/announcements/AnnouncementModal.d.ts.map +1 -0
  18. package/dist/components/announcements/headless/AnnouncementClose.d.ts +9 -0
  19. package/dist/components/announcements/headless/AnnouncementClose.d.ts.map +1 -0
  20. package/dist/components/announcements/headless/AnnouncementContent.d.ts +7 -0
  21. package/dist/components/announcements/headless/AnnouncementContent.d.ts.map +1 -0
  22. package/dist/components/announcements/headless/AnnouncementNavigation.d.ts +15 -0
  23. package/dist/components/announcements/headless/AnnouncementNavigation.d.ts.map +1 -0
  24. package/dist/components/announcements/headless/AnnouncementPortal.d.ts +7 -0
  25. package/dist/components/announcements/headless/AnnouncementPortal.d.ts.map +1 -0
  26. package/dist/components/announcements/headless/AnnouncementRoot.d.ts +24 -0
  27. package/dist/components/announcements/headless/AnnouncementRoot.d.ts.map +1 -0
  28. package/dist/components/announcements/headless/AnnouncementSlidePrimitive.d.ts +14 -0
  29. package/dist/components/announcements/headless/AnnouncementSlidePrimitive.d.ts.map +1 -0
  30. package/dist/components/announcements/headless/AnnouncementTrigger.d.ts +9 -0
  31. package/dist/components/announcements/headless/AnnouncementTrigger.d.ts.map +1 -0
  32. package/dist/components/announcements/headless/index.d.ts +8 -0
  33. package/dist/components/announcements/headless/index.d.ts.map +1 -0
  34. package/dist/components/announcements/index.d.ts +4 -0
  35. package/dist/components/announcements/index.d.ts.map +1 -0
  36. package/dist/components/feedback/FeedbackForm.d.ts +8 -0
  37. package/dist/components/feedback/FeedbackForm.d.ts.map +1 -0
  38. package/dist/components/feedback/FeedbackWidget.d.ts +9 -0
  39. package/dist/components/feedback/FeedbackWidget.d.ts.map +1 -0
  40. package/dist/components/feedback/headless/FeedbackClose.d.ts +9 -0
  41. package/dist/components/feedback/headless/FeedbackClose.d.ts.map +1 -0
  42. package/dist/components/feedback/headless/FeedbackContent.d.ts +6 -0
  43. package/dist/components/feedback/headless/FeedbackContent.d.ts.map +1 -0
  44. package/dist/components/feedback/headless/FeedbackFormPrimitive.d.ts +28 -0
  45. package/dist/components/feedback/headless/FeedbackFormPrimitive.d.ts.map +1 -0
  46. package/dist/components/feedback/headless/FeedbackPortal.d.ts +7 -0
  47. package/dist/components/feedback/headless/FeedbackPortal.d.ts.map +1 -0
  48. package/dist/components/feedback/headless/FeedbackRoot.d.ts +16 -0
  49. package/dist/components/feedback/headless/FeedbackRoot.d.ts.map +1 -0
  50. package/dist/components/feedback/headless/FeedbackTrigger.d.ts +9 -0
  51. package/dist/components/feedback/headless/FeedbackTrigger.d.ts.map +1 -0
  52. package/dist/components/feedback/headless/index.d.ts +7 -0
  53. package/dist/components/feedback/headless/index.d.ts.map +1 -0
  54. package/dist/components/feedback/index.d.ts +4 -0
  55. package/dist/components/feedback/index.d.ts.map +1 -0
  56. package/dist/components/index.d.ts +5 -0
  57. package/dist/components/index.d.ts.map +1 -0
  58. package/dist/components/launcher/TraceyLauncher.d.ts +8 -0
  59. package/dist/components/launcher/TraceyLauncher.d.ts.map +1 -0
  60. package/dist/components/launcher/headless/LauncherBadge.d.ts +8 -0
  61. package/dist/components/launcher/headless/LauncherBadge.d.ts.map +1 -0
  62. package/dist/components/launcher/headless/LauncherMenu.d.ts +6 -0
  63. package/dist/components/launcher/headless/LauncherMenu.d.ts.map +1 -0
  64. package/dist/components/launcher/headless/LauncherMenuItem.d.ts +9 -0
  65. package/dist/components/launcher/headless/LauncherMenuItem.d.ts.map +1 -0
  66. package/dist/components/launcher/headless/LauncherPanel.d.ts +6 -0
  67. package/dist/components/launcher/headless/LauncherPanel.d.ts.map +1 -0
  68. package/dist/components/launcher/headless/LauncherPortal.d.ts +7 -0
  69. package/dist/components/launcher/headless/LauncherPortal.d.ts.map +1 -0
  70. package/dist/components/launcher/headless/LauncherRoot.d.ts +21 -0
  71. package/dist/components/launcher/headless/LauncherRoot.d.ts.map +1 -0
  72. package/dist/components/launcher/headless/LauncherTab.d.ts +8 -0
  73. package/dist/components/launcher/headless/LauncherTab.d.ts.map +1 -0
  74. package/dist/components/launcher/headless/LauncherTabContent.d.ts +8 -0
  75. package/dist/components/launcher/headless/LauncherTabContent.d.ts.map +1 -0
  76. package/dist/components/launcher/headless/LauncherTrigger.d.ts +10 -0
  77. package/dist/components/launcher/headless/LauncherTrigger.d.ts.map +1 -0
  78. package/dist/components/launcher/headless/index.d.ts +10 -0
  79. package/dist/components/launcher/headless/index.d.ts.map +1 -0
  80. package/dist/components/launcher/index.d.ts +3 -0
  81. package/dist/components/launcher/index.d.ts.map +1 -0
  82. package/dist/components/surveys/SurveyWidget.d.ts +10 -0
  83. package/dist/components/surveys/SurveyWidget.d.ts.map +1 -0
  84. package/dist/components/surveys/index.d.ts +2 -0
  85. package/dist/components/surveys/index.d.ts.map +1 -0
  86. package/dist/core/api-client.d.ts +33 -0
  87. package/dist/core/api-client.d.ts.map +1 -0
  88. package/dist/core/events.d.ts +11 -0
  89. package/dist/core/events.d.ts.map +1 -0
  90. package/dist/core/index.d.ts +4 -0
  91. package/dist/core/index.d.ts.map +1 -0
  92. package/dist/core/screenshot.d.ts +12 -0
  93. package/dist/core/screenshot.d.ts.map +1 -0
  94. package/dist/core/survey-logic.d.ts +7 -0
  95. package/dist/core/survey-logic.d.ts.map +1 -0
  96. package/dist/headless.cjs +100 -0
  97. package/dist/headless.cjs.map +1 -0
  98. package/dist/headless.d.ts +11 -0
  99. package/dist/headless.d.ts.map +1 -0
  100. package/dist/headless.js +101 -0
  101. package/dist/headless.js.map +1 -0
  102. package/dist/hooks/index.d.ts +7 -0
  103. package/dist/hooks/index.d.ts.map +1 -0
  104. package/dist/hooks/useAnnouncements.d.ts +14 -0
  105. package/dist/hooks/useAnnouncements.d.ts.map +1 -0
  106. package/dist/hooks/useFeedback.d.ts +10 -0
  107. package/dist/hooks/useFeedback.d.ts.map +1 -0
  108. package/dist/hooks/useMyFeedback.d.ts +16 -0
  109. package/dist/hooks/useMyFeedback.d.ts.map +1 -0
  110. package/dist/hooks/useSurvey.d.ts +22 -0
  111. package/dist/hooks/useSurvey.d.ts.map +1 -0
  112. package/dist/hooks/useTracey.d.ts +3 -0
  113. package/dist/hooks/useTracey.d.ts.map +1 -0
  114. package/dist/hooks/useTraceyEvents.d.ts +14 -0
  115. package/dist/hooks/useTraceyEvents.d.ts.map +1 -0
  116. package/dist/index.cjs +4913 -0
  117. package/dist/index.cjs.map +1 -0
  118. package/dist/index.d.ts +19 -0
  119. package/dist/index.d.ts.map +1 -0
  120. package/dist/index.js +4892 -0
  121. package/dist/index.js.map +1 -0
  122. package/dist/lib/utils.d.ts +3 -0
  123. package/dist/lib/utils.d.ts.map +1 -0
  124. package/dist/provider/MockTraceyProvider.d.ts +14 -0
  125. package/dist/provider/MockTraceyProvider.d.ts.map +1 -0
  126. package/dist/provider/TraceyProvider.d.ts +11 -0
  127. package/dist/provider/TraceyProvider.d.ts.map +1 -0
  128. package/dist/provider/context.d.ts +19 -0
  129. package/dist/provider/context.d.ts.map +1 -0
  130. package/dist/provider/index.d.ts +4 -0
  131. package/dist/provider/index.d.ts.map +1 -0
  132. package/dist/styles.css +800 -0
  133. package/dist/types.d.ts +188 -0
  134. package/dist/types.d.ts.map +1 -0
  135. package/package.json +94 -0
package/dist/index.cjs ADDED
@@ -0,0 +1,4913 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
25
+ const LauncherTrigger = require("./LauncherTrigger-DjXDXHTm.cjs");
26
+ const react = require("react");
27
+ const jsxRuntime = require("react/jsx-runtime");
28
+ const DEFAULT_LIMIT = 20;
29
+ function useMyFeedback() {
30
+ const { client, isIdentified } = LauncherTrigger.useTracey();
31
+ const [feedback, setFeedback] = react.useState([]);
32
+ const [isLoading, setIsLoading] = react.useState(false);
33
+ const [error, setError] = react.useState(null);
34
+ const [pagination, setPagination] = react.useState(null);
35
+ const isFetching = react.useRef(false);
36
+ const fetchFeedback = react.useCallback(
37
+ async (offset = 0, append = false) => {
38
+ if (isFetching.current) return;
39
+ isFetching.current = true;
40
+ setIsLoading(true);
41
+ setError(null);
42
+ try {
43
+ const result = await client.getMyFeedback({
44
+ limit: DEFAULT_LIMIT,
45
+ offset
46
+ });
47
+ if (append) {
48
+ setFeedback((prev) => [...prev, ...result.data]);
49
+ } else {
50
+ setFeedback(result.data);
51
+ }
52
+ setPagination(result.pagination);
53
+ } catch (err) {
54
+ const fetchError = err instanceof Error ? err : new Error("Failed to fetch feedback");
55
+ setError(fetchError);
56
+ } finally {
57
+ setIsLoading(false);
58
+ isFetching.current = false;
59
+ }
60
+ },
61
+ [client]
62
+ );
63
+ react.useEffect(() => {
64
+ if (isIdentified) {
65
+ fetchFeedback();
66
+ }
67
+ }, [isIdentified, fetchFeedback]);
68
+ const refetch = react.useCallback(async () => {
69
+ await fetchFeedback(0, false);
70
+ }, [fetchFeedback]);
71
+ const loadMore = react.useCallback(async () => {
72
+ if (!(pagination == null ? void 0 : pagination.hasMore)) return;
73
+ await fetchFeedback(pagination.offset + pagination.limit, true);
74
+ }, [fetchFeedback, pagination]);
75
+ return {
76
+ feedback,
77
+ isLoading,
78
+ error,
79
+ pagination,
80
+ refetch,
81
+ loadMore
82
+ };
83
+ }
84
+ function useSurvey() {
85
+ const { client, events } = LauncherTrigger.useTracey();
86
+ const [activeSurvey, setActiveSurvey] = react.useState(null);
87
+ const [isLoading, setIsLoading] = react.useState(false);
88
+ const [isSubmitting, setIsSubmitting] = react.useState(false);
89
+ const [error, setError] = react.useState(null);
90
+ const loadActiveSurvey = react.useCallback(
91
+ async (context) => {
92
+ setIsLoading(true);
93
+ setError(null);
94
+ try {
95
+ const survey = await client.getActiveSurvey(context);
96
+ setActiveSurvey(survey);
97
+ if (survey) {
98
+ events.emit("survey:shown", { survey });
99
+ }
100
+ return survey;
101
+ } catch (err) {
102
+ const resolved = err instanceof Error ? err : new Error("Failed to load active survey");
103
+ setError(resolved);
104
+ events.emit("survey:error", { error: resolved });
105
+ return null;
106
+ } finally {
107
+ setIsLoading(false);
108
+ }
109
+ },
110
+ [client, events]
111
+ );
112
+ const submitSurveyResponse = react.useCallback(
113
+ async (surveyId, payload) => {
114
+ setIsSubmitting(true);
115
+ setError(null);
116
+ try {
117
+ const response = await client.submitSurveyResponse(surveyId, payload);
118
+ events.emit("survey:submitted", { surveyId, response });
119
+ return response;
120
+ } catch (err) {
121
+ const resolved = err instanceof Error ? err : new Error("Failed to submit survey response");
122
+ setError(resolved);
123
+ events.emit("survey:error", { error: resolved, surveyId });
124
+ return null;
125
+ } finally {
126
+ setIsSubmitting(false);
127
+ }
128
+ },
129
+ [client, events]
130
+ );
131
+ const dismissSurvey = react.useCallback(
132
+ (surveyId) => {
133
+ events.emit("survey:dismissed", { surveyId });
134
+ setActiveSurvey((current) => (current == null ? void 0 : current.id) === surveyId ? null : current);
135
+ },
136
+ [events]
137
+ );
138
+ const reset = react.useCallback(() => {
139
+ setActiveSurvey(null);
140
+ setError(null);
141
+ }, []);
142
+ return {
143
+ loadActiveSurvey,
144
+ submitSurveyResponse,
145
+ activeSurvey,
146
+ isLoading,
147
+ isSubmitting,
148
+ error,
149
+ dismissSurvey,
150
+ reset
151
+ };
152
+ }
153
+ async function captureScreenshot() {
154
+ if (typeof window === "undefined" || typeof document === "undefined") {
155
+ return null;
156
+ }
157
+ try {
158
+ const stream = await navigator.mediaDevices.getDisplayMedia({
159
+ video: { displaySurface: "browser" }
160
+ });
161
+ const video = document.createElement("video");
162
+ video.srcObject = stream;
163
+ await video.play();
164
+ await new Promise((resolve) => {
165
+ if (video.readyState >= 1) {
166
+ resolve();
167
+ } else {
168
+ video.addEventListener("loadedmetadata", () => resolve(), {
169
+ once: true
170
+ });
171
+ }
172
+ });
173
+ const canvas = document.createElement("canvas");
174
+ canvas.width = video.videoWidth;
175
+ canvas.height = video.videoHeight;
176
+ const ctx = canvas.getContext("2d");
177
+ if (ctx) {
178
+ ctx.drawImage(video, 0, 0);
179
+ }
180
+ stream.getTracks().forEach((track) => track.stop());
181
+ return canvas.toDataURL("image/png");
182
+ } catch {
183
+ }
184
+ try {
185
+ const html2canvas = await import("html2canvas").then((m) => m.default);
186
+ const canvas = await html2canvas(document.body, {
187
+ useCORS: true,
188
+ allowTaint: false,
189
+ logging: false
190
+ });
191
+ return canvas.toDataURL("image/png");
192
+ } catch {
193
+ console.warn(
194
+ "Screenshot capture failed. Install html2canvas for DOM-based screenshots."
195
+ );
196
+ return null;
197
+ }
198
+ }
199
+ const feedbackTypes$1 = [
200
+ { value: "general", label: "General" },
201
+ { value: "bug", label: "Bug Report" },
202
+ { value: "feature_request", label: "Feature Request" }
203
+ ];
204
+ function FeedbackForm({
205
+ theme,
206
+ onSuccess,
207
+ showScreenshot = true
208
+ }) {
209
+ const primaryColor = (theme == null ? void 0 : theme.primaryColor) ?? "#6366f1";
210
+ const inputStyles = {
211
+ width: "100%",
212
+ padding: "10px 12px",
213
+ border: "1px solid #e5e7eb",
214
+ borderRadius: (theme == null ? void 0 : theme.borderRadius) ?? 6,
215
+ fontSize: 14,
216
+ fontFamily: (theme == null ? void 0 : theme.fontFamily) ?? "inherit",
217
+ boxSizing: "border-box"
218
+ };
219
+ const labelStyles = {
220
+ display: "block",
221
+ marginBottom: 6,
222
+ fontSize: 14,
223
+ fontWeight: 500,
224
+ color: (theme == null ? void 0 : theme.textColor) ?? "#374151"
225
+ };
226
+ return /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.FeedbackFormPrimitive, { onSuccess, children: ({
227
+ title,
228
+ setTitle,
229
+ description,
230
+ setDescription,
231
+ type,
232
+ setType,
233
+ screenshot,
234
+ setScreenshot,
235
+ isSubmitting,
236
+ error,
237
+ handleSubmit
238
+ }) => /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [
239
+ /* @__PURE__ */ jsxRuntime.jsxs(
240
+ "div",
241
+ {
242
+ style: {
243
+ display: "flex",
244
+ justifyContent: "space-between",
245
+ alignItems: "center",
246
+ marginBottom: 20
247
+ },
248
+ children: [
249
+ /* @__PURE__ */ jsxRuntime.jsx(
250
+ "h3",
251
+ {
252
+ style: {
253
+ margin: 0,
254
+ fontSize: 18,
255
+ fontWeight: 600,
256
+ color: (theme == null ? void 0 : theme.textColor) ?? "#111827"
257
+ },
258
+ children: "Send Feedback"
259
+ }
260
+ ),
261
+ /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.FeedbackClose, { children: /* @__PURE__ */ jsxRuntime.jsx(
262
+ "button",
263
+ {
264
+ type: "button",
265
+ style: {
266
+ background: "none",
267
+ border: "none",
268
+ cursor: "pointer",
269
+ padding: 4,
270
+ color: "#9ca3af"
271
+ },
272
+ children: "✕"
273
+ }
274
+ ) })
275
+ ]
276
+ }
277
+ ),
278
+ error && /* @__PURE__ */ jsxRuntime.jsx(
279
+ "div",
280
+ {
281
+ style: {
282
+ padding: "10px 12px",
283
+ backgroundColor: "#fef2f2",
284
+ border: "1px solid #fecaca",
285
+ borderRadius: 6,
286
+ marginBottom: 16,
287
+ color: "#dc2626",
288
+ fontSize: 14
289
+ },
290
+ children: error.message
291
+ }
292
+ ),
293
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 16 }, children: [
294
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyles, children: "Type" }),
295
+ /* @__PURE__ */ jsxRuntime.jsx(
296
+ "select",
297
+ {
298
+ value: type,
299
+ onChange: (e) => setType(e.target.value),
300
+ style: inputStyles,
301
+ children: feedbackTypes$1.map((ft) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: ft.value, children: ft.label }, ft.value))
302
+ }
303
+ )
304
+ ] }),
305
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 16 }, children: [
306
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyles, children: "Title *" }),
307
+ /* @__PURE__ */ jsxRuntime.jsx(
308
+ "input",
309
+ {
310
+ type: "text",
311
+ value: title,
312
+ onChange: (e) => setTitle(e.target.value),
313
+ placeholder: "Brief summary...",
314
+ required: true,
315
+ style: inputStyles
316
+ }
317
+ )
318
+ ] }),
319
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 16 }, children: [
320
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyles, children: "Description" }),
321
+ /* @__PURE__ */ jsxRuntime.jsx(
322
+ "textarea",
323
+ {
324
+ value: description,
325
+ onChange: (e) => setDescription(e.target.value),
326
+ placeholder: "Tell us more...",
327
+ rows: 4,
328
+ style: { ...inputStyles, resize: "vertical" }
329
+ }
330
+ )
331
+ ] }),
332
+ showScreenshot && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 16 }, children: [
333
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyles, children: "Screenshot" }),
334
+ screenshot ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative" }, children: [
335
+ /* @__PURE__ */ jsxRuntime.jsx(
336
+ "img",
337
+ {
338
+ src: screenshot,
339
+ alt: "Screenshot",
340
+ style: {
341
+ width: "100%",
342
+ borderRadius: 6,
343
+ border: "1px solid #e5e7eb"
344
+ }
345
+ }
346
+ ),
347
+ /* @__PURE__ */ jsxRuntime.jsx(
348
+ "button",
349
+ {
350
+ type: "button",
351
+ onClick: () => setScreenshot(null),
352
+ style: {
353
+ position: "absolute",
354
+ top: 8,
355
+ right: 8,
356
+ background: "rgba(0,0,0,0.5)",
357
+ color: "#fff",
358
+ border: "none",
359
+ borderRadius: 4,
360
+ padding: "4px 8px",
361
+ cursor: "pointer",
362
+ fontSize: 12
363
+ },
364
+ children: "Remove"
365
+ }
366
+ )
367
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(
368
+ "button",
369
+ {
370
+ type: "button",
371
+ onClick: async () => {
372
+ const img = await captureScreenshot();
373
+ if (img) setScreenshot(img);
374
+ },
375
+ style: {
376
+ ...inputStyles,
377
+ backgroundColor: "#f9fafb",
378
+ cursor: "pointer",
379
+ textAlign: "center",
380
+ color: "#6b7280"
381
+ },
382
+ children: "📷 Capture Screenshot"
383
+ }
384
+ )
385
+ ] }),
386
+ /* @__PURE__ */ jsxRuntime.jsx(
387
+ "button",
388
+ {
389
+ type: "submit",
390
+ disabled: isSubmitting || !title.trim(),
391
+ style: {
392
+ width: "100%",
393
+ padding: "12px 16px",
394
+ backgroundColor: isSubmitting ? "#9ca3af" : primaryColor,
395
+ color: "#fff",
396
+ border: "none",
397
+ borderRadius: (theme == null ? void 0 : theme.borderRadius) ?? 6,
398
+ fontSize: 14,
399
+ fontWeight: 500,
400
+ cursor: isSubmitting ? "not-allowed" : "pointer"
401
+ },
402
+ children: isSubmitting ? "Sending..." : "Send Feedback"
403
+ }
404
+ )
405
+ ] }) });
406
+ }
407
+ function getPositionStyles$2(position) {
408
+ if (typeof position === "object" && "x" in position) {
409
+ return {
410
+ position: "fixed",
411
+ left: position.x,
412
+ top: position.y
413
+ };
414
+ }
415
+ const base = { position: "fixed" };
416
+ switch (position) {
417
+ case "top-left":
418
+ return { ...base, top: 16, left: 16 };
419
+ case "top-right":
420
+ return { ...base, top: 16, right: 16 };
421
+ case "bottom-left":
422
+ return { ...base, bottom: 16, left: 16 };
423
+ case "bottom-right":
424
+ default:
425
+ return { ...base, bottom: 16, right: 16 };
426
+ }
427
+ }
428
+ function FeedbackWidget({
429
+ position = "bottom-right",
430
+ theme,
431
+ triggerLabel = "Feedback",
432
+ className
433
+ }) {
434
+ const positionStyles = getPositionStyles$2(position);
435
+ const primaryColor = (theme == null ? void 0 : theme.primaryColor) ?? "#6366f1";
436
+ return /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.FeedbackRoot, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: positionStyles, className, children: [
437
+ /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.FeedbackTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
438
+ "button",
439
+ {
440
+ type: "button",
441
+ className: "tracey-feedback-trigger",
442
+ style: {
443
+ backgroundColor: primaryColor,
444
+ color: "#fff",
445
+ border: "none",
446
+ borderRadius: (theme == null ? void 0 : theme.borderRadius) ?? 8,
447
+ padding: "10px 16px",
448
+ fontSize: 14,
449
+ fontWeight: 500,
450
+ cursor: "pointer",
451
+ fontFamily: (theme == null ? void 0 : theme.fontFamily) ?? "inherit",
452
+ boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
453
+ },
454
+ children: triggerLabel
455
+ }
456
+ ) }),
457
+ /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.FeedbackPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(
458
+ LauncherTrigger.FeedbackContent,
459
+ {
460
+ style: {
461
+ position: "fixed",
462
+ inset: 0,
463
+ display: "flex",
464
+ alignItems: "center",
465
+ justifyContent: "center",
466
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
467
+ zIndex: 9999
468
+ },
469
+ children: /* @__PURE__ */ jsxRuntime.jsx(
470
+ "div",
471
+ {
472
+ style: {
473
+ backgroundColor: (theme == null ? void 0 : theme.backgroundColor) ?? "#fff",
474
+ borderRadius: (theme == null ? void 0 : theme.borderRadius) ?? 12,
475
+ padding: 24,
476
+ width: "100%",
477
+ maxWidth: 400,
478
+ boxShadow: "0 4px 20px rgba(0, 0, 0, 0.15)"
479
+ },
480
+ children: /* @__PURE__ */ jsxRuntime.jsx(FeedbackForm, { theme })
481
+ }
482
+ )
483
+ }
484
+ ) })
485
+ ] }) });
486
+ }
487
+ function AnnouncementModal({
488
+ theme,
489
+ behavior = "queue",
490
+ slideMode = "carousel",
491
+ onDismiss
492
+ }) {
493
+ const { unread } = LauncherTrigger.useAnnouncements();
494
+ const currentAnnouncement = behavior === "latest" ? [...unread].sort(
495
+ (a, b) => new Date(b.publishAt ?? 0).getTime() - new Date(a.publishAt ?? 0).getTime()
496
+ )[0] : unread[0];
497
+ if (!currentAnnouncement) {
498
+ return null;
499
+ }
500
+ return /* @__PURE__ */ jsxRuntime.jsx(
501
+ LauncherTrigger.AnnouncementRoot,
502
+ {
503
+ announcement: currentAnnouncement,
504
+ defaultOpen: true,
505
+ onOpenChange: (open) => {
506
+ if (!open && currentAnnouncement) {
507
+ onDismiss == null ? void 0 : onDismiss(currentAnnouncement);
508
+ }
509
+ },
510
+ children: /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.AnnouncementPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(
511
+ LauncherTrigger.AnnouncementContent,
512
+ {
513
+ style: {
514
+ position: "fixed",
515
+ inset: 0,
516
+ display: "flex",
517
+ alignItems: "center",
518
+ justifyContent: "center",
519
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
520
+ zIndex: 9999
521
+ },
522
+ children: /* @__PURE__ */ jsxRuntime.jsx(
523
+ "div",
524
+ {
525
+ style: {
526
+ backgroundColor: (theme == null ? void 0 : theme.backgroundColor) ?? "#fff",
527
+ borderRadius: (theme == null ? void 0 : theme.borderRadius) ?? 12,
528
+ padding: 0,
529
+ width: "100%",
530
+ maxWidth: 480,
531
+ maxHeight: "80vh",
532
+ overflow: "hidden",
533
+ boxShadow: "0 4px 20px rgba(0, 0, 0, 0.15)"
534
+ },
535
+ children: /* @__PURE__ */ jsxRuntime.jsx(
536
+ AnnouncementSlideContent,
537
+ {
538
+ announcement: currentAnnouncement,
539
+ theme,
540
+ slideMode
541
+ }
542
+ )
543
+ }
544
+ )
545
+ }
546
+ ) })
547
+ }
548
+ );
549
+ }
550
+ function AnnouncementSlideContent({
551
+ announcement,
552
+ theme,
553
+ slideMode
554
+ }) {
555
+ const primaryColor = (theme == null ? void 0 : theme.primaryColor) ?? "#6366f1";
556
+ const { markCtaClicked } = LauncherTrigger.useAnnouncements();
557
+ return /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.AnnouncementNavigation, { children: ({
558
+ currentSlide,
559
+ totalSlides,
560
+ canGoNext,
561
+ canGoPrev,
562
+ nextSlide,
563
+ prevSlide,
564
+ goToSlide
565
+ }) => {
566
+ const slide = announcement.slides[currentSlide];
567
+ if (!slide) return null;
568
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative" }, children: [
569
+ /* @__PURE__ */ jsxRuntime.jsx(
570
+ "div",
571
+ {
572
+ style: { position: "absolute", top: 12, right: 12, zIndex: 1 },
573
+ children: /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.AnnouncementClose, { children: /* @__PURE__ */ jsxRuntime.jsx(
574
+ "button",
575
+ {
576
+ type: "button",
577
+ style: {
578
+ background: "rgba(0,0,0,0.3)",
579
+ border: "none",
580
+ borderRadius: "50%",
581
+ width: 32,
582
+ height: 32,
583
+ cursor: "pointer",
584
+ color: "#fff",
585
+ fontSize: 16
586
+ },
587
+ children: "✕"
588
+ }
589
+ ) })
590
+ }
591
+ ),
592
+ slide.imageUrl && /* @__PURE__ */ jsxRuntime.jsx(
593
+ "div",
594
+ {
595
+ style: {
596
+ width: "100%",
597
+ height: 200,
598
+ backgroundImage: `url(${slide.imageUrl})`,
599
+ backgroundSize: "cover",
600
+ backgroundPosition: "center"
601
+ }
602
+ }
603
+ ),
604
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 24 }, children: [
605
+ slide.title && /* @__PURE__ */ jsxRuntime.jsx(
606
+ "h3",
607
+ {
608
+ style: {
609
+ margin: "0 0 12px",
610
+ fontSize: 20,
611
+ fontWeight: 600,
612
+ color: (theme == null ? void 0 : theme.textColor) ?? "#111827"
613
+ },
614
+ children: slide.title
615
+ }
616
+ ),
617
+ slide.body && /* @__PURE__ */ jsxRuntime.jsx(
618
+ "p",
619
+ {
620
+ style: {
621
+ margin: "0 0 20px",
622
+ fontSize: 14,
623
+ lineHeight: 1.6,
624
+ color: "#6b7280"
625
+ },
626
+ children: slide.body
627
+ }
628
+ ),
629
+ slide.ctaText && slide.ctaUrl && /* @__PURE__ */ jsxRuntime.jsx(
630
+ "a",
631
+ {
632
+ href: slide.ctaUrl,
633
+ target: "_blank",
634
+ rel: "noopener noreferrer",
635
+ onClick: () => markCtaClicked(announcement.id, currentSlide),
636
+ style: {
637
+ display: "inline-block",
638
+ padding: "10px 20px",
639
+ backgroundColor: primaryColor,
640
+ color: "#fff",
641
+ textDecoration: "none",
642
+ borderRadius: (theme == null ? void 0 : theme.borderRadius) ?? 6,
643
+ fontSize: 14,
644
+ fontWeight: 500
645
+ },
646
+ children: slide.ctaText
647
+ }
648
+ ),
649
+ totalSlides > 1 && /* @__PURE__ */ jsxRuntime.jsx(
650
+ "div",
651
+ {
652
+ style: {
653
+ display: "flex",
654
+ justifyContent: "space-between",
655
+ alignItems: "center",
656
+ marginTop: 20
657
+ },
658
+ children: slideMode === "carousel" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
659
+ /* @__PURE__ */ jsxRuntime.jsx(
660
+ "button",
661
+ {
662
+ type: "button",
663
+ onClick: prevSlide,
664
+ disabled: !canGoPrev,
665
+ style: {
666
+ padding: "8px 16px",
667
+ border: "1px solid #e5e7eb",
668
+ borderRadius: 6,
669
+ background: "none",
670
+ cursor: canGoPrev ? "pointer" : "not-allowed",
671
+ opacity: canGoPrev ? 1 : 0.5
672
+ },
673
+ children: "← Previous"
674
+ }
675
+ ),
676
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color: "#9ca3af", fontSize: 14 }, children: [
677
+ currentSlide + 1,
678
+ " / ",
679
+ totalSlides
680
+ ] }),
681
+ /* @__PURE__ */ jsxRuntime.jsx(
682
+ "button",
683
+ {
684
+ type: "button",
685
+ onClick: nextSlide,
686
+ disabled: !canGoNext,
687
+ style: {
688
+ padding: "8px 16px",
689
+ border: "1px solid #e5e7eb",
690
+ borderRadius: 6,
691
+ background: "none",
692
+ cursor: canGoNext ? "pointer" : "not-allowed",
693
+ opacity: canGoNext ? 1 : 0.5
694
+ },
695
+ children: "Next →"
696
+ }
697
+ )
698
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(
699
+ "div",
700
+ {
701
+ style: {
702
+ display: "flex",
703
+ gap: 8,
704
+ justifyContent: "center",
705
+ width: "100%"
706
+ },
707
+ children: Array.from({ length: totalSlides }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
708
+ "button",
709
+ {
710
+ type: "button",
711
+ onClick: () => goToSlide(i),
712
+ style: {
713
+ width: 10,
714
+ height: 10,
715
+ borderRadius: "50%",
716
+ border: "none",
717
+ backgroundColor: i === currentSlide ? primaryColor : "#e5e7eb",
718
+ cursor: "pointer"
719
+ }
720
+ },
721
+ i
722
+ ))
723
+ }
724
+ )
725
+ }
726
+ )
727
+ ] })
728
+ ] });
729
+ } });
730
+ }
731
+ function getPositionStyles$1(position) {
732
+ if (typeof position === "object" && "x" in position) {
733
+ return {
734
+ position: "fixed",
735
+ left: position.x,
736
+ top: position.y
737
+ };
738
+ }
739
+ const base = { position: "fixed" };
740
+ switch (position) {
741
+ case "top-left":
742
+ return { ...base, top: 16, left: 16 };
743
+ case "top-right":
744
+ return { ...base, top: 16, right: 16 };
745
+ case "bottom-left":
746
+ return { ...base, bottom: 16, left: 16 };
747
+ case "bottom-right":
748
+ default:
749
+ return { ...base, bottom: 16, right: 16 };
750
+ }
751
+ }
752
+ const BOUNCE_KEYFRAMES = `
753
+ @keyframes tracey-badge-bounce {
754
+ 0% { transform: scale(1); }
755
+ 30% { transform: scale(1.3); }
756
+ 50% { transform: scale(0.9); }
757
+ 70% { transform: scale(1.1); }
758
+ 100% { transform: scale(1); }
759
+ }
760
+ `;
761
+ function AnnouncementBell({
762
+ position = "top-right",
763
+ theme,
764
+ showCount = true,
765
+ onClick: _onClick = "modal"
766
+ }) {
767
+ const { unreadCount } = LauncherTrigger.useAnnouncements();
768
+ const [showModal, setShowModal] = react.useState(false);
769
+ const [animating, setAnimating] = react.useState(false);
770
+ const prevCountRef = react.useRef(unreadCount);
771
+ const positionStyles = getPositionStyles$1(position);
772
+ const primaryColor = (theme == null ? void 0 : theme.primaryColor) ?? "#6366f1";
773
+ react.useEffect(() => {
774
+ if (unreadCount > prevCountRef.current && unreadCount > 0) {
775
+ setAnimating(true);
776
+ const timeout = setTimeout(() => setAnimating(false), 600);
777
+ return () => clearTimeout(timeout);
778
+ }
779
+ prevCountRef.current = unreadCount;
780
+ }, [unreadCount]);
781
+ react.useEffect(() => {
782
+ prevCountRef.current = unreadCount;
783
+ }, [unreadCount]);
784
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
785
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: BOUNCE_KEYFRAMES }),
786
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: positionStyles, children: /* @__PURE__ */ jsxRuntime.jsxs(
787
+ "button",
788
+ {
789
+ type: "button",
790
+ onClick: () => setShowModal(true),
791
+ style: {
792
+ position: "relative",
793
+ width: 44,
794
+ height: 44,
795
+ borderRadius: "50%",
796
+ backgroundColor: (theme == null ? void 0 : theme.backgroundColor) ?? "#fff",
797
+ border: "none",
798
+ boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)",
799
+ cursor: "pointer",
800
+ display: "flex",
801
+ alignItems: "center",
802
+ justifyContent: "center"
803
+ },
804
+ "aria-label": `Announcements${unreadCount > 0 ? ` (${unreadCount} unread)` : ""}`,
805
+ children: [
806
+ /* @__PURE__ */ jsxRuntime.jsxs(
807
+ "svg",
808
+ {
809
+ width: "20",
810
+ height: "20",
811
+ viewBox: "0 0 24 24",
812
+ fill: "none",
813
+ stroke: (theme == null ? void 0 : theme.textColor) ?? "#374151",
814
+ strokeWidth: "2",
815
+ strokeLinecap: "round",
816
+ strokeLinejoin: "round",
817
+ children: [
818
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" }),
819
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.73 21a2 2 0 0 1-3.46 0" })
820
+ ]
821
+ }
822
+ ),
823
+ showCount && unreadCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
824
+ "span",
825
+ {
826
+ "data-testid": "announcement-badge",
827
+ style: {
828
+ position: "absolute",
829
+ top: -4,
830
+ right: -4,
831
+ minWidth: 20,
832
+ height: 20,
833
+ borderRadius: 10,
834
+ backgroundColor: primaryColor,
835
+ color: "#fff",
836
+ fontSize: 11,
837
+ fontWeight: 600,
838
+ display: "flex",
839
+ alignItems: "center",
840
+ justifyContent: "center",
841
+ padding: "0 6px",
842
+ animation: animating ? "tracey-badge-bounce 0.6s ease-in-out" : "none"
843
+ },
844
+ children: unreadCount > 99 ? "99+" : unreadCount
845
+ }
846
+ )
847
+ ]
848
+ }
849
+ ) }),
850
+ showModal && unreadCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
851
+ AnnouncementModal,
852
+ {
853
+ theme,
854
+ onDismiss: () => setShowModal(false)
855
+ }
856
+ )
857
+ ] });
858
+ }
859
+ function formatRelativeTime(dateStr) {
860
+ if (!dateStr) return "";
861
+ const now = Date.now();
862
+ const date = new Date(dateStr).getTime();
863
+ const diffMs = now - date;
864
+ const diffMins = Math.floor(diffMs / 6e4);
865
+ if (diffMins < 1) return "Just now";
866
+ if (diffMins < 60) return `${diffMins}m ago`;
867
+ const diffHours = Math.floor(diffMins / 60);
868
+ if (diffHours < 24) return `${diffHours}h ago`;
869
+ const diffDays = Math.floor(diffHours / 24);
870
+ if (diffDays < 30) return `${diffDays}d ago`;
871
+ const diffMonths = Math.floor(diffDays / 30);
872
+ return `${diffMonths}mo ago`;
873
+ }
874
+ function getBodyPreview(announcement) {
875
+ const slide = announcement.slides[0];
876
+ if (!(slide == null ? void 0 : slide.body)) return "";
877
+ return slide.body.length > 120 ? slide.body.slice(0, 120) + "..." : slide.body;
878
+ }
879
+ function AnnouncementList({
880
+ theme,
881
+ maxHeight = 360
882
+ }) {
883
+ const {
884
+ announcements,
885
+ unreadCount,
886
+ isLoading,
887
+ markAllAsRead,
888
+ markAsViewed,
889
+ markCtaClicked
890
+ } = LauncherTrigger.useAnnouncements();
891
+ const primaryColor = (theme == null ? void 0 : theme.primaryColor) ?? "#6366f1";
892
+ const textColor = (theme == null ? void 0 : theme.textColor) ?? "#374151";
893
+ const bgColor = (theme == null ? void 0 : theme.backgroundColor) ?? "#fff";
894
+ if (isLoading) {
895
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: 20 }, children: [1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsx(
896
+ "div",
897
+ {
898
+ style: {
899
+ height: 72,
900
+ backgroundColor: "#f3f4f6",
901
+ borderRadius: 8,
902
+ marginBottom: 8,
903
+ animation: "tracey-skeleton-pulse 1.5s ease-in-out infinite"
904
+ }
905
+ },
906
+ i
907
+ )) });
908
+ }
909
+ if (announcements.length === 0) {
910
+ return /* @__PURE__ */ jsxRuntime.jsxs(
911
+ "div",
912
+ {
913
+ style: {
914
+ padding: "40px 20px",
915
+ textAlign: "center",
916
+ color: "#9ca3af",
917
+ fontSize: 14
918
+ },
919
+ children: [
920
+ /* @__PURE__ */ jsxRuntime.jsxs(
921
+ "svg",
922
+ {
923
+ width: "40",
924
+ height: "40",
925
+ viewBox: "0 0 24 24",
926
+ fill: "none",
927
+ stroke: "#d1d5db",
928
+ strokeWidth: "1.5",
929
+ strokeLinecap: "round",
930
+ strokeLinejoin: "round",
931
+ style: { margin: "0 auto 12px" },
932
+ children: [
933
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" }),
934
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.73 21a2 2 0 0 1-3.46 0" })
935
+ ]
936
+ }
937
+ ),
938
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0 }, children: "No announcements yet" })
939
+ ]
940
+ }
941
+ );
942
+ }
943
+ const headerStyle = {
944
+ display: "flex",
945
+ justifyContent: "space-between",
946
+ alignItems: "center",
947
+ padding: "0 16px 12px",
948
+ borderBottom: "1px solid #f3f4f6"
949
+ };
950
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
951
+ unreadCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerStyle, children: [
952
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: 12, color: "#9ca3af" }, children: [
953
+ unreadCount,
954
+ " unread"
955
+ ] }),
956
+ /* @__PURE__ */ jsxRuntime.jsx(
957
+ "button",
958
+ {
959
+ type: "button",
960
+ onClick: markAllAsRead,
961
+ style: {
962
+ background: "none",
963
+ border: "none",
964
+ cursor: "pointer",
965
+ fontSize: 12,
966
+ color: primaryColor,
967
+ fontWeight: 500,
968
+ padding: 0
969
+ },
970
+ children: "Mark all as read"
971
+ }
972
+ )
973
+ ] }),
974
+ /* @__PURE__ */ jsxRuntime.jsx(
975
+ "div",
976
+ {
977
+ style: {
978
+ maxHeight,
979
+ overflowY: "auto",
980
+ padding: "8px 0"
981
+ },
982
+ children: announcements.map((announcement) => /* @__PURE__ */ jsxRuntime.jsx(
983
+ AnnouncementCard,
984
+ {
985
+ announcement,
986
+ theme,
987
+ primaryColor,
988
+ textColor,
989
+ bgColor,
990
+ onView: () => markAsViewed(announcement.id),
991
+ onCtaClick: (slideIndex) => markCtaClicked(announcement.id, slideIndex)
992
+ },
993
+ announcement.id
994
+ ))
995
+ }
996
+ )
997
+ ] });
998
+ }
999
+ function AnnouncementCard({
1000
+ announcement,
1001
+ primaryColor,
1002
+ textColor,
1003
+ bgColor,
1004
+ onView,
1005
+ onCtaClick
1006
+ }) {
1007
+ const isUnread = !announcement.viewed;
1008
+ const bodyPreview = getBodyPreview(announcement);
1009
+ const firstSlide = announcement.slides[0];
1010
+ const hasCta = (firstSlide == null ? void 0 : firstSlide.ctaText) && (firstSlide == null ? void 0 : firstSlide.ctaUrl);
1011
+ const timeAgo = formatRelativeTime(announcement.publishAt);
1012
+ return /* @__PURE__ */ jsxRuntime.jsx(
1013
+ "div",
1014
+ {
1015
+ role: "article",
1016
+ onClick: () => {
1017
+ if (isUnread) onView();
1018
+ },
1019
+ style: {
1020
+ padding: "12px 16px",
1021
+ cursor: isUnread ? "pointer" : "default",
1022
+ backgroundColor: isUnread ? `${primaryColor}08` : "transparent",
1023
+ borderBottom: "1px solid #f3f4f6",
1024
+ transition: "background-color 0.15s ease"
1025
+ },
1026
+ onMouseEnter: (e) => {
1027
+ e.currentTarget.style.backgroundColor = bgColor === "#fff" ? "#f9fafb" : "rgba(0,0,0,0.03)";
1028
+ },
1029
+ onMouseLeave: (e) => {
1030
+ e.currentTarget.style.backgroundColor = isUnread ? `${primaryColor}08` : "transparent";
1031
+ },
1032
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1033
+ "div",
1034
+ {
1035
+ style: {
1036
+ display: "flex",
1037
+ alignItems: "flex-start",
1038
+ gap: 10
1039
+ },
1040
+ children: [
1041
+ isUnread && /* @__PURE__ */ jsxRuntime.jsx(
1042
+ "span",
1043
+ {
1044
+ "data-testid": "unread-dot",
1045
+ style: {
1046
+ width: 8,
1047
+ height: 8,
1048
+ borderRadius: "50%",
1049
+ backgroundColor: primaryColor,
1050
+ flexShrink: 0,
1051
+ marginTop: 5
1052
+ }
1053
+ }
1054
+ ),
1055
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
1056
+ /* @__PURE__ */ jsxRuntime.jsxs(
1057
+ "div",
1058
+ {
1059
+ style: {
1060
+ display: "flex",
1061
+ justifyContent: "space-between",
1062
+ alignItems: "baseline",
1063
+ gap: 8
1064
+ },
1065
+ children: [
1066
+ /* @__PURE__ */ jsxRuntime.jsx(
1067
+ "h4",
1068
+ {
1069
+ style: {
1070
+ margin: 0,
1071
+ fontSize: 14,
1072
+ fontWeight: isUnread ? 600 : 500,
1073
+ color: textColor,
1074
+ overflow: "hidden",
1075
+ textOverflow: "ellipsis",
1076
+ whiteSpace: "nowrap"
1077
+ },
1078
+ children: announcement.title
1079
+ }
1080
+ ),
1081
+ timeAgo && /* @__PURE__ */ jsxRuntime.jsx(
1082
+ "span",
1083
+ {
1084
+ style: {
1085
+ fontSize: 11,
1086
+ color: "#9ca3af",
1087
+ whiteSpace: "nowrap",
1088
+ flexShrink: 0
1089
+ },
1090
+ children: timeAgo
1091
+ }
1092
+ )
1093
+ ]
1094
+ }
1095
+ ),
1096
+ bodyPreview && /* @__PURE__ */ jsxRuntime.jsx(
1097
+ "p",
1098
+ {
1099
+ style: {
1100
+ margin: "4px 0 0",
1101
+ fontSize: 13,
1102
+ color: "#6b7280",
1103
+ lineHeight: 1.4,
1104
+ overflow: "hidden",
1105
+ display: "-webkit-box",
1106
+ WebkitLineClamp: 2,
1107
+ WebkitBoxOrient: "vertical"
1108
+ },
1109
+ children: bodyPreview
1110
+ }
1111
+ ),
1112
+ hasCta && /* @__PURE__ */ jsxRuntime.jsx(
1113
+ "a",
1114
+ {
1115
+ href: firstSlide.ctaUrl,
1116
+ target: "_blank",
1117
+ rel: "noopener noreferrer",
1118
+ onClick: (e) => {
1119
+ e.stopPropagation();
1120
+ onCtaClick(0);
1121
+ },
1122
+ style: {
1123
+ display: "inline-block",
1124
+ marginTop: 8,
1125
+ fontSize: 13,
1126
+ fontWeight: 500,
1127
+ color: primaryColor,
1128
+ textDecoration: "none"
1129
+ },
1130
+ children: firstSlide.ctaText
1131
+ }
1132
+ )
1133
+ ] })
1134
+ ]
1135
+ }
1136
+ )
1137
+ }
1138
+ );
1139
+ }
1140
+ let stylesInjected = false;
1141
+ function injectStyles() {
1142
+ if (stylesInjected || typeof document === "undefined") return;
1143
+ stylesInjected = true;
1144
+ const style = document.createElement("style");
1145
+ style.setAttribute("data-tracey-launcher", "");
1146
+ style.textContent = `
1147
+ @keyframes tracey-panel-enter {
1148
+ from { opacity: 0; transform: translateY(8px) scale(0.96); }
1149
+ to { opacity: 1; transform: translateY(0) scale(1); }
1150
+ }
1151
+ @keyframes tracey-badge-pulse {
1152
+ 0% { transform: scale(0.5); }
1153
+ 70% { transform: scale(1.1); }
1154
+ 100% { transform: scale(1); }
1155
+ }
1156
+ @keyframes tracey-skeleton-pulse {
1157
+ 0%, 100% { opacity: 0.5; }
1158
+ 50% { opacity: 1; }
1159
+ }
1160
+ @keyframes tracey-success-enter {
1161
+ from { opacity: 0; transform: scale(0.9); }
1162
+ to { opacity: 1; transform: scale(1); }
1163
+ }
1164
+ `;
1165
+ document.head.appendChild(style);
1166
+ }
1167
+ function getPositionStyles(position) {
1168
+ if (typeof position === "object" && "x" in position) {
1169
+ return {
1170
+ position: "fixed",
1171
+ left: position.x,
1172
+ top: position.y
1173
+ };
1174
+ }
1175
+ const base = { position: "fixed", zIndex: 9998 };
1176
+ switch (position) {
1177
+ case "top-left":
1178
+ return { ...base, top: 16, left: 16 };
1179
+ case "top-right":
1180
+ return { ...base, top: 16, right: 16 };
1181
+ case "bottom-left":
1182
+ return { ...base, bottom: 16, left: 16 };
1183
+ case "bottom-right":
1184
+ default:
1185
+ return { ...base, bottom: 16, right: 16 };
1186
+ }
1187
+ }
1188
+ function getPanelPosition(position) {
1189
+ if (typeof position === "object" && "x" in position) {
1190
+ return { bottom: "100%", left: 0, marginBottom: 8 };
1191
+ }
1192
+ const isTop = position === "top-left" || position === "top-right";
1193
+ const isLeft = position === "top-left" || position === "bottom-left";
1194
+ return {
1195
+ ...isTop ? { top: "100%", marginTop: 8 } : { bottom: "100%", marginBottom: 8 },
1196
+ ...isLeft ? { left: 0 } : { right: 0 }
1197
+ };
1198
+ }
1199
+ const feedbackTypes = [
1200
+ { value: "general", label: "General" },
1201
+ { value: "bug", label: "Bug Report" },
1202
+ { value: "feature_request", label: "Feature Request" }
1203
+ ];
1204
+ function TraceyLauncher({
1205
+ position = "bottom-right",
1206
+ theme,
1207
+ className
1208
+ }) {
1209
+ react.useEffect(() => {
1210
+ injectStyles();
1211
+ }, []);
1212
+ const { unreadCount } = LauncherTrigger.useAnnouncements();
1213
+ const positionStyles = getPositionStyles(position);
1214
+ const panelPositionStyles = getPanelPosition(position);
1215
+ const primaryColor = (theme == null ? void 0 : theme.primaryColor) ?? "#6366f1";
1216
+ const borderRadius = (theme == null ? void 0 : theme.borderRadius) ?? 8;
1217
+ const textColor = (theme == null ? void 0 : theme.textColor) ?? "#374151";
1218
+ const bgColor = (theme == null ? void 0 : theme.backgroundColor) ?? "#fff";
1219
+ const fontFamily = (theme == null ? void 0 : theme.fontFamily) ?? "inherit";
1220
+ return /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.LauncherRoot, { defaultActiveItem: "feedback", children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: positionStyles, className, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative", display: "inline-block" }, children: [
1221
+ /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.LauncherTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
1222
+ "button",
1223
+ {
1224
+ type: "button",
1225
+ "aria-label": `Tracey widget${unreadCount > 0 ? ` (${unreadCount} unread)` : ""}`,
1226
+ style: {
1227
+ width: 52,
1228
+ height: 52,
1229
+ borderRadius: "50%",
1230
+ backgroundColor: primaryColor,
1231
+ border: "none",
1232
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.2)",
1233
+ cursor: "pointer",
1234
+ display: "flex",
1235
+ alignItems: "center",
1236
+ justifyContent: "center",
1237
+ transition: "transform 0.2s ease, box-shadow 0.2s ease"
1238
+ },
1239
+ onMouseEnter: (e) => {
1240
+ e.currentTarget.style.transform = "scale(1.05)";
1241
+ e.currentTarget.style.boxShadow = "0 6px 16px rgba(0, 0, 0, 0.25)";
1242
+ },
1243
+ onMouseLeave: (e) => {
1244
+ e.currentTarget.style.transform = "scale(1)";
1245
+ e.currentTarget.style.boxShadow = "0 4px 12px rgba(0, 0, 0, 0.2)";
1246
+ },
1247
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1248
+ "svg",
1249
+ {
1250
+ width: "22",
1251
+ height: "22",
1252
+ viewBox: "0 0 24 24",
1253
+ fill: "none",
1254
+ stroke: "#fff",
1255
+ strokeWidth: "2",
1256
+ strokeLinecap: "round",
1257
+ strokeLinejoin: "round",
1258
+ children: [
1259
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "1" }),
1260
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "19", cy: "12", r: "1" }),
1261
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "5", cy: "12", r: "1" }),
1262
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "5", r: "1" }),
1263
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "19", cy: "5", r: "1" }),
1264
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "5", cy: "5", r: "1" }),
1265
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "19", r: "1" }),
1266
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "19", cy: "19", r: "1" }),
1267
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "5", cy: "19", r: "1" })
1268
+ ]
1269
+ }
1270
+ )
1271
+ }
1272
+ ) }),
1273
+ /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.LauncherBadge, { count: unreadCount, children: (count) => /* @__PURE__ */ jsxRuntime.jsx(
1274
+ "span",
1275
+ {
1276
+ style: {
1277
+ position: "absolute",
1278
+ top: -4,
1279
+ right: -4,
1280
+ minWidth: 20,
1281
+ height: 20,
1282
+ borderRadius: 10,
1283
+ backgroundColor: "#ef4444",
1284
+ color: "#fff",
1285
+ fontSize: 11,
1286
+ fontWeight: 600,
1287
+ display: "flex",
1288
+ alignItems: "center",
1289
+ justifyContent: "center",
1290
+ padding: "0 6px",
1291
+ pointerEvents: "none",
1292
+ animation: "tracey-badge-pulse 0.3s ease-out"
1293
+ },
1294
+ children: count > 99 ? "99+" : count
1295
+ }
1296
+ ) }),
1297
+ /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.LauncherPortal, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: positionStyles, children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "relative", display: "inline-block" }, children: /* @__PURE__ */ jsxRuntime.jsxs(
1298
+ LauncherTrigger.LauncherPanel,
1299
+ {
1300
+ style: {
1301
+ position: "absolute",
1302
+ ...panelPositionStyles,
1303
+ width: 380,
1304
+ backgroundColor: bgColor,
1305
+ borderRadius,
1306
+ boxShadow: "0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1)",
1307
+ overflow: "hidden",
1308
+ animation: "tracey-panel-enter 0.2s ease-out",
1309
+ fontFamily
1310
+ },
1311
+ children: [
1312
+ /* @__PURE__ */ jsxRuntime.jsxs(
1313
+ "div",
1314
+ {
1315
+ role: "tablist",
1316
+ style: {
1317
+ display: "flex",
1318
+ borderBottom: "1px solid #e5e7eb",
1319
+ backgroundColor: bgColor
1320
+ },
1321
+ children: [
1322
+ /* @__PURE__ */ jsxRuntime.jsxs(
1323
+ LauncherTrigger.LauncherTab,
1324
+ {
1325
+ value: "feedback",
1326
+ style: {
1327
+ flex: 1,
1328
+ display: "flex",
1329
+ alignItems: "center",
1330
+ justifyContent: "center",
1331
+ gap: 6,
1332
+ padding: "12px 0",
1333
+ border: "none",
1334
+ background: "none",
1335
+ cursor: "pointer",
1336
+ fontSize: 13,
1337
+ fontWeight: 500,
1338
+ fontFamily,
1339
+ color: textColor,
1340
+ borderBottom: "2px solid transparent",
1341
+ transition: "border-color 0.15s ease, color 0.15s ease"
1342
+ },
1343
+ children: [
1344
+ /* @__PURE__ */ jsxRuntime.jsx(
1345
+ "svg",
1346
+ {
1347
+ width: "16",
1348
+ height: "16",
1349
+ viewBox: "0 0 24 24",
1350
+ fill: "none",
1351
+ stroke: "currentColor",
1352
+ strokeWidth: "2",
1353
+ strokeLinecap: "round",
1354
+ strokeLinejoin: "round",
1355
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
1356
+ }
1357
+ ),
1358
+ "Feedback"
1359
+ ]
1360
+ }
1361
+ ),
1362
+ /* @__PURE__ */ jsxRuntime.jsxs(
1363
+ LauncherTrigger.LauncherTab,
1364
+ {
1365
+ value: "announcements",
1366
+ style: {
1367
+ flex: 1,
1368
+ display: "flex",
1369
+ alignItems: "center",
1370
+ justifyContent: "center",
1371
+ gap: 6,
1372
+ padding: "12px 0",
1373
+ border: "none",
1374
+ background: "none",
1375
+ cursor: "pointer",
1376
+ fontSize: 13,
1377
+ fontWeight: 500,
1378
+ fontFamily,
1379
+ color: textColor,
1380
+ borderBottom: "2px solid transparent",
1381
+ transition: "border-color 0.15s ease, color 0.15s ease"
1382
+ },
1383
+ children: [
1384
+ /* @__PURE__ */ jsxRuntime.jsxs(
1385
+ "svg",
1386
+ {
1387
+ width: "16",
1388
+ height: "16",
1389
+ viewBox: "0 0 24 24",
1390
+ fill: "none",
1391
+ stroke: "currentColor",
1392
+ strokeWidth: "2",
1393
+ strokeLinecap: "round",
1394
+ strokeLinejoin: "round",
1395
+ children: [
1396
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9" }),
1397
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13.73 21a2 2 0 0 1-3.46 0" })
1398
+ ]
1399
+ }
1400
+ ),
1401
+ "What's New",
1402
+ /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.LauncherBadge, { count: unreadCount, children: (count) => /* @__PURE__ */ jsxRuntime.jsx(
1403
+ "span",
1404
+ {
1405
+ style: {
1406
+ minWidth: 18,
1407
+ height: 18,
1408
+ borderRadius: 9,
1409
+ backgroundColor: "#ef4444",
1410
+ color: "#fff",
1411
+ fontSize: 10,
1412
+ fontWeight: 600,
1413
+ display: "inline-flex",
1414
+ alignItems: "center",
1415
+ justifyContent: "center",
1416
+ padding: "0 5px"
1417
+ },
1418
+ children: count > 99 ? "99+" : count
1419
+ }
1420
+ ) })
1421
+ ]
1422
+ }
1423
+ )
1424
+ ]
1425
+ }
1426
+ ),
1427
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
1428
+ [role="tab"][data-state="active"] {
1429
+ border-bottom-color: ${primaryColor} !important;
1430
+ color: ${primaryColor} !important;
1431
+ }
1432
+ ` }),
1433
+ /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.LauncherTabContent, { value: "feedback", children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: 16 }, children: /* @__PURE__ */ jsxRuntime.jsx(
1434
+ EmbeddedFeedbackForm,
1435
+ {
1436
+ primaryColor,
1437
+ textColor,
1438
+ fontFamily,
1439
+ borderRadius
1440
+ }
1441
+ ) }) }),
1442
+ /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.LauncherTabContent, { value: "announcements", children: /* @__PURE__ */ jsxRuntime.jsx(AnnouncementList, { theme, maxHeight: 360 }) })
1443
+ ]
1444
+ }
1445
+ ) }) }) })
1446
+ ] }) }) });
1447
+ }
1448
+ function EmbeddedFeedbackForm({
1449
+ primaryColor,
1450
+ textColor,
1451
+ fontFamily,
1452
+ borderRadius
1453
+ }) {
1454
+ const [showSuccess, setShowSuccess] = react.useState(false);
1455
+ const handleSuccess = react.useCallback(() => {
1456
+ setShowSuccess(true);
1457
+ setTimeout(() => setShowSuccess(false), 3e3);
1458
+ }, []);
1459
+ const inputStyles = {
1460
+ width: "100%",
1461
+ padding: "10px 12px",
1462
+ border: "1px solid #e5e7eb",
1463
+ borderRadius: typeof borderRadius === "number" ? borderRadius - 2 : 6,
1464
+ fontSize: 14,
1465
+ fontFamily,
1466
+ boxSizing: "border-box",
1467
+ color: textColor,
1468
+ backgroundColor: "transparent"
1469
+ };
1470
+ const labelStyles = {
1471
+ display: "block",
1472
+ marginBottom: 4,
1473
+ fontSize: 13,
1474
+ fontWeight: 500,
1475
+ color: textColor
1476
+ };
1477
+ if (showSuccess) {
1478
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1479
+ "div",
1480
+ {
1481
+ style: {
1482
+ padding: "32px 16px",
1483
+ textAlign: "center",
1484
+ animation: "tracey-success-enter 0.2s ease-out"
1485
+ },
1486
+ children: [
1487
+ /* @__PURE__ */ jsxRuntime.jsx(
1488
+ "div",
1489
+ {
1490
+ style: {
1491
+ width: 48,
1492
+ height: 48,
1493
+ borderRadius: "50%",
1494
+ backgroundColor: "#ecfdf5",
1495
+ display: "flex",
1496
+ alignItems: "center",
1497
+ justifyContent: "center",
1498
+ margin: "0 auto 12px"
1499
+ },
1500
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1501
+ "svg",
1502
+ {
1503
+ width: "24",
1504
+ height: "24",
1505
+ viewBox: "0 0 24 24",
1506
+ fill: "none",
1507
+ stroke: "#10b981",
1508
+ strokeWidth: "2.5",
1509
+ strokeLinecap: "round",
1510
+ strokeLinejoin: "round",
1511
+ children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" })
1512
+ }
1513
+ )
1514
+ }
1515
+ ),
1516
+ /* @__PURE__ */ jsxRuntime.jsx(
1517
+ "p",
1518
+ {
1519
+ style: {
1520
+ margin: 0,
1521
+ fontSize: 15,
1522
+ fontWeight: 600,
1523
+ color: textColor
1524
+ },
1525
+ children: "Thank you!"
1526
+ }
1527
+ ),
1528
+ /* @__PURE__ */ jsxRuntime.jsx(
1529
+ "p",
1530
+ {
1531
+ style: {
1532
+ margin: "4px 0 0",
1533
+ fontSize: 13,
1534
+ color: "#6b7280"
1535
+ },
1536
+ children: "Your feedback has been submitted."
1537
+ }
1538
+ )
1539
+ ]
1540
+ }
1541
+ );
1542
+ }
1543
+ return /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.FeedbackRoot, { defaultOpen: true, children: /* @__PURE__ */ jsxRuntime.jsx(LauncherTrigger.FeedbackFormPrimitive, { onSuccess: handleSuccess, closeOnSuccess: false, children: ({
1544
+ title,
1545
+ setTitle,
1546
+ description,
1547
+ setDescription,
1548
+ type,
1549
+ setType,
1550
+ isSubmitting,
1551
+ error,
1552
+ handleSubmit
1553
+ }) => /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [
1554
+ error && /* @__PURE__ */ jsxRuntime.jsx(
1555
+ "div",
1556
+ {
1557
+ style: {
1558
+ padding: "8px 12px",
1559
+ backgroundColor: "#fef2f2",
1560
+ border: "1px solid #fecaca",
1561
+ borderRadius: 6,
1562
+ marginBottom: 12,
1563
+ color: "#dc2626",
1564
+ fontSize: 13
1565
+ },
1566
+ children: error.message
1567
+ }
1568
+ ),
1569
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 12 }, children: [
1570
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyles, children: "Type" }),
1571
+ /* @__PURE__ */ jsxRuntime.jsx(
1572
+ "select",
1573
+ {
1574
+ value: type,
1575
+ onChange: (e) => setType(e.target.value),
1576
+ style: inputStyles,
1577
+ children: feedbackTypes.map((ft) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: ft.value, children: ft.label }, ft.value))
1578
+ }
1579
+ )
1580
+ ] }),
1581
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 12 }, children: [
1582
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyles, children: "Title *" }),
1583
+ /* @__PURE__ */ jsxRuntime.jsx(
1584
+ "input",
1585
+ {
1586
+ type: "text",
1587
+ value: title,
1588
+ onChange: (e) => setTitle(e.target.value),
1589
+ placeholder: "Brief summary...",
1590
+ required: true,
1591
+ style: inputStyles
1592
+ }
1593
+ )
1594
+ ] }),
1595
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 16 }, children: [
1596
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyles, children: "Description" }),
1597
+ /* @__PURE__ */ jsxRuntime.jsx(
1598
+ "textarea",
1599
+ {
1600
+ value: description,
1601
+ onChange: (e) => setDescription(e.target.value),
1602
+ placeholder: "Tell us more...",
1603
+ rows: 3,
1604
+ style: { ...inputStyles, resize: "vertical" }
1605
+ }
1606
+ )
1607
+ ] }),
1608
+ /* @__PURE__ */ jsxRuntime.jsx(
1609
+ "button",
1610
+ {
1611
+ type: "submit",
1612
+ disabled: isSubmitting || !title.trim(),
1613
+ style: {
1614
+ width: "100%",
1615
+ padding: "10px 16px",
1616
+ backgroundColor: isSubmitting ? "#9ca3af" : primaryColor,
1617
+ color: "#fff",
1618
+ border: "none",
1619
+ borderRadius: typeof borderRadius === "number" ? borderRadius - 2 : 6,
1620
+ fontSize: 14,
1621
+ fontWeight: 500,
1622
+ cursor: isSubmitting ? "not-allowed" : "pointer",
1623
+ transition: "background-color 0.15s ease"
1624
+ },
1625
+ children: isSubmitting ? "Sending..." : "Send Feedback"
1626
+ }
1627
+ )
1628
+ ] }) }) });
1629
+ }
1630
+ function getAnswerValue(answers, questionKey) {
1631
+ const value = answers[questionKey];
1632
+ if (value === void 0 || value === "") {
1633
+ return void 0;
1634
+ }
1635
+ return value;
1636
+ }
1637
+ function isRuleMatch(rule, answerValue) {
1638
+ if (rule.operator === "answered") return answerValue !== void 0;
1639
+ if (rule.operator === "not_answered") return answerValue === void 0;
1640
+ if (answerValue === void 0) return false;
1641
+ if (rule.operator === "eq") return answerValue === rule.value;
1642
+ if (rule.operator === "neq") return answerValue !== rule.value;
1643
+ if (rule.operator === "gte") {
1644
+ return typeof answerValue === "number" && typeof rule.value === "number" && answerValue >= rule.value;
1645
+ }
1646
+ if (rule.operator === "lte") {
1647
+ return typeof answerValue === "number" && typeof rule.value === "number" && answerValue <= rule.value;
1648
+ }
1649
+ if (rule.operator === "in") {
1650
+ return Array.isArray(rule.value) && rule.value.includes(answerValue);
1651
+ }
1652
+ return false;
1653
+ }
1654
+ function getActiveSurveyQuestionKeys(params) {
1655
+ const questions = [...params.questions].sort((a, b) => a.position - b.position);
1656
+ const questionIndexByKey = new Map(
1657
+ questions.map((question, index2) => [question.questionKey, index2])
1658
+ );
1659
+ const rulesBySource = /* @__PURE__ */ new Map();
1660
+ for (const rule of params.logicRules) {
1661
+ if (!rule.sourceQuestionKey) continue;
1662
+ const existing = rulesBySource.get(rule.sourceQuestionKey) ?? [];
1663
+ existing.push(rule);
1664
+ rulesBySource.set(rule.sourceQuestionKey, existing);
1665
+ }
1666
+ for (const rules of rulesBySource.values()) {
1667
+ rules.sort((a, b) => a.priority - b.priority);
1668
+ }
1669
+ const active = /* @__PURE__ */ new Set();
1670
+ let index = 0;
1671
+ let guard = 0;
1672
+ while (index >= 0 && index < questions.length && guard < questions.length + 10) {
1673
+ const current = questions[index];
1674
+ if (!current) break;
1675
+ active.add(current.questionKey);
1676
+ const answerValue = getAnswerValue(params.answers, current.questionKey);
1677
+ const rules = rulesBySource.get(current.questionKey) ?? [];
1678
+ const matchedRule = rules.find((rule) => isRuleMatch(rule, answerValue));
1679
+ if (matchedRule) {
1680
+ if (matchedRule.action === "end_survey") {
1681
+ break;
1682
+ }
1683
+ if (matchedRule.nextQuestionKey) {
1684
+ const nextIndex = questionIndexByKey.get(matchedRule.nextQuestionKey);
1685
+ if (nextIndex !== void 0 && nextIndex > index) {
1686
+ index = nextIndex;
1687
+ guard++;
1688
+ continue;
1689
+ }
1690
+ }
1691
+ }
1692
+ index++;
1693
+ guard++;
1694
+ }
1695
+ return active;
1696
+ }
1697
+ function SurveyWidget({
1698
+ anonymousSessionId,
1699
+ url,
1700
+ theme,
1701
+ autoLoad = true,
1702
+ title = "Quick Survey"
1703
+ }) {
1704
+ const {
1705
+ activeSurvey,
1706
+ loadActiveSurvey,
1707
+ submitSurveyResponse,
1708
+ dismissSurvey,
1709
+ isLoading,
1710
+ isSubmitting,
1711
+ error
1712
+ } = useSurvey();
1713
+ const [answers, setAnswers] = react.useState({});
1714
+ const [submitted, setSubmitted] = react.useState(false);
1715
+ react.useEffect(() => {
1716
+ if (!autoLoad) return;
1717
+ void loadActiveSurvey({ anonymousSessionId, url });
1718
+ }, [autoLoad, anonymousSessionId, loadActiveSurvey, url]);
1719
+ const sortedQuestions = react.useMemo(() => {
1720
+ if (!activeSurvey) return [];
1721
+ return [...activeSurvey.questions].sort((a, b) => a.position - b.position);
1722
+ }, [activeSurvey]);
1723
+ const activeQuestionKeys = react.useMemo(() => {
1724
+ if (!activeSurvey) return /* @__PURE__ */ new Set();
1725
+ return getActiveSurveyQuestionKeys({
1726
+ questions: sortedQuestions,
1727
+ logicRules: activeSurvey.logicRules,
1728
+ answers
1729
+ });
1730
+ }, [activeSurvey, answers, sortedQuestions]);
1731
+ const visibleQuestions = react.useMemo(
1732
+ () => sortedQuestions.filter(
1733
+ (question) => activeQuestionKeys.has(question.questionKey)
1734
+ ),
1735
+ [activeQuestionKeys, sortedQuestions]
1736
+ );
1737
+ if (isLoading) {
1738
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tracey-survey-widget", children: "Loading survey..." });
1739
+ }
1740
+ if (submitted) {
1741
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "tracey-survey-widget", children: "Thanks for your feedback." });
1742
+ }
1743
+ if (!activeSurvey) {
1744
+ return null;
1745
+ }
1746
+ async function handleSubmit(event) {
1747
+ event.preventDefault();
1748
+ const survey = activeSurvey;
1749
+ if (!survey) return;
1750
+ const payload = [];
1751
+ for (const question of visibleQuestions) {
1752
+ const value = answers[question.questionKey];
1753
+ if (value === void 0 || value === "") {
1754
+ if (question.required) {
1755
+ return;
1756
+ }
1757
+ continue;
1758
+ }
1759
+ if (question.type === "nps" || question.type === "rating") {
1760
+ payload.push({
1761
+ questionKey: question.questionKey,
1762
+ type: question.type,
1763
+ valueNumber: Number(value)
1764
+ });
1765
+ continue;
1766
+ }
1767
+ payload.push({
1768
+ questionKey: question.questionKey,
1769
+ type: question.type,
1770
+ valueText: String(value)
1771
+ });
1772
+ }
1773
+ const result = await submitSurveyResponse(survey.id, {
1774
+ anonymousSessionId,
1775
+ answers: payload
1776
+ });
1777
+ if (result == null ? void 0 : result.success) {
1778
+ setSubmitted(true);
1779
+ }
1780
+ }
1781
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1782
+ "div",
1783
+ {
1784
+ className: "tracey-survey-widget",
1785
+ style: {
1786
+ border: "1px solid #e5e7eb",
1787
+ borderRadius: (theme == null ? void 0 : theme.borderRadius) ?? 10,
1788
+ padding: 16,
1789
+ backgroundColor: (theme == null ? void 0 : theme.backgroundColor) ?? "#fff",
1790
+ fontFamily: (theme == null ? void 0 : theme.fontFamily) ?? "inherit",
1791
+ maxWidth: 420
1792
+ },
1793
+ children: [
1794
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", gap: 8 }, children: [
1795
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1796
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0, fontWeight: 600 }, children: title }),
1797
+ /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: "4px 0 0", color: "#6b7280", fontSize: 13 }, children: activeSurvey.name })
1798
+ ] }),
1799
+ /* @__PURE__ */ jsxRuntime.jsx(
1800
+ "button",
1801
+ {
1802
+ type: "button",
1803
+ onClick: () => dismissSurvey(activeSurvey.id),
1804
+ style: { border: "none", background: "transparent", cursor: "pointer" },
1805
+ children: "×"
1806
+ }
1807
+ )
1808
+ ] }),
1809
+ /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, style: { marginTop: 12, display: "grid", gap: 12 }, children: [
1810
+ visibleQuestions.map((question) => /* @__PURE__ */ jsxRuntime.jsxs("label", { style: { display: "grid", gap: 6 }, children: [
1811
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 14, fontWeight: 500 }, children: question.title }),
1812
+ question.type === "nps" || question.type === "rating" ? /* @__PURE__ */ jsxRuntime.jsx(
1813
+ "input",
1814
+ {
1815
+ type: "number",
1816
+ min: question.type === "nps" ? 0 : Number(question.config.min ?? 1),
1817
+ max: question.type === "nps" ? 10 : Number(question.config.max ?? 5),
1818
+ required: question.required,
1819
+ value: answers[question.questionKey] ?? "",
1820
+ onChange: (event) => setAnswers((prev) => ({
1821
+ ...prev,
1822
+ [question.questionKey]: Number(event.target.value)
1823
+ }))
1824
+ }
1825
+ ) : question.type === "single_choice" ? /* @__PURE__ */ jsxRuntime.jsxs(
1826
+ "select",
1827
+ {
1828
+ required: question.required,
1829
+ value: String(answers[question.questionKey] ?? ""),
1830
+ onChange: (event) => setAnswers((prev) => ({
1831
+ ...prev,
1832
+ [question.questionKey]: event.target.value
1833
+ })),
1834
+ children: [
1835
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: "Select an option" }),
1836
+ Array.isArray(question.config.options) && question.config.options.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: String(option), children: String(option) }, String(option)))
1837
+ ]
1838
+ }
1839
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1840
+ "textarea",
1841
+ {
1842
+ required: question.required,
1843
+ value: String(answers[question.questionKey] ?? ""),
1844
+ onChange: (event) => setAnswers((prev) => ({
1845
+ ...prev,
1846
+ [question.questionKey]: event.target.value
1847
+ })),
1848
+ placeholder: typeof question.config.placeholder === "string" ? question.config.placeholder : "Your answer"
1849
+ }
1850
+ )
1851
+ ] }, question.questionKey)),
1852
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { margin: 0, color: "#dc2626", fontSize: 13 }, children: error.message }),
1853
+ /* @__PURE__ */ jsxRuntime.jsx(
1854
+ "button",
1855
+ {
1856
+ type: "submit",
1857
+ disabled: isSubmitting,
1858
+ style: {
1859
+ backgroundColor: (theme == null ? void 0 : theme.primaryColor) ?? "#2563eb",
1860
+ color: "#fff",
1861
+ border: "none",
1862
+ borderRadius: (theme == null ? void 0 : theme.borderRadius) ?? 8,
1863
+ padding: "10px 14px",
1864
+ cursor: "pointer"
1865
+ },
1866
+ children: isSubmitting ? "Submitting..." : "Submit"
1867
+ }
1868
+ )
1869
+ ] })
1870
+ ]
1871
+ }
1872
+ );
1873
+ }
1874
+ function r(e) {
1875
+ var t, f, n = "";
1876
+ if ("string" == typeof e || "number" == typeof e) n += e;
1877
+ else if ("object" == typeof e) if (Array.isArray(e)) {
1878
+ var o = e.length;
1879
+ for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
1880
+ } else for (f in e) e[f] && (n && (n += " "), n += f);
1881
+ return n;
1882
+ }
1883
+ function clsx() {
1884
+ for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
1885
+ return n;
1886
+ }
1887
+ const concatArrays = (array1, array2) => {
1888
+ const combinedArray = new Array(array1.length + array2.length);
1889
+ for (let i = 0; i < array1.length; i++) {
1890
+ combinedArray[i] = array1[i];
1891
+ }
1892
+ for (let i = 0; i < array2.length; i++) {
1893
+ combinedArray[array1.length + i] = array2[i];
1894
+ }
1895
+ return combinedArray;
1896
+ };
1897
+ const createClassValidatorObject = (classGroupId, validator) => ({
1898
+ classGroupId,
1899
+ validator
1900
+ });
1901
+ const createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
1902
+ nextPart,
1903
+ validators,
1904
+ classGroupId
1905
+ });
1906
+ const CLASS_PART_SEPARATOR = "-";
1907
+ const EMPTY_CONFLICTS = [];
1908
+ const ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
1909
+ const createClassGroupUtils = (config) => {
1910
+ const classMap = createClassMap(config);
1911
+ const {
1912
+ conflictingClassGroups,
1913
+ conflictingClassGroupModifiers
1914
+ } = config;
1915
+ const getClassGroupId = (className) => {
1916
+ if (className.startsWith("[") && className.endsWith("]")) {
1917
+ return getGroupIdForArbitraryProperty(className);
1918
+ }
1919
+ const classParts = className.split(CLASS_PART_SEPARATOR);
1920
+ const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
1921
+ return getGroupRecursive(classParts, startIndex, classMap);
1922
+ };
1923
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
1924
+ if (hasPostfixModifier) {
1925
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
1926
+ const baseConflicts = conflictingClassGroups[classGroupId];
1927
+ if (modifierConflicts) {
1928
+ if (baseConflicts) {
1929
+ return concatArrays(baseConflicts, modifierConflicts);
1930
+ }
1931
+ return modifierConflicts;
1932
+ }
1933
+ return baseConflicts || EMPTY_CONFLICTS;
1934
+ }
1935
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
1936
+ };
1937
+ return {
1938
+ getClassGroupId,
1939
+ getConflictingClassGroupIds
1940
+ };
1941
+ };
1942
+ const getGroupRecursive = (classParts, startIndex, classPartObject) => {
1943
+ const classPathsLength = classParts.length - startIndex;
1944
+ if (classPathsLength === 0) {
1945
+ return classPartObject.classGroupId;
1946
+ }
1947
+ const currentClassPart = classParts[startIndex];
1948
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
1949
+ if (nextClassPartObject) {
1950
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
1951
+ if (result) return result;
1952
+ }
1953
+ const validators = classPartObject.validators;
1954
+ if (validators === null) {
1955
+ return void 0;
1956
+ }
1957
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
1958
+ const validatorsLength = validators.length;
1959
+ for (let i = 0; i < validatorsLength; i++) {
1960
+ const validatorObj = validators[i];
1961
+ if (validatorObj.validator(classRest)) {
1962
+ return validatorObj.classGroupId;
1963
+ }
1964
+ }
1965
+ return void 0;
1966
+ };
1967
+ const getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
1968
+ const content = className.slice(1, -1);
1969
+ const colonIndex = content.indexOf(":");
1970
+ const property = content.slice(0, colonIndex);
1971
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
1972
+ })();
1973
+ const createClassMap = (config) => {
1974
+ const {
1975
+ theme,
1976
+ classGroups
1977
+ } = config;
1978
+ return processClassGroups(classGroups, theme);
1979
+ };
1980
+ const processClassGroups = (classGroups, theme) => {
1981
+ const classMap = createClassPartObject();
1982
+ for (const classGroupId in classGroups) {
1983
+ const group = classGroups[classGroupId];
1984
+ processClassesRecursively(group, classMap, classGroupId, theme);
1985
+ }
1986
+ return classMap;
1987
+ };
1988
+ const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
1989
+ const len = classGroup.length;
1990
+ for (let i = 0; i < len; i++) {
1991
+ const classDefinition = classGroup[i];
1992
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
1993
+ }
1994
+ };
1995
+ const processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
1996
+ if (typeof classDefinition === "string") {
1997
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
1998
+ return;
1999
+ }
2000
+ if (typeof classDefinition === "function") {
2001
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
2002
+ return;
2003
+ }
2004
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
2005
+ };
2006
+ const processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
2007
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
2008
+ classPartObjectToEdit.classGroupId = classGroupId;
2009
+ };
2010
+ const processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
2011
+ if (isThemeGetter(classDefinition)) {
2012
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
2013
+ return;
2014
+ }
2015
+ if (classPartObject.validators === null) {
2016
+ classPartObject.validators = [];
2017
+ }
2018
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
2019
+ };
2020
+ const processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
2021
+ const entries = Object.entries(classDefinition);
2022
+ const len = entries.length;
2023
+ for (let i = 0; i < len; i++) {
2024
+ const [key, value] = entries[i];
2025
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
2026
+ }
2027
+ };
2028
+ const getPart = (classPartObject, path) => {
2029
+ let current = classPartObject;
2030
+ const parts = path.split(CLASS_PART_SEPARATOR);
2031
+ const len = parts.length;
2032
+ for (let i = 0; i < len; i++) {
2033
+ const part = parts[i];
2034
+ let next = current.nextPart.get(part);
2035
+ if (!next) {
2036
+ next = createClassPartObject();
2037
+ current.nextPart.set(part, next);
2038
+ }
2039
+ current = next;
2040
+ }
2041
+ return current;
2042
+ };
2043
+ const isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
2044
+ const createLruCache = (maxCacheSize) => {
2045
+ if (maxCacheSize < 1) {
2046
+ return {
2047
+ get: () => void 0,
2048
+ set: () => {
2049
+ }
2050
+ };
2051
+ }
2052
+ let cacheSize = 0;
2053
+ let cache = /* @__PURE__ */ Object.create(null);
2054
+ let previousCache = /* @__PURE__ */ Object.create(null);
2055
+ const update = (key, value) => {
2056
+ cache[key] = value;
2057
+ cacheSize++;
2058
+ if (cacheSize > maxCacheSize) {
2059
+ cacheSize = 0;
2060
+ previousCache = cache;
2061
+ cache = /* @__PURE__ */ Object.create(null);
2062
+ }
2063
+ };
2064
+ return {
2065
+ get(key) {
2066
+ let value = cache[key];
2067
+ if (value !== void 0) {
2068
+ return value;
2069
+ }
2070
+ if ((value = previousCache[key]) !== void 0) {
2071
+ update(key, value);
2072
+ return value;
2073
+ }
2074
+ },
2075
+ set(key, value) {
2076
+ if (key in cache) {
2077
+ cache[key] = value;
2078
+ } else {
2079
+ update(key, value);
2080
+ }
2081
+ }
2082
+ };
2083
+ };
2084
+ const IMPORTANT_MODIFIER = "!";
2085
+ const MODIFIER_SEPARATOR = ":";
2086
+ const EMPTY_MODIFIERS = [];
2087
+ const createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
2088
+ modifiers,
2089
+ hasImportantModifier,
2090
+ baseClassName,
2091
+ maybePostfixModifierPosition,
2092
+ isExternal
2093
+ });
2094
+ const createParseClassName = (config) => {
2095
+ const {
2096
+ prefix,
2097
+ experimentalParseClassName
2098
+ } = config;
2099
+ let parseClassName = (className) => {
2100
+ const modifiers = [];
2101
+ let bracketDepth = 0;
2102
+ let parenDepth = 0;
2103
+ let modifierStart = 0;
2104
+ let postfixModifierPosition;
2105
+ const len = className.length;
2106
+ for (let index = 0; index < len; index++) {
2107
+ const currentCharacter = className[index];
2108
+ if (bracketDepth === 0 && parenDepth === 0) {
2109
+ if (currentCharacter === MODIFIER_SEPARATOR) {
2110
+ modifiers.push(className.slice(modifierStart, index));
2111
+ modifierStart = index + 1;
2112
+ continue;
2113
+ }
2114
+ if (currentCharacter === "/") {
2115
+ postfixModifierPosition = index;
2116
+ continue;
2117
+ }
2118
+ }
2119
+ if (currentCharacter === "[") bracketDepth++;
2120
+ else if (currentCharacter === "]") bracketDepth--;
2121
+ else if (currentCharacter === "(") parenDepth++;
2122
+ else if (currentCharacter === ")") parenDepth--;
2123
+ }
2124
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
2125
+ let baseClassName = baseClassNameWithImportantModifier;
2126
+ let hasImportantModifier = false;
2127
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
2128
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
2129
+ hasImportantModifier = true;
2130
+ } else if (
2131
+ /**
2132
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
2133
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
2134
+ */
2135
+ baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
2136
+ ) {
2137
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
2138
+ hasImportantModifier = true;
2139
+ }
2140
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
2141
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
2142
+ };
2143
+ if (prefix) {
2144
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
2145
+ const parseClassNameOriginal = parseClassName;
2146
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
2147
+ }
2148
+ if (experimentalParseClassName) {
2149
+ const parseClassNameOriginal = parseClassName;
2150
+ parseClassName = (className) => experimentalParseClassName({
2151
+ className,
2152
+ parseClassName: parseClassNameOriginal
2153
+ });
2154
+ }
2155
+ return parseClassName;
2156
+ };
2157
+ const createSortModifiers = (config) => {
2158
+ const modifierWeights = /* @__PURE__ */ new Map();
2159
+ config.orderSensitiveModifiers.forEach((mod, index) => {
2160
+ modifierWeights.set(mod, 1e6 + index);
2161
+ });
2162
+ return (modifiers) => {
2163
+ const result = [];
2164
+ let currentSegment = [];
2165
+ for (let i = 0; i < modifiers.length; i++) {
2166
+ const modifier = modifiers[i];
2167
+ const isArbitrary = modifier[0] === "[";
2168
+ const isOrderSensitive = modifierWeights.has(modifier);
2169
+ if (isArbitrary || isOrderSensitive) {
2170
+ if (currentSegment.length > 0) {
2171
+ currentSegment.sort();
2172
+ result.push(...currentSegment);
2173
+ currentSegment = [];
2174
+ }
2175
+ result.push(modifier);
2176
+ } else {
2177
+ currentSegment.push(modifier);
2178
+ }
2179
+ }
2180
+ if (currentSegment.length > 0) {
2181
+ currentSegment.sort();
2182
+ result.push(...currentSegment);
2183
+ }
2184
+ return result;
2185
+ };
2186
+ };
2187
+ const createConfigUtils = (config) => ({
2188
+ cache: createLruCache(config.cacheSize),
2189
+ parseClassName: createParseClassName(config),
2190
+ sortModifiers: createSortModifiers(config),
2191
+ ...createClassGroupUtils(config)
2192
+ });
2193
+ const SPLIT_CLASSES_REGEX = /\s+/;
2194
+ const mergeClassList = (classList, configUtils) => {
2195
+ const {
2196
+ parseClassName,
2197
+ getClassGroupId,
2198
+ getConflictingClassGroupIds,
2199
+ sortModifiers
2200
+ } = configUtils;
2201
+ const classGroupsInConflict = [];
2202
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
2203
+ let result = "";
2204
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
2205
+ const originalClassName = classNames[index];
2206
+ const {
2207
+ isExternal,
2208
+ modifiers,
2209
+ hasImportantModifier,
2210
+ baseClassName,
2211
+ maybePostfixModifierPosition
2212
+ } = parseClassName(originalClassName);
2213
+ if (isExternal) {
2214
+ result = originalClassName + (result.length > 0 ? " " + result : result);
2215
+ continue;
2216
+ }
2217
+ let hasPostfixModifier = !!maybePostfixModifierPosition;
2218
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
2219
+ if (!classGroupId) {
2220
+ if (!hasPostfixModifier) {
2221
+ result = originalClassName + (result.length > 0 ? " " + result : result);
2222
+ continue;
2223
+ }
2224
+ classGroupId = getClassGroupId(baseClassName);
2225
+ if (!classGroupId) {
2226
+ result = originalClassName + (result.length > 0 ? " " + result : result);
2227
+ continue;
2228
+ }
2229
+ hasPostfixModifier = false;
2230
+ }
2231
+ const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
2232
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
2233
+ const classId = modifierId + classGroupId;
2234
+ if (classGroupsInConflict.indexOf(classId) > -1) {
2235
+ continue;
2236
+ }
2237
+ classGroupsInConflict.push(classId);
2238
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
2239
+ for (let i = 0; i < conflictGroups.length; ++i) {
2240
+ const group = conflictGroups[i];
2241
+ classGroupsInConflict.push(modifierId + group);
2242
+ }
2243
+ result = originalClassName + (result.length > 0 ? " " + result : result);
2244
+ }
2245
+ return result;
2246
+ };
2247
+ const twJoin = (...classLists) => {
2248
+ let index = 0;
2249
+ let argument;
2250
+ let resolvedValue;
2251
+ let string = "";
2252
+ while (index < classLists.length) {
2253
+ if (argument = classLists[index++]) {
2254
+ if (resolvedValue = toValue(argument)) {
2255
+ string && (string += " ");
2256
+ string += resolvedValue;
2257
+ }
2258
+ }
2259
+ }
2260
+ return string;
2261
+ };
2262
+ const toValue = (mix) => {
2263
+ if (typeof mix === "string") {
2264
+ return mix;
2265
+ }
2266
+ let resolvedValue;
2267
+ let string = "";
2268
+ for (let k = 0; k < mix.length; k++) {
2269
+ if (mix[k]) {
2270
+ if (resolvedValue = toValue(mix[k])) {
2271
+ string && (string += " ");
2272
+ string += resolvedValue;
2273
+ }
2274
+ }
2275
+ }
2276
+ return string;
2277
+ };
2278
+ const createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
2279
+ let configUtils;
2280
+ let cacheGet;
2281
+ let cacheSet;
2282
+ let functionToCall;
2283
+ const initTailwindMerge = (classList) => {
2284
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
2285
+ configUtils = createConfigUtils(config);
2286
+ cacheGet = configUtils.cache.get;
2287
+ cacheSet = configUtils.cache.set;
2288
+ functionToCall = tailwindMerge;
2289
+ return tailwindMerge(classList);
2290
+ };
2291
+ const tailwindMerge = (classList) => {
2292
+ const cachedResult = cacheGet(classList);
2293
+ if (cachedResult) {
2294
+ return cachedResult;
2295
+ }
2296
+ const result = mergeClassList(classList, configUtils);
2297
+ cacheSet(classList, result);
2298
+ return result;
2299
+ };
2300
+ functionToCall = initTailwindMerge;
2301
+ return (...args) => functionToCall(twJoin(...args));
2302
+ };
2303
+ const fallbackThemeArr = [];
2304
+ const fromTheme = (key) => {
2305
+ const themeGetter = (theme) => theme[key] || fallbackThemeArr;
2306
+ themeGetter.isThemeGetter = true;
2307
+ return themeGetter;
2308
+ };
2309
+ const arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
2310
+ const arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
2311
+ const fractionRegex = /^\d+\/\d+$/;
2312
+ const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
2313
+ 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$/;
2314
+ const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
2315
+ const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
2316
+ const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
2317
+ const isFraction = (value) => fractionRegex.test(value);
2318
+ const isNumber = (value) => !!value && !Number.isNaN(Number(value));
2319
+ const isInteger = (value) => !!value && Number.isInteger(Number(value));
2320
+ const isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
2321
+ const isTshirtSize = (value) => tshirtUnitRegex.test(value);
2322
+ const isAny = () => true;
2323
+ const isLengthOnly = (value) => (
2324
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
2325
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
2326
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
2327
+ lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
2328
+ );
2329
+ const isNever = () => false;
2330
+ const isShadow = (value) => shadowRegex.test(value);
2331
+ const isImage = (value) => imageRegex.test(value);
2332
+ const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
2333
+ const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
2334
+ const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
2335
+ const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
2336
+ const isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
2337
+ const isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
2338
+ const isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
2339
+ const isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
2340
+ const isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
2341
+ const isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
2342
+ const isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
2343
+ const isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
2344
+ const isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
2345
+ const isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
2346
+ const isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
2347
+ const getIsArbitraryValue = (value, testLabel, testValue) => {
2348
+ const result = arbitraryValueRegex.exec(value);
2349
+ if (result) {
2350
+ if (result[1]) {
2351
+ return testLabel(result[1]);
2352
+ }
2353
+ return testValue(result[2]);
2354
+ }
2355
+ return false;
2356
+ };
2357
+ const getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
2358
+ const result = arbitraryVariableRegex.exec(value);
2359
+ if (result) {
2360
+ if (result[1]) {
2361
+ return testLabel(result[1]);
2362
+ }
2363
+ return shouldMatchNoLabel;
2364
+ }
2365
+ return false;
2366
+ };
2367
+ const isLabelPosition = (label) => label === "position" || label === "percentage";
2368
+ const isLabelImage = (label) => label === "image" || label === "url";
2369
+ const isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
2370
+ const isLabelLength = (label) => label === "length";
2371
+ const isLabelNumber = (label) => label === "number";
2372
+ const isLabelFamilyName = (label) => label === "family-name";
2373
+ const isLabelShadow = (label) => label === "shadow";
2374
+ const getDefaultConfig = () => {
2375
+ const themeColor = fromTheme("color");
2376
+ const themeFont = fromTheme("font");
2377
+ const themeText = fromTheme("text");
2378
+ const themeFontWeight = fromTheme("font-weight");
2379
+ const themeTracking = fromTheme("tracking");
2380
+ const themeLeading = fromTheme("leading");
2381
+ const themeBreakpoint = fromTheme("breakpoint");
2382
+ const themeContainer = fromTheme("container");
2383
+ const themeSpacing = fromTheme("spacing");
2384
+ const themeRadius = fromTheme("radius");
2385
+ const themeShadow = fromTheme("shadow");
2386
+ const themeInsetShadow = fromTheme("inset-shadow");
2387
+ const themeTextShadow = fromTheme("text-shadow");
2388
+ const themeDropShadow = fromTheme("drop-shadow");
2389
+ const themeBlur = fromTheme("blur");
2390
+ const themePerspective = fromTheme("perspective");
2391
+ const themeAspect = fromTheme("aspect");
2392
+ const themeEase = fromTheme("ease");
2393
+ const themeAnimate = fromTheme("animate");
2394
+ const scaleBreak = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
2395
+ const scalePosition = () => [
2396
+ "center",
2397
+ "top",
2398
+ "bottom",
2399
+ "left",
2400
+ "right",
2401
+ "top-left",
2402
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2403
+ "left-top",
2404
+ "top-right",
2405
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2406
+ "right-top",
2407
+ "bottom-right",
2408
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2409
+ "right-bottom",
2410
+ "bottom-left",
2411
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2412
+ "left-bottom"
2413
+ ];
2414
+ const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
2415
+ const scaleOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
2416
+ const scaleOverscroll = () => ["auto", "contain", "none"];
2417
+ const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
2418
+ const scaleInset = () => [isFraction, "full", "auto", ...scaleUnambiguousSpacing()];
2419
+ const scaleGridTemplateColsRows = () => [isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue];
2420
+ const scaleGridColRowStartAndEnd = () => ["auto", {
2421
+ span: ["full", isInteger, isArbitraryVariable, isArbitraryValue]
2422
+ }, isInteger, isArbitraryVariable, isArbitraryValue];
2423
+ const scaleGridColRowStartOrEnd = () => [isInteger, "auto", isArbitraryVariable, isArbitraryValue];
2424
+ const scaleGridAutoColsRows = () => ["auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue];
2425
+ const scaleAlignPrimaryAxis = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"];
2426
+ const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"];
2427
+ const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
2428
+ const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
2429
+ const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
2430
+ const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
2431
+ position: [isArbitraryVariable, isArbitraryValue]
2432
+ }];
2433
+ const scaleBgRepeat = () => ["no-repeat", {
2434
+ repeat: ["", "x", "y", "space", "round"]
2435
+ }];
2436
+ const scaleBgSize = () => ["auto", "cover", "contain", isArbitraryVariableSize, isArbitrarySize, {
2437
+ size: [isArbitraryVariable, isArbitraryValue]
2438
+ }];
2439
+ const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
2440
+ const scaleRadius = () => [
2441
+ // Deprecated since Tailwind CSS v4.0.0
2442
+ "",
2443
+ "none",
2444
+ "full",
2445
+ themeRadius,
2446
+ isArbitraryVariable,
2447
+ isArbitraryValue
2448
+ ];
2449
+ const scaleBorderWidth = () => ["", isNumber, isArbitraryVariableLength, isArbitraryLength];
2450
+ const scaleLineStyle = () => ["solid", "dashed", "dotted", "double"];
2451
+ const scaleBlendMode = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
2452
+ const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
2453
+ const scaleBlur = () => [
2454
+ // Deprecated since Tailwind CSS v4.0.0
2455
+ "",
2456
+ "none",
2457
+ themeBlur,
2458
+ isArbitraryVariable,
2459
+ isArbitraryValue
2460
+ ];
2461
+ const scaleRotate = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
2462
+ const scaleScale = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
2463
+ const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
2464
+ const scaleTranslate = () => [isFraction, "full", ...scaleUnambiguousSpacing()];
2465
+ return {
2466
+ cacheSize: 500,
2467
+ theme: {
2468
+ animate: ["spin", "ping", "pulse", "bounce"],
2469
+ aspect: ["video"],
2470
+ blur: [isTshirtSize],
2471
+ breakpoint: [isTshirtSize],
2472
+ color: [isAny],
2473
+ container: [isTshirtSize],
2474
+ "drop-shadow": [isTshirtSize],
2475
+ ease: ["in", "out", "in-out"],
2476
+ font: [isAnyNonArbitrary],
2477
+ "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
2478
+ "inset-shadow": [isTshirtSize],
2479
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
2480
+ perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
2481
+ radius: [isTshirtSize],
2482
+ shadow: [isTshirtSize],
2483
+ spacing: ["px", isNumber],
2484
+ text: [isTshirtSize],
2485
+ "text-shadow": [isTshirtSize],
2486
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
2487
+ },
2488
+ classGroups: {
2489
+ // --------------
2490
+ // --- Layout ---
2491
+ // --------------
2492
+ /**
2493
+ * Aspect Ratio
2494
+ * @see https://tailwindcss.com/docs/aspect-ratio
2495
+ */
2496
+ aspect: [{
2497
+ aspect: ["auto", "square", isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
2498
+ }],
2499
+ /**
2500
+ * Container
2501
+ * @see https://tailwindcss.com/docs/container
2502
+ * @deprecated since Tailwind CSS v4.0.0
2503
+ */
2504
+ container: ["container"],
2505
+ /**
2506
+ * Columns
2507
+ * @see https://tailwindcss.com/docs/columns
2508
+ */
2509
+ columns: [{
2510
+ columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
2511
+ }],
2512
+ /**
2513
+ * Break After
2514
+ * @see https://tailwindcss.com/docs/break-after
2515
+ */
2516
+ "break-after": [{
2517
+ "break-after": scaleBreak()
2518
+ }],
2519
+ /**
2520
+ * Break Before
2521
+ * @see https://tailwindcss.com/docs/break-before
2522
+ */
2523
+ "break-before": [{
2524
+ "break-before": scaleBreak()
2525
+ }],
2526
+ /**
2527
+ * Break Inside
2528
+ * @see https://tailwindcss.com/docs/break-inside
2529
+ */
2530
+ "break-inside": [{
2531
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
2532
+ }],
2533
+ /**
2534
+ * Box Decoration Break
2535
+ * @see https://tailwindcss.com/docs/box-decoration-break
2536
+ */
2537
+ "box-decoration": [{
2538
+ "box-decoration": ["slice", "clone"]
2539
+ }],
2540
+ /**
2541
+ * Box Sizing
2542
+ * @see https://tailwindcss.com/docs/box-sizing
2543
+ */
2544
+ box: [{
2545
+ box: ["border", "content"]
2546
+ }],
2547
+ /**
2548
+ * Display
2549
+ * @see https://tailwindcss.com/docs/display
2550
+ */
2551
+ 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"],
2552
+ /**
2553
+ * Screen Reader Only
2554
+ * @see https://tailwindcss.com/docs/display#screen-reader-only
2555
+ */
2556
+ sr: ["sr-only", "not-sr-only"],
2557
+ /**
2558
+ * Floats
2559
+ * @see https://tailwindcss.com/docs/float
2560
+ */
2561
+ float: [{
2562
+ float: ["right", "left", "none", "start", "end"]
2563
+ }],
2564
+ /**
2565
+ * Clear
2566
+ * @see https://tailwindcss.com/docs/clear
2567
+ */
2568
+ clear: [{
2569
+ clear: ["left", "right", "both", "none", "start", "end"]
2570
+ }],
2571
+ /**
2572
+ * Isolation
2573
+ * @see https://tailwindcss.com/docs/isolation
2574
+ */
2575
+ isolation: ["isolate", "isolation-auto"],
2576
+ /**
2577
+ * Object Fit
2578
+ * @see https://tailwindcss.com/docs/object-fit
2579
+ */
2580
+ "object-fit": [{
2581
+ object: ["contain", "cover", "fill", "none", "scale-down"]
2582
+ }],
2583
+ /**
2584
+ * Object Position
2585
+ * @see https://tailwindcss.com/docs/object-position
2586
+ */
2587
+ "object-position": [{
2588
+ object: scalePositionWithArbitrary()
2589
+ }],
2590
+ /**
2591
+ * Overflow
2592
+ * @see https://tailwindcss.com/docs/overflow
2593
+ */
2594
+ overflow: [{
2595
+ overflow: scaleOverflow()
2596
+ }],
2597
+ /**
2598
+ * Overflow X
2599
+ * @see https://tailwindcss.com/docs/overflow
2600
+ */
2601
+ "overflow-x": [{
2602
+ "overflow-x": scaleOverflow()
2603
+ }],
2604
+ /**
2605
+ * Overflow Y
2606
+ * @see https://tailwindcss.com/docs/overflow
2607
+ */
2608
+ "overflow-y": [{
2609
+ "overflow-y": scaleOverflow()
2610
+ }],
2611
+ /**
2612
+ * Overscroll Behavior
2613
+ * @see https://tailwindcss.com/docs/overscroll-behavior
2614
+ */
2615
+ overscroll: [{
2616
+ overscroll: scaleOverscroll()
2617
+ }],
2618
+ /**
2619
+ * Overscroll Behavior X
2620
+ * @see https://tailwindcss.com/docs/overscroll-behavior
2621
+ */
2622
+ "overscroll-x": [{
2623
+ "overscroll-x": scaleOverscroll()
2624
+ }],
2625
+ /**
2626
+ * Overscroll Behavior Y
2627
+ * @see https://tailwindcss.com/docs/overscroll-behavior
2628
+ */
2629
+ "overscroll-y": [{
2630
+ "overscroll-y": scaleOverscroll()
2631
+ }],
2632
+ /**
2633
+ * Position
2634
+ * @see https://tailwindcss.com/docs/position
2635
+ */
2636
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
2637
+ /**
2638
+ * Top / Right / Bottom / Left
2639
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
2640
+ */
2641
+ inset: [{
2642
+ inset: scaleInset()
2643
+ }],
2644
+ /**
2645
+ * Right / Left
2646
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
2647
+ */
2648
+ "inset-x": [{
2649
+ "inset-x": scaleInset()
2650
+ }],
2651
+ /**
2652
+ * Top / Bottom
2653
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
2654
+ */
2655
+ "inset-y": [{
2656
+ "inset-y": scaleInset()
2657
+ }],
2658
+ /**
2659
+ * Start
2660
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
2661
+ */
2662
+ start: [{
2663
+ start: scaleInset()
2664
+ }],
2665
+ /**
2666
+ * End
2667
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
2668
+ */
2669
+ end: [{
2670
+ end: scaleInset()
2671
+ }],
2672
+ /**
2673
+ * Top
2674
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
2675
+ */
2676
+ top: [{
2677
+ top: scaleInset()
2678
+ }],
2679
+ /**
2680
+ * Right
2681
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
2682
+ */
2683
+ right: [{
2684
+ right: scaleInset()
2685
+ }],
2686
+ /**
2687
+ * Bottom
2688
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
2689
+ */
2690
+ bottom: [{
2691
+ bottom: scaleInset()
2692
+ }],
2693
+ /**
2694
+ * Left
2695
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
2696
+ */
2697
+ left: [{
2698
+ left: scaleInset()
2699
+ }],
2700
+ /**
2701
+ * Visibility
2702
+ * @see https://tailwindcss.com/docs/visibility
2703
+ */
2704
+ visibility: ["visible", "invisible", "collapse"],
2705
+ /**
2706
+ * Z-Index
2707
+ * @see https://tailwindcss.com/docs/z-index
2708
+ */
2709
+ z: [{
2710
+ z: [isInteger, "auto", isArbitraryVariable, isArbitraryValue]
2711
+ }],
2712
+ // ------------------------
2713
+ // --- Flexbox and Grid ---
2714
+ // ------------------------
2715
+ /**
2716
+ * Flex Basis
2717
+ * @see https://tailwindcss.com/docs/flex-basis
2718
+ */
2719
+ basis: [{
2720
+ basis: [isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing()]
2721
+ }],
2722
+ /**
2723
+ * Flex Direction
2724
+ * @see https://tailwindcss.com/docs/flex-direction
2725
+ */
2726
+ "flex-direction": [{
2727
+ flex: ["row", "row-reverse", "col", "col-reverse"]
2728
+ }],
2729
+ /**
2730
+ * Flex Wrap
2731
+ * @see https://tailwindcss.com/docs/flex-wrap
2732
+ */
2733
+ "flex-wrap": [{
2734
+ flex: ["nowrap", "wrap", "wrap-reverse"]
2735
+ }],
2736
+ /**
2737
+ * Flex
2738
+ * @see https://tailwindcss.com/docs/flex
2739
+ */
2740
+ flex: [{
2741
+ flex: [isNumber, isFraction, "auto", "initial", "none", isArbitraryValue]
2742
+ }],
2743
+ /**
2744
+ * Flex Grow
2745
+ * @see https://tailwindcss.com/docs/flex-grow
2746
+ */
2747
+ grow: [{
2748
+ grow: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2749
+ }],
2750
+ /**
2751
+ * Flex Shrink
2752
+ * @see https://tailwindcss.com/docs/flex-shrink
2753
+ */
2754
+ shrink: [{
2755
+ shrink: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2756
+ }],
2757
+ /**
2758
+ * Order
2759
+ * @see https://tailwindcss.com/docs/order
2760
+ */
2761
+ order: [{
2762
+ order: [isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue]
2763
+ }],
2764
+ /**
2765
+ * Grid Template Columns
2766
+ * @see https://tailwindcss.com/docs/grid-template-columns
2767
+ */
2768
+ "grid-cols": [{
2769
+ "grid-cols": scaleGridTemplateColsRows()
2770
+ }],
2771
+ /**
2772
+ * Grid Column Start / End
2773
+ * @see https://tailwindcss.com/docs/grid-column
2774
+ */
2775
+ "col-start-end": [{
2776
+ col: scaleGridColRowStartAndEnd()
2777
+ }],
2778
+ /**
2779
+ * Grid Column Start
2780
+ * @see https://tailwindcss.com/docs/grid-column
2781
+ */
2782
+ "col-start": [{
2783
+ "col-start": scaleGridColRowStartOrEnd()
2784
+ }],
2785
+ /**
2786
+ * Grid Column End
2787
+ * @see https://tailwindcss.com/docs/grid-column
2788
+ */
2789
+ "col-end": [{
2790
+ "col-end": scaleGridColRowStartOrEnd()
2791
+ }],
2792
+ /**
2793
+ * Grid Template Rows
2794
+ * @see https://tailwindcss.com/docs/grid-template-rows
2795
+ */
2796
+ "grid-rows": [{
2797
+ "grid-rows": scaleGridTemplateColsRows()
2798
+ }],
2799
+ /**
2800
+ * Grid Row Start / End
2801
+ * @see https://tailwindcss.com/docs/grid-row
2802
+ */
2803
+ "row-start-end": [{
2804
+ row: scaleGridColRowStartAndEnd()
2805
+ }],
2806
+ /**
2807
+ * Grid Row Start
2808
+ * @see https://tailwindcss.com/docs/grid-row
2809
+ */
2810
+ "row-start": [{
2811
+ "row-start": scaleGridColRowStartOrEnd()
2812
+ }],
2813
+ /**
2814
+ * Grid Row End
2815
+ * @see https://tailwindcss.com/docs/grid-row
2816
+ */
2817
+ "row-end": [{
2818
+ "row-end": scaleGridColRowStartOrEnd()
2819
+ }],
2820
+ /**
2821
+ * Grid Auto Flow
2822
+ * @see https://tailwindcss.com/docs/grid-auto-flow
2823
+ */
2824
+ "grid-flow": [{
2825
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
2826
+ }],
2827
+ /**
2828
+ * Grid Auto Columns
2829
+ * @see https://tailwindcss.com/docs/grid-auto-columns
2830
+ */
2831
+ "auto-cols": [{
2832
+ "auto-cols": scaleGridAutoColsRows()
2833
+ }],
2834
+ /**
2835
+ * Grid Auto Rows
2836
+ * @see https://tailwindcss.com/docs/grid-auto-rows
2837
+ */
2838
+ "auto-rows": [{
2839
+ "auto-rows": scaleGridAutoColsRows()
2840
+ }],
2841
+ /**
2842
+ * Gap
2843
+ * @see https://tailwindcss.com/docs/gap
2844
+ */
2845
+ gap: [{
2846
+ gap: scaleUnambiguousSpacing()
2847
+ }],
2848
+ /**
2849
+ * Gap X
2850
+ * @see https://tailwindcss.com/docs/gap
2851
+ */
2852
+ "gap-x": [{
2853
+ "gap-x": scaleUnambiguousSpacing()
2854
+ }],
2855
+ /**
2856
+ * Gap Y
2857
+ * @see https://tailwindcss.com/docs/gap
2858
+ */
2859
+ "gap-y": [{
2860
+ "gap-y": scaleUnambiguousSpacing()
2861
+ }],
2862
+ /**
2863
+ * Justify Content
2864
+ * @see https://tailwindcss.com/docs/justify-content
2865
+ */
2866
+ "justify-content": [{
2867
+ justify: [...scaleAlignPrimaryAxis(), "normal"]
2868
+ }],
2869
+ /**
2870
+ * Justify Items
2871
+ * @see https://tailwindcss.com/docs/justify-items
2872
+ */
2873
+ "justify-items": [{
2874
+ "justify-items": [...scaleAlignSecondaryAxis(), "normal"]
2875
+ }],
2876
+ /**
2877
+ * Justify Self
2878
+ * @see https://tailwindcss.com/docs/justify-self
2879
+ */
2880
+ "justify-self": [{
2881
+ "justify-self": ["auto", ...scaleAlignSecondaryAxis()]
2882
+ }],
2883
+ /**
2884
+ * Align Content
2885
+ * @see https://tailwindcss.com/docs/align-content
2886
+ */
2887
+ "align-content": [{
2888
+ content: ["normal", ...scaleAlignPrimaryAxis()]
2889
+ }],
2890
+ /**
2891
+ * Align Items
2892
+ * @see https://tailwindcss.com/docs/align-items
2893
+ */
2894
+ "align-items": [{
2895
+ items: [...scaleAlignSecondaryAxis(), {
2896
+ baseline: ["", "last"]
2897
+ }]
2898
+ }],
2899
+ /**
2900
+ * Align Self
2901
+ * @see https://tailwindcss.com/docs/align-self
2902
+ */
2903
+ "align-self": [{
2904
+ self: ["auto", ...scaleAlignSecondaryAxis(), {
2905
+ baseline: ["", "last"]
2906
+ }]
2907
+ }],
2908
+ /**
2909
+ * Place Content
2910
+ * @see https://tailwindcss.com/docs/place-content
2911
+ */
2912
+ "place-content": [{
2913
+ "place-content": scaleAlignPrimaryAxis()
2914
+ }],
2915
+ /**
2916
+ * Place Items
2917
+ * @see https://tailwindcss.com/docs/place-items
2918
+ */
2919
+ "place-items": [{
2920
+ "place-items": [...scaleAlignSecondaryAxis(), "baseline"]
2921
+ }],
2922
+ /**
2923
+ * Place Self
2924
+ * @see https://tailwindcss.com/docs/place-self
2925
+ */
2926
+ "place-self": [{
2927
+ "place-self": ["auto", ...scaleAlignSecondaryAxis()]
2928
+ }],
2929
+ // Spacing
2930
+ /**
2931
+ * Padding
2932
+ * @see https://tailwindcss.com/docs/padding
2933
+ */
2934
+ p: [{
2935
+ p: scaleUnambiguousSpacing()
2936
+ }],
2937
+ /**
2938
+ * Padding X
2939
+ * @see https://tailwindcss.com/docs/padding
2940
+ */
2941
+ px: [{
2942
+ px: scaleUnambiguousSpacing()
2943
+ }],
2944
+ /**
2945
+ * Padding Y
2946
+ * @see https://tailwindcss.com/docs/padding
2947
+ */
2948
+ py: [{
2949
+ py: scaleUnambiguousSpacing()
2950
+ }],
2951
+ /**
2952
+ * Padding Start
2953
+ * @see https://tailwindcss.com/docs/padding
2954
+ */
2955
+ ps: [{
2956
+ ps: scaleUnambiguousSpacing()
2957
+ }],
2958
+ /**
2959
+ * Padding End
2960
+ * @see https://tailwindcss.com/docs/padding
2961
+ */
2962
+ pe: [{
2963
+ pe: scaleUnambiguousSpacing()
2964
+ }],
2965
+ /**
2966
+ * Padding Top
2967
+ * @see https://tailwindcss.com/docs/padding
2968
+ */
2969
+ pt: [{
2970
+ pt: scaleUnambiguousSpacing()
2971
+ }],
2972
+ /**
2973
+ * Padding Right
2974
+ * @see https://tailwindcss.com/docs/padding
2975
+ */
2976
+ pr: [{
2977
+ pr: scaleUnambiguousSpacing()
2978
+ }],
2979
+ /**
2980
+ * Padding Bottom
2981
+ * @see https://tailwindcss.com/docs/padding
2982
+ */
2983
+ pb: [{
2984
+ pb: scaleUnambiguousSpacing()
2985
+ }],
2986
+ /**
2987
+ * Padding Left
2988
+ * @see https://tailwindcss.com/docs/padding
2989
+ */
2990
+ pl: [{
2991
+ pl: scaleUnambiguousSpacing()
2992
+ }],
2993
+ /**
2994
+ * Margin
2995
+ * @see https://tailwindcss.com/docs/margin
2996
+ */
2997
+ m: [{
2998
+ m: scaleMargin()
2999
+ }],
3000
+ /**
3001
+ * Margin X
3002
+ * @see https://tailwindcss.com/docs/margin
3003
+ */
3004
+ mx: [{
3005
+ mx: scaleMargin()
3006
+ }],
3007
+ /**
3008
+ * Margin Y
3009
+ * @see https://tailwindcss.com/docs/margin
3010
+ */
3011
+ my: [{
3012
+ my: scaleMargin()
3013
+ }],
3014
+ /**
3015
+ * Margin Start
3016
+ * @see https://tailwindcss.com/docs/margin
3017
+ */
3018
+ ms: [{
3019
+ ms: scaleMargin()
3020
+ }],
3021
+ /**
3022
+ * Margin End
3023
+ * @see https://tailwindcss.com/docs/margin
3024
+ */
3025
+ me: [{
3026
+ me: scaleMargin()
3027
+ }],
3028
+ /**
3029
+ * Margin Top
3030
+ * @see https://tailwindcss.com/docs/margin
3031
+ */
3032
+ mt: [{
3033
+ mt: scaleMargin()
3034
+ }],
3035
+ /**
3036
+ * Margin Right
3037
+ * @see https://tailwindcss.com/docs/margin
3038
+ */
3039
+ mr: [{
3040
+ mr: scaleMargin()
3041
+ }],
3042
+ /**
3043
+ * Margin Bottom
3044
+ * @see https://tailwindcss.com/docs/margin
3045
+ */
3046
+ mb: [{
3047
+ mb: scaleMargin()
3048
+ }],
3049
+ /**
3050
+ * Margin Left
3051
+ * @see https://tailwindcss.com/docs/margin
3052
+ */
3053
+ ml: [{
3054
+ ml: scaleMargin()
3055
+ }],
3056
+ /**
3057
+ * Space Between X
3058
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3059
+ */
3060
+ "space-x": [{
3061
+ "space-x": scaleUnambiguousSpacing()
3062
+ }],
3063
+ /**
3064
+ * Space Between X Reverse
3065
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3066
+ */
3067
+ "space-x-reverse": ["space-x-reverse"],
3068
+ /**
3069
+ * Space Between Y
3070
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3071
+ */
3072
+ "space-y": [{
3073
+ "space-y": scaleUnambiguousSpacing()
3074
+ }],
3075
+ /**
3076
+ * Space Between Y Reverse
3077
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3078
+ */
3079
+ "space-y-reverse": ["space-y-reverse"],
3080
+ // --------------
3081
+ // --- Sizing ---
3082
+ // --------------
3083
+ /**
3084
+ * Size
3085
+ * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
3086
+ */
3087
+ size: [{
3088
+ size: scaleSizing()
3089
+ }],
3090
+ /**
3091
+ * Width
3092
+ * @see https://tailwindcss.com/docs/width
3093
+ */
3094
+ w: [{
3095
+ w: [themeContainer, "screen", ...scaleSizing()]
3096
+ }],
3097
+ /**
3098
+ * Min-Width
3099
+ * @see https://tailwindcss.com/docs/min-width
3100
+ */
3101
+ "min-w": [{
3102
+ "min-w": [
3103
+ themeContainer,
3104
+ "screen",
3105
+ /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
3106
+ "none",
3107
+ ...scaleSizing()
3108
+ ]
3109
+ }],
3110
+ /**
3111
+ * Max-Width
3112
+ * @see https://tailwindcss.com/docs/max-width
3113
+ */
3114
+ "max-w": [{
3115
+ "max-w": [
3116
+ themeContainer,
3117
+ "screen",
3118
+ "none",
3119
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
3120
+ "prose",
3121
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
3122
+ {
3123
+ screen: [themeBreakpoint]
3124
+ },
3125
+ ...scaleSizing()
3126
+ ]
3127
+ }],
3128
+ /**
3129
+ * Height
3130
+ * @see https://tailwindcss.com/docs/height
3131
+ */
3132
+ h: [{
3133
+ h: ["screen", "lh", ...scaleSizing()]
3134
+ }],
3135
+ /**
3136
+ * Min-Height
3137
+ * @see https://tailwindcss.com/docs/min-height
3138
+ */
3139
+ "min-h": [{
3140
+ "min-h": ["screen", "lh", "none", ...scaleSizing()]
3141
+ }],
3142
+ /**
3143
+ * Max-Height
3144
+ * @see https://tailwindcss.com/docs/max-height
3145
+ */
3146
+ "max-h": [{
3147
+ "max-h": ["screen", "lh", ...scaleSizing()]
3148
+ }],
3149
+ // ------------------
3150
+ // --- Typography ---
3151
+ // ------------------
3152
+ /**
3153
+ * Font Size
3154
+ * @see https://tailwindcss.com/docs/font-size
3155
+ */
3156
+ "font-size": [{
3157
+ text: ["base", themeText, isArbitraryVariableLength, isArbitraryLength]
3158
+ }],
3159
+ /**
3160
+ * Font Smoothing
3161
+ * @see https://tailwindcss.com/docs/font-smoothing
3162
+ */
3163
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
3164
+ /**
3165
+ * Font Style
3166
+ * @see https://tailwindcss.com/docs/font-style
3167
+ */
3168
+ "font-style": ["italic", "not-italic"],
3169
+ /**
3170
+ * Font Weight
3171
+ * @see https://tailwindcss.com/docs/font-weight
3172
+ */
3173
+ "font-weight": [{
3174
+ font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]
3175
+ }],
3176
+ /**
3177
+ * Font Stretch
3178
+ * @see https://tailwindcss.com/docs/font-stretch
3179
+ */
3180
+ "font-stretch": [{
3181
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", isPercent, isArbitraryValue]
3182
+ }],
3183
+ /**
3184
+ * Font Family
3185
+ * @see https://tailwindcss.com/docs/font-family
3186
+ */
3187
+ "font-family": [{
3188
+ font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]
3189
+ }],
3190
+ /**
3191
+ * Font Variant Numeric
3192
+ * @see https://tailwindcss.com/docs/font-variant-numeric
3193
+ */
3194
+ "fvn-normal": ["normal-nums"],
3195
+ /**
3196
+ * Font Variant Numeric
3197
+ * @see https://tailwindcss.com/docs/font-variant-numeric
3198
+ */
3199
+ "fvn-ordinal": ["ordinal"],
3200
+ /**
3201
+ * Font Variant Numeric
3202
+ * @see https://tailwindcss.com/docs/font-variant-numeric
3203
+ */
3204
+ "fvn-slashed-zero": ["slashed-zero"],
3205
+ /**
3206
+ * Font Variant Numeric
3207
+ * @see https://tailwindcss.com/docs/font-variant-numeric
3208
+ */
3209
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
3210
+ /**
3211
+ * Font Variant Numeric
3212
+ * @see https://tailwindcss.com/docs/font-variant-numeric
3213
+ */
3214
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
3215
+ /**
3216
+ * Font Variant Numeric
3217
+ * @see https://tailwindcss.com/docs/font-variant-numeric
3218
+ */
3219
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
3220
+ /**
3221
+ * Letter Spacing
3222
+ * @see https://tailwindcss.com/docs/letter-spacing
3223
+ */
3224
+ tracking: [{
3225
+ tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
3226
+ }],
3227
+ /**
3228
+ * Line Clamp
3229
+ * @see https://tailwindcss.com/docs/line-clamp
3230
+ */
3231
+ "line-clamp": [{
3232
+ "line-clamp": [isNumber, "none", isArbitraryVariable, isArbitraryNumber]
3233
+ }],
3234
+ /**
3235
+ * Line Height
3236
+ * @see https://tailwindcss.com/docs/line-height
3237
+ */
3238
+ leading: [{
3239
+ leading: [
3240
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
3241
+ themeLeading,
3242
+ ...scaleUnambiguousSpacing()
3243
+ ]
3244
+ }],
3245
+ /**
3246
+ * List Style Image
3247
+ * @see https://tailwindcss.com/docs/list-style-image
3248
+ */
3249
+ "list-image": [{
3250
+ "list-image": ["none", isArbitraryVariable, isArbitraryValue]
3251
+ }],
3252
+ /**
3253
+ * List Style Position
3254
+ * @see https://tailwindcss.com/docs/list-style-position
3255
+ */
3256
+ "list-style-position": [{
3257
+ list: ["inside", "outside"]
3258
+ }],
3259
+ /**
3260
+ * List Style Type
3261
+ * @see https://tailwindcss.com/docs/list-style-type
3262
+ */
3263
+ "list-style-type": [{
3264
+ list: ["disc", "decimal", "none", isArbitraryVariable, isArbitraryValue]
3265
+ }],
3266
+ /**
3267
+ * Text Alignment
3268
+ * @see https://tailwindcss.com/docs/text-align
3269
+ */
3270
+ "text-alignment": [{
3271
+ text: ["left", "center", "right", "justify", "start", "end"]
3272
+ }],
3273
+ /**
3274
+ * Placeholder Color
3275
+ * @deprecated since Tailwind CSS v3.0.0
3276
+ * @see https://v3.tailwindcss.com/docs/placeholder-color
3277
+ */
3278
+ "placeholder-color": [{
3279
+ placeholder: scaleColor()
3280
+ }],
3281
+ /**
3282
+ * Text Color
3283
+ * @see https://tailwindcss.com/docs/text-color
3284
+ */
3285
+ "text-color": [{
3286
+ text: scaleColor()
3287
+ }],
3288
+ /**
3289
+ * Text Decoration
3290
+ * @see https://tailwindcss.com/docs/text-decoration
3291
+ */
3292
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
3293
+ /**
3294
+ * Text Decoration Style
3295
+ * @see https://tailwindcss.com/docs/text-decoration-style
3296
+ */
3297
+ "text-decoration-style": [{
3298
+ decoration: [...scaleLineStyle(), "wavy"]
3299
+ }],
3300
+ /**
3301
+ * Text Decoration Thickness
3302
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
3303
+ */
3304
+ "text-decoration-thickness": [{
3305
+ decoration: [isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength]
3306
+ }],
3307
+ /**
3308
+ * Text Decoration Color
3309
+ * @see https://tailwindcss.com/docs/text-decoration-color
3310
+ */
3311
+ "text-decoration-color": [{
3312
+ decoration: scaleColor()
3313
+ }],
3314
+ /**
3315
+ * Text Underline Offset
3316
+ * @see https://tailwindcss.com/docs/text-underline-offset
3317
+ */
3318
+ "underline-offset": [{
3319
+ "underline-offset": [isNumber, "auto", isArbitraryVariable, isArbitraryValue]
3320
+ }],
3321
+ /**
3322
+ * Text Transform
3323
+ * @see https://tailwindcss.com/docs/text-transform
3324
+ */
3325
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
3326
+ /**
3327
+ * Text Overflow
3328
+ * @see https://tailwindcss.com/docs/text-overflow
3329
+ */
3330
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
3331
+ /**
3332
+ * Text Wrap
3333
+ * @see https://tailwindcss.com/docs/text-wrap
3334
+ */
3335
+ "text-wrap": [{
3336
+ text: ["wrap", "nowrap", "balance", "pretty"]
3337
+ }],
3338
+ /**
3339
+ * Text Indent
3340
+ * @see https://tailwindcss.com/docs/text-indent
3341
+ */
3342
+ indent: [{
3343
+ indent: scaleUnambiguousSpacing()
3344
+ }],
3345
+ /**
3346
+ * Vertical Alignment
3347
+ * @see https://tailwindcss.com/docs/vertical-align
3348
+ */
3349
+ "vertical-align": [{
3350
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryVariable, isArbitraryValue]
3351
+ }],
3352
+ /**
3353
+ * Whitespace
3354
+ * @see https://tailwindcss.com/docs/whitespace
3355
+ */
3356
+ whitespace: [{
3357
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
3358
+ }],
3359
+ /**
3360
+ * Word Break
3361
+ * @see https://tailwindcss.com/docs/word-break
3362
+ */
3363
+ break: [{
3364
+ break: ["normal", "words", "all", "keep"]
3365
+ }],
3366
+ /**
3367
+ * Overflow Wrap
3368
+ * @see https://tailwindcss.com/docs/overflow-wrap
3369
+ */
3370
+ wrap: [{
3371
+ wrap: ["break-word", "anywhere", "normal"]
3372
+ }],
3373
+ /**
3374
+ * Hyphens
3375
+ * @see https://tailwindcss.com/docs/hyphens
3376
+ */
3377
+ hyphens: [{
3378
+ hyphens: ["none", "manual", "auto"]
3379
+ }],
3380
+ /**
3381
+ * Content
3382
+ * @see https://tailwindcss.com/docs/content
3383
+ */
3384
+ content: [{
3385
+ content: ["none", isArbitraryVariable, isArbitraryValue]
3386
+ }],
3387
+ // -------------------
3388
+ // --- Backgrounds ---
3389
+ // -------------------
3390
+ /**
3391
+ * Background Attachment
3392
+ * @see https://tailwindcss.com/docs/background-attachment
3393
+ */
3394
+ "bg-attachment": [{
3395
+ bg: ["fixed", "local", "scroll"]
3396
+ }],
3397
+ /**
3398
+ * Background Clip
3399
+ * @see https://tailwindcss.com/docs/background-clip
3400
+ */
3401
+ "bg-clip": [{
3402
+ "bg-clip": ["border", "padding", "content", "text"]
3403
+ }],
3404
+ /**
3405
+ * Background Origin
3406
+ * @see https://tailwindcss.com/docs/background-origin
3407
+ */
3408
+ "bg-origin": [{
3409
+ "bg-origin": ["border", "padding", "content"]
3410
+ }],
3411
+ /**
3412
+ * Background Position
3413
+ * @see https://tailwindcss.com/docs/background-position
3414
+ */
3415
+ "bg-position": [{
3416
+ bg: scaleBgPosition()
3417
+ }],
3418
+ /**
3419
+ * Background Repeat
3420
+ * @see https://tailwindcss.com/docs/background-repeat
3421
+ */
3422
+ "bg-repeat": [{
3423
+ bg: scaleBgRepeat()
3424
+ }],
3425
+ /**
3426
+ * Background Size
3427
+ * @see https://tailwindcss.com/docs/background-size
3428
+ */
3429
+ "bg-size": [{
3430
+ bg: scaleBgSize()
3431
+ }],
3432
+ /**
3433
+ * Background Image
3434
+ * @see https://tailwindcss.com/docs/background-image
3435
+ */
3436
+ "bg-image": [{
3437
+ bg: ["none", {
3438
+ linear: [{
3439
+ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
3440
+ }, isInteger, isArbitraryVariable, isArbitraryValue],
3441
+ radial: ["", isArbitraryVariable, isArbitraryValue],
3442
+ conic: [isInteger, isArbitraryVariable, isArbitraryValue]
3443
+ }, isArbitraryVariableImage, isArbitraryImage]
3444
+ }],
3445
+ /**
3446
+ * Background Color
3447
+ * @see https://tailwindcss.com/docs/background-color
3448
+ */
3449
+ "bg-color": [{
3450
+ bg: scaleColor()
3451
+ }],
3452
+ /**
3453
+ * Gradient Color Stops From Position
3454
+ * @see https://tailwindcss.com/docs/gradient-color-stops
3455
+ */
3456
+ "gradient-from-pos": [{
3457
+ from: scaleGradientStopPosition()
3458
+ }],
3459
+ /**
3460
+ * Gradient Color Stops Via Position
3461
+ * @see https://tailwindcss.com/docs/gradient-color-stops
3462
+ */
3463
+ "gradient-via-pos": [{
3464
+ via: scaleGradientStopPosition()
3465
+ }],
3466
+ /**
3467
+ * Gradient Color Stops To Position
3468
+ * @see https://tailwindcss.com/docs/gradient-color-stops
3469
+ */
3470
+ "gradient-to-pos": [{
3471
+ to: scaleGradientStopPosition()
3472
+ }],
3473
+ /**
3474
+ * Gradient Color Stops From
3475
+ * @see https://tailwindcss.com/docs/gradient-color-stops
3476
+ */
3477
+ "gradient-from": [{
3478
+ from: scaleColor()
3479
+ }],
3480
+ /**
3481
+ * Gradient Color Stops Via
3482
+ * @see https://tailwindcss.com/docs/gradient-color-stops
3483
+ */
3484
+ "gradient-via": [{
3485
+ via: scaleColor()
3486
+ }],
3487
+ /**
3488
+ * Gradient Color Stops To
3489
+ * @see https://tailwindcss.com/docs/gradient-color-stops
3490
+ */
3491
+ "gradient-to": [{
3492
+ to: scaleColor()
3493
+ }],
3494
+ // ---------------
3495
+ // --- Borders ---
3496
+ // ---------------
3497
+ /**
3498
+ * Border Radius
3499
+ * @see https://tailwindcss.com/docs/border-radius
3500
+ */
3501
+ rounded: [{
3502
+ rounded: scaleRadius()
3503
+ }],
3504
+ /**
3505
+ * Border Radius Start
3506
+ * @see https://tailwindcss.com/docs/border-radius
3507
+ */
3508
+ "rounded-s": [{
3509
+ "rounded-s": scaleRadius()
3510
+ }],
3511
+ /**
3512
+ * Border Radius End
3513
+ * @see https://tailwindcss.com/docs/border-radius
3514
+ */
3515
+ "rounded-e": [{
3516
+ "rounded-e": scaleRadius()
3517
+ }],
3518
+ /**
3519
+ * Border Radius Top
3520
+ * @see https://tailwindcss.com/docs/border-radius
3521
+ */
3522
+ "rounded-t": [{
3523
+ "rounded-t": scaleRadius()
3524
+ }],
3525
+ /**
3526
+ * Border Radius Right
3527
+ * @see https://tailwindcss.com/docs/border-radius
3528
+ */
3529
+ "rounded-r": [{
3530
+ "rounded-r": scaleRadius()
3531
+ }],
3532
+ /**
3533
+ * Border Radius Bottom
3534
+ * @see https://tailwindcss.com/docs/border-radius
3535
+ */
3536
+ "rounded-b": [{
3537
+ "rounded-b": scaleRadius()
3538
+ }],
3539
+ /**
3540
+ * Border Radius Left
3541
+ * @see https://tailwindcss.com/docs/border-radius
3542
+ */
3543
+ "rounded-l": [{
3544
+ "rounded-l": scaleRadius()
3545
+ }],
3546
+ /**
3547
+ * Border Radius Start Start
3548
+ * @see https://tailwindcss.com/docs/border-radius
3549
+ */
3550
+ "rounded-ss": [{
3551
+ "rounded-ss": scaleRadius()
3552
+ }],
3553
+ /**
3554
+ * Border Radius Start End
3555
+ * @see https://tailwindcss.com/docs/border-radius
3556
+ */
3557
+ "rounded-se": [{
3558
+ "rounded-se": scaleRadius()
3559
+ }],
3560
+ /**
3561
+ * Border Radius End End
3562
+ * @see https://tailwindcss.com/docs/border-radius
3563
+ */
3564
+ "rounded-ee": [{
3565
+ "rounded-ee": scaleRadius()
3566
+ }],
3567
+ /**
3568
+ * Border Radius End Start
3569
+ * @see https://tailwindcss.com/docs/border-radius
3570
+ */
3571
+ "rounded-es": [{
3572
+ "rounded-es": scaleRadius()
3573
+ }],
3574
+ /**
3575
+ * Border Radius Top Left
3576
+ * @see https://tailwindcss.com/docs/border-radius
3577
+ */
3578
+ "rounded-tl": [{
3579
+ "rounded-tl": scaleRadius()
3580
+ }],
3581
+ /**
3582
+ * Border Radius Top Right
3583
+ * @see https://tailwindcss.com/docs/border-radius
3584
+ */
3585
+ "rounded-tr": [{
3586
+ "rounded-tr": scaleRadius()
3587
+ }],
3588
+ /**
3589
+ * Border Radius Bottom Right
3590
+ * @see https://tailwindcss.com/docs/border-radius
3591
+ */
3592
+ "rounded-br": [{
3593
+ "rounded-br": scaleRadius()
3594
+ }],
3595
+ /**
3596
+ * Border Radius Bottom Left
3597
+ * @see https://tailwindcss.com/docs/border-radius
3598
+ */
3599
+ "rounded-bl": [{
3600
+ "rounded-bl": scaleRadius()
3601
+ }],
3602
+ /**
3603
+ * Border Width
3604
+ * @see https://tailwindcss.com/docs/border-width
3605
+ */
3606
+ "border-w": [{
3607
+ border: scaleBorderWidth()
3608
+ }],
3609
+ /**
3610
+ * Border Width X
3611
+ * @see https://tailwindcss.com/docs/border-width
3612
+ */
3613
+ "border-w-x": [{
3614
+ "border-x": scaleBorderWidth()
3615
+ }],
3616
+ /**
3617
+ * Border Width Y
3618
+ * @see https://tailwindcss.com/docs/border-width
3619
+ */
3620
+ "border-w-y": [{
3621
+ "border-y": scaleBorderWidth()
3622
+ }],
3623
+ /**
3624
+ * Border Width Start
3625
+ * @see https://tailwindcss.com/docs/border-width
3626
+ */
3627
+ "border-w-s": [{
3628
+ "border-s": scaleBorderWidth()
3629
+ }],
3630
+ /**
3631
+ * Border Width End
3632
+ * @see https://tailwindcss.com/docs/border-width
3633
+ */
3634
+ "border-w-e": [{
3635
+ "border-e": scaleBorderWidth()
3636
+ }],
3637
+ /**
3638
+ * Border Width Top
3639
+ * @see https://tailwindcss.com/docs/border-width
3640
+ */
3641
+ "border-w-t": [{
3642
+ "border-t": scaleBorderWidth()
3643
+ }],
3644
+ /**
3645
+ * Border Width Right
3646
+ * @see https://tailwindcss.com/docs/border-width
3647
+ */
3648
+ "border-w-r": [{
3649
+ "border-r": scaleBorderWidth()
3650
+ }],
3651
+ /**
3652
+ * Border Width Bottom
3653
+ * @see https://tailwindcss.com/docs/border-width
3654
+ */
3655
+ "border-w-b": [{
3656
+ "border-b": scaleBorderWidth()
3657
+ }],
3658
+ /**
3659
+ * Border Width Left
3660
+ * @see https://tailwindcss.com/docs/border-width
3661
+ */
3662
+ "border-w-l": [{
3663
+ "border-l": scaleBorderWidth()
3664
+ }],
3665
+ /**
3666
+ * Divide Width X
3667
+ * @see https://tailwindcss.com/docs/border-width#between-children
3668
+ */
3669
+ "divide-x": [{
3670
+ "divide-x": scaleBorderWidth()
3671
+ }],
3672
+ /**
3673
+ * Divide Width X Reverse
3674
+ * @see https://tailwindcss.com/docs/border-width#between-children
3675
+ */
3676
+ "divide-x-reverse": ["divide-x-reverse"],
3677
+ /**
3678
+ * Divide Width Y
3679
+ * @see https://tailwindcss.com/docs/border-width#between-children
3680
+ */
3681
+ "divide-y": [{
3682
+ "divide-y": scaleBorderWidth()
3683
+ }],
3684
+ /**
3685
+ * Divide Width Y Reverse
3686
+ * @see https://tailwindcss.com/docs/border-width#between-children
3687
+ */
3688
+ "divide-y-reverse": ["divide-y-reverse"],
3689
+ /**
3690
+ * Border Style
3691
+ * @see https://tailwindcss.com/docs/border-style
3692
+ */
3693
+ "border-style": [{
3694
+ border: [...scaleLineStyle(), "hidden", "none"]
3695
+ }],
3696
+ /**
3697
+ * Divide Style
3698
+ * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
3699
+ */
3700
+ "divide-style": [{
3701
+ divide: [...scaleLineStyle(), "hidden", "none"]
3702
+ }],
3703
+ /**
3704
+ * Border Color
3705
+ * @see https://tailwindcss.com/docs/border-color
3706
+ */
3707
+ "border-color": [{
3708
+ border: scaleColor()
3709
+ }],
3710
+ /**
3711
+ * Border Color X
3712
+ * @see https://tailwindcss.com/docs/border-color
3713
+ */
3714
+ "border-color-x": [{
3715
+ "border-x": scaleColor()
3716
+ }],
3717
+ /**
3718
+ * Border Color Y
3719
+ * @see https://tailwindcss.com/docs/border-color
3720
+ */
3721
+ "border-color-y": [{
3722
+ "border-y": scaleColor()
3723
+ }],
3724
+ /**
3725
+ * Border Color S
3726
+ * @see https://tailwindcss.com/docs/border-color
3727
+ */
3728
+ "border-color-s": [{
3729
+ "border-s": scaleColor()
3730
+ }],
3731
+ /**
3732
+ * Border Color E
3733
+ * @see https://tailwindcss.com/docs/border-color
3734
+ */
3735
+ "border-color-e": [{
3736
+ "border-e": scaleColor()
3737
+ }],
3738
+ /**
3739
+ * Border Color Top
3740
+ * @see https://tailwindcss.com/docs/border-color
3741
+ */
3742
+ "border-color-t": [{
3743
+ "border-t": scaleColor()
3744
+ }],
3745
+ /**
3746
+ * Border Color Right
3747
+ * @see https://tailwindcss.com/docs/border-color
3748
+ */
3749
+ "border-color-r": [{
3750
+ "border-r": scaleColor()
3751
+ }],
3752
+ /**
3753
+ * Border Color Bottom
3754
+ * @see https://tailwindcss.com/docs/border-color
3755
+ */
3756
+ "border-color-b": [{
3757
+ "border-b": scaleColor()
3758
+ }],
3759
+ /**
3760
+ * Border Color Left
3761
+ * @see https://tailwindcss.com/docs/border-color
3762
+ */
3763
+ "border-color-l": [{
3764
+ "border-l": scaleColor()
3765
+ }],
3766
+ /**
3767
+ * Divide Color
3768
+ * @see https://tailwindcss.com/docs/divide-color
3769
+ */
3770
+ "divide-color": [{
3771
+ divide: scaleColor()
3772
+ }],
3773
+ /**
3774
+ * Outline Style
3775
+ * @see https://tailwindcss.com/docs/outline-style
3776
+ */
3777
+ "outline-style": [{
3778
+ outline: [...scaleLineStyle(), "none", "hidden"]
3779
+ }],
3780
+ /**
3781
+ * Outline Offset
3782
+ * @see https://tailwindcss.com/docs/outline-offset
3783
+ */
3784
+ "outline-offset": [{
3785
+ "outline-offset": [isNumber, isArbitraryVariable, isArbitraryValue]
3786
+ }],
3787
+ /**
3788
+ * Outline Width
3789
+ * @see https://tailwindcss.com/docs/outline-width
3790
+ */
3791
+ "outline-w": [{
3792
+ outline: ["", isNumber, isArbitraryVariableLength, isArbitraryLength]
3793
+ }],
3794
+ /**
3795
+ * Outline Color
3796
+ * @see https://tailwindcss.com/docs/outline-color
3797
+ */
3798
+ "outline-color": [{
3799
+ outline: scaleColor()
3800
+ }],
3801
+ // ---------------
3802
+ // --- Effects ---
3803
+ // ---------------
3804
+ /**
3805
+ * Box Shadow
3806
+ * @see https://tailwindcss.com/docs/box-shadow
3807
+ */
3808
+ shadow: [{
3809
+ shadow: [
3810
+ // Deprecated since Tailwind CSS v4.0.0
3811
+ "",
3812
+ "none",
3813
+ themeShadow,
3814
+ isArbitraryVariableShadow,
3815
+ isArbitraryShadow
3816
+ ]
3817
+ }],
3818
+ /**
3819
+ * Box Shadow Color
3820
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
3821
+ */
3822
+ "shadow-color": [{
3823
+ shadow: scaleColor()
3824
+ }],
3825
+ /**
3826
+ * Inset Box Shadow
3827
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
3828
+ */
3829
+ "inset-shadow": [{
3830
+ "inset-shadow": ["none", themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
3831
+ }],
3832
+ /**
3833
+ * Inset Box Shadow Color
3834
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
3835
+ */
3836
+ "inset-shadow-color": [{
3837
+ "inset-shadow": scaleColor()
3838
+ }],
3839
+ /**
3840
+ * Ring Width
3841
+ * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
3842
+ */
3843
+ "ring-w": [{
3844
+ ring: scaleBorderWidth()
3845
+ }],
3846
+ /**
3847
+ * Ring Width Inset
3848
+ * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
3849
+ * @deprecated since Tailwind CSS v4.0.0
3850
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
3851
+ */
3852
+ "ring-w-inset": ["ring-inset"],
3853
+ /**
3854
+ * Ring Color
3855
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
3856
+ */
3857
+ "ring-color": [{
3858
+ ring: scaleColor()
3859
+ }],
3860
+ /**
3861
+ * Ring Offset Width
3862
+ * @see https://v3.tailwindcss.com/docs/ring-offset-width
3863
+ * @deprecated since Tailwind CSS v4.0.0
3864
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
3865
+ */
3866
+ "ring-offset-w": [{
3867
+ "ring-offset": [isNumber, isArbitraryLength]
3868
+ }],
3869
+ /**
3870
+ * Ring Offset Color
3871
+ * @see https://v3.tailwindcss.com/docs/ring-offset-color
3872
+ * @deprecated since Tailwind CSS v4.0.0
3873
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
3874
+ */
3875
+ "ring-offset-color": [{
3876
+ "ring-offset": scaleColor()
3877
+ }],
3878
+ /**
3879
+ * Inset Ring Width
3880
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
3881
+ */
3882
+ "inset-ring-w": [{
3883
+ "inset-ring": scaleBorderWidth()
3884
+ }],
3885
+ /**
3886
+ * Inset Ring Color
3887
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
3888
+ */
3889
+ "inset-ring-color": [{
3890
+ "inset-ring": scaleColor()
3891
+ }],
3892
+ /**
3893
+ * Text Shadow
3894
+ * @see https://tailwindcss.com/docs/text-shadow
3895
+ */
3896
+ "text-shadow": [{
3897
+ "text-shadow": ["none", themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
3898
+ }],
3899
+ /**
3900
+ * Text Shadow Color
3901
+ * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
3902
+ */
3903
+ "text-shadow-color": [{
3904
+ "text-shadow": scaleColor()
3905
+ }],
3906
+ /**
3907
+ * Opacity
3908
+ * @see https://tailwindcss.com/docs/opacity
3909
+ */
3910
+ opacity: [{
3911
+ opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
3912
+ }],
3913
+ /**
3914
+ * Mix Blend Mode
3915
+ * @see https://tailwindcss.com/docs/mix-blend-mode
3916
+ */
3917
+ "mix-blend": [{
3918
+ "mix-blend": [...scaleBlendMode(), "plus-darker", "plus-lighter"]
3919
+ }],
3920
+ /**
3921
+ * Background Blend Mode
3922
+ * @see https://tailwindcss.com/docs/background-blend-mode
3923
+ */
3924
+ "bg-blend": [{
3925
+ "bg-blend": scaleBlendMode()
3926
+ }],
3927
+ /**
3928
+ * Mask Clip
3929
+ * @see https://tailwindcss.com/docs/mask-clip
3930
+ */
3931
+ "mask-clip": [{
3932
+ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
3933
+ }, "mask-no-clip"],
3934
+ /**
3935
+ * Mask Composite
3936
+ * @see https://tailwindcss.com/docs/mask-composite
3937
+ */
3938
+ "mask-composite": [{
3939
+ mask: ["add", "subtract", "intersect", "exclude"]
3940
+ }],
3941
+ /**
3942
+ * Mask Image
3943
+ * @see https://tailwindcss.com/docs/mask-image
3944
+ */
3945
+ "mask-image-linear-pos": [{
3946
+ "mask-linear": [isNumber]
3947
+ }],
3948
+ "mask-image-linear-from-pos": [{
3949
+ "mask-linear-from": scaleMaskImagePosition()
3950
+ }],
3951
+ "mask-image-linear-to-pos": [{
3952
+ "mask-linear-to": scaleMaskImagePosition()
3953
+ }],
3954
+ "mask-image-linear-from-color": [{
3955
+ "mask-linear-from": scaleColor()
3956
+ }],
3957
+ "mask-image-linear-to-color": [{
3958
+ "mask-linear-to": scaleColor()
3959
+ }],
3960
+ "mask-image-t-from-pos": [{
3961
+ "mask-t-from": scaleMaskImagePosition()
3962
+ }],
3963
+ "mask-image-t-to-pos": [{
3964
+ "mask-t-to": scaleMaskImagePosition()
3965
+ }],
3966
+ "mask-image-t-from-color": [{
3967
+ "mask-t-from": scaleColor()
3968
+ }],
3969
+ "mask-image-t-to-color": [{
3970
+ "mask-t-to": scaleColor()
3971
+ }],
3972
+ "mask-image-r-from-pos": [{
3973
+ "mask-r-from": scaleMaskImagePosition()
3974
+ }],
3975
+ "mask-image-r-to-pos": [{
3976
+ "mask-r-to": scaleMaskImagePosition()
3977
+ }],
3978
+ "mask-image-r-from-color": [{
3979
+ "mask-r-from": scaleColor()
3980
+ }],
3981
+ "mask-image-r-to-color": [{
3982
+ "mask-r-to": scaleColor()
3983
+ }],
3984
+ "mask-image-b-from-pos": [{
3985
+ "mask-b-from": scaleMaskImagePosition()
3986
+ }],
3987
+ "mask-image-b-to-pos": [{
3988
+ "mask-b-to": scaleMaskImagePosition()
3989
+ }],
3990
+ "mask-image-b-from-color": [{
3991
+ "mask-b-from": scaleColor()
3992
+ }],
3993
+ "mask-image-b-to-color": [{
3994
+ "mask-b-to": scaleColor()
3995
+ }],
3996
+ "mask-image-l-from-pos": [{
3997
+ "mask-l-from": scaleMaskImagePosition()
3998
+ }],
3999
+ "mask-image-l-to-pos": [{
4000
+ "mask-l-to": scaleMaskImagePosition()
4001
+ }],
4002
+ "mask-image-l-from-color": [{
4003
+ "mask-l-from": scaleColor()
4004
+ }],
4005
+ "mask-image-l-to-color": [{
4006
+ "mask-l-to": scaleColor()
4007
+ }],
4008
+ "mask-image-x-from-pos": [{
4009
+ "mask-x-from": scaleMaskImagePosition()
4010
+ }],
4011
+ "mask-image-x-to-pos": [{
4012
+ "mask-x-to": scaleMaskImagePosition()
4013
+ }],
4014
+ "mask-image-x-from-color": [{
4015
+ "mask-x-from": scaleColor()
4016
+ }],
4017
+ "mask-image-x-to-color": [{
4018
+ "mask-x-to": scaleColor()
4019
+ }],
4020
+ "mask-image-y-from-pos": [{
4021
+ "mask-y-from": scaleMaskImagePosition()
4022
+ }],
4023
+ "mask-image-y-to-pos": [{
4024
+ "mask-y-to": scaleMaskImagePosition()
4025
+ }],
4026
+ "mask-image-y-from-color": [{
4027
+ "mask-y-from": scaleColor()
4028
+ }],
4029
+ "mask-image-y-to-color": [{
4030
+ "mask-y-to": scaleColor()
4031
+ }],
4032
+ "mask-image-radial": [{
4033
+ "mask-radial": [isArbitraryVariable, isArbitraryValue]
4034
+ }],
4035
+ "mask-image-radial-from-pos": [{
4036
+ "mask-radial-from": scaleMaskImagePosition()
4037
+ }],
4038
+ "mask-image-radial-to-pos": [{
4039
+ "mask-radial-to": scaleMaskImagePosition()
4040
+ }],
4041
+ "mask-image-radial-from-color": [{
4042
+ "mask-radial-from": scaleColor()
4043
+ }],
4044
+ "mask-image-radial-to-color": [{
4045
+ "mask-radial-to": scaleColor()
4046
+ }],
4047
+ "mask-image-radial-shape": [{
4048
+ "mask-radial": ["circle", "ellipse"]
4049
+ }],
4050
+ "mask-image-radial-size": [{
4051
+ "mask-radial": [{
4052
+ closest: ["side", "corner"],
4053
+ farthest: ["side", "corner"]
4054
+ }]
4055
+ }],
4056
+ "mask-image-radial-pos": [{
4057
+ "mask-radial-at": scalePosition()
4058
+ }],
4059
+ "mask-image-conic-pos": [{
4060
+ "mask-conic": [isNumber]
4061
+ }],
4062
+ "mask-image-conic-from-pos": [{
4063
+ "mask-conic-from": scaleMaskImagePosition()
4064
+ }],
4065
+ "mask-image-conic-to-pos": [{
4066
+ "mask-conic-to": scaleMaskImagePosition()
4067
+ }],
4068
+ "mask-image-conic-from-color": [{
4069
+ "mask-conic-from": scaleColor()
4070
+ }],
4071
+ "mask-image-conic-to-color": [{
4072
+ "mask-conic-to": scaleColor()
4073
+ }],
4074
+ /**
4075
+ * Mask Mode
4076
+ * @see https://tailwindcss.com/docs/mask-mode
4077
+ */
4078
+ "mask-mode": [{
4079
+ mask: ["alpha", "luminance", "match"]
4080
+ }],
4081
+ /**
4082
+ * Mask Origin
4083
+ * @see https://tailwindcss.com/docs/mask-origin
4084
+ */
4085
+ "mask-origin": [{
4086
+ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
4087
+ }],
4088
+ /**
4089
+ * Mask Position
4090
+ * @see https://tailwindcss.com/docs/mask-position
4091
+ */
4092
+ "mask-position": [{
4093
+ mask: scaleBgPosition()
4094
+ }],
4095
+ /**
4096
+ * Mask Repeat
4097
+ * @see https://tailwindcss.com/docs/mask-repeat
4098
+ */
4099
+ "mask-repeat": [{
4100
+ mask: scaleBgRepeat()
4101
+ }],
4102
+ /**
4103
+ * Mask Size
4104
+ * @see https://tailwindcss.com/docs/mask-size
4105
+ */
4106
+ "mask-size": [{
4107
+ mask: scaleBgSize()
4108
+ }],
4109
+ /**
4110
+ * Mask Type
4111
+ * @see https://tailwindcss.com/docs/mask-type
4112
+ */
4113
+ "mask-type": [{
4114
+ "mask-type": ["alpha", "luminance"]
4115
+ }],
4116
+ /**
4117
+ * Mask Image
4118
+ * @see https://tailwindcss.com/docs/mask-image
4119
+ */
4120
+ "mask-image": [{
4121
+ mask: ["none", isArbitraryVariable, isArbitraryValue]
4122
+ }],
4123
+ // ---------------
4124
+ // --- Filters ---
4125
+ // ---------------
4126
+ /**
4127
+ * Filter
4128
+ * @see https://tailwindcss.com/docs/filter
4129
+ */
4130
+ filter: [{
4131
+ filter: [
4132
+ // Deprecated since Tailwind CSS v3.0.0
4133
+ "",
4134
+ "none",
4135
+ isArbitraryVariable,
4136
+ isArbitraryValue
4137
+ ]
4138
+ }],
4139
+ /**
4140
+ * Blur
4141
+ * @see https://tailwindcss.com/docs/blur
4142
+ */
4143
+ blur: [{
4144
+ blur: scaleBlur()
4145
+ }],
4146
+ /**
4147
+ * Brightness
4148
+ * @see https://tailwindcss.com/docs/brightness
4149
+ */
4150
+ brightness: [{
4151
+ brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
4152
+ }],
4153
+ /**
4154
+ * Contrast
4155
+ * @see https://tailwindcss.com/docs/contrast
4156
+ */
4157
+ contrast: [{
4158
+ contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
4159
+ }],
4160
+ /**
4161
+ * Drop Shadow
4162
+ * @see https://tailwindcss.com/docs/drop-shadow
4163
+ */
4164
+ "drop-shadow": [{
4165
+ "drop-shadow": [
4166
+ // Deprecated since Tailwind CSS v4.0.0
4167
+ "",
4168
+ "none",
4169
+ themeDropShadow,
4170
+ isArbitraryVariableShadow,
4171
+ isArbitraryShadow
4172
+ ]
4173
+ }],
4174
+ /**
4175
+ * Drop Shadow Color
4176
+ * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
4177
+ */
4178
+ "drop-shadow-color": [{
4179
+ "drop-shadow": scaleColor()
4180
+ }],
4181
+ /**
4182
+ * Grayscale
4183
+ * @see https://tailwindcss.com/docs/grayscale
4184
+ */
4185
+ grayscale: [{
4186
+ grayscale: ["", isNumber, isArbitraryVariable, isArbitraryValue]
4187
+ }],
4188
+ /**
4189
+ * Hue Rotate
4190
+ * @see https://tailwindcss.com/docs/hue-rotate
4191
+ */
4192
+ "hue-rotate": [{
4193
+ "hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
4194
+ }],
4195
+ /**
4196
+ * Invert
4197
+ * @see https://tailwindcss.com/docs/invert
4198
+ */
4199
+ invert: [{
4200
+ invert: ["", isNumber, isArbitraryVariable, isArbitraryValue]
4201
+ }],
4202
+ /**
4203
+ * Saturate
4204
+ * @see https://tailwindcss.com/docs/saturate
4205
+ */
4206
+ saturate: [{
4207
+ saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
4208
+ }],
4209
+ /**
4210
+ * Sepia
4211
+ * @see https://tailwindcss.com/docs/sepia
4212
+ */
4213
+ sepia: [{
4214
+ sepia: ["", isNumber, isArbitraryVariable, isArbitraryValue]
4215
+ }],
4216
+ /**
4217
+ * Backdrop Filter
4218
+ * @see https://tailwindcss.com/docs/backdrop-filter
4219
+ */
4220
+ "backdrop-filter": [{
4221
+ "backdrop-filter": [
4222
+ // Deprecated since Tailwind CSS v3.0.0
4223
+ "",
4224
+ "none",
4225
+ isArbitraryVariable,
4226
+ isArbitraryValue
4227
+ ]
4228
+ }],
4229
+ /**
4230
+ * Backdrop Blur
4231
+ * @see https://tailwindcss.com/docs/backdrop-blur
4232
+ */
4233
+ "backdrop-blur": [{
4234
+ "backdrop-blur": scaleBlur()
4235
+ }],
4236
+ /**
4237
+ * Backdrop Brightness
4238
+ * @see https://tailwindcss.com/docs/backdrop-brightness
4239
+ */
4240
+ "backdrop-brightness": [{
4241
+ "backdrop-brightness": [isNumber, isArbitraryVariable, isArbitraryValue]
4242
+ }],
4243
+ /**
4244
+ * Backdrop Contrast
4245
+ * @see https://tailwindcss.com/docs/backdrop-contrast
4246
+ */
4247
+ "backdrop-contrast": [{
4248
+ "backdrop-contrast": [isNumber, isArbitraryVariable, isArbitraryValue]
4249
+ }],
4250
+ /**
4251
+ * Backdrop Grayscale
4252
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
4253
+ */
4254
+ "backdrop-grayscale": [{
4255
+ "backdrop-grayscale": ["", isNumber, isArbitraryVariable, isArbitraryValue]
4256
+ }],
4257
+ /**
4258
+ * Backdrop Hue Rotate
4259
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
4260
+ */
4261
+ "backdrop-hue-rotate": [{
4262
+ "backdrop-hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
4263
+ }],
4264
+ /**
4265
+ * Backdrop Invert
4266
+ * @see https://tailwindcss.com/docs/backdrop-invert
4267
+ */
4268
+ "backdrop-invert": [{
4269
+ "backdrop-invert": ["", isNumber, isArbitraryVariable, isArbitraryValue]
4270
+ }],
4271
+ /**
4272
+ * Backdrop Opacity
4273
+ * @see https://tailwindcss.com/docs/backdrop-opacity
4274
+ */
4275
+ "backdrop-opacity": [{
4276
+ "backdrop-opacity": [isNumber, isArbitraryVariable, isArbitraryValue]
4277
+ }],
4278
+ /**
4279
+ * Backdrop Saturate
4280
+ * @see https://tailwindcss.com/docs/backdrop-saturate
4281
+ */
4282
+ "backdrop-saturate": [{
4283
+ "backdrop-saturate": [isNumber, isArbitraryVariable, isArbitraryValue]
4284
+ }],
4285
+ /**
4286
+ * Backdrop Sepia
4287
+ * @see https://tailwindcss.com/docs/backdrop-sepia
4288
+ */
4289
+ "backdrop-sepia": [{
4290
+ "backdrop-sepia": ["", isNumber, isArbitraryVariable, isArbitraryValue]
4291
+ }],
4292
+ // --------------
4293
+ // --- Tables ---
4294
+ // --------------
4295
+ /**
4296
+ * Border Collapse
4297
+ * @see https://tailwindcss.com/docs/border-collapse
4298
+ */
4299
+ "border-collapse": [{
4300
+ border: ["collapse", "separate"]
4301
+ }],
4302
+ /**
4303
+ * Border Spacing
4304
+ * @see https://tailwindcss.com/docs/border-spacing
4305
+ */
4306
+ "border-spacing": [{
4307
+ "border-spacing": scaleUnambiguousSpacing()
4308
+ }],
4309
+ /**
4310
+ * Border Spacing X
4311
+ * @see https://tailwindcss.com/docs/border-spacing
4312
+ */
4313
+ "border-spacing-x": [{
4314
+ "border-spacing-x": scaleUnambiguousSpacing()
4315
+ }],
4316
+ /**
4317
+ * Border Spacing Y
4318
+ * @see https://tailwindcss.com/docs/border-spacing
4319
+ */
4320
+ "border-spacing-y": [{
4321
+ "border-spacing-y": scaleUnambiguousSpacing()
4322
+ }],
4323
+ /**
4324
+ * Table Layout
4325
+ * @see https://tailwindcss.com/docs/table-layout
4326
+ */
4327
+ "table-layout": [{
4328
+ table: ["auto", "fixed"]
4329
+ }],
4330
+ /**
4331
+ * Caption Side
4332
+ * @see https://tailwindcss.com/docs/caption-side
4333
+ */
4334
+ caption: [{
4335
+ caption: ["top", "bottom"]
4336
+ }],
4337
+ // ---------------------------------
4338
+ // --- Transitions and Animation ---
4339
+ // ---------------------------------
4340
+ /**
4341
+ * Transition Property
4342
+ * @see https://tailwindcss.com/docs/transition-property
4343
+ */
4344
+ transition: [{
4345
+ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", isArbitraryVariable, isArbitraryValue]
4346
+ }],
4347
+ /**
4348
+ * Transition Behavior
4349
+ * @see https://tailwindcss.com/docs/transition-behavior
4350
+ */
4351
+ "transition-behavior": [{
4352
+ transition: ["normal", "discrete"]
4353
+ }],
4354
+ /**
4355
+ * Transition Duration
4356
+ * @see https://tailwindcss.com/docs/transition-duration
4357
+ */
4358
+ duration: [{
4359
+ duration: [isNumber, "initial", isArbitraryVariable, isArbitraryValue]
4360
+ }],
4361
+ /**
4362
+ * Transition Timing Function
4363
+ * @see https://tailwindcss.com/docs/transition-timing-function
4364
+ */
4365
+ ease: [{
4366
+ ease: ["linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue]
4367
+ }],
4368
+ /**
4369
+ * Transition Delay
4370
+ * @see https://tailwindcss.com/docs/transition-delay
4371
+ */
4372
+ delay: [{
4373
+ delay: [isNumber, isArbitraryVariable, isArbitraryValue]
4374
+ }],
4375
+ /**
4376
+ * Animation
4377
+ * @see https://tailwindcss.com/docs/animation
4378
+ */
4379
+ animate: [{
4380
+ animate: ["none", themeAnimate, isArbitraryVariable, isArbitraryValue]
4381
+ }],
4382
+ // ------------------
4383
+ // --- Transforms ---
4384
+ // ------------------
4385
+ /**
4386
+ * Backface Visibility
4387
+ * @see https://tailwindcss.com/docs/backface-visibility
4388
+ */
4389
+ backface: [{
4390
+ backface: ["hidden", "visible"]
4391
+ }],
4392
+ /**
4393
+ * Perspective
4394
+ * @see https://tailwindcss.com/docs/perspective
4395
+ */
4396
+ perspective: [{
4397
+ perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
4398
+ }],
4399
+ /**
4400
+ * Perspective Origin
4401
+ * @see https://tailwindcss.com/docs/perspective-origin
4402
+ */
4403
+ "perspective-origin": [{
4404
+ "perspective-origin": scalePositionWithArbitrary()
4405
+ }],
4406
+ /**
4407
+ * Rotate
4408
+ * @see https://tailwindcss.com/docs/rotate
4409
+ */
4410
+ rotate: [{
4411
+ rotate: scaleRotate()
4412
+ }],
4413
+ /**
4414
+ * Rotate X
4415
+ * @see https://tailwindcss.com/docs/rotate
4416
+ */
4417
+ "rotate-x": [{
4418
+ "rotate-x": scaleRotate()
4419
+ }],
4420
+ /**
4421
+ * Rotate Y
4422
+ * @see https://tailwindcss.com/docs/rotate
4423
+ */
4424
+ "rotate-y": [{
4425
+ "rotate-y": scaleRotate()
4426
+ }],
4427
+ /**
4428
+ * Rotate Z
4429
+ * @see https://tailwindcss.com/docs/rotate
4430
+ */
4431
+ "rotate-z": [{
4432
+ "rotate-z": scaleRotate()
4433
+ }],
4434
+ /**
4435
+ * Scale
4436
+ * @see https://tailwindcss.com/docs/scale
4437
+ */
4438
+ scale: [{
4439
+ scale: scaleScale()
4440
+ }],
4441
+ /**
4442
+ * Scale X
4443
+ * @see https://tailwindcss.com/docs/scale
4444
+ */
4445
+ "scale-x": [{
4446
+ "scale-x": scaleScale()
4447
+ }],
4448
+ /**
4449
+ * Scale Y
4450
+ * @see https://tailwindcss.com/docs/scale
4451
+ */
4452
+ "scale-y": [{
4453
+ "scale-y": scaleScale()
4454
+ }],
4455
+ /**
4456
+ * Scale Z
4457
+ * @see https://tailwindcss.com/docs/scale
4458
+ */
4459
+ "scale-z": [{
4460
+ "scale-z": scaleScale()
4461
+ }],
4462
+ /**
4463
+ * Scale 3D
4464
+ * @see https://tailwindcss.com/docs/scale
4465
+ */
4466
+ "scale-3d": ["scale-3d"],
4467
+ /**
4468
+ * Skew
4469
+ * @see https://tailwindcss.com/docs/skew
4470
+ */
4471
+ skew: [{
4472
+ skew: scaleSkew()
4473
+ }],
4474
+ /**
4475
+ * Skew X
4476
+ * @see https://tailwindcss.com/docs/skew
4477
+ */
4478
+ "skew-x": [{
4479
+ "skew-x": scaleSkew()
4480
+ }],
4481
+ /**
4482
+ * Skew Y
4483
+ * @see https://tailwindcss.com/docs/skew
4484
+ */
4485
+ "skew-y": [{
4486
+ "skew-y": scaleSkew()
4487
+ }],
4488
+ /**
4489
+ * Transform
4490
+ * @see https://tailwindcss.com/docs/transform
4491
+ */
4492
+ transform: [{
4493
+ transform: [isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu"]
4494
+ }],
4495
+ /**
4496
+ * Transform Origin
4497
+ * @see https://tailwindcss.com/docs/transform-origin
4498
+ */
4499
+ "transform-origin": [{
4500
+ origin: scalePositionWithArbitrary()
4501
+ }],
4502
+ /**
4503
+ * Transform Style
4504
+ * @see https://tailwindcss.com/docs/transform-style
4505
+ */
4506
+ "transform-style": [{
4507
+ transform: ["3d", "flat"]
4508
+ }],
4509
+ /**
4510
+ * Translate
4511
+ * @see https://tailwindcss.com/docs/translate
4512
+ */
4513
+ translate: [{
4514
+ translate: scaleTranslate()
4515
+ }],
4516
+ /**
4517
+ * Translate X
4518
+ * @see https://tailwindcss.com/docs/translate
4519
+ */
4520
+ "translate-x": [{
4521
+ "translate-x": scaleTranslate()
4522
+ }],
4523
+ /**
4524
+ * Translate Y
4525
+ * @see https://tailwindcss.com/docs/translate
4526
+ */
4527
+ "translate-y": [{
4528
+ "translate-y": scaleTranslate()
4529
+ }],
4530
+ /**
4531
+ * Translate Z
4532
+ * @see https://tailwindcss.com/docs/translate
4533
+ */
4534
+ "translate-z": [{
4535
+ "translate-z": scaleTranslate()
4536
+ }],
4537
+ /**
4538
+ * Translate None
4539
+ * @see https://tailwindcss.com/docs/translate
4540
+ */
4541
+ "translate-none": ["translate-none"],
4542
+ // ---------------------
4543
+ // --- Interactivity ---
4544
+ // ---------------------
4545
+ /**
4546
+ * Accent Color
4547
+ * @see https://tailwindcss.com/docs/accent-color
4548
+ */
4549
+ accent: [{
4550
+ accent: scaleColor()
4551
+ }],
4552
+ /**
4553
+ * Appearance
4554
+ * @see https://tailwindcss.com/docs/appearance
4555
+ */
4556
+ appearance: [{
4557
+ appearance: ["none", "auto"]
4558
+ }],
4559
+ /**
4560
+ * Caret Color
4561
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
4562
+ */
4563
+ "caret-color": [{
4564
+ caret: scaleColor()
4565
+ }],
4566
+ /**
4567
+ * Color Scheme
4568
+ * @see https://tailwindcss.com/docs/color-scheme
4569
+ */
4570
+ "color-scheme": [{
4571
+ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
4572
+ }],
4573
+ /**
4574
+ * Cursor
4575
+ * @see https://tailwindcss.com/docs/cursor
4576
+ */
4577
+ cursor: [{
4578
+ 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]
4579
+ }],
4580
+ /**
4581
+ * Field Sizing
4582
+ * @see https://tailwindcss.com/docs/field-sizing
4583
+ */
4584
+ "field-sizing": [{
4585
+ "field-sizing": ["fixed", "content"]
4586
+ }],
4587
+ /**
4588
+ * Pointer Events
4589
+ * @see https://tailwindcss.com/docs/pointer-events
4590
+ */
4591
+ "pointer-events": [{
4592
+ "pointer-events": ["auto", "none"]
4593
+ }],
4594
+ /**
4595
+ * Resize
4596
+ * @see https://tailwindcss.com/docs/resize
4597
+ */
4598
+ resize: [{
4599
+ resize: ["none", "", "y", "x"]
4600
+ }],
4601
+ /**
4602
+ * Scroll Behavior
4603
+ * @see https://tailwindcss.com/docs/scroll-behavior
4604
+ */
4605
+ "scroll-behavior": [{
4606
+ scroll: ["auto", "smooth"]
4607
+ }],
4608
+ /**
4609
+ * Scroll Margin
4610
+ * @see https://tailwindcss.com/docs/scroll-margin
4611
+ */
4612
+ "scroll-m": [{
4613
+ "scroll-m": scaleUnambiguousSpacing()
4614
+ }],
4615
+ /**
4616
+ * Scroll Margin X
4617
+ * @see https://tailwindcss.com/docs/scroll-margin
4618
+ */
4619
+ "scroll-mx": [{
4620
+ "scroll-mx": scaleUnambiguousSpacing()
4621
+ }],
4622
+ /**
4623
+ * Scroll Margin Y
4624
+ * @see https://tailwindcss.com/docs/scroll-margin
4625
+ */
4626
+ "scroll-my": [{
4627
+ "scroll-my": scaleUnambiguousSpacing()
4628
+ }],
4629
+ /**
4630
+ * Scroll Margin Start
4631
+ * @see https://tailwindcss.com/docs/scroll-margin
4632
+ */
4633
+ "scroll-ms": [{
4634
+ "scroll-ms": scaleUnambiguousSpacing()
4635
+ }],
4636
+ /**
4637
+ * Scroll Margin End
4638
+ * @see https://tailwindcss.com/docs/scroll-margin
4639
+ */
4640
+ "scroll-me": [{
4641
+ "scroll-me": scaleUnambiguousSpacing()
4642
+ }],
4643
+ /**
4644
+ * Scroll Margin Top
4645
+ * @see https://tailwindcss.com/docs/scroll-margin
4646
+ */
4647
+ "scroll-mt": [{
4648
+ "scroll-mt": scaleUnambiguousSpacing()
4649
+ }],
4650
+ /**
4651
+ * Scroll Margin Right
4652
+ * @see https://tailwindcss.com/docs/scroll-margin
4653
+ */
4654
+ "scroll-mr": [{
4655
+ "scroll-mr": scaleUnambiguousSpacing()
4656
+ }],
4657
+ /**
4658
+ * Scroll Margin Bottom
4659
+ * @see https://tailwindcss.com/docs/scroll-margin
4660
+ */
4661
+ "scroll-mb": [{
4662
+ "scroll-mb": scaleUnambiguousSpacing()
4663
+ }],
4664
+ /**
4665
+ * Scroll Margin Left
4666
+ * @see https://tailwindcss.com/docs/scroll-margin
4667
+ */
4668
+ "scroll-ml": [{
4669
+ "scroll-ml": scaleUnambiguousSpacing()
4670
+ }],
4671
+ /**
4672
+ * Scroll Padding
4673
+ * @see https://tailwindcss.com/docs/scroll-padding
4674
+ */
4675
+ "scroll-p": [{
4676
+ "scroll-p": scaleUnambiguousSpacing()
4677
+ }],
4678
+ /**
4679
+ * Scroll Padding X
4680
+ * @see https://tailwindcss.com/docs/scroll-padding
4681
+ */
4682
+ "scroll-px": [{
4683
+ "scroll-px": scaleUnambiguousSpacing()
4684
+ }],
4685
+ /**
4686
+ * Scroll Padding Y
4687
+ * @see https://tailwindcss.com/docs/scroll-padding
4688
+ */
4689
+ "scroll-py": [{
4690
+ "scroll-py": scaleUnambiguousSpacing()
4691
+ }],
4692
+ /**
4693
+ * Scroll Padding Start
4694
+ * @see https://tailwindcss.com/docs/scroll-padding
4695
+ */
4696
+ "scroll-ps": [{
4697
+ "scroll-ps": scaleUnambiguousSpacing()
4698
+ }],
4699
+ /**
4700
+ * Scroll Padding End
4701
+ * @see https://tailwindcss.com/docs/scroll-padding
4702
+ */
4703
+ "scroll-pe": [{
4704
+ "scroll-pe": scaleUnambiguousSpacing()
4705
+ }],
4706
+ /**
4707
+ * Scroll Padding Top
4708
+ * @see https://tailwindcss.com/docs/scroll-padding
4709
+ */
4710
+ "scroll-pt": [{
4711
+ "scroll-pt": scaleUnambiguousSpacing()
4712
+ }],
4713
+ /**
4714
+ * Scroll Padding Right
4715
+ * @see https://tailwindcss.com/docs/scroll-padding
4716
+ */
4717
+ "scroll-pr": [{
4718
+ "scroll-pr": scaleUnambiguousSpacing()
4719
+ }],
4720
+ /**
4721
+ * Scroll Padding Bottom
4722
+ * @see https://tailwindcss.com/docs/scroll-padding
4723
+ */
4724
+ "scroll-pb": [{
4725
+ "scroll-pb": scaleUnambiguousSpacing()
4726
+ }],
4727
+ /**
4728
+ * Scroll Padding Left
4729
+ * @see https://tailwindcss.com/docs/scroll-padding
4730
+ */
4731
+ "scroll-pl": [{
4732
+ "scroll-pl": scaleUnambiguousSpacing()
4733
+ }],
4734
+ /**
4735
+ * Scroll Snap Align
4736
+ * @see https://tailwindcss.com/docs/scroll-snap-align
4737
+ */
4738
+ "snap-align": [{
4739
+ snap: ["start", "end", "center", "align-none"]
4740
+ }],
4741
+ /**
4742
+ * Scroll Snap Stop
4743
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
4744
+ */
4745
+ "snap-stop": [{
4746
+ snap: ["normal", "always"]
4747
+ }],
4748
+ /**
4749
+ * Scroll Snap Type
4750
+ * @see https://tailwindcss.com/docs/scroll-snap-type
4751
+ */
4752
+ "snap-type": [{
4753
+ snap: ["none", "x", "y", "both"]
4754
+ }],
4755
+ /**
4756
+ * Scroll Snap Type Strictness
4757
+ * @see https://tailwindcss.com/docs/scroll-snap-type
4758
+ */
4759
+ "snap-strictness": [{
4760
+ snap: ["mandatory", "proximity"]
4761
+ }],
4762
+ /**
4763
+ * Touch Action
4764
+ * @see https://tailwindcss.com/docs/touch-action
4765
+ */
4766
+ touch: [{
4767
+ touch: ["auto", "none", "manipulation"]
4768
+ }],
4769
+ /**
4770
+ * Touch Action X
4771
+ * @see https://tailwindcss.com/docs/touch-action
4772
+ */
4773
+ "touch-x": [{
4774
+ "touch-pan": ["x", "left", "right"]
4775
+ }],
4776
+ /**
4777
+ * Touch Action Y
4778
+ * @see https://tailwindcss.com/docs/touch-action
4779
+ */
4780
+ "touch-y": [{
4781
+ "touch-pan": ["y", "up", "down"]
4782
+ }],
4783
+ /**
4784
+ * Touch Action Pinch Zoom
4785
+ * @see https://tailwindcss.com/docs/touch-action
4786
+ */
4787
+ "touch-pz": ["touch-pinch-zoom"],
4788
+ /**
4789
+ * User Select
4790
+ * @see https://tailwindcss.com/docs/user-select
4791
+ */
4792
+ select: [{
4793
+ select: ["none", "text", "all", "auto"]
4794
+ }],
4795
+ /**
4796
+ * Will Change
4797
+ * @see https://tailwindcss.com/docs/will-change
4798
+ */
4799
+ "will-change": [{
4800
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryVariable, isArbitraryValue]
4801
+ }],
4802
+ // -----------
4803
+ // --- SVG ---
4804
+ // -----------
4805
+ /**
4806
+ * Fill
4807
+ * @see https://tailwindcss.com/docs/fill
4808
+ */
4809
+ fill: [{
4810
+ fill: ["none", ...scaleColor()]
4811
+ }],
4812
+ /**
4813
+ * Stroke Width
4814
+ * @see https://tailwindcss.com/docs/stroke-width
4815
+ */
4816
+ "stroke-w": [{
4817
+ stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
4818
+ }],
4819
+ /**
4820
+ * Stroke
4821
+ * @see https://tailwindcss.com/docs/stroke
4822
+ */
4823
+ stroke: [{
4824
+ stroke: ["none", ...scaleColor()]
4825
+ }],
4826
+ // ---------------------
4827
+ // --- Accessibility ---
4828
+ // ---------------------
4829
+ /**
4830
+ * Forced Color Adjust
4831
+ * @see https://tailwindcss.com/docs/forced-color-adjust
4832
+ */
4833
+ "forced-color-adjust": [{
4834
+ "forced-color-adjust": ["auto", "none"]
4835
+ }]
4836
+ },
4837
+ conflictingClassGroups: {
4838
+ overflow: ["overflow-x", "overflow-y"],
4839
+ overscroll: ["overscroll-x", "overscroll-y"],
4840
+ inset: ["inset-x", "inset-y", "start", "end", "top", "right", "bottom", "left"],
4841
+ "inset-x": ["right", "left"],
4842
+ "inset-y": ["top", "bottom"],
4843
+ flex: ["basis", "grow", "shrink"],
4844
+ gap: ["gap-x", "gap-y"],
4845
+ p: ["px", "py", "ps", "pe", "pt", "pr", "pb", "pl"],
4846
+ px: ["pr", "pl"],
4847
+ py: ["pt", "pb"],
4848
+ m: ["mx", "my", "ms", "me", "mt", "mr", "mb", "ml"],
4849
+ mx: ["mr", "ml"],
4850
+ my: ["mt", "mb"],
4851
+ size: ["w", "h"],
4852
+ "font-size": ["leading"],
4853
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
4854
+ "fvn-ordinal": ["fvn-normal"],
4855
+ "fvn-slashed-zero": ["fvn-normal"],
4856
+ "fvn-figure": ["fvn-normal"],
4857
+ "fvn-spacing": ["fvn-normal"],
4858
+ "fvn-fraction": ["fvn-normal"],
4859
+ "line-clamp": ["display", "overflow"],
4860
+ 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"],
4861
+ "rounded-s": ["rounded-ss", "rounded-es"],
4862
+ "rounded-e": ["rounded-se", "rounded-ee"],
4863
+ "rounded-t": ["rounded-tl", "rounded-tr"],
4864
+ "rounded-r": ["rounded-tr", "rounded-br"],
4865
+ "rounded-b": ["rounded-br", "rounded-bl"],
4866
+ "rounded-l": ["rounded-tl", "rounded-bl"],
4867
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
4868
+ "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"],
4869
+ "border-w-x": ["border-w-r", "border-w-l"],
4870
+ "border-w-y": ["border-w-t", "border-w-b"],
4871
+ "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"],
4872
+ "border-color-x": ["border-color-r", "border-color-l"],
4873
+ "border-color-y": ["border-color-t", "border-color-b"],
4874
+ translate: ["translate-x", "translate-y", "translate-none"],
4875
+ "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
4876
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
4877
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
4878
+ "scroll-my": ["scroll-mt", "scroll-mb"],
4879
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
4880
+ "scroll-px": ["scroll-pr", "scroll-pl"],
4881
+ "scroll-py": ["scroll-pt", "scroll-pb"],
4882
+ touch: ["touch-x", "touch-y", "touch-pz"],
4883
+ "touch-x": ["touch"],
4884
+ "touch-y": ["touch"],
4885
+ "touch-pz": ["touch"]
4886
+ },
4887
+ conflictingClassGroupModifiers: {
4888
+ "font-size": ["leading"]
4889
+ },
4890
+ orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
4891
+ };
4892
+ };
4893
+ const twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
4894
+ function cn(...inputs) {
4895
+ return twMerge(clsx(inputs));
4896
+ }
4897
+ exports.MockTraceyProvider = LauncherTrigger.MockTraceyProvider;
4898
+ exports.TraceyProvider = LauncherTrigger.TraceyProvider;
4899
+ exports.useAnnouncements = LauncherTrigger.useAnnouncements;
4900
+ exports.useFeedback = LauncherTrigger.useFeedback;
4901
+ exports.useTracey = LauncherTrigger.useTracey;
4902
+ exports.useTraceyEvents = LauncherTrigger.useTraceyEvents;
4903
+ exports.AnnouncementBell = AnnouncementBell;
4904
+ exports.AnnouncementList = AnnouncementList;
4905
+ exports.AnnouncementModal = AnnouncementModal;
4906
+ exports.FeedbackForm = FeedbackForm;
4907
+ exports.FeedbackWidget = FeedbackWidget;
4908
+ exports.SurveyWidget = SurveyWidget;
4909
+ exports.TraceyLauncher = TraceyLauncher;
4910
+ exports.cn = cn;
4911
+ exports.useMyFeedback = useMyFeedback;
4912
+ exports.useSurvey = useSurvey;
4913
+ //# sourceMappingURL=index.cjs.map