@kinetixui/cli 0.16.1 → 0.18.0
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/index.js +41 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -422,10 +422,25 @@ async function inspect(name, options) {
|
|
|
422
422
|
}
|
|
423
423
|
const spec = await fetchComponentSpec(options.registry, name);
|
|
424
424
|
if (spec) {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
425
|
+
if (spec.since || spec.status) {
|
|
426
|
+
console.log();
|
|
427
|
+
console.log(`${pc4.dim("Since:")} ${spec.since ?? "\u2014"} ${pc4.dim(spec.status ? `(${spec.status})` : "")}`);
|
|
428
|
+
}
|
|
429
|
+
const axes = Object.entries(spec.variants ?? {});
|
|
430
|
+
if (axes.length) {
|
|
431
|
+
console.log();
|
|
432
|
+
console.log(pc4.dim("Variants:"));
|
|
433
|
+
for (const [axis, options_] of axes) {
|
|
434
|
+
console.log(` ${pc4.dim(axis)} ${options_.join(", ")}`);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
if (spec.components?.length) {
|
|
438
|
+
console.log();
|
|
439
|
+
console.log(pc4.dim("Parts:"));
|
|
440
|
+
for (const part of spec.components) {
|
|
441
|
+
const own = part.props.map((p) => p.required ? p.name : `${p.name}?`);
|
|
442
|
+
console.log(` ${part.name}${own.length ? ` ${pc4.dim(own.join(", "))}` : ""}`);
|
|
443
|
+
}
|
|
429
444
|
}
|
|
430
445
|
}
|
|
431
446
|
console.log();
|
|
@@ -727,7 +742,14 @@ var ACCEPTED_TOKENS = [
|
|
|
727
742
|
"destructive-foreground",
|
|
728
743
|
"border",
|
|
729
744
|
"input",
|
|
730
|
-
"ring"
|
|
745
|
+
"ring",
|
|
746
|
+
// role tokens layered over primary/ring — optional; when unset they resolve to primary / ring
|
|
747
|
+
"action",
|
|
748
|
+
"action-foreground",
|
|
749
|
+
"link",
|
|
750
|
+
"focus",
|
|
751
|
+
"brand",
|
|
752
|
+
"brand-foreground"
|
|
731
753
|
];
|
|
732
754
|
var EXAMPLE_VALUES = {
|
|
733
755
|
background: "#ffffff",
|
|
@@ -748,7 +770,13 @@ var EXAMPLE_VALUES = {
|
|
|
748
770
|
"destructive-foreground": "#ffffff",
|
|
749
771
|
border: "#e2e8f0",
|
|
750
772
|
input: "#e2e8f0",
|
|
751
|
-
ring: "#2563eb"
|
|
773
|
+
ring: "#2563eb",
|
|
774
|
+
action: "#2563eb",
|
|
775
|
+
"action-foreground": "#ffffff",
|
|
776
|
+
link: "#2563eb",
|
|
777
|
+
focus: "#2563eb",
|
|
778
|
+
brand: "#0f172a",
|
|
779
|
+
"brand-foreground": "#ffffff"
|
|
752
780
|
};
|
|
753
781
|
var FOREGROUND_OF = {
|
|
754
782
|
background: "foreground",
|
|
@@ -758,7 +786,9 @@ var FOREGROUND_OF = {
|
|
|
758
786
|
secondary: "secondary-foreground",
|
|
759
787
|
muted: "muted-foreground",
|
|
760
788
|
accent: "accent-foreground",
|
|
761
|
-
destructive: "destructive-foreground"
|
|
789
|
+
destructive: "destructive-foreground",
|
|
790
|
+
action: "action-foreground",
|
|
791
|
+
brand: "brand-foreground"
|
|
762
792
|
};
|
|
763
793
|
var CONTRAST_PAIRS = [
|
|
764
794
|
["background", "foreground"],
|
|
@@ -768,7 +798,9 @@ var CONTRAST_PAIRS = [
|
|
|
768
798
|
["secondary", "secondary-foreground"],
|
|
769
799
|
["muted", "muted-foreground"],
|
|
770
800
|
["accent", "accent-foreground"],
|
|
771
|
-
["destructive", "destructive-foreground"]
|
|
801
|
+
["destructive", "destructive-foreground"],
|
|
802
|
+
["action", "action-foreground"],
|
|
803
|
+
["brand", "brand-foreground"]
|
|
772
804
|
];
|
|
773
805
|
var isAccepted = (t) => ACCEPTED_TOKENS.includes(t);
|
|
774
806
|
function parseThemeFile(text) {
|
|
@@ -900,7 +932,7 @@ async function themeBuild(name, options) {
|
|
|
900
932
|
// package.json
|
|
901
933
|
var package_default = {
|
|
902
934
|
name: "@kinetixui/cli",
|
|
903
|
-
version: "0.
|
|
935
|
+
version: "0.18.0",
|
|
904
936
|
description: "Add KinetixUI components and tokens to your project.",
|
|
905
937
|
type: "module",
|
|
906
938
|
license: "MIT",
|