@idealyst/tooling 1.2.39 → 1.2.41
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 +85 -4
- package/dist/analyzer/index.cjs.map +1 -1
- package/dist/analyzer/index.d.cts +4 -1
- package/dist/analyzer/index.d.ts +4 -1
- package/dist/analyzer/index.js +85 -4
- package/dist/analyzer/index.js.map +1 -1
- package/dist/index.cjs +81 -3
- 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 +81 -3
- package/dist/index.js.map +1 -1
- package/dist/{theme-analyzer-vmhko10Q.d.ts → theme-analyzer-BECHzMn_.d.ts} +3 -0
- package/dist/{theme-analyzer-C1lprK5o.d.cts → theme-analyzer-Bm-ZTjvz.d.cts} +3 -0
- package/dist/vite-plugin.cjs +74 -2
- package/dist/vite-plugin.cjs.map +1 -1
- package/dist/vite-plugin.js +74 -2
- package/dist/vite-plugin.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as AnalysisResult, b as AnalyzerOptions, c as FileInput, F as FileType, I as ImportInfo, P as Platform, d as PrimitiveRule, e as PrimitiveRuleSet, S as Severity, a as Violation, V as ViolationType } from './types-CvIlSIOV.cjs';
|
|
2
|
-
export { B as BabelThemeKeys, a as analyzeComponents, b as analyzeTheme, l as loadThemeKeys, r as resetThemeCache } from './theme-analyzer-
|
|
2
|
+
export { B as BabelThemeKeys, a as analyzeComponents, b as analyzeTheme, l as loadThemeKeys, r as resetThemeCache } from './theme-analyzer-Bm-ZTjvz.cjs';
|
|
3
3
|
import { C as ComponentRegistry } from './types-CnxJMLD8.cjs';
|
|
4
4
|
export { b as ComponentAnalyzerOptions, a as ComponentDefinition, c as ControlledState, I as IdealystDocsPluginOptions, P as PropDefinition, S as SampleProps, T as ThemeValues } from './types-CnxJMLD8.cjs';
|
|
5
5
|
export { generateComponentRegistry, idealystDocsPlugin } from './vite-plugin.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { A as AnalysisResult, b as AnalyzerOptions, c as FileInput, F as FileType, I as ImportInfo, P as Platform, d as PrimitiveRule, e as PrimitiveRuleSet, S as Severity, a as Violation, V as ViolationType } from './types-CvIlSIOV.js';
|
|
2
|
-
export { B as BabelThemeKeys, a as analyzeComponents, b as analyzeTheme, l as loadThemeKeys, r as resetThemeCache } from './theme-analyzer-
|
|
2
|
+
export { B as BabelThemeKeys, a as analyzeComponents, b as analyzeTheme, l as loadThemeKeys, r as resetThemeCache } from './theme-analyzer-BECHzMn_.js';
|
|
3
3
|
import { C as ComponentRegistry } from './types-CnxJMLD8.js';
|
|
4
4
|
export { b as ComponentAnalyzerOptions, a as ComponentDefinition, c as ControlledState, I as IdealystDocsPluginOptions, P as PropDefinition, S as SampleProps, T as ThemeValues } from './types-CnxJMLD8.js';
|
|
5
5
|
export { generateComponentRegistry, idealystDocsPlugin } from './vite-plugin.js';
|
package/dist/index.js
CHANGED
|
@@ -190,7 +190,8 @@ function analyzeThemeSource(themePath, options = {}) {
|
|
|
190
190
|
log(`Processing ${calls.length} builder method calls`);
|
|
191
191
|
for (const { method, args } of calls) {
|
|
192
192
|
switch (method) {
|
|
193
|
-
case "addIntent":
|
|
193
|
+
case "addIntent":
|
|
194
|
+
case "setIntent": {
|
|
194
195
|
const name = getStringValue2(args[0]);
|
|
195
196
|
if (name && !values.intents.includes(name)) {
|
|
196
197
|
values.intents.push(name);
|
|
@@ -323,6 +324,41 @@ function analyzeThemeSource(themePath, options = {}) {
|
|
|
323
324
|
}
|
|
324
325
|
break;
|
|
325
326
|
}
|
|
327
|
+
case "addSurfaceColor":
|
|
328
|
+
case "setSurfaceColor": {
|
|
329
|
+
const name = getStringValue2(args[0]);
|
|
330
|
+
if (name && !values.surfaceColors.includes(name)) {
|
|
331
|
+
values.surfaceColors.push(name);
|
|
332
|
+
log(` Found surface color: ${name}`);
|
|
333
|
+
}
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
case "addTextColor":
|
|
337
|
+
case "setTextColor": {
|
|
338
|
+
const name = getStringValue2(args[0]);
|
|
339
|
+
if (name && !values.textColors.includes(name)) {
|
|
340
|
+
values.textColors.push(name);
|
|
341
|
+
log(` Found text color: ${name}`);
|
|
342
|
+
}
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
case "addBorderColor":
|
|
346
|
+
case "setBorderColor": {
|
|
347
|
+
const name = getStringValue2(args[0]);
|
|
348
|
+
if (name && !values.borderColors.includes(name)) {
|
|
349
|
+
values.borderColors.push(name);
|
|
350
|
+
log(` Found border color: ${name}`);
|
|
351
|
+
}
|
|
352
|
+
break;
|
|
353
|
+
}
|
|
354
|
+
case "addPalletColor":
|
|
355
|
+
case "setPalletColor": {
|
|
356
|
+
const name = getStringValue2(args[0]);
|
|
357
|
+
if (name) {
|
|
358
|
+
log(` Found pallet color: ${name}`);
|
|
359
|
+
}
|
|
360
|
+
break;
|
|
361
|
+
}
|
|
326
362
|
case "build":
|
|
327
363
|
break;
|
|
328
364
|
default:
|
|
@@ -477,7 +513,8 @@ function analyzeTheme(themePath, verbose = false) {
|
|
|
477
513
|
log("Processing", calls.length, "builder method calls");
|
|
478
514
|
for (const { method, args } of calls) {
|
|
479
515
|
switch (method) {
|
|
480
|
-
case "addIntent":
|
|
516
|
+
case "addIntent":
|
|
517
|
+
case "setIntent": {
|
|
481
518
|
const name = getStringValue(args[0]);
|
|
482
519
|
if (name && !values.intents.includes(name)) {
|
|
483
520
|
values.intents.push(name);
|
|
@@ -549,6 +586,41 @@ function analyzeTheme(themePath, verbose = false) {
|
|
|
549
586
|
}
|
|
550
587
|
break;
|
|
551
588
|
}
|
|
589
|
+
case "addSurfaceColor":
|
|
590
|
+
case "setSurfaceColor": {
|
|
591
|
+
const name = getStringValue(args[0]);
|
|
592
|
+
if (name && !values.surfaceColors.includes(name)) {
|
|
593
|
+
values.surfaceColors.push(name);
|
|
594
|
+
log(" Found surface color:", name);
|
|
595
|
+
}
|
|
596
|
+
break;
|
|
597
|
+
}
|
|
598
|
+
case "addTextColor":
|
|
599
|
+
case "setTextColor": {
|
|
600
|
+
const name = getStringValue(args[0]);
|
|
601
|
+
if (name && !values.textColors.includes(name)) {
|
|
602
|
+
values.textColors.push(name);
|
|
603
|
+
log(" Found text color:", name);
|
|
604
|
+
}
|
|
605
|
+
break;
|
|
606
|
+
}
|
|
607
|
+
case "addBorderColor":
|
|
608
|
+
case "setBorderColor": {
|
|
609
|
+
const name = getStringValue(args[0]);
|
|
610
|
+
if (name && !values.borderColors.includes(name)) {
|
|
611
|
+
values.borderColors.push(name);
|
|
612
|
+
log(" Found border color:", name);
|
|
613
|
+
}
|
|
614
|
+
break;
|
|
615
|
+
}
|
|
616
|
+
case "addPalletColor":
|
|
617
|
+
case "setPalletColor": {
|
|
618
|
+
const name = getStringValue(args[0]);
|
|
619
|
+
if (name) {
|
|
620
|
+
log(" Found pallet color:", name);
|
|
621
|
+
}
|
|
622
|
+
break;
|
|
623
|
+
}
|
|
552
624
|
case "build":
|
|
553
625
|
break;
|
|
554
626
|
default:
|
|
@@ -731,13 +803,19 @@ function loadThemeKeys(opts, rootDir, _babelTypes, verboseMode = false) {
|
|
|
731
803
|
sizes: themeValues.sizes,
|
|
732
804
|
radii: themeValues.radii,
|
|
733
805
|
shadows: themeValues.shadows,
|
|
734
|
-
typography: themeValues.typography
|
|
806
|
+
typography: themeValues.typography,
|
|
807
|
+
surfaceColors: themeValues.surfaceColors,
|
|
808
|
+
textColors: themeValues.textColors,
|
|
809
|
+
borderColors: themeValues.borderColors
|
|
735
810
|
};
|
|
736
811
|
if (verboseMode) {
|
|
737
812
|
console.log("[idealyst-plugin] Extracted theme keys:");
|
|
738
813
|
console.log(" intents:", themeKeysCache.intents);
|
|
739
814
|
console.log(" radii:", themeKeysCache.radii);
|
|
740
815
|
console.log(" shadows:", themeKeysCache.shadows);
|
|
816
|
+
console.log(" surfaceColors:", themeKeysCache.surfaceColors);
|
|
817
|
+
console.log(" textColors:", themeKeysCache.textColors);
|
|
818
|
+
console.log(" borderColors:", themeKeysCache.borderColors);
|
|
741
819
|
console.log(" sizes:");
|
|
742
820
|
for (const [component, sizes] of Object.entries(themeKeysCache.sizes)) {
|
|
743
821
|
console.log(` ${component}:`, sizes);
|