@blade-hq/agent-react 2612.0.0-beta.7 → 2612.0.0-beta.70

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 (164) hide show
  1. package/README.md +33 -0
  2. package/dist/chat/AgentLoopBlock.d.ts +0 -2
  3. package/dist/chat/AskUserQuestionBlock.d.ts +3 -20
  4. package/dist/chat/AssistantTurnBlock.d.ts +1 -9
  5. package/dist/chat/AttachmentPreviewDialog.d.ts +0 -1
  6. package/dist/chat/ChatLoadingIndicator.d.ts +7 -0
  7. package/dist/chat/ContextAttachmentPills.d.ts +4 -0
  8. package/dist/chat/CurrentPlanPanel.d.ts +0 -3
  9. package/dist/chat/FileDeliveryCards.d.ts +0 -4
  10. package/dist/chat/FinalArtifactCards.d.ts +0 -1
  11. package/dist/chat/ImageLightbox.d.ts +1 -1
  12. package/dist/chat/LiteMessageList.d.ts +1 -3
  13. package/dist/chat/MessageFileAttachmentList.d.ts +0 -5
  14. package/dist/chat/QuestionnaireQuestionBlock.d.ts +11 -0
  15. package/dist/chat/SessionReplayBar.d.ts +0 -1
  16. package/dist/chat/TextAttachmentPills.d.ts +0 -3
  17. package/dist/chat/TurnNavRail.d.ts +0 -3
  18. package/dist/chat/WorkflowRunBlock.d.ts +21 -4
  19. package/dist/chat/ai-elements/shimmer.d.ts +0 -4
  20. package/dist/chat/customization.d.ts +1 -1
  21. package/dist/chat/index.d.ts +1 -1
  22. package/dist/chat/markdown/ExternalAnchor.d.ts +2 -2
  23. package/dist/chat/markdown/MarkdownContent.d.ts +3 -0
  24. package/dist/chat/message-list-blocks.d.ts +0 -1
  25. package/dist/chat/runtime/actions.d.ts +2 -2
  26. package/dist/chat/runtime/background-task-dismissals.d.ts +0 -1
  27. package/dist/chat/runtime/composer-channels.d.ts +0 -3
  28. package/dist/chat/runtime/input-cache-reset.d.ts +0 -5
  29. package/dist/chat/runtime/input-services.d.ts +10 -0
  30. package/dist/chat/runtime/session-source.d.ts +0 -5
  31. package/dist/chat/runtime/use-chat-actions.d.ts +0 -4
  32. package/dist/{chat-OCLOVB3H.css → chat-IHPRU35X.css} +5 -18
  33. package/dist/chat.css +5 -18
  34. package/dist/{chunk-MERN5XEM.js → chunk-2DPLLZOU.js} +2162 -13284
  35. package/dist/chunk-2DPLLZOU.js.map +1 -0
  36. package/dist/chunk-7MCGQH34.js +605 -0
  37. package/dist/chunk-7MCGQH34.js.map +1 -0
  38. package/dist/{chunk-67GHJQK5.js → chunk-HCW7SI5Q.js} +3897 -26116
  39. package/dist/chunk-HCW7SI5Q.js.map +1 -0
  40. package/dist/chunk-J72ZLILV.js +2317 -0
  41. package/dist/chunk-J72ZLILV.js.map +1 -0
  42. package/dist/chunk-QIR73CES.js +7917 -0
  43. package/dist/chunk-QIR73CES.js.map +1 -0
  44. package/dist/chunk-WRIMPZPN.js +4031 -0
  45. package/dist/chunk-WRIMPZPN.js.map +1 -0
  46. package/dist/chunk-XJ6ZA6LN.js +9480 -0
  47. package/dist/chunk-XJ6ZA6LN.js.map +1 -0
  48. package/dist/chunk-XP6T6SHZ.js +13622 -0
  49. package/dist/chunk-XP6T6SHZ.js.map +1 -0
  50. package/dist/components/AccountConnectors.d.ts +13 -0
  51. package/dist/components/BrowserConnectionDialog.d.ts +7 -0
  52. package/dist/components/ChatInput.d.ts +1 -15
  53. package/dist/components/ConnectorAuthorizationProgress.d.ts +6 -0
  54. package/dist/components/ConnectorConnection.d.ts +4 -0
  55. package/dist/components/ConnectorPanel.d.ts +3 -1
  56. package/dist/components/ConnectorRuntimeDiagnostics.d.ts +5 -0
  57. package/dist/components/DeviceConnection.d.ts +15 -0
  58. package/dist/components/FeishuCapabilitySelection.d.ts +14 -0
  59. package/dist/components/FeishuPermissionStatus.d.ts +5 -0
  60. package/dist/components/LlmAdvancedSettings.d.ts +0 -1
  61. package/dist/components/ManagedConnection.d.ts +9 -0
  62. package/dist/components/McpAppFrame.d.ts +17 -0
  63. package/dist/components/PlanUpdateBlock.d.ts +0 -1
  64. package/dist/components/SessionPluginConfigForm.d.ts +3 -1
  65. package/dist/components/SessionPluginIcon.d.ts +1 -0
  66. package/dist/components/plugin-connector.d.ts +1 -0
  67. package/dist/connectors.d.ts +2 -0
  68. package/dist/connectors.js +11 -0
  69. package/dist/connectors.js.map +1 -0
  70. package/dist/embed/blade-chat-element.d.ts +0 -8
  71. package/dist/embed/entry.d.ts +8 -19
  72. package/dist/hooks/use-message-pin.d.ts +1 -1
  73. package/dist/index.d.ts +2 -0
  74. package/dist/index.js +14 -3
  75. package/dist/internal.d.ts +6 -2
  76. package/dist/internal.js +49 -70
  77. package/dist/internal.js.map +1 -1
  78. package/dist/lib/message-shortcuts.d.ts +5 -0
  79. package/dist/questions.d.ts +7 -0
  80. package/dist/questions.js +908 -0
  81. package/dist/questions.js.map +1 -0
  82. package/dist/rich-input/ConnectButton.d.ts +7 -5
  83. package/dist/rich-input/FileCompletionMenu.d.ts +1 -2
  84. package/dist/rich-input/InputActionSubmenu.d.ts +10 -0
  85. package/dist/rich-input/SkillActionMenu.d.ts +10 -0
  86. package/dist/rich-input/SkillStatusBar.d.ts +0 -6
  87. package/dist/rich-input/extensions/skill-mention.d.ts +3 -20
  88. package/dist/rich-input/index.d.ts +3 -2
  89. package/dist/rich-input/lib/composer-content.d.ts +5 -1
  90. package/dist/rich-input/lib/plugin-suggestions.d.ts +5 -5
  91. package/dist/rich-input/lib/reference-candidates.d.ts +0 -1
  92. package/dist/rich-input/lib/skill-suggestions.d.ts +1 -1
  93. package/dist/rich-input/lib/user-home.d.ts +0 -17
  94. package/dist/rich-input/services.d.ts +1 -1
  95. package/dist/rich-input/voice/VoiceWaveform.d.ts +0 -3
  96. package/dist/rich-input.js +768 -1065
  97. package/dist/rich-input.js.map +1 -1
  98. package/dist/style.css +16 -55
  99. package/dist/style.full.css +23 -77
  100. package/dist/tool-details.d.ts +8 -0
  101. package/dist/tool-details.js +24 -0
  102. package/dist/tool-details.js.map +1 -0
  103. package/node_modules/@modelcontextprotocol/ext-apps/LICENSE +216 -0
  104. package/node_modules/@modelcontextprotocol/ext-apps/README.md +284 -0
  105. package/node_modules/@modelcontextprotocol/ext-apps/dist/docs/patterns.d.ts +9 -0
  106. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.d.ts +1348 -0
  107. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.examples.d.ts +9 -0
  108. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js +39 -0
  109. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.test.d.ts +1 -0
  110. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-with-deps.js +82 -0
  111. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.d.ts +1214 -0
  112. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.examples.d.ts +9 -0
  113. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js +39 -0
  114. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.test.d.ts +1 -0
  115. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/constants.d.ts +65 -0
  116. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/events.d.ts +47 -0
  117. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/events.test.d.ts +1 -0
  118. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/generated/schema.d.ts +1047 -0
  119. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/generated/schema.json +6170 -0
  120. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/generated/schema.test.d.ts +41 -0
  121. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/interop-v1.test.d.ts +1 -0
  122. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/legacy-handlers.d.ts +66 -0
  123. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/legacy-handlers.test.d.ts +1 -0
  124. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/message-transport.d.ts +126 -0
  125. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/message-transport.examples.d.ts +9 -0
  126. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/message-transport.test.d.ts +1 -0
  127. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.d.ts +37 -0
  128. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.examples.d.ts +6 -0
  129. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/index.js +39 -0
  130. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/react-with-deps.js +82 -0
  131. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useApp.d.ts +115 -0
  132. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useApp.examples.d.ts +6 -0
  133. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useAutoResize.d.ts +54 -0
  134. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useAutoResize.examples.d.ts +6 -0
  135. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useDocumentTheme.d.ts +44 -0
  136. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useDocumentTheme.examples.d.ts +6 -0
  137. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useHostStyles.d.ts +113 -0
  138. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/react/useHostStyles.examples.d.ts +6 -0
  139. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.d.ts +381 -0
  140. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.examples.d.ts +9 -0
  141. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.js +1 -0
  142. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.test.d.ts +1 -0
  143. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/spec.types.d.ts +698 -0
  144. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/standard-schema.d.ts +23 -0
  145. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/styles.d.ts +184 -0
  146. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/styles.examples.d.ts +9 -0
  147. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/types.d.ts +33 -0
  148. package/node_modules/@modelcontextprotocol/ext-apps/dist/src/wire-compat.test.d.ts +1 -0
  149. package/node_modules/@modelcontextprotocol/ext-apps/package.json +144 -0
  150. package/node_modules/@standard-schema/spec/LICENSE +21 -0
  151. package/node_modules/@standard-schema/spec/README.md +198 -0
  152. package/node_modules/@standard-schema/spec/dist/index.cjs +18 -0
  153. package/node_modules/@standard-schema/spec/dist/index.d.cts +119 -0
  154. package/node_modules/@standard-schema/spec/dist/index.d.ts +119 -0
  155. package/node_modules/@standard-schema/spec/dist/index.js +0 -0
  156. package/node_modules/@standard-schema/spec/package.json +52 -0
  157. package/package.json +19 -3
  158. package/public-api.md +16 -4
  159. package/dist/chunk-67GHJQK5.js.map +0 -1
  160. package/dist/chunk-DPDXGYGM.js +0 -258
  161. package/dist/chunk-DPDXGYGM.js.map +0 -1
  162. package/dist/chunk-MERN5XEM.js.map +0 -1
  163. package/dist/lib/agent-computer-command.d.ts +0 -32
  164. package/dist/rich-input/extensions/workflow-mention.d.ts +0 -10
