kigumi 0.17.2 → 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/{-NQIS2T4G.js → -X4IZLQ6Y.js} +151 -28
- package/dist/-X4IZLQ6Y.js.map +1 -0
- package/dist/bin.js +1 -1
- package/dist/{chunk-ZVPQKYTW.js → chunk-5L6FBZCJ.js} +8 -6
- package/dist/{chunk-ZVPQKYTW.js.map → chunk-5L6FBZCJ.js.map} +1 -1
- package/dist/{chunk-P3ML3UJ3.js → chunk-PXVQAK5O.js} +10 -2
- package/dist/chunk-PXVQAK5O.js.map +1 -0
- package/dist/index.js +150 -27
- package/dist/index.js.map +1 -1
- package/dist/{install-63JTQPB3.js → install-MI2SLFG5.js} +3 -3
- package/dist/templates/react/AnimatedImage/AnimatedImage.tsx.hbs +1 -1
- package/dist/templates/react/Animation/Animation.tsx.hbs +1 -1
- package/dist/templates/react/Avatar/Avatar.tsx.hbs +1 -1
- package/dist/templates/react/Badge/Badge.tsx.hbs +1 -1
- package/dist/templates/react/BarChart/BarChart.tsx.hbs +1 -1
- package/dist/templates/react/Breadcrumb/Breadcrumb.tsx.hbs +1 -1
- package/dist/templates/react/BreadcrumbItem/BreadcrumbItem.tsx.hbs +1 -1
- package/dist/templates/react/BubbleChart/BubbleChart.tsx.hbs +1 -1
- package/dist/templates/react/Button/Button.tsx.hbs +1 -1
- package/dist/templates/react/ButtonGroup/ButtonGroup.tsx.hbs +1 -1
- package/dist/templates/react/Callout/Callout.tsx.hbs +1 -1
- package/dist/templates/react/Card/Card.tsx.hbs +1 -1
- package/dist/templates/react/Carousel/Carousel.tsx.hbs +1 -1
- package/dist/templates/react/CarouselItem/CarouselItem.tsx.hbs +1 -1
- package/dist/templates/react/Chart/Chart.tsx.hbs +1 -1
- package/dist/templates/react/Checkbox/Checkbox.tsx.hbs +1 -1
- package/dist/templates/react/ColorPicker/ColorPicker.tsx.hbs +1 -1
- package/dist/templates/react/Combobox/Combobox.tsx.hbs +1 -1
- package/dist/templates/react/Comparison/Comparison.tsx.hbs +1 -1
- package/dist/templates/react/CopyButton/CopyButton.tsx.hbs +1 -1
- package/dist/templates/react/Details/Details.tsx.hbs +1 -1
- package/dist/templates/react/Dialog/Dialog.tsx.hbs +4 -4
- package/dist/templates/react/Divider/Divider.tsx.hbs +1 -1
- package/dist/templates/react/DoughnutChart/DoughnutChart.tsx.hbs +1 -1
- package/dist/templates/react/Drawer/Drawer.tsx.hbs +4 -4
- package/dist/templates/react/Dropdown/Dropdown.tsx.hbs +1 -1
- package/dist/templates/react/DropdownItem/DropdownItem.tsx.hbs +1 -1
- package/dist/templates/react/FileInput/FileInput.tsx.hbs +1 -1
- package/dist/templates/react/FormatBytes/FormatBytes.tsx.hbs +1 -1
- package/dist/templates/react/FormatDate/FormatDate.tsx.hbs +1 -1
- package/dist/templates/react/FormatNumber/FormatNumber.tsx.hbs +1 -1
- package/dist/templates/react/Icon/Icon.tsx.hbs +1 -1
- package/dist/templates/react/Include/Include.tsx.hbs +1 -1
- package/dist/templates/react/Input/Input.jsx.hbs +1 -1
- package/dist/templates/react/Input/Input.tsx.hbs +3 -3
- package/dist/templates/react/IntersectionObserver/IntersectionObserver.tsx.hbs +1 -1
- package/dist/templates/react/LineChart/LineChart.tsx.hbs +1 -1
- package/dist/templates/react/MutationObserver/MutationObserver.tsx.hbs +1 -1
- package/dist/templates/react/NumberInput/NumberInput.tsx.hbs +1 -1
- package/dist/templates/react/Option/Option.tsx.hbs +1 -1
- package/dist/templates/react/Page/Page.tsx.hbs +1 -1
- package/dist/templates/react/PieChart/PieChart.tsx.hbs +1 -1
- package/dist/templates/react/PolarAreaChart/PolarAreaChart.tsx.hbs +1 -1
- package/dist/templates/react/Popover/Popover.tsx.hbs +1 -1
- package/dist/templates/react/Popup/Popup.tsx.hbs +1 -1
- package/dist/templates/react/ProgressBar/ProgressBar.tsx.hbs +1 -1
- package/dist/templates/react/ProgressRing/ProgressRing.tsx.hbs +1 -1
- package/dist/templates/react/QrCode/QrCode.tsx.hbs +1 -1
- package/dist/templates/react/RadarChart/RadarChart.tsx.hbs +1 -1
- package/dist/templates/react/Radio/Radio.tsx.hbs +1 -1
- package/dist/templates/react/RadioGroup/RadioGroup.tsx.hbs +1 -1
- package/dist/templates/react/Rating/Rating.tsx.hbs +1 -1
- package/dist/templates/react/RelativeTime/RelativeTime.tsx.hbs +1 -1
- package/dist/templates/react/ResizeObserver/ResizeObserver.tsx.hbs +1 -1
- package/dist/templates/react/ScatterChart/ScatterChart.tsx.hbs +1 -1
- package/dist/templates/react/Scroller/Scroller.tsx.hbs +1 -1
- package/dist/templates/react/Select/Select.tsx.hbs +1 -1
- package/dist/templates/react/Skeleton/Skeleton.tsx.hbs +1 -1
- package/dist/templates/react/Slider/Slider.tsx.hbs +1 -4
- package/dist/templates/react/Sparkline/Sparkline.tsx.hbs +1 -1
- package/dist/templates/react/Spinner/Spinner.tsx.hbs +1 -1
- package/dist/templates/react/SplitPanel/SplitPanel.tsx.hbs +1 -1
- package/dist/templates/react/Switch/Switch.tsx.hbs +1 -1
- package/dist/templates/react/Tab/Tab.tsx.hbs +1 -1
- package/dist/templates/react/TabGroup/TabGroup.tsx.hbs +1 -1
- package/dist/templates/react/TabPanel/TabPanel.tsx.hbs +1 -1
- package/dist/templates/react/Tag/Tag.tsx.hbs +1 -1
- package/dist/templates/react/Textarea/Textarea.tsx.hbs +1 -1
- package/dist/templates/react/Toast/Toast.tsx.hbs +2 -2
- package/dist/templates/react/ToastItem/ToastItem.tsx.hbs +2 -2
- package/dist/templates/react/Tooltip/Tooltip.tsx.hbs +1 -1
- package/dist/templates/react/Tree/Tree.tsx.hbs +1 -1
- package/dist/templates/react/TreeItem/TreeItem.tsx.hbs +1 -1
- package/dist/templates/react/ZoomableFrame/ZoomableFrame.tsx.hbs +1 -1
- package/dist/templates/vue/Input/Input.js.vue.hbs +1 -1
- package/dist/templates/vue/Input/Input.vue.hbs +1 -1
- package/dist/templates/vue/Slider/Slider.js.vue.hbs +0 -1
- package/dist/templates/vue/Slider/Slider.vue.hbs +0 -1
- package/dist/{tier-ONXR7NS2.js → tier-B72FSQRO.js} +2 -2
- package/package.json +2 -2
- package/templates/react/AnimatedImage/AnimatedImage.tsx.hbs +1 -1
- package/templates/react/Animation/Animation.tsx.hbs +1 -1
- package/templates/react/Avatar/Avatar.tsx.hbs +1 -1
- package/templates/react/Badge/Badge.tsx.hbs +1 -1
- package/templates/react/BarChart/BarChart.tsx.hbs +1 -1
- package/templates/react/Breadcrumb/Breadcrumb.tsx.hbs +1 -1
- package/templates/react/BreadcrumbItem/BreadcrumbItem.tsx.hbs +1 -1
- package/templates/react/BubbleChart/BubbleChart.tsx.hbs +1 -1
- package/templates/react/Button/Button.tsx.hbs +1 -1
- package/templates/react/ButtonGroup/ButtonGroup.tsx.hbs +1 -1
- package/templates/react/Callout/Callout.tsx.hbs +1 -1
- package/templates/react/Card/Card.tsx.hbs +1 -1
- package/templates/react/Carousel/Carousel.tsx.hbs +1 -1
- package/templates/react/CarouselItem/CarouselItem.tsx.hbs +1 -1
- package/templates/react/Chart/Chart.tsx.hbs +1 -1
- package/templates/react/Checkbox/Checkbox.tsx.hbs +1 -1
- package/templates/react/ColorPicker/ColorPicker.tsx.hbs +1 -1
- package/templates/react/Combobox/Combobox.tsx.hbs +1 -1
- package/templates/react/Comparison/Comparison.tsx.hbs +1 -1
- package/templates/react/CopyButton/CopyButton.tsx.hbs +1 -1
- package/templates/react/Details/Details.tsx.hbs +1 -1
- package/templates/react/Dialog/Dialog.tsx.hbs +4 -4
- package/templates/react/Divider/Divider.tsx.hbs +1 -1
- package/templates/react/DoughnutChart/DoughnutChart.tsx.hbs +1 -1
- package/templates/react/Drawer/Drawer.tsx.hbs +4 -4
- package/templates/react/Dropdown/Dropdown.tsx.hbs +1 -1
- package/templates/react/DropdownItem/DropdownItem.tsx.hbs +1 -1
- package/templates/react/FileInput/FileInput.tsx.hbs +1 -1
- package/templates/react/FormatBytes/FormatBytes.tsx.hbs +1 -1
- package/templates/react/FormatDate/FormatDate.tsx.hbs +1 -1
- package/templates/react/FormatNumber/FormatNumber.tsx.hbs +1 -1
- package/templates/react/Icon/Icon.tsx.hbs +1 -1
- package/templates/react/Include/Include.tsx.hbs +1 -1
- package/templates/react/Input/Input.jsx.hbs +1 -1
- package/templates/react/Input/Input.tsx.hbs +3 -3
- package/templates/react/IntersectionObserver/IntersectionObserver.tsx.hbs +1 -1
- package/templates/react/LineChart/LineChart.tsx.hbs +1 -1
- package/templates/react/MutationObserver/MutationObserver.tsx.hbs +1 -1
- package/templates/react/NumberInput/NumberInput.tsx.hbs +1 -1
- package/templates/react/Option/Option.tsx.hbs +1 -1
- package/templates/react/Page/Page.tsx.hbs +1 -1
- package/templates/react/PieChart/PieChart.tsx.hbs +1 -1
- package/templates/react/PolarAreaChart/PolarAreaChart.tsx.hbs +1 -1
- package/templates/react/Popover/Popover.tsx.hbs +1 -1
- package/templates/react/Popup/Popup.tsx.hbs +1 -1
- package/templates/react/ProgressBar/ProgressBar.tsx.hbs +1 -1
- package/templates/react/ProgressRing/ProgressRing.tsx.hbs +1 -1
- package/templates/react/QrCode/QrCode.tsx.hbs +1 -1
- package/templates/react/RadarChart/RadarChart.tsx.hbs +1 -1
- package/templates/react/Radio/Radio.tsx.hbs +1 -1
- package/templates/react/RadioGroup/RadioGroup.tsx.hbs +1 -1
- package/templates/react/Rating/Rating.tsx.hbs +1 -1
- package/templates/react/RelativeTime/RelativeTime.tsx.hbs +1 -1
- package/templates/react/ResizeObserver/ResizeObserver.tsx.hbs +1 -1
- package/templates/react/ScatterChart/ScatterChart.tsx.hbs +1 -1
- package/templates/react/Scroller/Scroller.tsx.hbs +1 -1
- package/templates/react/Select/Select.tsx.hbs +1 -1
- package/templates/react/Skeleton/Skeleton.tsx.hbs +1 -1
- package/templates/react/Slider/Slider.tsx.hbs +1 -4
- package/templates/react/Sparkline/Sparkline.tsx.hbs +1 -1
- package/templates/react/Spinner/Spinner.tsx.hbs +1 -1
- package/templates/react/SplitPanel/SplitPanel.tsx.hbs +1 -1
- package/templates/react/Switch/Switch.tsx.hbs +1 -1
- package/templates/react/Tab/Tab.tsx.hbs +1 -1
- package/templates/react/TabGroup/TabGroup.tsx.hbs +1 -1
- package/templates/react/TabPanel/TabPanel.tsx.hbs +1 -1
- package/templates/react/Tag/Tag.tsx.hbs +1 -1
- package/templates/react/Textarea/Textarea.tsx.hbs +1 -1
- package/templates/react/Toast/Toast.tsx.hbs +2 -2
- package/templates/react/ToastItem/ToastItem.tsx.hbs +2 -2
- package/templates/react/Tooltip/Tooltip.tsx.hbs +1 -1
- package/templates/react/Tree/Tree.tsx.hbs +1 -1
- package/templates/react/TreeItem/TreeItem.tsx.hbs +1 -1
- package/templates/react/ZoomableFrame/ZoomableFrame.tsx.hbs +1 -1
- package/templates/vue/Input/Input.js.vue.hbs +1 -1
- package/templates/vue/Input/Input.vue.hbs +1 -1
- package/templates/vue/Slider/Slider.js.vue.hbs +0 -1
- package/templates/vue/Slider/Slider.vue.hbs +0 -1
- package/dist/-NQIS2T4G.js.map +0 -1
- package/dist/chunk-P3ML3UJ3.js.map +0 -1
- /package/dist/{install-63JTQPB3.js.map → install-MI2SLFG5.js.map} +0 -0
- /package/dist/{tier-ONXR7NS2.js.map → tier-B72FSQRO.js.map} +0 -0
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
saveConfig,
|
|
36
36
|
tierSchema,
|
|
37
37
|
validateRegistryDependencies
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-5L6FBZCJ.js";
|
|
39
39
|
import {
|
|
40
40
|
CLI_VERSION,
|
|
41
41
|
CONFIG_FILE_NAME,
|
|
@@ -45,13 +45,18 @@ import {
|
|
|
45
45
|
ENV_TOKEN_REGEX,
|
|
46
46
|
FREE_PACKAGE_REGEX,
|
|
47
47
|
GITHUB_ISSUES_URL,
|
|
48
|
+
GITHUB_REPO_URL,
|
|
48
49
|
KIGUMI_CACHE_DIR,
|
|
49
50
|
MIN_TOKEN_LENGTH,
|
|
50
51
|
NPM_PRO_REGISTRY,
|
|
51
52
|
NPM_PUBLIC_REGISTRY,
|
|
53
|
+
NPM_REGISTRY_URL,
|
|
52
54
|
PRO_PACKAGE_REGEX,
|
|
53
55
|
REGISTRY_CACHE_TTL_MS,
|
|
54
56
|
REGISTRY_FILE_NAME,
|
|
57
|
+
UPDATE_CHECK_CACHE_FILE,
|
|
58
|
+
UPDATE_CHECK_CACHE_TTL_MS,
|
|
59
|
+
UPDATE_CHECK_TIMEOUT_MS,
|
|
55
60
|
WEB_AWESOME_FREE_PACKAGE,
|
|
56
61
|
WEB_AWESOME_PRO_PACKAGE,
|
|
57
62
|
WEB_AWESOME_SCOPE,
|
|
@@ -61,14 +66,116 @@ import {
|
|
|
61
66
|
detectTierSync,
|
|
62
67
|
getTokenSourceSync,
|
|
63
68
|
getWebAwesomePackage
|
|
64
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-PXVQAK5O.js";
|
|
65
70
|
|
|
66
71
|
// src/index.ts
|
|
67
72
|
import { Command as Command5 } from "commander";
|
|
68
73
|
import pc18 from "picocolors";
|
|
69
|
-
import { readFileSync } from "fs";
|
|
74
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
70
75
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
71
|
-
import { dirname, join } from "path";
|
|
76
|
+
import { dirname, join as join2 } from "path";
|
|
77
|
+
|
|
78
|
+
// src/utils/update-check.ts
|
|
79
|
+
import { readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
80
|
+
import { join } from "path";
|
|
81
|
+
import { homedir } from "os";
|
|
82
|
+
function compareSemver(a, b) {
|
|
83
|
+
const partsA = a.split(".").map(Number);
|
|
84
|
+
const partsB = b.split(".").map(Number);
|
|
85
|
+
for (let i = 0; i < 3; i++) {
|
|
86
|
+
const diff = (partsA[i] || 0) - (partsB[i] || 0);
|
|
87
|
+
if (diff !== 0) return diff;
|
|
88
|
+
}
|
|
89
|
+
return 0;
|
|
90
|
+
}
|
|
91
|
+
function getCachePath() {
|
|
92
|
+
return join(homedir(), KIGUMI_CACHE_DIR, UPDATE_CHECK_CACHE_FILE);
|
|
93
|
+
}
|
|
94
|
+
function readCache() {
|
|
95
|
+
try {
|
|
96
|
+
const raw = readFileSync(getCachePath(), "utf-8");
|
|
97
|
+
const data = JSON.parse(raw);
|
|
98
|
+
if (data.latestVersion && typeof data.checkedAt === "number") {
|
|
99
|
+
return data;
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
} catch {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function writeCache(entry) {
|
|
107
|
+
try {
|
|
108
|
+
const cachePath = getCachePath();
|
|
109
|
+
const cacheDir = join(homedir(), KIGUMI_CACHE_DIR);
|
|
110
|
+
mkdirSync(cacheDir, { recursive: true });
|
|
111
|
+
writeFileSync(cachePath, JSON.stringify(entry));
|
|
112
|
+
} catch {
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function shouldSkip() {
|
|
116
|
+
if (process.env.CI) return true;
|
|
117
|
+
if (process.env.NO_UPDATE_CHECK) return true;
|
|
118
|
+
if (!process.stdout.isTTY) return true;
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
async function checkForUpdate() {
|
|
122
|
+
if (shouldSkip()) return null;
|
|
123
|
+
try {
|
|
124
|
+
const cached = readCache();
|
|
125
|
+
if (cached && Date.now() - cached.checkedAt < UPDATE_CHECK_CACHE_TTL_MS) {
|
|
126
|
+
if (compareSemver(cached.latestVersion, CLI_VERSION) > 0) {
|
|
127
|
+
return {
|
|
128
|
+
latestVersion: cached.latestVersion,
|
|
129
|
+
currentVersion: CLI_VERSION
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
const controller = new AbortController();
|
|
135
|
+
const timeout = setTimeout(
|
|
136
|
+
() => controller.abort(),
|
|
137
|
+
UPDATE_CHECK_TIMEOUT_MS
|
|
138
|
+
);
|
|
139
|
+
const response = await fetch(NPM_REGISTRY_URL, {
|
|
140
|
+
signal: controller.signal,
|
|
141
|
+
headers: { Accept: "application/json" }
|
|
142
|
+
});
|
|
143
|
+
clearTimeout(timeout);
|
|
144
|
+
if (!response.ok) return null;
|
|
145
|
+
const data = await response.json();
|
|
146
|
+
const latestVersion = data.version;
|
|
147
|
+
if (!latestVersion || typeof latestVersion !== "string") return null;
|
|
148
|
+
writeCache({ latestVersion, checkedAt: Date.now() });
|
|
149
|
+
if (compareSemver(latestVersion, CLI_VERSION) > 0) {
|
|
150
|
+
return { latestVersion, currentVersion: CLI_VERSION };
|
|
151
|
+
}
|
|
152
|
+
return null;
|
|
153
|
+
} catch {
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function formatUpdateNotification(result) {
|
|
158
|
+
const { currentVersion, latestVersion } = result;
|
|
159
|
+
const releaseUrl = `${GITHUB_REPO_URL}/releases`;
|
|
160
|
+
const lines = [
|
|
161
|
+
"",
|
|
162
|
+
` Update available: ${currentVersion} \u2192 ${latestVersion}`,
|
|
163
|
+
"",
|
|
164
|
+
" Run: npx kigumi@latest",
|
|
165
|
+
` Changelog: ${releaseUrl}`,
|
|
166
|
+
"",
|
|
167
|
+
" Then run: npx kigumi upgrade",
|
|
168
|
+
" to update your project config",
|
|
169
|
+
""
|
|
170
|
+
];
|
|
171
|
+
const maxLen = Math.max(...lines.map((l) => l.length));
|
|
172
|
+
const top = "\u256D" + "\u2500".repeat(maxLen + 1) + "\u256E";
|
|
173
|
+
const bottom = "\u2570" + "\u2500".repeat(maxLen + 1) + "\u256F";
|
|
174
|
+
const padded = lines.map(
|
|
175
|
+
(l) => "\u2502" + l + " ".repeat(maxLen - l.length) + " \u2502"
|
|
176
|
+
);
|
|
177
|
+
return [top, ...padded, bottom].join("\n");
|
|
178
|
+
}
|
|
72
179
|
|
|
73
180
|
// src/commands/init/index.ts
|
|
74
181
|
import * as p3 from "@clack/prompts";
|
|
@@ -190,7 +297,7 @@ async function handleExistingConfig(cwd, output, force = false) {
|
|
|
190
297
|
output.warning("Configuration file exists but could not be loaded");
|
|
191
298
|
return null;
|
|
192
299
|
}
|
|
193
|
-
const { detectTier: detectTier2 } = await import("./tier-
|
|
300
|
+
const { detectTier: detectTier2 } = await import("./tier-B72FSQRO.js");
|
|
194
301
|
const tier = await detectTier2(cwd);
|
|
195
302
|
output.note(
|
|
196
303
|
"Current Configuration",
|
|
@@ -1831,9 +1938,9 @@ var LOCAL_REGISTRY = {
|
|
|
1831
1938
|
},
|
|
1832
1939
|
{
|
|
1833
1940
|
name: "autocorrect",
|
|
1834
|
-
type: "
|
|
1835
|
-
|
|
1836
|
-
description: "
|
|
1941
|
+
type: "boolean",
|
|
1942
|
+
default: "false",
|
|
1943
|
+
description: "Enable autocorrect",
|
|
1837
1944
|
required: false
|
|
1838
1945
|
},
|
|
1839
1946
|
{
|
|
@@ -4231,12 +4338,6 @@ var LOCAL_REGISTRY = {
|
|
|
4231
4338
|
default: "false",
|
|
4232
4339
|
description: "Makes the slider readonly"
|
|
4233
4340
|
},
|
|
4234
|
-
{
|
|
4235
|
-
name: "required",
|
|
4236
|
-
type: "boolean",
|
|
4237
|
-
default: "false",
|
|
4238
|
-
description: "Makes the slider required"
|
|
4239
|
-
},
|
|
4240
4341
|
{
|
|
4241
4342
|
name: "range",
|
|
4242
4343
|
type: "boolean",
|
|
@@ -6170,7 +6271,7 @@ function getTestExtension(framework, typescript) {
|
|
|
6170
6271
|
return typescript ? "test.tsx" : "test.jsx";
|
|
6171
6272
|
}
|
|
6172
6273
|
async function generateComponent(component, config, typescript = true, cwd = process.cwd()) {
|
|
6173
|
-
const { detectTierSync: detectTierSync2, getWebAwesomePackage: getWebAwesomePackage2 } = await import("./tier-
|
|
6274
|
+
const { detectTierSync: detectTierSync2, getWebAwesomePackage: getWebAwesomePackage2 } = await import("./tier-B72FSQRO.js");
|
|
6174
6275
|
const tier = detectTierSync2(cwd);
|
|
6175
6276
|
const packageName = getWebAwesomePackage2(tier);
|
|
6176
6277
|
const importPath = component.importPath.replace(
|
|
@@ -6215,7 +6316,7 @@ async function updateTypeDeclarations(component, config, cwd) {
|
|
|
6215
6316
|
const typesDir = path6.join(cwd, "src", "types");
|
|
6216
6317
|
const typesFile = path6.join(typesDir, "web-awesome.d.ts");
|
|
6217
6318
|
await fs6.ensureDir(typesDir);
|
|
6218
|
-
let content
|
|
6319
|
+
let content;
|
|
6219
6320
|
if (await fs6.pathExists(typesFile)) {
|
|
6220
6321
|
content = await fs6.readFile(typesFile, "utf-8");
|
|
6221
6322
|
} else {
|
|
@@ -6566,7 +6667,7 @@ var ComponentInstaller = class {
|
|
|
6566
6667
|
* @internal
|
|
6567
6668
|
*/
|
|
6568
6669
|
async updateKigumiImports(component) {
|
|
6569
|
-
const { detectTier: detectTier2, getWebAwesomePackage: getWebAwesomePackage2 } = await import("./tier-
|
|
6670
|
+
const { detectTier: detectTier2, getWebAwesomePackage: getWebAwesomePackage2 } = await import("./tier-B72FSQRO.js");
|
|
6570
6671
|
const tier = await detectTier2(this.cwd);
|
|
6571
6672
|
const packageName = getWebAwesomePackage2(tier);
|
|
6572
6673
|
const kigumiPath = path9.join(
|
|
@@ -7024,7 +7125,7 @@ async function addFromRemoteRegistry(components, options, config, cwd, output) {
|
|
|
7024
7125
|
printSummary(results, config, output, registry.name);
|
|
7025
7126
|
}
|
|
7026
7127
|
async function addFromBuiltinRegistry(components, options, config, cwd, output) {
|
|
7027
|
-
const { detectTier: detectTier2 } = await import("./tier-
|
|
7128
|
+
const { detectTier: detectTier2 } = await import("./tier-B72FSQRO.js");
|
|
7028
7129
|
const tier = await detectTier2(cwd);
|
|
7029
7130
|
const componentsToAdd = await selectComponents(
|
|
7030
7131
|
components,
|
|
@@ -7369,7 +7470,7 @@ async function themeAction(themeName) {
|
|
|
7369
7470
|
if (!config) {
|
|
7370
7471
|
throw new Error("Configuration not loaded despite passing checks");
|
|
7371
7472
|
}
|
|
7372
|
-
const { detectTier: detectTier2 } = await import("./tier-
|
|
7473
|
+
const { detectTier: detectTier2 } = await import("./tier-B72FSQRO.js");
|
|
7373
7474
|
const tier = await detectTier2(cwd);
|
|
7374
7475
|
const availableThemes = getAvailableThemes2(tier).filter(
|
|
7375
7476
|
(t) => t !== "custom"
|
|
@@ -7407,7 +7508,7 @@ var themeCommand = new Command("theme").description(
|
|
|
7407
7508
|
);
|
|
7408
7509
|
themeCommand.command("set", { isDefault: true }).description("Set a built-in theme").argument("[name]", "Theme name (omit to see options)").action(themeAction);
|
|
7409
7510
|
themeCommand.command("install").description("Install a theme from a community registry").argument("<name>", "Theme name in the registry").requiredOption("--from <source>", "Registry URL or connected name").action(async (name, options) => {
|
|
7410
|
-
const { themeInstallAction } = await import("./install-
|
|
7511
|
+
const { themeInstallAction } = await import("./install-MI2SLFG5.js");
|
|
7411
7512
|
await themeInstallAction(name, options);
|
|
7412
7513
|
});
|
|
7413
7514
|
|
|
@@ -7497,7 +7598,7 @@ async function paletteAction(paletteName) {
|
|
|
7497
7598
|
if (!config) {
|
|
7498
7599
|
throw new Error("Configuration not loaded despite passing checks");
|
|
7499
7600
|
}
|
|
7500
|
-
const { detectTier: detectTier2 } = await import("./tier-
|
|
7601
|
+
const { detectTier: detectTier2 } = await import("./tier-B72FSQRO.js");
|
|
7501
7602
|
const tier = await detectTier2(cwd);
|
|
7502
7603
|
const availablePalettes = getAvailablePalettes2(tier).filter(
|
|
7503
7604
|
(pal) => pal !== "custom"
|
|
@@ -8474,7 +8575,7 @@ import * as p13 from "@clack/prompts";
|
|
|
8474
8575
|
import pc15 from "picocolors";
|
|
8475
8576
|
|
|
8476
8577
|
// src/utils/version-map.ts
|
|
8477
|
-
function
|
|
8578
|
+
function compareSemver2(a, b) {
|
|
8478
8579
|
const partsA = a.split(".").map(Number);
|
|
8479
8580
|
const partsB = b.split(".").map(Number);
|
|
8480
8581
|
for (let i = 0; i < 3; i++) {
|
|
@@ -8484,6 +8585,23 @@ function compareSemver(a, b) {
|
|
|
8484
8585
|
return 0;
|
|
8485
8586
|
}
|
|
8486
8587
|
var VERSION_MAP = [
|
|
8588
|
+
{
|
|
8589
|
+
kigumiVersion: "0.18.0",
|
|
8590
|
+
webAwesomeVersion: "^3.4.0",
|
|
8591
|
+
releasedAt: "2026-03-25",
|
|
8592
|
+
breakingChanges: [
|
|
8593
|
+
{
|
|
8594
|
+
description: "Slider: `required` prop removed (WA 3.4.0 dropped the attribute)",
|
|
8595
|
+
affectedComponents: ["slider"],
|
|
8596
|
+
migrationGuide: "Remove the `required` prop from Slider components. Use custom validation if needed."
|
|
8597
|
+
},
|
|
8598
|
+
{
|
|
8599
|
+
description: "Input: `autocorrect` prop type changed from string union to boolean",
|
|
8600
|
+
affectedComponents: ["input"],
|
|
8601
|
+
migrationGuide: 'Change autocorrect="off" to autocorrect={false} and autocorrect="on" to autocorrect={true}.'
|
|
8602
|
+
}
|
|
8603
|
+
]
|
|
8604
|
+
},
|
|
8487
8605
|
{
|
|
8488
8606
|
kigumiVersion: "0.12.0",
|
|
8489
8607
|
webAwesomeVersion: "^3.3.1",
|
|
@@ -8521,7 +8639,7 @@ function getVersionEntry(version) {
|
|
|
8521
8639
|
function getBreakingChangesBetween(fromVersion, toVersion) {
|
|
8522
8640
|
const changes = [];
|
|
8523
8641
|
for (const entry of VERSION_MAP) {
|
|
8524
|
-
if (
|
|
8642
|
+
if (compareSemver2(entry.kigumiVersion, fromVersion) > 0 && compareSemver2(entry.kigumiVersion, toVersion) <= 0) {
|
|
8525
8643
|
changes.push(...entry.breakingChanges);
|
|
8526
8644
|
}
|
|
8527
8645
|
}
|
|
@@ -8529,7 +8647,7 @@ function getBreakingChangesBetween(fromVersion, toVersion) {
|
|
|
8529
8647
|
}
|
|
8530
8648
|
function getVersionsBetween(fromVersion, toVersion) {
|
|
8531
8649
|
return VERSION_MAP.filter(
|
|
8532
|
-
(entry) =>
|
|
8650
|
+
(entry) => compareSemver2(entry.kigumiVersion, fromVersion) > 0 && compareSemver2(entry.kigumiVersion, toVersion) <= 0
|
|
8533
8651
|
);
|
|
8534
8652
|
}
|
|
8535
8653
|
|
|
@@ -9122,21 +9240,26 @@ function formatFileStatus(result) {
|
|
|
9122
9240
|
// src/index.ts
|
|
9123
9241
|
var __filename2 = fileURLToPath2(import.meta.url);
|
|
9124
9242
|
var __dirname2 = dirname(__filename2);
|
|
9125
|
-
var packageJsonPath =
|
|
9126
|
-
var packageJson = JSON.parse(
|
|
9243
|
+
var packageJsonPath = join2(__dirname2, "..", "package.json");
|
|
9244
|
+
var packageJson = JSON.parse(readFileSync2(packageJsonPath, "utf-8"));
|
|
9127
9245
|
var program = new Command5();
|
|
9246
|
+
var updateCheckPromise = checkForUpdate();
|
|
9128
9247
|
program.name("kigumi").description("CLI tool to add Web Awesome components to your project").version(packageJson.version).option("--verbose", "Show debug output").hook("preAction", (thisCommand) => {
|
|
9129
9248
|
const opts = thisCommand.optsWithGlobals();
|
|
9130
9249
|
if (opts.verbose) {
|
|
9131
9250
|
process.env.DEBUG = "1";
|
|
9132
9251
|
}
|
|
9133
9252
|
thisCommand.__startTime = performance.now();
|
|
9134
|
-
}).hook("postAction", (thisCommand) => {
|
|
9253
|
+
}).hook("postAction", async (thisCommand) => {
|
|
9135
9254
|
const start = thisCommand.__startTime;
|
|
9136
9255
|
if (start && process.env.DEBUG) {
|
|
9137
9256
|
const elapsed = ((performance.now() - start) / 1e3).toFixed(1);
|
|
9138
9257
|
console.error(pc18.dim(`Done in ${elapsed}s`));
|
|
9139
9258
|
}
|
|
9259
|
+
const updateResult = await updateCheckPromise;
|
|
9260
|
+
if (updateResult) {
|
|
9261
|
+
console.error(pc18.yellow(formatUpdateNotification(updateResult)));
|
|
9262
|
+
}
|
|
9140
9263
|
});
|
|
9141
9264
|
program.command("init").description("Initialize kigumi in your project").option("--framework <framework>", "Framework (react, vue)").option("--typescript", "Use TypeScript").option("--no-typescript", "Use JavaScript").option("--theme <theme>", "Theme name").option("--palette <palette>", "Color palette").option("--brand <color>", "Brand color").option("--token <token>", "Pro tier authentication token").option("--components-dir <dir>", "Components directory").option("--utils-dir <dir>", "Utils directory").option("--styles-dir <dir>", "Styles directory (for theme.css)").option("-y, --yes", "Skip all prompts (non-interactive mode)").option("--no-install", "Skip dependency installation").action(initCommand);
|
|
9142
9265
|
program.command("add").description("Add a component to your project").argument("[components...]", "Components to add").option("--all", "Add all available components").option("--overwrite", "Overwrite existing components").option("--from <source>", "Registry URL or connected registry name").option("--no-types", "Skip TypeScript type definitions").option("-y, --yes", "Skip all prompts (non-interactive mode)").action(addCommand);
|
|
@@ -9170,4 +9293,4 @@ process.on("unhandledRejection", (reason) => {
|
|
|
9170
9293
|
process.exit(1);
|
|
9171
9294
|
});
|
|
9172
9295
|
program.parse();
|
|
9173
|
-
//# sourceMappingURL=-
|
|
9296
|
+
//# sourceMappingURL=-X4IZLQ6Y.js.map
|