tailwind-styled-v4 5.0.12 → 5.0.13
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/README.md +100 -4
- package/dist/animate.d.mts +4 -0
- package/dist/animate.d.ts +4 -0
- package/dist/animate.js +22 -0
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +22 -0
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +42 -0
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +42 -0
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +142 -0
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +142 -0
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.d.mts +1045 -991
- package/dist/compiler.d.ts +1045 -991
- package/dist/compiler.js +888 -922
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +873 -908
- package/dist/compiler.mjs.map +1 -1
- package/dist/engine.js +1637 -340
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +1636 -339
- package/dist/engine.mjs.map +1 -1
- package/dist/index.js +1636 -339
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1636 -339
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +1060 -970
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +1060 -970
- package/dist/next.mjs.map +1 -1
- package/dist/shared.js +1607 -310
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +1607 -310
- package/dist/shared.mjs.map +1 -1
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs.map +1 -1
- package/dist/turbopackLoader.js +1610 -313
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +1610 -313
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +142 -0
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +142 -0
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +1622 -325
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +1622 -325
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +66 -15
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +66 -15
- package/dist/webpackLoader.mjs.map +1 -1
- package/native/tailwind-styled-native.node +0 -0
- package/native/tailwind-styled-native.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/dist/webpackLoader.mjs
CHANGED
|
@@ -189,6 +189,42 @@ Tried paths: ${result.tried.join("\n")}`);
|
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
|
+
|
|
193
|
+
// packages/domain/compiler/src/compiler/index.ts
|
|
194
|
+
var init_compiler = __esm({
|
|
195
|
+
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
// packages/domain/compiler/src/parser/index.ts
|
|
200
|
+
var init_parser = __esm({
|
|
201
|
+
"packages/domain/compiler/src/parser/index.ts"() {
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
// packages/domain/compiler/src/analyzer/index.ts
|
|
206
|
+
var init_analyzer = __esm({
|
|
207
|
+
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
// packages/domain/compiler/src/cache/index.ts
|
|
212
|
+
var init_cache = __esm({
|
|
213
|
+
"packages/domain/compiler/src/cache/index.ts"() {
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
// packages/domain/compiler/src/redis/index.ts
|
|
218
|
+
var init_redis = __esm({
|
|
219
|
+
"packages/domain/compiler/src/redis/index.ts"() {
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
// packages/domain/compiler/src/watch/index.ts
|
|
224
|
+
var init_watch = __esm({
|
|
225
|
+
"packages/domain/compiler/src/watch/index.ts"() {
|
|
226
|
+
}
|
|
227
|
+
});
|
|
192
228
|
function _layoutClassesToCss(classes) {
|
|
193
229
|
const native = getNativeBridge();
|
|
194
230
|
if (!native?.layoutClassesToCss) {
|
|
@@ -227,6 +263,12 @@ var transformSource, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile,
|
|
|
227
263
|
var init_src2 = __esm({
|
|
228
264
|
"packages/domain/compiler/src/index.ts"() {
|
|
229
265
|
init_nativeBridge();
|
|
266
|
+
init_compiler();
|
|
267
|
+
init_parser();
|
|
268
|
+
init_analyzer();
|
|
269
|
+
init_cache();
|
|
270
|
+
init_redis();
|
|
271
|
+
init_watch();
|
|
230
272
|
transformSource = (source, opts) => {
|
|
231
273
|
const native = getNativeBridge();
|
|
232
274
|
if (!native?.transformSource) {
|
|
@@ -260,7 +302,8 @@ var init_src2 = __esm({
|
|
|
260
302
|
if (containerCss) cssChunks.push(containerCss);
|
|
261
303
|
const combined = cssChunks.join("\n").trim();
|
|
262
304
|
if (combined) staticCss = combined;
|
|
263
|
-
} catch {
|
|
305
|
+
} catch (err) {
|
|
306
|
+
console.debug("Static CSS extraction warning:", err);
|
|
264
307
|
}
|
|
265
308
|
return {
|
|
266
309
|
code: result?.code || "",
|
|
@@ -289,23 +332,25 @@ var init_src2 = __esm({
|
|
|
289
332
|
}
|
|
290
333
|
return native.extractTwStateConfigs(source, filename);
|
|
291
334
|
};
|
|
292
|
-
generateStaticStateCss = (
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
335
|
+
generateStaticStateCss = (entries, _themeConfig) => {
|
|
336
|
+
const rules = [];
|
|
337
|
+
for (const entry of entries) {
|
|
338
|
+
const stateConfig = JSON.parse(entry.statesJson);
|
|
339
|
+
for (const [stateName, classes] of Object.entries(stateConfig)) {
|
|
340
|
+
rules.push({
|
|
341
|
+
selector: `.${entry.componentName}[data-state="${stateName}"]`,
|
|
342
|
+
declarations: classes,
|
|
343
|
+
cssRule: `.${entry.componentName}[data-state="${stateName}"]{${classes}}`,
|
|
344
|
+
componentName: entry.componentName,
|
|
345
|
+
stateName
|
|
346
|
+
});
|
|
347
|
+
}
|
|
296
348
|
}
|
|
297
|
-
return
|
|
349
|
+
return rules;
|
|
298
350
|
};
|
|
299
351
|
extractAndGenerateStateCss = (source, filename) => {
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
const configs = extractTwStateConfigs(source, filename);
|
|
303
|
-
if (configs.length === 0) return [];
|
|
304
|
-
return generateStaticStateCss(
|
|
305
|
-
configs.map((c) => ({ tag: c.tag, componentName: c.componentName, statesJson: c.statesJson }))
|
|
306
|
-
);
|
|
307
|
-
}
|
|
308
|
-
return native.extractAndGenerateStateCss(source, filename);
|
|
352
|
+
const entries = extractTwStateConfigs(source, filename);
|
|
353
|
+
return generateStaticStateCss(entries);
|
|
309
354
|
};
|
|
310
355
|
}
|
|
311
356
|
});
|
|
@@ -314,6 +359,12 @@ var init_src2 = __esm({
|
|
|
314
359
|
var init_internal = __esm({
|
|
315
360
|
"packages/domain/compiler/src/internal.ts"() {
|
|
316
361
|
init_src2();
|
|
362
|
+
init_compiler();
|
|
363
|
+
init_parser();
|
|
364
|
+
init_analyzer();
|
|
365
|
+
init_cache();
|
|
366
|
+
init_redis();
|
|
367
|
+
init_watch();
|
|
317
368
|
}
|
|
318
369
|
});
|
|
319
370
|
|