@@ -0,0 +1,4031 @@
1
+ import {
2
+ Check,
3
+ ChevronDown,
4
+ Circle,
5
+ CircleDot,
6
+ ListChecks,
7
+ LoaderCircle,
8
+ X,
9
+ clsx,
10
+ cn,
11
+ dist_exports3 as dist_exports,
12
+ loopTabInShadowRoot,
13
+ useOverlayRoot
14
+ } from "./chunk-QIR73CES.js";
15
+
16
+ // src/context.tsx
17
+ import { createContext, useContext } from "react";
18
+ import { jsx } from "react/jsx-runtime";
19
+ var BladeClientContext = createContext(null);
20
+ var EMPTY_HOST = {};
21
+ var BladeHostContext = createContext(EMPTY_HOST);
22
+ function BladeProvider({ client, host, children }) {
23
+ return /* @__PURE__ */ jsx(BladeClientContext.Provider, { value: client, children: /* @__PURE__ */ jsx(BladeHostContext.Provider, { value: host ?? EMPTY_HOST, children }) });
24
+ }
25
+ function useBladeClient() {
26
+ const client = useContext(BladeClientContext);
27
+ if (!client) {
28
+ throw new Error("useBladeClient \u5FC5\u987B\u5728 <BladeProvider> \u5185\u4F7F\u7528");
29
+ }
30
+ return client;
31
+ }
32
+ function useOptionalBladeClient() {
33
+ return useContext(BladeClientContext);
34
+ }
35
+ function useBladeHost() {
36
+ return useContext(BladeHostContext);
37
+ }
38
+
39
+ // src/chat/display-utils.ts
40
+ var TOOL_NAME_ALIASES = {
41
+ agent: "Agent",
42
+ ask_user_question: "AskUserQuestion",
43
+ bash: "Bash",
44
+ bg_bash: "BgBash",
45
+ code_mode_run: "CodeMode",
46
+ edit: "Edit",
47
+ exit_plan_mode: "ExitPlanMode",
48
+ file_edit: "Edit",
49
+ file_read: "Read",
50
+ file_write: "Write",
51
+ finish_task: "FinishTask",
52
+ glob: "Glob",
53
+ grep: "Grep",
54
+ ls: "Ls",
55
+ multi_edit: "MultiEdit",
56
+ read: "Read",
57
+ read_skill: "ReadSkill",
58
+ update_plan: "UpdatePlan",
59
+ web_fetch: "WebFetch",
60
+ web_search: "WebSearch",
61
+ write: "Write"
62
+ };
63
+ var TOOL_DISPLAY_LABELS = {
64
+ Bash: "\u6267\u884C\u547D\u4EE4",
65
+ BgBash: "\u540E\u53F0\u6267\u884C\u547D\u4EE4",
66
+ CodeMode: "\u6267\u884C\u7A0B\u5E8F",
67
+ Read: "\u8BFB\u53D6\u6587\u4EF6",
68
+ Write: "\u5199\u5165\u6587\u4EF6",
69
+ Edit: "\u7F16\u8F91\u6587\u4EF6",
70
+ MultiEdit: "\u7F16\u8F91\u6587\u4EF6",
71
+ Ls: "\u5217\u51FA\u76EE\u5F55",
72
+ Glob: "\u5339\u914D\u6587\u4EF6",
73
+ Grep: "\u641C\u7D22\u6587\u672C",
74
+ WebSearch: "\u641C\u7D22\u7F51\u9875",
75
+ WebFetch: "\u6574\u7406\u7F51\u9875\u5185\u5BB9",
76
+ Agent: "\u6D3E\u751F\u5B50\u667A\u80FD\u4F53",
77
+ AskUserQuestion: "\u5411\u7528\u6237\u63D0\u95EE",
78
+ ReadSkill: "\u8BFB\u53D6\u6280\u80FD",
79
+ UpdatePlan: "\u66F4\u65B0\u4EFB\u52A1\u8FDB\u5EA6",
80
+ FinishTask: "\u4EFB\u52A1\u5B8C\u6210",
81
+ ExitPlanMode: "\u63D0\u4EA4\u8BA1\u5212",
82
+ CD: "\u5207\u6362\u5DE5\u4F5C\u76EE\u5F55",
83
+ RenderHtml: "\u751F\u6210\u9875\u9762",
84
+ submit_result: "\u63D0\u4EA4\u7ED3\u679C",
85
+ ListSessions: "\u5217\u51FA\u5386\u53F2\u4F1A\u8BDD",
86
+ GetSessionHistory: "\u8BFB\u53D6\u4F1A\u8BDD\u5386\u53F2"
87
+ };
88
+ var OUTPUT_TOOL_ICONS = {
89
+ Write: "\u{1F4C4}",
90
+ Edit: "\u{1F4DD}",
91
+ MultiEdit: "\u{1F4DD}"
92
+ };
93
+ var PRIORITY_FILE_KEYS = [
94
+ "file_path",
95
+ "filePath",
96
+ "output_file",
97
+ "outputFile",
98
+ "output_path",
99
+ "outputPath",
100
+ "path",
101
+ "filepath",
102
+ "target_file",
103
+ "destination",
104
+ "filename"
105
+ ];
106
+ function safeParseJson(value) {
107
+ if (!value) return null;
108
+ try {
109
+ return JSON.parse(value);
110
+ } catch {
111
+ return null;
112
+ }
113
+ }
114
+ function isPlainObject(value) {
115
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
116
+ }
117
+ function getStringArgValue(args, key) {
118
+ const value = args?.[key];
119
+ return typeof value === "string" ? value.trim() : "";
120
+ }
121
+ function getCommandDescription(args) {
122
+ return getStringArgValue(args, "description");
123
+ }
124
+ function getToolDescription(toolCall) {
125
+ const args = safeParseJson(toolCall.arguments);
126
+ if (!isPlainObject(args)) return null;
127
+ return getCommandDescription(args) || null;
128
+ }
129
+ function formatFileName(filePath) {
130
+ return filePath.split(/[\\/]/).pop() ?? filePath;
131
+ }
132
+ var SKILL_ENTRY_FILE_NAMES = /* @__PURE__ */ new Set(["skill.md", "command.md"]);
133
+ var NON_SKILL_DIR_NAMES = /* @__PURE__ */ new Set([".", "..", ".agent", ".agents", ".claude", "skill_data", "skills"]);
134
+ function getSkillNameFromFilePath(filePath) {
135
+ if (!filePath) return null;
136
+ const segments = filePath.split(/[\\/]+/).filter(Boolean);
137
+ const fileName = segments.pop();
138
+ if (!fileName || !SKILL_ENTRY_FILE_NAMES.has(fileName.toLowerCase())) return null;
139
+ const dirName = segments.pop();
140
+ if (!dirName || NON_SKILL_DIR_NAMES.has(dirName.toLowerCase())) return null;
141
+ return dirName;
142
+ }
143
+ function formatToolFileName(filePath) {
144
+ return getSkillNameFromFilePath(filePath) ?? formatFileName(filePath);
145
+ }
146
+ function isInternalStatusFile(filePath) {
147
+ const fileName = formatFileName(filePath).toLowerCase();
148
+ return fileName === "phase.json";
149
+ }
150
+ function formatToolName(name) {
151
+ const trimmed = name.trim();
152
+ if (!trimmed) return name;
153
+ if (trimmed === "code:run" || trimmed === "code__run") return "CodeMode";
154
+ const stripped = trimmed.split(":").pop()?.split("/").pop()?.split(".").pop()?.trim() || trimmed;
155
+ const normalized = stripped.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
156
+ return TOOL_NAME_ALIASES[normalized] ?? stripped;
157
+ }
158
+ function getToolDisplayLabel(toolCall) {
159
+ const normalized = formatToolName(toolCall.name);
160
+ const args = safeParseJson(toolCall.arguments);
161
+ const displayName = toolCall.display_name?.trim() ?? "";
162
+ const explicitLabel = displayName === toolCall.name ? "" : displayName;
163
+ const baseLabel = explicitLabel || TOOL_DISPLAY_LABELS[normalized] || displayName || normalized;
164
+ const metaDisplayName = getStringArgValue(args, "_meta_display_name");
165
+ if (metaDisplayName) {
166
+ return metaDisplayName;
167
+ }
168
+ const description = getCommandDescription(args);
169
+ if (normalized === "BgBash") {
170
+ return description ? `\u540E\u53F0\u6267\u884C\uFF1A${description}` : "\u540E\u53F0\u6267\u884C\u547D\u4EE4";
171
+ }
172
+ if (normalized === "ReadSkill") {
173
+ const skillName = getStringArgValue(args, "skill") || getStringArgValue(args, "skill_name");
174
+ return skillName ? `${baseLabel}\u300C${skillName}\u300D` : baseLabel;
175
+ }
176
+ if (normalized === "Read") {
177
+ const skillName = getSkillNameFromFilePath(
178
+ getStringArgValue(args, "file_path") || getStringArgValue(args, "path")
179
+ );
180
+ if (skillName) return `\u8BFB\u53D6\u6280\u80FD\u300C${skillName}\u300D`;
181
+ }
182
+ if (normalized === "FinishTask") {
183
+ const title = args && typeof args.title === "string" ? args.title : "";
184
+ return title ? `${baseLabel}\uFF1A${title}` : baseLabel;
185
+ }
186
+ return description || baseLabel;
187
+ }
188
+ function getToolTone(status) {
189
+ if (status === "error" || status === "cancelled") return "failed";
190
+ if (status === "awaiting_answer") return "awaiting";
191
+ if (status === "pending") return "running";
192
+ return "done";
193
+ }
194
+ function getToolStatusLabel(status) {
195
+ if (status === "pending") return "\u8FD0\u884C\u4E2D";
196
+ if (status === "awaiting_answer") return "\u7B49\u5F85\u56DE\u7B54";
197
+ if (status === "error") return "\u9519\u8BEF";
198
+ if (status === "cancelled") return "\u5DF2\u53D6\u6D88";
199
+ return "\u5B8C\u6210";
200
+ }
201
+ function extractToolFilePath(toolCall) {
202
+ return extractToolFilePaths(toolCall)[0] ?? null;
203
+ }
204
+ function extractToolFilePaths(toolCall) {
205
+ const formattedName = formatToolName(toolCall.name);
206
+ const argsValue = safeParseJson(toolCall.arguments);
207
+ if (formattedName === "Read" || formattedName === "Write" || formattedName === "Edit" || formattedName === "MultiEdit") {
208
+ const paths = [];
209
+ const collect = (value, depth = 0, allowPlainString = false) => {
210
+ if (depth > 4) return;
211
+ if (typeof value === "string") {
212
+ const path = value.trim();
213
+ if (path && (allowPlainString || path.includes("/") || path.includes("\\") || /\.[a-z0-9]{1,8}$/i.test(path))) {
214
+ if (!isInternalStatusFile(path) && !paths.includes(path)) paths.push(path);
215
+ }
216
+ return;
217
+ }
218
+ if (Array.isArray(value)) {
219
+ for (const item of value) collect(item, depth + 1, allowPlainString);
220
+ return;
221
+ }
222
+ if (!isPlainObject(value)) return;
223
+ for (const key of PRIORITY_FILE_KEYS) collect(value[key], depth + 1, true);
224
+ for (const [key, nested] of Object.entries(value)) {
225
+ if (!PRIORITY_FILE_KEYS.includes(key) && nested && typeof nested === "object") collect(nested, depth + 1, false);
226
+ }
227
+ };
228
+ collect(argsValue);
229
+ const collectPatchHeaders = (value) => {
230
+ if (typeof value === "string") {
231
+ for (const match of value.matchAll(/^\*\*\*\s+(?:Update|Delete|Add) File:\s*(.+)$/gm)) {
232
+ const path = match[1].trim();
233
+ if (path && !isInternalStatusFile(path) && !paths.includes(path)) paths.push(path);
234
+ }
235
+ } else if (Array.isArray(value)) {
236
+ for (const item of value) collectPatchHeaders(item);
237
+ } else if (isPlainObject(value)) {
238
+ for (const [key, nested] of Object.entries(value)) {
239
+ if (key.toLowerCase().includes("patch") || key.toLowerCase().includes("diff")) collectPatchHeaders(nested);
240
+ }
241
+ }
242
+ };
243
+ collectPatchHeaders(argsValue);
244
+ return paths;
245
+ }
246
+ return [];
247
+ }
248
+ function getToolOutputTag(toolCall) {
249
+ const toolName = formatToolName(toolCall.name);
250
+ const filePath = extractToolFilePath(toolCall);
251
+ const icon = OUTPUT_TOOL_ICONS[toolName];
252
+ if (!icon || !filePath) return null;
253
+ return {
254
+ key: `${toolCall.id}-${filePath}`,
255
+ label: `${icon} ${filePath.split("/").pop() ?? filePath}`,
256
+ tone: "file"
257
+ };
258
+ }
259
+
260
+ // src/components/PlanUpdateBlock.tsx
261
+ import { useEffect, useRef, useState } from "react";
262
+
263
+ // ../../node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs
264
+ var concatArrays = (array1, array2) => {
265
+ const combinedArray = new Array(array1.length + array2.length);
266
+ for (let i = 0; i < array1.length; i++) {
267
+ combinedArray[i] = array1[i];
268
+ }
269
+ for (let i = 0; i < array2.length; i++) {
270
+ combinedArray[array1.length + i] = array2[i];
271
+ }
272
+ return combinedArray;
273
+ };
274
+ var createClassValidatorObject = (classGroupId, validator) => ({
275
+ classGroupId,
276
+ validator
277
+ });
278
+ var createClassPartObject = (nextPart = /* @__PURE__ */ new Map(), validators = null, classGroupId) => ({
279
+ nextPart,
280
+ validators,
281
+ classGroupId
282
+ });
283
+ var CLASS_PART_SEPARATOR = "-";
284
+ var EMPTY_CONFLICTS = [];
285
+ var ARBITRARY_PROPERTY_PREFIX = "arbitrary..";
286
+ var createClassGroupUtils = (config) => {
287
+ const classMap = createClassMap(config);
288
+ const {
289
+ conflictingClassGroups,
290
+ conflictingClassGroupModifiers
291
+ } = config;
292
+ const getClassGroupId = (className) => {
293
+ if (className.startsWith("[") && className.endsWith("]")) {
294
+ return getGroupIdForArbitraryProperty(className);
295
+ }
296
+ const classParts = className.split(CLASS_PART_SEPARATOR);
297
+ const startIndex = classParts[0] === "" && classParts.length > 1 ? 1 : 0;
298
+ return getGroupRecursive(classParts, startIndex, classMap);
299
+ };
300
+ const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {
301
+ if (hasPostfixModifier) {
302
+ const modifierConflicts = conflictingClassGroupModifiers[classGroupId];
303
+ const baseConflicts = conflictingClassGroups[classGroupId];
304
+ if (modifierConflicts) {
305
+ if (baseConflicts) {
306
+ return concatArrays(baseConflicts, modifierConflicts);
307
+ }
308
+ return modifierConflicts;
309
+ }
310
+ return baseConflicts || EMPTY_CONFLICTS;
311
+ }
312
+ return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;
313
+ };
314
+ return {
315
+ getClassGroupId,
316
+ getConflictingClassGroupIds
317
+ };
318
+ };
319
+ var getGroupRecursive = (classParts, startIndex, classPartObject) => {
320
+ const classPathsLength = classParts.length - startIndex;
321
+ if (classPathsLength === 0) {
322
+ return classPartObject.classGroupId;
323
+ }
324
+ const currentClassPart = classParts[startIndex];
325
+ const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);
326
+ if (nextClassPartObject) {
327
+ const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);
328
+ if (result) return result;
329
+ }
330
+ const validators = classPartObject.validators;
331
+ if (validators === null) {
332
+ return void 0;
333
+ }
334
+ const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);
335
+ const validatorsLength = validators.length;
336
+ for (let i = 0; i < validatorsLength; i++) {
337
+ const validatorObj = validators[i];
338
+ if (validatorObj.validator(classRest)) {
339
+ return validatorObj.classGroupId;
340
+ }
341
+ }
342
+ return void 0;
343
+ };
344
+ var getGroupIdForArbitraryProperty = (className) => className.slice(1, -1).indexOf(":") === -1 ? void 0 : (() => {
345
+ const content = className.slice(1, -1);
346
+ const colonIndex = content.indexOf(":");
347
+ const property = content.slice(0, colonIndex);
348
+ return property ? ARBITRARY_PROPERTY_PREFIX + property : void 0;
349
+ })();
350
+ var createClassMap = (config) => {
351
+ const {
352
+ theme,
353
+ classGroups
354
+ } = config;
355
+ return processClassGroups(classGroups, theme);
356
+ };
357
+ var processClassGroups = (classGroups, theme) => {
358
+ const classMap = createClassPartObject();
359
+ for (const classGroupId in classGroups) {
360
+ const group = classGroups[classGroupId];
361
+ processClassesRecursively(group, classMap, classGroupId, theme);
362
+ }
363
+ return classMap;
364
+ };
365
+ var processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {
366
+ const len = classGroup.length;
367
+ for (let i = 0; i < len; i++) {
368
+ const classDefinition = classGroup[i];
369
+ processClassDefinition(classDefinition, classPartObject, classGroupId, theme);
370
+ }
371
+ };
372
+ var processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
373
+ if (typeof classDefinition === "string") {
374
+ processStringDefinition(classDefinition, classPartObject, classGroupId);
375
+ return;
376
+ }
377
+ if (typeof classDefinition === "function") {
378
+ processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);
379
+ return;
380
+ }
381
+ processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);
382
+ };
383
+ var processStringDefinition = (classDefinition, classPartObject, classGroupId) => {
384
+ const classPartObjectToEdit = classDefinition === "" ? classPartObject : getPart(classPartObject, classDefinition);
385
+ classPartObjectToEdit.classGroupId = classGroupId;
386
+ };
387
+ var processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
388
+ if (isThemeGetter(classDefinition)) {
389
+ processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);
390
+ return;
391
+ }
392
+ if (classPartObject.validators === null) {
393
+ classPartObject.validators = [];
394
+ }
395
+ classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));
396
+ };
397
+ var processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {
398
+ const entries = Object.entries(classDefinition);
399
+ const len = entries.length;
400
+ for (let i = 0; i < len; i++) {
401
+ const [key, value] = entries[i];
402
+ processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);
403
+ }
404
+ };
405
+ var getPart = (classPartObject, path) => {
406
+ let current = classPartObject;
407
+ const parts = path.split(CLASS_PART_SEPARATOR);
408
+ const len = parts.length;
409
+ for (let i = 0; i < len; i++) {
410
+ const part = parts[i];
411
+ let next = current.nextPart.get(part);
412
+ if (!next) {
413
+ next = createClassPartObject();
414
+ current.nextPart.set(part, next);
415
+ }
416
+ current = next;
417
+ }
418
+ return current;
419
+ };
420
+ var isThemeGetter = (func) => "isThemeGetter" in func && func.isThemeGetter === true;
421
+ var createLruCache = (maxCacheSize) => {
422
+ if (maxCacheSize < 1) {
423
+ return {
424
+ get: () => void 0,
425
+ set: () => {
426
+ }
427
+ };
428
+ }
429
+ let cacheSize = 0;
430
+ let cache = /* @__PURE__ */ Object.create(null);
431
+ let previousCache = /* @__PURE__ */ Object.create(null);
432
+ const update = (key, value) => {
433
+ cache[key] = value;
434
+ cacheSize++;
435
+ if (cacheSize > maxCacheSize) {
436
+ cacheSize = 0;
437
+ previousCache = cache;
438
+ cache = /* @__PURE__ */ Object.create(null);
439
+ }
440
+ };
441
+ return {
442
+ get(key) {
443
+ let value = cache[key];
444
+ if (value !== void 0) {
445
+ return value;
446
+ }
447
+ if ((value = previousCache[key]) !== void 0) {
448
+ update(key, value);
449
+ return value;
450
+ }
451
+ },
452
+ set(key, value) {
453
+ if (key in cache) {
454
+ cache[key] = value;
455
+ } else {
456
+ update(key, value);
457
+ }
458
+ }
459
+ };
460
+ };
461
+ var IMPORTANT_MODIFIER = "!";
462
+ var MODIFIER_SEPARATOR = ":";
463
+ var EMPTY_MODIFIERS = [];
464
+ var createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({
465
+ modifiers,
466
+ hasImportantModifier,
467
+ baseClassName,
468
+ maybePostfixModifierPosition,
469
+ isExternal
470
+ });
471
+ var createParseClassName = (config) => {
472
+ const {
473
+ prefix,
474
+ experimentalParseClassName
475
+ } = config;
476
+ let parseClassName = (className) => {
477
+ const modifiers = [];
478
+ let bracketDepth = 0;
479
+ let parenDepth = 0;
480
+ let modifierStart = 0;
481
+ let postfixModifierPosition;
482
+ const len = className.length;
483
+ for (let index = 0; index < len; index++) {
484
+ const currentCharacter = className[index];
485
+ if (bracketDepth === 0 && parenDepth === 0) {
486
+ if (currentCharacter === MODIFIER_SEPARATOR) {
487
+ modifiers.push(className.slice(modifierStart, index));
488
+ modifierStart = index + 1;
489
+ continue;
490
+ }
491
+ if (currentCharacter === "/") {
492
+ postfixModifierPosition = index;
493
+ continue;
494
+ }
495
+ }
496
+ if (currentCharacter === "[") bracketDepth++;
497
+ else if (currentCharacter === "]") bracketDepth--;
498
+ else if (currentCharacter === "(") parenDepth++;
499
+ else if (currentCharacter === ")") parenDepth--;
500
+ }
501
+ const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);
502
+ let baseClassName = baseClassNameWithImportantModifier;
503
+ let hasImportantModifier = false;
504
+ if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {
505
+ baseClassName = baseClassNameWithImportantModifier.slice(0, -1);
506
+ hasImportantModifier = true;
507
+ } else if (
508
+ /**
509
+ * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.
510
+ * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864
511
+ */
512
+ baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)
513
+ ) {
514
+ baseClassName = baseClassNameWithImportantModifier.slice(1);
515
+ hasImportantModifier = true;
516
+ }
517
+ const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : void 0;
518
+ return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);
519
+ };
520
+ if (prefix) {
521
+ const fullPrefix = prefix + MODIFIER_SEPARATOR;
522
+ const parseClassNameOriginal = parseClassName;
523
+ parseClassName = (className) => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, void 0, true);
524
+ }
525
+ if (experimentalParseClassName) {
526
+ const parseClassNameOriginal = parseClassName;
527
+ parseClassName = (className) => experimentalParseClassName({
528
+ className,
529
+ parseClassName: parseClassNameOriginal
530
+ });
531
+ }
532
+ return parseClassName;
533
+ };
534
+ var createSortModifiers = (config) => {
535
+ const modifierWeights = /* @__PURE__ */ new Map();
536
+ config.orderSensitiveModifiers.forEach((mod, index) => {
537
+ modifierWeights.set(mod, 1e6 + index);
538
+ });
539
+ return (modifiers) => {
540
+ const result = [];
541
+ let currentSegment = [];
542
+ for (let i = 0; i < modifiers.length; i++) {
543
+ const modifier = modifiers[i];
544
+ const isArbitrary = modifier[0] === "[";
545
+ const isOrderSensitive = modifierWeights.has(modifier);
546
+ if (isArbitrary || isOrderSensitive) {
547
+ if (currentSegment.length > 0) {
548
+ currentSegment.sort();
549
+ result.push(...currentSegment);
550
+ currentSegment = [];
551
+ }
552
+ result.push(modifier);
553
+ } else {
554
+ currentSegment.push(modifier);
555
+ }
556
+ }
557
+ if (currentSegment.length > 0) {
558
+ currentSegment.sort();
559
+ result.push(...currentSegment);
560
+ }
561
+ return result;
562
+ };
563
+ };
564
+ var createConfigUtils = (config) => ({
565
+ cache: createLruCache(config.cacheSize),
566
+ parseClassName: createParseClassName(config),
567
+ sortModifiers: createSortModifiers(config),
568
+ ...createClassGroupUtils(config)
569
+ });
570
+ var SPLIT_CLASSES_REGEX = /\s+/;
571
+ var mergeClassList = (classList, configUtils) => {
572
+ const {
573
+ parseClassName,
574
+ getClassGroupId,
575
+ getConflictingClassGroupIds,
576
+ sortModifiers
577
+ } = configUtils;
578
+ const classGroupsInConflict = [];
579
+ const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
580
+ let result = "";
581
+ for (let index = classNames.length - 1; index >= 0; index -= 1) {
582
+ const originalClassName = classNames[index];
583
+ const {
584
+ isExternal,
585
+ modifiers,
586
+ hasImportantModifier,
587
+ baseClassName,
588
+ maybePostfixModifierPosition
589
+ } = parseClassName(originalClassName);
590
+ if (isExternal) {
591
+ result = originalClassName + (result.length > 0 ? " " + result : result);
592
+ continue;
593
+ }
594
+ let hasPostfixModifier = !!maybePostfixModifierPosition;
595
+ let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
596
+ if (!classGroupId) {
597
+ if (!hasPostfixModifier) {
598
+ result = originalClassName + (result.length > 0 ? " " + result : result);
599
+ continue;
600
+ }
601
+ classGroupId = getClassGroupId(baseClassName);
602
+ if (!classGroupId) {
603
+ result = originalClassName + (result.length > 0 ? " " + result : result);
604
+ continue;
605
+ }
606
+ hasPostfixModifier = false;
607
+ }
608
+ const variantModifier = modifiers.length === 0 ? "" : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(":");
609
+ const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;
610
+ const classId = modifierId + classGroupId;
611
+ if (classGroupsInConflict.indexOf(classId) > -1) {
612
+ continue;
613
+ }
614
+ classGroupsInConflict.push(classId);
615
+ const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);
616
+ for (let i = 0; i < conflictGroups.length; ++i) {
617
+ const group = conflictGroups[i];
618
+ classGroupsInConflict.push(modifierId + group);
619
+ }
620
+ result = originalClassName + (result.length > 0 ? " " + result : result);
621
+ }
622
+ return result;
623
+ };
624
+ var twJoin = (...classLists) => {
625
+ let index = 0;
626
+ let argument;
627
+ let resolvedValue;
628
+ let string = "";
629
+ while (index < classLists.length) {
630
+ if (argument = classLists[index++]) {
631
+ if (resolvedValue = toValue(argument)) {
632
+ string && (string += " ");
633
+ string += resolvedValue;
634
+ }
635
+ }
636
+ }
637
+ return string;
638
+ };
639
+ var toValue = (mix) => {
640
+ if (typeof mix === "string") {
641
+ return mix;
642
+ }
643
+ let resolvedValue;
644
+ let string = "";
645
+ for (let k = 0; k < mix.length; k++) {
646
+ if (mix[k]) {
647
+ if (resolvedValue = toValue(mix[k])) {
648
+ string && (string += " ");
649
+ string += resolvedValue;
650
+ }
651
+ }
652
+ }
653
+ return string;
654
+ };
655
+ var createTailwindMerge = (createConfigFirst, ...createConfigRest) => {
656
+ let configUtils;
657
+ let cacheGet;
658
+ let cacheSet;
659
+ let functionToCall;
660
+ const initTailwindMerge = (classList) => {
661
+ const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());
662
+ configUtils = createConfigUtils(config);
663
+ cacheGet = configUtils.cache.get;
664
+ cacheSet = configUtils.cache.set;
665
+ functionToCall = tailwindMerge;
666
+ return tailwindMerge(classList);
667
+ };
668
+ const tailwindMerge = (classList) => {
669
+ const cachedResult = cacheGet(classList);
670
+ if (cachedResult) {
671
+ return cachedResult;
672
+ }
673
+ const result = mergeClassList(classList, configUtils);
674
+ cacheSet(classList, result);
675
+ return result;
676
+ };
677
+ functionToCall = initTailwindMerge;
678
+ return (...args) => functionToCall(twJoin(...args));
679
+ };
680
+ var fallbackThemeArr = [];
681
+ var fromTheme = (key) => {
682
+ const themeGetter = (theme) => theme[key] || fallbackThemeArr;
683
+ themeGetter.isThemeGetter = true;
684
+ return themeGetter;
685
+ };
686
+ var arbitraryValueRegex = /^\[(?:(\w[\w-]*):)?(.+)\]$/i;
687
+ var arbitraryVariableRegex = /^\((?:(\w[\w-]*):)?(.+)\)$/i;
688
+ var fractionRegex = /^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/;
689
+ var tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/;
690
+ var 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$/;
691
+ var colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/;
692
+ var shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;
693
+ var imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;
694
+ var isFraction = (value) => fractionRegex.test(value);
695
+ var isNumber = (value) => !!value && !Number.isNaN(Number(value));
696
+ var isInteger = (value) => !!value && Number.isInteger(Number(value));
697
+ var isPercent = (value) => value.endsWith("%") && isNumber(value.slice(0, -1));
698
+ var isTshirtSize = (value) => tshirtUnitRegex.test(value);
699
+ var isAny = () => true;
700
+ var isLengthOnly = (value) => (
701
+ // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
702
+ // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
703
+ // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
704
+ lengthUnitRegex.test(value) && !colorFunctionRegex.test(value)
705
+ );
706
+ var isNever = () => false;
707
+ var isShadow = (value) => shadowRegex.test(value);
708
+ var isImage = (value) => imageRegex.test(value);
709
+ var isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
710
+ var isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
711
+ var isArbitraryValue = (value) => arbitraryValueRegex.test(value);
712
+ var isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
713
+ var isArbitraryNumber = (value) => getIsArbitraryValue(value, isLabelNumber, isNumber);
714
+ var isArbitraryWeight = (value) => getIsArbitraryValue(value, isLabelWeight, isAny);
715
+ var isArbitraryFamilyName = (value) => getIsArbitraryValue(value, isLabelFamilyName, isNever);
716
+ var isArbitraryPosition = (value) => getIsArbitraryValue(value, isLabelPosition, isNever);
717
+ var isArbitraryImage = (value) => getIsArbitraryValue(value, isLabelImage, isImage);
718
+ var isArbitraryShadow = (value) => getIsArbitraryValue(value, isLabelShadow, isShadow);
719
+ var isArbitraryVariable = (value) => arbitraryVariableRegex.test(value);
720
+ var isArbitraryVariableLength = (value) => getIsArbitraryVariable(value, isLabelLength);
721
+ var isArbitraryVariableFamilyName = (value) => getIsArbitraryVariable(value, isLabelFamilyName);
722
+ var isArbitraryVariablePosition = (value) => getIsArbitraryVariable(value, isLabelPosition);
723
+ var isArbitraryVariableSize = (value) => getIsArbitraryVariable(value, isLabelSize);
724
+ var isArbitraryVariableImage = (value) => getIsArbitraryVariable(value, isLabelImage);
725
+ var isArbitraryVariableShadow = (value) => getIsArbitraryVariable(value, isLabelShadow, true);
726
+ var isArbitraryVariableWeight = (value) => getIsArbitraryVariable(value, isLabelWeight, true);
727
+ var getIsArbitraryValue = (value, testLabel, testValue) => {
728
+ const result = arbitraryValueRegex.exec(value);
729
+ if (result) {
730
+ if (result[1]) {
731
+ return testLabel(result[1]);
732
+ }
733
+ return testValue(result[2]);
734
+ }
735
+ return false;
736
+ };
737
+ var getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {
738
+ const result = arbitraryVariableRegex.exec(value);
739
+ if (result) {
740
+ if (result[1]) {
741
+ return testLabel(result[1]);
742
+ }
743
+ return shouldMatchNoLabel;
744
+ }
745
+ return false;
746
+ };
747
+ var isLabelPosition = (label) => label === "position" || label === "percentage";
748
+ var isLabelImage = (label) => label === "image" || label === "url";
749
+ var isLabelSize = (label) => label === "length" || label === "size" || label === "bg-size";
750
+ var isLabelLength = (label) => label === "length";
751
+ var isLabelNumber = (label) => label === "number";
752
+ var isLabelFamilyName = (label) => label === "family-name";
753
+ var isLabelWeight = (label) => label === "number" || label === "weight";
754
+ var isLabelShadow = (label) => label === "shadow";
755
+ var getDefaultConfig = () => {
756
+ const themeColor = fromTheme("color");
757
+ const themeFont = fromTheme("font");
758
+ const themeText = fromTheme("text");
759
+ const themeFontWeight = fromTheme("font-weight");
760
+ const themeTracking = fromTheme("tracking");
761
+ const themeLeading = fromTheme("leading");
762
+ const themeBreakpoint = fromTheme("breakpoint");
763
+ const themeContainer = fromTheme("container");
764
+ const themeSpacing = fromTheme("spacing");
765
+ const themeRadius = fromTheme("radius");
766
+ const themeShadow = fromTheme("shadow");
767
+ const themeInsetShadow = fromTheme("inset-shadow");
768
+ const themeTextShadow = fromTheme("text-shadow");
769
+ const themeDropShadow = fromTheme("drop-shadow");
770
+ const themeBlur = fromTheme("blur");
771
+ const themePerspective = fromTheme("perspective");
772
+ const themeAspect = fromTheme("aspect");
773
+ const themeEase = fromTheme("ease");
774
+ const themeAnimate = fromTheme("animate");
775
+ const scaleBreak = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"];
776
+ const scalePosition = () => [
777
+ "center",
778
+ "top",
779
+ "bottom",
780
+ "left",
781
+ "right",
782
+ "top-left",
783
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
784
+ "left-top",
785
+ "top-right",
786
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
787
+ "right-top",
788
+ "bottom-right",
789
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
790
+ "right-bottom",
791
+ "bottom-left",
792
+ // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
793
+ "left-bottom"
794
+ ];
795
+ const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];
796
+ const scaleOverflow = () => ["auto", "hidden", "clip", "visible", "scroll"];
797
+ const scaleOverscroll = () => ["auto", "contain", "none"];
798
+ const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];
799
+ const scaleInset = () => [isFraction, "full", "auto", ...scaleUnambiguousSpacing()];
800
+ const scaleGridTemplateColsRows = () => [isInteger, "none", "subgrid", isArbitraryVariable, isArbitraryValue];
801
+ const scaleGridColRowStartAndEnd = () => ["auto", {
802
+ span: ["full", isInteger, isArbitraryVariable, isArbitraryValue]
803
+ }, isInteger, isArbitraryVariable, isArbitraryValue];
804
+ const scaleGridColRowStartOrEnd = () => [isInteger, "auto", isArbitraryVariable, isArbitraryValue];
805
+ const scaleGridAutoColsRows = () => ["auto", "min", "max", "fr", isArbitraryVariable, isArbitraryValue];
806
+ const scaleAlignPrimaryAxis = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"];
807
+ const scaleAlignSecondaryAxis = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"];
808
+ const scaleMargin = () => ["auto", ...scaleUnambiguousSpacing()];
809
+ const scaleSizing = () => [isFraction, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
810
+ const scaleSizingInline = () => [isFraction, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...scaleUnambiguousSpacing()];
811
+ const scaleSizingBlock = () => [isFraction, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...scaleUnambiguousSpacing()];
812
+ const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];
813
+ const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {
814
+ position: [isArbitraryVariable, isArbitraryValue]
815
+ }];
816
+ const scaleBgRepeat = () => ["no-repeat", {
817
+ repeat: ["", "x", "y", "space", "round"]
818
+ }];
819
+ const scaleBgSize = () => ["auto", "cover", "contain", isArbitraryVariableSize, isArbitrarySize, {
820
+ size: [isArbitraryVariable, isArbitraryValue]
821
+ }];
822
+ const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];
823
+ const scaleRadius = () => [
824
+ // Deprecated since Tailwind CSS v4.0.0
825
+ "",
826
+ "none",
827
+ "full",
828
+ themeRadius,
829
+ isArbitraryVariable,
830
+ isArbitraryValue
831
+ ];
832
+ const scaleBorderWidth = () => ["", isNumber, isArbitraryVariableLength, isArbitraryLength];
833
+ const scaleLineStyle = () => ["solid", "dashed", "dotted", "double"];
834
+ const scaleBlendMode = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"];
835
+ const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];
836
+ const scaleBlur = () => [
837
+ // Deprecated since Tailwind CSS v4.0.0
838
+ "",
839
+ "none",
840
+ themeBlur,
841
+ isArbitraryVariable,
842
+ isArbitraryValue
843
+ ];
844
+ const scaleRotate = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
845
+ const scaleScale = () => ["none", isNumber, isArbitraryVariable, isArbitraryValue];
846
+ const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];
847
+ const scaleTranslate = () => [isFraction, "full", ...scaleUnambiguousSpacing()];
848
+ return {
849
+ cacheSize: 500,
850
+ theme: {
851
+ animate: ["spin", "ping", "pulse", "bounce"],
852
+ aspect: ["video"],
853
+ blur: [isTshirtSize],
854
+ breakpoint: [isTshirtSize],
855
+ color: [isAny],
856
+ container: [isTshirtSize],
857
+ "drop-shadow": [isTshirtSize],
858
+ ease: ["in", "out", "in-out"],
859
+ font: [isAnyNonArbitrary],
860
+ "font-weight": ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"],
861
+ "inset-shadow": [isTshirtSize],
862
+ leading: ["none", "tight", "snug", "normal", "relaxed", "loose"],
863
+ perspective: ["dramatic", "near", "normal", "midrange", "distant", "none"],
864
+ radius: [isTshirtSize],
865
+ shadow: [isTshirtSize],
866
+ spacing: ["px", isNumber],
867
+ text: [isTshirtSize],
868
+ "text-shadow": [isTshirtSize],
869
+ tracking: ["tighter", "tight", "normal", "wide", "wider", "widest"]
870
+ },
871
+ classGroups: {
872
+ // --------------
873
+ // --- Layout ---
874
+ // --------------
875
+ /**
876
+ * Aspect Ratio
877
+ * @see https://tailwindcss.com/docs/aspect-ratio
878
+ */
879
+ aspect: [{
880
+ aspect: ["auto", "square", isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]
881
+ }],
882
+ /**
883
+ * Container
884
+ * @see https://tailwindcss.com/docs/container
885
+ * @deprecated since Tailwind CSS v4.0.0
886
+ */
887
+ container: ["container"],
888
+ /**
889
+ * Columns
890
+ * @see https://tailwindcss.com/docs/columns
891
+ */
892
+ columns: [{
893
+ columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]
894
+ }],
895
+ /**
896
+ * Break After
897
+ * @see https://tailwindcss.com/docs/break-after
898
+ */
899
+ "break-after": [{
900
+ "break-after": scaleBreak()
901
+ }],
902
+ /**
903
+ * Break Before
904
+ * @see https://tailwindcss.com/docs/break-before
905
+ */
906
+ "break-before": [{
907
+ "break-before": scaleBreak()
908
+ }],
909
+ /**
910
+ * Break Inside
911
+ * @see https://tailwindcss.com/docs/break-inside
912
+ */
913
+ "break-inside": [{
914
+ "break-inside": ["auto", "avoid", "avoid-page", "avoid-column"]
915
+ }],
916
+ /**
917
+ * Box Decoration Break
918
+ * @see https://tailwindcss.com/docs/box-decoration-break
919
+ */
920
+ "box-decoration": [{
921
+ "box-decoration": ["slice", "clone"]
922
+ }],
923
+ /**
924
+ * Box Sizing
925
+ * @see https://tailwindcss.com/docs/box-sizing
926
+ */
927
+ box: [{
928
+ box: ["border", "content"]
929
+ }],
930
+ /**
931
+ * Display
932
+ * @see https://tailwindcss.com/docs/display
933
+ */
934
+ 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"],
935
+ /**
936
+ * Screen Reader Only
937
+ * @see https://tailwindcss.com/docs/display#screen-reader-only
938
+ */
939
+ sr: ["sr-only", "not-sr-only"],
940
+ /**
941
+ * Floats
942
+ * @see https://tailwindcss.com/docs/float
943
+ */
944
+ float: [{
945
+ float: ["right", "left", "none", "start", "end"]
946
+ }],
947
+ /**
948
+ * Clear
949
+ * @see https://tailwindcss.com/docs/clear
950
+ */
951
+ clear: [{
952
+ clear: ["left", "right", "both", "none", "start", "end"]
953
+ }],
954
+ /**
955
+ * Isolation
956
+ * @see https://tailwindcss.com/docs/isolation
957
+ */
958
+ isolation: ["isolate", "isolation-auto"],
959
+ /**
960
+ * Object Fit
961
+ * @see https://tailwindcss.com/docs/object-fit
962
+ */
963
+ "object-fit": [{
964
+ object: ["contain", "cover", "fill", "none", "scale-down"]
965
+ }],
966
+ /**
967
+ * Object Position
968
+ * @see https://tailwindcss.com/docs/object-position
969
+ */
970
+ "object-position": [{
971
+ object: scalePositionWithArbitrary()
972
+ }],
973
+ /**
974
+ * Overflow
975
+ * @see https://tailwindcss.com/docs/overflow
976
+ */
977
+ overflow: [{
978
+ overflow: scaleOverflow()
979
+ }],
980
+ /**
981
+ * Overflow X
982
+ * @see https://tailwindcss.com/docs/overflow
983
+ */
984
+ "overflow-x": [{
985
+ "overflow-x": scaleOverflow()
986
+ }],
987
+ /**
988
+ * Overflow Y
989
+ * @see https://tailwindcss.com/docs/overflow
990
+ */
991
+ "overflow-y": [{
992
+ "overflow-y": scaleOverflow()
993
+ }],
994
+ /**
995
+ * Overscroll Behavior
996
+ * @see https://tailwindcss.com/docs/overscroll-behavior
997
+ */
998
+ overscroll: [{
999
+ overscroll: scaleOverscroll()
1000
+ }],
1001
+ /**
1002
+ * Overscroll Behavior X
1003
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1004
+ */
1005
+ "overscroll-x": [{
1006
+ "overscroll-x": scaleOverscroll()
1007
+ }],
1008
+ /**
1009
+ * Overscroll Behavior Y
1010
+ * @see https://tailwindcss.com/docs/overscroll-behavior
1011
+ */
1012
+ "overscroll-y": [{
1013
+ "overscroll-y": scaleOverscroll()
1014
+ }],
1015
+ /**
1016
+ * Position
1017
+ * @see https://tailwindcss.com/docs/position
1018
+ */
1019
+ position: ["static", "fixed", "absolute", "relative", "sticky"],
1020
+ /**
1021
+ * Inset
1022
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1023
+ */
1024
+ inset: [{
1025
+ inset: scaleInset()
1026
+ }],
1027
+ /**
1028
+ * Inset Inline
1029
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1030
+ */
1031
+ "inset-x": [{
1032
+ "inset-x": scaleInset()
1033
+ }],
1034
+ /**
1035
+ * Inset Block
1036
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1037
+ */
1038
+ "inset-y": [{
1039
+ "inset-y": scaleInset()
1040
+ }],
1041
+ /**
1042
+ * Inset Inline Start
1043
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1044
+ * @todo class group will be renamed to `inset-s` in next major release
1045
+ */
1046
+ start: [{
1047
+ "inset-s": scaleInset(),
1048
+ /**
1049
+ * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-s-*` utilities.
1050
+ * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
1051
+ */
1052
+ start: scaleInset()
1053
+ }],
1054
+ /**
1055
+ * Inset Inline End
1056
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1057
+ * @todo class group will be renamed to `inset-e` in next major release
1058
+ */
1059
+ end: [{
1060
+ "inset-e": scaleInset(),
1061
+ /**
1062
+ * @deprecated since Tailwind CSS v4.2.0 in favor of `inset-e-*` utilities.
1063
+ * @see https://github.com/tailwindlabs/tailwindcss/pull/19613
1064
+ */
1065
+ end: scaleInset()
1066
+ }],
1067
+ /**
1068
+ * Inset Block Start
1069
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1070
+ */
1071
+ "inset-bs": [{
1072
+ "inset-bs": scaleInset()
1073
+ }],
1074
+ /**
1075
+ * Inset Block End
1076
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1077
+ */
1078
+ "inset-be": [{
1079
+ "inset-be": scaleInset()
1080
+ }],
1081
+ /**
1082
+ * Top
1083
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1084
+ */
1085
+ top: [{
1086
+ top: scaleInset()
1087
+ }],
1088
+ /**
1089
+ * Right
1090
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1091
+ */
1092
+ right: [{
1093
+ right: scaleInset()
1094
+ }],
1095
+ /**
1096
+ * Bottom
1097
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1098
+ */
1099
+ bottom: [{
1100
+ bottom: scaleInset()
1101
+ }],
1102
+ /**
1103
+ * Left
1104
+ * @see https://tailwindcss.com/docs/top-right-bottom-left
1105
+ */
1106
+ left: [{
1107
+ left: scaleInset()
1108
+ }],
1109
+ /**
1110
+ * Visibility
1111
+ * @see https://tailwindcss.com/docs/visibility
1112
+ */
1113
+ visibility: ["visible", "invisible", "collapse"],
1114
+ /**
1115
+ * Z-Index
1116
+ * @see https://tailwindcss.com/docs/z-index
1117
+ */
1118
+ z: [{
1119
+ z: [isInteger, "auto", isArbitraryVariable, isArbitraryValue]
1120
+ }],
1121
+ // ------------------------
1122
+ // --- Flexbox and Grid ---
1123
+ // ------------------------
1124
+ /**
1125
+ * Flex Basis
1126
+ * @see https://tailwindcss.com/docs/flex-basis
1127
+ */
1128
+ basis: [{
1129
+ basis: [isFraction, "full", "auto", themeContainer, ...scaleUnambiguousSpacing()]
1130
+ }],
1131
+ /**
1132
+ * Flex Direction
1133
+ * @see https://tailwindcss.com/docs/flex-direction
1134
+ */
1135
+ "flex-direction": [{
1136
+ flex: ["row", "row-reverse", "col", "col-reverse"]
1137
+ }],
1138
+ /**
1139
+ * Flex Wrap
1140
+ * @see https://tailwindcss.com/docs/flex-wrap
1141
+ */
1142
+ "flex-wrap": [{
1143
+ flex: ["nowrap", "wrap", "wrap-reverse"]
1144
+ }],
1145
+ /**
1146
+ * Flex
1147
+ * @see https://tailwindcss.com/docs/flex
1148
+ */
1149
+ flex: [{
1150
+ flex: [isNumber, isFraction, "auto", "initial", "none", isArbitraryValue]
1151
+ }],
1152
+ /**
1153
+ * Flex Grow
1154
+ * @see https://tailwindcss.com/docs/flex-grow
1155
+ */
1156
+ grow: [{
1157
+ grow: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1158
+ }],
1159
+ /**
1160
+ * Flex Shrink
1161
+ * @see https://tailwindcss.com/docs/flex-shrink
1162
+ */
1163
+ shrink: [{
1164
+ shrink: ["", isNumber, isArbitraryVariable, isArbitraryValue]
1165
+ }],
1166
+ /**
1167
+ * Order
1168
+ * @see https://tailwindcss.com/docs/order
1169
+ */
1170
+ order: [{
1171
+ order: [isInteger, "first", "last", "none", isArbitraryVariable, isArbitraryValue]
1172
+ }],
1173
+ /**
1174
+ * Grid Template Columns
1175
+ * @see https://tailwindcss.com/docs/grid-template-columns
1176
+ */
1177
+ "grid-cols": [{
1178
+ "grid-cols": scaleGridTemplateColsRows()
1179
+ }],
1180
+ /**
1181
+ * Grid Column Start / End
1182
+ * @see https://tailwindcss.com/docs/grid-column
1183
+ */
1184
+ "col-start-end": [{
1185
+ col: scaleGridColRowStartAndEnd()
1186
+ }],
1187
+ /**
1188
+ * Grid Column Start
1189
+ * @see https://tailwindcss.com/docs/grid-column
1190
+ */
1191
+ "col-start": [{
1192
+ "col-start": scaleGridColRowStartOrEnd()
1193
+ }],
1194
+ /**
1195
+ * Grid Column End
1196
+ * @see https://tailwindcss.com/docs/grid-column
1197
+ */
1198
+ "col-end": [{
1199
+ "col-end": scaleGridColRowStartOrEnd()
1200
+ }],
1201
+ /**
1202
+ * Grid Template Rows
1203
+ * @see https://tailwindcss.com/docs/grid-template-rows
1204
+ */
1205
+ "grid-rows": [{
1206
+ "grid-rows": scaleGridTemplateColsRows()
1207
+ }],
1208
+ /**
1209
+ * Grid Row Start / End
1210
+ * @see https://tailwindcss.com/docs/grid-row
1211
+ */
1212
+ "row-start-end": [{
1213
+ row: scaleGridColRowStartAndEnd()
1214
+ }],
1215
+ /**
1216
+ * Grid Row Start
1217
+ * @see https://tailwindcss.com/docs/grid-row
1218
+ */
1219
+ "row-start": [{
1220
+ "row-start": scaleGridColRowStartOrEnd()
1221
+ }],
1222
+ /**
1223
+ * Grid Row End
1224
+ * @see https://tailwindcss.com/docs/grid-row
1225
+ */
1226
+ "row-end": [{
1227
+ "row-end": scaleGridColRowStartOrEnd()
1228
+ }],
1229
+ /**
1230
+ * Grid Auto Flow
1231
+ * @see https://tailwindcss.com/docs/grid-auto-flow
1232
+ */
1233
+ "grid-flow": [{
1234
+ "grid-flow": ["row", "col", "dense", "row-dense", "col-dense"]
1235
+ }],
1236
+ /**
1237
+ * Grid Auto Columns
1238
+ * @see https://tailwindcss.com/docs/grid-auto-columns
1239
+ */
1240
+ "auto-cols": [{
1241
+ "auto-cols": scaleGridAutoColsRows()
1242
+ }],
1243
+ /**
1244
+ * Grid Auto Rows
1245
+ * @see https://tailwindcss.com/docs/grid-auto-rows
1246
+ */
1247
+ "auto-rows": [{
1248
+ "auto-rows": scaleGridAutoColsRows()
1249
+ }],
1250
+ /**
1251
+ * Gap
1252
+ * @see https://tailwindcss.com/docs/gap
1253
+ */
1254
+ gap: [{
1255
+ gap: scaleUnambiguousSpacing()
1256
+ }],
1257
+ /**
1258
+ * Gap X
1259
+ * @see https://tailwindcss.com/docs/gap
1260
+ */
1261
+ "gap-x": [{
1262
+ "gap-x": scaleUnambiguousSpacing()
1263
+ }],
1264
+ /**
1265
+ * Gap Y
1266
+ * @see https://tailwindcss.com/docs/gap
1267
+ */
1268
+ "gap-y": [{
1269
+ "gap-y": scaleUnambiguousSpacing()
1270
+ }],
1271
+ /**
1272
+ * Justify Content
1273
+ * @see https://tailwindcss.com/docs/justify-content
1274
+ */
1275
+ "justify-content": [{
1276
+ justify: [...scaleAlignPrimaryAxis(), "normal"]
1277
+ }],
1278
+ /**
1279
+ * Justify Items
1280
+ * @see https://tailwindcss.com/docs/justify-items
1281
+ */
1282
+ "justify-items": [{
1283
+ "justify-items": [...scaleAlignSecondaryAxis(), "normal"]
1284
+ }],
1285
+ /**
1286
+ * Justify Self
1287
+ * @see https://tailwindcss.com/docs/justify-self
1288
+ */
1289
+ "justify-self": [{
1290
+ "justify-self": ["auto", ...scaleAlignSecondaryAxis()]
1291
+ }],
1292
+ /**
1293
+ * Align Content
1294
+ * @see https://tailwindcss.com/docs/align-content
1295
+ */
1296
+ "align-content": [{
1297
+ content: ["normal", ...scaleAlignPrimaryAxis()]
1298
+ }],
1299
+ /**
1300
+ * Align Items
1301
+ * @see https://tailwindcss.com/docs/align-items
1302
+ */
1303
+ "align-items": [{
1304
+ items: [...scaleAlignSecondaryAxis(), {
1305
+ baseline: ["", "last"]
1306
+ }]
1307
+ }],
1308
+ /**
1309
+ * Align Self
1310
+ * @see https://tailwindcss.com/docs/align-self
1311
+ */
1312
+ "align-self": [{
1313
+ self: ["auto", ...scaleAlignSecondaryAxis(), {
1314
+ baseline: ["", "last"]
1315
+ }]
1316
+ }],
1317
+ /**
1318
+ * Place Content
1319
+ * @see https://tailwindcss.com/docs/place-content
1320
+ */
1321
+ "place-content": [{
1322
+ "place-content": scaleAlignPrimaryAxis()
1323
+ }],
1324
+ /**
1325
+ * Place Items
1326
+ * @see https://tailwindcss.com/docs/place-items
1327
+ */
1328
+ "place-items": [{
1329
+ "place-items": [...scaleAlignSecondaryAxis(), "baseline"]
1330
+ }],
1331
+ /**
1332
+ * Place Self
1333
+ * @see https://tailwindcss.com/docs/place-self
1334
+ */
1335
+ "place-self": [{
1336
+ "place-self": ["auto", ...scaleAlignSecondaryAxis()]
1337
+ }],
1338
+ // Spacing
1339
+ /**
1340
+ * Padding
1341
+ * @see https://tailwindcss.com/docs/padding
1342
+ */
1343
+ p: [{
1344
+ p: scaleUnambiguousSpacing()
1345
+ }],
1346
+ /**
1347
+ * Padding Inline
1348
+ * @see https://tailwindcss.com/docs/padding
1349
+ */
1350
+ px: [{
1351
+ px: scaleUnambiguousSpacing()
1352
+ }],
1353
+ /**
1354
+ * Padding Block
1355
+ * @see https://tailwindcss.com/docs/padding
1356
+ */
1357
+ py: [{
1358
+ py: scaleUnambiguousSpacing()
1359
+ }],
1360
+ /**
1361
+ * Padding Inline Start
1362
+ * @see https://tailwindcss.com/docs/padding
1363
+ */
1364
+ ps: [{
1365
+ ps: scaleUnambiguousSpacing()
1366
+ }],
1367
+ /**
1368
+ * Padding Inline End
1369
+ * @see https://tailwindcss.com/docs/padding
1370
+ */
1371
+ pe: [{
1372
+ pe: scaleUnambiguousSpacing()
1373
+ }],
1374
+ /**
1375
+ * Padding Block Start
1376
+ * @see https://tailwindcss.com/docs/padding
1377
+ */
1378
+ pbs: [{
1379
+ pbs: scaleUnambiguousSpacing()
1380
+ }],
1381
+ /**
1382
+ * Padding Block End
1383
+ * @see https://tailwindcss.com/docs/padding
1384
+ */
1385
+ pbe: [{
1386
+ pbe: scaleUnambiguousSpacing()
1387
+ }],
1388
+ /**
1389
+ * Padding Top
1390
+ * @see https://tailwindcss.com/docs/padding
1391
+ */
1392
+ pt: [{
1393
+ pt: scaleUnambiguousSpacing()
1394
+ }],
1395
+ /**
1396
+ * Padding Right
1397
+ * @see https://tailwindcss.com/docs/padding
1398
+ */
1399
+ pr: [{
1400
+ pr: scaleUnambiguousSpacing()
1401
+ }],
1402
+ /**
1403
+ * Padding Bottom
1404
+ * @see https://tailwindcss.com/docs/padding
1405
+ */
1406
+ pb: [{
1407
+ pb: scaleUnambiguousSpacing()
1408
+ }],
1409
+ /**
1410
+ * Padding Left
1411
+ * @see https://tailwindcss.com/docs/padding
1412
+ */
1413
+ pl: [{
1414
+ pl: scaleUnambiguousSpacing()
1415
+ }],
1416
+ /**
1417
+ * Margin
1418
+ * @see https://tailwindcss.com/docs/margin
1419
+ */
1420
+ m: [{
1421
+ m: scaleMargin()
1422
+ }],
1423
+ /**
1424
+ * Margin Inline
1425
+ * @see https://tailwindcss.com/docs/margin
1426
+ */
1427
+ mx: [{
1428
+ mx: scaleMargin()
1429
+ }],
1430
+ /**
1431
+ * Margin Block
1432
+ * @see https://tailwindcss.com/docs/margin
1433
+ */
1434
+ my: [{
1435
+ my: scaleMargin()
1436
+ }],
1437
+ /**
1438
+ * Margin Inline Start
1439
+ * @see https://tailwindcss.com/docs/margin
1440
+ */
1441
+ ms: [{
1442
+ ms: scaleMargin()
1443
+ }],
1444
+ /**
1445
+ * Margin Inline End
1446
+ * @see https://tailwindcss.com/docs/margin
1447
+ */
1448
+ me: [{
1449
+ me: scaleMargin()
1450
+ }],
1451
+ /**
1452
+ * Margin Block Start
1453
+ * @see https://tailwindcss.com/docs/margin
1454
+ */
1455
+ mbs: [{
1456
+ mbs: scaleMargin()
1457
+ }],
1458
+ /**
1459
+ * Margin Block End
1460
+ * @see https://tailwindcss.com/docs/margin
1461
+ */
1462
+ mbe: [{
1463
+ mbe: scaleMargin()
1464
+ }],
1465
+ /**
1466
+ * Margin Top
1467
+ * @see https://tailwindcss.com/docs/margin
1468
+ */
1469
+ mt: [{
1470
+ mt: scaleMargin()
1471
+ }],
1472
+ /**
1473
+ * Margin Right
1474
+ * @see https://tailwindcss.com/docs/margin
1475
+ */
1476
+ mr: [{
1477
+ mr: scaleMargin()
1478
+ }],
1479
+ /**
1480
+ * Margin Bottom
1481
+ * @see https://tailwindcss.com/docs/margin
1482
+ */
1483
+ mb: [{
1484
+ mb: scaleMargin()
1485
+ }],
1486
+ /**
1487
+ * Margin Left
1488
+ * @see https://tailwindcss.com/docs/margin
1489
+ */
1490
+ ml: [{
1491
+ ml: scaleMargin()
1492
+ }],
1493
+ /**
1494
+ * Space Between X
1495
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1496
+ */
1497
+ "space-x": [{
1498
+ "space-x": scaleUnambiguousSpacing()
1499
+ }],
1500
+ /**
1501
+ * Space Between X Reverse
1502
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1503
+ */
1504
+ "space-x-reverse": ["space-x-reverse"],
1505
+ /**
1506
+ * Space Between Y
1507
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1508
+ */
1509
+ "space-y": [{
1510
+ "space-y": scaleUnambiguousSpacing()
1511
+ }],
1512
+ /**
1513
+ * Space Between Y Reverse
1514
+ * @see https://tailwindcss.com/docs/margin#adding-space-between-children
1515
+ */
1516
+ "space-y-reverse": ["space-y-reverse"],
1517
+ // --------------
1518
+ // --- Sizing ---
1519
+ // --------------
1520
+ /**
1521
+ * Size
1522
+ * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1523
+ */
1524
+ size: [{
1525
+ size: scaleSizing()
1526
+ }],
1527
+ /**
1528
+ * Inline Size
1529
+ * @see https://tailwindcss.com/docs/width
1530
+ */
1531
+ "inline-size": [{
1532
+ inline: ["auto", ...scaleSizingInline()]
1533
+ }],
1534
+ /**
1535
+ * Min-Inline Size
1536
+ * @see https://tailwindcss.com/docs/min-width
1537
+ */
1538
+ "min-inline-size": [{
1539
+ "min-inline": ["auto", ...scaleSizingInline()]
1540
+ }],
1541
+ /**
1542
+ * Max-Inline Size
1543
+ * @see https://tailwindcss.com/docs/max-width
1544
+ */
1545
+ "max-inline-size": [{
1546
+ "max-inline": ["none", ...scaleSizingInline()]
1547
+ }],
1548
+ /**
1549
+ * Block Size
1550
+ * @see https://tailwindcss.com/docs/height
1551
+ */
1552
+ "block-size": [{
1553
+ block: ["auto", ...scaleSizingBlock()]
1554
+ }],
1555
+ /**
1556
+ * Min-Block Size
1557
+ * @see https://tailwindcss.com/docs/min-height
1558
+ */
1559
+ "min-block-size": [{
1560
+ "min-block": ["auto", ...scaleSizingBlock()]
1561
+ }],
1562
+ /**
1563
+ * Max-Block Size
1564
+ * @see https://tailwindcss.com/docs/max-height
1565
+ */
1566
+ "max-block-size": [{
1567
+ "max-block": ["none", ...scaleSizingBlock()]
1568
+ }],
1569
+ /**
1570
+ * Width
1571
+ * @see https://tailwindcss.com/docs/width
1572
+ */
1573
+ w: [{
1574
+ w: [themeContainer, "screen", ...scaleSizing()]
1575
+ }],
1576
+ /**
1577
+ * Min-Width
1578
+ * @see https://tailwindcss.com/docs/min-width
1579
+ */
1580
+ "min-w": [{
1581
+ "min-w": [
1582
+ themeContainer,
1583
+ "screen",
1584
+ /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1585
+ "none",
1586
+ ...scaleSizing()
1587
+ ]
1588
+ }],
1589
+ /**
1590
+ * Max-Width
1591
+ * @see https://tailwindcss.com/docs/max-width
1592
+ */
1593
+ "max-w": [{
1594
+ "max-w": [
1595
+ themeContainer,
1596
+ "screen",
1597
+ "none",
1598
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1599
+ "prose",
1600
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1601
+ {
1602
+ screen: [themeBreakpoint]
1603
+ },
1604
+ ...scaleSizing()
1605
+ ]
1606
+ }],
1607
+ /**
1608
+ * Height
1609
+ * @see https://tailwindcss.com/docs/height
1610
+ */
1611
+ h: [{
1612
+ h: ["screen", "lh", ...scaleSizing()]
1613
+ }],
1614
+ /**
1615
+ * Min-Height
1616
+ * @see https://tailwindcss.com/docs/min-height
1617
+ */
1618
+ "min-h": [{
1619
+ "min-h": ["screen", "lh", "none", ...scaleSizing()]
1620
+ }],
1621
+ /**
1622
+ * Max-Height
1623
+ * @see https://tailwindcss.com/docs/max-height
1624
+ */
1625
+ "max-h": [{
1626
+ "max-h": ["screen", "lh", ...scaleSizing()]
1627
+ }],
1628
+ // ------------------
1629
+ // --- Typography ---
1630
+ // ------------------
1631
+ /**
1632
+ * Font Size
1633
+ * @see https://tailwindcss.com/docs/font-size
1634
+ */
1635
+ "font-size": [{
1636
+ text: ["base", themeText, isArbitraryVariableLength, isArbitraryLength]
1637
+ }],
1638
+ /**
1639
+ * Font Smoothing
1640
+ * @see https://tailwindcss.com/docs/font-smoothing
1641
+ */
1642
+ "font-smoothing": ["antialiased", "subpixel-antialiased"],
1643
+ /**
1644
+ * Font Style
1645
+ * @see https://tailwindcss.com/docs/font-style
1646
+ */
1647
+ "font-style": ["italic", "not-italic"],
1648
+ /**
1649
+ * Font Weight
1650
+ * @see https://tailwindcss.com/docs/font-weight
1651
+ */
1652
+ "font-weight": [{
1653
+ font: [themeFontWeight, isArbitraryVariableWeight, isArbitraryWeight]
1654
+ }],
1655
+ /**
1656
+ * Font Stretch
1657
+ * @see https://tailwindcss.com/docs/font-stretch
1658
+ */
1659
+ "font-stretch": [{
1660
+ "font-stretch": ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", isPercent, isArbitraryValue]
1661
+ }],
1662
+ /**
1663
+ * Font Family
1664
+ * @see https://tailwindcss.com/docs/font-family
1665
+ */
1666
+ "font-family": [{
1667
+ font: [isArbitraryVariableFamilyName, isArbitraryFamilyName, themeFont]
1668
+ }],
1669
+ /**
1670
+ * Font Feature Settings
1671
+ * @see https://tailwindcss.com/docs/font-feature-settings
1672
+ */
1673
+ "font-features": [{
1674
+ "font-features": [isArbitraryValue]
1675
+ }],
1676
+ /**
1677
+ * Font Variant Numeric
1678
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1679
+ */
1680
+ "fvn-normal": ["normal-nums"],
1681
+ /**
1682
+ * Font Variant Numeric
1683
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1684
+ */
1685
+ "fvn-ordinal": ["ordinal"],
1686
+ /**
1687
+ * Font Variant Numeric
1688
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1689
+ */
1690
+ "fvn-slashed-zero": ["slashed-zero"],
1691
+ /**
1692
+ * Font Variant Numeric
1693
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1694
+ */
1695
+ "fvn-figure": ["lining-nums", "oldstyle-nums"],
1696
+ /**
1697
+ * Font Variant Numeric
1698
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1699
+ */
1700
+ "fvn-spacing": ["proportional-nums", "tabular-nums"],
1701
+ /**
1702
+ * Font Variant Numeric
1703
+ * @see https://tailwindcss.com/docs/font-variant-numeric
1704
+ */
1705
+ "fvn-fraction": ["diagonal-fractions", "stacked-fractions"],
1706
+ /**
1707
+ * Letter Spacing
1708
+ * @see https://tailwindcss.com/docs/letter-spacing
1709
+ */
1710
+ tracking: [{
1711
+ tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]
1712
+ }],
1713
+ /**
1714
+ * Line Clamp
1715
+ * @see https://tailwindcss.com/docs/line-clamp
1716
+ */
1717
+ "line-clamp": [{
1718
+ "line-clamp": [isNumber, "none", isArbitraryVariable, isArbitraryNumber]
1719
+ }],
1720
+ /**
1721
+ * Line Height
1722
+ * @see https://tailwindcss.com/docs/line-height
1723
+ */
1724
+ leading: [{
1725
+ leading: [
1726
+ /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1727
+ themeLeading,
1728
+ ...scaleUnambiguousSpacing()
1729
+ ]
1730
+ }],
1731
+ /**
1732
+ * List Style Image
1733
+ * @see https://tailwindcss.com/docs/list-style-image
1734
+ */
1735
+ "list-image": [{
1736
+ "list-image": ["none", isArbitraryVariable, isArbitraryValue]
1737
+ }],
1738
+ /**
1739
+ * List Style Position
1740
+ * @see https://tailwindcss.com/docs/list-style-position
1741
+ */
1742
+ "list-style-position": [{
1743
+ list: ["inside", "outside"]
1744
+ }],
1745
+ /**
1746
+ * List Style Type
1747
+ * @see https://tailwindcss.com/docs/list-style-type
1748
+ */
1749
+ "list-style-type": [{
1750
+ list: ["disc", "decimal", "none", isArbitraryVariable, isArbitraryValue]
1751
+ }],
1752
+ /**
1753
+ * Text Alignment
1754
+ * @see https://tailwindcss.com/docs/text-align
1755
+ */
1756
+ "text-alignment": [{
1757
+ text: ["left", "center", "right", "justify", "start", "end"]
1758
+ }],
1759
+ /**
1760
+ * Placeholder Color
1761
+ * @deprecated since Tailwind CSS v3.0.0
1762
+ * @see https://v3.tailwindcss.com/docs/placeholder-color
1763
+ */
1764
+ "placeholder-color": [{
1765
+ placeholder: scaleColor()
1766
+ }],
1767
+ /**
1768
+ * Text Color
1769
+ * @see https://tailwindcss.com/docs/text-color
1770
+ */
1771
+ "text-color": [{
1772
+ text: scaleColor()
1773
+ }],
1774
+ /**
1775
+ * Text Decoration
1776
+ * @see https://tailwindcss.com/docs/text-decoration
1777
+ */
1778
+ "text-decoration": ["underline", "overline", "line-through", "no-underline"],
1779
+ /**
1780
+ * Text Decoration Style
1781
+ * @see https://tailwindcss.com/docs/text-decoration-style
1782
+ */
1783
+ "text-decoration-style": [{
1784
+ decoration: [...scaleLineStyle(), "wavy"]
1785
+ }],
1786
+ /**
1787
+ * Text Decoration Thickness
1788
+ * @see https://tailwindcss.com/docs/text-decoration-thickness
1789
+ */
1790
+ "text-decoration-thickness": [{
1791
+ decoration: [isNumber, "from-font", "auto", isArbitraryVariable, isArbitraryLength]
1792
+ }],
1793
+ /**
1794
+ * Text Decoration Color
1795
+ * @see https://tailwindcss.com/docs/text-decoration-color
1796
+ */
1797
+ "text-decoration-color": [{
1798
+ decoration: scaleColor()
1799
+ }],
1800
+ /**
1801
+ * Text Underline Offset
1802
+ * @see https://tailwindcss.com/docs/text-underline-offset
1803
+ */
1804
+ "underline-offset": [{
1805
+ "underline-offset": [isNumber, "auto", isArbitraryVariable, isArbitraryValue]
1806
+ }],
1807
+ /**
1808
+ * Text Transform
1809
+ * @see https://tailwindcss.com/docs/text-transform
1810
+ */
1811
+ "text-transform": ["uppercase", "lowercase", "capitalize", "normal-case"],
1812
+ /**
1813
+ * Text Overflow
1814
+ * @see https://tailwindcss.com/docs/text-overflow
1815
+ */
1816
+ "text-overflow": ["truncate", "text-ellipsis", "text-clip"],
1817
+ /**
1818
+ * Text Wrap
1819
+ * @see https://tailwindcss.com/docs/text-wrap
1820
+ */
1821
+ "text-wrap": [{
1822
+ text: ["wrap", "nowrap", "balance", "pretty"]
1823
+ }],
1824
+ /**
1825
+ * Text Indent
1826
+ * @see https://tailwindcss.com/docs/text-indent
1827
+ */
1828
+ indent: [{
1829
+ indent: scaleUnambiguousSpacing()
1830
+ }],
1831
+ /**
1832
+ * Vertical Alignment
1833
+ * @see https://tailwindcss.com/docs/vertical-align
1834
+ */
1835
+ "vertical-align": [{
1836
+ align: ["baseline", "top", "middle", "bottom", "text-top", "text-bottom", "sub", "super", isArbitraryVariable, isArbitraryValue]
1837
+ }],
1838
+ /**
1839
+ * Whitespace
1840
+ * @see https://tailwindcss.com/docs/whitespace
1841
+ */
1842
+ whitespace: [{
1843
+ whitespace: ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "break-spaces"]
1844
+ }],
1845
+ /**
1846
+ * Word Break
1847
+ * @see https://tailwindcss.com/docs/word-break
1848
+ */
1849
+ break: [{
1850
+ break: ["normal", "words", "all", "keep"]
1851
+ }],
1852
+ /**
1853
+ * Overflow Wrap
1854
+ * @see https://tailwindcss.com/docs/overflow-wrap
1855
+ */
1856
+ wrap: [{
1857
+ wrap: ["break-word", "anywhere", "normal"]
1858
+ }],
1859
+ /**
1860
+ * Hyphens
1861
+ * @see https://tailwindcss.com/docs/hyphens
1862
+ */
1863
+ hyphens: [{
1864
+ hyphens: ["none", "manual", "auto"]
1865
+ }],
1866
+ /**
1867
+ * Content
1868
+ * @see https://tailwindcss.com/docs/content
1869
+ */
1870
+ content: [{
1871
+ content: ["none", isArbitraryVariable, isArbitraryValue]
1872
+ }],
1873
+ // -------------------
1874
+ // --- Backgrounds ---
1875
+ // -------------------
1876
+ /**
1877
+ * Background Attachment
1878
+ * @see https://tailwindcss.com/docs/background-attachment
1879
+ */
1880
+ "bg-attachment": [{
1881
+ bg: ["fixed", "local", "scroll"]
1882
+ }],
1883
+ /**
1884
+ * Background Clip
1885
+ * @see https://tailwindcss.com/docs/background-clip
1886
+ */
1887
+ "bg-clip": [{
1888
+ "bg-clip": ["border", "padding", "content", "text"]
1889
+ }],
1890
+ /**
1891
+ * Background Origin
1892
+ * @see https://tailwindcss.com/docs/background-origin
1893
+ */
1894
+ "bg-origin": [{
1895
+ "bg-origin": ["border", "padding", "content"]
1896
+ }],
1897
+ /**
1898
+ * Background Position
1899
+ * @see https://tailwindcss.com/docs/background-position
1900
+ */
1901
+ "bg-position": [{
1902
+ bg: scaleBgPosition()
1903
+ }],
1904
+ /**
1905
+ * Background Repeat
1906
+ * @see https://tailwindcss.com/docs/background-repeat
1907
+ */
1908
+ "bg-repeat": [{
1909
+ bg: scaleBgRepeat()
1910
+ }],
1911
+ /**
1912
+ * Background Size
1913
+ * @see https://tailwindcss.com/docs/background-size
1914
+ */
1915
+ "bg-size": [{
1916
+ bg: scaleBgSize()
1917
+ }],
1918
+ /**
1919
+ * Background Image
1920
+ * @see https://tailwindcss.com/docs/background-image
1921
+ */
1922
+ "bg-image": [{
1923
+ bg: ["none", {
1924
+ linear: [{
1925
+ to: ["t", "tr", "r", "br", "b", "bl", "l", "tl"]
1926
+ }, isInteger, isArbitraryVariable, isArbitraryValue],
1927
+ radial: ["", isArbitraryVariable, isArbitraryValue],
1928
+ conic: [isInteger, isArbitraryVariable, isArbitraryValue]
1929
+ }, isArbitraryVariableImage, isArbitraryImage]
1930
+ }],
1931
+ /**
1932
+ * Background Color
1933
+ * @see https://tailwindcss.com/docs/background-color
1934
+ */
1935
+ "bg-color": [{
1936
+ bg: scaleColor()
1937
+ }],
1938
+ /**
1939
+ * Gradient Color Stops From Position
1940
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1941
+ */
1942
+ "gradient-from-pos": [{
1943
+ from: scaleGradientStopPosition()
1944
+ }],
1945
+ /**
1946
+ * Gradient Color Stops Via Position
1947
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1948
+ */
1949
+ "gradient-via-pos": [{
1950
+ via: scaleGradientStopPosition()
1951
+ }],
1952
+ /**
1953
+ * Gradient Color Stops To Position
1954
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1955
+ */
1956
+ "gradient-to-pos": [{
1957
+ to: scaleGradientStopPosition()
1958
+ }],
1959
+ /**
1960
+ * Gradient Color Stops From
1961
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1962
+ */
1963
+ "gradient-from": [{
1964
+ from: scaleColor()
1965
+ }],
1966
+ /**
1967
+ * Gradient Color Stops Via
1968
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1969
+ */
1970
+ "gradient-via": [{
1971
+ via: scaleColor()
1972
+ }],
1973
+ /**
1974
+ * Gradient Color Stops To
1975
+ * @see https://tailwindcss.com/docs/gradient-color-stops
1976
+ */
1977
+ "gradient-to": [{
1978
+ to: scaleColor()
1979
+ }],
1980
+ // ---------------
1981
+ // --- Borders ---
1982
+ // ---------------
1983
+ /**
1984
+ * Border Radius
1985
+ * @see https://tailwindcss.com/docs/border-radius
1986
+ */
1987
+ rounded: [{
1988
+ rounded: scaleRadius()
1989
+ }],
1990
+ /**
1991
+ * Border Radius Start
1992
+ * @see https://tailwindcss.com/docs/border-radius
1993
+ */
1994
+ "rounded-s": [{
1995
+ "rounded-s": scaleRadius()
1996
+ }],
1997
+ /**
1998
+ * Border Radius End
1999
+ * @see https://tailwindcss.com/docs/border-radius
2000
+ */
2001
+ "rounded-e": [{
2002
+ "rounded-e": scaleRadius()
2003
+ }],
2004
+ /**
2005
+ * Border Radius Top
2006
+ * @see https://tailwindcss.com/docs/border-radius
2007
+ */
2008
+ "rounded-t": [{
2009
+ "rounded-t": scaleRadius()
2010
+ }],
2011
+ /**
2012
+ * Border Radius Right
2013
+ * @see https://tailwindcss.com/docs/border-radius
2014
+ */
2015
+ "rounded-r": [{
2016
+ "rounded-r": scaleRadius()
2017
+ }],
2018
+ /**
2019
+ * Border Radius Bottom
2020
+ * @see https://tailwindcss.com/docs/border-radius
2021
+ */
2022
+ "rounded-b": [{
2023
+ "rounded-b": scaleRadius()
2024
+ }],
2025
+ /**
2026
+ * Border Radius Left
2027
+ * @see https://tailwindcss.com/docs/border-radius
2028
+ */
2029
+ "rounded-l": [{
2030
+ "rounded-l": scaleRadius()
2031
+ }],
2032
+ /**
2033
+ * Border Radius Start Start
2034
+ * @see https://tailwindcss.com/docs/border-radius
2035
+ */
2036
+ "rounded-ss": [{
2037
+ "rounded-ss": scaleRadius()
2038
+ }],
2039
+ /**
2040
+ * Border Radius Start End
2041
+ * @see https://tailwindcss.com/docs/border-radius
2042
+ */
2043
+ "rounded-se": [{
2044
+ "rounded-se": scaleRadius()
2045
+ }],
2046
+ /**
2047
+ * Border Radius End End
2048
+ * @see https://tailwindcss.com/docs/border-radius
2049
+ */
2050
+ "rounded-ee": [{
2051
+ "rounded-ee": scaleRadius()
2052
+ }],
2053
+ /**
2054
+ * Border Radius End Start
2055
+ * @see https://tailwindcss.com/docs/border-radius
2056
+ */
2057
+ "rounded-es": [{
2058
+ "rounded-es": scaleRadius()
2059
+ }],
2060
+ /**
2061
+ * Border Radius Top Left
2062
+ * @see https://tailwindcss.com/docs/border-radius
2063
+ */
2064
+ "rounded-tl": [{
2065
+ "rounded-tl": scaleRadius()
2066
+ }],
2067
+ /**
2068
+ * Border Radius Top Right
2069
+ * @see https://tailwindcss.com/docs/border-radius
2070
+ */
2071
+ "rounded-tr": [{
2072
+ "rounded-tr": scaleRadius()
2073
+ }],
2074
+ /**
2075
+ * Border Radius Bottom Right
2076
+ * @see https://tailwindcss.com/docs/border-radius
2077
+ */
2078
+ "rounded-br": [{
2079
+ "rounded-br": scaleRadius()
2080
+ }],
2081
+ /**
2082
+ * Border Radius Bottom Left
2083
+ * @see https://tailwindcss.com/docs/border-radius
2084
+ */
2085
+ "rounded-bl": [{
2086
+ "rounded-bl": scaleRadius()
2087
+ }],
2088
+ /**
2089
+ * Border Width
2090
+ * @see https://tailwindcss.com/docs/border-width
2091
+ */
2092
+ "border-w": [{
2093
+ border: scaleBorderWidth()
2094
+ }],
2095
+ /**
2096
+ * Border Width Inline
2097
+ * @see https://tailwindcss.com/docs/border-width
2098
+ */
2099
+ "border-w-x": [{
2100
+ "border-x": scaleBorderWidth()
2101
+ }],
2102
+ /**
2103
+ * Border Width Block
2104
+ * @see https://tailwindcss.com/docs/border-width
2105
+ */
2106
+ "border-w-y": [{
2107
+ "border-y": scaleBorderWidth()
2108
+ }],
2109
+ /**
2110
+ * Border Width Inline Start
2111
+ * @see https://tailwindcss.com/docs/border-width
2112
+ */
2113
+ "border-w-s": [{
2114
+ "border-s": scaleBorderWidth()
2115
+ }],
2116
+ /**
2117
+ * Border Width Inline End
2118
+ * @see https://tailwindcss.com/docs/border-width
2119
+ */
2120
+ "border-w-e": [{
2121
+ "border-e": scaleBorderWidth()
2122
+ }],
2123
+ /**
2124
+ * Border Width Block Start
2125
+ * @see https://tailwindcss.com/docs/border-width
2126
+ */
2127
+ "border-w-bs": [{
2128
+ "border-bs": scaleBorderWidth()
2129
+ }],
2130
+ /**
2131
+ * Border Width Block End
2132
+ * @see https://tailwindcss.com/docs/border-width
2133
+ */
2134
+ "border-w-be": [{
2135
+ "border-be": scaleBorderWidth()
2136
+ }],
2137
+ /**
2138
+ * Border Width Top
2139
+ * @see https://tailwindcss.com/docs/border-width
2140
+ */
2141
+ "border-w-t": [{
2142
+ "border-t": scaleBorderWidth()
2143
+ }],
2144
+ /**
2145
+ * Border Width Right
2146
+ * @see https://tailwindcss.com/docs/border-width
2147
+ */
2148
+ "border-w-r": [{
2149
+ "border-r": scaleBorderWidth()
2150
+ }],
2151
+ /**
2152
+ * Border Width Bottom
2153
+ * @see https://tailwindcss.com/docs/border-width
2154
+ */
2155
+ "border-w-b": [{
2156
+ "border-b": scaleBorderWidth()
2157
+ }],
2158
+ /**
2159
+ * Border Width Left
2160
+ * @see https://tailwindcss.com/docs/border-width
2161
+ */
2162
+ "border-w-l": [{
2163
+ "border-l": scaleBorderWidth()
2164
+ }],
2165
+ /**
2166
+ * Divide Width X
2167
+ * @see https://tailwindcss.com/docs/border-width#between-children
2168
+ */
2169
+ "divide-x": [{
2170
+ "divide-x": scaleBorderWidth()
2171
+ }],
2172
+ /**
2173
+ * Divide Width X Reverse
2174
+ * @see https://tailwindcss.com/docs/border-width#between-children
2175
+ */
2176
+ "divide-x-reverse": ["divide-x-reverse"],
2177
+ /**
2178
+ * Divide Width Y
2179
+ * @see https://tailwindcss.com/docs/border-width#between-children
2180
+ */
2181
+ "divide-y": [{
2182
+ "divide-y": scaleBorderWidth()
2183
+ }],
2184
+ /**
2185
+ * Divide Width Y Reverse
2186
+ * @see https://tailwindcss.com/docs/border-width#between-children
2187
+ */
2188
+ "divide-y-reverse": ["divide-y-reverse"],
2189
+ /**
2190
+ * Border Style
2191
+ * @see https://tailwindcss.com/docs/border-style
2192
+ */
2193
+ "border-style": [{
2194
+ border: [...scaleLineStyle(), "hidden", "none"]
2195
+ }],
2196
+ /**
2197
+ * Divide Style
2198
+ * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style
2199
+ */
2200
+ "divide-style": [{
2201
+ divide: [...scaleLineStyle(), "hidden", "none"]
2202
+ }],
2203
+ /**
2204
+ * Border Color
2205
+ * @see https://tailwindcss.com/docs/border-color
2206
+ */
2207
+ "border-color": [{
2208
+ border: scaleColor()
2209
+ }],
2210
+ /**
2211
+ * Border Color Inline
2212
+ * @see https://tailwindcss.com/docs/border-color
2213
+ */
2214
+ "border-color-x": [{
2215
+ "border-x": scaleColor()
2216
+ }],
2217
+ /**
2218
+ * Border Color Block
2219
+ * @see https://tailwindcss.com/docs/border-color
2220
+ */
2221
+ "border-color-y": [{
2222
+ "border-y": scaleColor()
2223
+ }],
2224
+ /**
2225
+ * Border Color Inline Start
2226
+ * @see https://tailwindcss.com/docs/border-color
2227
+ */
2228
+ "border-color-s": [{
2229
+ "border-s": scaleColor()
2230
+ }],
2231
+ /**
2232
+ * Border Color Inline End
2233
+ * @see https://tailwindcss.com/docs/border-color
2234
+ */
2235
+ "border-color-e": [{
2236
+ "border-e": scaleColor()
2237
+ }],
2238
+ /**
2239
+ * Border Color Block Start
2240
+ * @see https://tailwindcss.com/docs/border-color
2241
+ */
2242
+ "border-color-bs": [{
2243
+ "border-bs": scaleColor()
2244
+ }],
2245
+ /**
2246
+ * Border Color Block End
2247
+ * @see https://tailwindcss.com/docs/border-color
2248
+ */
2249
+ "border-color-be": [{
2250
+ "border-be": scaleColor()
2251
+ }],
2252
+ /**
2253
+ * Border Color Top
2254
+ * @see https://tailwindcss.com/docs/border-color
2255
+ */
2256
+ "border-color-t": [{
2257
+ "border-t": scaleColor()
2258
+ }],
2259
+ /**
2260
+ * Border Color Right
2261
+ * @see https://tailwindcss.com/docs/border-color
2262
+ */
2263
+ "border-color-r": [{
2264
+ "border-r": scaleColor()
2265
+ }],
2266
+ /**
2267
+ * Border Color Bottom
2268
+ * @see https://tailwindcss.com/docs/border-color
2269
+ */
2270
+ "border-color-b": [{
2271
+ "border-b": scaleColor()
2272
+ }],
2273
+ /**
2274
+ * Border Color Left
2275
+ * @see https://tailwindcss.com/docs/border-color
2276
+ */
2277
+ "border-color-l": [{
2278
+ "border-l": scaleColor()
2279
+ }],
2280
+ /**
2281
+ * Divide Color
2282
+ * @see https://tailwindcss.com/docs/divide-color
2283
+ */
2284
+ "divide-color": [{
2285
+ divide: scaleColor()
2286
+ }],
2287
+ /**
2288
+ * Outline Style
2289
+ * @see https://tailwindcss.com/docs/outline-style
2290
+ */
2291
+ "outline-style": [{
2292
+ outline: [...scaleLineStyle(), "none", "hidden"]
2293
+ }],
2294
+ /**
2295
+ * Outline Offset
2296
+ * @see https://tailwindcss.com/docs/outline-offset
2297
+ */
2298
+ "outline-offset": [{
2299
+ "outline-offset": [isNumber, isArbitraryVariable, isArbitraryValue]
2300
+ }],
2301
+ /**
2302
+ * Outline Width
2303
+ * @see https://tailwindcss.com/docs/outline-width
2304
+ */
2305
+ "outline-w": [{
2306
+ outline: ["", isNumber, isArbitraryVariableLength, isArbitraryLength]
2307
+ }],
2308
+ /**
2309
+ * Outline Color
2310
+ * @see https://tailwindcss.com/docs/outline-color
2311
+ */
2312
+ "outline-color": [{
2313
+ outline: scaleColor()
2314
+ }],
2315
+ // ---------------
2316
+ // --- Effects ---
2317
+ // ---------------
2318
+ /**
2319
+ * Box Shadow
2320
+ * @see https://tailwindcss.com/docs/box-shadow
2321
+ */
2322
+ shadow: [{
2323
+ shadow: [
2324
+ // Deprecated since Tailwind CSS v4.0.0
2325
+ "",
2326
+ "none",
2327
+ themeShadow,
2328
+ isArbitraryVariableShadow,
2329
+ isArbitraryShadow
2330
+ ]
2331
+ }],
2332
+ /**
2333
+ * Box Shadow Color
2334
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color
2335
+ */
2336
+ "shadow-color": [{
2337
+ shadow: scaleColor()
2338
+ }],
2339
+ /**
2340
+ * Inset Box Shadow
2341
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow
2342
+ */
2343
+ "inset-shadow": [{
2344
+ "inset-shadow": ["none", themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]
2345
+ }],
2346
+ /**
2347
+ * Inset Box Shadow Color
2348
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color
2349
+ */
2350
+ "inset-shadow-color": [{
2351
+ "inset-shadow": scaleColor()
2352
+ }],
2353
+ /**
2354
+ * Ring Width
2355
+ * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring
2356
+ */
2357
+ "ring-w": [{
2358
+ ring: scaleBorderWidth()
2359
+ }],
2360
+ /**
2361
+ * Ring Width Inset
2362
+ * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings
2363
+ * @deprecated since Tailwind CSS v4.0.0
2364
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2365
+ */
2366
+ "ring-w-inset": ["ring-inset"],
2367
+ /**
2368
+ * Ring Color
2369
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color
2370
+ */
2371
+ "ring-color": [{
2372
+ ring: scaleColor()
2373
+ }],
2374
+ /**
2375
+ * Ring Offset Width
2376
+ * @see https://v3.tailwindcss.com/docs/ring-offset-width
2377
+ * @deprecated since Tailwind CSS v4.0.0
2378
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2379
+ */
2380
+ "ring-offset-w": [{
2381
+ "ring-offset": [isNumber, isArbitraryLength]
2382
+ }],
2383
+ /**
2384
+ * Ring Offset Color
2385
+ * @see https://v3.tailwindcss.com/docs/ring-offset-color
2386
+ * @deprecated since Tailwind CSS v4.0.0
2387
+ * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158
2388
+ */
2389
+ "ring-offset-color": [{
2390
+ "ring-offset": scaleColor()
2391
+ }],
2392
+ /**
2393
+ * Inset Ring Width
2394
+ * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring
2395
+ */
2396
+ "inset-ring-w": [{
2397
+ "inset-ring": scaleBorderWidth()
2398
+ }],
2399
+ /**
2400
+ * Inset Ring Color
2401
+ * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color
2402
+ */
2403
+ "inset-ring-color": [{
2404
+ "inset-ring": scaleColor()
2405
+ }],
2406
+ /**
2407
+ * Text Shadow
2408
+ * @see https://tailwindcss.com/docs/text-shadow
2409
+ */
2410
+ "text-shadow": [{
2411
+ "text-shadow": ["none", themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]
2412
+ }],
2413
+ /**
2414
+ * Text Shadow Color
2415
+ * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color
2416
+ */
2417
+ "text-shadow-color": [{
2418
+ "text-shadow": scaleColor()
2419
+ }],
2420
+ /**
2421
+ * Opacity
2422
+ * @see https://tailwindcss.com/docs/opacity
2423
+ */
2424
+ opacity: [{
2425
+ opacity: [isNumber, isArbitraryVariable, isArbitraryValue]
2426
+ }],
2427
+ /**
2428
+ * Mix Blend Mode
2429
+ * @see https://tailwindcss.com/docs/mix-blend-mode
2430
+ */
2431
+ "mix-blend": [{
2432
+ "mix-blend": [...scaleBlendMode(), "plus-darker", "plus-lighter"]
2433
+ }],
2434
+ /**
2435
+ * Background Blend Mode
2436
+ * @see https://tailwindcss.com/docs/background-blend-mode
2437
+ */
2438
+ "bg-blend": [{
2439
+ "bg-blend": scaleBlendMode()
2440
+ }],
2441
+ /**
2442
+ * Mask Clip
2443
+ * @see https://tailwindcss.com/docs/mask-clip
2444
+ */
2445
+ "mask-clip": [{
2446
+ "mask-clip": ["border", "padding", "content", "fill", "stroke", "view"]
2447
+ }, "mask-no-clip"],
2448
+ /**
2449
+ * Mask Composite
2450
+ * @see https://tailwindcss.com/docs/mask-composite
2451
+ */
2452
+ "mask-composite": [{
2453
+ mask: ["add", "subtract", "intersect", "exclude"]
2454
+ }],
2455
+ /**
2456
+ * Mask Image
2457
+ * @see https://tailwindcss.com/docs/mask-image
2458
+ */
2459
+ "mask-image-linear-pos": [{
2460
+ "mask-linear": [isNumber]
2461
+ }],
2462
+ "mask-image-linear-from-pos": [{
2463
+ "mask-linear-from": scaleMaskImagePosition()
2464
+ }],
2465
+ "mask-image-linear-to-pos": [{
2466
+ "mask-linear-to": scaleMaskImagePosition()
2467
+ }],
2468
+ "mask-image-linear-from-color": [{
2469
+ "mask-linear-from": scaleColor()
2470
+ }],
2471
+ "mask-image-linear-to-color": [{
2472
+ "mask-linear-to": scaleColor()
2473
+ }],
2474
+ "mask-image-t-from-pos": [{
2475
+ "mask-t-from": scaleMaskImagePosition()
2476
+ }],
2477
+ "mask-image-t-to-pos": [{
2478
+ "mask-t-to": scaleMaskImagePosition()
2479
+ }],
2480
+ "mask-image-t-from-color": [{
2481
+ "mask-t-from": scaleColor()
2482
+ }],
2483
+ "mask-image-t-to-color": [{
2484
+ "mask-t-to": scaleColor()
2485
+ }],
2486
+ "mask-image-r-from-pos": [{
2487
+ "mask-r-from": scaleMaskImagePosition()
2488
+ }],
2489
+ "mask-image-r-to-pos": [{
2490
+ "mask-r-to": scaleMaskImagePosition()
2491
+ }],
2492
+ "mask-image-r-from-color": [{
2493
+ "mask-r-from": scaleColor()
2494
+ }],
2495
+ "mask-image-r-to-color": [{
2496
+ "mask-r-to": scaleColor()
2497
+ }],
2498
+ "mask-image-b-from-pos": [{
2499
+ "mask-b-from": scaleMaskImagePosition()
2500
+ }],
2501
+ "mask-image-b-to-pos": [{
2502
+ "mask-b-to": scaleMaskImagePosition()
2503
+ }],
2504
+ "mask-image-b-from-color": [{
2505
+ "mask-b-from": scaleColor()
2506
+ }],
2507
+ "mask-image-b-to-color": [{
2508
+ "mask-b-to": scaleColor()
2509
+ }],
2510
+ "mask-image-l-from-pos": [{
2511
+ "mask-l-from": scaleMaskImagePosition()
2512
+ }],
2513
+ "mask-image-l-to-pos": [{
2514
+ "mask-l-to": scaleMaskImagePosition()
2515
+ }],
2516
+ "mask-image-l-from-color": [{
2517
+ "mask-l-from": scaleColor()
2518
+ }],
2519
+ "mask-image-l-to-color": [{
2520
+ "mask-l-to": scaleColor()
2521
+ }],
2522
+ "mask-image-x-from-pos": [{
2523
+ "mask-x-from": scaleMaskImagePosition()
2524
+ }],
2525
+ "mask-image-x-to-pos": [{
2526
+ "mask-x-to": scaleMaskImagePosition()
2527
+ }],
2528
+ "mask-image-x-from-color": [{
2529
+ "mask-x-from": scaleColor()
2530
+ }],
2531
+ "mask-image-x-to-color": [{
2532
+ "mask-x-to": scaleColor()
2533
+ }],
2534
+ "mask-image-y-from-pos": [{
2535
+ "mask-y-from": scaleMaskImagePosition()
2536
+ }],
2537
+ "mask-image-y-to-pos": [{
2538
+ "mask-y-to": scaleMaskImagePosition()
2539
+ }],
2540
+ "mask-image-y-from-color": [{
2541
+ "mask-y-from": scaleColor()
2542
+ }],
2543
+ "mask-image-y-to-color": [{
2544
+ "mask-y-to": scaleColor()
2545
+ }],
2546
+ "mask-image-radial": [{
2547
+ "mask-radial": [isArbitraryVariable, isArbitraryValue]
2548
+ }],
2549
+ "mask-image-radial-from-pos": [{
2550
+ "mask-radial-from": scaleMaskImagePosition()
2551
+ }],
2552
+ "mask-image-radial-to-pos": [{
2553
+ "mask-radial-to": scaleMaskImagePosition()
2554
+ }],
2555
+ "mask-image-radial-from-color": [{
2556
+ "mask-radial-from": scaleColor()
2557
+ }],
2558
+ "mask-image-radial-to-color": [{
2559
+ "mask-radial-to": scaleColor()
2560
+ }],
2561
+ "mask-image-radial-shape": [{
2562
+ "mask-radial": ["circle", "ellipse"]
2563
+ }],
2564
+ "mask-image-radial-size": [{
2565
+ "mask-radial": [{
2566
+ closest: ["side", "corner"],
2567
+ farthest: ["side", "corner"]
2568
+ }]
2569
+ }],
2570
+ "mask-image-radial-pos": [{
2571
+ "mask-radial-at": scalePosition()
2572
+ }],
2573
+ "mask-image-conic-pos": [{
2574
+ "mask-conic": [isNumber]
2575
+ }],
2576
+ "mask-image-conic-from-pos": [{
2577
+ "mask-conic-from": scaleMaskImagePosition()
2578
+ }],
2579
+ "mask-image-conic-to-pos": [{
2580
+ "mask-conic-to": scaleMaskImagePosition()
2581
+ }],
2582
+ "mask-image-conic-from-color": [{
2583
+ "mask-conic-from": scaleColor()
2584
+ }],
2585
+ "mask-image-conic-to-color": [{
2586
+ "mask-conic-to": scaleColor()
2587
+ }],
2588
+ /**
2589
+ * Mask Mode
2590
+ * @see https://tailwindcss.com/docs/mask-mode
2591
+ */
2592
+ "mask-mode": [{
2593
+ mask: ["alpha", "luminance", "match"]
2594
+ }],
2595
+ /**
2596
+ * Mask Origin
2597
+ * @see https://tailwindcss.com/docs/mask-origin
2598
+ */
2599
+ "mask-origin": [{
2600
+ "mask-origin": ["border", "padding", "content", "fill", "stroke", "view"]
2601
+ }],
2602
+ /**
2603
+ * Mask Position
2604
+ * @see https://tailwindcss.com/docs/mask-position
2605
+ */
2606
+ "mask-position": [{
2607
+ mask: scaleBgPosition()
2608
+ }],
2609
+ /**
2610
+ * Mask Repeat
2611
+ * @see https://tailwindcss.com/docs/mask-repeat
2612
+ */
2613
+ "mask-repeat": [{
2614
+ mask: scaleBgRepeat()
2615
+ }],
2616
+ /**
2617
+ * Mask Size
2618
+ * @see https://tailwindcss.com/docs/mask-size
2619
+ */
2620
+ "mask-size": [{
2621
+ mask: scaleBgSize()
2622
+ }],
2623
+ /**
2624
+ * Mask Type
2625
+ * @see https://tailwindcss.com/docs/mask-type
2626
+ */
2627
+ "mask-type": [{
2628
+ "mask-type": ["alpha", "luminance"]
2629
+ }],
2630
+ /**
2631
+ * Mask Image
2632
+ * @see https://tailwindcss.com/docs/mask-image
2633
+ */
2634
+ "mask-image": [{
2635
+ mask: ["none", isArbitraryVariable, isArbitraryValue]
2636
+ }],
2637
+ // ---------------
2638
+ // --- Filters ---
2639
+ // ---------------
2640
+ /**
2641
+ * Filter
2642
+ * @see https://tailwindcss.com/docs/filter
2643
+ */
2644
+ filter: [{
2645
+ filter: [
2646
+ // Deprecated since Tailwind CSS v3.0.0
2647
+ "",
2648
+ "none",
2649
+ isArbitraryVariable,
2650
+ isArbitraryValue
2651
+ ]
2652
+ }],
2653
+ /**
2654
+ * Blur
2655
+ * @see https://tailwindcss.com/docs/blur
2656
+ */
2657
+ blur: [{
2658
+ blur: scaleBlur()
2659
+ }],
2660
+ /**
2661
+ * Brightness
2662
+ * @see https://tailwindcss.com/docs/brightness
2663
+ */
2664
+ brightness: [{
2665
+ brightness: [isNumber, isArbitraryVariable, isArbitraryValue]
2666
+ }],
2667
+ /**
2668
+ * Contrast
2669
+ * @see https://tailwindcss.com/docs/contrast
2670
+ */
2671
+ contrast: [{
2672
+ contrast: [isNumber, isArbitraryVariable, isArbitraryValue]
2673
+ }],
2674
+ /**
2675
+ * Drop Shadow
2676
+ * @see https://tailwindcss.com/docs/drop-shadow
2677
+ */
2678
+ "drop-shadow": [{
2679
+ "drop-shadow": [
2680
+ // Deprecated since Tailwind CSS v4.0.0
2681
+ "",
2682
+ "none",
2683
+ themeDropShadow,
2684
+ isArbitraryVariableShadow,
2685
+ isArbitraryShadow
2686
+ ]
2687
+ }],
2688
+ /**
2689
+ * Drop Shadow Color
2690
+ * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color
2691
+ */
2692
+ "drop-shadow-color": [{
2693
+ "drop-shadow": scaleColor()
2694
+ }],
2695
+ /**
2696
+ * Grayscale
2697
+ * @see https://tailwindcss.com/docs/grayscale
2698
+ */
2699
+ grayscale: [{
2700
+ grayscale: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2701
+ }],
2702
+ /**
2703
+ * Hue Rotate
2704
+ * @see https://tailwindcss.com/docs/hue-rotate
2705
+ */
2706
+ "hue-rotate": [{
2707
+ "hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2708
+ }],
2709
+ /**
2710
+ * Invert
2711
+ * @see https://tailwindcss.com/docs/invert
2712
+ */
2713
+ invert: [{
2714
+ invert: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2715
+ }],
2716
+ /**
2717
+ * Saturate
2718
+ * @see https://tailwindcss.com/docs/saturate
2719
+ */
2720
+ saturate: [{
2721
+ saturate: [isNumber, isArbitraryVariable, isArbitraryValue]
2722
+ }],
2723
+ /**
2724
+ * Sepia
2725
+ * @see https://tailwindcss.com/docs/sepia
2726
+ */
2727
+ sepia: [{
2728
+ sepia: ["", isNumber, isArbitraryVariable, isArbitraryValue]
2729
+ }],
2730
+ /**
2731
+ * Backdrop Filter
2732
+ * @see https://tailwindcss.com/docs/backdrop-filter
2733
+ */
2734
+ "backdrop-filter": [{
2735
+ "backdrop-filter": [
2736
+ // Deprecated since Tailwind CSS v3.0.0
2737
+ "",
2738
+ "none",
2739
+ isArbitraryVariable,
2740
+ isArbitraryValue
2741
+ ]
2742
+ }],
2743
+ /**
2744
+ * Backdrop Blur
2745
+ * @see https://tailwindcss.com/docs/backdrop-blur
2746
+ */
2747
+ "backdrop-blur": [{
2748
+ "backdrop-blur": scaleBlur()
2749
+ }],
2750
+ /**
2751
+ * Backdrop Brightness
2752
+ * @see https://tailwindcss.com/docs/backdrop-brightness
2753
+ */
2754
+ "backdrop-brightness": [{
2755
+ "backdrop-brightness": [isNumber, isArbitraryVariable, isArbitraryValue]
2756
+ }],
2757
+ /**
2758
+ * Backdrop Contrast
2759
+ * @see https://tailwindcss.com/docs/backdrop-contrast
2760
+ */
2761
+ "backdrop-contrast": [{
2762
+ "backdrop-contrast": [isNumber, isArbitraryVariable, isArbitraryValue]
2763
+ }],
2764
+ /**
2765
+ * Backdrop Grayscale
2766
+ * @see https://tailwindcss.com/docs/backdrop-grayscale
2767
+ */
2768
+ "backdrop-grayscale": [{
2769
+ "backdrop-grayscale": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2770
+ }],
2771
+ /**
2772
+ * Backdrop Hue Rotate
2773
+ * @see https://tailwindcss.com/docs/backdrop-hue-rotate
2774
+ */
2775
+ "backdrop-hue-rotate": [{
2776
+ "backdrop-hue-rotate": [isNumber, isArbitraryVariable, isArbitraryValue]
2777
+ }],
2778
+ /**
2779
+ * Backdrop Invert
2780
+ * @see https://tailwindcss.com/docs/backdrop-invert
2781
+ */
2782
+ "backdrop-invert": [{
2783
+ "backdrop-invert": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2784
+ }],
2785
+ /**
2786
+ * Backdrop Opacity
2787
+ * @see https://tailwindcss.com/docs/backdrop-opacity
2788
+ */
2789
+ "backdrop-opacity": [{
2790
+ "backdrop-opacity": [isNumber, isArbitraryVariable, isArbitraryValue]
2791
+ }],
2792
+ /**
2793
+ * Backdrop Saturate
2794
+ * @see https://tailwindcss.com/docs/backdrop-saturate
2795
+ */
2796
+ "backdrop-saturate": [{
2797
+ "backdrop-saturate": [isNumber, isArbitraryVariable, isArbitraryValue]
2798
+ }],
2799
+ /**
2800
+ * Backdrop Sepia
2801
+ * @see https://tailwindcss.com/docs/backdrop-sepia
2802
+ */
2803
+ "backdrop-sepia": [{
2804
+ "backdrop-sepia": ["", isNumber, isArbitraryVariable, isArbitraryValue]
2805
+ }],
2806
+ // --------------
2807
+ // --- Tables ---
2808
+ // --------------
2809
+ /**
2810
+ * Border Collapse
2811
+ * @see https://tailwindcss.com/docs/border-collapse
2812
+ */
2813
+ "border-collapse": [{
2814
+ border: ["collapse", "separate"]
2815
+ }],
2816
+ /**
2817
+ * Border Spacing
2818
+ * @see https://tailwindcss.com/docs/border-spacing
2819
+ */
2820
+ "border-spacing": [{
2821
+ "border-spacing": scaleUnambiguousSpacing()
2822
+ }],
2823
+ /**
2824
+ * Border Spacing X
2825
+ * @see https://tailwindcss.com/docs/border-spacing
2826
+ */
2827
+ "border-spacing-x": [{
2828
+ "border-spacing-x": scaleUnambiguousSpacing()
2829
+ }],
2830
+ /**
2831
+ * Border Spacing Y
2832
+ * @see https://tailwindcss.com/docs/border-spacing
2833
+ */
2834
+ "border-spacing-y": [{
2835
+ "border-spacing-y": scaleUnambiguousSpacing()
2836
+ }],
2837
+ /**
2838
+ * Table Layout
2839
+ * @see https://tailwindcss.com/docs/table-layout
2840
+ */
2841
+ "table-layout": [{
2842
+ table: ["auto", "fixed"]
2843
+ }],
2844
+ /**
2845
+ * Caption Side
2846
+ * @see https://tailwindcss.com/docs/caption-side
2847
+ */
2848
+ caption: [{
2849
+ caption: ["top", "bottom"]
2850
+ }],
2851
+ // ---------------------------------
2852
+ // --- Transitions and Animation ---
2853
+ // ---------------------------------
2854
+ /**
2855
+ * Transition Property
2856
+ * @see https://tailwindcss.com/docs/transition-property
2857
+ */
2858
+ transition: [{
2859
+ transition: ["", "all", "colors", "opacity", "shadow", "transform", "none", isArbitraryVariable, isArbitraryValue]
2860
+ }],
2861
+ /**
2862
+ * Transition Behavior
2863
+ * @see https://tailwindcss.com/docs/transition-behavior
2864
+ */
2865
+ "transition-behavior": [{
2866
+ transition: ["normal", "discrete"]
2867
+ }],
2868
+ /**
2869
+ * Transition Duration
2870
+ * @see https://tailwindcss.com/docs/transition-duration
2871
+ */
2872
+ duration: [{
2873
+ duration: [isNumber, "initial", isArbitraryVariable, isArbitraryValue]
2874
+ }],
2875
+ /**
2876
+ * Transition Timing Function
2877
+ * @see https://tailwindcss.com/docs/transition-timing-function
2878
+ */
2879
+ ease: [{
2880
+ ease: ["linear", "initial", themeEase, isArbitraryVariable, isArbitraryValue]
2881
+ }],
2882
+ /**
2883
+ * Transition Delay
2884
+ * @see https://tailwindcss.com/docs/transition-delay
2885
+ */
2886
+ delay: [{
2887
+ delay: [isNumber, isArbitraryVariable, isArbitraryValue]
2888
+ }],
2889
+ /**
2890
+ * Animation
2891
+ * @see https://tailwindcss.com/docs/animation
2892
+ */
2893
+ animate: [{
2894
+ animate: ["none", themeAnimate, isArbitraryVariable, isArbitraryValue]
2895
+ }],
2896
+ // ------------------
2897
+ // --- Transforms ---
2898
+ // ------------------
2899
+ /**
2900
+ * Backface Visibility
2901
+ * @see https://tailwindcss.com/docs/backface-visibility
2902
+ */
2903
+ backface: [{
2904
+ backface: ["hidden", "visible"]
2905
+ }],
2906
+ /**
2907
+ * Perspective
2908
+ * @see https://tailwindcss.com/docs/perspective
2909
+ */
2910
+ perspective: [{
2911
+ perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]
2912
+ }],
2913
+ /**
2914
+ * Perspective Origin
2915
+ * @see https://tailwindcss.com/docs/perspective-origin
2916
+ */
2917
+ "perspective-origin": [{
2918
+ "perspective-origin": scalePositionWithArbitrary()
2919
+ }],
2920
+ /**
2921
+ * Rotate
2922
+ * @see https://tailwindcss.com/docs/rotate
2923
+ */
2924
+ rotate: [{
2925
+ rotate: scaleRotate()
2926
+ }],
2927
+ /**
2928
+ * Rotate X
2929
+ * @see https://tailwindcss.com/docs/rotate
2930
+ */
2931
+ "rotate-x": [{
2932
+ "rotate-x": scaleRotate()
2933
+ }],
2934
+ /**
2935
+ * Rotate Y
2936
+ * @see https://tailwindcss.com/docs/rotate
2937
+ */
2938
+ "rotate-y": [{
2939
+ "rotate-y": scaleRotate()
2940
+ }],
2941
+ /**
2942
+ * Rotate Z
2943
+ * @see https://tailwindcss.com/docs/rotate
2944
+ */
2945
+ "rotate-z": [{
2946
+ "rotate-z": scaleRotate()
2947
+ }],
2948
+ /**
2949
+ * Scale
2950
+ * @see https://tailwindcss.com/docs/scale
2951
+ */
2952
+ scale: [{
2953
+ scale: scaleScale()
2954
+ }],
2955
+ /**
2956
+ * Scale X
2957
+ * @see https://tailwindcss.com/docs/scale
2958
+ */
2959
+ "scale-x": [{
2960
+ "scale-x": scaleScale()
2961
+ }],
2962
+ /**
2963
+ * Scale Y
2964
+ * @see https://tailwindcss.com/docs/scale
2965
+ */
2966
+ "scale-y": [{
2967
+ "scale-y": scaleScale()
2968
+ }],
2969
+ /**
2970
+ * Scale Z
2971
+ * @see https://tailwindcss.com/docs/scale
2972
+ */
2973
+ "scale-z": [{
2974
+ "scale-z": scaleScale()
2975
+ }],
2976
+ /**
2977
+ * Scale 3D
2978
+ * @see https://tailwindcss.com/docs/scale
2979
+ */
2980
+ "scale-3d": ["scale-3d"],
2981
+ /**
2982
+ * Skew
2983
+ * @see https://tailwindcss.com/docs/skew
2984
+ */
2985
+ skew: [{
2986
+ skew: scaleSkew()
2987
+ }],
2988
+ /**
2989
+ * Skew X
2990
+ * @see https://tailwindcss.com/docs/skew
2991
+ */
2992
+ "skew-x": [{
2993
+ "skew-x": scaleSkew()
2994
+ }],
2995
+ /**
2996
+ * Skew Y
2997
+ * @see https://tailwindcss.com/docs/skew
2998
+ */
2999
+ "skew-y": [{
3000
+ "skew-y": scaleSkew()
3001
+ }],
3002
+ /**
3003
+ * Transform
3004
+ * @see https://tailwindcss.com/docs/transform
3005
+ */
3006
+ transform: [{
3007
+ transform: [isArbitraryVariable, isArbitraryValue, "", "none", "gpu", "cpu"]
3008
+ }],
3009
+ /**
3010
+ * Transform Origin
3011
+ * @see https://tailwindcss.com/docs/transform-origin
3012
+ */
3013
+ "transform-origin": [{
3014
+ origin: scalePositionWithArbitrary()
3015
+ }],
3016
+ /**
3017
+ * Transform Style
3018
+ * @see https://tailwindcss.com/docs/transform-style
3019
+ */
3020
+ "transform-style": [{
3021
+ transform: ["3d", "flat"]
3022
+ }],
3023
+ /**
3024
+ * Translate
3025
+ * @see https://tailwindcss.com/docs/translate
3026
+ */
3027
+ translate: [{
3028
+ translate: scaleTranslate()
3029
+ }],
3030
+ /**
3031
+ * Translate X
3032
+ * @see https://tailwindcss.com/docs/translate
3033
+ */
3034
+ "translate-x": [{
3035
+ "translate-x": scaleTranslate()
3036
+ }],
3037
+ /**
3038
+ * Translate Y
3039
+ * @see https://tailwindcss.com/docs/translate
3040
+ */
3041
+ "translate-y": [{
3042
+ "translate-y": scaleTranslate()
3043
+ }],
3044
+ /**
3045
+ * Translate Z
3046
+ * @see https://tailwindcss.com/docs/translate
3047
+ */
3048
+ "translate-z": [{
3049
+ "translate-z": scaleTranslate()
3050
+ }],
3051
+ /**
3052
+ * Translate None
3053
+ * @see https://tailwindcss.com/docs/translate
3054
+ */
3055
+ "translate-none": ["translate-none"],
3056
+ // ---------------------
3057
+ // --- Interactivity ---
3058
+ // ---------------------
3059
+ /**
3060
+ * Accent Color
3061
+ * @see https://tailwindcss.com/docs/accent-color
3062
+ */
3063
+ accent: [{
3064
+ accent: scaleColor()
3065
+ }],
3066
+ /**
3067
+ * Appearance
3068
+ * @see https://tailwindcss.com/docs/appearance
3069
+ */
3070
+ appearance: [{
3071
+ appearance: ["none", "auto"]
3072
+ }],
3073
+ /**
3074
+ * Caret Color
3075
+ * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities
3076
+ */
3077
+ "caret-color": [{
3078
+ caret: scaleColor()
3079
+ }],
3080
+ /**
3081
+ * Color Scheme
3082
+ * @see https://tailwindcss.com/docs/color-scheme
3083
+ */
3084
+ "color-scheme": [{
3085
+ scheme: ["normal", "dark", "light", "light-dark", "only-dark", "only-light"]
3086
+ }],
3087
+ /**
3088
+ * Cursor
3089
+ * @see https://tailwindcss.com/docs/cursor
3090
+ */
3091
+ cursor: [{
3092
+ 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]
3093
+ }],
3094
+ /**
3095
+ * Field Sizing
3096
+ * @see https://tailwindcss.com/docs/field-sizing
3097
+ */
3098
+ "field-sizing": [{
3099
+ "field-sizing": ["fixed", "content"]
3100
+ }],
3101
+ /**
3102
+ * Pointer Events
3103
+ * @see https://tailwindcss.com/docs/pointer-events
3104
+ */
3105
+ "pointer-events": [{
3106
+ "pointer-events": ["auto", "none"]
3107
+ }],
3108
+ /**
3109
+ * Resize
3110
+ * @see https://tailwindcss.com/docs/resize
3111
+ */
3112
+ resize: [{
3113
+ resize: ["none", "", "y", "x"]
3114
+ }],
3115
+ /**
3116
+ * Scroll Behavior
3117
+ * @see https://tailwindcss.com/docs/scroll-behavior
3118
+ */
3119
+ "scroll-behavior": [{
3120
+ scroll: ["auto", "smooth"]
3121
+ }],
3122
+ /**
3123
+ * Scroll Margin
3124
+ * @see https://tailwindcss.com/docs/scroll-margin
3125
+ */
3126
+ "scroll-m": [{
3127
+ "scroll-m": scaleUnambiguousSpacing()
3128
+ }],
3129
+ /**
3130
+ * Scroll Margin Inline
3131
+ * @see https://tailwindcss.com/docs/scroll-margin
3132
+ */
3133
+ "scroll-mx": [{
3134
+ "scroll-mx": scaleUnambiguousSpacing()
3135
+ }],
3136
+ /**
3137
+ * Scroll Margin Block
3138
+ * @see https://tailwindcss.com/docs/scroll-margin
3139
+ */
3140
+ "scroll-my": [{
3141
+ "scroll-my": scaleUnambiguousSpacing()
3142
+ }],
3143
+ /**
3144
+ * Scroll Margin Inline Start
3145
+ * @see https://tailwindcss.com/docs/scroll-margin
3146
+ */
3147
+ "scroll-ms": [{
3148
+ "scroll-ms": scaleUnambiguousSpacing()
3149
+ }],
3150
+ /**
3151
+ * Scroll Margin Inline End
3152
+ * @see https://tailwindcss.com/docs/scroll-margin
3153
+ */
3154
+ "scroll-me": [{
3155
+ "scroll-me": scaleUnambiguousSpacing()
3156
+ }],
3157
+ /**
3158
+ * Scroll Margin Block Start
3159
+ * @see https://tailwindcss.com/docs/scroll-margin
3160
+ */
3161
+ "scroll-mbs": [{
3162
+ "scroll-mbs": scaleUnambiguousSpacing()
3163
+ }],
3164
+ /**
3165
+ * Scroll Margin Block End
3166
+ * @see https://tailwindcss.com/docs/scroll-margin
3167
+ */
3168
+ "scroll-mbe": [{
3169
+ "scroll-mbe": scaleUnambiguousSpacing()
3170
+ }],
3171
+ /**
3172
+ * Scroll Margin Top
3173
+ * @see https://tailwindcss.com/docs/scroll-margin
3174
+ */
3175
+ "scroll-mt": [{
3176
+ "scroll-mt": scaleUnambiguousSpacing()
3177
+ }],
3178
+ /**
3179
+ * Scroll Margin Right
3180
+ * @see https://tailwindcss.com/docs/scroll-margin
3181
+ */
3182
+ "scroll-mr": [{
3183
+ "scroll-mr": scaleUnambiguousSpacing()
3184
+ }],
3185
+ /**
3186
+ * Scroll Margin Bottom
3187
+ * @see https://tailwindcss.com/docs/scroll-margin
3188
+ */
3189
+ "scroll-mb": [{
3190
+ "scroll-mb": scaleUnambiguousSpacing()
3191
+ }],
3192
+ /**
3193
+ * Scroll Margin Left
3194
+ * @see https://tailwindcss.com/docs/scroll-margin
3195
+ */
3196
+ "scroll-ml": [{
3197
+ "scroll-ml": scaleUnambiguousSpacing()
3198
+ }],
3199
+ /**
3200
+ * Scroll Padding
3201
+ * @see https://tailwindcss.com/docs/scroll-padding
3202
+ */
3203
+ "scroll-p": [{
3204
+ "scroll-p": scaleUnambiguousSpacing()
3205
+ }],
3206
+ /**
3207
+ * Scroll Padding Inline
3208
+ * @see https://tailwindcss.com/docs/scroll-padding
3209
+ */
3210
+ "scroll-px": [{
3211
+ "scroll-px": scaleUnambiguousSpacing()
3212
+ }],
3213
+ /**
3214
+ * Scroll Padding Block
3215
+ * @see https://tailwindcss.com/docs/scroll-padding
3216
+ */
3217
+ "scroll-py": [{
3218
+ "scroll-py": scaleUnambiguousSpacing()
3219
+ }],
3220
+ /**
3221
+ * Scroll Padding Inline Start
3222
+ * @see https://tailwindcss.com/docs/scroll-padding
3223
+ */
3224
+ "scroll-ps": [{
3225
+ "scroll-ps": scaleUnambiguousSpacing()
3226
+ }],
3227
+ /**
3228
+ * Scroll Padding Inline End
3229
+ * @see https://tailwindcss.com/docs/scroll-padding
3230
+ */
3231
+ "scroll-pe": [{
3232
+ "scroll-pe": scaleUnambiguousSpacing()
3233
+ }],
3234
+ /**
3235
+ * Scroll Padding Block Start
3236
+ * @see https://tailwindcss.com/docs/scroll-padding
3237
+ */
3238
+ "scroll-pbs": [{
3239
+ "scroll-pbs": scaleUnambiguousSpacing()
3240
+ }],
3241
+ /**
3242
+ * Scroll Padding Block End
3243
+ * @see https://tailwindcss.com/docs/scroll-padding
3244
+ */
3245
+ "scroll-pbe": [{
3246
+ "scroll-pbe": scaleUnambiguousSpacing()
3247
+ }],
3248
+ /**
3249
+ * Scroll Padding Top
3250
+ * @see https://tailwindcss.com/docs/scroll-padding
3251
+ */
3252
+ "scroll-pt": [{
3253
+ "scroll-pt": scaleUnambiguousSpacing()
3254
+ }],
3255
+ /**
3256
+ * Scroll Padding Right
3257
+ * @see https://tailwindcss.com/docs/scroll-padding
3258
+ */
3259
+ "scroll-pr": [{
3260
+ "scroll-pr": scaleUnambiguousSpacing()
3261
+ }],
3262
+ /**
3263
+ * Scroll Padding Bottom
3264
+ * @see https://tailwindcss.com/docs/scroll-padding
3265
+ */
3266
+ "scroll-pb": [{
3267
+ "scroll-pb": scaleUnambiguousSpacing()
3268
+ }],
3269
+ /**
3270
+ * Scroll Padding Left
3271
+ * @see https://tailwindcss.com/docs/scroll-padding
3272
+ */
3273
+ "scroll-pl": [{
3274
+ "scroll-pl": scaleUnambiguousSpacing()
3275
+ }],
3276
+ /**
3277
+ * Scroll Snap Align
3278
+ * @see https://tailwindcss.com/docs/scroll-snap-align
3279
+ */
3280
+ "snap-align": [{
3281
+ snap: ["start", "end", "center", "align-none"]
3282
+ }],
3283
+ /**
3284
+ * Scroll Snap Stop
3285
+ * @see https://tailwindcss.com/docs/scroll-snap-stop
3286
+ */
3287
+ "snap-stop": [{
3288
+ snap: ["normal", "always"]
3289
+ }],
3290
+ /**
3291
+ * Scroll Snap Type
3292
+ * @see https://tailwindcss.com/docs/scroll-snap-type
3293
+ */
3294
+ "snap-type": [{
3295
+ snap: ["none", "x", "y", "both"]
3296
+ }],
3297
+ /**
3298
+ * Scroll Snap Type Strictness
3299
+ * @see https://tailwindcss.com/docs/scroll-snap-type
3300
+ */
3301
+ "snap-strictness": [{
3302
+ snap: ["mandatory", "proximity"]
3303
+ }],
3304
+ /**
3305
+ * Touch Action
3306
+ * @see https://tailwindcss.com/docs/touch-action
3307
+ */
3308
+ touch: [{
3309
+ touch: ["auto", "none", "manipulation"]
3310
+ }],
3311
+ /**
3312
+ * Touch Action X
3313
+ * @see https://tailwindcss.com/docs/touch-action
3314
+ */
3315
+ "touch-x": [{
3316
+ "touch-pan": ["x", "left", "right"]
3317
+ }],
3318
+ /**
3319
+ * Touch Action Y
3320
+ * @see https://tailwindcss.com/docs/touch-action
3321
+ */
3322
+ "touch-y": [{
3323
+ "touch-pan": ["y", "up", "down"]
3324
+ }],
3325
+ /**
3326
+ * Touch Action Pinch Zoom
3327
+ * @see https://tailwindcss.com/docs/touch-action
3328
+ */
3329
+ "touch-pz": ["touch-pinch-zoom"],
3330
+ /**
3331
+ * User Select
3332
+ * @see https://tailwindcss.com/docs/user-select
3333
+ */
3334
+ select: [{
3335
+ select: ["none", "text", "all", "auto"]
3336
+ }],
3337
+ /**
3338
+ * Will Change
3339
+ * @see https://tailwindcss.com/docs/will-change
3340
+ */
3341
+ "will-change": [{
3342
+ "will-change": ["auto", "scroll", "contents", "transform", isArbitraryVariable, isArbitraryValue]
3343
+ }],
3344
+ // -----------
3345
+ // --- SVG ---
3346
+ // -----------
3347
+ /**
3348
+ * Fill
3349
+ * @see https://tailwindcss.com/docs/fill
3350
+ */
3351
+ fill: [{
3352
+ fill: ["none", ...scaleColor()]
3353
+ }],
3354
+ /**
3355
+ * Stroke Width
3356
+ * @see https://tailwindcss.com/docs/stroke-width
3357
+ */
3358
+ "stroke-w": [{
3359
+ stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]
3360
+ }],
3361
+ /**
3362
+ * Stroke
3363
+ * @see https://tailwindcss.com/docs/stroke
3364
+ */
3365
+ stroke: [{
3366
+ stroke: ["none", ...scaleColor()]
3367
+ }],
3368
+ // ---------------------
3369
+ // --- Accessibility ---
3370
+ // ---------------------
3371
+ /**
3372
+ * Forced Color Adjust
3373
+ * @see https://tailwindcss.com/docs/forced-color-adjust
3374
+ */
3375
+ "forced-color-adjust": [{
3376
+ "forced-color-adjust": ["auto", "none"]
3377
+ }]
3378
+ },
3379
+ conflictingClassGroups: {
3380
+ overflow: ["overflow-x", "overflow-y"],
3381
+ overscroll: ["overscroll-x", "overscroll-y"],
3382
+ inset: ["inset-x", "inset-y", "inset-bs", "inset-be", "start", "end", "top", "right", "bottom", "left"],
3383
+ "inset-x": ["right", "left"],
3384
+ "inset-y": ["top", "bottom"],
3385
+ flex: ["basis", "grow", "shrink"],
3386
+ gap: ["gap-x", "gap-y"],
3387
+ p: ["px", "py", "ps", "pe", "pbs", "pbe", "pt", "pr", "pb", "pl"],
3388
+ px: ["pr", "pl"],
3389
+ py: ["pt", "pb"],
3390
+ m: ["mx", "my", "ms", "me", "mbs", "mbe", "mt", "mr", "mb", "ml"],
3391
+ mx: ["mr", "ml"],
3392
+ my: ["mt", "mb"],
3393
+ size: ["w", "h"],
3394
+ "font-size": ["leading"],
3395
+ "fvn-normal": ["fvn-ordinal", "fvn-slashed-zero", "fvn-figure", "fvn-spacing", "fvn-fraction"],
3396
+ "fvn-ordinal": ["fvn-normal"],
3397
+ "fvn-slashed-zero": ["fvn-normal"],
3398
+ "fvn-figure": ["fvn-normal"],
3399
+ "fvn-spacing": ["fvn-normal"],
3400
+ "fvn-fraction": ["fvn-normal"],
3401
+ "line-clamp": ["display", "overflow"],
3402
+ 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"],
3403
+ "rounded-s": ["rounded-ss", "rounded-es"],
3404
+ "rounded-e": ["rounded-se", "rounded-ee"],
3405
+ "rounded-t": ["rounded-tl", "rounded-tr"],
3406
+ "rounded-r": ["rounded-tr", "rounded-br"],
3407
+ "rounded-b": ["rounded-br", "rounded-bl"],
3408
+ "rounded-l": ["rounded-tl", "rounded-bl"],
3409
+ "border-spacing": ["border-spacing-x", "border-spacing-y"],
3410
+ "border-w": ["border-w-x", "border-w-y", "border-w-s", "border-w-e", "border-w-bs", "border-w-be", "border-w-t", "border-w-r", "border-w-b", "border-w-l"],
3411
+ "border-w-x": ["border-w-r", "border-w-l"],
3412
+ "border-w-y": ["border-w-t", "border-w-b"],
3413
+ "border-color": ["border-color-x", "border-color-y", "border-color-s", "border-color-e", "border-color-bs", "border-color-be", "border-color-t", "border-color-r", "border-color-b", "border-color-l"],
3414
+ "border-color-x": ["border-color-r", "border-color-l"],
3415
+ "border-color-y": ["border-color-t", "border-color-b"],
3416
+ translate: ["translate-x", "translate-y", "translate-none"],
3417
+ "translate-none": ["translate", "translate-x", "translate-y", "translate-z"],
3418
+ "scroll-m": ["scroll-mx", "scroll-my", "scroll-ms", "scroll-me", "scroll-mbs", "scroll-mbe", "scroll-mt", "scroll-mr", "scroll-mb", "scroll-ml"],
3419
+ "scroll-mx": ["scroll-mr", "scroll-ml"],
3420
+ "scroll-my": ["scroll-mt", "scroll-mb"],
3421
+ "scroll-p": ["scroll-px", "scroll-py", "scroll-ps", "scroll-pe", "scroll-pbs", "scroll-pbe", "scroll-pt", "scroll-pr", "scroll-pb", "scroll-pl"],
3422
+ "scroll-px": ["scroll-pr", "scroll-pl"],
3423
+ "scroll-py": ["scroll-pt", "scroll-pb"],
3424
+ touch: ["touch-x", "touch-y", "touch-pz"],
3425
+ "touch-x": ["touch"],
3426
+ "touch-y": ["touch"],
3427
+ "touch-pz": ["touch"]
3428
+ },
3429
+ conflictingClassGroupModifiers: {
3430
+ "font-size": ["leading"]
3431
+ },
3432
+ orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
3433
+ };
3434
+ };
3435
+ var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
3436
+
3437
+ // src/lib/utils.ts
3438
+ function cn2(...inputs) {
3439
+ return twMerge(clsx(inputs));
3440
+ }
3441
+ async function copyToClipboard(text) {
3442
+ const clipboard = typeof navigator !== "undefined" ? navigator.clipboard : void 0;
3443
+ if (clipboard && typeof clipboard.writeText === "function") {
3444
+ try {
3445
+ await clipboard.writeText(text);
3446
+ return true;
3447
+ } catch {
3448
+ }
3449
+ }
3450
+ if (typeof document === "undefined" || typeof document.execCommand !== "function") {
3451
+ return false;
3452
+ }
3453
+ const textarea = document.createElement("textarea");
3454
+ textarea.value = text;
3455
+ textarea.style.position = "fixed";
3456
+ textarea.style.opacity = "0";
3457
+ document.body.appendChild(textarea);
3458
+ textarea.select();
3459
+ try {
3460
+ return document.execCommand("copy");
3461
+ } finally {
3462
+ document.body.removeChild(textarea);
3463
+ }
3464
+ }
3465
+
3466
+ // src/components/PlanUpdateBlock.tsx
3467
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
3468
+ var PLAN_STEP_STATUSES = /* @__PURE__ */ new Set(["pending", "in_progress", "completed"]);
3469
+ var PLAN_AUTO_COLLAPSE_MS = 5e3;
3470
+ function isPlanUpdateTool(toolCall) {
3471
+ return formatToolName(toolCall.name) === "UpdatePlan";
3472
+ }
3473
+ function getPlanUpdateDisplayState(messages) {
3474
+ let current = null;
3475
+ let latestAttempt = null;
3476
+ let latestAttemptStreaming = false;
3477
+ for (const message of messages) {
3478
+ if ((message.loop_name ?? "root") !== "root") continue;
3479
+ for (const toolCall of message.tool_calls ?? []) {
3480
+ if (!isPlanUpdateTool(toolCall)) continue;
3481
+ latestAttempt = toolCall;
3482
+ latestAttemptStreaming = message.status === "streaming";
3483
+ if (toolCall.status === "done" && parsePlanUpdate(toolCall.arguments)) current = toolCall;
3484
+ }
3485
+ }
3486
+ return {
3487
+ current,
3488
+ updating: latestAttempt?.status === "pending" && latestAttemptStreaming
3489
+ };
3490
+ }
3491
+ function parsePlanUpdate(argumentsJson) {
3492
+ try {
3493
+ const raw = JSON.parse(argumentsJson);
3494
+ if (!raw || typeof raw !== "object") return null;
3495
+ const candidate = raw;
3496
+ if (!Array.isArray(candidate.plan)) return null;
3497
+ const plan = candidate.plan.map((item) => {
3498
+ if (!item || typeof item !== "object") return null;
3499
+ const step = item.step;
3500
+ const status = item.status;
3501
+ if (typeof step !== "string" || !step.trim() || typeof status !== "string" || !PLAN_STEP_STATUSES.has(status)) {
3502
+ return null;
3503
+ }
3504
+ return { step: step.trim(), status };
3505
+ });
3506
+ if (plan.some((item) => item === null)) return null;
3507
+ if (plan.filter((item) => item?.status === "in_progress").length > 1) return null;
3508
+ return { plan };
3509
+ } catch {
3510
+ return null;
3511
+ }
3512
+ }
3513
+ function pickCurrentPlanStep(plan) {
3514
+ return plan.find((item) => item.status === "in_progress") ?? plan.find((item) => item.status === "pending") ?? plan[plan.length - 1] ?? null;
3515
+ }
3516
+ function PlanStepIcon({
3517
+ status,
3518
+ size = 17,
3519
+ running = false
3520
+ }) {
3521
+ if (status === "completed") {
3522
+ return /* @__PURE__ */ jsx2(Check, { size, strokeWidth: 2, className: "shrink-0 text-emerald-500" });
3523
+ }
3524
+ if (status === "in_progress") {
3525
+ return running ? /* @__PURE__ */ jsx2(LoaderCircle, { size, className: "shrink-0 animate-spin text-[hsl(var(--muted-foreground))]" }) : /* @__PURE__ */ jsx2(CircleDot, { size, className: "shrink-0 text-amber-500" });
3526
+ }
3527
+ return /* @__PURE__ */ jsx2(Circle, { size, className: "shrink-0 text-[hsl(var(--muted-foreground))]/60" });
3528
+ }
3529
+ function PlanUpdateBlock({
3530
+ toolCall,
3531
+ running = false,
3532
+ autoReveal = false,
3533
+ className
3534
+ }) {
3535
+ const updateKey = `${toolCall.id}:${toolCall.arguments}`;
3536
+ const revealKey = autoReveal ? updateKey : null;
3537
+ const [collapsed, setCollapsed] = useState(!autoReveal);
3538
+ const collapseTimerRef = useRef(null);
3539
+ const data = parsePlanUpdate(toolCall.arguments);
3540
+ useEffect(() => {
3541
+ if (!revealKey) return;
3542
+ if (collapseTimerRef.current) clearTimeout(collapseTimerRef.current);
3543
+ setCollapsed(false);
3544
+ collapseTimerRef.current = setTimeout(() => {
3545
+ setCollapsed(true);
3546
+ collapseTimerRef.current = null;
3547
+ }, PLAN_AUTO_COLLAPSE_MS);
3548
+ }, [revealKey]);
3549
+ useEffect(
3550
+ () => () => {
3551
+ if (collapseTimerRef.current) clearTimeout(collapseTimerRef.current);
3552
+ },
3553
+ []
3554
+ );
3555
+ if (!data) return null;
3556
+ const completed = data.plan.filter((item) => item.status === "completed").length;
3557
+ const currentStep = pickCurrentPlanStep(data.plan);
3558
+ const pausedAtCurrentStep = !running && currentStep?.status === "in_progress";
3559
+ return /* @__PURE__ */ jsxs("section", { part: "plan-block", className: cn2("blade-chat-plan-block overflow-hidden", className), children: [
3560
+ /* @__PURE__ */ jsxs(
3561
+ "button",
3562
+ {
3563
+ type: "button",
3564
+ "aria-expanded": !collapsed,
3565
+ onClick: () => {
3566
+ if (collapseTimerRef.current) {
3567
+ clearTimeout(collapseTimerRef.current);
3568
+ collapseTimerRef.current = null;
3569
+ }
3570
+ setCollapsed((value) => !value);
3571
+ },
3572
+ className: cn2(
3573
+ "flex w-full items-center gap-2 px-3 py-2 text-left transition-colors hover:bg-[hsl(var(--muted)/0.3)]",
3574
+ !collapsed && "border-b border-[hsl(var(--border))]"
3575
+ ),
3576
+ children: [
3577
+ collapsed && currentStep ? /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 text-xs text-[hsl(var(--foreground))]", children: [
3578
+ /* @__PURE__ */ jsx2(PlanStepIcon, { status: currentStep.status, size: 14, running }),
3579
+ /* @__PURE__ */ jsx2("span", { className: "truncate", children: currentStep.step }),
3580
+ pausedAtCurrentStep ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-[11px] text-amber-500", children: "\u5DF2\u6682\u505C" }) : null
3581
+ ] }) : /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
3582
+ /* @__PURE__ */ jsx2(ListChecks, { size: 14, className: "shrink-0", "aria-hidden": "true" }),
3583
+ /* @__PURE__ */ jsx2("span", { className: "truncate", children: "\u4EFB\u52A1\u8FDB\u5EA6" }),
3584
+ pausedAtCurrentStep ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-amber-500", children: "\u5DF2\u6682\u505C" }) : null
3585
+ ] }),
3586
+ /* @__PURE__ */ jsxs("span", { className: "shrink-0 text-[11px] tabular-nums text-[hsl(var(--muted-foreground))]", children: [
3587
+ completed,
3588
+ "/",
3589
+ data.plan.length
3590
+ ] }),
3591
+ /* @__PURE__ */ jsx2(
3592
+ ChevronDown,
3593
+ {
3594
+ size: 14,
3595
+ className: cn2(
3596
+ "shrink-0 text-[hsl(var(--muted-foreground))] transition-transform duration-300 ease-out motion-reduce:transition-none",
3597
+ !collapsed && "rotate-180"
3598
+ )
3599
+ }
3600
+ )
3601
+ ]
3602
+ }
3603
+ ),
3604
+ /* @__PURE__ */ jsx2(
3605
+ "div",
3606
+ {
3607
+ "aria-hidden": collapsed,
3608
+ className: cn2(
3609
+ "grid transition-[grid-template-rows,opacity] duration-300 ease-out motion-reduce:transition-none",
3610
+ collapsed ? "grid-rows-[0fr] opacity-0" : "grid-rows-[1fr] opacity-100"
3611
+ ),
3612
+ children: /* @__PURE__ */ jsx2("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsx2("div", { className: "flex max-h-40 flex-col gap-0.5 overflow-y-auto px-3 py-2", children: data.plan.length === 0 ? /* @__PURE__ */ jsx2("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u6682\u65E0\u4EFB\u52A1\u6B65\u9AA4" }) : data.plan.map((item, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 py-0.5", children: [
3613
+ /* @__PURE__ */ jsx2("span", { className: "mt-[3px] flex shrink-0", children: /* @__PURE__ */ jsx2(PlanStepIcon, { status: item.status, size: 14, running }) }),
3614
+ /* @__PURE__ */ jsx2(
3615
+ "span",
3616
+ {
3617
+ className: cn2(
3618
+ "min-w-0 flex-1 break-words text-[13px] leading-5",
3619
+ item.status === "completed" ? "text-[hsl(var(--muted-foreground))]" : item.status === "in_progress" ? "font-medium text-[hsl(var(--foreground))]" : "text-[hsl(var(--muted-foreground))]"
3620
+ ),
3621
+ children: item.step
3622
+ }
3623
+ )
3624
+ ] }, `${index}-${item.step}`)) }) })
3625
+ }
3626
+ )
3627
+ ] });
3628
+ }
3629
+
3630
+ // src/components/BrowserConnectionDialog.tsx
3631
+ import { useEffect as useEffect2, useRef as useRef2 } from "react";
3632
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
3633
+ function BrowserConnectionDialog({ client, name, label = "\u4E1A\u52A1\u8D26\u53F7", onClose }) {
3634
+ const dialog = useRef2(null);
3635
+ const frame = useRef2(null);
3636
+ const url = new URL(client.connectors.browserAuthorizationUrl(name), window.location.href);
3637
+ url.searchParams.set("embedded", "1");
3638
+ const origin = url.origin;
3639
+ useEffect2(() => {
3640
+ const element = dialog.current;
3641
+ element?.showModal();
3642
+ return () => element?.close();
3643
+ }, []);
3644
+ useEffect2(() => {
3645
+ if (!frame.current) return;
3646
+ return client.connectors.bindBrowserAuthorizationFrame(frame.current, name);
3647
+ }, [client, name]);
3648
+ useEffect2(() => {
3649
+ const receive = (event) => {
3650
+ if (event.origin === origin && event.source === frame.current?.contentWindow && event.data?.type === "blade:connector-auth-close") onClose();
3651
+ };
3652
+ window.addEventListener("message", receive);
3653
+ return () => window.removeEventListener("message", receive);
3654
+ }, [origin, onClose]);
3655
+ return /* @__PURE__ */ jsx3("dialog", { ref: dialog, "aria-label": `\u8FDE\u63A5 ${label}`, onCancel: (event) => {
3656
+ event.preventDefault();
3657
+ onClose();
3658
+ }, className: "fixed inset-0 m-auto h-[min(820px,90dvh)] max-h-none w-[min(960px,calc(100%_-_32px))] max-w-none overflow-hidden rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--background))] p-0 text-[hsl(var(--foreground))] shadow-xl backdrop:bg-black/45", children: /* @__PURE__ */ jsxs2("div", { className: "flex h-full min-h-0 flex-col", children: [
3659
+ /* @__PURE__ */ jsxs2("header", { className: "flex shrink-0 items-center justify-between gap-3 border-b border-[hsl(var(--border))] px-4 py-3", children: [
3660
+ /* @__PURE__ */ jsxs2("h2", { className: "text-sm font-medium", children: [
3661
+ "\u8FDE\u63A5 ",
3662
+ label
3663
+ ] }),
3664
+ /* @__PURE__ */ jsxs2("button", { type: "button", className: "inline-flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--background))] px-3 text-xs font-medium hover:bg-[hsl(var(--accent))]", onClick: onClose, children: [
3665
+ /* @__PURE__ */ jsx3(X, { size: 14, "aria-hidden": "true" }),
3666
+ "\u8FD4\u56DE\u8FDE\u63A5\u5668"
3667
+ ] })
3668
+ ] }),
3669
+ /* @__PURE__ */ jsx3("iframe", { ref: frame, title: `${label}\u767B\u5F55\u9875\u9762`, className: "min-h-0 w-full flex-1 border-0" })
3670
+ ] }) });
3671
+ }
3672
+
3673
+ // src/chat/runtime/session-source.tsx
3674
+ import { createInitialSessionState } from "@blade-hq/agent-client/internal";
3675
+ import {
3676
+ createContext as createContext2,
3677
+ useContext as useContext2,
3678
+ useEffect as useEffect3,
3679
+ useLayoutEffect,
3680
+ useMemo,
3681
+ useRef as useRef3,
3682
+ useState as useState2,
3683
+ useSyncExternalStore
3684
+ } from "react";
3685
+ import { jsx as jsx4 } from "react/jsx-runtime";
3686
+ var EMPTY_SOURCE = {
3687
+ subscribe: () => () => {
3688
+ },
3689
+ getSession: () => void 0,
3690
+ isHistoryLoading: () => false,
3691
+ planRevealRevision: () => 0
3692
+ };
3693
+ var SessionSourceContext = createContext2(EMPTY_SOURCE);
3694
+ function SessionSourceProvider({ source, children }) {
3695
+ return /* @__PURE__ */ jsx4(SessionSourceContext.Provider, { value: source, children });
3696
+ }
3697
+ function useSessionSource() {
3698
+ return useContext2(SessionSourceContext);
3699
+ }
3700
+ var SingleSessionSource = class {
3701
+ session = null;
3702
+ loading = false;
3703
+ listeners = /* @__PURE__ */ new Set();
3704
+ revisions = /* @__PURE__ */ new Map();
3705
+ subscribe = (listener) => {
3706
+ this.listeners.add(listener);
3707
+ return () => {
3708
+ this.listeners.delete(listener);
3709
+ };
3710
+ };
3711
+ getSession = (sessionId) => {
3712
+ const current = this.session;
3713
+ return current && (!sessionId || current.sessionId === sessionId) ? current : void 0;
3714
+ };
3715
+ isHistoryLoading = (sessionId) => {
3716
+ if (!this.session) return this.loading;
3717
+ return (!sessionId || this.session.sessionId === sessionId) && this.loading;
3718
+ };
3719
+ planRevealRevision = (sessionId) => sessionId ? this.revisions.get(sessionId) ?? 0 : 0;
3720
+ update(session, loading) {
3721
+ if (this.session === session && this.loading === loading) return;
3722
+ this.session = session;
3723
+ this.loading = loading;
3724
+ this.notify();
3725
+ }
3726
+ watchPlan(session) {
3727
+ return session.on("toolResult", ({ toolCall, turn, source }) => {
3728
+ if (source === "reconnect_replay" || (turn.loop_id || "root") !== "root" || toolCall.status !== "done" || !isPlanUpdateTool(toolCall) || !parsePlanUpdate(toolCall.arguments)) {
3729
+ return;
3730
+ }
3731
+ this.revisions.set(session.sessionId, (this.revisions.get(session.sessionId) ?? 0) + 1);
3732
+ this.notify();
3733
+ });
3734
+ }
3735
+ notify() {
3736
+ for (const listener of [...this.listeners]) listener();
3737
+ }
3738
+ };
3739
+ function useSingleSessionSource(session, loading) {
3740
+ const [source] = useState2(() => new SingleSessionSource());
3741
+ useLayoutEffect(() => {
3742
+ source.update(session, loading);
3743
+ }, [source, session, loading]);
3744
+ useEffect3(() => session ? source.watchPlan(session) : void 0, [source, session]);
3745
+ return source;
3746
+ }
3747
+ var EMPTY_STATE = createInitialSessionState("");
3748
+ var noopSubscribe = () => () => {
3749
+ };
3750
+ function useSessionHandle(sessionId) {
3751
+ const source = useSessionSource();
3752
+ return useSyncExternalStore(
3753
+ source.subscribe,
3754
+ () => source.getSession(sessionId) ?? null,
3755
+ () => source.getSession(sessionId) ?? null
3756
+ );
3757
+ }
3758
+ function useSessionState(sessionId, selector) {
3759
+ const session = useSessionHandle(sessionId);
3760
+ const selectorRef = useRef3(selector);
3761
+ selectorRef.current = selector;
3762
+ const store = useMemo(() => {
3763
+ let lastState = null;
3764
+ let lastSelector = null;
3765
+ let lastSelected;
3766
+ const getSnapshot = () => {
3767
+ const state = session ? session.getState() : EMPTY_STATE;
3768
+ const current = selectorRef.current;
3769
+ if (state !== lastState || current !== lastSelector) {
3770
+ const next = current(state);
3771
+ if (!(lastState !== null && Object.is(next, lastSelected))) lastSelected = next;
3772
+ lastState = state;
3773
+ lastSelector = current;
3774
+ }
3775
+ return lastSelected;
3776
+ };
3777
+ return {
3778
+ subscribe: session ? (listener) => session.subscribe(listener) : noopSubscribe,
3779
+ getSnapshot
3780
+ };
3781
+ }, [session]);
3782
+ return useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
3783
+ }
3784
+ function useIsSessionHistoryLoading(sessionId) {
3785
+ const source = useSessionSource();
3786
+ return useSyncExternalStore(
3787
+ source.subscribe,
3788
+ () => source.isHistoryLoading(sessionId),
3789
+ () => source.isHistoryLoading(sessionId)
3790
+ );
3791
+ }
3792
+ function usePlanRevealRevision(sessionId) {
3793
+ const source = useSessionSource();
3794
+ return useSyncExternalStore(
3795
+ source.subscribe,
3796
+ () => source.planRevealRevision(sessionId),
3797
+ () => source.planRevealRevision(sessionId)
3798
+ );
3799
+ }
3800
+ var CurrentChatSessionContext = createContext2(null);
3801
+ function CurrentChatSessionProvider({ sessionId, children }) {
3802
+ return /* @__PURE__ */ jsx4(CurrentChatSessionContext.Provider, { value: sessionId, children });
3803
+ }
3804
+ function useCurrentChatSessionId() {
3805
+ return useContext2(CurrentChatSessionContext);
3806
+ }
3807
+
3808
+ // src/chat/runtime/environment.tsx
3809
+ import { createContext as createContext3, useContext as useContext3, useMemo as useMemo2 } from "react";
3810
+ import { jsx as jsx5 } from "react/jsx-runtime";
3811
+ var EMPTY_ENVIRONMENT = {};
3812
+ var ChatEnvironmentContext = createContext3(EMPTY_ENVIRONMENT);
3813
+ function ChatEnvironmentProvider({ value, children }) {
3814
+ return /* @__PURE__ */ jsx5(ChatEnvironmentContext.Provider, { value, children });
3815
+ }
3816
+ function useChatEnvironment() {
3817
+ return useContext3(ChatEnvironmentContext);
3818
+ }
3819
+ var NO_HIGHLIGHT = { highlightedHtml: null };
3820
+ function usePlainCode() {
3821
+ return NO_HIGHLIGHT;
3822
+ }
3823
+ function useHighlightedCode(code, language) {
3824
+ const use = useChatEnvironment().useHighlightedCode ?? usePlainCode;
3825
+ return use(code, language);
3826
+ }
3827
+ function useNoDetail() {
3828
+ return null;
3829
+ }
3830
+ function useChatSessionDetail(sessionId) {
3831
+ const use = useChatEnvironment().useSessionDetail ?? useNoDetail;
3832
+ return use(sessionId);
3833
+ }
3834
+ function useShowTodo() {
3835
+ return false;
3836
+ }
3837
+ function useHideTodo() {
3838
+ const use = useChatEnvironment().useHideTodo ?? useShowTodo;
3839
+ return use();
3840
+ }
3841
+ function useChatRenderMode() {
3842
+ return useChatEnvironment().renderMode ?? "normal";
3843
+ }
3844
+ function notifyChat(environment, kind, message, options) {
3845
+ if (environment.notify) environment.notify(kind, message, options);
3846
+ else if (kind === "error") console.error(message);
3847
+ }
3848
+ function useComposerBridge(sessionId) {
3849
+ const environment = useChatEnvironment();
3850
+ const session = useSessionHandle(sessionId);
3851
+ return useMemo2(
3852
+ () => ({
3853
+ appendText(text, separate = false) {
3854
+ if (!sessionId) return;
3855
+ if (environment.appendToComposer) environment.appendToComposer(sessionId, text, separate);
3856
+ else session?.insertText(separate ? `
3857
+
3858
+ ${text}` : text);
3859
+ },
3860
+ addContext(context) {
3861
+ if (!sessionId) return;
3862
+ if (environment.addComposerContext) environment.addComposerContext(sessionId, context);
3863
+ else session?.attach(context.label, context.content);
3864
+ }
3865
+ }),
3866
+ [environment, session, sessionId]
3867
+ );
3868
+ }
3869
+ var NO_VIRTUAL_ITEMS = [];
3870
+ var NO_VIRTUALIZER = {
3871
+ getVirtualItems: () => NO_VIRTUAL_ITEMS,
3872
+ getTotalSize: () => 0,
3873
+ measureElement: () => {
3874
+ },
3875
+ scrollToIndex: () => {
3876
+ },
3877
+ getOffsetForIndex: () => void 0
3878
+ };
3879
+ function useNoVirtualizer() {
3880
+ return NO_VIRTUALIZER;
3881
+ }
3882
+ function useChatVirtualizer(options) {
3883
+ const injected = useChatEnvironment().useVirtualizer;
3884
+ const use = injected ?? useNoVirtualizer;
3885
+ const virtualizer = use(options);
3886
+ return { virtualizer, enabled: Boolean(injected) };
3887
+ }
3888
+
3889
+ // ../ui/src/components/dialog.tsx
3890
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
3891
+ function Dialog({
3892
+ ...props
3893
+ }) {
3894
+ return /* @__PURE__ */ jsx6(dist_exports.Root, { "data-slot": "dialog", ...props });
3895
+ }
3896
+ function DialogClose({
3897
+ ...props
3898
+ }) {
3899
+ return /* @__PURE__ */ jsx6(dist_exports.Close, { "data-slot": "dialog-close", ...props });
3900
+ }
3901
+
3902
+ // ../ui/src/composites/dialog.tsx
3903
+ import { forwardRef } from "react";
3904
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
3905
+ var DialogOverlay = forwardRef(function DialogOverlay2({ className, ...props }, ref) {
3906
+ return /* @__PURE__ */ jsx7(
3907
+ dist_exports.Overlay,
3908
+ {
3909
+ ref,
3910
+ "data-slot": "dialog-overlay",
3911
+ className: cn(
3912
+ "fixed inset-0 z-50 bg-black/45 backdrop-blur-sm duration-(--motion-duration-fast) data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
3913
+ className
3914
+ ),
3915
+ ...props
3916
+ }
3917
+ );
3918
+ });
3919
+ function DialogContent({
3920
+ className,
3921
+ children,
3922
+ onKeyDown,
3923
+ showCloseButton = true,
3924
+ overlayClassName,
3925
+ ...props
3926
+ }) {
3927
+ const overlayRoot = useOverlayRoot();
3928
+ return /* @__PURE__ */ jsxs4(dist_exports.Portal, { "data-slot": "dialog-portal", container: overlayRoot, children: [
3929
+ /* @__PURE__ */ jsx7(DialogOverlay, { className: overlayClassName }),
3930
+ /* @__PURE__ */ jsxs4(
3931
+ dist_exports.Content,
3932
+ {
3933
+ onKeyDown: (event) => {
3934
+ onKeyDown?.(event);
3935
+ loopTabInShadowRoot(event);
3936
+ },
3937
+ "data-slot": "dialog-content",
3938
+ className: cn(
3939
+ "fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-[12px] border border-[hsl(var(--border))] bg-[hsl(var(--card))] p-6 shadow-[var(--swf-shadow-overlay)] duration-(--motion-duration-fast) data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
3940
+ className
3941
+ ),
3942
+ ...props,
3943
+ children: [
3944
+ children,
3945
+ showCloseButton && /* @__PURE__ */ jsxs4(
3946
+ dist_exports.Close,
3947
+ {
3948
+ "data-slot": "dialog-close",
3949
+ className: "absolute top-4 right-4 rounded-[8px] p-2 text-[hsl(var(--muted-foreground))] opacity-90 transition-colors hover:bg-[hsl(var(--accent))] hover:opacity-100 focus:outline-none disabled:pointer-events-none",
3950
+ children: [
3951
+ /* @__PURE__ */ jsx7(X, { size: 16 }),
3952
+ /* @__PURE__ */ jsx7("span", { className: "sr-only", children: "\u5173\u95ED" })
3953
+ ]
3954
+ }
3955
+ )
3956
+ ]
3957
+ }
3958
+ )
3959
+ ] });
3960
+ }
3961
+ function DialogTitle({ className, ...props }) {
3962
+ return /* @__PURE__ */ jsx7(
3963
+ dist_exports.Title,
3964
+ {
3965
+ "data-slot": "dialog-title",
3966
+ className: cn("text-lg font-semibold text-[hsl(var(--foreground))]", className),
3967
+ ...props
3968
+ }
3969
+ );
3970
+ }
3971
+ function DialogDescription({
3972
+ className,
3973
+ ...props
3974
+ }) {
3975
+ return /* @__PURE__ */ jsx7(
3976
+ dist_exports.Description,
3977
+ {
3978
+ "data-slot": "dialog-description",
3979
+ className: cn("text-sm text-[hsl(var(--muted-foreground))]", className),
3980
+ ...props
3981
+ }
3982
+ );
3983
+ }
3984
+
3985
+ export {
3986
+ BladeProvider,
3987
+ useBladeClient,
3988
+ useOptionalBladeClient,
3989
+ useBladeHost,
3990
+ cn2 as cn,
3991
+ copyToClipboard,
3992
+ getToolDescription,
3993
+ formatToolFileName,
3994
+ formatToolName,
3995
+ getToolDisplayLabel,
3996
+ getToolTone,
3997
+ getToolStatusLabel,
3998
+ extractToolFilePath,
3999
+ getToolOutputTag,
4000
+ PLAN_AUTO_COLLAPSE_MS,
4001
+ isPlanUpdateTool,
4002
+ getPlanUpdateDisplayState,
4003
+ parsePlanUpdate,
4004
+ pickCurrentPlanStep,
4005
+ PlanUpdateBlock,
4006
+ SessionSourceProvider,
4007
+ useSessionSource,
4008
+ useSingleSessionSource,
4009
+ useSessionHandle,
4010
+ useSessionState,
4011
+ useIsSessionHistoryLoading,
4012
+ usePlanRevealRevision,
4013
+ CurrentChatSessionProvider,
4014
+ useCurrentChatSessionId,
4015
+ ChatEnvironmentProvider,
4016
+ useChatEnvironment,
4017
+ useHighlightedCode,
4018
+ useChatSessionDetail,
4019
+ useHideTodo,
4020
+ useChatRenderMode,
4021
+ notifyChat,
4022
+ useComposerBridge,
4023
+ useChatVirtualizer,
4024
+ BrowserConnectionDialog,
4025
+ Dialog,
4026
+ DialogClose,
4027
+ DialogContent,
4028
+ DialogTitle,
4029
+ DialogDescription
4030
+ };
4031
+ //# sourceMappingURL=chunk-WRIMPZPN.js.map