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.
Files changed (60) hide show
  1. package/README.md +100 -4
  2. package/dist/animate.d.mts +4 -0
  3. package/dist/animate.d.ts +4 -0
  4. package/dist/animate.js +22 -0
  5. package/dist/animate.js.map +1 -1
  6. package/dist/animate.mjs +22 -0
  7. package/dist/animate.mjs.map +1 -1
  8. package/dist/atomic.js +42 -0
  9. package/dist/atomic.js.map +1 -1
  10. package/dist/atomic.mjs +42 -0
  11. package/dist/atomic.mjs.map +1 -1
  12. package/dist/cli.js +142 -0
  13. package/dist/cli.js.map +1 -1
  14. package/dist/cli.mjs +142 -0
  15. package/dist/cli.mjs.map +1 -1
  16. package/dist/compiler.d.mts +1045 -991
  17. package/dist/compiler.d.ts +1045 -991
  18. package/dist/compiler.js +888 -922
  19. package/dist/compiler.js.map +1 -1
  20. package/dist/compiler.mjs +873 -908
  21. package/dist/compiler.mjs.map +1 -1
  22. package/dist/engine.js +1637 -340
  23. package/dist/engine.js.map +1 -1
  24. package/dist/engine.mjs +1636 -339
  25. package/dist/engine.mjs.map +1 -1
  26. package/dist/index.js +1636 -339
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +1636 -339
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/next.js +1060 -970
  31. package/dist/next.js.map +1 -1
  32. package/dist/next.mjs +1060 -970
  33. package/dist/next.mjs.map +1 -1
  34. package/dist/shared.js +1607 -310
  35. package/dist/shared.js.map +1 -1
  36. package/dist/shared.mjs +1607 -310
  37. package/dist/shared.mjs.map +1 -1
  38. package/dist/svelte.js.map +1 -1
  39. package/dist/svelte.mjs.map +1 -1
  40. package/dist/turbopackLoader.js +1610 -313
  41. package/dist/turbopackLoader.js.map +1 -1
  42. package/dist/turbopackLoader.mjs +1610 -313
  43. package/dist/turbopackLoader.mjs.map +1 -1
  44. package/dist/tw.js +142 -0
  45. package/dist/tw.js.map +1 -1
  46. package/dist/tw.mjs +142 -0
  47. package/dist/tw.mjs.map +1 -1
  48. package/dist/vite.js +1622 -325
  49. package/dist/vite.js.map +1 -1
  50. package/dist/vite.mjs +1622 -325
  51. package/dist/vite.mjs.map +1 -1
  52. package/dist/vue.js.map +1 -1
  53. package/dist/vue.mjs.map +1 -1
  54. package/dist/webpackLoader.js +66 -15
  55. package/dist/webpackLoader.js.map +1 -1
  56. package/dist/webpackLoader.mjs +66 -15
  57. package/dist/webpackLoader.mjs.map +1 -1
  58. package/native/tailwind-styled-native.node +0 -0
  59. package/native/tailwind-styled-native.win32-x64-msvc.node +0 -0
  60. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -6118,10 +6118,52 @@ Tried paths: ${result.tried.join("\n")}`);
6118
6118
  }
6119
6119
  }
6120
6120
  });
6121
+
6122
+ // packages/domain/compiler/src/compiler/index.ts
6123
+ var init_compiler = __esm({
6124
+ "packages/domain/compiler/src/compiler/index.ts"() {
6125
+ }
6126
+ });
6127
+
6128
+ // packages/domain/compiler/src/parser/index.ts
6129
+ var init_parser = __esm({
6130
+ "packages/domain/compiler/src/parser/index.ts"() {
6131
+ }
6132
+ });
6133
+
6134
+ // packages/domain/compiler/src/analyzer/index.ts
6135
+ var init_analyzer = __esm({
6136
+ "packages/domain/compiler/src/analyzer/index.ts"() {
6137
+ }
6138
+ });
6139
+
6140
+ // packages/domain/compiler/src/cache/index.ts
6141
+ var init_cache = __esm({
6142
+ "packages/domain/compiler/src/cache/index.ts"() {
6143
+ }
6144
+ });
6145
+
6146
+ // packages/domain/compiler/src/redis/index.ts
6147
+ var init_redis = __esm({
6148
+ "packages/domain/compiler/src/redis/index.ts"() {
6149
+ }
6150
+ });
6151
+
6152
+ // packages/domain/compiler/src/watch/index.ts
6153
+ var init_watch = __esm({
6154
+ "packages/domain/compiler/src/watch/index.ts"() {
6155
+ }
6156
+ });
6121
6157
  var compileCssFromClasses;
6122
6158
  var init_src4 = __esm({
6123
6159
  "packages/domain/compiler/src/index.ts"() {
6124
6160
  init_nativeBridge();
6161
+ init_compiler();
6162
+ init_parser();
6163
+ init_analyzer();
6164
+ init_cache();
6165
+ init_redis();
6166
+ init_watch();
6125
6167
  compileCssFromClasses = (classes, prefix) => {
6126
6168
  const native = getNativeBridge();
6127
6169
  if (!native?.transformSource) {
@@ -6140,6 +6182,12 @@ var init_src4 = __esm({
6140
6182
  var init_internal = __esm({
6141
6183
  "packages/domain/compiler/src/internal.ts"() {
6142
6184
  init_src4();
6185
+ init_compiler();
6186
+ init_parser();
6187
+ init_analyzer();
6188
+ init_cache();
6189
+ init_redis();
6190
+ init_watch();
6143
6191
  }
6144
6192
  });
6145
6193
 
@@ -8717,6 +8765,7 @@ init_args();
8717
8765
  init_errors();
8718
8766
  init_fs();
8719
8767
  init_json();
8768
+ init_src4();
8720
8769
  var DEFAULT_TAILWIND_CSS2 = '@import "tailwindcss";\n';
8721
8770
  var DEFAULT_TW_CONFIG = `${JSON.stringify(
8722
8771
  {
@@ -8731,6 +8780,89 @@ var DEFAULT_TW_CONFIG = `${JSON.stringify(
8731
8780
  function pkgHasDep(pkg, name) {
8732
8781
  return Boolean(pkg.dependencies?.[name] || pkg.devDependencies?.[name]);
8733
8782
  }
8783
+ async function validateThemeConfig(cwd2) {
8784
+ const results = [];
8785
+ try {
8786
+ const native = getNativeBridge();
8787
+ if (!native) {
8788
+ results.push({ type: "theme", valid: false, message: "Native binding not available" });
8789
+ return results;
8790
+ }
8791
+ const twConfigFiles = ["tailwind.config.ts", "tailwind.config.js", "tailwind.config.mjs"];
8792
+ let configPath = null;
8793
+ for (const file of twConfigFiles) {
8794
+ if (await pathExists2(path6__namespace.default.join(cwd2, file))) {
8795
+ configPath = path6__namespace.default.join(cwd2, file);
8796
+ break;
8797
+ }
8798
+ }
8799
+ if (!configPath) {
8800
+ results.push({ type: "theme-config-missing", valid: false, message: "No tailwind.config found" });
8801
+ return results;
8802
+ }
8803
+ try {
8804
+ const configUrl = url.pathToFileURL(configPath);
8805
+ const configModule = await import(configUrl.href);
8806
+ const config = configModule.default || configModule;
8807
+ const theme = config.theme || {};
8808
+ if (theme.colors && native.validateColorsNapi) {
8809
+ try {
8810
+ const colorsJson = JSON.stringify(theme.colors);
8811
+ const isValid = native.validateColorsNapi(colorsJson);
8812
+ results.push({
8813
+ type: "theme-colors",
8814
+ valid: isValid,
8815
+ message: isValid ? "Colors theme validated OK" : "Invalid colors in theme"
8816
+ });
8817
+ } catch (err) {
8818
+ results.push({
8819
+ type: "theme-colors",
8820
+ valid: false,
8821
+ message: `Color validation error: ${err instanceof Error ? err.message : String(err)}`
8822
+ });
8823
+ }
8824
+ }
8825
+ if (theme.screens && native.validateBreakpointsNapi) {
8826
+ try {
8827
+ const screensJson = JSON.stringify(theme.screens);
8828
+ const isValid = native.validateBreakpointsNapi(screensJson);
8829
+ results.push({
8830
+ type: "theme-breakpoints",
8831
+ valid: isValid,
8832
+ message: isValid ? "Breakpoints validated OK" : "Invalid breakpoints in theme"
8833
+ });
8834
+ } catch (err) {
8835
+ results.push({
8836
+ type: "theme-breakpoints",
8837
+ valid: false,
8838
+ message: `Breakpoints validation error: ${err instanceof Error ? err.message : String(err)}`
8839
+ });
8840
+ }
8841
+ }
8842
+ if (native.runHealthCheck) {
8843
+ try {
8844
+ native.runHealthCheck();
8845
+ results.push({ type: "theme-integrity", valid: true, message: "Theme integrity check passed" });
8846
+ } catch {
8847
+ results.push({ type: "theme-integrity", valid: false, message: "Theme integrity check failed" });
8848
+ }
8849
+ }
8850
+ } catch (err) {
8851
+ results.push({
8852
+ type: "theme-load",
8853
+ valid: false,
8854
+ message: `Failed to load theme config: ${err instanceof Error ? err.message : String(err)}`
8855
+ });
8856
+ }
8857
+ } catch (err) {
8858
+ results.push({
8859
+ type: "theme-validation",
8860
+ valid: false,
8861
+ message: `Theme validation failed: ${err instanceof Error ? err.message : String(err)}`
8862
+ });
8863
+ }
8864
+ return results;
8865
+ }
8734
8866
  function nodeVersion() {
8735
8867
  const full = process.version.replace("v", "");
8736
8868
  const major = parseInt(full.split(".")[0], 10);
@@ -8855,6 +8987,16 @@ async function runPreflightCli(rawArgs) {
8855
8987
  "Run: tw migrate --dry-run to see migration steps"
8856
8988
  );
8857
8989
  }
8990
+ const themeValidation = await validateThemeConfig(cwd2);
8991
+ for (const validation of themeValidation) {
8992
+ check(
8993
+ results,
8994
+ `theme-${validation.type}`,
8995
+ `Theme ${validation.type}`,
8996
+ validation.valid,
8997
+ validation.message
8998
+ );
8999
+ }
8858
9000
  const hasTsConfig = await pathExists2(path6__namespace.default.join(cwd2, "tsconfig.json"));
8859
9001
  check(
8860
9002
  results,