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