tailwind-styled-v4 5.0.17 → 5.0.20

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 (82) hide show
  1. package/dist/{analyzeWorkspace-CopJNGmi.d.ts → analyzeWorkspace-B1_XRfdl.d.ts} +1 -0
  2. package/dist/{analyzeWorkspace-DpVPccjz.d.mts → analyzeWorkspace-hYfu4Hg3.d.mts} +1 -0
  3. package/dist/analyzer.d.mts +2 -2
  4. package/dist/analyzer.d.ts +2 -2
  5. package/dist/analyzer.js +5 -4
  6. package/dist/analyzer.js.map +1 -1
  7. package/dist/analyzer.mjs +5 -4
  8. package/dist/analyzer.mjs.map +1 -1
  9. package/dist/animate.js +3 -3
  10. package/dist/animate.js.map +1 -1
  11. package/dist/animate.mjs +3 -3
  12. package/dist/animate.mjs.map +1 -1
  13. package/dist/atomic.js +52 -16
  14. package/dist/atomic.js.map +1 -1
  15. package/dist/atomic.mjs +52 -16
  16. package/dist/atomic.mjs.map +1 -1
  17. package/dist/cli.js +57 -20
  18. package/dist/cli.js.map +1 -1
  19. package/dist/cli.mjs +57 -20
  20. package/dist/cli.mjs.map +1 -1
  21. package/dist/compiler.d.mts +177 -2
  22. package/dist/compiler.d.ts +177 -2
  23. package/dist/compiler.js +186 -24
  24. package/dist/compiler.js.map +1 -1
  25. package/dist/compiler.mjs +173 -25
  26. package/dist/compiler.mjs.map +1 -1
  27. package/dist/engine.d.mts +3 -3
  28. package/dist/engine.d.ts +3 -3
  29. package/dist/engine.js +191 -27
  30. package/dist/engine.js.map +1 -1
  31. package/dist/engine.mjs +191 -27
  32. package/dist/engine.mjs.map +1 -1
  33. package/dist/{index-DJv28Uzq.d.mts → index-DQI6O24n.d.mts} +1 -1
  34. package/dist/{index-BDQw13kn.d.ts → index-UkYbyBkR.d.ts} +1 -1
  35. package/dist/index.browser.mjs +5 -66
  36. package/dist/index.browser.mjs.map +1 -1
  37. package/dist/index.d.mts +2 -2
  38. package/dist/index.d.ts +2 -2
  39. package/dist/index.js +241 -118
  40. package/dist/index.js.map +1 -1
  41. package/dist/index.mjs +241 -118
  42. package/dist/index.mjs.map +1 -1
  43. package/dist/next.js +202 -24
  44. package/dist/next.js.map +1 -1
  45. package/dist/next.mjs +202 -24
  46. package/dist/next.mjs.map +1 -1
  47. package/dist/plugin.d.mts +3 -3
  48. package/dist/plugin.d.ts +3 -3
  49. package/dist/plugin.js.map +1 -1
  50. package/dist/plugin.mjs.map +1 -1
  51. package/dist/shared.d.mts +2 -3
  52. package/dist/shared.d.ts +2 -3
  53. package/dist/shared.js +186 -23
  54. package/dist/shared.js.map +1 -1
  55. package/dist/shared.mjs +186 -23
  56. package/dist/shared.mjs.map +1 -1
  57. package/dist/svelte.js +24 -42
  58. package/dist/svelte.js.map +1 -1
  59. package/dist/svelte.mjs +24 -42
  60. package/dist/svelte.mjs.map +1 -1
  61. package/dist/turbopackLoader.js +186 -23
  62. package/dist/turbopackLoader.js.map +1 -1
  63. package/dist/turbopackLoader.mjs +186 -23
  64. package/dist/turbopackLoader.mjs.map +1 -1
  65. package/dist/tw.js +57 -20
  66. package/dist/tw.js.map +1 -1
  67. package/dist/tw.mjs +57 -20
  68. package/dist/tw.mjs.map +1 -1
  69. package/dist/vite.js +324 -160
  70. package/dist/vite.js.map +1 -1
  71. package/dist/vite.mjs +324 -160
  72. package/dist/vite.mjs.map +1 -1
  73. package/dist/vue.js +24 -42
  74. package/dist/vue.js.map +1 -1
  75. package/dist/vue.mjs +24 -42
  76. package/dist/vue.mjs.map +1 -1
  77. package/dist/webpackLoader.js +52 -16
  78. package/dist/webpackLoader.js.map +1 -1
  79. package/dist/webpackLoader.mjs +52 -16
  80. package/dist/webpackLoader.mjs.map +1 -1
  81. package/native/tailwind-styled-native.node +0 -0
  82. package/package.json +1 -4
@@ -1,4 +1,4 @@
1
- import { e as AnalyzerSemanticReport, d as AnalyzerReport, h as analyzeWorkspace$1 } from './analyzeWorkspace-DpVPccjz.mjs';
1
+ import { e as AnalyzerSemanticReport, d as AnalyzerReport, h as analyzeWorkspace$1 } from './analyzeWorkspace-hYfu4Hg3.mjs';
2
2
  import { b as ScanWorkspaceResult, a as ScanWorkspaceOptions } from './schemas-DR-SLxZZ.mjs';
