tailwind-styled-v4 5.0.36 → 5.0.37

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 (69) hide show
  1. package/dist/analyzer.d.mts +152 -5
  2. package/dist/analyzer.d.ts +152 -5
  3. package/dist/animate.d.mts +30 -3
  4. package/dist/animate.d.ts +30 -3
  5. package/dist/compiler.d.mts +5 -0
  6. package/dist/compiler.d.ts +5 -0
  7. package/dist/compiler.js.map +1 -1
  8. package/dist/compiler.mjs.map +1 -1
  9. package/dist/devtools.d.mts +88 -2
  10. package/dist/devtools.d.ts +88 -2
  11. package/dist/engine.d.mts +557 -6
  12. package/dist/engine.d.ts +557 -6
  13. package/dist/engine.js.map +1 -1
  14. package/dist/engine.mjs.map +1 -1
  15. package/dist/index.d.mts +236 -9
  16. package/dist/index.d.ts +236 -9
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/next.js.map +1 -1
  20. package/dist/next.mjs.map +1 -1
  21. package/dist/plugin-api.d.mts +4 -2
  22. package/dist/plugin-api.d.ts +4 -2
  23. package/dist/plugin-registry.js +39 -25
  24. package/dist/plugin-registry.js.map +1 -1
  25. package/dist/plugin-registry.mjs +39 -25
  26. package/dist/plugin-registry.mjs.map +1 -1
  27. package/dist/plugin.d.mts +165 -5
  28. package/dist/plugin.d.ts +165 -5
  29. package/dist/plugin.js +17 -0
  30. package/dist/plugin.js.map +1 -1
  31. package/dist/plugin.mjs +15 -1
  32. package/dist/plugin.mjs.map +1 -1
  33. package/dist/runtime.d.mts +38 -3
  34. package/dist/runtime.d.ts +38 -3
  35. package/dist/scanner.d.mts +58 -4
  36. package/dist/scanner.d.ts +58 -4
  37. package/dist/shared.d.mts +185 -3
  38. package/dist/shared.d.ts +185 -3
  39. package/dist/shared.js.map +1 -1
  40. package/dist/shared.mjs.map +1 -1
  41. package/dist/storybook-addon.d.mts +2 -2
  42. package/dist/storybook-addon.d.ts +2 -2
  43. package/dist/svelte.d.mts +2 -1
  44. package/dist/svelte.d.ts +2 -1
  45. package/dist/theme.d.mts +38 -3
  46. package/dist/theme.d.ts +38 -3
  47. package/dist/turbopackLoader.js.map +1 -1
  48. package/dist/turbopackLoader.mjs.map +1 -1
  49. package/dist/vite.js.map +1 -1
  50. package/dist/vite.mjs.map +1 -1
  51. package/dist/vue.d.mts +4 -1
  52. package/dist/vue.d.ts +4 -1
  53. package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  54. package/native/tailwind-styled-native.node +0 -0
  55. package/package.json +1 -1
  56. package/dist/analyzeWorkspace-B1_XRfdl.d.ts +0 -134
  57. package/dist/analyzeWorkspace-hYfu4Hg3.d.mts +0 -134
  58. package/dist/index-DQI6O24n.d.mts +0 -464
  59. package/dist/index-NDINUhLN.d.mts +0 -90
  60. package/dist/index-NDINUhLN.d.ts +0 -90
  61. package/dist/index-UkYbyBkR.d.ts +0 -464
  62. package/dist/liveTokenEngine-CN9ian1R.d.ts +0 -38
  63. package/dist/liveTokenEngine-DKoWRtqH.d.mts +0 -38
  64. package/dist/schemas-DR-SLxZZ.d.mts +0 -59
  65. package/dist/schemas-DR-SLxZZ.d.ts +0 -59
  66. package/dist/trace-Dz4vmZdy.d.mts +0 -96
  67. package/dist/trace-Dz4vmZdy.d.ts +0 -96
  68. package/dist/types-DXr2PmGP.d.mts +0 -31
  69. package/dist/types-DXr2PmGP.d.ts +0 -31
package/dist/vue.d.mts CHANGED
@@ -1,5 +1,8 @@
1
1
  import { App, Component, DefineComponent } from 'vue';
