tailwind-styled-v4 5.0.35 → 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.
- package/README.md +458 -339
- package/dist/analyzer.d.mts +152 -5
- package/dist/analyzer.d.ts +152 -5
- package/dist/animate.d.mts +30 -3
- package/dist/animate.d.ts +30 -3
- package/dist/cli.js +9 -6
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +9 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.d.mts +5 -0
- package/dist/compiler.d.ts +5 -0
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs.map +1 -1
- package/dist/devtools.d.mts +88 -2
- package/dist/devtools.d.ts +88 -2
- package/dist/engine.d.mts +557 -6
- package/dist/engine.d.ts +557 -6
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs.map +1 -1
- package/dist/index.browser.mjs +689 -508
- package/dist/index.browser.mjs.map +1 -1
- package/dist/index.d.mts +236 -9
- package/dist/index.d.ts +236 -9
- package/dist/index.js +38 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -20
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +240 -170
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +240 -170
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.d.mts +4 -2
- package/dist/plugin-api.d.ts +4 -2
- package/dist/plugin-registry.js +39 -25
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin-registry.mjs +39 -25
- package/dist/plugin-registry.mjs.map +1 -1
- package/dist/plugin.d.mts +165 -5
- package/dist/plugin.d.ts +165 -5
- package/dist/plugin.js +17 -0
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +15 -1
- package/dist/plugin.mjs.map +1 -1
- package/dist/runtime.d.mts +38 -3
- package/dist/runtime.d.ts +38 -3
- package/dist/scanner.d.mts +58 -4
- package/dist/scanner.d.ts +58 -4
- package/dist/shared.d.mts +185 -3
- package/dist/shared.d.ts +185 -3
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.d.mts +2 -2
- package/dist/storybook-addon.d.ts +2 -2
- package/dist/svelte.d.mts +2 -1
- package/dist/svelte.d.ts +2 -1
- package/dist/svelte.js +4 -4
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +4 -4
- package/dist/svelte.mjs.map +1 -1
- package/dist/theme.d.mts +38 -3
- package/dist/theme.d.ts +38 -3
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +9 -6
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +9 -6
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.d.mts +4 -1
- package/dist/vue.d.ts +4 -1
- package/dist/vue.js +4 -4
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +4 -4
- package/dist/vue.mjs.map +1 -1
- package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
- package/native/tailwind-styled-native.node +0 -0
- package/package.json +7 -5
- package/dist/analyzeWorkspace-B1_XRfdl.d.ts +0 -134
- package/dist/analyzeWorkspace-hYfu4Hg3.d.mts +0 -134
- package/dist/index-DQI6O24n.d.mts +0 -464
- package/dist/index-NDINUhLN.d.mts +0 -90
- package/dist/index-NDINUhLN.d.ts +0 -90
- package/dist/index-UkYbyBkR.d.ts +0 -464
- package/dist/liveTokenEngine-CN9ian1R.d.ts +0 -38
- package/dist/liveTokenEngine-DKoWRtqH.d.mts +0 -38
- package/dist/schemas-DR-SLxZZ.d.mts +0 -59
- package/dist/schemas-DR-SLxZZ.d.ts +0 -59
- package/dist/trace-Dz4vmZdy.d.mts +0 -96
- package/dist/trace-Dz4vmZdy.d.ts +0 -96
- package/dist/types-DXr2PmGP.d.mts +0 -31
- package/dist/types-DXr2PmGP.d.ts +0 -31
package/dist/analyzer.d.mts
CHANGED
|
@@ -1,7 +1,154 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const ScanWorkspaceOptionsSchema: z.ZodObject<{
|
|
4
|
+
includeExtensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
|
+
ignoreDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
+
useCache: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
cacheDir: z.ZodOptional<z.ZodString>;
|
|
8
|
+
smartInvalidation: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type ScanWorkspaceOptions = z.infer<typeof ScanWorkspaceOptionsSchema>;
|
|
11
|
+
declare const ScanWorkspaceResultSchema: z.ZodObject<{
|
|
12
|
+
files: z.ZodArray<z.ZodObject<{
|
|
13
|
+
file: z.ZodString;
|
|
14
|
+
classes: z.ZodArray<z.ZodString>;
|
|
15
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
totalFiles: z.ZodNumber;
|
|
18
|
+
uniqueClasses: z.ZodArray<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
type ScanWorkspaceResult = z.infer<typeof ScanWorkspaceResultSchema>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Public type contracts for @tailwind-styled/analyzer.
|
|
24
|
+
* Keep this file aligned with the runtime report shape exposed by src/index.ts.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
interface ClassUsage {
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly count: number;
|
|
30
|
+
readonly isUnused?: boolean;
|
|
31
|
+
readonly isConflict?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface ClassConflict {
|
|
34
|
+
readonly className: string;
|
|
35
|
+
readonly variants: readonly string[];
|
|
36
|
+
readonly classes: readonly string[];
|
|
37
|
+
readonly message: string;
|
|
38
|
+
}
|
|
39
|
+
interface AnalyzerClassStats {
|
|
40
|
+
readonly all: readonly ClassUsage[];
|
|
41
|
+
readonly top: readonly ClassUsage[];
|
|
42
|
+
readonly frequent: readonly ClassUsage[];
|
|
43
|
+
readonly unique: readonly ClassUsage[];
|
|
44
|
+
readonly distribution: Readonly<Record<string, number>>;
|
|
45
|
+
}
|
|
46
|
+
interface TailwindConfigSummary {
|
|
47
|
+
readonly path: string;
|
|
48
|
+
readonly loaded: boolean;
|
|
49
|
+
readonly safelistCount: number;
|
|
50
|
+
readonly customUtilityCount: number;
|
|
51
|
+
readonly warning?: string;
|
|
52
|
+
}
|
|
53
|
+
interface AnalyzerSemanticReport {
|
|
54
|
+
readonly unusedClasses: readonly ClassUsage[];
|
|
55
|
+
readonly unknownClasses: readonly ClassUsage[];
|
|
56
|
+
readonly conflicts: readonly ClassConflict[];
|
|
57
|
+
readonly tailwindConfig?: TailwindConfigSummary;
|
|
58
|
+
}
|
|
59
|
+
interface AnalyzerReport {
|
|
60
|
+
readonly root: string;
|
|
61
|
+
readonly totalFiles: number;
|
|
62
|
+
readonly uniqueClassCount: number;
|
|
63
|
+
readonly totalClassOccurrences: number;
|
|
64
|
+
readonly classStats: AnalyzerClassStats;
|
|
65
|
+
/** Alias for classStats.top — backward compat & test contract */
|
|
66
|
+
readonly topClasses: readonly ClassUsage[];
|
|
67
|
+
readonly safelist: readonly string[];
|
|
68
|
+
readonly semantic?: AnalyzerSemanticReport;
|
|
69
|
+
}
|
|
70
|
+
interface AnalyzerOptions {
|
|
71
|
+
readonly scanner?: ScanWorkspaceOptions;
|
|
72
|
+
readonly classStats?: {
|
|
73
|
+
readonly top?: number;
|
|
74
|
+
readonly frequentThreshold?: number;
|
|
75
|
+
};
|
|
76
|
+
readonly includeClass?: (className: string) => boolean;
|
|
77
|
+
readonly semantic?: boolean | {
|
|
78
|
+
readonly tailwindConfigPath?: string;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
interface ClassToCssOptions {
|
|
82
|
+
readonly prefix?: string | null;
|
|
83
|
+
readonly strict?: boolean;
|
|
84
|
+
}
|
|
85
|
+
interface ClassToCssResult {
|
|
86
|
+
readonly inputClasses: readonly string[];
|
|
87
|
+
readonly css: string;
|
|
88
|
+
readonly declarations: string;
|
|
89
|
+
readonly resolvedClasses: readonly string[];
|
|
90
|
+
readonly unknownClasses: readonly string[];
|
|
91
|
+
readonly sizeBytes: number;
|
|
92
|
+
}
|
|
93
|
+
interface NativeAnalyzerBinding {
|
|
94
|
+
analyzeClassesWorkspace?(filesJson: string, cwd: string, flags: number): unknown;
|
|
95
|
+
analyzeClasses(filesJson: string, cwd: string, flags: number): unknown;
|
|
96
|
+
compileCss?: (classes: string[], prefix: string | null) => unknown;
|
|
97
|
+
/** Detect conflicting Tailwind utilities in a usage list. */
|
|
98
|
+
detectClassConflicts?(usagesJson: string): {
|
|
99
|
+
conflicts: Array<{
|
|
100
|
+
group: string;
|
|
101
|
+
variantKey: string;
|
|
102
|
+
classes: string[];
|
|
103
|
+
message: string;
|
|
104
|
+
}>;
|
|
105
|
+
conflictedClassNames: string[];
|
|
106
|
+
};
|
|
107
|
+
/** Classify classes as known/unknown Tailwind utilities. */
|
|
108
|
+
classifyKnownClasses?(classes: string[], safelist: string[], customUtilities: string[]): Array<{
|
|
109
|
+
className: string;
|
|
110
|
+
isKnown: boolean;
|
|
111
|
+
variantKey: string;
|
|
112
|
+
baseClass: string;
|
|
113
|
+
utilityPrefix: string;
|
|
114
|
+
isArbitrary: boolean;
|
|
115
|
+
}>;
|
|
116
|
+
/** Map Tailwind class base → conflict group name. Return "" if no group. */
|
|
117
|
+
resolveConflictGroup?(base: string): string;
|
|
118
|
+
/** Aggregate class counts from scan files JSON. */
|
|
119
|
+
collectClassCounts?(filesJson: string): Array<{
|
|
120
|
+
name: string;
|
|
121
|
+
count: number;
|
|
122
|
+
}>;
|
|
123
|
+
/** Compute frequency distribution buckets for class usages. */
|
|
124
|
+
computeClassStats?(usagesJson: string, topLimit: number, frequentThreshold: number): {
|
|
125
|
+
totalClassOccurrences: number;
|
|
126
|
+
topJson: string;
|
|
127
|
+
frequentJson: string;
|
|
128
|
+
uniqueJson: string;
|
|
129
|
+
};
|
|
130
|
+
buildDistribution?(usagesJson: string): {
|
|
131
|
+
once: number;
|
|
132
|
+
few: number;
|
|
133
|
+
moderate: number;
|
|
134
|
+
frequent: number;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare function requireNativeBinding(): Promise<NativeAnalyzerBinding>;
|
|
139
|
+
|
|
140
|
+
declare function collectClassCounts(scan: ScanWorkspaceResult): Promise<Map<string, number>>;
|
|
141
|
+
declare function buildDistribution(usages: ClassUsage[], native?: Awaited<ReturnType<typeof requireNativeBinding>>): Promise<Record<string, number>>;
|
|
142
|
+
/**
|
|
143
|
+
* Analyze Tailwind class usage in a workspace and return usage statistics.
|
|
144
|
+
* Set `semantic.tailwindConfigPath` to override Tailwind config lookup.
|
|
145
|
+
* @example
|
|
146
|
+
* const report = await analyzeWorkspace("./src", {
|
|
147
|
+
* classStats: { top: 20, frequentThreshold: 2 },
|
|
148
|
+
* semantic: { tailwindConfigPath: "tailwind.config.js" },
|
|
149
|
+
* })
|
|
150
|
+
*/
|
|
151
|
+
declare function analyzeWorkspace(root: string, options?: AnalyzerOptions): Promise<AnalyzerReport>;
|
|
5
152
|
|
|
6
153
|
/**
|
|
7
154
|
* Convert Tailwind class input into atomic CSS output via native binding.
|
|
@@ -72,4 +219,4 @@ declare const __internal: {
|
|
|
72
219
|
};
|
|
73
220
|
};
|
|
74
221
|
|
|
75
|
-
export { ClassToCssOptions, ClassToCssResult, __internal, classToCss };
|
|
222
|
+
export { type AnalyzerOptions, type AnalyzerReport, type AnalyzerSemanticReport, type ClassConflict, type ClassToCssOptions, type ClassToCssResult, type ClassUsage, __internal, analyzeWorkspace, classToCss };
|
package/dist/analyzer.d.ts
CHANGED
|
@@ -1,7 +1,154 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
declare const ScanWorkspaceOptionsSchema: z.ZodObject<{
|
|
4
|
+
includeExtensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
|
+
ignoreDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
+
useCache: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
cacheDir: z.ZodOptional<z.ZodString>;
|
|
8
|
+
smartInvalidation: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type ScanWorkspaceOptions = z.infer<typeof ScanWorkspaceOptionsSchema>;
|
|
11
|
+
declare const ScanWorkspaceResultSchema: z.ZodObject<{
|
|
12
|
+
files: z.ZodArray<z.ZodObject<{
|
|
13
|
+
file: z.ZodString;
|
|
14
|
+
classes: z.ZodArray<z.ZodString>;
|
|
15
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
totalFiles: z.ZodNumber;
|
|
18
|
+
uniqueClasses: z.ZodArray<z.ZodString>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
type ScanWorkspaceResult = z.infer<typeof ScanWorkspaceResultSchema>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Public type contracts for @tailwind-styled/analyzer.
|
|
24
|
+
* Keep this file aligned with the runtime report shape exposed by src/index.ts.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
interface ClassUsage {
|
|
28
|
+
readonly name: string;
|
|
29
|
+
readonly count: number;
|
|
30
|
+
readonly isUnused?: boolean;
|
|
31
|
+
readonly isConflict?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface ClassConflict {
|
|
34
|
+
readonly className: string;
|
|
35
|
+
readonly variants: readonly string[];
|
|
36
|
+
readonly classes: readonly string[];
|
|
37
|
+
readonly message: string;
|
|
38
|
+
}
|
|
39
|
+
interface AnalyzerClassStats {
|
|
40
|
+
readonly all: readonly ClassUsage[];
|
|
41
|
+
readonly top: readonly ClassUsage[];
|
|
42
|
+
readonly frequent: readonly ClassUsage[];
|
|
43
|
+
readonly unique: readonly ClassUsage[];
|
|
44
|
+
readonly distribution: Readonly<Record<string, number>>;
|
|
45
|
+
}
|
|
46
|
+
interface TailwindConfigSummary {
|
|
47
|
+
readonly path: string;
|
|
48
|
+
readonly loaded: boolean;
|
|
49
|
+
readonly safelistCount: number;
|
|
50
|
+
readonly customUtilityCount: number;
|
|
51
|
+
readonly warning?: string;
|
|
52
|
+
}
|
|
53
|
+
interface AnalyzerSemanticReport {
|
|
54
|
+
readonly unusedClasses: readonly ClassUsage[];
|
|
55
|
+
readonly unknownClasses: readonly ClassUsage[];
|
|
56
|
+
readonly conflicts: readonly ClassConflict[];
|
|
57
|
+
readonly tailwindConfig?: TailwindConfigSummary;
|
|
58
|
+
}
|
|
59
|
+
interface AnalyzerReport {
|
|
60
|
+
readonly root: string;
|
|
61
|
+
readonly totalFiles: number;
|
|
62
|
+
readonly uniqueClassCount: number;
|
|
63
|
+
readonly totalClassOccurrences: number;
|
|
64
|
+
readonly classStats: AnalyzerClassStats;
|
|
65
|
+
/** Alias for classStats.top — backward compat & test contract */
|
|
66
|
+
readonly topClasses: readonly ClassUsage[];
|
|
67
|
+
readonly safelist: readonly string[];
|
|
68
|
+
readonly semantic?: AnalyzerSemanticReport;
|
|
69
|
+
}
|
|
70
|
+
interface AnalyzerOptions {
|
|
71
|
+
readonly scanner?: ScanWorkspaceOptions;
|
|
72
|
+
readonly classStats?: {
|
|
73
|
+
readonly top?: number;
|
|
74
|
+
readonly frequentThreshold?: number;
|
|
75
|
+
};
|
|
76
|
+
readonly includeClass?: (className: string) => boolean;
|
|
77
|
+
readonly semantic?: boolean | {
|
|
78
|
+
readonly tailwindConfigPath?: string;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
interface ClassToCssOptions {
|
|
82
|
+
readonly prefix?: string | null;
|
|
83
|
+
readonly strict?: boolean;
|
|
84
|
+
}
|
|
85
|
+
interface ClassToCssResult {
|
|
86
|
+
readonly inputClasses: readonly string[];
|
|
87
|
+
readonly css: string;
|
|
88
|
+
readonly declarations: string;
|
|
89
|
+
readonly resolvedClasses: readonly string[];
|
|
90
|
+
readonly unknownClasses: readonly string[];
|
|
91
|
+
readonly sizeBytes: number;
|
|
92
|
+
}
|
|
93
|
+
interface NativeAnalyzerBinding {
|
|
94
|
+
analyzeClassesWorkspace?(filesJson: string, cwd: string, flags: number): unknown;
|
|
95
|
+
analyzeClasses(filesJson: string, cwd: string, flags: number): unknown;
|
|
96
|
+
compileCss?: (classes: string[], prefix: string | null) => unknown;
|
|
97
|
+
/** Detect conflicting Tailwind utilities in a usage list. */
|
|
98
|
+
detectClassConflicts?(usagesJson: string): {
|
|
99
|
+
conflicts: Array<{
|
|
100
|
+
group: string;
|
|
101
|
+
variantKey: string;
|
|
102
|
+
classes: string[];
|
|
103
|
+
message: string;
|
|
104
|
+
}>;
|
|
105
|
+
conflictedClassNames: string[];
|
|
106
|
+
};
|
|
107
|
+
/** Classify classes as known/unknown Tailwind utilities. */
|
|
108
|
+
classifyKnownClasses?(classes: string[], safelist: string[], customUtilities: string[]): Array<{
|
|
109
|
+
className: string;
|
|
110
|
+
isKnown: boolean;
|
|
111
|
+
variantKey: string;
|
|
112
|
+
baseClass: string;
|
|
113
|
+
utilityPrefix: string;
|
|
114
|
+
isArbitrary: boolean;
|
|
115
|
+
}>;
|
|
116
|
+
/** Map Tailwind class base → conflict group name. Return "" if no group. */
|
|
117
|
+
resolveConflictGroup?(base: string): string;
|
|
118
|
+
/** Aggregate class counts from scan files JSON. */
|
|
119
|
+
collectClassCounts?(filesJson: string): Array<{
|
|
120
|
+
name: string;
|
|
121
|
+
count: number;
|
|
122
|
+
}>;
|
|
123
|
+
/** Compute frequency distribution buckets for class usages. */
|
|
124
|
+
computeClassStats?(usagesJson: string, topLimit: number, frequentThreshold: number): {
|
|
125
|
+
totalClassOccurrences: number;
|
|
126
|
+
topJson: string;
|
|
127
|
+
frequentJson: string;
|
|
128
|
+
uniqueJson: string;
|
|
129
|
+
};
|
|
130
|
+
buildDistribution?(usagesJson: string): {
|
|
131
|
+
once: number;
|
|
132
|
+
few: number;
|
|
133
|
+
moderate: number;
|
|
134
|
+
frequent: number;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
declare function requireNativeBinding(): Promise<NativeAnalyzerBinding>;
|
|
139
|
+
|
|
140
|
+
declare function collectClassCounts(scan: ScanWorkspaceResult): Promise<Map<string, number>>;
|
|
141
|
+
declare function buildDistribution(usages: ClassUsage[], native?: Awaited<ReturnType<typeof requireNativeBinding>>): Promise<Record<string, number>>;
|
|
142
|
+
/**
|
|
143
|
+
* Analyze Tailwind class usage in a workspace and return usage statistics.
|
|
144
|
+
* Set `semantic.tailwindConfigPath` to override Tailwind config lookup.
|
|
145
|
+
* @example
|
|
146
|
+
* const report = await analyzeWorkspace("./src", {
|
|
147
|
+
* classStats: { top: 20, frequentThreshold: 2 },
|
|
148
|
+
* semantic: { tailwindConfigPath: "tailwind.config.js" },
|
|
149
|
+
* })
|
|
150
|
+
*/
|
|
151
|
+
declare function analyzeWorkspace(root: string, options?: AnalyzerOptions): Promise<AnalyzerReport>;
|
|
5
152
|
|
|
6
153
|
/**
|
|
7
154
|
* Convert Tailwind class input into atomic CSS output via native binding.
|
|
@@ -72,4 +219,4 @@ declare const __internal: {
|
|
|
72
219
|
};
|
|
73
220
|
};
|
|
74
221
|
|
|
75
|
-
export { ClassToCssOptions, ClassToCssResult, __internal, classToCss };
|
|
222
|
+
export { type AnalyzerOptions, type AnalyzerReport, type AnalyzerSemanticReport, type ClassConflict, type ClassToCssOptions, type ClassToCssResult, type ClassUsage, __internal, analyzeWorkspace, classToCss };
|
package/dist/animate.d.mts
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type CSSFillMode = "none" | "forwards" | "backwards" | "both";
|
|
2
|
+
type CSSDirection = "normal" | "reverse" | "alternate" | "alternate-reverse";
|
|
3
|
+
type CSSIterationCount = number | "infinite";
|
|
4
|
+
type PresetEasing = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "step-start" | "step-end";
|
|
5
|
+
type CubicBezierEasing = `cubic-bezier(${string})`;
|
|
6
|
+
type StepsEasing = `steps(${string})`;
|
|
7
|
+
type CSSEasing = PresetEasing | CubicBezierEasing | StepsEasing;
|
|
8
|
+
interface AnimateOptions {
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
duration?: number;
|
|
12
|
+
easing?: CSSEasing;
|
|
13
|
+
delay?: number;
|
|
14
|
+
fill?: CSSFillMode;
|
|
15
|
+
iterations?: CSSIterationCount;
|
|
16
|
+
direction?: CSSDirection;
|
|
17
|
+
name?: string;
|
|
18
|
+
}
|
|
19
|
+
interface KeyframesDefinition {
|
|
20
|
+
[stop: string]: string;
|
|
21
|
+
}
|
|
22
|
+
interface CompiledAnimation {
|
|
23
|
+
className: string;
|
|
24
|
+
keyframesCss: string;
|
|
25
|
+
animationCss: string;
|
|
26
|
+
}
|
|
27
|
+
interface AnimationRegistryOptions {
|
|
28
|
+
cacheLimit?: number;
|
|
29
|
+
}
|
|
3
30
|
|
|
4
31
|
interface AnimationRegistry {
|
|
5
32
|
compileAnimation(opts: AnimateOptions): Promise<CompiledAnimation>;
|
|
@@ -44,4 +71,4 @@ declare const animations: {
|
|
|
44
71
|
readonly spinIn: () => Promise<string>;
|
|
45
72
|
};
|
|
46
73
|
|
|
47
|
-
export { AnimateOptions, createAnimationRegistry as AnimationRegistry, AnimationRegistryOptions, type AnimationRegistry as AnimationRegistryType, CompiledAnimation, type InjectAnimationCssOptions, KeyframesDefinition, animate, animations, compileAnimation, compileKeyframes, createAnimationRegistry, extractAnimationCss, getDefaultAnimationRegistry, initAnimate, injectAnimationCss, keyframes, resetAnimationRegistry };
|
|
74
|
+
export { type AnimateOptions, createAnimationRegistry as AnimationRegistry, type AnimationRegistryOptions, type AnimationRegistry as AnimationRegistryType, type CSSDirection, type CSSEasing, type CSSFillMode, type CSSIterationCount, type CompiledAnimation, type CubicBezierEasing, type InjectAnimationCssOptions, type KeyframesDefinition, type PresetEasing, type StepsEasing, animate, animations, compileAnimation, compileKeyframes, createAnimationRegistry, extractAnimationCss, getDefaultAnimationRegistry, initAnimate, injectAnimationCss, keyframes, resetAnimationRegistry };
|
package/dist/animate.d.ts
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
type CSSFillMode = "none" | "forwards" | "backwards" | "both";
|
|
2
|
+
type CSSDirection = "normal" | "reverse" | "alternate" | "alternate-reverse";
|
|
3
|
+
type CSSIterationCount = number | "infinite";
|
|
4
|
+
type PresetEasing = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "step-start" | "step-end";
|
|
5
|
+
type CubicBezierEasing = `cubic-bezier(${string})`;
|
|
6
|
+
type StepsEasing = `steps(${string})`;
|
|
7
|
+
type CSSEasing = PresetEasing | CubicBezierEasing | StepsEasing;
|
|
8
|
+
interface AnimateOptions {
|
|
9
|
+
from: string;
|
|
10
|
+
to: string;
|
|
11
|
+
duration?: number;
|
|
12
|
+
easing?: CSSEasing;
|
|
13
|
+
delay?: number;
|
|
14
|
+
fill?: CSSFillMode;
|
|
15
|
+
iterations?: CSSIterationCount;
|
|
16
|
+
direction?: CSSDirection;
|
|
17
|
+
name?: string;
|
|
18
|
+
}
|
|
19
|
+
interface KeyframesDefinition {
|
|
20
|
+
[stop: string]: string;
|
|
21
|
+
}
|
|
22
|
+
interface CompiledAnimation {
|
|
23
|
+
className: string;
|
|
24
|
+
keyframesCss: string;
|
|
25
|
+
animationCss: string;
|
|
26
|
+
}
|
|
27
|
+
interface AnimationRegistryOptions {
|
|
28
|
+
cacheLimit?: number;
|
|
29
|
+
}
|
|
3
30
|
|
|
4
31
|
interface AnimationRegistry {
|
|
5
32
|
compileAnimation(opts: AnimateOptions): Promise<CompiledAnimation>;
|
|
@@ -44,4 +71,4 @@ declare const animations: {
|
|
|
44
71
|
readonly spinIn: () => Promise<string>;
|
|
45
72
|
};
|
|
46
73
|
|
|
47
|
-
export { AnimateOptions, createAnimationRegistry as AnimationRegistry, AnimationRegistryOptions, type AnimationRegistry as AnimationRegistryType, CompiledAnimation, type InjectAnimationCssOptions, KeyframesDefinition, animate, animations, compileAnimation, compileKeyframes, createAnimationRegistry, extractAnimationCss, getDefaultAnimationRegistry, initAnimate, injectAnimationCss, keyframes, resetAnimationRegistry };
|
|
74
|
+
export { type AnimateOptions, createAnimationRegistry as AnimationRegistry, type AnimationRegistryOptions, type AnimationRegistry as AnimationRegistryType, type CSSDirection, type CSSEasing, type CSSFillMode, type CSSIterationCount, type CompiledAnimation, type CubicBezierEasing, type InjectAnimationCssOptions, type KeyframesDefinition, type PresetEasing, type StepsEasing, animate, animations, compileAnimation, compileKeyframes, createAnimationRegistry, extractAnimationCss, getDefaultAnimationRegistry, initAnimate, injectAnimationCss, keyframes, resetAnimationRegistry };
|
package/dist/cli.js
CHANGED
|
@@ -8843,10 +8843,11 @@ async function validateThemeConfig(cwd2) {
|
|
|
8843
8843
|
const configModule = await import(configUrl.href);
|
|
8844
8844
|
const config = configModule.default || configModule;
|
|
8845
8845
|
const theme = config.theme || {};
|
|
8846
|
-
|
|
8846
|
+
const validateColors = native.validateColorsNapi;
|
|
8847
|
+
if (theme.colors && typeof validateColors === "function") {
|
|
8847
8848
|
try {
|
|
8848
8849
|
const colorsJson = JSON.stringify(theme.colors);
|
|
8849
|
-
const isValid =
|
|
8850
|
+
const isValid = validateColors(colorsJson);
|
|
8850
8851
|
results.push({
|
|
8851
8852
|
type: "theme-colors",
|
|
8852
8853
|
valid: isValid,
|
|
@@ -8860,10 +8861,11 @@ async function validateThemeConfig(cwd2) {
|
|
|
8860
8861
|
});
|
|
8861
8862
|
}
|
|
8862
8863
|
}
|
|
8863
|
-
|
|
8864
|
+
const validateBreakpoints = native.validateBreakpointsNapi;
|
|
8865
|
+
if (theme.screens && typeof validateBreakpoints === "function") {
|
|
8864
8866
|
try {
|
|
8865
8867
|
const screensJson = JSON.stringify(theme.screens);
|
|
8866
|
-
const isValid =
|
|
8868
|
+
const isValid = validateBreakpoints(screensJson);
|
|
8867
8869
|
results.push({
|
|
8868
8870
|
type: "theme-breakpoints",
|
|
8869
8871
|
valid: isValid,
|
|
@@ -8877,9 +8879,10 @@ async function validateThemeConfig(cwd2) {
|
|
|
8877
8879
|
});
|
|
8878
8880
|
}
|
|
8879
8881
|
}
|
|
8880
|
-
|
|
8882
|
+
const runHealthCheck = native.runHealthCheck;
|
|
8883
|
+
if (typeof runHealthCheck === "function") {
|
|
8881
8884
|
try {
|
|
8882
|
-
|
|
8885
|
+
runHealthCheck();
|
|
8883
8886
|
results.push({ type: "theme-integrity", valid: true, message: "Theme integrity check passed" });
|
|
8884
8887
|
} catch {
|
|
8885
8888
|
results.push({ type: "theme-integrity", valid: false, message: "Theme integrity check failed" });
|