@blade-hq/agent-react 2612.0.0-beta.8 → 2612.0.0-beta.81

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