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
package/dist/animate.js
CHANGED
|
@@ -1,78 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import { createRequire } from 'module';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { fileURLToPath } from 'url';
|
|
6
|
-
import 'crypto';
|
|
7
|
-
import '@tailwind-styled/scanner';
|
|
1
|
+
'use strict';
|
|
8
2
|
|
|
9
|
-
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
3
|
+
var fs = require('fs');
|
|
4
|
+
var module$1 = require('module');
|
|
5
|
+
var os = require('os');
|
|
6
|
+
var path = require('path');
|
|
7
|
+
var url = require('url');
|
|
8
|
+
|
|
9
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
13
|
+
var os__default = /*#__PURE__*/_interopDefault(os);
|
|
14
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
15
|
+
|
|
16
|
+
/* tailwind-styled-v4 v5.0.1 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
17
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
18
|
+
var __esm = (fn, res) => function __init() {
|
|
19
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// packages/shared/src/cache.ts
|
|
23
|
+
var LRUCache;
|
|
24
|
+
var init_cache = __esm({
|
|
25
|
+
"packages/shared/src/cache.ts"() {
|
|
26
|
+
LRUCache = class {
|
|
27
|
+
constructor(max = 256, ttlMs = null) {
|
|
28
|
+
this.map = /* @__PURE__ */ new Map();
|
|
29
|
+
this.max = max;
|
|
30
|
+
this.ttlMs = ttlMs;
|
|
31
|
+
}
|
|
32
|
+
get(key) {
|
|
33
|
+
const entry = this.map.get(key);
|
|
34
|
+
if (!entry) return void 0;
|
|
35
|
+
if (this.ttlMs !== null && Date.now() - entry.ts > this.ttlMs) {
|
|
36
|
+
this.map.delete(key);
|
|
37
|
+
return void 0;
|
|
38
|
+
}
|
|
39
|
+
this.map.delete(key);
|
|
40
|
+
this.map.set(key, entry);
|
|
41
|
+
return entry.value;
|
|
42
|
+
}
|
|
43
|
+
set(key, value) {
|
|
44
|
+
if (this.map.has(key)) this.map.delete(key);
|
|
45
|
+
else if (this.map.size >= this.max) {
|
|
46
|
+
this.map.delete(this.map.keys().next().value);
|
|
47
|
+
}
|
|
48
|
+
this.map.set(key, { value, ts: Date.now() });
|
|
49
|
+
}
|
|
50
|
+
has(key) {
|
|
51
|
+
return this.get(key) !== void 0;
|
|
52
|
+
}
|
|
53
|
+
delete(key) {
|
|
54
|
+
this.map.delete(key);
|
|
55
|
+
}
|
|
56
|
+
clear() {
|
|
57
|
+
this.map.clear();
|
|
58
|
+
}
|
|
59
|
+
get size() {
|
|
60
|
+
return this.map.size;
|
|
61
|
+
}
|
|
62
|
+
keys() {
|
|
63
|
+
return this.map.keys();
|
|
64
|
+
}
|
|
65
|
+
*values() {
|
|
66
|
+
for (const entry of this.map.values()) {
|
|
67
|
+
yield entry.value;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
*entries() {
|
|
71
|
+
for (const [key, entry] of this.map.entries()) {
|
|
72
|
+
yield [key, entry.value];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
};
|
|
53
76
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
77
|
+
});
|
|
78
|
+
function getPlatformExtension() {
|
|
79
|
+
const platform = os__default.default.platform();
|
|
80
|
+
switch (platform) {
|
|
81
|
+
case "win32":
|
|
82
|
+
return ".node";
|
|
83
|
+
case "darwin":
|
|
84
|
+
return ".dylib";
|
|
85
|
+
case "linux":
|
|
86
|
+
return ".so";
|
|
87
|
+
default:
|
|
88
|
+
return ".node";
|
|
58
89
|
}
|
|
59
|
-
}
|
|
90
|
+
}
|
|
60
91
|
function formatErrorMessage(error) {
|
|
61
92
|
return error instanceof Error ? error.message : String(error);
|
|
62
93
|
}
|
|
63
94
|
function resolveRuntimeDir(dirnameValue, moduleImportUrl) {
|
|
64
95
|
if (typeof dirnameValue === "string" && dirnameValue.length > 0) return dirnameValue;
|
|
65
|
-
return
|
|
96
|
+
return path__default.default.dirname(url.fileURLToPath(moduleImportUrl));
|
|
66
97
|
}
|
|
67
98
|
function resolveNativeBindingCandidates(options) {
|
|
68
99
|
const out = [];
|
|
69
|
-
const envVarNames = options.envVarNames ?? [];
|
|
100
|
+
const envVarNames = options.envVarNames ?? ["TWS_NATIVE_PATH"];
|
|
70
101
|
for (const envVarName of envVarNames) {
|
|
71
102
|
const raw = process.env[envVarName]?.trim();
|
|
72
103
|
if (!raw) continue;
|
|
73
|
-
const resolved =
|
|
104
|
+
const resolved = path__default.default.resolve(raw);
|
|
74
105
|
if (options.enforceNodeExtensionForEnvPath) {
|
|
75
|
-
if (
|
|
106
|
+
if (path__default.default.extname(resolved).toLowerCase() !== ".node") {
|
|
76
107
|
throw new Error(
|
|
77
108
|
`Invalid native binding path from ${envVarName}="${raw}". Expected a .node file.`
|
|
78
109
|
);
|
|
@@ -81,8 +112,10 @@ function resolveNativeBindingCandidates(options) {
|
|
|
81
112
|
out.push(resolved);
|
|
82
113
|
}
|
|
83
114
|
if (options.includeDefaultCandidates !== false) {
|
|
84
|
-
|
|
85
|
-
|
|
115
|
+
const ext = options.platformExtension ?? getPlatformExtension();
|
|
116
|
+
const defaultBindingName = `tailwind_styled_parser${ext}`;
|
|
117
|
+
out.push(path__default.default.resolve(process.cwd(), "native", defaultBindingName));
|
|
118
|
+
out.push(path__default.default.resolve(options.runtimeDir, "..", "..", "..", "native", defaultBindingName));
|
|
86
119
|
}
|
|
87
120
|
return Array.from(new Set(out));
|
|
88
121
|
}
|
|
@@ -104,10 +137,10 @@ function createDebugLogger(namespace, label = namespace) {
|
|
|
104
137
|
};
|
|
105
138
|
}
|
|
106
139
|
function loadNativeBinding(options) {
|
|
107
|
-
const req = createRequire(
|
|
140
|
+
const req = module$1.createRequire(path__default.default.join(options.runtimeDir, "noop.cjs"));
|
|
108
141
|
const loadErrors = [];
|
|
109
142
|
for (const candidate of options.candidates) {
|
|
110
|
-
if (!
|
|
143
|
+
if (!fs__default.default.existsSync(candidate)) continue;
|
|
111
144
|
try {
|
|
112
145
|
const mod = req(candidate);
|
|
113
146
|
if (options.isValid(mod)) {
|
|
@@ -134,33 +167,21 @@ function loadNativeBinding(options) {
|
|
|
134
167
|
loadErrors
|
|
135
168
|
};
|
|
136
169
|
}
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
return process.env.TWS_DEBUG_SCANNER === "1" ? "debug" : "info";
|
|
142
|
-
}
|
|
143
|
-
function createLogger(prefix, level) {
|
|
144
|
-
let currentLevel = getEnvLevel();
|
|
145
|
-
const log = (msgLevel, stream, args) => {
|
|
146
|
-
if (LEVELS[msgLevel] > LEVELS[currentLevel]) return;
|
|
147
|
-
const line = `[${prefix}] ${args.map(String).join(" ")}
|
|
148
|
-
`;
|
|
149
|
-
process[stream].write(line);
|
|
150
|
-
};
|
|
151
|
-
return {
|
|
152
|
-
error: (...a) => log("error", "stderr", a),
|
|
153
|
-
warn: (...a) => log("warn", "stderr", a),
|
|
154
|
-
info: (...a) => log("info", "stdout", a),
|
|
155
|
-
debug: (...a) => log("debug", "stderr", a),
|
|
156
|
-
setLevel: (l) => {
|
|
157
|
-
currentLevel = l;
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
createLogger("tailwind-styled");
|
|
170
|
+
var init_nativeBinding = __esm({
|
|
171
|
+
"packages/shared/src/nativeBinding.ts"() {
|
|
172
|
+
}
|
|
173
|
+
});
|
|
162
174
|
|
|
163
|
-
//
|
|
175
|
+
// packages/shared/src/index.ts
|
|
176
|
+
var init_src = __esm({
|
|
177
|
+
"packages/shared/src/index.ts"() {
|
|
178
|
+
init_cache();
|
|
179
|
+
init_nativeBinding();
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// packages/animate/src/binding.ts
|
|
184
|
+
init_src();
|
|
164
185
|
var bindingPromise = null;
|
|
165
186
|
var DEBUG_NAMESPACE = "tailwind-styled:animate";
|
|
166
187
|
var debugLog = createDebugLogger(DEBUG_NAMESPACE, "tailwind-styled/animate");
|
|
@@ -177,11 +198,13 @@ function resolveBindingCandidates(runtimeDir) {
|
|
|
177
198
|
}
|
|
178
199
|
function loadAnimateBinding() {
|
|
179
200
|
if (process.env.TWS_NO_NATIVE === "1" || process.env.TWS_NO_RUST === "1") {
|
|
180
|
-
throw new Error(
|
|
201
|
+
throw new Error(
|
|
202
|
+
"Native animate backend is required in v5. TWS_NO_NATIVE/TWS_NO_RUST is not supported."
|
|
203
|
+
);
|
|
181
204
|
}
|
|
182
205
|
const runtimeDir = resolveRuntimeDir(
|
|
183
206
|
typeof __dirname === "string" ? __dirname : void 0,
|
|
184
|
-
|
|
207
|
+
(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('animate.js', document.baseURI).href))
|
|
185
208
|
);
|
|
186
209
|
const candidates = resolveBindingCandidates(runtimeDir);
|
|
187
210
|
const { binding, loadErrors, loadedPath } = loadNativeBinding({
|
|
@@ -222,7 +245,8 @@ async function initAnimate() {
|
|
|
222
245
|
await getAnimateBinding();
|
|
223
246
|
}
|
|
224
247
|
|
|
225
|
-
//
|
|
248
|
+
// packages/animate/src/preset.ts
|
|
249
|
+
init_src();
|
|
226
250
|
var DEFAULT_PRESET_CACHE_LIMIT = 32;
|
|
227
251
|
function createAnimationPresets(registry) {
|
|
228
252
|
const cache = new LRUCache(DEFAULT_PRESET_CACHE_LIMIT);
|
|
@@ -328,11 +352,19 @@ function createAnimationPresets(registry) {
|
|
|
328
352
|
)
|
|
329
353
|
};
|
|
330
354
|
}
|
|
355
|
+
|
|
356
|
+
// packages/analyzer/src/binding.ts
|
|
357
|
+
init_src();
|
|
358
|
+
|
|
359
|
+
// packages/analyzer/src/utils.ts
|
|
360
|
+
init_src();
|
|
331
361
|
var DEBUG_NAMESPACE2 = "tailwind-styled:analyzer";
|
|
332
362
|
function formatErrorMessage2(error) {
|
|
333
363
|
return error instanceof Error ? error.message : String(error);
|
|
334
364
|
}
|
|
335
365
|
var debugLog2 = createDebugLogger(DEBUG_NAMESPACE2, "tailwind-styled/analyzer");
|
|
366
|
+
|
|
367
|
+
// packages/analyzer/src/binding.ts
|
|
336
368
|
var bindingCache;
|
|
337
369
|
var bindingCandidateCache = [];
|
|
338
370
|
var bindingLoadErrorsCache = [];
|
|
@@ -353,7 +385,7 @@ function getNativeBinding() {
|
|
|
353
385
|
}
|
|
354
386
|
const runtimeDir = resolveRuntimeDir(
|
|
355
387
|
typeof __dirname === "string" ? __dirname : void 0,
|
|
356
|
-
|
|
388
|
+
(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('animate.js', document.baseURI).href))
|
|
357
389
|
);
|
|
358
390
|
const candidates = resolveNativeBindingCandidates({
|
|
359
391
|
runtimeDir,
|
|
@@ -409,6 +441,8 @@ function requireNativeCssCompiler() {
|
|
|
409
441
|
const loadedPathText = loadedBindingPathCache ? ` (${loadedBindingPathCache})` : "";
|
|
410
442
|
throw new Error(`Native analyzer compileCss binding is missing in v5${loadedPathText}.`);
|
|
411
443
|
}
|
|
444
|
+
|
|
445
|
+
// packages/analyzer/src/classToCss.ts
|
|
412
446
|
function normalizeClassInput(input) {
|
|
413
447
|
if (typeof input === "string") {
|
|
414
448
|
return input.split(/\s+/).map((item) => item.trim()).filter((item) => item.length > 0);
|
|
@@ -515,7 +549,8 @@ async function classToCss(input, options = {}) {
|
|
|
515
549
|
};
|
|
516
550
|
}
|
|
517
551
|
|
|
518
|
-
//
|
|
552
|
+
// packages/animate/src/registry.ts
|
|
553
|
+
init_src();
|
|
519
554
|
var DEFAULT_DURATION = 300;
|
|
520
555
|
var DEFAULT_EASING = "ease-out";
|
|
521
556
|
var DEFAULT_DELAY = 0;
|
|
@@ -570,7 +605,9 @@ async function validateTailwindClasses(entries) {
|
|
|
570
605
|
if (typeof binding.compileCss === "function") {
|
|
571
606
|
const compiled = binding.compileCss(classes, null);
|
|
572
607
|
if (!compiled) {
|
|
573
|
-
failures.push(
|
|
608
|
+
failures.push(
|
|
609
|
+
`Animation ${entry.context} failed validation: native compileCss returned no result.`
|
|
610
|
+
);
|
|
574
611
|
continue;
|
|
575
612
|
}
|
|
576
613
|
if (compiled.unknownClasses.length > 0) {
|
|
@@ -592,7 +629,9 @@ async function validateTailwindClasses(entries) {
|
|
|
592
629
|
}
|
|
593
630
|
const issues = [];
|
|
594
631
|
for (const [context, classes] of unknownByContext.entries()) {
|
|
595
|
-
issues.push(
|
|
632
|
+
issues.push(
|
|
633
|
+
`Animation ${context} contains unknown Tailwind classes: ${Array.from(classes).join(", ")}`
|
|
634
|
+
);
|
|
596
635
|
}
|
|
597
636
|
issues.push(...failures);
|
|
598
637
|
if (issues.length > 0) {
|
|
@@ -700,7 +739,7 @@ function createAnimationRegistry(options = {}) {
|
|
|
700
739
|
return new AnimationRegistry(options);
|
|
701
740
|
}
|
|
702
741
|
|
|
703
|
-
//
|
|
742
|
+
// packages/animate/src/index.ts
|
|
704
743
|
var defaultRegistry = createAnimationRegistry();
|
|
705
744
|
async function initAnimate2() {
|
|
706
745
|
await initAnimate();
|
|
@@ -747,6 +786,17 @@ function injectAnimationCss(registry = defaultRegistry, options = {}) {
|
|
|
747
786
|
}
|
|
748
787
|
var animations = createAnimationPresets(defaultRegistry);
|
|
749
788
|
|
|
750
|
-
|
|
789
|
+
exports.AnimationRegistry = AnimationRegistry;
|
|
790
|
+
exports.animate = animate;
|
|
791
|
+
exports.animations = animations;
|
|
792
|
+
exports.compileAnimation = compileAnimation;
|
|
793
|
+
exports.compileKeyframes = compileKeyframes;
|
|
794
|
+
exports.createAnimationRegistry = createAnimationRegistry;
|
|
795
|
+
exports.extractAnimationCss = extractAnimationCss;
|
|
796
|
+
exports.getDefaultAnimationRegistry = getDefaultAnimationRegistry;
|
|
797
|
+
exports.initAnimate = initAnimate2;
|
|
798
|
+
exports.injectAnimationCss = injectAnimationCss;
|
|
799
|
+
exports.keyframes = keyframes;
|
|
800
|
+
exports.resetAnimationRegistry = resetAnimationRegistry;
|
|
751
801
|
//# sourceMappingURL=animate.js.map
|
|
752
802
|
//# sourceMappingURL=animate.js.map
|