2
- import { H as HtmlTagName$1, a as VariantValue, b as VariantProps } from './index-NDINUhLN.mjs';
2
+
3
+ type VariantValue = string | number | boolean | undefined;
4
+ type VariantProps = Record<string, VariantValue>;
5
+ type HtmlTagName$1 = keyof HTMLElementTagNameMap;
3
6
 
4
7
  /**
5
8
  * tailwind-styled-v4 — Vue Adapter
package/dist/vue.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import { App, Component, DefineComponent } from 'vue';
2
- import { H as HtmlTagName$1, a as VariantValue, b as VariantProps } from './index-NDINUhLN.js';
2
+
3
+ type VariantValue = string | number | boolean | undefined;
4
+ type VariantProps = Record<string, VariantValue>;
5
+ type HtmlTagName$1 = keyof HTMLElementTagNameMap;
3
6
 
4
7
  /**
5
8
  * tailwind-styled-v4 — Vue Adapter
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwind-styled-v4",
3
- "version": "5.0.36",
3
+ "version": "5.0.37",
4
4
  "packageManager": "npm@11.11.1",
5
5
  "engines": {
6
6
  "node": ">=20"
@@ -1,134 +0,0 @@
1
- import { a as ScanWorkspaceOptions, b as ScanWorkspaceResult } from './schemas-DR-SLxZZ.js';
2
-
3
- /**
4
- * Public type contracts for @tailwind-styled/analyzer.
5
- * Keep this file aligned with the runtime report shape exposed by src/index.ts.
6
- */
7
-
8
- interface ClassUsage {
9
- readonly name: string;
10
- readonly count: number;
11
- readonly isUnused?: boolean;
12
- readonly isConflict?: boolean;
13
- }
14
- interface ClassConflict {
15
- readonly className: string;
16
- readonly variants: readonly string[];
17
- readonly classes: readonly string[];
18
- readonly message: string;
19
- }
20
- interface AnalyzerClassStats {
21
- readonly all: readonly ClassUsage[];
22
- readonly top: readonly ClassUsage[];
23
- readonly frequent: readonly ClassUsage[];
24
- readonly unique: readonly ClassUsage[];
25
- readonly distribution: Readonly<Record<string, number>>;
26
- }
27
- interface TailwindConfigSummary {
28
- readonly path: string;
29
- readonly loaded: boolean;
30
- readonly safelistCount: number;
31
- readonly customUtilityCount: number;
32
- readonly warning?: string;
33
- }
34
- interface AnalyzerSemanticReport {
35
- readonly unusedClasses: readonly ClassUsage[];
36
- readonly unknownClasses: readonly ClassUsage[];
37
- readonly conflicts: readonly ClassConflict[];
38
- readonly tailwindConfig?: TailwindConfigSummary;
39
- }
40
- interface AnalyzerReport {
41
- readonly root: string;
42
- readonly totalFiles: number;
43
- readonly uniqueClassCount: number;
44
- readonly totalClassOccurrences: number;
45
- readonly classStats: AnalyzerClassStats;
46
- /** Alias for classStats.top — backward compat & test contract */
47
- readonly topClasses: readonly ClassUsage[];
48
- readonly safelist: readonly string[];
49
- readonly semantic?: AnalyzerSemanticReport;
50
- }
51
- interface AnalyzerOptions {
52
- readonly scanner?: ScanWorkspaceOptions;
53
- readonly classStats?: {
54
- readonly top?: number;
55
- readonly frequentThreshold?: number;
56
- };
57
- readonly includeClass?: (className: string) => boolean;
58
- readonly semantic?: boolean | {
59
- readonly tailwindConfigPath?: string;
60
- };
61
- }
62
- interface ClassToCssOptions {
63
- readonly prefix?: string | null;
64
- readonly strict?: boolean;
65
- }
66
- interface ClassToCssResult {
67
- readonly inputClasses: readonly string[];
68
- readonly css: string;
69
- readonly declarations: string;
70
- readonly resolvedClasses: readonly string[];
71
- readonly unknownClasses: readonly string[];
72
- readonly sizeBytes: number;
73
- }
74
- interface NativeAnalyzerBinding {
75
- analyzeClassesWorkspace?(filesJson: string, cwd: string, flags: number): unknown;
76
- analyzeClasses(filesJson: string, cwd: string, flags: number): unknown;
77
- compileCss?: (classes: string[], prefix: string | null) => unknown;
78
- /** Detect conflicting Tailwind utilities in a usage list. */
79
- detectClassConflicts?(usagesJson: string): {
80
- conflicts: Array<{
81
- group: string;
82
- variantKey: string;
83
- classes: string[];
84
- message: string;
85
- }>;
86
- conflictedClassNames: string[];
87
- };
88
- /** Classify classes as known/unknown Tailwind utilities. */
89
- classifyKnownClasses?(classes: string[], safelist: string[], customUtilities: string[]): Array<{
90
- className: string;
91
- isKnown: boolean;
92
- variantKey: string;
93
- baseClass: string;
94
- utilityPrefix: string;
95
- isArbitrary: boolean;
96
- }>;
97
- /** Map Tailwind class base → conflict group name. Return "" if no group. */
98
- resolveConflictGroup?(base: string): string;
99
- /** Aggregate class counts from scan files JSON. */
100
- collectClassCounts?(filesJson: string): Array<{
101
- name: string;
102
- count: number;
103
- }>;
104
- /** Compute frequency distribution buckets for class usages. */
105
- computeClassStats?(usagesJson: string, topLimit: number, frequentThreshold: number): {
106
- totalClassOccurrences: number;
107
- topJson: string;
108
- frequentJson: string;
109
- uniqueJson: string;
110
- };
111
- buildDistribution?(usagesJson: string): {
112
- once: number;
113
- few: number;
114
- moderate: number;
115
- frequent: number;
116
- };
117
- }
118
-
119
- declare function requireNativeBinding(): Promise<NativeAnalyzerBinding>;
120
-
121
- declare function collectClassCounts(scan: ScanWorkspaceResult): Promise<Map<string, number>>;
122
- declare function buildDistribution(usages: ClassUsage[], native?: Awaited<ReturnType<typeof requireNativeBinding>>): Promise<Record<string, number>>;
123
- /**
124
- * Analyze Tailwind class usage in a workspace and return usage statistics.
125
- * Set `semantic.tailwindConfigPath` to override Tailwind config lookup.
126
- * @example
127
- * const report = await analyzeWorkspace("./src", {
128
- * classStats: { top: 20, frequentThreshold: 2 },
129
- * semantic: { tailwindConfigPath: "tailwind.config.js" },
130
- * })
131
- */
132
- declare function analyzeWorkspace(root: string, options?: AnalyzerOptions): Promise<AnalyzerReport>;
133
-
134
- export { type AnalyzerOptions as A, type ClassToCssOptions as C, type ClassToCssResult as a, buildDistribution as b, collectClassCounts as c, type AnalyzerReport as d, type AnalyzerSemanticReport as e, type ClassConflict as f, type ClassUsage as g, analyzeWorkspace as h };
@@ -1,134 +0,0 @@
1
- import { a as ScanWorkspaceOptions, b as ScanWorkspaceResult } from './schemas-DR-SLxZZ.mjs';
2
-
3
- /**
4
- * Public type contracts for @tailwind-styled/analyzer.
5
- * Keep this file aligned with the runtime report shape exposed by src/index.ts.
6
- */
7
-
8
- interface ClassUsage {
9
- readonly name: string;
10
- readonly count: number;
11
- readonly isUnused?: boolean;
12
- readonly isConflict?: boolean;
13
- }
14
- interface ClassConflict {
15
- readonly className: string;
16
- readonly variants: readonly string[];
17
- readonly classes: readonly string[];
18
- readonly message: string;
19
- }
20
- interface AnalyzerClassStats {
21
- readonly all: readonly ClassUsage[];
22
- readonly top: readonly ClassUsage[];
23
- readonly frequent: readonly ClassUsage[];
24
- readonly unique: readonly ClassUsage[];
25
- readonly distribution: Readonly<Record<string, number>>;
26
- }
27
- interface TailwindConfigSummary {
28
- readonly path: string;
29
- readonly loaded: boolean;
30
- readonly safelistCount: number;
31
- readonly customUtilityCount: number;
32
- readonly warning?: string;
33
- }
34
- interface AnalyzerSemanticReport {
35
- readonly unusedClasses: readonly ClassUsage[];
36
- readonly unknownClasses: readonly ClassUsage[];
37
- readonly conflicts: readonly ClassConflict[];
38
- readonly tailwindConfig?: TailwindConfigSummary;
39
- }
40
- interface AnalyzerReport {
41
- readonly root: string;
42
- readonly totalFiles: number;
43
- readonly uniqueClassCount: number;
44
- readonly totalClassOccurrences: number;
45
- readonly classStats: AnalyzerClassStats;
46
- /** Alias for classStats.top — backward compat & test contract */
47
- readonly topClasses: readonly ClassUsage[];
48
- readonly safelist: readonly string[];
49
- readonly semantic?: AnalyzerSemanticReport;
50
- }
51
- interface AnalyzerOptions {
52
- readonly scanner?: ScanWorkspaceOptions;
53
- readonly classStats?: {
54
- readonly top?: number;
55
- readonly frequentThreshold?: number;
56
- };
57
- readonly includeClass?: (className: string) => boolean;
58
- readonly semantic?: boolean | {
59
- readonly tailwindConfigPath?: string;
60
- };
61
- }
62
- interface ClassToCssOptions {
63
- readonly prefix?: string | null;
64
- readonly strict?: boolean;
65
- }
66
- interface ClassToCssResult {
67
- readonly inputClasses: readonly string[];
68
- readonly css: string;
69
- readonly declarations: string;
70
- readonly resolvedClasses: readonly string[];
71
- readonly unknownClasses: readonly string[];
72
- readonly sizeBytes: number;
73
- }
74
- interface NativeAnalyzerBinding {
75
- analyzeClassesWorkspace?(filesJson: string, cwd: string, flags: number): unknown;
76
- analyzeClasses(filesJson: string, cwd: string, flags: number): unknown;
77
- compileCss?: (classes: string[], prefix: string | null) => unknown;
78
- /** Detect conflicting Tailwind utilities in a usage list. */
79
- detectClassConflicts?(usagesJson: string): {
80
- conflicts: Array<{
81
- group: string;
82
- variantKey: string;
83
- classes: string[];
84
- message: string;
85
- }>;
86
- conflictedClassNames: string[];
87
- };
88
- /** Classify classes as known/unknown Tailwind utilities. */
89
- classifyKnownClasses?(classes: string[], safelist: string[], customUtilities: string[]): Array<{
90
- className: string;
91
- isKnown: boolean;
92
- variantKey: string;
93
- baseClass: string;
94
- utilityPrefix: string;
95
- isArbitrary: boolean;
96
- }>;
97
- /** Map Tailwind class base → conflict group name. Return "" if no group. */
98
- resolveConflictGroup?(base: string): string;
99
- /** Aggregate class counts from scan files JSON. */
100
- collectClassCounts?(filesJson: string): Array<{
101
- name: string;
102
- count: number;
103
- }>;
104
- /** Compute frequency distribution buckets for class usages. */
105
- computeClassStats?(usagesJson: string, topLimit: number, frequentThreshold: number): {
106
- totalClassOccurrences: number;
107
- topJson: string;
108
- frequentJson: string;
109
- uniqueJson: string;
110
- };
111
- buildDistribution?(usagesJson: string): {
112
- once: number;
113
- few: number;
114
- moderate: number;
115
- frequent: number;
116
- };
117
- }
118
-
119
- declare function requireNativeBinding(): Promise<NativeAnalyzerBinding>;
120
-
121
- declare function collectClassCounts(scan: ScanWorkspaceResult): Promise<Map<string, number>>;
122
- declare function buildDistribution(usages: ClassUsage[], native?: Awaited<ReturnType<typeof requireNativeBinding>>): Promise<Record<string, number>>;
123
- /**
124
- * Analyze Tailwind class usage in a workspace and return usage statistics.
125
- * Set `semantic.tailwindConfigPath` to override Tailwind config lookup.
126
- * @example
127
- * const report = await analyzeWorkspace("./src", {
128
- * classStats: { top: 20, frequentThreshold: 2 },
129
- * semantic: { tailwindConfigPath: "tailwind.config.js" },
130
- * })
131
- */
132
- declare function analyzeWorkspace(root: string, options?: AnalyzerOptions): Promise<AnalyzerReport>;
133
-
134
- export { type AnalyzerOptions as A, type ClassToCssOptions as C, type ClassToCssResult as a, buildDistribution as b, collectClassCounts as c, type AnalyzerReport as d, type AnalyzerSemanticReport as e, type ClassConflict as f, type ClassUsage as g, analyzeWorkspace as h };