3
3
 
4
4
  declare class RuleId {
@@ -1,4 +1,4 @@
1
- import { e as AnalyzerSemanticReport, d as AnalyzerReport, h as analyzeWorkspace$1 } from './analyzeWorkspace-CopJNGmi.js';
1
+ import { e as AnalyzerSemanticReport, d as AnalyzerReport, h as analyzeWorkspace$1 } from './analyzeWorkspace-B1_XRfdl.js';
2
2
  import { b as ScanWorkspaceResult, a as ScanWorkspaceOptions } from './schemas-DR-SLxZZ.js';
3
3
 
4
4
  declare class RuleId {
@@ -622,67 +622,8 @@ function lookupGenerated(componentId, props, defaultVariants, variantKeys) {
622
622
  }
623
623
  function resolveVariantsNative(config, props) {
624
624
  const { variants = {}, defaultVariants = {} } = config;
625
- try {
626
- const binding = getNativeBinding();
627
- if (!binding?.resolveVariants) {
628
- throw new Error("resolveVariants not available");
629
- }
630
- const variantKeys = Object.keys(variants);
631
- const configJson = (() => {
632
- const cfgObj = config;
633
- const cfgStr = JSON.stringify(cfgObj);
634
- const parsed = JSON.parse(cfgStr);
635
- if ("defaultVariants" in parsed && !("default_variants" in parsed)) {
636
- parsed.default_variants = parsed.defaultVariants;
637
- delete parsed.defaultVariants;
638
- }
639
- if ("compoundVariants" in parsed && !("compound_variants" in parsed)) {
640
- parsed.compound_variants = parsed.compoundVariants;
641
- delete parsed.compoundVariants;
642
- }
643
- if (!("variants" in parsed) || parsed.variants == null) {
644
- parsed.variants = {};
645
- }
646
- return JSON.stringify(parsed);
647
- })();
648
- const cleanProps = {};
649
- for (const k of variantKeys) {
650
- const dv = defaultVariants[k];
651
- if (dv !== void 0 && dv !== null) cleanProps[k] = String(dv);
652
- }
653
- for (const k of variantKeys) {
654
- const v = props[k];
655
- if (v !== void 0 && v !== null) cleanProps[k] = String(v);
656
- }
657
- const propsJson = JSON.stringify(cleanProps);
658
- const result = binding.resolveVariants(configJson, propsJson);
659
- return result?.classes ?? "";
660
- } catch (_err) {
661
- {
662
- console.warn("[cv() fallback] getNativeBinding threw error, using JS fallback");
663
- }
664
- const result = [];
665
- const { base = "", compoundVariants = [] } = config;
666
- if (base) result.push(base);
667
- const merged = { ...defaultVariants };
668
- for (const [key, values] of Object.entries(variants || {})) {
669
- const selected = props[key] ?? defaultVariants?.[key];
670
- if (selected !== void 0 && selected !== null) merged[key] = selected;
671
- if (selected && typeof values === "object" && values !== null) {
672
- const variantValues = values;
673
- if (variantValues[String(selected)]) {
674
- result.push(variantValues[String(selected)]);
675
- }
676
- }
677
- }
678
- for (const compound of compoundVariants) {
679
- const { class: compoundClass, ...conditions } = compound;
680
- const matches = Object.entries(conditions).every(
681
- ([k, v]) => String(merged[k]) === String(v)
682
- );
683
- if (matches && compoundClass) result.push(compoundClass);
684
- }
685
- return result.join(" ");
625
+ {
626
+ throw new Error("FATAL: Native binding 'resolveVariants' is required but not available. Build cannot continue.");
686
627
  }
687
628
  }
688
629
  function cv(config, componentId) {
@@ -704,9 +645,9 @@ function cv(config, componentId) {
704
645
  config.defaultVariants,
705
646
  variantKeys
706
647
  );
707
- result = generated ?? resolveVariantsNative(config, props);
648
+ result = generated ?? resolveVariantsNative(config);
708
649
  } else {
709
- result = resolveVariantsNative(config, props);
650
+ result = resolveVariantsNative(config);
710
651
  }
711
652
  return props.className ? twMerge(result, props.className) : result;
712
653
  };
@@ -1170,9 +1111,7 @@ function parseTemplate(strings, exprs) {
1170
1111
  const cached = _parsedTemplateCache.get(raw);
1171
1112
  if (cached) return cached;
1172
1113
  {
1173
- throw new Error(
1174
- "FATAL: Native binding 'parseTemplate' is required but not available in this environment.\n\nThis function is only available on Node.js with native bindings loaded.\nFor browser environments, use object config instead:\n tw.button({ base: '...', variants: {...} })"
1175
- );
1114
+ throw new Error("FATAL: Native binding 'parseTemplate' is required but not available.");
1176
1115
  }
1177
1116
  }
1178
1117
  function makeTag(tag) {