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.mjs
CHANGED
|
@@ -6094,10 +6094,52 @@ Tried paths: ${result.tried.join("\n")}`);
|
|
|
6094
6094
|
}
|
|
6095
6095
|
}
|
|
6096
6096
|
});
|
|
6097
|
+
|
|
6098
|
+
// packages/domain/compiler/src/compiler/index.ts
|
|
6099
|
+
var init_compiler = __esm({
|
|
6100
|
+
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
6101
|
+
}
|
|
6102
|
+
});
|
|
6103
|
+
|
|
6104
|
+
// packages/domain/compiler/src/parser/index.ts
|
|
6105
|
+
var init_parser = __esm({
|
|
6106
|
+
"packages/domain/compiler/src/parser/index.ts"() {
|
|
6107
|
+
}
|
|
6108
|
+
});
|
|
6109
|
+
|
|
6110
|
+
// packages/domain/compiler/src/analyzer/index.ts
|
|
6111
|
+
var init_analyzer = __esm({
|
|
6112
|
+
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
6113
|
+
}
|
|
6114
|
+
});
|
|
6115
|
+
|
|
6116
|
+
// packages/domain/compiler/src/cache/index.ts
|
|
6117
|
+
var init_cache = __esm({
|
|
6118
|
+
"packages/domain/compiler/src/cache/index.ts"() {
|
|
6119
|
+
}
|
|
6120
|
+
});
|
|
6121
|
+
|
|
6122
|
+
// packages/domain/compiler/src/redis/index.ts
|
|
6123
|
+
var init_redis = __esm({
|
|
6124
|
+
"packages/domain/compiler/src/redis/index.ts"() {
|
|
6125
|
+
}
|
|
6126
|
+
});
|
|
6127
|
+
|
|
6128
|
+
// packages/domain/compiler/src/watch/index.ts
|
|
6129
|
+
var init_watch = __esm({
|
|
6130
|
+
"packages/domain/compiler/src/watch/index.ts"() {
|
|
6131
|
+
}
|
|
6132
|
+
});
|
|
6097
6133
|
var compileCssFromClasses;
|
|
6098
6134
|
var init_src4 = __esm({
|
|
6099
6135
|
"packages/domain/compiler/src/index.ts"() {
|
|
6100
6136
|
init_nativeBridge();
|
|
6137
|
+
init_compiler();
|
|
6138
|
+
init_parser();
|
|
6139
|
+
init_analyzer();
|
|
6140
|
+
init_cache();
|
|
6141
|
+
init_redis();
|
|
6142
|
+
init_watch();
|
|
6101
6143
|
compileCssFromClasses = (classes, prefix) => {
|
|
6102
6144
|
const native = getNativeBridge();
|
|
6103
6145
|
if (!native?.transformSource) {
|
|
@@ -6116,6 +6158,12 @@ var init_src4 = __esm({
|
|
|
6116
6158
|
var init_internal = __esm({
|
|
6117
6159
|
"packages/domain/compiler/src/internal.ts"() {
|
|
6118
6160
|
init_src4();
|
|
6161
|
+
init_compiler();
|
|
6162
|
+
init_parser();
|
|
6163
|
+
init_analyzer();
|
|
6164
|
+
init_cache();
|
|
6165
|
+
init_redis();
|
|
6166
|
+
init_watch();
|
|
6119
6167
|
}
|
|
6120
6168
|
});
|
|
6121
6169
|
|
|
@@ -8693,6 +8741,7 @@ init_args();
|
|
|
8693
8741
|
init_errors();
|
|
8694
8742
|
init_fs();
|
|
8695
8743
|
init_json();
|
|
8744
|
+
init_src4();
|
|
8696
8745
|
var DEFAULT_TAILWIND_CSS2 = '@import "tailwindcss";\n';
|
|
8697
8746
|
var DEFAULT_TW_CONFIG = `${JSON.stringify(
|
|
8698
8747
|
{
|
|
@@ -8707,6 +8756,89 @@ var DEFAULT_TW_CONFIG = `${JSON.stringify(
|
|
|
8707
8756
|
function pkgHasDep(pkg, name) {
|
|
8708
8757
|
return Boolean(pkg.dependencies?.[name] || pkg.devDependencies?.[name]);
|
|
8709
8758
|
}
|
|
8759
|
+
async function validateThemeConfig(cwd2) {
|
|
8760
|
+
const results = [];
|
|
8761
|
+
try {
|
|
8762
|
+
const native = getNativeBridge();
|
|
8763
|
+
if (!native) {
|
|
8764
|
+
results.push({ type: "theme", valid: false, message: "Native binding not available" });
|
|
8765
|
+
return results;
|
|
8766
|
+
}
|
|
8767
|
+
const twConfigFiles = ["tailwind.config.ts", "tailwind.config.js", "tailwind.config.mjs"];
|
|
8768
|
+
let configPath = null;
|
|
8769
|
+
for (const file of twConfigFiles) {
|
|
8770
|
+
if (await pathExists2(path6__default.join(cwd2, file))) {
|
|
8771
|
+
configPath = path6__default.join(cwd2, file);
|
|
8772
|
+
break;
|
|
8773
|
+
}
|
|
8774
|
+
}
|
|
8775
|
+
if (!configPath) {
|
|
8776
|
+
results.push({ type: "theme-config-missing", valid: false, message: "No tailwind.config found" });
|
|
8777
|
+
return results;
|
|
8778
|
+
}
|
|
8779
|
+
try {
|
|
8780
|
+
const configUrl = pathToFileURL(configPath);
|
|
8781
|
+
const configModule = await import(configUrl.href);
|
|
8782
|
+
const config = configModule.default || configModule;
|
|
8783
|
+
const theme = config.theme || {};
|
|
8784
|
+
if (theme.colors && native.validateColorsNapi) {
|
|
8785
|
+
try {
|
|
8786
|
+
const colorsJson = JSON.stringify(theme.colors);
|
|
8787
|
+
const isValid = native.validateColorsNapi(colorsJson);
|
|
8788
|
+
results.push({
|
|
8789
|
+
type: "theme-colors",
|
|
8790
|
+
valid: isValid,
|
|
8791
|
+
message: isValid ? "Colors theme validated OK" : "Invalid colors in theme"
|
|
8792
|
+
});
|
|
8793
|
+
} catch (err) {
|
|
8794
|
+
results.push({
|
|
8795
|
+
type: "theme-colors",
|
|
8796
|
+
valid: false,
|
|
8797
|
+
message: `Color validation error: ${err instanceof Error ? err.message : String(err)}`
|
|
8798
|
+
});
|
|
8799
|
+
}
|
|
8800
|
+
}
|
|
8801
|
+
if (theme.screens && native.validateBreakpointsNapi) {
|
|
8802
|
+
try {
|
|
8803
|
+
const screensJson = JSON.stringify(theme.screens);
|
|
8804
|
+
const isValid = native.validateBreakpointsNapi(screensJson);
|
|
8805
|
+
results.push({
|
|
8806
|
+
type: "theme-breakpoints",
|
|
8807
|
+
valid: isValid,
|
|
8808
|
+
message: isValid ? "Breakpoints validated OK" : "Invalid breakpoints in theme"
|
|
8809
|
+
});
|
|
8810
|
+
} catch (err) {
|
|
8811
|
+
results.push({
|
|
8812
|
+
type: "theme-breakpoints",
|
|
8813
|
+
valid: false,
|
|
8814
|
+
message: `Breakpoints validation error: ${err instanceof Error ? err.message : String(err)}`
|
|
8815
|
+
});
|
|
8816
|
+
}
|
|
8817
|
+
}
|
|
8818
|
+
if (native.runHealthCheck) {
|
|
8819
|
+
try {
|
|
8820
|
+
native.runHealthCheck();
|
|
8821
|
+
results.push({ type: "theme-integrity", valid: true, message: "Theme integrity check passed" });
|
|
8822
|
+
} catch {
|
|
8823
|
+
results.push({ type: "theme-integrity", valid: false, message: "Theme integrity check failed" });
|
|
8824
|
+
}
|
|
8825
|
+
}
|
|
8826
|
+
} catch (err) {
|
|
8827
|
+
results.push({
|
|
8828
|
+
type: "theme-load",
|
|
8829
|
+
valid: false,
|
|
8830
|
+
message: `Failed to load theme config: ${err instanceof Error ? err.message : String(err)}`
|
|
8831
|
+
});
|
|
8832
|
+
}
|
|
8833
|
+
} catch (err) {
|
|
8834
|
+
results.push({
|
|
8835
|
+
type: "theme-validation",
|
|
8836
|
+
valid: false,
|
|
8837
|
+
message: `Theme validation failed: ${err instanceof Error ? err.message : String(err)}`
|
|
8838
|
+
});
|
|
8839
|
+
}
|
|
8840
|
+
return results;
|
|
8841
|
+
}
|
|
8710
8842
|
function nodeVersion() {
|
|
8711
8843
|
const full = process.version.replace("v", "");
|
|
8712
8844
|
const major = parseInt(full.split(".")[0], 10);
|
|
@@ -8831,6 +8963,16 @@ async function runPreflightCli(rawArgs) {
|
|
|
8831
8963
|
"Run: tw migrate --dry-run to see migration steps"
|
|
8832
8964
|
);
|
|
8833
8965
|
}
|
|
8966
|
+
const themeValidation = await validateThemeConfig(cwd2);
|
|
8967
|
+
for (const validation of themeValidation) {
|
|
8968
|
+
check(
|
|
8969
|
+
results,
|
|
8970
|
+
`theme-${validation.type}`,
|
|
8971
|
+
`Theme ${validation.type}`,
|
|
8972
|
+
validation.valid,
|
|
8973
|
+
validation.message
|
|
8974
|
+
);
|
|
8975
|
+
}
|
|
8834
8976
|
const hasTsConfig = await pathExists2(path6__default.join(cwd2, "tsconfig.json"));
|
|
8835
8977
|
check(
|
|
8836
8978
|
results,
|