@idealyst/tooling 1.2.30 → 1.2.31
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/analyzer/index.cjs +521 -84
- package/dist/analyzer/index.cjs.map +1 -1
- package/dist/analyzer/index.d.cts +21 -44
- package/dist/analyzer/index.d.ts +21 -44
- package/dist/analyzer/index.js +525 -83
- package/dist/analyzer/index.js.map +1 -1
- package/dist/index.cjs +527 -103
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +534 -103
- package/dist/index.js.map +1 -1
- package/dist/theme-analyzer-C1lprK5o.d.cts +66 -0
- package/dist/theme-analyzer-vmhko10Q.d.ts +66 -0
- package/dist/vite-plugin.cjs +487 -88
- package/dist/vite-plugin.cjs.map +1 -1
- package/dist/vite-plugin.js +494 -88
- package/dist/vite-plugin.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { b as ComponentAnalyzerOptions, C as ComponentRegistry, T as ThemeValues } from './types-CnxJMLD8.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Component Analyzer - Extracts component prop definitions using TypeScript Compiler API.
|
|
5
|
+
*
|
|
6
|
+
* Analyzes:
|
|
7
|
+
* - types.ts files for prop interfaces
|
|
8
|
+
* - JSDoc comments for descriptions
|
|
9
|
+
* - Static .description properties on components
|
|
10
|
+
* - Theme-derived types (Intent, Size) resolved to actual values
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Analyze components and generate a registry.
|
|
15
|
+
*/
|
|
16
|
+
declare function analyzeComponents(options: ComponentAnalyzerOptions): ComponentRegistry;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Theme Analyzer - Extracts theme keys by statically analyzing theme files.
|
|
20
|
+
*
|
|
21
|
+
* Uses TypeScript Compiler API to trace the declarative builder API:
|
|
22
|
+
* - createTheme() / fromTheme(base)
|
|
23
|
+
* - .addIntent('name', {...})
|
|
24
|
+
* - .addRadius('name', value)
|
|
25
|
+
* - .addShadow('name', {...})
|
|
26
|
+
* - .setSizes({ button: { xs: {}, sm: {}, ... }, ... })
|
|
27
|
+
* - .build()
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Extract theme values from a theme file.
|
|
32
|
+
*/
|
|
33
|
+
declare function analyzeTheme(themePath: string, verbose?: boolean): ThemeValues;
|
|
34
|
+
/**
|
|
35
|
+
* Theme keys format expected by the Babel plugin.
|
|
36
|
+
* This is a subset of ThemeValues for backwards compatibility.
|
|
37
|
+
*/
|
|
38
|
+
interface BabelThemeKeys {
|
|
39
|
+
intents: string[];
|
|
40
|
+
sizes: Record<string, string[]>;
|
|
41
|
+
radii: string[];
|
|
42
|
+
shadows: string[];
|
|
43
|
+
typography: string[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Load theme keys for the Babel plugin.
|
|
47
|
+
* This is a compatibility wrapper around analyzeTheme() that:
|
|
48
|
+
* - Provides caching (only parses once per build)
|
|
49
|
+
* - Returns the subset of keys needed by the Babel plugin
|
|
50
|
+
* - Handles path resolution based on babel opts
|
|
51
|
+
*
|
|
52
|
+
* @param opts - Babel plugin options (requires themePath, optional aliases)
|
|
53
|
+
* @param rootDir - Root directory for path resolution
|
|
54
|
+
* @param _babelTypes - Unused (kept for backwards compatibility)
|
|
55
|
+
* @param verboseMode - Enable verbose logging
|
|
56
|
+
*/
|
|
57
|
+
declare function loadThemeKeys(opts: {
|
|
58
|
+
themePath?: string;
|
|
59
|
+
aliases?: Record<string, string>;
|
|
60
|
+
}, rootDir: string, _babelTypes?: unknown, verboseMode?: boolean): BabelThemeKeys;
|
|
61
|
+
/**
|
|
62
|
+
* Reset the theme cache. Useful for testing or hot reload.
|
|
63
|
+
*/
|
|
64
|
+
declare function resetThemeCache(): void;
|
|
65
|
+
|
|
66
|
+
export { type BabelThemeKeys as B, analyzeComponents as a, analyzeTheme as b, loadThemeKeys as l, resetThemeCache as r };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { b as ComponentAnalyzerOptions, C as ComponentRegistry, T as ThemeValues } from './types-CnxJMLD8.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Component Analyzer - Extracts component prop definitions using TypeScript Compiler API.
|
|
5
|
+
*
|
|
6
|
+
* Analyzes:
|
|
7
|
+
* - types.ts files for prop interfaces
|
|
8
|
+
* - JSDoc comments for descriptions
|
|
9
|
+
* - Static .description properties on components
|
|
10
|
+
* - Theme-derived types (Intent, Size) resolved to actual values
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Analyze components and generate a registry.
|
|
15
|
+
*/
|
|
16
|
+
declare function analyzeComponents(options: ComponentAnalyzerOptions): ComponentRegistry;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Theme Analyzer - Extracts theme keys by statically analyzing theme files.
|
|
20
|
+
*
|
|
21
|
+
* Uses TypeScript Compiler API to trace the declarative builder API:
|
|
22
|
+
* - createTheme() / fromTheme(base)
|
|
23
|
+
* - .addIntent('name', {...})
|
|
24
|
+
* - .addRadius('name', value)
|
|
25
|
+
* - .addShadow('name', {...})
|
|
26
|
+
* - .setSizes({ button: { xs: {}, sm: {}, ... }, ... })
|
|
27
|
+
* - .build()
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Extract theme values from a theme file.
|
|
32
|
+
*/
|
|
33
|
+
declare function analyzeTheme(themePath: string, verbose?: boolean): ThemeValues;
|
|
34
|
+
/**
|
|
35
|
+
* Theme keys format expected by the Babel plugin.
|
|
36
|
+
* This is a subset of ThemeValues for backwards compatibility.
|
|
37
|
+
*/
|
|
38
|
+
interface BabelThemeKeys {
|
|
39
|
+
intents: string[];
|
|
40
|
+
sizes: Record<string, string[]>;
|
|
41
|
+
radii: string[];
|
|
42
|
+
shadows: string[];
|
|
43
|
+
typography: string[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Load theme keys for the Babel plugin.
|
|
47
|
+
* This is a compatibility wrapper around analyzeTheme() that:
|
|
48
|
+
* - Provides caching (only parses once per build)
|
|
49
|
+
* - Returns the subset of keys needed by the Babel plugin
|
|
50
|
+
* - Handles path resolution based on babel opts
|
|
51
|
+
*
|
|
52
|
+
* @param opts - Babel plugin options (requires themePath, optional aliases)
|
|
53
|
+
* @param rootDir - Root directory for path resolution
|
|
54
|
+
* @param _babelTypes - Unused (kept for backwards compatibility)
|
|
55
|
+
* @param verboseMode - Enable verbose logging
|
|
56
|
+
*/
|
|
57
|
+
declare function loadThemeKeys(opts: {
|
|
58
|
+
themePath?: string;
|
|
59
|
+
aliases?: Record<string, string>;
|
|
60
|
+
}, rootDir: string, _babelTypes?: unknown, verboseMode?: boolean): BabelThemeKeys;
|
|
61
|
+
/**
|
|
62
|
+
* Reset the theme cache. Useful for testing or hot reload.
|
|
63
|
+
*/
|
|
64
|
+
declare function resetThemeCache(): void;
|
|
65
|
+
|
|
66
|
+
export { type BabelThemeKeys as B, analyzeComponents as a, analyzeTheme as b, loadThemeKeys as l, resetThemeCache as r };
|