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.
- package/dist/{analyzeWorkspace-CopJNGmi.d.ts → analyzeWorkspace-B1_XRfdl.d.ts} +1 -0
- package/dist/{analyzeWorkspace-DpVPccjz.d.mts → analyzeWorkspace-hYfu4Hg3.d.mts} +1 -0
- package/dist/analyzer.d.mts +2 -2
- package/dist/analyzer.d.ts +2 -2
- package/dist/analyzer.js +5 -4
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +5 -4
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.js +3 -3
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +3 -3
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +52 -16
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +52 -16
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +57 -20
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +57 -20
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.d.mts +177 -2
- package/dist/compiler.d.ts +177 -2
- package/dist/compiler.js +186 -24
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +173 -25
- package/dist/compiler.mjs.map +1 -1
- package/dist/engine.d.mts +3 -3
- package/dist/engine.d.ts +3 -3
- package/dist/engine.js +191 -27
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +191 -27
- package/dist/engine.mjs.map +1 -1
- package/dist/{index-DJv28Uzq.d.mts → index-DQI6O24n.d.mts} +1 -1
- package/dist/{index-BDQw13kn.d.ts → index-UkYbyBkR.d.ts} +1 -1
- package/dist/index.browser.mjs +5 -66
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +241 -118
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +241 -118
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +202 -24
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +202 -24
- package/dist/next.mjs.map +1 -1
- package/dist/plugin.d.mts +3 -3
- package/dist/plugin.d.ts +3 -3
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs.map +1 -1
- package/dist/shared.d.mts +2 -3
- package/dist/shared.d.ts +2 -3
- package/dist/shared.js +186 -23
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +186 -23
- package/dist/shared.mjs.map +1 -1
- package/dist/svelte.js +24 -42
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +24 -42
- package/dist/svelte.mjs.map +1 -1
- package/dist/turbopackLoader.js +186 -23
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +186 -23
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +57 -20
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +57 -20
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +324 -160
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +324 -160
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +24 -42
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +24 -42
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +52 -16
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +52 -16
- package/dist/webpackLoader.mjs.map +1 -1
- package/native/tailwind-styled-native.node +0 -0
- package/package.json +1 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { e as AnalyzerSemanticReport, d as AnalyzerReport, h as analyzeWorkspace$1 } from './analyzeWorkspace-
|
|
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-
|
|
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 {
|
package/dist/index.browser.mjs
CHANGED
|
@@ -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
|
-
|
|
626
|
-
|
|
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
|
|
648
|
+
result = generated ?? resolveVariantsNative(config);
|
|
708
649
|
} else {
|
|
709
|
-
result = resolveVariantsNative(config
|
|
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) {
|