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/tw.js
CHANGED
|
@@ -6119,10 +6119,52 @@ Tried paths: ${result.tried.join("\n")}`);
|
|
|
6119
6119
|
}
|
|
6120
6120
|
}
|
|
6121
6121
|
});
|
|
6122
|
+
|
|
6123
|
+
// packages/domain/compiler/src/compiler/index.ts
|
|
6124
|
+
var init_compiler = __esm({
|
|
6125
|
+
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
6126
|
+
}
|
|
6127
|
+
});
|
|
6128
|
+
|
|
6129
|
+
// packages/domain/compiler/src/parser/index.ts
|
|
6130
|
+
var init_parser = __esm({
|
|
6131
|
+
"packages/domain/compiler/src/parser/index.ts"() {
|
|
6132
|
+
}
|
|
6133
|
+
});
|
|
6134
|
+
|
|
6135
|
+
// packages/domain/compiler/src/analyzer/index.ts
|
|
6136
|
+
var init_analyzer = __esm({
|
|
6137
|
+
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
6138
|
+
}
|
|
6139
|
+
});
|
|
6140
|
+
|
|
6141
|
+
// packages/domain/compiler/src/cache/index.ts
|
|
6142
|
+
var init_cache = __esm({
|
|
6143
|
+
"packages/domain/compiler/src/cache/index.ts"() {
|
|
6144
|
+
}
|
|
6145
|
+
});
|
|
6146
|
+
|
|
6147
|
+
// packages/domain/compiler/src/redis/index.ts
|
|
6148
|
+
var init_redis = __esm({
|
|
6149
|
+
"packages/domain/compiler/src/redis/index.ts"() {
|
|
6150
|
+
}
|
|
6151
|
+
});
|
|
6152
|
+
|
|
6153
|
+
// packages/domain/compiler/src/watch/index.ts
|
|
6154
|
+
var init_watch = __esm({
|
|
6155
|
+
"packages/domain/compiler/src/watch/index.ts"() {
|
|
6156
|
+
}
|
|
6157
|
+
});
|
|
6122
6158
|
var compileCssFromClasses;
|
|
6123
6159
|
var init_src4 = __esm({
|
|
6124
6160
|
"packages/domain/compiler/src/index.ts"() {
|
|
6125
6161
|
init_nativeBridge();
|
|
6162
|
+
init_compiler();
|
|
6163
|
+
init_parser();
|
|
6164
|
+
init_analyzer();
|
|
6165
|
+
init_cache();
|
|
6166
|
+
init_redis();
|
|
6167
|
+
init_watch();
|
|
6126
6168
|
compileCssFromClasses = (classes, prefix) => {
|
|
6127
6169
|
const native = getNativeBridge();
|
|
6128
6170
|
if (!native?.transformSource) {
|
|
@@ -6141,6 +6183,12 @@ var init_src4 = __esm({
|
|
|
6141
6183
|
var init_internal = __esm({
|
|
6142
6184
|
"packages/domain/compiler/src/internal.ts"() {
|
|
6143
6185
|
init_src4();
|
|
6186
|
+
init_compiler();
|
|
6187
|
+
init_parser();
|
|
6188
|
+
init_analyzer();
|
|
6189
|
+
init_cache();
|
|
6190
|
+
init_redis();
|
|
6191
|
+
init_watch();
|
|
6144
6192
|
}
|
|
6145
6193
|
});
|
|
6146
6194
|
|
|
@@ -8718,6 +8766,7 @@ init_args();
|
|
|
8718
8766
|
init_errors();
|
|
8719
8767
|
init_fs();
|
|
8720
8768
|
init_json();
|
|
8769
|
+
init_src4();
|
|
8721
8770
|
var DEFAULT_TAILWIND_CSS2 = '@import "tailwindcss";\n';
|
|
8722
8771
|
var DEFAULT_TW_CONFIG = `${JSON.stringify(
|
|
8723
8772
|
{
|
|
@@ -8732,6 +8781,89 @@ var DEFAULT_TW_CONFIG = `${JSON.stringify(
|
|
|
8732
8781
|
function pkgHasDep(pkg, name) {
|
|
8733
8782
|
return Boolean(pkg.dependencies?.[name] || pkg.devDependencies?.[name]);
|
|
8734
8783
|
}
|
|
8784
|
+
async function validateThemeConfig(cwd2) {
|
|
8785
|
+
const results = [];
|
|
8786
|
+
try {
|
|
8787
|
+
const native = getNativeBridge();
|
|
8788
|
+
if (!native) {
|
|
8789
|
+
results.push({ type: "theme", valid: false, message: "Native binding not available" });
|
|
8790
|
+
return results;
|
|
8791
|
+
}
|
|
8792
|
+
const twConfigFiles = ["tailwind.config.ts", "tailwind.config.js", "tailwind.config.mjs"];
|
|
8793
|
+
let configPath = null;
|
|
8794
|
+
for (const file of twConfigFiles) {
|
|
8795
|
+
if (await pathExists2(path6__namespace.default.join(cwd2, file))) {
|
|
8796
|
+
configPath = path6__namespace.default.join(cwd2, file);
|
|
8797
|
+
break;
|
|
8798
|
+
}
|
|
8799
|
+
}
|
|
8800
|
+
if (!configPath) {
|
|
8801
|
+
results.push({ type: "theme-config-missing", valid: false, message: "No tailwind.config found" });
|
|
8802
|
+
return results;
|
|
8803
|
+
}
|
|
8804
|
+
try {
|
|
8805
|
+
const configUrl = url.pathToFileURL(configPath);
|
|
8806
|
+
const configModule = await import(configUrl.href);
|
|
8807
|
+
const config = configModule.default || configModule;
|
|
8808
|
+
const theme = config.theme || {};
|
|
8809
|
+
if (theme.colors && native.validateColorsNapi) {
|
|
8810
|
+
try {
|
|
8811
|
+
const colorsJson = JSON.stringify(theme.colors);
|
|
8812
|
+
const isValid = native.validateColorsNapi(colorsJson);
|
|
8813
|
+
results.push({
|
|
8814
|
+
type: "theme-colors",
|
|
8815
|
+
valid: isValid,
|
|
8816
|
+
message: isValid ? "Colors theme validated OK" : "Invalid colors in theme"
|
|
8817
|
+
});
|
|
8818
|
+
} catch (err) {
|
|
8819
|
+
results.push({
|
|
8820
|
+
type: "theme-colors",
|
|
8821
|
+
valid: false,
|
|
8822
|
+
message: `Color validation error: ${err instanceof Error ? err.message : String(err)}`
|
|
8823
|
+
});
|
|
8824
|
+
}
|
|
8825
|
+
}
|
|
8826
|
+
if (theme.screens && native.validateBreakpointsNapi) {
|
|
8827
|
+
try {
|
|
8828
|
+
const screensJson = JSON.stringify(theme.screens);
|
|
8829
|
+
const isValid = native.validateBreakpointsNapi(screensJson);
|
|
8830
|
+
results.push({
|
|
8831
|
+
type: "theme-breakpoints",
|
|
8832
|
+
valid: isValid,
|
|
8833
|
+
message: isValid ? "Breakpoints validated OK" : "Invalid breakpoints in theme"
|
|
8834
|
+
});
|
|
8835
|
+
} catch (err) {
|
|
8836
|
+
results.push({
|
|
8837
|
+
type: "theme-breakpoints",
|
|
8838
|
+
valid: false,
|
|
8839
|
+
message: `Breakpoints validation error: ${err instanceof Error ? err.message : String(err)}`
|
|
8840
|
+
});
|
|
8841
|
+
}
|
|
8842
|
+
}
|
|
8843
|
+
if (native.runHealthCheck) {
|
|
8844
|
+
try {
|
|
8845
|
+
native.runHealthCheck();
|
|
8846
|
+
results.push({ type: "theme-integrity", valid: true, message: "Theme integrity check passed" });
|
|
8847
|
+
} catch {
|
|
8848
|
+
results.push({ type: "theme-integrity", valid: false, message: "Theme integrity check failed" });
|
|
8849
|
+
}
|
|
8850
|
+
}
|
|
8851
|
+
} catch (err) {
|
|
8852
|
+
results.push({
|
|
8853
|
+
type: "theme-load",
|
|
8854
|
+
valid: false,
|
|
8855
|
+
message: `Failed to load theme config: ${err instanceof Error ? err.message : String(err)}`
|
|
8856
|
+
});
|
|
8857
|
+
}
|
|
8858
|
+
} catch (err) {
|
|
8859
|
+
results.push({
|
|
8860
|
+
type: "theme-validation",
|
|
8861
|
+
valid: false,
|
|
8862
|
+
message: `Theme validation failed: ${err instanceof Error ? err.message : String(err)}`
|
|
8863
|
+
});
|
|
8864
|
+
}
|
|
8865
|
+
return results;
|
|
8866
|
+
}
|
|
8735
8867
|
function nodeVersion() {
|
|
8736
8868
|
const full = process.version.replace("v", "");
|
|
8737
8869
|
const major = parseInt(full.split(".")[0], 10);
|
|
@@ -8856,6 +8988,16 @@ async function runPreflightCli(rawArgs) {
|
|
|
8856
8988
|
"Run: tw migrate --dry-run to see migration steps"
|
|
8857
8989
|
);
|
|
8858
8990
|
}
|
|
8991
|
+
const themeValidation = await validateThemeConfig(cwd2);
|
|
8992
|
+
for (const validation of themeValidation) {
|
|
8993
|
+
check(
|
|
8994
|
+
results,
|
|
8995
|
+
`theme-${validation.type}`,
|
|
8996
|
+
`Theme ${validation.type}`,
|
|
8997
|
+
validation.valid,
|
|
8998
|
+
validation.message
|
|
8999
|
+
);
|
|
9000
|
+
}
|
|
8859
9001
|
const hasTsConfig = await pathExists2(path6__namespace.default.join(cwd2, "tsconfig.json"));
|
|
8860
9002
|
check(
|
|
8861
9003
|
results,
|