tailwind-styled-v4 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +398 -0
- package/LICENSE +21 -0
- package/README.md +532 -0
- package/dist/analyzer.d.mts +114 -0
- package/dist/analyzer.d.ts +114 -0
- package/dist/analyzer.js +1555 -0
- package/dist/analyzer.js.map +1 -0
- package/dist/analyzer.mjs +1544 -0
- package/dist/analyzer.mjs.map +1 -0
- package/dist/{animate.d.cts → animate.d.mts} +3 -30
- package/dist/animate.d.ts +3 -30
- package/dist/animate.js +149 -99
- package/dist/animate.js.map +1 -1
- package/dist/{animate.cjs → animate.mjs} +130 -119
- package/dist/animate.mjs.map +1 -0
- package/dist/atomic.d.mts +18 -0
- package/dist/atomic.d.ts +18 -0
- package/dist/atomic.js +191 -0
- package/dist/atomic.js.map +1 -0
- package/dist/atomic.mjs +185 -0
- package/dist/atomic.mjs.map +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +6063 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.mjs +6053 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/compiler.d.mts +1009 -0
- package/dist/compiler.d.ts +1009 -0
- package/dist/compiler.js +4518 -0
- package/dist/compiler.js.map +1 -0
- package/dist/compiler.mjs +4443 -0
- package/dist/compiler.mjs.map +1 -0
- package/dist/dashboard.d.mts +272 -0
- package/dist/dashboard.d.ts +272 -0
- package/dist/dashboard.js +249 -0
- package/dist/dashboard.js.map +1 -0
- package/dist/dashboard.mjs +239 -0
- package/dist/dashboard.mjs.map +1 -0
- package/dist/devtools.js +170 -157
- package/dist/devtools.js.map +1 -1
- package/dist/{devtools.cjs → devtools.mjs} +165 -166
- package/dist/devtools.mjs.map +1 -0
- package/dist/engine.d.mts +84 -0
- package/dist/engine.d.ts +84 -0
- package/dist/engine.js +3014 -0
- package/dist/engine.js.map +1 -0
- package/dist/engine.mjs +3005 -0
- package/dist/engine.mjs.map +1 -0
- package/dist/{index.d.cts → index.d.mts} +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +945 -36
- package/dist/index.js.map +1 -1
- package/dist/{index.cjs → index.mjs} +899 -90
- package/dist/index.mjs.map +1 -0
- package/dist/liveTokenEngine-DYN3Zale.d.mts +34 -0
- package/dist/liveTokenEngine-DYN3Zale.d.ts +34 -0
- package/dist/{next.d.cts → next.d.mts} +2 -1
- package/dist/next.d.ts +2 -1
- package/dist/next.js +6853 -35
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +7050 -0
- package/dist/next.mjs.map +1 -0
- package/dist/plugin.d.mts +90 -0
- package/dist/plugin.d.ts +90 -0
- package/dist/plugin.js +185 -0
- package/dist/plugin.js.map +1 -0
- package/dist/plugin.mjs +174 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/pluginRegistry.d.mts +83 -0
- package/dist/pluginRegistry.d.ts +83 -0
- package/dist/pluginRegistry.js +303 -0
- package/dist/pluginRegistry.js.map +1 -0
- package/dist/pluginRegistry.mjs +298 -0
- package/dist/pluginRegistry.mjs.map +1 -0
- package/dist/preset.js +9 -4
- package/dist/preset.js.map +1 -1
- package/dist/{preset.cjs → preset.mjs} +5 -14
- package/dist/preset.mjs.map +1 -0
- package/dist/rspack.d.mts +33 -0
- package/dist/rspack.d.ts +33 -0
- package/dist/rspack.js +55 -0
- package/dist/rspack.js.map +1 -0
- package/dist/rspack.mjs +45 -0
- package/dist/rspack.mjs.map +1 -0
- package/dist/runtime.d.mts +62 -0
- package/dist/runtime.d.ts +62 -0
- package/dist/runtime.js +207 -0
- package/dist/runtime.js.map +1 -0
- package/dist/runtime.mjs +188 -0
- package/dist/runtime.mjs.map +1 -0
- package/dist/runtimeCss.d.mts +65 -0
- package/dist/runtimeCss.d.ts +65 -0
- package/dist/{css.cjs → runtimeCss.js} +71 -4
- package/dist/runtimeCss.js.map +1 -0
- package/dist/{css.js → runtimeCss.mjs} +66 -5
- package/dist/runtimeCss.mjs.map +1 -0
- package/dist/scanner.d.mts +25 -0
- package/dist/scanner.d.ts +25 -0
- package/dist/scanner.js +717 -0
- package/dist/scanner.js.map +1 -0
- package/dist/scanner.mjs +703 -0
- package/dist/scanner.mjs.map +1 -0
- package/dist/shared.d.mts +85 -0
- package/dist/shared.d.ts +85 -0
- package/dist/shared.js +255 -0
- package/dist/shared.js.map +1 -0
- package/dist/shared.mjs +233 -0
- package/dist/shared.mjs.map +1 -0
- package/dist/storybookAddon.d.mts +108 -0
- package/dist/storybookAddon.d.ts +108 -0
- package/dist/storybookAddon.js +95 -0
- package/dist/storybookAddon.js.map +1 -0
- package/dist/storybookAddon.mjs +88 -0
- package/dist/storybookAddon.mjs.map +1 -0
- package/dist/svelte.d.mts +114 -0
- package/dist/svelte.d.ts +114 -0
- package/dist/svelte.js +67 -0
- package/dist/svelte.js.map +1 -0
- package/dist/svelte.mjs +59 -0
- package/dist/svelte.mjs.map +1 -0
- package/dist/testing.d.mts +185 -0
- package/dist/testing.d.ts +185 -0
- package/dist/testing.js +173 -0
- package/dist/testing.js.map +1 -0
- package/dist/testing.mjs +158 -0
- package/dist/testing.mjs.map +1 -0
- package/dist/theme.d.mts +188 -0
- package/dist/theme.d.ts +188 -0
- package/dist/theme.js +334 -0
- package/dist/theme.js.map +1 -0
- package/dist/theme.mjs +311 -0
- package/dist/theme.mjs.map +1 -0
- package/dist/types-DXr2PmGP.d.mts +31 -0
- package/dist/types-DXr2PmGP.d.ts +31 -0
- package/dist/vite.js +4181 -16
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +4281 -0
- package/dist/vite.mjs.map +1 -0
- package/dist/vue.d.mts +89 -0
- package/dist/vue.d.ts +89 -0
- package/dist/vue.js +104 -0
- package/dist/vue.js.map +1 -0
- package/dist/vue.mjs +96 -0
- package/dist/vue.mjs.map +1 -0
- package/package.json +168 -65
- package/dist/animate.cjs.map +0 -1
- package/dist/chunk-VZEJV27B.js +0 -11
- package/dist/chunk-VZEJV27B.js.map +0 -1
- package/dist/chunk-Y5D3E72P.cjs +0 -13
- package/dist/chunk-Y5D3E72P.cjs.map +0 -1
- package/dist/css.cjs.map +0 -1
- package/dist/css.d.cts +0 -30
- package/dist/css.d.ts +0 -30
- package/dist/css.js.map +0 -1
- package/dist/devtools.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/next.cjs +0 -248
- package/dist/next.cjs.map +0 -1
- package/dist/preset.cjs.map +0 -1
- package/dist/turbopackLoader.cjs +0 -37
- package/dist/turbopackLoader.cjs.map +0 -1
- package/dist/turbopackLoader.d.cts +0 -12
- package/dist/turbopackLoader.d.ts +0 -12
- package/dist/turbopackLoader.js +0 -35
- package/dist/turbopackLoader.js.map +0 -1
- package/dist/vite.cjs +0 -138
- package/dist/vite.cjs.map +0 -1
- package/dist/webpackLoader.cjs +0 -51
- package/dist/webpackLoader.cjs.map +0 -1
- package/dist/webpackLoader.d.cts +0 -17
- package/dist/webpackLoader.d.ts +0 -17
- package/dist/webpackLoader.js +0 -49
- package/dist/webpackLoader.js.map +0 -1
- /package/dist/{devtools.d.cts → devtools.d.mts} +0 -0
- /package/dist/{preset.d.cts → preset.d.mts} +0 -0
- /package/dist/{vite.d.cts → vite.d.mts} +0 -0
|
@@ -1,16 +1,867 @@
|
|
|
1
|
-
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { createRequire } from 'module';
|
|
3
|
+
import os from 'os';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { twMerge } from 'tailwind-merge';
|
|
2
8
|
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
var
|
|
9
|
+
/* tailwind-styled-v4 v5.0.1 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
15
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
16
|
+
}) : x)(function(x) {
|
|
17
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
18
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
19
|
+
});
|
|
20
|
+
var __esm = (fn, res) => function __init() {
|
|
21
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
22
|
+
};
|
|
23
|
+
var __export = (target, all) => {
|
|
24
|
+
for (var name in all)
|
|
25
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
26
|
+
};
|
|
27
|
+
var __copyProps = (to, from, except, desc) => {
|
|
28
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
29
|
+
for (let key of __getOwnPropNames(from))
|
|
30
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
31
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
32
|
+
}
|
|
33
|
+
return to;
|
|
34
|
+
};
|
|
35
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
|
+
|
|
37
|
+
// packages/shared/src/cache.ts
|
|
38
|
+
var LRUCache;
|
|
39
|
+
var init_cache = __esm({
|
|
40
|
+
"packages/shared/src/cache.ts"() {
|
|
41
|
+
LRUCache = class {
|
|
42
|
+
constructor(max = 256, ttlMs = null) {
|
|
43
|
+
this.map = /* @__PURE__ */ new Map();
|
|
44
|
+
this.max = max;
|
|
45
|
+
this.ttlMs = ttlMs;
|
|
46
|
+
}
|
|
47
|
+
get(key) {
|
|
48
|
+
const entry = this.map.get(key);
|
|
49
|
+
if (!entry) return void 0;
|
|
50
|
+
if (this.ttlMs !== null && Date.now() - entry.ts > this.ttlMs) {
|
|
51
|
+
this.map.delete(key);
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
54
|
+
this.map.delete(key);
|
|
55
|
+
this.map.set(key, entry);
|
|
56
|
+
return entry.value;
|
|
57
|
+
}
|
|
58
|
+
set(key, value) {
|
|
59
|
+
if (this.map.has(key)) this.map.delete(key);
|
|
60
|
+
else if (this.map.size >= this.max) {
|
|
61
|
+
this.map.delete(this.map.keys().next().value);
|
|
62
|
+
}
|
|
63
|
+
this.map.set(key, { value, ts: Date.now() });
|
|
64
|
+
}
|
|
65
|
+
has(key) {
|
|
66
|
+
return this.get(key) !== void 0;
|
|
67
|
+
}
|
|
68
|
+
delete(key) {
|
|
69
|
+
this.map.delete(key);
|
|
70
|
+
}
|
|
71
|
+
clear() {
|
|
72
|
+
this.map.clear();
|
|
73
|
+
}
|
|
74
|
+
get size() {
|
|
75
|
+
return this.map.size;
|
|
76
|
+
}
|
|
77
|
+
keys() {
|
|
78
|
+
return this.map.keys();
|
|
79
|
+
}
|
|
80
|
+
*values() {
|
|
81
|
+
for (const entry of this.map.values()) {
|
|
82
|
+
yield entry.value;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
*entries() {
|
|
86
|
+
for (const [key, entry] of this.map.entries()) {
|
|
87
|
+
yield [key, entry.value];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
function getPlatformExtension() {
|
|
94
|
+
const platform = os.platform();
|
|
95
|
+
switch (platform) {
|
|
96
|
+
case "win32":
|
|
97
|
+
return ".node";
|
|
98
|
+
case "darwin":
|
|
99
|
+
return ".dylib";
|
|
100
|
+
case "linux":
|
|
101
|
+
return ".so";
|
|
102
|
+
default:
|
|
103
|
+
return ".node";
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function formatErrorMessage(error) {
|
|
107
|
+
return error instanceof Error ? error.message : String(error);
|
|
108
|
+
}
|
|
109
|
+
function resolveRuntimeDir(dirnameValue, moduleImportUrl) {
|
|
110
|
+
if (typeof dirnameValue === "string" && dirnameValue.length > 0) return dirnameValue;
|
|
111
|
+
return path.dirname(fileURLToPath(moduleImportUrl));
|
|
112
|
+
}
|
|
113
|
+
function resolveNativeBindingCandidates(options) {
|
|
114
|
+
const out = [];
|
|
115
|
+
const envVarNames = options.envVarNames ?? ["TWS_NATIVE_PATH"];
|
|
116
|
+
for (const envVarName of envVarNames) {
|
|
117
|
+
const raw = process.env[envVarName]?.trim();
|
|
118
|
+
if (!raw) continue;
|
|
119
|
+
const resolved = path.resolve(raw);
|
|
120
|
+
if (options.enforceNodeExtensionForEnvPath) {
|
|
121
|
+
if (path.extname(resolved).toLowerCase() !== ".node") {
|
|
122
|
+
throw new Error(
|
|
123
|
+
`Invalid native binding path from ${envVarName}="${raw}". Expected a .node file.`
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
out.push(resolved);
|
|
128
|
+
}
|
|
129
|
+
if (options.includeDefaultCandidates !== false) {
|
|
130
|
+
const ext = options.platformExtension ?? getPlatformExtension();
|
|
131
|
+
const defaultBindingName = `tailwind_styled_parser${ext}`;
|
|
132
|
+
out.push(path.resolve(process.cwd(), "native", defaultBindingName));
|
|
133
|
+
out.push(path.resolve(options.runtimeDir, "..", "..", "..", "native", defaultBindingName));
|
|
134
|
+
}
|
|
135
|
+
return Array.from(new Set(out));
|
|
136
|
+
}
|
|
137
|
+
function parseDebugToken(namespace, token) {
|
|
138
|
+
if (token === "*" || token === namespace || token === "tailwind-styled:*") return true;
|
|
139
|
+
return token.endsWith("*") && namespace.startsWith(token.slice(0, -1));
|
|
140
|
+
}
|
|
141
|
+
function isDebugNamespaceEnabled(namespace) {
|
|
142
|
+
if (process.env.TWS_DEBUG === "1" || process.env.TAILWIND_STYLED_DEBUG === "1") return true;
|
|
143
|
+
const raw = process.env.DEBUG;
|
|
144
|
+
if (!raw) return false;
|
|
145
|
+
return raw.split(",").map((token) => token.trim()).some((token) => parseDebugToken(namespace, token));
|
|
146
|
+
}
|
|
147
|
+
function createDebugLogger(namespace, label = namespace) {
|
|
148
|
+
const debugEnabled = isDebugNamespaceEnabled(namespace);
|
|
149
|
+
return (message) => {
|
|
150
|
+
if (!debugEnabled) return;
|
|
151
|
+
console.debug(`[${label}] ${message}`);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function loadNativeBinding(options) {
|
|
155
|
+
const req = createRequire(path.join(options.runtimeDir, "noop.cjs"));
|
|
156
|
+
const loadErrors = [];
|
|
157
|
+
for (const candidate of options.candidates) {
|
|
158
|
+
if (!fs.existsSync(candidate)) continue;
|
|
159
|
+
try {
|
|
160
|
+
const mod = req(candidate);
|
|
161
|
+
if (options.isValid(mod)) {
|
|
162
|
+
return {
|
|
163
|
+
binding: mod,
|
|
164
|
+
loadedPath: candidate,
|
|
165
|
+
loadErrors
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
loadErrors.push({
|
|
169
|
+
path: candidate,
|
|
170
|
+
message: options.invalidExportMessage
|
|
171
|
+
});
|
|
172
|
+
} catch (error) {
|
|
173
|
+
loadErrors.push({
|
|
174
|
+
path: candidate,
|
|
175
|
+
message: formatErrorMessage(error)
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
binding: null,
|
|
181
|
+
loadedPath: null,
|
|
182
|
+
loadErrors
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
var init_nativeBinding = __esm({
|
|
186
|
+
"packages/shared/src/nativeBinding.ts"() {
|
|
187
|
+
}
|
|
188
|
+
});
|
|
6
189
|
|
|
7
|
-
|
|
190
|
+
// packages/shared/src/index.ts
|
|
191
|
+
var init_src = __esm({
|
|
192
|
+
"packages/shared/src/index.ts"() {
|
|
193
|
+
init_cache();
|
|
194
|
+
init_nativeBinding();
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
// packages/animate/src/binding.ts
|
|
199
|
+
function isAnimateModule(module) {
|
|
200
|
+
const candidate = module;
|
|
201
|
+
return typeof candidate?.compileAnimation === "function" && typeof candidate?.compileKeyframes === "function";
|
|
202
|
+
}
|
|
203
|
+
function resolveBindingCandidates(runtimeDir) {
|
|
204
|
+
return resolveNativeBindingCandidates({
|
|
205
|
+
runtimeDir,
|
|
206
|
+
envVarNames: ["TWS_ANIMATE_NATIVE_PATH", "TWS_NATIVE_PATH"],
|
|
207
|
+
enforceNodeExtensionForEnvPath: true
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
function loadAnimateBinding() {
|
|
211
|
+
if (process.env.TWS_NO_NATIVE === "1" || process.env.TWS_NO_RUST === "1") {
|
|
212
|
+
throw new Error(
|
|
213
|
+
"Native animate backend is required in v5. TWS_NO_NATIVE/TWS_NO_RUST is not supported."
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
const runtimeDir = resolveRuntimeDir(
|
|
217
|
+
typeof __dirname === "string" ? __dirname : void 0,
|
|
218
|
+
import.meta.url
|
|
219
|
+
);
|
|
220
|
+
const candidates = resolveBindingCandidates(runtimeDir);
|
|
221
|
+
const { binding, loadErrors, loadedPath } = loadNativeBinding({
|
|
222
|
+
runtimeDir,
|
|
223
|
+
candidates,
|
|
224
|
+
isValid: isAnimateModule,
|
|
225
|
+
invalidExportMessage: "Module loaded but missing compileAnimation/compileKeyframes exports."
|
|
226
|
+
});
|
|
227
|
+
if (binding) {
|
|
228
|
+
debugLog(`native animate binding loaded from: ${loadedPath}`);
|
|
229
|
+
return binding;
|
|
230
|
+
}
|
|
231
|
+
if (loadErrors.length > 0) {
|
|
232
|
+
debugLog(
|
|
233
|
+
`native animate binding load failed for ${loadErrors.length} candidate(s): ${loadErrors.map((entry) => `${entry.path} (${entry.message})`).join("; ")}`
|
|
234
|
+
);
|
|
235
|
+
} else {
|
|
236
|
+
debugLog("native animate binding not found in any candidate path");
|
|
237
|
+
}
|
|
238
|
+
const lines = [
|
|
239
|
+
"Native animate backend not found. Ensure `tailwind_styled_parser.node` is built.",
|
|
240
|
+
"Checked paths:",
|
|
241
|
+
...candidates.map((candidate) => `- ${candidate}`)
|
|
242
|
+
];
|
|
243
|
+
if (loadErrors.length > 0) {
|
|
244
|
+
lines.push("Load errors:");
|
|
245
|
+
for (const error of loadErrors) lines.push(`- ${error.path}: ${error.message}`);
|
|
246
|
+
}
|
|
247
|
+
throw new Error(lines.join("\n"));
|
|
248
|
+
}
|
|
249
|
+
async function getAnimateBinding() {
|
|
250
|
+
if (!bindingPromise) {
|
|
251
|
+
bindingPromise = Promise.resolve().then(loadAnimateBinding);
|
|
252
|
+
}
|
|
253
|
+
return bindingPromise;
|
|
254
|
+
}
|
|
255
|
+
async function initAnimate() {
|
|
256
|
+
await getAnimateBinding();
|
|
257
|
+
}
|
|
258
|
+
var bindingPromise, DEBUG_NAMESPACE, debugLog;
|
|
259
|
+
var init_binding = __esm({
|
|
260
|
+
"packages/animate/src/binding.ts"() {
|
|
261
|
+
init_src();
|
|
262
|
+
bindingPromise = null;
|
|
263
|
+
DEBUG_NAMESPACE = "tailwind-styled:animate";
|
|
264
|
+
debugLog = createDebugLogger(DEBUG_NAMESPACE, "tailwind-styled/animate");
|
|
265
|
+
}
|
|
266
|
+
});
|
|
8
267
|
|
|
9
|
-
|
|
268
|
+
// packages/animate/src/preset.ts
|
|
269
|
+
function createAnimationPresets(registry) {
|
|
270
|
+
const cache2 = new LRUCache(DEFAULT_PRESET_CACHE_LIMIT);
|
|
271
|
+
const withCache = (cacheKey, factory) => async () => {
|
|
272
|
+
const cached = cache2.get(cacheKey);
|
|
273
|
+
if (cached) {
|
|
274
|
+
const className = await cached;
|
|
275
|
+
if (registry.has(className)) return className;
|
|
276
|
+
cache2.delete(cacheKey);
|
|
277
|
+
}
|
|
278
|
+
const pending = factory();
|
|
279
|
+
cache2.set(cacheKey, pending);
|
|
280
|
+
try {
|
|
281
|
+
return await pending;
|
|
282
|
+
} catch (error) {
|
|
283
|
+
cache2.delete(cacheKey);
|
|
284
|
+
throw error;
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
return {
|
|
288
|
+
fadeIn: withCache(
|
|
289
|
+
"fadeIn",
|
|
290
|
+
async () => (await registry.compileAnimation({ from: "opacity-0", to: "opacity-100", duration: 200 })).className
|
|
291
|
+
),
|
|
292
|
+
fadeOut: withCache(
|
|
293
|
+
"fadeOut",
|
|
294
|
+
async () => (await registry.compileAnimation({ from: "opacity-100", to: "opacity-0", duration: 200 })).className
|
|
295
|
+
),
|
|
296
|
+
slideUp: withCache(
|
|
297
|
+
"slideUp",
|
|
298
|
+
async () => (await registry.compileAnimation({
|
|
299
|
+
from: "opacity-0 translate-y-4",
|
|
300
|
+
to: "opacity-100 translate-y-0",
|
|
301
|
+
duration: 300
|
|
302
|
+
})).className
|
|
303
|
+
),
|
|
304
|
+
slideDown: withCache(
|
|
305
|
+
"slideDown",
|
|
306
|
+
async () => (await registry.compileAnimation({
|
|
307
|
+
from: "opacity-0 -translate-y-4",
|
|
308
|
+
to: "opacity-100 translate-y-0",
|
|
309
|
+
duration: 300
|
|
310
|
+
})).className
|
|
311
|
+
),
|
|
312
|
+
slideLeft: withCache(
|
|
313
|
+
"slideLeft",
|
|
314
|
+
async () => (await registry.compileAnimation({
|
|
315
|
+
from: "opacity-0 translate-x-4",
|
|
316
|
+
to: "opacity-100 translate-x-0",
|
|
317
|
+
duration: 300
|
|
318
|
+
})).className
|
|
319
|
+
),
|
|
320
|
+
slideRight: withCache(
|
|
321
|
+
"slideRight",
|
|
322
|
+
async () => (await registry.compileAnimation({
|
|
323
|
+
from: "opacity-0 -translate-x-4",
|
|
324
|
+
to: "opacity-100 translate-x-0",
|
|
325
|
+
duration: 300
|
|
326
|
+
})).className
|
|
327
|
+
),
|
|
328
|
+
scaleIn: withCache(
|
|
329
|
+
"scaleIn",
|
|
330
|
+
async () => (await registry.compileAnimation({
|
|
331
|
+
from: "opacity-0 scale-95",
|
|
332
|
+
to: "opacity-100 scale-100",
|
|
333
|
+
duration: 200,
|
|
334
|
+
easing: "cubic-bezier(0.16,1,0.3,1)"
|
|
335
|
+
})).className
|
|
336
|
+
),
|
|
337
|
+
scaleOut: withCache(
|
|
338
|
+
"scaleOut",
|
|
339
|
+
async () => (await registry.compileAnimation({
|
|
340
|
+
from: "opacity-100 scale-100",
|
|
341
|
+
to: "opacity-0 scale-95",
|
|
342
|
+
duration: 150
|
|
343
|
+
})).className
|
|
344
|
+
),
|
|
345
|
+
blurIn: withCache(
|
|
346
|
+
"blurIn",
|
|
347
|
+
async () => (await registry.compileAnimation({
|
|
348
|
+
from: "opacity-0 blur-sm",
|
|
349
|
+
to: "opacity-100 blur-none",
|
|
350
|
+
duration: 300
|
|
351
|
+
})).className
|
|
352
|
+
),
|
|
353
|
+
bounceIn: withCache(
|
|
354
|
+
"bounceIn",
|
|
355
|
+
async () => (await registry.compileAnimation({
|
|
356
|
+
from: "opacity-0 scale-50",
|
|
357
|
+
to: "opacity-100 scale-100",
|
|
358
|
+
duration: 400,
|
|
359
|
+
easing: "cubic-bezier(0.34,1.56,0.64,1)"
|
|
360
|
+
})).className
|
|
361
|
+
),
|
|
362
|
+
spinIn: withCache(
|
|
363
|
+
"spinIn",
|
|
364
|
+
async () => (await registry.compileAnimation({
|
|
365
|
+
from: "opacity-0 rotate-180 scale-50",
|
|
366
|
+
to: "opacity-100 rotate-0 scale-100",
|
|
367
|
+
duration: 400,
|
|
368
|
+
easing: "cubic-bezier(0.16,1,0.3,1)"
|
|
369
|
+
})).className
|
|
370
|
+
)
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
var DEFAULT_PRESET_CACHE_LIMIT;
|
|
374
|
+
var init_preset = __esm({
|
|
375
|
+
"packages/animate/src/preset.ts"() {
|
|
376
|
+
init_src();
|
|
377
|
+
DEFAULT_PRESET_CACHE_LIMIT = 32;
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
function formatErrorMessage2(error) {
|
|
381
|
+
return error instanceof Error ? error.message : String(error);
|
|
382
|
+
}
|
|
383
|
+
var DEBUG_NAMESPACE2, debugLog2;
|
|
384
|
+
var init_utils = __esm({
|
|
385
|
+
"packages/analyzer/src/utils.ts"() {
|
|
386
|
+
init_src();
|
|
387
|
+
DEBUG_NAMESPACE2 = "tailwind-styled:analyzer";
|
|
388
|
+
debugLog2 = createDebugLogger(DEBUG_NAMESPACE2, "tailwind-styled/analyzer");
|
|
389
|
+
}
|
|
390
|
+
});
|
|
10
391
|
|
|
11
|
-
|
|
392
|
+
// packages/analyzer/src/binding.ts
|
|
393
|
+
function isAnalyzerModule(module) {
|
|
394
|
+
const candidate = module;
|
|
395
|
+
return typeof candidate?.analyzeClasses === "function";
|
|
396
|
+
}
|
|
397
|
+
function getNativeBinding() {
|
|
398
|
+
if (bindingCache !== void 0) return bindingCache;
|
|
399
|
+
if (process.env.TWS_NO_NATIVE === "1" || process.env.TWS_NO_RUST === "1") {
|
|
400
|
+
bindingCandidateCache = [];
|
|
401
|
+
bindingLoadErrorsCache = [];
|
|
402
|
+
loadedBindingPathCache = null;
|
|
403
|
+
debugLog2("native binding disabled by TWS_NO_NATIVE/TWS_NO_RUST");
|
|
404
|
+
bindingCache = null;
|
|
405
|
+
return bindingCache;
|
|
406
|
+
}
|
|
407
|
+
const runtimeDir = resolveRuntimeDir(
|
|
408
|
+
typeof __dirname === "string" ? __dirname : void 0,
|
|
409
|
+
import.meta.url
|
|
410
|
+
);
|
|
411
|
+
const candidates = resolveNativeBindingCandidates({
|
|
412
|
+
runtimeDir,
|
|
413
|
+
envVarNames: ["TWS_NATIVE_PATH"]
|
|
414
|
+
});
|
|
415
|
+
const { binding, loadErrors, loadedPath } = loadNativeBinding({
|
|
416
|
+
runtimeDir,
|
|
417
|
+
candidates,
|
|
418
|
+
isValid: isAnalyzerModule,
|
|
419
|
+
invalidExportMessage: "Module loaded but missing `analyzeClasses` export."
|
|
420
|
+
});
|
|
421
|
+
bindingCandidateCache = candidates;
|
|
422
|
+
bindingLoadErrorsCache = loadErrors;
|
|
423
|
+
loadedBindingPathCache = loadedPath;
|
|
424
|
+
if (binding) {
|
|
425
|
+
debugLog2(`native binding loaded from: ${loadedPath}`);
|
|
426
|
+
bindingCache = binding;
|
|
427
|
+
return bindingCache;
|
|
428
|
+
}
|
|
429
|
+
if (bindingLoadErrorsCache.length > 0) {
|
|
430
|
+
debugLog2(
|
|
431
|
+
`native binding load failed for ${bindingLoadErrorsCache.length} candidate(s): ${bindingLoadErrorsCache.map((entry) => `${entry.path} (${entry.message})`).join("; ")}`
|
|
432
|
+
);
|
|
433
|
+
} else {
|
|
434
|
+
debugLog2("native binding not found in any candidate path");
|
|
435
|
+
}
|
|
436
|
+
bindingCache = null;
|
|
437
|
+
return bindingCache;
|
|
438
|
+
}
|
|
439
|
+
function requireNativeBinding() {
|
|
440
|
+
const binding = getNativeBinding();
|
|
441
|
+
if (binding?.analyzeClasses) return binding;
|
|
442
|
+
const lines = [
|
|
443
|
+
"Native analyzer binding not found. Ensure `tailwind_styled_parser.node` is built."
|
|
444
|
+
];
|
|
445
|
+
if (process.env.TWS_NO_NATIVE === "1" || process.env.TWS_NO_RUST === "1") {
|
|
446
|
+
lines.push("Native loading is disabled by TWS_NO_NATIVE/TWS_NO_RUST.");
|
|
447
|
+
} else {
|
|
448
|
+
lines.push("Checked paths:");
|
|
449
|
+
for (const candidate of bindingCandidateCache) lines.push(`- ${candidate}`);
|
|
450
|
+
if (bindingLoadErrorsCache.length > 0) {
|
|
451
|
+
lines.push("Load errors:");
|
|
452
|
+
for (const failure of bindingLoadErrorsCache) {
|
|
453
|
+
lines.push(`- ${failure.path}: ${failure.message}`);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
throw new Error(lines.join("\n"));
|
|
458
|
+
}
|
|
459
|
+
function requireNativeCssCompiler() {
|
|
460
|
+
const binding = requireNativeBinding();
|
|
461
|
+
if (typeof binding.compileCss === "function") return binding;
|
|
462
|
+
const loadedPathText = loadedBindingPathCache ? ` (${loadedBindingPathCache})` : "";
|
|
463
|
+
throw new Error(`Native analyzer compileCss binding is missing in v5${loadedPathText}.`);
|
|
464
|
+
}
|
|
465
|
+
var bindingCache, bindingCandidateCache, bindingLoadErrorsCache, loadedBindingPathCache;
|
|
466
|
+
var init_binding2 = __esm({
|
|
467
|
+
"packages/analyzer/src/binding.ts"() {
|
|
468
|
+
init_src();
|
|
469
|
+
init_utils();
|
|
470
|
+
bindingCandidateCache = [];
|
|
471
|
+
bindingLoadErrorsCache = [];
|
|
472
|
+
loadedBindingPathCache = null;
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
// packages/analyzer/src/classToCss.ts
|
|
477
|
+
function normalizeClassInput(input) {
|
|
478
|
+
if (typeof input === "string") {
|
|
479
|
+
return input.split(/\s+/).map((item) => item.trim()).filter((item) => item.length > 0);
|
|
480
|
+
}
|
|
481
|
+
if (!Array.isArray(input)) {
|
|
482
|
+
throw new TypeError("classToCss input must be a string or an array of strings.");
|
|
483
|
+
}
|
|
484
|
+
const out = [];
|
|
485
|
+
for (const item of input) {
|
|
486
|
+
if (typeof item !== "string") {
|
|
487
|
+
throw new TypeError("classToCss input array must contain only strings.");
|
|
488
|
+
}
|
|
489
|
+
const value = item.trim();
|
|
490
|
+
if (value.length > 0) out.push(value);
|
|
491
|
+
}
|
|
492
|
+
return out;
|
|
493
|
+
}
|
|
494
|
+
function normalizeClassToCssOptions(options) {
|
|
495
|
+
if (!options || typeof options !== "object" || Array.isArray(options)) {
|
|
496
|
+
throw new TypeError("classToCss options must be an object.");
|
|
497
|
+
}
|
|
498
|
+
const strict = options.strict ?? false;
|
|
499
|
+
if (typeof strict !== "boolean") {
|
|
500
|
+
throw new TypeError("classToCss options.strict must be a boolean when provided.");
|
|
501
|
+
}
|
|
502
|
+
const prefix = options.prefix ?? null;
|
|
503
|
+
if (prefix !== null && typeof prefix !== "string") {
|
|
504
|
+
throw new TypeError("classToCss options.prefix must be a string or null when provided.");
|
|
505
|
+
}
|
|
506
|
+
return { prefix, strict };
|
|
507
|
+
}
|
|
508
|
+
function mergeDeclarationMap(target, css) {
|
|
509
|
+
const ruleRegex = /\{([^}]*)\}/g;
|
|
510
|
+
let ruleMatch = ruleRegex.exec(css);
|
|
511
|
+
while (ruleMatch) {
|
|
512
|
+
const body = ruleMatch[1];
|
|
513
|
+
for (const raw of body.split(";")) {
|
|
514
|
+
const declaration = raw.trim();
|
|
515
|
+
if (declaration.length === 0) continue;
|
|
516
|
+
const colonIndex = declaration.indexOf(":");
|
|
517
|
+
if (colonIndex <= 0) continue;
|
|
518
|
+
const property = declaration.slice(0, colonIndex).trim();
|
|
519
|
+
const value = declaration.slice(colonIndex + 1).trim();
|
|
520
|
+
if (property.length === 0 || value.length === 0) continue;
|
|
521
|
+
if (target.has(property)) target.delete(property);
|
|
522
|
+
target.set(property, value);
|
|
523
|
+
}
|
|
524
|
+
ruleMatch = ruleRegex.exec(css);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
function declarationMapToString(declarationMap) {
|
|
528
|
+
return Array.from(declarationMap.entries()).map(([property, value]) => `${property}: ${value}`).join("; ");
|
|
529
|
+
}
|
|
530
|
+
async function classToCss(input, options = {}) {
|
|
531
|
+
const inputClasses = normalizeClassInput(input);
|
|
532
|
+
const normalizedOptions = normalizeClassToCssOptions(options);
|
|
533
|
+
if (inputClasses.length === 0) {
|
|
534
|
+
return {
|
|
535
|
+
inputClasses: [],
|
|
536
|
+
css: "",
|
|
537
|
+
declarations: "",
|
|
538
|
+
resolvedClasses: [],
|
|
539
|
+
unknownClasses: [],
|
|
540
|
+
sizeBytes: 0
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
const binding = requireNativeCssCompiler();
|
|
544
|
+
const prefix = normalizedOptions.prefix;
|
|
545
|
+
const cssChunks = [];
|
|
546
|
+
const resolvedClasses = [];
|
|
547
|
+
const unknownClasses = [];
|
|
548
|
+
let sizeBytes = 0;
|
|
549
|
+
const declarationMap = /* @__PURE__ */ new Map();
|
|
550
|
+
for (const className of inputClasses) {
|
|
551
|
+
let compiled = null;
|
|
552
|
+
try {
|
|
553
|
+
compiled = binding.compileCss([className], prefix);
|
|
554
|
+
} catch (error) {
|
|
555
|
+
throw new Error(
|
|
556
|
+
`Native analyzer failed while compiling class "${className}": ${formatErrorMessage2(error)}`,
|
|
557
|
+
{ cause: error }
|
|
558
|
+
);
|
|
559
|
+
}
|
|
560
|
+
if (!compiled) {
|
|
561
|
+
throw new Error(`Native analyzer returned no result for class "${className}".`);
|
|
562
|
+
}
|
|
563
|
+
cssChunks.push(compiled.css);
|
|
564
|
+
resolvedClasses.push(...compiled.resolvedClasses);
|
|
565
|
+
unknownClasses.push(...compiled.unknownClasses);
|
|
566
|
+
sizeBytes += compiled.sizeBytes;
|
|
567
|
+
mergeDeclarationMap(declarationMap, compiled.css);
|
|
568
|
+
}
|
|
569
|
+
const uniqueUnknown = Array.from(new Set(unknownClasses));
|
|
570
|
+
if (normalizedOptions.strict && uniqueUnknown.length > 0) {
|
|
571
|
+
throw new Error(`Unknown Tailwind classes: ${uniqueUnknown.join(", ")}`);
|
|
572
|
+
}
|
|
573
|
+
return {
|
|
574
|
+
inputClasses,
|
|
575
|
+
css: cssChunks.filter((chunk) => chunk.length > 0).join("\n"),
|
|
576
|
+
declarations: declarationMapToString(declarationMap),
|
|
577
|
+
resolvedClasses: Array.from(new Set(resolvedClasses)),
|
|
578
|
+
unknownClasses: uniqueUnknown,
|
|
579
|
+
sizeBytes
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
var init_classToCss = __esm({
|
|
583
|
+
"packages/analyzer/src/classToCss.ts"() {
|
|
584
|
+
init_binding2();
|
|
585
|
+
init_utils();
|
|
586
|
+
}
|
|
587
|
+
});
|
|
588
|
+
|
|
589
|
+
// packages/analyzer/src/index.ts
|
|
590
|
+
var init_src2 = __esm({
|
|
591
|
+
"packages/analyzer/src/index.ts"() {
|
|
592
|
+
init_classToCss();
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
// packages/animate/src/registry.ts
|
|
597
|
+
function normalizeNumber(value, fallback) {
|
|
598
|
+
if (!Number.isFinite(value)) return fallback;
|
|
599
|
+
return Math.max(0, Math.trunc(value));
|
|
600
|
+
}
|
|
601
|
+
function normalizeCacheLimit(value) {
|
|
602
|
+
if (!Number.isFinite(value)) return DEFAULT_CACHE_LIMIT;
|
|
603
|
+
return Math.max(1, Math.trunc(value));
|
|
604
|
+
}
|
|
605
|
+
function normalizeIterations(value) {
|
|
606
|
+
if (value === "infinite") return "infinite";
|
|
607
|
+
if (!Number.isFinite(value)) return String(DEFAULT_ITERATIONS);
|
|
608
|
+
return String(Math.max(0, Math.trunc(value)));
|
|
609
|
+
}
|
|
610
|
+
function stableKeyframesEntries(stops) {
|
|
611
|
+
return Object.entries(stops).map(([offset, classes]) => ({ offset, classes })).sort((left, right) => left.offset.localeCompare(right.offset));
|
|
612
|
+
}
|
|
613
|
+
function animationCacheKey(opts) {
|
|
614
|
+
const normalized = {
|
|
615
|
+
from: opts.from.trim(),
|
|
616
|
+
to: opts.to.trim(),
|
|
617
|
+
duration: normalizeNumber(opts.duration, DEFAULT_DURATION),
|
|
618
|
+
easing: (opts.easing ?? DEFAULT_EASING).trim(),
|
|
619
|
+
delay: normalizeNumber(opts.delay, DEFAULT_DELAY),
|
|
620
|
+
fill: opts.fill ?? DEFAULT_FILL,
|
|
621
|
+
iterations: normalizeIterations(opts.iterations),
|
|
622
|
+
direction: opts.direction ?? DEFAULT_DIRECTION,
|
|
623
|
+
name: opts.name ?? ""
|
|
624
|
+
};
|
|
625
|
+
return JSON.stringify(normalized);
|
|
626
|
+
}
|
|
627
|
+
function keyframesCacheKey(name, stops) {
|
|
628
|
+
return `${name}::${JSON.stringify(stableKeyframesEntries(stops))}`;
|
|
629
|
+
}
|
|
630
|
+
function splitClasses(classList) {
|
|
631
|
+
return classList.split(/\s+/).map((item) => item.trim()).filter((item) => item.length > 0);
|
|
632
|
+
}
|
|
633
|
+
async function validateTailwindClasses(entries) {
|
|
634
|
+
const binding = await getAnimateBinding();
|
|
635
|
+
const unknownByContext = /* @__PURE__ */ new Map();
|
|
636
|
+
const failures = [];
|
|
637
|
+
for (const entry of entries) {
|
|
638
|
+
const classes = splitClasses(entry.classList);
|
|
639
|
+
if (classes.length === 0) continue;
|
|
640
|
+
try {
|
|
641
|
+
if (typeof binding.compileCss === "function") {
|
|
642
|
+
const compiled = binding.compileCss(classes, null);
|
|
643
|
+
if (!compiled) {
|
|
644
|
+
failures.push(
|
|
645
|
+
`Animation ${entry.context} failed validation: native compileCss returned no result.`
|
|
646
|
+
);
|
|
647
|
+
continue;
|
|
648
|
+
}
|
|
649
|
+
if (compiled.unknownClasses.length > 0) {
|
|
650
|
+
const bucket = unknownByContext.get(entry.context) ?? /* @__PURE__ */ new Set();
|
|
651
|
+
for (const className of compiled.unknownClasses) bucket.add(className);
|
|
652
|
+
unknownByContext.set(entry.context, bucket);
|
|
653
|
+
}
|
|
654
|
+
continue;
|
|
655
|
+
}
|
|
656
|
+
const checked = await classToCss(classes, { strict: false });
|
|
657
|
+
if (checked.unknownClasses.length > 0) {
|
|
658
|
+
const bucket = unknownByContext.get(entry.context) ?? /* @__PURE__ */ new Set();
|
|
659
|
+
for (const className of checked.unknownClasses) bucket.add(className);
|
|
660
|
+
unknownByContext.set(entry.context, bucket);
|
|
661
|
+
}
|
|
662
|
+
} catch (error) {
|
|
663
|
+
failures.push(`Animation ${entry.context} failed validation: ${formatErrorMessage(error)}`);
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
const issues = [];
|
|
667
|
+
for (const [context, classes] of unknownByContext.entries()) {
|
|
668
|
+
issues.push(
|
|
669
|
+
`Animation ${context} contains unknown Tailwind classes: ${Array.from(classes).join(", ")}`
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
issues.push(...failures);
|
|
673
|
+
if (issues.length > 0) {
|
|
674
|
+
throw new Error(issues.join("\n"));
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
function createAnimationRegistry(options = {}) {
|
|
678
|
+
return new AnimationRegistry(options);
|
|
679
|
+
}
|
|
680
|
+
var DEFAULT_DURATION, DEFAULT_EASING, DEFAULT_DELAY, DEFAULT_FILL, DEFAULT_ITERATIONS, DEFAULT_DIRECTION, DEFAULT_CACHE_LIMIT, AnimationRegistry;
|
|
681
|
+
var init_registry = __esm({
|
|
682
|
+
"packages/animate/src/registry.ts"() {
|
|
683
|
+
init_src2();
|
|
684
|
+
init_src();
|
|
685
|
+
init_binding();
|
|
686
|
+
DEFAULT_DURATION = 300;
|
|
687
|
+
DEFAULT_EASING = "ease-out";
|
|
688
|
+
DEFAULT_DELAY = 0;
|
|
689
|
+
DEFAULT_FILL = "both";
|
|
690
|
+
DEFAULT_ITERATIONS = 1;
|
|
691
|
+
DEFAULT_DIRECTION = "normal";
|
|
692
|
+
DEFAULT_CACHE_LIMIT = 512;
|
|
693
|
+
AnimationRegistry = class {
|
|
694
|
+
constructor(options = {}) {
|
|
695
|
+
const cacheLimit = normalizeCacheLimit(options.cacheLimit);
|
|
696
|
+
this.animations = new LRUCache(cacheLimit);
|
|
697
|
+
this.animationBySignature = new LRUCache(cacheLimit);
|
|
698
|
+
this.keyframesBySignature = new LRUCache(cacheLimit);
|
|
699
|
+
}
|
|
700
|
+
async compileAnimation(opts) {
|
|
701
|
+
const signature = animationCacheKey(opts);
|
|
702
|
+
const existingClassName = this.animationBySignature.get(signature);
|
|
703
|
+
if (existingClassName) {
|
|
704
|
+
const cached = this.animations.get(existingClassName);
|
|
705
|
+
if (cached) return cached;
|
|
706
|
+
this.animationBySignature.delete(signature);
|
|
707
|
+
}
|
|
708
|
+
await validateTailwindClasses([
|
|
709
|
+
{ classList: opts.from, context: `"from" in ${opts.name ?? "anonymous animation"}` },
|
|
710
|
+
{ classList: opts.to, context: `"to" in ${opts.name ?? "anonymous animation"}` }
|
|
711
|
+
]);
|
|
712
|
+
const binding = await getAnimateBinding();
|
|
713
|
+
const duration = normalizeNumber(opts.duration, DEFAULT_DURATION);
|
|
714
|
+
const easing = opts.easing ?? DEFAULT_EASING;
|
|
715
|
+
const delay = normalizeNumber(opts.delay, DEFAULT_DELAY);
|
|
716
|
+
const fill = opts.fill ?? DEFAULT_FILL;
|
|
717
|
+
const iterations = normalizeIterations(opts.iterations);
|
|
718
|
+
const direction = opts.direction ?? DEFAULT_DIRECTION;
|
|
719
|
+
const compiled = binding.compileAnimation?.(
|
|
720
|
+
opts.from,
|
|
721
|
+
opts.to,
|
|
722
|
+
opts.name ?? null,
|
|
723
|
+
duration,
|
|
724
|
+
easing,
|
|
725
|
+
delay,
|
|
726
|
+
fill,
|
|
727
|
+
iterations,
|
|
728
|
+
direction
|
|
729
|
+
);
|
|
730
|
+
if (!compiled) {
|
|
731
|
+
throw new Error(
|
|
732
|
+
`Native animate backend failed to compile animation "${opts.name ?? "anonymous animation"}".`
|
|
733
|
+
);
|
|
734
|
+
}
|
|
735
|
+
const result = {
|
|
736
|
+
className: compiled.className,
|
|
737
|
+
keyframesCss: compiled.keyframesCss,
|
|
738
|
+
animationCss: compiled.animationCss
|
|
739
|
+
};
|
|
740
|
+
this.animations.set(result.className, result);
|
|
741
|
+
this.animationBySignature.set(signature, result.className);
|
|
742
|
+
return result;
|
|
743
|
+
}
|
|
744
|
+
async compileKeyframes(name, stops) {
|
|
745
|
+
const signature = keyframesCacheKey(name, stops);
|
|
746
|
+
const existingClassName = this.keyframesBySignature.get(signature);
|
|
747
|
+
if (existingClassName) {
|
|
748
|
+
const cached = this.animations.get(existingClassName);
|
|
749
|
+
if (cached) return cached;
|
|
750
|
+
this.keyframesBySignature.delete(signature);
|
|
751
|
+
}
|
|
752
|
+
await validateTailwindClasses(
|
|
753
|
+
Object.entries(stops).map(([offset, classes]) => ({
|
|
754
|
+
classList: classes,
|
|
755
|
+
context: `"${offset}" stop in keyframes "${name}"`
|
|
756
|
+
}))
|
|
757
|
+
);
|
|
758
|
+
const binding = await getAnimateBinding();
|
|
759
|
+
const stopsJson = JSON.stringify(stableKeyframesEntries(stops));
|
|
760
|
+
const compiled = binding.compileKeyframes?.(name, stopsJson);
|
|
761
|
+
if (!compiled) {
|
|
762
|
+
throw new Error(`Native animate backend failed to compile keyframes "${name}".`);
|
|
763
|
+
}
|
|
764
|
+
const result = {
|
|
765
|
+
className: compiled.className,
|
|
766
|
+
keyframesCss: compiled.keyframesCss,
|
|
767
|
+
animationCss: compiled.animationCss
|
|
768
|
+
};
|
|
769
|
+
this.animations.set(result.className, result);
|
|
770
|
+
this.keyframesBySignature.set(signature, result.className);
|
|
771
|
+
return result;
|
|
772
|
+
}
|
|
773
|
+
extractCss() {
|
|
774
|
+
const lines = [];
|
|
775
|
+
for (const [, compiled] of this.animations.entries()) {
|
|
776
|
+
lines.push(compiled.keyframesCss);
|
|
777
|
+
lines.push(`.${compiled.className} { ${compiled.animationCss} }`);
|
|
778
|
+
}
|
|
779
|
+
return lines.join("\n\n");
|
|
780
|
+
}
|
|
781
|
+
reset() {
|
|
782
|
+
this.animations.clear();
|
|
783
|
+
this.animationBySignature.clear();
|
|
784
|
+
this.keyframesBySignature.clear();
|
|
785
|
+
}
|
|
786
|
+
has(className) {
|
|
787
|
+
return this.animations.has(className);
|
|
788
|
+
}
|
|
789
|
+
};
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
|
|
793
|
+
// packages/animate/src/index.ts
|
|
794
|
+
var src_exports = {};
|
|
795
|
+
__export(src_exports, {
|
|
796
|
+
AnimationRegistry: () => AnimationRegistry,
|
|
797
|
+
animate: () => animate,
|
|
798
|
+
animations: () => animations,
|
|
799
|
+
compileAnimation: () => compileAnimation,
|
|
800
|
+
compileKeyframes: () => compileKeyframes,
|
|
801
|
+
createAnimationRegistry: () => createAnimationRegistry,
|
|
802
|
+
extractAnimationCss: () => extractAnimationCss,
|
|
803
|
+
getDefaultAnimationRegistry: () => getDefaultAnimationRegistry,
|
|
804
|
+
initAnimate: () => initAnimate2,
|
|
805
|
+
injectAnimationCss: () => injectAnimationCss,
|
|
806
|
+
keyframes: () => keyframes,
|
|
807
|
+
resetAnimationRegistry: () => resetAnimationRegistry
|
|
808
|
+
});
|
|
809
|
+
async function initAnimate2() {
|
|
810
|
+
await initAnimate();
|
|
811
|
+
}
|
|
812
|
+
function getDefaultAnimationRegistry() {
|
|
813
|
+
return defaultRegistry;
|
|
814
|
+
}
|
|
815
|
+
async function compileAnimation(opts, registry = defaultRegistry) {
|
|
816
|
+
return registry.compileAnimation(opts);
|
|
817
|
+
}
|
|
818
|
+
async function compileKeyframes(name, stops, registry = defaultRegistry) {
|
|
819
|
+
return registry.compileKeyframes(name, stops);
|
|
820
|
+
}
|
|
821
|
+
async function animate(opts, registry = defaultRegistry) {
|
|
822
|
+
return (await registry.compileAnimation(opts)).className;
|
|
823
|
+
}
|
|
824
|
+
async function keyframes(name, stops, registry = defaultRegistry) {
|
|
825
|
+
return (await registry.compileKeyframes(name, stops)).className;
|
|
826
|
+
}
|
|
827
|
+
function extractAnimationCss(registry = defaultRegistry) {
|
|
828
|
+
return registry.extractCss();
|
|
829
|
+
}
|
|
830
|
+
function resetAnimationRegistry(registry = defaultRegistry) {
|
|
831
|
+
registry.reset();
|
|
832
|
+
}
|
|
833
|
+
function injectAnimationCss(registry = defaultRegistry, options = {}) {
|
|
834
|
+
const targetDocument = options.document ?? (typeof document !== "undefined" ? document : void 0);
|
|
835
|
+
if (!targetDocument) {
|
|
836
|
+
if (options.silent) return;
|
|
837
|
+
throw new Error("injectAnimationCss requires a browser Document.");
|
|
838
|
+
}
|
|
839
|
+
const styleId = options.styleId ?? "__tw_animate_styles__";
|
|
840
|
+
let styleEl = targetDocument.getElementById(styleId);
|
|
841
|
+
if (!styleEl) {
|
|
842
|
+
if (!targetDocument.head) {
|
|
843
|
+
if (options.silent) return;
|
|
844
|
+
throw new Error("injectAnimationCss requires document.head to exist.");
|
|
845
|
+
}
|
|
846
|
+
styleEl = targetDocument.createElement("style");
|
|
847
|
+
styleEl.id = styleId;
|
|
848
|
+
targetDocument.head.appendChild(styleEl);
|
|
849
|
+
}
|
|
850
|
+
styleEl.textContent = registry.extractCss();
|
|
851
|
+
}
|
|
852
|
+
var defaultRegistry, animations;
|
|
853
|
+
var init_src3 = __esm({
|
|
854
|
+
"packages/animate/src/index.ts"() {
|
|
855
|
+
init_binding();
|
|
856
|
+
init_preset();
|
|
857
|
+
init_registry();
|
|
858
|
+
init_registry();
|
|
859
|
+
defaultRegistry = createAnimationRegistry();
|
|
860
|
+
animations = createAnimationPresets(defaultRegistry);
|
|
861
|
+
}
|
|
862
|
+
});
|
|
12
863
|
|
|
13
|
-
// src/containerQuery.ts
|
|
864
|
+
// packages/core/src/containerQuery.ts
|
|
14
865
|
var CONTAINER_BREAKPOINTS = {
|
|
15
866
|
xs: "240px",
|
|
16
867
|
sm: "320px",
|
|
@@ -122,7 +973,7 @@ function injectContainerStyles(id, container, containerName) {
|
|
|
122
973
|
const css = buildContainerRules(id, container, containerName);
|
|
123
974
|
if (!css) return;
|
|
124
975
|
try {
|
|
125
|
-
const { batchedInject } =
|
|
976
|
+
const { batchedInject } = __require("@tailwind-styled/runtime-css/batched");
|
|
126
977
|
for (const rule of css.split("\n").filter(Boolean)) batchedInject(rule);
|
|
127
978
|
return;
|
|
128
979
|
} catch {
|
|
@@ -160,7 +1011,7 @@ function getContainerRegistry() {
|
|
|
160
1011
|
return containerRegistry;
|
|
161
1012
|
}
|
|
162
1013
|
|
|
163
|
-
// src/stateEngine.ts
|
|
1014
|
+
// packages/core/src/stateEngine.ts
|
|
164
1015
|
var stateRegistry = /* @__PURE__ */ new Map();
|
|
165
1016
|
if (typeof window !== "undefined") {
|
|
166
1017
|
window.__TW_STATE_REGISTRY__ = stateRegistry;
|
|
@@ -294,7 +1145,7 @@ function injectStateStyles(id, state) {
|
|
|
294
1145
|
}
|
|
295
1146
|
if (rules.length === 0) return;
|
|
296
1147
|
try {
|
|
297
|
-
const { batchedInject } =
|
|
1148
|
+
const { batchedInject } = __require("@tailwind-styled/runtime-css/batched");
|
|
298
1149
|
for (const rule of rules) batchedInject(rule);
|
|
299
1150
|
return;
|
|
300
1151
|
} catch {
|
|
@@ -336,7 +1187,7 @@ function getStateRegistry() {
|
|
|
336
1187
|
return stateRegistry;
|
|
337
1188
|
}
|
|
338
1189
|
|
|
339
|
-
// src/createComponent.ts
|
|
1190
|
+
// packages/core/src/createComponent.ts
|
|
340
1191
|
var ALWAYS_BLOCKED = /* @__PURE__ */ new Set(["base", "_ref", "state", "container", "containerName"]);
|
|
341
1192
|
function makeFilterProps(variantKeys) {
|
|
342
1193
|
return function filterProps(props) {
|
|
@@ -385,26 +1236,26 @@ function createComponent(tag, config) {
|
|
|
385
1236
|
const filterProps = makeFilterProps(variantKeySet);
|
|
386
1237
|
const tagStr = typeof tag === "string" ? tag : tag.displayName ?? "Component";
|
|
387
1238
|
if (isStatic || Object.keys(variants).length === 0) {
|
|
388
|
-
const Component2 =
|
|
1239
|
+
const Component2 = React.forwardRef((props, ref) => {
|
|
389
1240
|
const { className, ...rest } = props;
|
|
390
|
-
return
|
|
1241
|
+
return React.createElement(tag, {
|
|
391
1242
|
ref,
|
|
392
1243
|
...filterProps(rest),
|
|
393
|
-
className:
|
|
1244
|
+
className: twMerge(base, engineClasses, className)
|
|
394
1245
|
});
|
|
395
1246
|
});
|
|
396
1247
|
Component2.displayName = `tw.${tagStr}`;
|
|
397
1248
|
attachExtend(Component2, tag, base, config);
|
|
398
1249
|
return Component2;
|
|
399
1250
|
}
|
|
400
|
-
const Component =
|
|
1251
|
+
const Component = React.forwardRef((props, ref) => {
|
|
401
1252
|
const { className } = props;
|
|
402
1253
|
const variantClasses = resolveVariants(variants, props, defaultVariants);
|
|
403
1254
|
const compoundClasses = resolveCompound(compoundVariants, props);
|
|
404
|
-
return
|
|
1255
|
+
return React.createElement(tag, {
|
|
405
1256
|
ref,
|
|
406
1257
|
...filterProps(props),
|
|
407
|
-
className:
|
|
1258
|
+
className: twMerge(base, variantClasses, compoundClasses, engineClasses, className)
|
|
408
1259
|
});
|
|
409
1260
|
});
|
|
410
1261
|
Component.displayName = `tw.${tagStr}`;
|
|
@@ -414,7 +1265,7 @@ function createComponent(tag, config) {
|
|
|
414
1265
|
function attachExtend(Component, originalTag, base, config) {
|
|
415
1266
|
Component.extend = (strings, ..._exprs) => {
|
|
416
1267
|
const extra = strings.raw.join("").trim().replace(/\s+/g, " ");
|
|
417
|
-
const merged =
|
|
1268
|
+
const merged = twMerge(base, extra);
|
|
418
1269
|
return createComponent(
|
|
419
1270
|
originalTag,
|
|
420
1271
|
typeof config === "string" ? merged : { ...config, base: merged }
|
|
@@ -438,9 +1289,9 @@ function attachExtend(Component, originalTag, base, config) {
|
|
|
438
1289
|
};
|
|
439
1290
|
Component.animate = async (opts) => {
|
|
440
1291
|
try {
|
|
441
|
-
const { animate: animateFn } =
|
|
1292
|
+
const { animate: animateFn } = (init_src3(), __toCommonJS(src_exports));
|
|
442
1293
|
const animClass = await animateFn(opts);
|
|
443
|
-
const merged =
|
|
1294
|
+
const merged = twMerge(base, animClass);
|
|
444
1295
|
return createComponent(
|
|
445
1296
|
originalTag,
|
|
446
1297
|
typeof config === "string" ? merged : { ...config, base: merged }
|
|
@@ -467,23 +1318,23 @@ function cv(config) {
|
|
|
467
1318
|
if (match) classes.push(cls);
|
|
468
1319
|
}
|
|
469
1320
|
if (props.className) classes.push(props.className);
|
|
470
|
-
return
|
|
1321
|
+
return twMerge(...classes);
|
|
471
1322
|
};
|
|
472
1323
|
}
|
|
473
1324
|
function cn(...inputs) {
|
|
474
1325
|
return inputs.filter(Boolean).join(" ").replace(/\s+/g, " ").trim();
|
|
475
1326
|
}
|
|
476
1327
|
function cx(...inputs) {
|
|
477
|
-
return
|
|
1328
|
+
return twMerge(...inputs.filter(Boolean));
|
|
478
1329
|
}
|
|
479
1330
|
var cxm = cx;
|
|
480
|
-
function
|
|
1331
|
+
function normalizeClassInput2(classLists) {
|
|
481
1332
|
return classLists.filter(Boolean).map((v) => String(v).trim()).filter((v) => v.length > 0);
|
|
482
1333
|
}
|
|
483
1334
|
function createTwMerge(_options = {}) {
|
|
484
1335
|
return function twMerge5(...classLists) {
|
|
485
|
-
const clean =
|
|
486
|
-
return
|
|
1336
|
+
const clean = normalizeClassInput2(classLists);
|
|
1337
|
+
return twMerge(clean.join(" "));
|
|
487
1338
|
};
|
|
488
1339
|
}
|
|
489
1340
|
var twMerge4 = createTwMerge();
|
|
@@ -497,7 +1348,7 @@ function mergeWithRules(rules, ...classLists) {
|
|
|
497
1348
|
return classes.join(" ");
|
|
498
1349
|
}
|
|
499
1350
|
|
|
500
|
-
// src/liveTokenEngine.ts
|
|
1351
|
+
// packages/core/src/liveTokenEngine.ts
|
|
501
1352
|
var _currentTokens = {};
|
|
502
1353
|
var _subscribers = /* @__PURE__ */ new Set();
|
|
503
1354
|
var _styleEl = null;
|
|
@@ -611,7 +1462,7 @@ function generateTokenCssString() {
|
|
|
611
1462
|
function createUseTokens() {
|
|
612
1463
|
let useState, useEffect;
|
|
613
1464
|
try {
|
|
614
|
-
const react =
|
|
1465
|
+
const react = __require("react");
|
|
615
1466
|
useState = react.useState;
|
|
616
1467
|
useEffect = react.useEffect;
|
|
617
1468
|
} catch {
|
|
@@ -630,7 +1481,7 @@ function createUseTokens() {
|
|
|
630
1481
|
};
|
|
631
1482
|
}
|
|
632
1483
|
|
|
633
|
-
// src/styledSystem.ts
|
|
1484
|
+
// packages/core/src/styledSystem.ts
|
|
634
1485
|
function tokenVarName(prefix, group, name) {
|
|
635
1486
|
return `--${prefix}-${group}-${name}`;
|
|
636
1487
|
}
|
|
@@ -639,8 +1490,8 @@ function tokenVarRef(prefix, group, name) {
|
|
|
639
1490
|
}
|
|
640
1491
|
function resolveTokenRef(tokens, prefix, value) {
|
|
641
1492
|
if (value.startsWith("token:")) {
|
|
642
|
-
const
|
|
643
|
-
const [group, name] =
|
|
1493
|
+
const path2 = value.slice(6);
|
|
1494
|
+
const [group, name] = path2.split(".");
|
|
644
1495
|
if (group && name && tokens[group]?.[name] !== void 0) {
|
|
645
1496
|
return tokenVarRef(prefix, group, name);
|
|
646
1497
|
}
|
|
@@ -738,13 +1589,13 @@ function createStyledSystem(config) {
|
|
|
738
1589
|
return createComponent(tag, merged);
|
|
739
1590
|
};
|
|
740
1591
|
}
|
|
741
|
-
function token(
|
|
742
|
-
const [group, name] =
|
|
743
|
-
if (!group || !name) return
|
|
1592
|
+
function token(path2) {
|
|
1593
|
+
const [group, name] = path2.split(".");
|
|
1594
|
+
if (!group || !name) return path2;
|
|
744
1595
|
return tokenVarRef(prefix, group, name);
|
|
745
1596
|
}
|
|
746
|
-
function rawToken(
|
|
747
|
-
const [group, name] =
|
|
1597
|
+
function rawToken(path2) {
|
|
1598
|
+
const [group, name] = path2.split(".");
|
|
748
1599
|
if (!group || !name) return void 0;
|
|
749
1600
|
return tokens[group]?.[name];
|
|
750
1601
|
}
|
|
@@ -784,7 +1635,7 @@ function createStyledSystem(config) {
|
|
|
784
1635
|
});
|
|
785
1636
|
}
|
|
786
1637
|
|
|
787
|
-
// src/styled.ts
|
|
1638
|
+
// packages/core/src/styled.ts
|
|
788
1639
|
function resolveVariantClass(options, props) {
|
|
789
1640
|
const out = [];
|
|
790
1641
|
const variants = options.variants ?? {};
|
|
@@ -815,7 +1666,7 @@ function styled(options) {
|
|
|
815
1666
|
};
|
|
816
1667
|
}
|
|
817
1668
|
|
|
818
|
-
// src/twProxy.ts
|
|
1669
|
+
// packages/core/src/twProxy.ts
|
|
819
1670
|
function parseTemplate(strings, exprs) {
|
|
820
1671
|
return strings.raw.reduce((acc, str, i) => {
|
|
821
1672
|
const expr = exprs[i];
|
|
@@ -967,7 +1818,7 @@ var tw = Object.assign(twCallable, tagFactories, {
|
|
|
967
1818
|
server
|
|
968
1819
|
});
|
|
969
1820
|
|
|
970
|
-
// src/twTheme.ts
|
|
1821
|
+
// packages/core/src/twTheme.ts
|
|
971
1822
|
function cssVar(varName, fallback) {
|
|
972
1823
|
const name = varName.startsWith("--") ? varName : `--${varName}`;
|
|
973
1824
|
return fallback ? `var(${name}, ${fallback})` : `var(${name})`;
|
|
@@ -1032,12 +1883,12 @@ var v4Tokens = {
|
|
|
1032
1883
|
fontMono: twVar("font", "font-mono")
|
|
1033
1884
|
};
|
|
1034
1885
|
|
|
1035
|
-
// src/parser.ts
|
|
1036
|
-
var _getNodePath = () => typeof
|
|
1886
|
+
// packages/core/src/parser.ts
|
|
1887
|
+
var _getNodePath = () => typeof __require !== "undefined" ? __require("path") : null;
|
|
1037
1888
|
var _getCreateRequire = () => {
|
|
1038
|
-
if (typeof
|
|
1889
|
+
if (typeof __require !== "undefined") {
|
|
1039
1890
|
try {
|
|
1040
|
-
return
|
|
1891
|
+
return __require("module").createRequire;
|
|
1041
1892
|
} catch {
|
|
1042
1893
|
return null;
|
|
1043
1894
|
}
|
|
@@ -1057,7 +1908,7 @@ function getBinding() {
|
|
|
1057
1908
|
const nodePath = _getNodePath();
|
|
1058
1909
|
const nodeCreateRequire = _getCreateRequire();
|
|
1059
1910
|
if (!nodePath) return _binding = null;
|
|
1060
|
-
const req = typeof
|
|
1911
|
+
const req = typeof __require === "function" ? __require : nodeCreateRequire ? nodeCreateRequire(nodePath.join(runtimeDir, "noop.cjs")) : null;
|
|
1061
1912
|
if (!req) return _binding = null;
|
|
1062
1913
|
const candidates = [
|
|
1063
1914
|
nodePath.resolve(process.cwd(), "native", "tailwind_styled_parser.node"),
|
|
@@ -1204,7 +2055,7 @@ function parseTailwindClasses(input) {
|
|
|
1204
2055
|
return splitClassListJS(input).map(parseClassTokenJS);
|
|
1205
2056
|
}
|
|
1206
2057
|
|
|
1207
|
-
// src/themeReader.ts
|
|
2058
|
+
// packages/core/src/themeReader.ts
|
|
1208
2059
|
var THEME_BLOCK_RE = /@theme\s*\{([\s\S]*?)\}/g;
|
|
1209
2060
|
var CSS_VAR_RE = /--([a-zA-Z0-9_-]+)\s*:\s*([^;]+);/g;
|
|
1210
2061
|
var cache = /* @__PURE__ */ new Map();
|
|
@@ -1306,48 +2157,6 @@ function clearThemeReaderCache() {
|
|
|
1306
2157
|
cache.clear();
|
|
1307
2158
|
}
|
|
1308
2159
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
exports.containerRef = tokenRef;
|
|
1313
|
-
exports.createComponent = createComponent;
|
|
1314
|
-
exports.createStyledSystem = createStyledSystem;
|
|
1315
|
-
exports.createTheme = createTheme;
|
|
1316
|
-
exports.createTwMerge = createTwMerge;
|
|
1317
|
-
exports.createUseTokens = createUseTokens;
|
|
1318
|
-
exports.cssVar = cssVar;
|
|
1319
|
-
exports.cv = cv;
|
|
1320
|
-
exports.cx = cx;
|
|
1321
|
-
exports.cxm = cxm;
|
|
1322
|
-
exports.extractThemeFromCSS = extractThemeFromCSS;
|
|
1323
|
-
exports.generateContainerCss = generateContainerCss;
|
|
1324
|
-
exports.generateStateCss = generateStateCss;
|
|
1325
|
-
exports.generateTokenCssString = generateTokenCssString;
|
|
1326
|
-
exports.generateTypeDefinitions = generateTypeDefinitions;
|
|
1327
|
-
exports.getContainerRegistry = getContainerRegistry;
|
|
1328
|
-
exports.getStateRegistry = getStateRegistry;
|
|
1329
|
-
exports.getToken = getToken;
|
|
1330
|
-
exports.getTokens = getTokens;
|
|
1331
|
-
exports.liveToken = liveToken;
|
|
1332
|
-
exports.mergeWithRules = mergeWithRules;
|
|
1333
|
-
exports.parseClassToken = parseClassToken;
|
|
1334
|
-
exports.parseTailwindClasses = parseTailwindClasses;
|
|
1335
|
-
exports.processContainer = processContainer;
|
|
1336
|
-
exports.processState = processState;
|
|
1337
|
-
exports.resolveStyledClassName = resolveStyledClassName;
|
|
1338
|
-
exports.resolveThemeValue = resolveThemeValue;
|
|
1339
|
-
exports.server = server;
|
|
1340
|
-
exports.setToken = setToken;
|
|
1341
|
-
exports.setTokens = setTokens;
|
|
1342
|
-
exports.splitClassList = splitClassList;
|
|
1343
|
-
exports.styled = styled;
|
|
1344
|
-
exports.subscribeTokens = subscribeTokens;
|
|
1345
|
-
exports.t = t;
|
|
1346
|
-
exports.tokenRef = tokenRef;
|
|
1347
|
-
exports.tokenVar = tokenVar;
|
|
1348
|
-
exports.tw = tw;
|
|
1349
|
-
exports.twMerge = twMerge4;
|
|
1350
|
-
exports.twVar = twVar;
|
|
1351
|
-
exports.v4Tokens = v4Tokens;
|
|
1352
|
-
//# sourceMappingURL=index.cjs.map
|
|
1353
|
-
//# sourceMappingURL=index.cjs.map
|
|
2160
|
+
export { applyTokenSet, clearThemeReaderCache, cn, tokenRef as containerRef, createComponent, createStyledSystem, createTheme, createTwMerge, createUseTokens, cssVar, cv, cx, cxm, extractThemeFromCSS, generateContainerCss, generateStateCss, generateTokenCssString, generateTypeDefinitions, getContainerRegistry, getStateRegistry, getToken, getTokens, liveToken, mergeWithRules, parseClassToken, parseTailwindClasses, processContainer, processState, resolveStyledClassName, resolveThemeValue, server, setToken, setTokens, splitClassList, styled, subscribeTokens, t, tokenRef, tokenVar, tw, twMerge4 as twMerge, twVar, v4Tokens };
|
|
2161
|
+
//# sourceMappingURL=index.mjs.map
|
|
2162
|
+
//# sourceMappingURL=index.mjs.map
|