@idealyst/tooling 1.2.23 → 1.2.25

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.
@@ -0,0 +1,65 @@
1
+ import { b as ComponentAnalyzerOptions, C as ComponentRegistry, T as ThemeValues } from '../types-CrlxbLFJ.js';
2
+ export { d as ComponentCategory, a as ComponentDefinition, c as ControlledState, I as IdealystDocsPluginOptions, P as PropDefinition, S as SampleProps } from '../types-CrlxbLFJ.js';
3
+
4
+ /**
5
+ * Component Analyzer - Extracts component prop definitions using TypeScript Compiler API.
6
+ *
7
+ * Analyzes:
8
+ * - types.ts files for prop interfaces
9
+ * - JSDoc comments for descriptions
10
+ * - Static .description properties on components
11
+ * - Theme-derived types (Intent, Size) resolved to actual values
12
+ */
13
+
14
+ /**
15
+ * Analyze components and generate a registry.
16
+ */
17
+ declare function analyzeComponents(options: ComponentAnalyzerOptions): ComponentRegistry;
18
+
19
+ /**
20
+ * Theme Analyzer - Extracts theme keys by statically analyzing theme files.
21
+ *
22
+ * Uses TypeScript Compiler API to trace the declarative builder API:
23
+ * - createTheme() / fromTheme(base)
24
+ * - .addIntent('name', {...})
25
+ * - .addRadius('name', value)
26
+ * - .addShadow('name', {...})
27
+ * - .setSizes({ button: { xs: {}, sm: {}, ... }, ... })
28
+ * - .build()
29
+ */
30
+
31
+ /**
32
+ * Extract theme values from a theme file.
33
+ */
34
+ declare function analyzeTheme(themePath: string, verbose?: boolean): ThemeValues;
35
+ /**
36
+ * Theme keys format expected by the Babel plugin.
37
+ * This is a subset of ThemeValues for backwards compatibility.
38
+ */
39
+ interface BabelThemeKeys {
40
+ intents: string[];
41
+ sizes: Record<string, string[]>;
42
+ radii: string[];
43
+ shadows: 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)
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
+ }, rootDir: string, _babelTypes?: unknown, verboseMode?: boolean): BabelThemeKeys;
60
+ /**
61
+ * Reset the theme cache. Useful for testing or hot reload.
62
+ */
63
+ declare function resetThemeCache(): void;
64
+
65
+ export { type BabelThemeKeys, ComponentAnalyzerOptions, ComponentRegistry, ThemeValues, analyzeComponents, analyzeTheme, loadThemeKeys, resetThemeCache };