skeleton 4.0.0-next.27 → 4.0.0-next.29
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 +175 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { readFile, writeFile } from "node:fs/promises";
|
|
|
17
17
|
import { dirname, extname, join } from "node:path";
|
|
18
18
|
import { glob } from "tinyglobby";
|
|
19
19
|
import { readFile as readFile$1, writeFile as writeFile$1 } from "fs/promises";
|
|
20
|
+
import { extname as extname$1 } from "path";
|
|
20
21
|
import { Argument, Command, Option } from "commander";
|
|
21
22
|
import { fileURLToPath } from "node:url";
|
|
22
23
|
import { bgBlueBright, bgGreenBright, black, dim, red } from "colorette";
|
|
@@ -240,7 +241,7 @@ function transformClasses(code) {
|
|
|
240
241
|
|
|
241
242
|
//#endregion
|
|
242
243
|
//#region src/commands/migrate/migrations/skeleton-3/transformers/transform-stylesheet.ts
|
|
243
|
-
function
|
|
244
|
+
function transformStylesheet$1(code) {
|
|
244
245
|
const parsed = parse(code);
|
|
245
246
|
parsed.walkAtRules("apply", (atRule$1) => {
|
|
246
247
|
atRule$1.params = transformClasses(atRule$1.params).code;
|
|
@@ -258,7 +259,7 @@ function getTailwindImport(root) {
|
|
|
258
259
|
return tailwindImport;
|
|
259
260
|
}
|
|
260
261
|
function transformAppCss(code, theme) {
|
|
261
|
-
code =
|
|
262
|
+
code = transformStylesheet$1(code).code;
|
|
262
263
|
const root = parse(code);
|
|
263
264
|
const nodes = [];
|
|
264
265
|
nodes.push(atRule({
|
|
@@ -783,7 +784,7 @@ const EXPORT_MAPPINGS = {
|
|
|
783
784
|
|
|
784
785
|
//#endregion
|
|
785
786
|
//#region src/commands/migrate/migrations/skeleton-3/transformers/transform-module.ts
|
|
786
|
-
function transformModule(code) {
|
|
787
|
+
function transformModule$1(code) {
|
|
787
788
|
const file = parseSourceFile(code);
|
|
788
789
|
const skeletonImports = [];
|
|
789
790
|
file.forEachDescendant((node) => {
|
|
@@ -868,7 +869,13 @@ function transformPackageJson$1(code, skeletonVersion, skeletonSvelteVersion) {
|
|
|
868
869
|
}
|
|
869
870
|
|
|
870
871
|
//#endregion
|
|
871
|
-
//#region src/
|
|
872
|
+
//#region src/utility/svelte/has-range.ts
|
|
873
|
+
function hasRange(node) {
|
|
874
|
+
return "start" in node && "end" in node && typeof node.start === "number" && typeof node.end === "number";
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
//#endregion
|
|
878
|
+
//#region src/utility/svelte/rename-component.ts
|
|
872
879
|
function renameComponent(s, node, name) {
|
|
873
880
|
const adjustedStart = node.start + 1;
|
|
874
881
|
s.update(adjustedStart, adjustedStart + node.name.length, name);
|
|
@@ -876,22 +883,22 @@ function renameComponent(s, node, name) {
|
|
|
876
883
|
if (indexOfNonSelfClosingTag === -1 || node.start + indexOfNonSelfClosingTag > node.end) return;
|
|
877
884
|
s.update(node.start + indexOfNonSelfClosingTag + 2, node.start + indexOfNonSelfClosingTag + 2 + node.name.length, name);
|
|
878
885
|
}
|
|
879
|
-
|
|
886
|
+
|
|
887
|
+
//#endregion
|
|
888
|
+
//#region src/commands/migrate/migrations/skeleton-3/transformers/transform-svelte.ts
|
|
889
|
+
function transformScript$1(s, script) {
|
|
880
890
|
if (!script || !("start" in script.content && typeof script.content.start === "number" && "end" in script.content && typeof script.content.end === "number")) return { meta: { skeletonImports: [] } };
|
|
881
891
|
const content = s.original.slice(script.content.start, script.content.end);
|
|
882
|
-
const transformed = transformModule(content);
|
|
892
|
+
const transformed = transformModule$1(content);
|
|
883
893
|
s.overwrite(script.content.start, script.content.end, transformed.code);
|
|
884
894
|
return { meta: transformed.meta };
|
|
885
895
|
}
|
|
886
|
-
function transformCss(s, css) {
|
|
896
|
+
function transformCss$1(s, css) {
|
|
887
897
|
if (!css) return;
|
|
888
|
-
const transformed =
|
|
898
|
+
const transformed = transformStylesheet$1(s.original.slice(css.content.start, css.content.end));
|
|
889
899
|
s.overwrite(css.content.start, css.content.end, transformed.code);
|
|
890
900
|
}
|
|
891
|
-
function
|
|
892
|
-
return "start" in node && "end" in node && typeof node.start === "number" && typeof node.end === "number";
|
|
893
|
-
}
|
|
894
|
-
function transformFragment(s, fragment, skeletonImports) {
|
|
901
|
+
function transformFragment$1(s, fragment, skeletonImports) {
|
|
895
902
|
walk(fragment, {}, {
|
|
896
903
|
Literal(node, ctx) {
|
|
897
904
|
const parent = ctx.path.at(-1);
|
|
@@ -919,12 +926,12 @@ function transformFragment(s, fragment, skeletonImports) {
|
|
|
919
926
|
});
|
|
920
927
|
return { code: s.toString() };
|
|
921
928
|
}
|
|
922
|
-
function transformSvelte(code) {
|
|
929
|
+
function transformSvelte$1(code) {
|
|
923
930
|
const s = new MagicString(code);
|
|
924
931
|
const root = parse$2(code, { modern: true });
|
|
925
|
-
const skeletonImports = [...transformScript(s, root.module).meta.skeletonImports, ...transformScript(s, root.instance).meta.skeletonImports];
|
|
926
|
-
transformFragment(s, root.fragment, skeletonImports);
|
|
927
|
-
transformCss(s, root.css);
|
|
932
|
+
const skeletonImports = [...transformScript$1(s, root.module).meta.skeletonImports, ...transformScript$1(s, root.instance).meta.skeletonImports];
|
|
933
|
+
transformFragment$1(s, root.fragment, skeletonImports);
|
|
934
|
+
transformCss$1(s, root.css);
|
|
928
935
|
return { code: s.toString() };
|
|
929
936
|
}
|
|
930
937
|
|
|
@@ -980,7 +987,7 @@ async function skeleton_3_default(options) {
|
|
|
980
987
|
const packageSpinner = spinner();
|
|
981
988
|
packageSpinner.start(`Migrating ${packageJson.name}...`);
|
|
982
989
|
try {
|
|
983
|
-
const packageJsonCode = await readFile(packageJson.paths.at(0), "
|
|
990
|
+
const packageJsonCode = await readFile(packageJson.paths.at(0), "utf-8");
|
|
984
991
|
const skeletonVersion = await getLatestVersion("@skeletonlabs/skeleton", { version: ">=3.0.0-0 <4.0.0" });
|
|
985
992
|
const skeletonSvelteVersion = await getLatestVersion("@skeletonlabs/skeleton-svelte", { version: ">=1.0.0-0 <2.0.0" });
|
|
986
993
|
const transformedPackageJson = transformPackageJson$1(packageJsonCode, skeletonVersion, skeletonSvelteVersion);
|
|
@@ -997,7 +1004,7 @@ async function skeleton_3_default(options) {
|
|
|
997
1004
|
const appHtmlSpinner = spinner();
|
|
998
1005
|
appHtmlSpinner.start(`Migrating ${appHtml.name}...`);
|
|
999
1006
|
try {
|
|
1000
|
-
const appHtmlCode = await readFile(appHtml.paths.at(0), "
|
|
1007
|
+
const appHtmlCode = await readFile(appHtml.paths.at(0), "utf-8");
|
|
1001
1008
|
const transformedAppHtml = transformAppHtml(appHtmlCode);
|
|
1002
1009
|
if (transformedAppHtml.meta.theme && Object.hasOwn(THEME_MAPPINGS, transformedAppHtml.meta.theme.value)) theme = THEME_MAPPINGS[transformedAppHtml.meta.theme.value];
|
|
1003
1010
|
else if (transformedAppHtml.meta.theme) theme = transformedAppHtml.meta.theme;
|
|
@@ -1014,7 +1021,7 @@ async function skeleton_3_default(options) {
|
|
|
1014
1021
|
const appCssSpinner = spinner();
|
|
1015
1022
|
appCssSpinner.start(`Migrating ${appCss.name}...`);
|
|
1016
1023
|
try {
|
|
1017
|
-
const appCssCode = await readFile(appCss.paths.at(0), "
|
|
1024
|
+
const appCssCode = await readFile(appCss.paths.at(0), "utf-8");
|
|
1018
1025
|
const transformedAppCss = transformAppCss(appCssCode, theme ?? FALLBACK_THEME);
|
|
1019
1026
|
migrations.push({
|
|
1020
1027
|
path: appCss.paths.at(0),
|
|
@@ -1036,10 +1043,10 @@ async function skeleton_3_default(options) {
|
|
|
1036
1043
|
sourceFilesSpinner.message(`Migrating ${sourceFile}...`);
|
|
1037
1044
|
const extension = extname(sourceFile);
|
|
1038
1045
|
try {
|
|
1039
|
-
const code = await readFile(sourceFile, "
|
|
1046
|
+
const code = await readFile(sourceFile, "utf-8");
|
|
1040
1047
|
switch (extension) {
|
|
1041
1048
|
case ".svelte": {
|
|
1042
|
-
const transformedSvelte = transformSvelte(code);
|
|
1049
|
+
const transformedSvelte = transformSvelte$1(code);
|
|
1043
1050
|
migrations.push({
|
|
1044
1051
|
path: sourceFile,
|
|
1045
1052
|
content: transformedSvelte.code
|
|
@@ -1050,7 +1057,7 @@ async function skeleton_3_default(options) {
|
|
|
1050
1057
|
case ".mjs":
|
|
1051
1058
|
case ".ts":
|
|
1052
1059
|
case ".mts": {
|
|
1053
|
-
const transformedModule = transformModule(code);
|
|
1060
|
+
const transformedModule = transformModule$1(code);
|
|
1054
1061
|
migrations.push({
|
|
1055
1062
|
path: sourceFile,
|
|
1056
1063
|
content: transformedModule.code
|
|
@@ -1060,7 +1067,7 @@ async function skeleton_3_default(options) {
|
|
|
1060
1067
|
case ".css":
|
|
1061
1068
|
case ".pcss":
|
|
1062
1069
|
case ".postcss": {
|
|
1063
|
-
const transformedStyleSheet =
|
|
1070
|
+
const transformedStyleSheet = transformStylesheet$1(code);
|
|
1064
1071
|
migrations.push({
|
|
1065
1072
|
path: sourceFile,
|
|
1066
1073
|
content: transformedStyleSheet.code
|
|
@@ -1074,7 +1081,7 @@ async function skeleton_3_default(options) {
|
|
|
1074
1081
|
cli.error("Migration canceled, nothing written to disk");
|
|
1075
1082
|
}
|
|
1076
1083
|
}
|
|
1077
|
-
sourceFilesSpinner.stop(
|
|
1084
|
+
sourceFilesSpinner.stop(`Successfully migrated ${sourceFiles.length} source files!`);
|
|
1078
1085
|
}
|
|
1079
1086
|
const writeSpinner = spinner();
|
|
1080
1087
|
writeSpinner.start("Applying all migrations...");
|
|
@@ -1098,6 +1105,60 @@ async function skeleton_3_default(options) {
|
|
|
1098
1105
|
log.info("Migration complete! Visit https://skeleton.dev for more information.");
|
|
1099
1106
|
}
|
|
1100
1107
|
|
|
1108
|
+
//#endregion
|
|
1109
|
+
//#region src/commands/migrate/migrations/skeleton-4/utility/identifier-mappings.ts
|
|
1110
|
+
const IDENTIFIER_MAPPINGS = {
|
|
1111
|
+
Modal: "Dialog",
|
|
1112
|
+
"Navigation.Bar": "Navigation",
|
|
1113
|
+
"Navigation.Rail": "Navigation",
|
|
1114
|
+
ProgressRing: "Progress",
|
|
1115
|
+
Ratings: "RatingGroup",
|
|
1116
|
+
Segment: "SegmentedControl",
|
|
1117
|
+
Toaster: "Toast.Group"
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1120
|
+
//#endregion
|
|
1121
|
+
//#region src/commands/migrate/migrations/skeleton-4/utility/import-mappings.ts
|
|
1122
|
+
const IMPORT_MAPPINGS = {
|
|
1123
|
+
Modal: "Dialog",
|
|
1124
|
+
Navigation: "Navigation",
|
|
1125
|
+
ProgressRing: "Progress",
|
|
1126
|
+
Ratings: "RatingGroup",
|
|
1127
|
+
Segment: "SegmentedControl",
|
|
1128
|
+
Toaster: "Toast"
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
//#endregion
|
|
1132
|
+
//#region src/commands/migrate/migrations/skeleton-4/transformers/transform-module.ts
|
|
1133
|
+
function transformModule(code) {
|
|
1134
|
+
const file = parseSourceFile(code);
|
|
1135
|
+
const skeletonImports = [];
|
|
1136
|
+
file.forEachDescendant((node) => {
|
|
1137
|
+
if (Node.isImportSpecifier(node) && ["@skeletonlabs/skeleton-svelte", "@skeletonlabs/skeleton-react"].includes(node.getImportDeclaration().getModuleSpecifier().getLiteralText())) {
|
|
1138
|
+
const name = node.getName();
|
|
1139
|
+
const newName = IMPORT_MAPPINGS[name];
|
|
1140
|
+
if (newName) {
|
|
1141
|
+
skeletonImports.push(name);
|
|
1142
|
+
node.setName(newName);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
});
|
|
1146
|
+
file.forEachDescendant((node) => {
|
|
1147
|
+
if (Node.isPropertyAccessExpression(node)) {
|
|
1148
|
+
const fullName = `${node.getExpression().getText()}.${node.getName()}`;
|
|
1149
|
+
const newName = IDENTIFIER_MAPPINGS[fullName];
|
|
1150
|
+
if (newName) node.replaceWithText(newName);
|
|
1151
|
+
} else if (Node.isIdentifier(node) && !Node.isImportSpecifier(node.getParent())) {
|
|
1152
|
+
const newName = IDENTIFIER_MAPPINGS[node.getText()];
|
|
1153
|
+
if (newName) node.replaceWithText(newName);
|
|
1154
|
+
}
|
|
1155
|
+
});
|
|
1156
|
+
return {
|
|
1157
|
+
code: file.getFullText(),
|
|
1158
|
+
meta: { skeletonImports }
|
|
1159
|
+
};
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1101
1162
|
//#endregion
|
|
1102
1163
|
//#region src/commands/migrate/migrations/skeleton-4/transformers/transform-package.json.ts
|
|
1103
1164
|
function transformPackageJson(code) {
|
|
@@ -1113,7 +1174,7 @@ function transformPackageJson(code) {
|
|
|
1113
1174
|
const coerced = coerce(pkg$1[field][dep]);
|
|
1114
1175
|
if (coerced && lt(coerced.version, "4.0.0")) {
|
|
1115
1176
|
delete pkg$1[field][dep];
|
|
1116
|
-
pkg$1[field][dep] =
|
|
1177
|
+
pkg$1[field][dep] = "next";
|
|
1117
1178
|
}
|
|
1118
1179
|
}
|
|
1119
1180
|
pkg$1[field] = sortPropertiesAlphabetically(pkg$1[field]);
|
|
@@ -1141,6 +1202,36 @@ function transformStylesheet(content) {
|
|
|
1141
1202
|
return { code: ast.toString() };
|
|
1142
1203
|
}
|
|
1143
1204
|
|
|
1205
|
+
//#endregion
|
|
1206
|
+
//#region src/commands/migrate/migrations/skeleton-4/transformers/transform-svelte.ts
|
|
1207
|
+
function transformScript(s, script) {
|
|
1208
|
+
if (!script || !("start" in script.content && typeof script.content.start === "number" && "end" in script.content && typeof script.content.end === "number")) return { meta: { skeletonImports: [] } };
|
|
1209
|
+
const content = s.original.slice(script.content.start, script.content.end);
|
|
1210
|
+
const transformed = transformModule(content);
|
|
1211
|
+
s.overwrite(script.content.start, script.content.end, transformed.code);
|
|
1212
|
+
return transformed;
|
|
1213
|
+
}
|
|
1214
|
+
function transformCss(s, css) {
|
|
1215
|
+
if (!css) return;
|
|
1216
|
+
const transformed = transformStylesheet(s.original.slice(css.content.start, css.content.end));
|
|
1217
|
+
s.overwrite(css.content.start, css.content.end, transformed.code);
|
|
1218
|
+
}
|
|
1219
|
+
function transformFragment(s, fragment, skeletonImports) {
|
|
1220
|
+
walk(fragment, {}, { Component(node, ctx) {
|
|
1221
|
+
const newName = IDENTIFIER_MAPPINGS[node.name];
|
|
1222
|
+
if (newName && hasRange(node) && skeletonImports.includes(node.name.split(".").at(0) || "")) renameComponent(s, node, newName);
|
|
1223
|
+
ctx.next();
|
|
1224
|
+
} });
|
|
1225
|
+
}
|
|
1226
|
+
function transformSvelte(code) {
|
|
1227
|
+
const s = new MagicString(code);
|
|
1228
|
+
const root = parse$2(code, { modern: true });
|
|
1229
|
+
const skeletonImports = [...transformScript(s, root.module).meta.skeletonImports, ...transformScript(s, root.instance).meta.skeletonImports];
|
|
1230
|
+
transformFragment(s, root.fragment, skeletonImports);
|
|
1231
|
+
transformCss(s, root.css);
|
|
1232
|
+
return { code: s.toString() };
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1144
1235
|
//#endregion
|
|
1145
1236
|
//#region src/commands/migrate/migrations/skeleton-4/index.ts
|
|
1146
1237
|
async function skeleton_4_default(options) {
|
|
@@ -1150,17 +1241,27 @@ async function skeleton_4_default(options) {
|
|
|
1150
1241
|
name: "package.json",
|
|
1151
1242
|
paths: await glob("package.json", { cwd })
|
|
1152
1243
|
};
|
|
1153
|
-
const stylesheets = {
|
|
1154
|
-
name: "stylesheets",
|
|
1155
|
-
paths: await glob("**/*.{css,scss,sass,less,styl,stylus}", {
|
|
1156
|
-
cwd,
|
|
1157
|
-
ignore: ["node_modules"]
|
|
1158
|
-
})
|
|
1159
|
-
};
|
|
1160
1244
|
for (const file of [packageJson]) {
|
|
1161
1245
|
if (file.paths.length === 0) cli.error(`"${file.name}" not found in directory "${cwd}".`);
|
|
1162
1246
|
if (file.paths.length > 1) cli.error(`Multiple "${file.name}" entries found in directory: "${cwd}", please ensure there is only one`);
|
|
1163
1247
|
}
|
|
1248
|
+
const availableSourceFolders = await glob("*", {
|
|
1249
|
+
cwd,
|
|
1250
|
+
onlyDirectories: true,
|
|
1251
|
+
ignore: ["node_modules"]
|
|
1252
|
+
});
|
|
1253
|
+
const sourceFolders = await multiselect({
|
|
1254
|
+
message: "What folders make use of Skeleton? (classes, imports, etc.)",
|
|
1255
|
+
options: availableSourceFolders.map((folder) => ({
|
|
1256
|
+
label: folder,
|
|
1257
|
+
value: folder
|
|
1258
|
+
})),
|
|
1259
|
+
initialValues: availableSourceFolders
|
|
1260
|
+
});
|
|
1261
|
+
if (isCancel(sourceFolders)) {
|
|
1262
|
+
cli.error("Migration canceled, nothing written to disk");
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1164
1265
|
const packageSpinner = spinner();
|
|
1165
1266
|
packageSpinner.start(`Migrating ${packageJson.name}...`);
|
|
1166
1267
|
try {
|
|
@@ -1175,18 +1276,48 @@ async function skeleton_4_default(options) {
|
|
|
1175
1276
|
packageSpinner.stop(`Failed to migrate ${packageJson.name}: ${error instanceof Error ? error.message : "Unknown error"}`, 1);
|
|
1176
1277
|
cli.error("Migration canceled, nothing written to disk");
|
|
1177
1278
|
}
|
|
1178
|
-
const
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1279
|
+
const sourceFiles = await glob(sourceFolders.map((folder) => `${folder}**/*.{svelte,js,mjs,ts,mts,css,pcss,postcss}`), {
|
|
1280
|
+
cwd,
|
|
1281
|
+
ignore: ["node_modules"]
|
|
1282
|
+
});
|
|
1283
|
+
const sourceFilesSpinner = spinner();
|
|
1284
|
+
sourceFilesSpinner.start(`Migrating source files...`);
|
|
1285
|
+
for (const path of sourceFiles) {
|
|
1286
|
+
const content = await readFile$1(path, "utf-8");
|
|
1287
|
+
switch (extname$1(path)) {
|
|
1288
|
+
case ".svelte":
|
|
1289
|
+
const transformedSvelte = transformSvelte(content);
|
|
1290
|
+
migrations.push({
|
|
1291
|
+
path,
|
|
1292
|
+
content: transformedSvelte.code
|
|
1293
|
+
});
|
|
1294
|
+
break;
|
|
1295
|
+
case ".css":
|
|
1296
|
+
case ".pcss":
|
|
1297
|
+
case ".postcss":
|
|
1298
|
+
const transformedStylesheet = transformStylesheet(content);
|
|
1299
|
+
migrations.push({
|
|
1300
|
+
path,
|
|
1301
|
+
content: transformedStylesheet.code
|
|
1302
|
+
});
|
|
1303
|
+
break;
|
|
1304
|
+
case ".js":
|
|
1305
|
+
case ".mjs":
|
|
1306
|
+
case ".cjs":
|
|
1307
|
+
case ".ts":
|
|
1308
|
+
case ".mts":
|
|
1309
|
+
case ".jsx":
|
|
1310
|
+
case ".tsx":
|
|
1311
|
+
const transformedModule = transformModule(content);
|
|
1312
|
+
migrations.push({
|
|
1313
|
+
path,
|
|
1314
|
+
content: transformedModule.code
|
|
1315
|
+
});
|
|
1316
|
+
break;
|
|
1317
|
+
}
|
|
1318
|
+
sourceFilesSpinner.message(`Migrated source file: ${path}!`);
|
|
1188
1319
|
}
|
|
1189
|
-
|
|
1320
|
+
sourceFilesSpinner.stop(`Successfully migrated ${sourceFiles.length} source files!`);
|
|
1190
1321
|
const writeSpinner = spinner();
|
|
1191
1322
|
writeSpinner.start("Applying all migrations...");
|
|
1192
1323
|
try {
|
|
@@ -1221,7 +1352,7 @@ const migrate = new Command("migrate").description("Run a migration").addArgumen
|
|
|
1221
1352
|
//#region src/utility/get-our-package-json.ts
|
|
1222
1353
|
async function getOurPackageJson() {
|
|
1223
1354
|
const packageJsonPath = join(dirname(fileURLToPath(import.meta.url)), "../package.json");
|
|
1224
|
-
const content = await readFile(packageJsonPath, "
|
|
1355
|
+
const content = await readFile(packageJsonPath, "utf-8");
|
|
1225
1356
|
return JSON.parse(content);
|
|
1226
1357
|
}
|
|
1227
1358
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["atRule","tailwindImport: AtRule | undefined","atRule","nodes: Node[]","THEME_MAPPINGS: Record<string, Theme>","parse","type: 'preset' | 'custom'","EXPORT_MAPPINGS: Record<\n\tstring,\n\t{\n\t\tnamedImport: Renamed | Removed;\n\t\tidentifier: Renamed | Removed;\n\t}\n>","skeletonImports: string[]","orderedObject: Record<string, string>","transformPackageJson","pkg","parse","FALLBACK_THEME: Theme","migrations: FileMigration[]","transformPackageJson","theme: Theme | undefined","pkg","atRule","migrations: FileMigration[]","readFile","writeFile","skeleton3","skeleton4"],"sources":["../src/utility/install-dependencies.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-classes.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-stylesheet.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-app.css.ts","../src/commands/migrate/migrations/skeleton-3/utility/theme-mappings.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-app.html.ts","../src/utility/ts-morph/add-named-import.ts","../src/utility/ts-morph/parse-source-file.ts","../src/commands/migrate/migrations/skeleton-3/utility/export-mappings.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-module.ts","../src/utility/sort-properties-alphabetically.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-package.json.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-svelte.ts","../src/commands/migrate/migrations/skeleton-3/utility/constants.ts","../src/commands/migrate/migrations/skeleton-3/index.ts","../src/commands/migrate/migrations/skeleton-4/transformers/transform-package.json.ts","../src/commands/migrate/migrations/skeleton-4/transformers/transform-stylesheet.ts","../src/commands/migrate/migrations/skeleton-4/index.ts","../src/commands/migrate/index.ts","../src/utility/get-our-package-json.ts","../src/index.ts"],"sourcesContent":["import child_process from 'node:child_process';\nimport { promisify } from 'node:util';\nimport { detect, resolveCommand } from 'package-manager-detector';\n\nconst exec = promisify(child_process.exec);\n\nasync function installDependencies(cwd = process.cwd()) {\n\tconst pm = await detect({\n\t\tcwd: cwd,\n\t});\n\tconst resolvedCommand = resolveCommand(pm?.agent ?? 'npm', 'install', []);\n\tif (!resolvedCommand) {\n\t\tthrow new Error('Could not resolve package manager command.');\n\t}\n\treturn exec(`${resolvedCommand.command} ${resolvedCommand.args.join(' ')}`, {\n\t\tcwd: cwd,\n\t});\n}\n\nexport { installDependencies };\n","const COLOR_PAIRING_REGEXES = [\n\t{\n\t\tfind: /(\\w+)-50-900-token\\b/g,\n\t\treplace: '$1-50-950',\n\t},\n\t{\n\t\tfind: /(\\w+)-100-800-token\\b/g,\n\t\treplace: '$1-100-900',\n\t},\n\t{\n\t\tfind: /(\\w+)-200-700-token\\b/g,\n\t\treplace: '$1-200-800',\n\t},\n\t{\n\t\tfind: /(\\w+)-300-600-token\\b/g,\n\t\treplace: '$1-300-700',\n\t},\n\t{\n\t\tfind: /(\\w+)-400-500-token\\b/g,\n\t\treplace: '$1-500',\n\t},\n\t{\n\t\tfind: /(\\w+)-900-50-token\\b/g,\n\t\treplace: '$1-950-50',\n\t},\n\t{\n\t\tfind: /(\\w+)-800-100-token\\b/g,\n\t\treplace: '$1-900-100',\n\t},\n\t{\n\t\tfind: /(\\w+)-700-200-token\\b/g,\n\t\treplace: '$1-800-200',\n\t},\n\t{\n\t\tfind: /(\\w+)-600-300-token\\b/g,\n\t\treplace: '$1-700-300',\n\t},\n\t{\n\t\tfind: /(\\w+)-500-400-token\\b/g,\n\t\treplace: '$1-600-400',\n\t},\n];\n\nconst BACKGROUND_REGEXES = [\n\t{\n\t\tfind: /bg-(\\w+)-backdrop-token\\b/g,\n\t\treplace: 'bg-$1-50/50 dark:bg-$1-950/50',\n\t},\n\t{\n\t\tfind: /bg-(\\w+)-hover-token\\b/g,\n\t\treplace: 'preset-tonal-$1',\n\t},\n\t{\n\t\tfind: /bg-(\\w+)-active-token\\b/g,\n\t\treplace: 'preset-filled-$1-500',\n\t},\n];\n\nconst BORDER_RADIUS_REGEXES = [\n\t{\n\t\tfind: /rounded-token\\b/g,\n\t\treplace: 'rounded-base',\n\t},\n\t{\n\t\tfind: /rounded-(tl|tr|bl|br)-token\\b/g,\n\t\treplace: 'rounded-$1-base',\n\t},\n\t{\n\t\tfind: /rounded-container-token\\b/g,\n\t\treplace: 'rounded-container',\n\t},\n\t{\n\t\tfind: /rounded-(tl|tr|bl|br)-container-token\\b/g,\n\t\treplace: 'rounded-$1-container',\n\t},\n];\n\nconst BORDER_RING_REGEXES = [\n\t{\n\t\tfind: /border-token\\b/g,\n\t\treplace: 'border',\n\t},\n\t{\n\t\tfind: /border-(\\w+)-(\\d+)-(\\d+)-token\\b/g,\n\t\treplace: 'border-$1-$2-$3',\n\t},\n\t{\n\t\tfind: /ring-token\\b/g,\n\t\treplace: 'ring',\n\t},\n\t{\n\t\tfind: /ring-(\\w+)-(\\d+)-(\\d+)-token\\b/g,\n\t\treplace: 'ring-$1-$2-$3',\n\t},\n];\n\nconst TEXT_REGEXES = [\n\t{\n\t\tfind: /font-headings-token\\b/g,\n\t\treplace: 'heading-font-family',\n\t},\n\t{\n\t\tfind: /font-token\\b/g,\n\t\treplace: 'base-font-family',\n\t},\n\t{\n\t\tfind: /text-token\\b/g,\n\t\treplace: 'base-font-color',\n\t},\n\t{\n\t\tfind: /text-on-(\\w+)-token\\b/g,\n\t\treplace: 'text-$1-contrast-500',\n\t},\n\t{\n\t\tfind: /text-(\\w+)-([^-]+)-([^-]+)-token\\b/g,\n\t\treplace: 'text-$1-$2-$3',\n\t},\n];\n\nconst DECORATION_ACCENT_REGEXES = [\n\t{\n\t\tfind: /decoration-(\\w+)-([^-]+)-([^-]+)-token\\b/g,\n\t\treplace: 'decoration-$1-$2-$3',\n\t},\n\t{\n\t\tfind: /accent-(\\w+)-token\\b/g,\n\t\treplace: 'accent-$1-500',\n\t},\n];\n\nconst PRESET_REGEXES = [\n\t{\n\t\tfind: /variant-filled-(\\w+)\\b/g,\n\t\treplace: 'preset-filled-$1-500',\n\t},\n\t{\n\t\tfind: /variant-filled\\b/g,\n\t\treplace: 'preset-filled',\n\t},\n\t{\n\t\tfind: /variant-ghost-(\\w+)\\b/g,\n\t\treplace: 'preset-tonal-$1 border border-$1-500',\n\t},\n\t{\n\t\tfind: /variant-ghost\\b/g,\n\t\treplace: 'preset-tonal border border-surface-500',\n\t},\n\t{\n\t\tfind: /variant-soft-(\\w+)\\b/g,\n\t\treplace: 'preset-tonal-$1',\n\t},\n\t{\n\t\tfind: /variant-soft\\b/g,\n\t\treplace: 'preset-tonal',\n\t},\n\t{\n\t\tfind: /variant-ringed-(\\w+)\\b/g,\n\t\treplace: 'preset-outlined-$1-500',\n\t},\n\t{\n\t\tfind: /variant-ringed\\b/g,\n\t\treplace: 'preset-outlined',\n\t},\n\t{\n\t\tfind: /variant-glass-(\\w+)\\b/g,\n\t\treplace: 'preset-tonal-$1',\n\t},\n\t{\n\t\tfind: /variant-glass\\b/g,\n\t\treplace: 'preset-tonal',\n\t},\n\t{\n\t\tfind: /variant-gradient-(\\w+)-(\\w+)\\b/g,\n\t\treplace: 'from-$1-500 to-$2-500',\n\t},\n];\n\nconst TAILWIND_COMPONENT_REGEXES = [\n\t/**\n\t * Disabled until further discussion\n\t * @see https://github.com/skeletonlabs/skeleton/pull/2972#discussion_r1857260763\n\t */\n\t// {\n\t// \tfind: /\\bcard\\b(?!.*bg-)/g,\n\t// \treplace: 'card bg-surface-100-900-token'\n\t// },\n\t{\n\t\tfind: /btn-xl\\b/g,\n\t\treplace: 'btn-lg',\n\t},\n\t{\n\t\tfind: /btn-icon-xl\\b/g,\n\t\treplace: 'btn-icon-lg',\n\t},\n\t{\n\t\tfind: /btn-group\\b/g,\n\t\treplace: '',\n\t},\n\t{\n\t\tfind: /table-hover\\b/g,\n\t\treplace: '',\n\t},\n];\n\nconst CLASS_REGEXES = [\n\t...COLOR_PAIRING_REGEXES,\n\t...BACKGROUND_REGEXES,\n\t...BORDER_RADIUS_REGEXES,\n\t...BORDER_RING_REGEXES,\n\t...TEXT_REGEXES,\n\t...DECORATION_ACCENT_REGEXES,\n\t...PRESET_REGEXES,\n\t...TAILWIND_COMPONENT_REGEXES,\n];\n\nfunction transformClasses(code: string) {\n\treturn {\n\t\tcode: CLASS_REGEXES.reduce((result, migration) => {\n\t\t\treturn result.replace(migration.find, migration.replace);\n\t\t}, code),\n\t};\n}\n\nexport { transformClasses };\n","import { transformClasses } from './transform-classes';\nimport { parse } from 'postcss';\n\nfunction transformStyleSheet(code: string) {\n\tconst parsed = parse(code);\n\tparsed.walkAtRules('apply', (atRule) => {\n\t\tatRule.params = transformClasses(atRule.params).code;\n\t});\n\n\treturn {\n\t\tcode: parsed.toString(),\n\t};\n}\n\nexport { transformStyleSheet };\n","import type { Theme } from '../utility/types';\nimport { transformStyleSheet } from './transform-stylesheet';\nimport { atRule, comment, parse } from 'postcss';\nimport type { AtRule, Node, Root } from 'postcss';\n\nfunction getTailwindImport(root: Root) {\n\tlet tailwindImport: AtRule | undefined;\n\troot.walkAtRules('import', (atRule) => {\n\t\tif (atRule.params.includes('tailwindcss')) {\n\t\t\ttailwindImport = atRule;\n\t\t}\n\t});\n\treturn tailwindImport;\n}\n\nfunction transformAppCss(code: string, theme: Theme) {\n\tcode = transformStyleSheet(code).code;\n\tconst root = parse(code);\n\tconst nodes: Node[] = [];\n\tnodes.push(\n\t\tatRule({\n\t\t\tname: 'import',\n\t\t\tparams: '\"@skeletonlabs/skeleton\"',\n\t\t}),\n\t);\n\tnodes.push(\n\t\tatRule({\n\t\t\tname: 'import',\n\t\t\tparams: '\"@skeletonlabs/skeleton/optional/presets\"',\n\t\t}),\n\t);\n\tswitch (theme.type) {\n\t\tcase 'preset': {\n\t\t\tnodes.push(\n\t\t\t\tatRule({\n\t\t\t\t\tname: 'import',\n\t\t\t\t\tparams: `\"@skeletonlabs/skeleton/themes/${theme.value}\"`,\n\t\t\t\t}),\n\t\t\t);\n\t\t\tbreak;\n\t\t}\n\t\tcase 'custom': {\n\t\t\tnodes.push(comment({ text: `Add your theme import for your theme: \"${theme.value}\" here` }));\n\t\t\tbreak;\n\t\t}\n\t}\n\tconst tailwindImport = getTailwindImport(root);\n\tif (tailwindImport) {\n\t\troot.insertAfter(tailwindImport, nodes);\n\t} else {\n\t\troot.prepend(nodes);\n\t}\n\treturn {\n\t\tcode: root.toString(),\n\t};\n}\n\nexport { transformAppCss };\n","import type { Theme } from './types';\n\nconst THEME_MAPPINGS: Record<string, Theme> = {\n\tskeleton: { type: 'preset', value: 'legacy' },\n\t'gold-nouveau': { type: 'preset', value: 'nouveau' },\n\twintry: { type: 'preset', value: 'wintry' },\n\tmodern: { type: 'preset', value: 'modern' },\n\trocket: { type: 'preset', value: 'rocket' },\n\tseafoam: { type: 'preset', value: 'seafoam' },\n\tvintage: { type: 'preset', value: 'vintage' },\n\tsahara: { type: 'preset', value: 'sahara' },\n\thamlindigo: { type: 'preset', value: 'hamlindigo' },\n\tcrimson: { type: 'preset', value: 'crimson' },\n};\n\nexport { THEME_MAPPINGS };\n","import { THEME_MAPPINGS } from '../utility/theme-mappings';\nimport { parse } from 'node-html-parser';\n\nfunction transformAppHtml(code: string) {\n\tconst parsed = parse(code);\n\tconst html = parsed.querySelector('html');\n\tconst body = parsed.querySelector('body');\n\tif (!(html && body)) {\n\t\treturn {\n\t\t\tcode: code,\n\t\t\tmeta: {\n\t\t\t\ttheme: undefined,\n\t\t\t},\n\t\t};\n\t}\n\tconst theme = body.getAttribute('data-theme');\n\tif (!theme) {\n\t\treturn {\n\t\t\tcode: code,\n\t\t\tmeta: {\n\t\t\t\ttheme: undefined,\n\t\t\t},\n\t\t};\n\t}\n\tlet type: 'preset' | 'custom';\n\tbody.removeAttribute('data-theme');\n\tif (Object.hasOwn(THEME_MAPPINGS, theme)) {\n\t\thtml.setAttribute('data-theme', THEME_MAPPINGS[theme]!.value);\n\t\ttype = 'preset';\n\t} else {\n\t\thtml.setAttribute('data-theme', theme);\n\t\ttype = 'custom';\n\t}\n\treturn {\n\t\tcode: parsed.toString(),\n\t\tmeta: {\n\t\t\ttheme: {\n\t\t\t\tvalue: theme,\n\t\t\t\ttype: type,\n\t\t\t},\n\t\t},\n\t};\n}\n\nexport { transformAppHtml };\n","import type { SourceFile } from 'ts-morph';\n\nfunction addNamedImport(file: SourceFile, specifier: string, name: string) {\n\tconst existingImportDeclaration = file.getImportDeclaration((importDeclaration) => {\n\t\tconst moduleSpecifier = importDeclaration.getModuleSpecifier().getLiteralText();\n\t\treturn moduleSpecifier === specifier;\n\t});\n\tif (existingImportDeclaration) {\n\t\tif (!existingImportDeclaration.getNamedImports().some((namedImport) => namedImport.getName() === name)) {\n\t\t\texistingImportDeclaration.addNamedImport(name);\n\t\t}\n\t} else {\n\t\tfile.addImportDeclaration({\n\t\t\tmoduleSpecifier: specifier,\n\t\t\tnamedImports: [name],\n\t\t});\n\t}\n}\n\nexport { addNamedImport };\n","import { nanoid } from 'nanoid';\nimport { Project } from 'ts-morph';\n\nconst project = new Project({\n\tuseInMemoryFileSystem: true,\n\tskipAddingFilesFromTsConfig: true,\n\tskipFileDependencyResolution: true,\n\tskipLoadingLibFiles: true,\n});\n\nfunction parseSourceFile(code: string) {\n\treturn project.createSourceFile(`${nanoid()}.ts`, code);\n}\n\nexport { parseSourceFile };\n","interface Renamed {\n\ttype: 'renamed';\n\tvalue: string;\n}\n\ninterface Removed {\n\ttype: 'removed';\n}\n\nconst EXPORT_MAPPINGS: Record<\n\tstring,\n\t{\n\t\tnamedImport: Renamed | Removed;\n\t\tidentifier: Renamed | Removed;\n\t}\n> = {\n\tAccordionItem: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Accordion',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Accordion.Item',\n\t\t},\n\t},\n\tAppShell: {\n\t\tnamedImport: {\n\t\t\ttype: 'removed',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'removed',\n\t\t},\n\t},\n\tApollo: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tAppRailAnchor: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tAutocomplete: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tBlueNight: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tCodeBlock: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tConicGradient: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tDrawer: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tEmerald: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tGreenFall: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tLightSwitch: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tListBox: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tListBoxItem: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tModal: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tNoir: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tNoirLight: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tRecursiveTreeView: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tRecursiveTreeViewItem: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tRustic: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tStep: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tStepper: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tSummer84: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tTable: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tTableOfContents: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tTreeView: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tTreeViewItem: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tXPro: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tautoModeWatcher: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tclipboard: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tfilter: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tfocusTrap: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetDrawerStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetModalStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetModeAutoPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetModeOsPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetModeUserPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetToastStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tinitializeStores: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tlocalStorageStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tmodeCurrent: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tmodeOsPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tmodeUserPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tpopup: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tprefersReducedMotionStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tsetInitialClassState: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tsetModeCurrent: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tsetModeUserPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tstoreHighlightJs: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tstorePopup: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\ttableMapperValues: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\ttableSourceMapper: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\ttableSourceValues: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\ttocCrawler: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\ttocStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tAppRail: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Navigation',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Navigation',\n\t\t},\n\t},\n\tAppRailTile: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Navigation',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Navigation.Tile',\n\t\t},\n\t},\n\tFileButton: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'FileUpload',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'FileUpload',\n\t\t},\n\t},\n\tFileDropzone: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'FileUpload',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'FileUpload',\n\t\t},\n\t},\n\tInputChip: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'TagsInput',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'TagsInput',\n\t\t},\n\t},\n\tPaginator: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Pagination',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Pagination',\n\t\t},\n\t},\n\tProgressBar: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Progress',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Progress',\n\t\t},\n\t},\n\tProgressRadial: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'ProgressRing',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'ProgressRing',\n\t\t},\n\t},\n\tRadioGroup: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Segment',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Segment',\n\t\t},\n\t},\n\tRadioItem: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Segment',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Segment.Item',\n\t\t},\n\t},\n\tRangeSlider: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Slider',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Slider',\n\t\t},\n\t},\n\tRatings: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Rating',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Rating',\n\t\t},\n\t},\n\tSlideToggle: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Switch',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Switch',\n\t\t},\n\t},\n\tTabAnchor: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Tabs',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Tabs.Control',\n\t\t},\n\t},\n\tTabGroup: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Tabs',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Tabs',\n\t\t},\n\t},\n\tToast: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'ToastProvider',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'ToastProvider',\n\t\t},\n\t},\n};\n\nexport { EXPORT_MAPPINGS };\n","import { addNamedImport } from '../../../../../utility/ts-morph/add-named-import';\nimport { parseSourceFile } from '../../../../../utility/ts-morph/parse-source-file';\nimport { EXPORT_MAPPINGS } from '../utility/export-mappings';\nimport { transformClasses } from './transform-classes';\nimport { Node } from 'ts-morph';\n\nfunction transformModule(code: string) {\n\tconst file = parseSourceFile(code);\n\tconst skeletonImports: string[] = [];\n\tfile.forEachDescendant((node) => {\n\t\tif (Node.isImportDeclaration(node)) {\n\t\t\tconst moduleSpecifier = node.getModuleSpecifier();\n\t\t\tif (moduleSpecifier.getLiteralText() === '@skeletonlabs/skeleton') {\n\t\t\t\tnode.setModuleSpecifier('@skeletonlabs/skeleton-svelte');\n\t\t\t}\n\t\t}\n\t\tif (\n\t\t\tNode.isImportSpecifier(node) &&\n\t\t\tnode.getImportDeclaration().getModuleSpecifier().getLiteralText() === '@skeletonlabs/skeleton-svelte'\n\t\t) {\n\t\t\tconst name = node.getName();\n\t\t\tif (Object.hasOwn(EXPORT_MAPPINGS, name)) {\n\t\t\t\tconst exportMapping = EXPORT_MAPPINGS[name];\n\t\t\t\tswitch (exportMapping?.namedImport.type) {\n\t\t\t\t\tcase 'renamed': {\n\t\t\t\t\t\tif (exportMapping.namedImport.value.match(/^[A-Za-z]+\\.[A-Za-z]+$/)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode.remove();\n\t\t\t\t\t\taddNamedImport(file, '@skeletonlabs/skeleton-svelte', exportMapping.namedImport.value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'removed': {\n\t\t\t\t\t\tconst parent = node.getImportDeclaration();\n\t\t\t\t\t\tif (parent.getNamedImports().length === 1 && !parent.getDefaultImport() && !parent.getNamespaceImport()) {\n\t\t\t\t\t\t\tparent.remove();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnode.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tskeletonImports.push(name);\n\t\t\t}\n\t\t}\n\t});\n\tfile.forEachDescendant((node) => {\n\t\tif (!node.wasForgotten() && Node.isIdentifier(node) && !Node.isImportSpecifier(node.getParent())) {\n\t\t\tconst name = node.getText();\n\t\t\tif (Object.hasOwn(EXPORT_MAPPINGS, name) && skeletonImports.includes(name)) {\n\t\t\t\tconst exportMapping = EXPORT_MAPPINGS[name];\n\t\t\t\tif (exportMapping?.identifier.type === 'renamed') {\n\t\t\t\t\tconst updated = exportMapping.identifier.value;\n\t\t\t\t\tif (updated !== node.getText()) {\n\t\t\t\t\t\tnode.replaceWithText(updated);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!node.wasForgotten() && Node.isStringLiteral(node) && !Node.isImportDeclaration(node.getParent())) {\n\t\t\tconst transformed = transformClasses(node.getText()).code;\n\t\t\tif (transformed !== node.getText()) {\n\t\t\t\tnode.replaceWithText(transformed);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn {\n\t\tcode: file.getFullText(),\n\t\tmeta: {\n\t\t\tskeletonImports: skeletonImports,\n\t\t},\n\t};\n}\n\nexport { transformModule };\n","function sortPropertiesAlphabetically(object: Record<string, string>) {\n\tconst orderedObject: Record<string, string> = {};\n\tconst sortedEntries = Object.entries(object).sort(([a], [b]) => a.localeCompare(b));\n\tfor (const [key, value] of sortedEntries) {\n\t\torderedObject[key] = value;\n\t}\n\treturn orderedObject;\n}\n\nexport { sortPropertiesAlphabetically };\n","import { sortPropertiesAlphabetically } from '../../../../../utility/sort-properties-alphabetically.js';\nimport detectIndent from 'detect-indent';\nimport { coerce, lt } from 'semver';\nimport type { PackageJson } from 'type-fest';\n\nfunction transformPackageJson(code: string, skeletonVersion: string, skeletonSvelteVersion: string) {\n\tlet isUsingComponents = false;\n\tconst pkg = JSON.parse(code) as PackageJson;\n\tfor (const field of ['dependencies', 'devDependencies'] as const) {\n\t\tif (!pkg[field]) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst coerced = coerce(pkg[field]['@skeletonlabs/skeleton']);\n\t\tif (coerced && lt(coerced.version, '3.0.0')) {\n\t\t\tisUsingComponents = true;\n\t\t\tdelete pkg[field]['@skeletonlabs/skeleton'];\n\t\t\tpkg[field]['@skeletonlabs/skeleton-svelte'] = `^${skeletonSvelteVersion}`;\n\t\t}\n\t\tif (pkg[field]['@skeletonlabs/tw-plugin']) {\n\t\t\tdelete pkg[field]['@skeletonlabs/tw-plugin'];\n\t\t\tpkg[field]['@skeletonlabs/skeleton'] = `^${skeletonVersion}`;\n\t\t}\n\t\tpkg[field] = sortPropertiesAlphabetically(pkg[field] as Record<string, string>);\n\t}\n\treturn {\n\t\tcode: JSON.stringify(pkg, undefined, detectIndent(code).indent || '\\t'),\n\t\tmeta: {\n\t\t\tisUsingComponents: isUsingComponents,\n\t\t},\n\t};\n}\n\nexport { transformPackageJson };\n","import { EXPORT_MAPPINGS } from '../utility/export-mappings';\nimport { transformClasses } from './transform-classes';\nimport { transformModule } from './transform-module';\nimport { transformStyleSheet } from './transform-stylesheet';\nimport type { Node } from 'estree';\nimport MagicString from 'magic-string';\nimport { parse } from 'svelte/compiler';\nimport type { AST } from 'svelte/compiler';\nimport { walk } from 'zimmerframe';\n\nfunction renameComponent(s: MagicString, node: AST.Component, name: string) {\n\tconst adjustedStart = node.start + 1;\n\ts.update(adjustedStart, adjustedStart + node.name.length, name);\n\tconst componentString = s.original.slice(node.start, node.end);\n\tconst indexOfNonSelfClosingTag = componentString.lastIndexOf('</');\n\tif (indexOfNonSelfClosingTag === -1 || node.start + indexOfNonSelfClosingTag > node.end) {\n\t\treturn;\n\t}\n\ts.update(node.start + indexOfNonSelfClosingTag + 2, node.start + indexOfNonSelfClosingTag + 2 + node.name.length, name);\n}\n\nfunction transformScript(s: MagicString, script: AST.Script | null) {\n\tif (\n\t\t!script ||\n\t\t!(\n\t\t\t'start' in script.content &&\n\t\t\ttypeof script.content.start === 'number' &&\n\t\t\t'end' in script.content &&\n\t\t\ttypeof script.content.end === 'number'\n\t\t)\n\t) {\n\t\treturn {\n\t\t\tmeta: {\n\t\t\t\tskeletonImports: [],\n\t\t\t},\n\t\t};\n\t}\n\tconst content = s.original.slice(script.content.start, script.content.end);\n\tconst transformed = transformModule(content);\n\ts.overwrite(script.content.start, script.content.end, transformed.code);\n\treturn {\n\t\tmeta: transformed.meta,\n\t};\n}\n\nfunction transformCss(s: MagicString, css: AST.CSS.StyleSheet | null) {\n\tif (!css) {\n\t\treturn;\n\t}\n\tconst transformed = transformStyleSheet(s.original.slice(css.content.start, css.content.end));\n\ts.overwrite(css.content.start, css.content.end, transformed.code);\n}\n\nfunction hasRange(node: Node | AST.SvelteNode): node is (Node | AST.SvelteNode) & { start: number; end: number } {\n\treturn 'start' in node && 'end' in node && typeof node.start === 'number' && typeof node.end === 'number';\n}\n\nfunction transformFragment(s: MagicString, fragment: AST.Fragment, skeletonImports: string[]) {\n\twalk(\n\t\tfragment as AST.SvelteNode,\n\t\t{},\n\t\t{\n\t\t\tLiteral(node, ctx) {\n\t\t\t\tconst parent = ctx.path.at(-1);\n\t\t\t\tif (typeof node.raw === 'string' && node.raw !== '' && !(parent && parent.type === 'ImportDeclaration') && hasRange(node)) {\n\t\t\t\t\ts.update(node.start, node.end, transformClasses(node.raw).code);\n\t\t\t\t}\n\t\t\t\tctx.next();\n\t\t\t},\n\t\t\tText(node, ctx) {\n\t\t\t\tif (node.data !== '' && hasRange(node)) {\n\t\t\t\t\ts.update(node.start, node.end, transformClasses(node.data).code);\n\t\t\t\t}\n\t\t\t\tctx.next();\n\t\t\t},\n\t\t\tClassDirective(node, ctx) {\n\t\t\t\tif (\n\t\t\t\t\t!(node.expression.type === 'Identifier' && !('loc' in node.expression) && node.name === node.expression.name) &&\n\t\t\t\t\thasRange(node)\n\t\t\t\t) {\n\t\t\t\t\tconst adjustedStart = node.start + 'class:'.length;\n\t\t\t\t\ts.update(adjustedStart, adjustedStart + node.name.length, transformClasses(node.name).code);\n\t\t\t\t}\n\t\t\t\tctx.next();\n\t\t\t},\n\t\t\tComponent(node, ctx) {\n\t\t\t\tif (Object.hasOwn(EXPORT_MAPPINGS, node.name) && skeletonImports.includes(node.name)) {\n\t\t\t\t\tconst exportMapping = EXPORT_MAPPINGS[node.name];\n\t\t\t\t\tif (exportMapping?.identifier.type === 'renamed' && hasRange(node)) {\n\t\t\t\t\t\trenameComponent(s, node, exportMapping.identifier.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tctx.next();\n\t\t\t},\n\t\t},\n\t);\n\treturn {\n\t\tcode: s.toString(),\n\t};\n}\n\nfunction transformSvelte(code: string) {\n\tconst s = new MagicString(code);\n\tconst root = parse(code, {\n\t\tmodern: true,\n\t});\n\tconst skeletonImports = [\n\t\t...transformScript(s, root.module).meta.skeletonImports,\n\t\t...transformScript(s, root.instance).meta.skeletonImports,\n\t];\n\ttransformFragment(s, root.fragment, skeletonImports);\n\ttransformCss(s, root.css);\n\treturn {\n\t\tcode: s.toString(),\n\t};\n}\n\nexport { transformSvelte };\n","import type { Theme } from './types';\n\nconst FALLBACK_THEME: Theme = {\n\ttype: 'preset',\n\tvalue: 'cerberus',\n};\n\nexport { FALLBACK_THEME };\n","import type { MigrateOptions } from '../..';\nimport { cli } from '../../../..';\nimport type { FileMigration } from '../../../../utility/file-migration';\nimport { installDependencies } from '../../../../utility/install-dependencies';\nimport { transformAppCss } from './transformers/transform-app.css';\nimport { transformAppHtml } from './transformers/transform-app.html';\nimport { transformModule } from './transformers/transform-module';\nimport { transformPackageJson } from './transformers/transform-package.json';\nimport { transformStyleSheet } from './transformers/transform-stylesheet';\nimport { transformSvelte } from './transformers/transform-svelte';\nimport { FALLBACK_THEME } from './utility/constants';\nimport { THEME_MAPPINGS } from './utility/theme-mappings';\nimport type { Theme } from './utility/types';\nimport { isCancel, log, multiselect, spinner } from '@clack/prompts';\nimport getLatestVersion from 'latest-version';\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { extname } from 'node:path';\nimport { glob } from 'tinyglobby';\n\nexport default async function (options: MigrateOptions) {\n\tconst cwd = options.cwd ?? process.cwd();\n\tconst migrations: FileMigration[] = [];\n\n\t// Find all required files\n\tconst packageJson = {\n\t\tname: 'package.json',\n\t\tpaths: await glob('package.json', { cwd }),\n\t};\n\tconst appHtml = {\n\t\tname: 'src/app.html',\n\t\tpaths: await glob('src/app.html', { cwd }),\n\t};\n\tconst appCss = {\n\t\tname: 'src/app.css',\n\t\tpaths: await glob('src/app.css', { cwd }),\n\t};\n\n\t// Validate file existence\n\tfor (const file of [packageJson, appHtml, appCss]) {\n\t\tif (file.paths.length === 0) {\n\t\t\tcli.error(`\"${file.name}\" not found in directory \"${cwd}\".`);\n\t\t}\n\t\tif (file.paths.length > 1) {\n\t\t\tcli.error(`Multiple \"${file.name}\" entries found in directory: \"${cwd}\", please ensure there is only one`);\n\t\t}\n\t}\n\n\t// Get source folders\n\tconst availableSourceFolders = await glob('*', {\n\t\tcwd: cwd,\n\t\tonlyDirectories: true,\n\t\tignore: ['node_modules'],\n\t});\n\tconst sourceFolders = await multiselect({\n\t\tmessage: 'What folders make use of Skeleton? (classes, imports, etc.)',\n\t\toptions: availableSourceFolders.map((folder) => ({ label: folder, value: folder })),\n\t\tinitialValues: availableSourceFolders,\n\t});\n\n\tif (isCancel(sourceFolders)) {\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t\treturn;\n\t}\n\n\t// Migrate package.json\n\tconst packageSpinner = spinner();\n\tpackageSpinner.start(`Migrating ${packageJson.name}...`);\n\ttry {\n\t\tconst packageJsonCode = await readFile(packageJson.paths.at(0)!, 'utf8');\n\t\tconst skeletonVersion = await getLatestVersion('@skeletonlabs/skeleton', { version: '>=3.0.0-0 <4.0.0' });\n\t\tconst skeletonSvelteVersion = await getLatestVersion('@skeletonlabs/skeleton-svelte', { version: '>=1.0.0-0 <2.0.0' });\n\t\tconst transformedPackageJson = transformPackageJson(packageJsonCode, skeletonVersion, skeletonSvelteVersion);\n\t\tmigrations.push({ path: packageJson.paths.at(0)!, content: transformedPackageJson.code });\n\t\tpackageSpinner.stop(`Successfully migrated ${packageJson.name}!`);\n\t} catch (error) {\n\t\tpackageSpinner.stop(`Failed to migrate ${packageJson.name}: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t}\n\n\t// Migrate app.html\n\tlet theme: Theme | undefined;\n\tconst appHtmlSpinner = spinner();\n\tappHtmlSpinner.start(`Migrating ${appHtml.name}...`);\n\ttry {\n\t\tconst appHtmlCode = await readFile(appHtml.paths.at(0)!, 'utf8');\n\t\tconst transformedAppHtml = transformAppHtml(appHtmlCode);\n\t\tif (transformedAppHtml.meta.theme && Object.hasOwn(THEME_MAPPINGS, transformedAppHtml.meta.theme.value)) {\n\t\t\ttheme = THEME_MAPPINGS[transformedAppHtml.meta.theme.value];\n\t\t} else if (transformedAppHtml.meta.theme) {\n\t\t\ttheme = transformedAppHtml.meta.theme;\n\t\t} else {\n\t\t\ttheme = FALLBACK_THEME;\n\t\t}\n\t\tmigrations.push({ path: appHtml.paths.at(0)!, content: transformedAppHtml.code });\n\t\tappHtmlSpinner.stop(`Successfully migrated ${appHtml.name}!`);\n\t} catch (error) {\n\t\tappHtmlSpinner.stop(`Failed to migrate ${appHtml.name}: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t}\n\n\t// Migrate app.css\n\tconst appCssSpinner = spinner();\n\tappCssSpinner.start(`Migrating ${appCss.name}...`);\n\ttry {\n\t\tconst appCssCode = await readFile(appCss.paths.at(0)!, 'utf8');\n\t\tconst transformedAppCss = transformAppCss(appCssCode, theme ?? FALLBACK_THEME);\n\t\tmigrations.push({ path: appCss.paths.at(0)!, content: transformedAppCss.code });\n\t\tappCssSpinner.stop(`Successfully migrated ${appCss.name}!`);\n\t} catch (error) {\n\t\tappCssSpinner.stop(`Failed to migrate ${appCss.name}: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t}\n\n\t// Migrate source files\n\tif (sourceFolders.length > 0) {\n\t\tconst sourceFiles = await glob(\n\t\t\tsourceFolders.map((folder) => `${folder}**/*.{svelte,js,mjs,ts,mts,css,pcss,postcss}`),\n\t\t\t{\n\t\t\t\tcwd: cwd,\n\t\t\t\tignore: ['node_modules', 'src/app.css'],\n\t\t\t},\n\t\t);\n\t\tconst sourceFilesSpinner = spinner();\n\t\tsourceFilesSpinner.start(`Migrating source files...`);\n\t\tfor (const sourceFile of sourceFiles) {\n\t\t\tsourceFilesSpinner.message(`Migrating ${sourceFile}...`);\n\t\t\tconst extension = extname(sourceFile);\n\t\t\ttry {\n\t\t\t\tconst code = await readFile(sourceFile, 'utf8');\n\t\t\t\tswitch (extension) {\n\t\t\t\t\tcase '.svelte': {\n\t\t\t\t\t\tconst transformedSvelte = transformSvelte(code);\n\t\t\t\t\t\tmigrations.push({ path: sourceFile, content: transformedSvelte.code });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase '.js':\n\t\t\t\t\tcase '.mjs':\n\t\t\t\t\tcase '.ts':\n\t\t\t\t\tcase '.mts': {\n\t\t\t\t\t\tconst transformedModule = transformModule(code);\n\t\t\t\t\t\tmigrations.push({ path: sourceFile, content: transformedModule.code });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase '.css':\n\t\t\t\t\tcase '.pcss':\n\t\t\t\t\tcase '.postcss': {\n\t\t\t\t\t\tconst transformedStyleSheet = transformStyleSheet(code);\n\t\t\t\t\t\tmigrations.push({ path: sourceFile, content: transformedStyleSheet.code });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsourceFilesSpinner.message(`Successfully migrated ${sourceFile}!`);\n\t\t\t} catch (error) {\n\t\t\t\tsourceFilesSpinner.stop(`Failed to migrate ${sourceFile}: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\t\t\tcli.error('Migration canceled, nothing written to disk');\n\t\t\t}\n\t\t}\n\t\tsourceFilesSpinner.stop('Successfully migrated all source files!');\n\t}\n\n\t// Write all migrations to disk\n\tconst writeSpinner = spinner();\n\twriteSpinner.start('Applying all migrations...');\n\ttry {\n\t\tawait Promise.all(migrations.map(({ path, content }) => writeFile(path, content)));\n\t\twriteSpinner.stop('Successfully applied all migrations!');\n\t} catch (error) {\n\t\twriteSpinner.stop(`Failed to apply migrations: ${error instanceof Error ? error.message.replace('\\n', ' ') : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled');\n\t}\n\n\t// Install dependencies\n\tconst installDependenciesSpinner = spinner();\n\tinstallDependenciesSpinner.start('Installing dependencies...');\n\ttry {\n\t\tawait installDependencies(cwd);\n\t\tinstallDependenciesSpinner.stop('Successfully installed dependencies!');\n\t} catch (error) {\n\t\tinstallDependenciesSpinner.stop(`Failed to install dependencies: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled');\n\t\treturn;\n\t}\n\n\tlog.info('Migration complete! Visit https://skeleton.dev for more information.');\n}\n","import { sortPropertiesAlphabetically } from '../../../../../utility/sort-properties-alphabetically.js';\nimport detectIndent from 'detect-indent';\nimport { coerce, lt } from 'semver';\nimport type { PackageJson } from 'type-fest';\n\nfunction transformPackageJson(code: string) {\n\tconst pkg = JSON.parse(code) as PackageJson;\n\tfor (const field of ['dependencies', 'devDependencies'] as const) {\n\t\tif (!pkg[field]) {\n\t\t\tcontinue;\n\t\t}\n\t\tfor (const dep of ['@skeletonlabs/skeleton', '@skeletonlabs/skeleton-svelte', '@skeletonlabs/skeleton-react']) {\n\t\t\tif (!pkg[field][dep]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst coerced = coerce(pkg[field][dep]);\n\t\t\tif (coerced && lt(coerced.version, '4.0.0')) {\n\t\t\t\tdelete pkg[field][dep];\n\t\t\t\tpkg[field][dep] = `^4.0.0`;\n\t\t\t}\n\t\t}\n\t\tpkg[field] = sortPropertiesAlphabetically(pkg[field] as Record<string, string>);\n\t}\n\treturn {\n\t\tcode: JSON.stringify(pkg, undefined, detectIndent(code).indent || '\\t'),\n\t};\n}\n\nexport { transformPackageJson };\n","import { AtRule, parse } from 'postcss';\n\nexport function transformStylesheet(content: string) {\n\tconst ast = parse(content);\n\n\tast.walkAtRules((atRule) => {\n\t\tif (atRule.name === 'import' && atRule.params.includes('@skeletonlabs/skeleton/optional/presets')) {\n\t\t\tatRule.remove();\n\t\t}\n\t\tif (atRule.name === 'source') {\n\t\t\tif (atRule.params.includes('@skeletonlabs/skeleton-svelte')) {\n\t\t\t\tatRule.replaceWith(\n\t\t\t\t\tnew AtRule({\n\t\t\t\t\t\tname: 'import',\n\t\t\t\t\t\tparams: `'@skeletonlabs/skeleton-svelte'`,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (atRule.params.includes('@skeletonlabs/skeleton-react')) {\n\t\t\t\tatRule.replaceWith(\n\t\t\t\t\tnew AtRule({\n\t\t\t\t\t\tname: 'import',\n\t\t\t\t\t\tparams: `'@skeletonlabs/skeleton-react'`,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn {\n\t\tcode: ast.toString(),\n\t};\n}\n","import type { MigrateOptions } from '../..';\nimport { cli } from '../../../..';\nimport type { FileMigration } from '../../../../utility/file-migration';\nimport { installDependencies } from '../../../../utility/install-dependencies';\nimport { transformPackageJson } from './transformers/transform-package.json';\nimport { transformStylesheet } from './transformers/transform-stylesheet';\nimport { log, spinner } from '@clack/prompts';\nimport { readFile, writeFile } from 'fs/promises';\nimport { glob } from 'tinyglobby';\n\nexport default async function (options: MigrateOptions) {\n\tconst cwd = options.cwd ?? process.cwd();\n\tconst migrations: FileMigration[] = [];\n\n\t// Find all required files\n\tconst packageJson = {\n\t\tname: 'package.json',\n\t\tpaths: await glob('package.json', { cwd }),\n\t};\n\tconst stylesheets = {\n\t\tname: 'stylesheets',\n\t\tpaths: await glob('**/*.{css,scss,sass,less,styl,stylus}', {\n\t\t\tcwd: cwd,\n\t\t\tignore: ['node_modules'],\n\t\t}),\n\t};\n\n\t// Validate file existence\n\tfor (const file of [packageJson]) {\n\t\tif (file.paths.length === 0) {\n\t\t\tcli.error(`\"${file.name}\" not found in directory \"${cwd}\".`);\n\t\t}\n\t\tif (file.paths.length > 1) {\n\t\t\tcli.error(`Multiple \"${file.name}\" entries found in directory: \"${cwd}\", please ensure there is only one`);\n\t\t}\n\t}\n\n\t// Migrate package.json\n\tconst packageSpinner = spinner();\n\tpackageSpinner.start(`Migrating ${packageJson.name}...`);\n\ttry {\n\t\tconst packageJsonCode = await readFile(packageJson.paths.at(0)!, 'utf-8');\n\t\tconst transformedPackageJson = transformPackageJson(packageJsonCode);\n\t\tmigrations.push({\n\t\t\tpath: packageJson.paths.at(0)!,\n\t\t\tcontent: transformedPackageJson.code,\n\t\t});\n\t\tpackageSpinner.stop(`Successfully migrated ${packageJson.name}!`);\n\t} catch (error) {\n\t\tpackageSpinner.stop(`Failed to migrate ${packageJson.name}: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t}\n\n\t// Migrate stylesheets\n\tconst stylesheetSpinner = spinner();\n\tstylesheetSpinner.start(`Migrating ${stylesheets.name}...`);\n\tfor (const stylesheetPath of stylesheets.paths) {\n\t\tconst stylesheetCode = await readFile(stylesheetPath, 'utf-8');\n\t\tconst transformedStylesheet = transformStylesheet(stylesheetCode);\n\t\tmigrations.push({\n\t\t\tpath: stylesheetPath,\n\t\t\tcontent: transformedStylesheet.code,\n\t\t});\n\t\tstylesheetSpinner.message(`Migrated stylesheet: ${stylesheetPath}`);\n\t}\n\tstylesheetSpinner.stop(`Successfully migrated ${stylesheets.name}!`);\n\n\t// Write all migrations to disk\n\tconst writeSpinner = spinner();\n\twriteSpinner.start('Applying all migrations...');\n\ttry {\n\t\tawait Promise.all(migrations.map(({ path, content }) => writeFile(path, content)));\n\t\twriteSpinner.stop('Successfully applied all migrations!');\n\t} catch (error) {\n\t\twriteSpinner.stop(`Failed to apply migrations: ${error instanceof Error ? error.message.replace('\\n', ' ') : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled');\n\t}\n\n\t// Install dependencies\n\tconst installDependenciesSpinner = spinner();\n\tinstallDependenciesSpinner.start('Installing dependencies...');\n\ttry {\n\t\tawait installDependencies(cwd);\n\t\tinstallDependenciesSpinner.stop('Successfully installed dependencies!');\n\t} catch (error) {\n\t\tinstallDependenciesSpinner.stop(`Failed to install dependencies: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled');\n\t\treturn;\n\t}\n\n\tlog.info('Migration complete! Visit https://skeleton.dev for more information.');\n}\n","import skeleton3 from './migrations/skeleton-3';\nimport skeleton4 from './migrations/skeleton-4';\nimport { Argument, Command, Option } from 'commander';\n\ninterface MigrateOptions {\n\tcwd?: string;\n}\nconst MIGRATIONS = {\n\t'skeleton-3': skeleton3,\n\t'skeleton-4': skeleton4,\n} as const;\n\nconst migrate = new Command('migrate')\n\t.description('Run a migration')\n\t.addArgument(new Argument('<migration>', 'The migration to run').choices(Object.keys(MIGRATIONS)))\n\t.addOption(new Option('--cwd <cwd>', 'The directory to run the migration in'))\n\t.action((migration: keyof typeof MIGRATIONS, options: MigrateOptions) => MIGRATIONS[migration](options));\n\nexport type { MigrateOptions };\nexport { migrate };\n","import { readFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport type { PackageJson } from 'type-fest';\n\nasync function getOurPackageJson(): Promise<Required<PackageJson>> {\n\tconst packageJsonPath = join(dirname(fileURLToPath(import.meta.url)), '../package.json');\n\tconst content = await readFile(packageJsonPath, 'utf8');\n\treturn JSON.parse(content);\n}\n\nexport { getOurPackageJson };\n","#!/usr/bin/env node\nimport { migrate } from './commands/migrate';\nimport { getOurPackageJson } from './utility/get-our-package-json';\nimport { intro, log, outro } from '@clack/prompts';\nimport { bgBlueBright, bgGreenBright, black, dim, red } from 'colorette';\nimport { Command } from 'commander';\n\nconst pkg = await getOurPackageJson();\n\nconst cli = new Command()\n\t.name(pkg.name)\n\t.description(pkg.description)\n\t.version(pkg.version)\n\t.addCommand(migrate)\n\t.copyInheritedSettings(migrate)\n\t.configureOutput({\n\t\twriteOut: log.info,\n\t\twriteErr(str) {\n\t\t\toutro(red(str.replace('\\n', ' ')));\n\t\t\tprocess.exit(1);\n\t\t},\n\t})\n\t.hook('preAction', (_, ctx) => {\n\t\tconst args = ctx.args.join(' ');\n\t\tlog.message(dim(`Running \"${`${ctx.name()}${args ? ` ${args}` : ''}`}\"...`));\n\t});\n\nasync function main() {\n\tintro(bgBlueBright(black(' Welcome to the Skeleton CLI 💀 ')));\n\tif (process.argv.length === 2) {\n\t\tcli.error('error: no command provided');\n\t}\n\tawait cli.parseAsync(process.argv);\n\toutro(bgGreenBright(black(' All Done! ')));\n}\n\nawait main();\n\nexport { cli };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,OAAO,UAAU,cAAc,KAAK;AAE1C,eAAe,oBAAoB,MAAM,QAAQ,KAAK,EAAE;CACvD,MAAM,KAAK,MAAM,OAAO,EAClB,KACL,CAAC;CACF,MAAM,kBAAkB,eAAe,IAAI,SAAS,OAAO,WAAW,EAAE,CAAC;AACzE,KAAI,CAAC,gBACJ,OAAM,IAAI,MAAM,6CAA6C;AAE9D,QAAO,KAAK,GAAG,gBAAgB,QAAQ,GAAG,gBAAgB,KAAK,KAAK,IAAI,IAAI,EACtE,KACL,CAAC;;;;;AChBH,MAAM,wBAAwB;CAC7B;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,qBAAqB;CAC1B;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,wBAAwB;CAC7B;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,sBAAsB;CAC3B;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,eAAe;CACpB;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,4BAA4B,CACjC;CACC,MAAM;CACN,SAAS;CACT,EACD;CACC,MAAM;CACN,SAAS;CACT,CACD;AAED,MAAM,iBAAiB;CACtB;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,6BAA6B;;;;;;CASlC;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS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ACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,cAAc;EACb,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,WAAW;EACV,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,WAAW;EACV,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,aAAa;EACZ,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,gBAAgB;EACf,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,YAAY;EACX,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,WAAW;EACV,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,aAAa;EACZ,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,SAAS;EACR,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,aAAa;EACZ,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,WAAW;EACV,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,UAAU;EACT,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,OAAO;EACN,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;G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Q,CAAC;;;;ACXzG,eAAe,oBAAoD;CAClE,MAAM,kBAAkB,KAAK,QAAQ,cAAc,OAAO,KAAK,IAAI,CAAC,EAAE,kBAAkB;CACxF,MAAM,UAAU,MAAM,SAAS,iBAAiB,OAAO;AACvD,QAAO,KAAK,MAAM,QAAQ;;;;;ACD3B,MAAM,MAAM,MAAM,mBAAmB;AAErC,MAAM,MAAM,IAAI,SAAS,CACvB,KAAK,IAAI,KAAK,CACd,YAAY,IAAI,YAAY,CAC5B,QAAQ,IAAI,QAAQ,CACpB,WAAW,QAAQ,CACnB,sBAAsB,QAAQ,CAC9B,gBAAgB;CAChB,UAAU,IAAI;CACd,SAAS,KAAK;AACb,QAAM,IAAI,IAAI,QAAQ,MAAM,IAAI,CAAC,CAAC;AAClC,UAAQ,KAAK,EAAE;;CAEhB,CAAC,CACD,KAAK,cAAc,GAAG,QAAQ;CAC9B,MAAM,OAAO,IAAI,KAAK,KAAK,IAAI;AAC/B,KAAI,QAAQ,IAAI,YAAY,GAAG,IAAI,MAAM,GAAG,OAAO,IAAI,SAAS,KAAK,MAAM,CAAC;EAC3E;AAEH,eAAe,OAAO;AACrB,OAAM,aAAa,MAAM,mCAAmC,CAAC,CAAC;AAC9D,KAAI,QAAQ,KAAK,WAAW,EAC3B,KAAI,MAAM,6BAA6B;AAExC,OAAM,IAAI,WAAW,QAAQ,KAAK;AAClC,OAAM,cAAc,MAAM,cAAc,CAAC,CAAC;;AAG3C,MAAM,MAAM"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["transformStylesheet","atRule","tailwindImport: AtRule | undefined","atRule","transformStylesheet","nodes: Node[]","THEME_MAPPINGS: Record<string, Theme>","parse","type: 'preset' | 'custom'","EXPORT_MAPPINGS: Record<\n\tstring,\n\t{\n\t\tnamedImport: Renamed | Removed;\n\t\tidentifier: Renamed | Removed;\n\t}\n>","transformModule","skeletonImports: string[]","orderedObject: Record<string, string>","transformPackageJson","pkg","transformScript","transformModule","transformCss","transformStylesheet","transformFragment","transformSvelte","parse","FALLBACK_THEME: Theme","migrations: FileMigration[]","transformPackageJson","theme: Theme | undefined","transformSvelte","transformModule","transformStylesheet","IDENTIFIER_MAPPINGS: Record<string, string>","IMPORT_MAPPINGS: Record<string, string>","skeletonImports: string[]","pkg","atRule","parse","migrations: FileMigration[]","readFile","extname","writeFile","skeleton3","skeleton4"],"sources":["../src/utility/install-dependencies.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-classes.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-stylesheet.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-app.css.ts","../src/commands/migrate/migrations/skeleton-3/utility/theme-mappings.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-app.html.ts","../src/utility/ts-morph/add-named-import.ts","../src/utility/ts-morph/parse-source-file.ts","../src/commands/migrate/migrations/skeleton-3/utility/export-mappings.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-module.ts","../src/utility/sort-properties-alphabetically.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-package.json.ts","../src/utility/svelte/has-range.ts","../src/utility/svelte/rename-component.ts","../src/commands/migrate/migrations/skeleton-3/transformers/transform-svelte.ts","../src/commands/migrate/migrations/skeleton-3/utility/constants.ts","../src/commands/migrate/migrations/skeleton-3/index.ts","../src/commands/migrate/migrations/skeleton-4/utility/identifier-mappings.ts","../src/commands/migrate/migrations/skeleton-4/utility/import-mappings.ts","../src/commands/migrate/migrations/skeleton-4/transformers/transform-module.ts","../src/commands/migrate/migrations/skeleton-4/transformers/transform-package.json.ts","../src/commands/migrate/migrations/skeleton-4/transformers/transform-stylesheet.ts","../src/commands/migrate/migrations/skeleton-4/transformers/transform-svelte.ts","../src/commands/migrate/migrations/skeleton-4/index.ts","../src/commands/migrate/index.ts","../src/utility/get-our-package-json.ts","../src/index.ts"],"sourcesContent":["import child_process from 'node:child_process';\nimport { promisify } from 'node:util';\nimport { detect, resolveCommand } from 'package-manager-detector';\n\nconst exec = promisify(child_process.exec);\n\nasync function installDependencies(cwd = process.cwd()) {\n\tconst pm = await detect({\n\t\tcwd: cwd,\n\t});\n\tconst resolvedCommand = resolveCommand(pm?.agent ?? 'npm', 'install', []);\n\tif (!resolvedCommand) {\n\t\tthrow new Error('Could not resolve package manager command.');\n\t}\n\treturn exec(`${resolvedCommand.command} ${resolvedCommand.args.join(' ')}`, {\n\t\tcwd: cwd,\n\t});\n}\n\nexport { installDependencies };\n","const COLOR_PAIRING_REGEXES = [\n\t{\n\t\tfind: /(\\w+)-50-900-token\\b/g,\n\t\treplace: '$1-50-950',\n\t},\n\t{\n\t\tfind: /(\\w+)-100-800-token\\b/g,\n\t\treplace: '$1-100-900',\n\t},\n\t{\n\t\tfind: /(\\w+)-200-700-token\\b/g,\n\t\treplace: '$1-200-800',\n\t},\n\t{\n\t\tfind: /(\\w+)-300-600-token\\b/g,\n\t\treplace: '$1-300-700',\n\t},\n\t{\n\t\tfind: /(\\w+)-400-500-token\\b/g,\n\t\treplace: '$1-500',\n\t},\n\t{\n\t\tfind: /(\\w+)-900-50-token\\b/g,\n\t\treplace: '$1-950-50',\n\t},\n\t{\n\t\tfind: /(\\w+)-800-100-token\\b/g,\n\t\treplace: '$1-900-100',\n\t},\n\t{\n\t\tfind: /(\\w+)-700-200-token\\b/g,\n\t\treplace: '$1-800-200',\n\t},\n\t{\n\t\tfind: /(\\w+)-600-300-token\\b/g,\n\t\treplace: '$1-700-300',\n\t},\n\t{\n\t\tfind: /(\\w+)-500-400-token\\b/g,\n\t\treplace: '$1-600-400',\n\t},\n];\n\nconst BACKGROUND_REGEXES = [\n\t{\n\t\tfind: /bg-(\\w+)-backdrop-token\\b/g,\n\t\treplace: 'bg-$1-50/50 dark:bg-$1-950/50',\n\t},\n\t{\n\t\tfind: /bg-(\\w+)-hover-token\\b/g,\n\t\treplace: 'preset-tonal-$1',\n\t},\n\t{\n\t\tfind: /bg-(\\w+)-active-token\\b/g,\n\t\treplace: 'preset-filled-$1-500',\n\t},\n];\n\nconst BORDER_RADIUS_REGEXES = [\n\t{\n\t\tfind: /rounded-token\\b/g,\n\t\treplace: 'rounded-base',\n\t},\n\t{\n\t\tfind: /rounded-(tl|tr|bl|br)-token\\b/g,\n\t\treplace: 'rounded-$1-base',\n\t},\n\t{\n\t\tfind: /rounded-container-token\\b/g,\n\t\treplace: 'rounded-container',\n\t},\n\t{\n\t\tfind: /rounded-(tl|tr|bl|br)-container-token\\b/g,\n\t\treplace: 'rounded-$1-container',\n\t},\n];\n\nconst BORDER_RING_REGEXES = [\n\t{\n\t\tfind: /border-token\\b/g,\n\t\treplace: 'border',\n\t},\n\t{\n\t\tfind: /border-(\\w+)-(\\d+)-(\\d+)-token\\b/g,\n\t\treplace: 'border-$1-$2-$3',\n\t},\n\t{\n\t\tfind: /ring-token\\b/g,\n\t\treplace: 'ring',\n\t},\n\t{\n\t\tfind: /ring-(\\w+)-(\\d+)-(\\d+)-token\\b/g,\n\t\treplace: 'ring-$1-$2-$3',\n\t},\n];\n\nconst TEXT_REGEXES = [\n\t{\n\t\tfind: /font-headings-token\\b/g,\n\t\treplace: 'heading-font-family',\n\t},\n\t{\n\t\tfind: /font-token\\b/g,\n\t\treplace: 'base-font-family',\n\t},\n\t{\n\t\tfind: /text-token\\b/g,\n\t\treplace: 'base-font-color',\n\t},\n\t{\n\t\tfind: /text-on-(\\w+)-token\\b/g,\n\t\treplace: 'text-$1-contrast-500',\n\t},\n\t{\n\t\tfind: /text-(\\w+)-([^-]+)-([^-]+)-token\\b/g,\n\t\treplace: 'text-$1-$2-$3',\n\t},\n];\n\nconst DECORATION_ACCENT_REGEXES = [\n\t{\n\t\tfind: /decoration-(\\w+)-([^-]+)-([^-]+)-token\\b/g,\n\t\treplace: 'decoration-$1-$2-$3',\n\t},\n\t{\n\t\tfind: /accent-(\\w+)-token\\b/g,\n\t\treplace: 'accent-$1-500',\n\t},\n];\n\nconst PRESET_REGEXES = [\n\t{\n\t\tfind: /variant-filled-(\\w+)\\b/g,\n\t\treplace: 'preset-filled-$1-500',\n\t},\n\t{\n\t\tfind: /variant-filled\\b/g,\n\t\treplace: 'preset-filled',\n\t},\n\t{\n\t\tfind: /variant-ghost-(\\w+)\\b/g,\n\t\treplace: 'preset-tonal-$1 border border-$1-500',\n\t},\n\t{\n\t\tfind: /variant-ghost\\b/g,\n\t\treplace: 'preset-tonal border border-surface-500',\n\t},\n\t{\n\t\tfind: /variant-soft-(\\w+)\\b/g,\n\t\treplace: 'preset-tonal-$1',\n\t},\n\t{\n\t\tfind: /variant-soft\\b/g,\n\t\treplace: 'preset-tonal',\n\t},\n\t{\n\t\tfind: /variant-ringed-(\\w+)\\b/g,\n\t\treplace: 'preset-outlined-$1-500',\n\t},\n\t{\n\t\tfind: /variant-ringed\\b/g,\n\t\treplace: 'preset-outlined',\n\t},\n\t{\n\t\tfind: /variant-glass-(\\w+)\\b/g,\n\t\treplace: 'preset-tonal-$1',\n\t},\n\t{\n\t\tfind: /variant-glass\\b/g,\n\t\treplace: 'preset-tonal',\n\t},\n\t{\n\t\tfind: /variant-gradient-(\\w+)-(\\w+)\\b/g,\n\t\treplace: 'from-$1-500 to-$2-500',\n\t},\n];\n\nconst TAILWIND_COMPONENT_REGEXES = [\n\t/**\n\t * Disabled until further discussion\n\t * @see https://github.com/skeletonlabs/skeleton/pull/2972#discussion_r1857260763\n\t */\n\t// {\n\t// \tfind: /\\bcard\\b(?!.*bg-)/g,\n\t// \treplace: 'card bg-surface-100-900-token'\n\t// },\n\t{\n\t\tfind: /btn-xl\\b/g,\n\t\treplace: 'btn-lg',\n\t},\n\t{\n\t\tfind: /btn-icon-xl\\b/g,\n\t\treplace: 'btn-icon-lg',\n\t},\n\t{\n\t\tfind: /btn-group\\b/g,\n\t\treplace: '',\n\t},\n\t{\n\t\tfind: /table-hover\\b/g,\n\t\treplace: '',\n\t},\n];\n\nconst CLASS_REGEXES = [\n\t...COLOR_PAIRING_REGEXES,\n\t...BACKGROUND_REGEXES,\n\t...BORDER_RADIUS_REGEXES,\n\t...BORDER_RING_REGEXES,\n\t...TEXT_REGEXES,\n\t...DECORATION_ACCENT_REGEXES,\n\t...PRESET_REGEXES,\n\t...TAILWIND_COMPONENT_REGEXES,\n];\n\nfunction transformClasses(code: string) {\n\treturn {\n\t\tcode: CLASS_REGEXES.reduce((result, migration) => {\n\t\t\treturn result.replace(migration.find, migration.replace);\n\t\t}, code),\n\t};\n}\n\nexport { transformClasses };\n","import { transformClasses } from './transform-classes';\nimport { parse } from 'postcss';\n\nfunction transformStylesheet(code: string) {\n\tconst parsed = parse(code);\n\tparsed.walkAtRules('apply', (atRule) => {\n\t\tatRule.params = transformClasses(atRule.params).code;\n\t});\n\n\treturn {\n\t\tcode: parsed.toString(),\n\t};\n}\n\nexport { transformStylesheet };\n","import type { Theme } from '../utility/types';\nimport { transformStylesheet } from './transform-stylesheet';\nimport { atRule, comment, parse } from 'postcss';\nimport type { AtRule, Node, Root } from 'postcss';\n\nfunction getTailwindImport(root: Root) {\n\tlet tailwindImport: AtRule | undefined;\n\troot.walkAtRules('import', (atRule) => {\n\t\tif (atRule.params.includes('tailwindcss')) {\n\t\t\ttailwindImport = atRule;\n\t\t}\n\t});\n\treturn tailwindImport;\n}\n\nfunction transformAppCss(code: string, theme: Theme) {\n\tcode = transformStylesheet(code).code;\n\tconst root = parse(code);\n\tconst nodes: Node[] = [];\n\tnodes.push(\n\t\tatRule({\n\t\t\tname: 'import',\n\t\t\tparams: '\"@skeletonlabs/skeleton\"',\n\t\t}),\n\t);\n\tnodes.push(\n\t\tatRule({\n\t\t\tname: 'import',\n\t\t\tparams: '\"@skeletonlabs/skeleton/optional/presets\"',\n\t\t}),\n\t);\n\tswitch (theme.type) {\n\t\tcase 'preset': {\n\t\t\tnodes.push(\n\t\t\t\tatRule({\n\t\t\t\t\tname: 'import',\n\t\t\t\t\tparams: `\"@skeletonlabs/skeleton/themes/${theme.value}\"`,\n\t\t\t\t}),\n\t\t\t);\n\t\t\tbreak;\n\t\t}\n\t\tcase 'custom': {\n\t\t\tnodes.push(comment({ text: `Add your theme import for your theme: \"${theme.value}\" here` }));\n\t\t\tbreak;\n\t\t}\n\t}\n\tconst tailwindImport = getTailwindImport(root);\n\tif (tailwindImport) {\n\t\troot.insertAfter(tailwindImport, nodes);\n\t} else {\n\t\troot.prepend(nodes);\n\t}\n\treturn {\n\t\tcode: root.toString(),\n\t};\n}\n\nexport { transformAppCss };\n","import type { Theme } from './types';\n\nconst THEME_MAPPINGS: Record<string, Theme> = {\n\tskeleton: { type: 'preset', value: 'legacy' },\n\t'gold-nouveau': { type: 'preset', value: 'nouveau' },\n\twintry: { type: 'preset', value: 'wintry' },\n\tmodern: { type: 'preset', value: 'modern' },\n\trocket: { type: 'preset', value: 'rocket' },\n\tseafoam: { type: 'preset', value: 'seafoam' },\n\tvintage: { type: 'preset', value: 'vintage' },\n\tsahara: { type: 'preset', value: 'sahara' },\n\thamlindigo: { type: 'preset', value: 'hamlindigo' },\n\tcrimson: { type: 'preset', value: 'crimson' },\n};\n\nexport { THEME_MAPPINGS };\n","import { THEME_MAPPINGS } from '../utility/theme-mappings';\nimport { parse } from 'node-html-parser';\n\nfunction transformAppHtml(code: string) {\n\tconst parsed = parse(code);\n\tconst html = parsed.querySelector('html');\n\tconst body = parsed.querySelector('body');\n\tif (!(html && body)) {\n\t\treturn {\n\t\t\tcode: code,\n\t\t\tmeta: {\n\t\t\t\ttheme: undefined,\n\t\t\t},\n\t\t};\n\t}\n\tconst theme = body.getAttribute('data-theme');\n\tif (!theme) {\n\t\treturn {\n\t\t\tcode: code,\n\t\t\tmeta: {\n\t\t\t\ttheme: undefined,\n\t\t\t},\n\t\t};\n\t}\n\tlet type: 'preset' | 'custom';\n\tbody.removeAttribute('data-theme');\n\tif (Object.hasOwn(THEME_MAPPINGS, theme)) {\n\t\thtml.setAttribute('data-theme', THEME_MAPPINGS[theme]!.value);\n\t\ttype = 'preset';\n\t} else {\n\t\thtml.setAttribute('data-theme', theme);\n\t\ttype = 'custom';\n\t}\n\treturn {\n\t\tcode: parsed.toString(),\n\t\tmeta: {\n\t\t\ttheme: {\n\t\t\t\tvalue: theme,\n\t\t\t\ttype: type,\n\t\t\t},\n\t\t},\n\t};\n}\n\nexport { transformAppHtml };\n","import type { SourceFile } from 'ts-morph';\n\nfunction addNamedImport(file: SourceFile, specifier: string, name: string) {\n\tconst existingImportDeclaration = file.getImportDeclaration((importDeclaration) => {\n\t\tconst moduleSpecifier = importDeclaration.getModuleSpecifier().getLiteralText();\n\t\treturn moduleSpecifier === specifier;\n\t});\n\tif (existingImportDeclaration) {\n\t\tif (!existingImportDeclaration.getNamedImports().some((namedImport) => namedImport.getName() === name)) {\n\t\t\texistingImportDeclaration.addNamedImport(name);\n\t\t}\n\t} else {\n\t\tfile.addImportDeclaration({\n\t\t\tmoduleSpecifier: specifier,\n\t\t\tnamedImports: [name],\n\t\t});\n\t}\n}\n\nexport { addNamedImport };\n","import { nanoid } from 'nanoid';\nimport { Project } from 'ts-morph';\n\nconst project = new Project({\n\tuseInMemoryFileSystem: true,\n\tskipAddingFilesFromTsConfig: true,\n\tskipFileDependencyResolution: true,\n\tskipLoadingLibFiles: true,\n});\n\nfunction parseSourceFile(code: string) {\n\treturn project.createSourceFile(`${nanoid()}.ts`, code);\n}\n\nexport { parseSourceFile };\n","interface Renamed {\n\ttype: 'renamed';\n\tvalue: string;\n}\n\ninterface Removed {\n\ttype: 'removed';\n}\n\nconst EXPORT_MAPPINGS: Record<\n\tstring,\n\t{\n\t\tnamedImport: Renamed | Removed;\n\t\tidentifier: Renamed | Removed;\n\t}\n> = {\n\tAccordionItem: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Accordion',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Accordion.Item',\n\t\t},\n\t},\n\tAppShell: {\n\t\tnamedImport: {\n\t\t\ttype: 'removed',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'removed',\n\t\t},\n\t},\n\tApollo: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tAppRailAnchor: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tAutocomplete: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tBlueNight: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tCodeBlock: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tConicGradient: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tDrawer: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tEmerald: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tGreenFall: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tLightSwitch: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tListBox: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tListBoxItem: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tModal: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tNoir: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tNoirLight: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tRecursiveTreeView: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tRecursiveTreeViewItem: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tRustic: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tStep: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tStepper: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tSummer84: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tTable: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tTableOfContents: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tTreeView: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tTreeViewItem: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tXPro: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tautoModeWatcher: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tclipboard: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tfilter: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tfocusTrap: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetDrawerStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetModalStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetModeAutoPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetModeOsPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetModeUserPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tgetToastStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tinitializeStores: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tlocalStorageStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tmodeCurrent: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tmodeOsPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tmodeUserPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tpopup: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tprefersReducedMotionStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tsetInitialClassState: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tsetModeCurrent: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tsetModeUserPrefers: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tstoreHighlightJs: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tstorePopup: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\ttableMapperValues: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\ttableSourceMapper: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\ttableSourceValues: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\ttocCrawler: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\ttocStore: {\n\t\tnamedImport: { type: 'removed' },\n\t\tidentifier: { type: 'removed' },\n\t},\n\tAppRail: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Navigation',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Navigation',\n\t\t},\n\t},\n\tAppRailTile: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Navigation',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Navigation.Tile',\n\t\t},\n\t},\n\tFileButton: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'FileUpload',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'FileUpload',\n\t\t},\n\t},\n\tFileDropzone: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'FileUpload',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'FileUpload',\n\t\t},\n\t},\n\tInputChip: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'TagsInput',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'TagsInput',\n\t\t},\n\t},\n\tPaginator: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Pagination',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Pagination',\n\t\t},\n\t},\n\tProgressBar: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Progress',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Progress',\n\t\t},\n\t},\n\tProgressRadial: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'ProgressRing',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'ProgressRing',\n\t\t},\n\t},\n\tRadioGroup: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Segment',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Segment',\n\t\t},\n\t},\n\tRadioItem: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Segment',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Segment.Item',\n\t\t},\n\t},\n\tRangeSlider: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Slider',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Slider',\n\t\t},\n\t},\n\tRatings: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Rating',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Rating',\n\t\t},\n\t},\n\tSlideToggle: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Switch',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Switch',\n\t\t},\n\t},\n\tTabAnchor: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Tabs',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Tabs.Control',\n\t\t},\n\t},\n\tTabGroup: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Tabs',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'Tabs',\n\t\t},\n\t},\n\tToast: {\n\t\tnamedImport: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'ToastProvider',\n\t\t},\n\t\tidentifier: {\n\t\t\ttype: 'renamed',\n\t\t\tvalue: 'ToastProvider',\n\t\t},\n\t},\n};\n\nexport { EXPORT_MAPPINGS };\n","import { addNamedImport } from '../../../../../utility/ts-morph/add-named-import';\nimport { parseSourceFile } from '../../../../../utility/ts-morph/parse-source-file';\nimport { EXPORT_MAPPINGS } from '../utility/export-mappings';\nimport { transformClasses } from './transform-classes';\nimport { Node } from 'ts-morph';\n\nfunction transformModule(code: string) {\n\tconst file = parseSourceFile(code);\n\tconst skeletonImports: string[] = [];\n\tfile.forEachDescendant((node) => {\n\t\tif (Node.isImportDeclaration(node)) {\n\t\t\tconst moduleSpecifier = node.getModuleSpecifier();\n\t\t\tif (moduleSpecifier.getLiteralText() === '@skeletonlabs/skeleton') {\n\t\t\t\tnode.setModuleSpecifier('@skeletonlabs/skeleton-svelte');\n\t\t\t}\n\t\t}\n\t\tif (\n\t\t\tNode.isImportSpecifier(node) &&\n\t\t\tnode.getImportDeclaration().getModuleSpecifier().getLiteralText() === '@skeletonlabs/skeleton-svelte'\n\t\t) {\n\t\t\tconst name = node.getName();\n\t\t\tif (Object.hasOwn(EXPORT_MAPPINGS, name)) {\n\t\t\t\tconst exportMapping = EXPORT_MAPPINGS[name];\n\t\t\t\tswitch (exportMapping?.namedImport.type) {\n\t\t\t\t\tcase 'renamed': {\n\t\t\t\t\t\tif (exportMapping.namedImport.value.match(/^[A-Za-z]+\\.[A-Za-z]+$/)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnode.remove();\n\t\t\t\t\t\taddNamedImport(file, '@skeletonlabs/skeleton-svelte', exportMapping.namedImport.value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 'removed': {\n\t\t\t\t\t\tconst parent = node.getImportDeclaration();\n\t\t\t\t\t\tif (parent.getNamedImports().length === 1 && !parent.getDefaultImport() && !parent.getNamespaceImport()) {\n\t\t\t\t\t\t\tparent.remove();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnode.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tskeletonImports.push(name);\n\t\t\t}\n\t\t}\n\t});\n\tfile.forEachDescendant((node) => {\n\t\tif (!node.wasForgotten() && Node.isIdentifier(node) && !Node.isImportSpecifier(node.getParent())) {\n\t\t\tconst name = node.getText();\n\t\t\tif (Object.hasOwn(EXPORT_MAPPINGS, name) && skeletonImports.includes(name)) {\n\t\t\t\tconst exportMapping = EXPORT_MAPPINGS[name];\n\t\t\t\tif (exportMapping?.identifier.type === 'renamed') {\n\t\t\t\t\tconst updated = exportMapping.identifier.value;\n\t\t\t\t\tif (updated !== node.getText()) {\n\t\t\t\t\t\tnode.replaceWithText(updated);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!node.wasForgotten() && Node.isStringLiteral(node) && !Node.isImportDeclaration(node.getParent())) {\n\t\t\tconst transformed = transformClasses(node.getText()).code;\n\t\t\tif (transformed !== node.getText()) {\n\t\t\t\tnode.replaceWithText(transformed);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn {\n\t\tcode: file.getFullText(),\n\t\tmeta: {\n\t\t\tskeletonImports: skeletonImports,\n\t\t},\n\t};\n}\n\nexport { transformModule };\n","function sortPropertiesAlphabetically(object: Record<string, string>) {\n\tconst orderedObject: Record<string, string> = {};\n\tconst sortedEntries = Object.entries(object).sort(([a], [b]) => a.localeCompare(b));\n\tfor (const [key, value] of sortedEntries) {\n\t\torderedObject[key] = value;\n\t}\n\treturn orderedObject;\n}\n\nexport { sortPropertiesAlphabetically };\n","import { sortPropertiesAlphabetically } from '../../../../../utility/sort-properties-alphabetically.js';\nimport detectIndent from 'detect-indent';\nimport { coerce, lt } from 'semver';\nimport type { PackageJson } from 'type-fest';\n\nfunction transformPackageJson(code: string, skeletonVersion: string, skeletonSvelteVersion: string) {\n\tlet isUsingComponents = false;\n\tconst pkg = JSON.parse(code) as PackageJson;\n\tfor (const field of ['dependencies', 'devDependencies'] as const) {\n\t\tif (!pkg[field]) {\n\t\t\tcontinue;\n\t\t}\n\t\tconst coerced = coerce(pkg[field]['@skeletonlabs/skeleton']);\n\t\tif (coerced && lt(coerced.version, '3.0.0')) {\n\t\t\tisUsingComponents = true;\n\t\t\tdelete pkg[field]['@skeletonlabs/skeleton'];\n\t\t\tpkg[field]['@skeletonlabs/skeleton-svelte'] = `^${skeletonSvelteVersion}`;\n\t\t}\n\t\tif (pkg[field]['@skeletonlabs/tw-plugin']) {\n\t\t\tdelete pkg[field]['@skeletonlabs/tw-plugin'];\n\t\t\tpkg[field]['@skeletonlabs/skeleton'] = `^${skeletonVersion}`;\n\t\t}\n\t\tpkg[field] = sortPropertiesAlphabetically(pkg[field] as Record<string, string>);\n\t}\n\treturn {\n\t\tcode: JSON.stringify(pkg, undefined, detectIndent(code).indent || '\\t'),\n\t\tmeta: {\n\t\t\tisUsingComponents: isUsingComponents,\n\t\t},\n\t};\n}\n\nexport { transformPackageJson };\n","import type { Node } from 'estree';\nimport type { AST } from 'svelte/compiler';\n\nfunction hasRange(node: Node | AST.SvelteNode): node is (Node | AST.SvelteNode) & { start: number; end: number } {\n\treturn 'start' in node && 'end' in node && typeof node.start === 'number' && typeof node.end === 'number';\n}\n\nexport { hasRange };\n","import type MagicString from 'magic-string';\nimport type { AST } from 'svelte/compiler';\n\nfunction renameComponent(s: MagicString, node: AST.Component, name: string) {\n\tconst adjustedStart = node.start + 1;\n\ts.update(adjustedStart, adjustedStart + node.name.length, name);\n\tconst componentString = s.original.slice(node.start, node.end);\n\tconst indexOfNonSelfClosingTag = componentString.lastIndexOf('</');\n\tif (indexOfNonSelfClosingTag === -1 || node.start + indexOfNonSelfClosingTag > node.end) {\n\t\treturn;\n\t}\n\ts.update(node.start + indexOfNonSelfClosingTag + 2, node.start + indexOfNonSelfClosingTag + 2 + node.name.length, name);\n}\n\nexport { renameComponent };\n","import { hasRange } from '../../../../../utility/svelte/has-range';\nimport { renameComponent } from '../../../../../utility/svelte/rename-component';\nimport { EXPORT_MAPPINGS } from '../utility/export-mappings';\nimport { transformClasses } from './transform-classes';\nimport { transformModule } from './transform-module';\nimport { transformStylesheet } from './transform-stylesheet';\nimport MagicString from 'magic-string';\nimport { parse } from 'svelte/compiler';\nimport type { AST } from 'svelte/compiler';\nimport { walk } from 'zimmerframe';\n\nfunction transformScript(s: MagicString, script: AST.Script | null) {\n\tif (\n\t\t!script ||\n\t\t!(\n\t\t\t'start' in script.content &&\n\t\t\ttypeof script.content.start === 'number' &&\n\t\t\t'end' in script.content &&\n\t\t\ttypeof script.content.end === 'number'\n\t\t)\n\t) {\n\t\treturn {\n\t\t\tmeta: {\n\t\t\t\tskeletonImports: [],\n\t\t\t},\n\t\t};\n\t}\n\tconst content = s.original.slice(script.content.start, script.content.end);\n\tconst transformed = transformModule(content);\n\ts.overwrite(script.content.start, script.content.end, transformed.code);\n\treturn {\n\t\tmeta: transformed.meta,\n\t};\n}\n\nfunction transformCss(s: MagicString, css: AST.CSS.StyleSheet | null) {\n\tif (!css) {\n\t\treturn;\n\t}\n\tconst transformed = transformStylesheet(s.original.slice(css.content.start, css.content.end));\n\ts.overwrite(css.content.start, css.content.end, transformed.code);\n}\n\nfunction transformFragment(s: MagicString, fragment: AST.Fragment, skeletonImports: string[]) {\n\twalk(\n\t\tfragment as AST.SvelteNode,\n\t\t{},\n\t\t{\n\t\t\tLiteral(node, ctx) {\n\t\t\t\tconst parent = ctx.path.at(-1);\n\t\t\t\tif (typeof node.raw === 'string' && node.raw !== '' && !(parent && parent.type === 'ImportDeclaration') && hasRange(node)) {\n\t\t\t\t\ts.update(node.start, node.end, transformClasses(node.raw).code);\n\t\t\t\t}\n\t\t\t\tctx.next();\n\t\t\t},\n\t\t\tText(node, ctx) {\n\t\t\t\tif (node.data !== '' && hasRange(node)) {\n\t\t\t\t\ts.update(node.start, node.end, transformClasses(node.data).code);\n\t\t\t\t}\n\t\t\t\tctx.next();\n\t\t\t},\n\t\t\tClassDirective(node, ctx) {\n\t\t\t\tif (\n\t\t\t\t\t!(node.expression.type === 'Identifier' && !('loc' in node.expression) && node.name === node.expression.name) &&\n\t\t\t\t\thasRange(node)\n\t\t\t\t) {\n\t\t\t\t\tconst adjustedStart = node.start + 'class:'.length;\n\t\t\t\t\ts.update(adjustedStart, adjustedStart + node.name.length, transformClasses(node.name).code);\n\t\t\t\t}\n\t\t\t\tctx.next();\n\t\t\t},\n\t\t\tComponent(node, ctx) {\n\t\t\t\tif (Object.hasOwn(EXPORT_MAPPINGS, node.name) && skeletonImports.includes(node.name)) {\n\t\t\t\t\tconst exportMapping = EXPORT_MAPPINGS[node.name];\n\t\t\t\t\tif (exportMapping?.identifier.type === 'renamed' && hasRange(node)) {\n\t\t\t\t\t\trenameComponent(s, node, exportMapping.identifier.value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tctx.next();\n\t\t\t},\n\t\t},\n\t);\n\treturn {\n\t\tcode: s.toString(),\n\t};\n}\n\nfunction transformSvelte(code: string) {\n\tconst s = new MagicString(code);\n\tconst root = parse(code, {\n\t\tmodern: true,\n\t});\n\tconst skeletonImports = [\n\t\t...transformScript(s, root.module).meta.skeletonImports,\n\t\t...transformScript(s, root.instance).meta.skeletonImports,\n\t];\n\ttransformFragment(s, root.fragment, skeletonImports);\n\ttransformCss(s, root.css);\n\treturn {\n\t\tcode: s.toString(),\n\t};\n}\n\nexport { transformSvelte };\n","import type { Theme } from './types';\n\nconst FALLBACK_THEME: Theme = {\n\ttype: 'preset',\n\tvalue: 'cerberus',\n};\n\nexport { FALLBACK_THEME };\n","import type { MigrateOptions } from '../..';\nimport { cli } from '../../../..';\nimport type { FileMigration } from '../../../../utility/file-migration';\nimport { installDependencies } from '../../../../utility/install-dependencies';\nimport { transformAppCss } from './transformers/transform-app.css';\nimport { transformAppHtml } from './transformers/transform-app.html';\nimport { transformModule } from './transformers/transform-module';\nimport { transformPackageJson } from './transformers/transform-package.json';\nimport { transformStylesheet } from './transformers/transform-stylesheet';\nimport { transformSvelte } from './transformers/transform-svelte';\nimport { FALLBACK_THEME } from './utility/constants';\nimport { THEME_MAPPINGS } from './utility/theme-mappings';\nimport type { Theme } from './utility/types';\nimport { isCancel, log, multiselect, spinner } from '@clack/prompts';\nimport getLatestVersion from 'latest-version';\nimport { readFile, writeFile } from 'node:fs/promises';\nimport { extname } from 'node:path';\nimport { glob } from 'tinyglobby';\n\nexport default async function (options: MigrateOptions) {\n\tconst cwd = options.cwd ?? process.cwd();\n\tconst migrations: FileMigration[] = [];\n\n\t// Find all required files\n\tconst packageJson = {\n\t\tname: 'package.json',\n\t\tpaths: await glob('package.json', { cwd }),\n\t};\n\tconst appHtml = {\n\t\tname: 'src/app.html',\n\t\tpaths: await glob('src/app.html', { cwd }),\n\t};\n\tconst appCss = {\n\t\tname: 'src/app.css',\n\t\tpaths: await glob('src/app.css', { cwd }),\n\t};\n\n\t// Validate file existence\n\tfor (const file of [packageJson, appHtml, appCss]) {\n\t\tif (file.paths.length === 0) {\n\t\t\tcli.error(`\"${file.name}\" not found in directory \"${cwd}\".`);\n\t\t}\n\t\tif (file.paths.length > 1) {\n\t\t\tcli.error(`Multiple \"${file.name}\" entries found in directory: \"${cwd}\", please ensure there is only one`);\n\t\t}\n\t}\n\n\t// Get source folders\n\tconst availableSourceFolders = await glob('*', {\n\t\tcwd: cwd,\n\t\tonlyDirectories: true,\n\t\tignore: ['node_modules'],\n\t});\n\tconst sourceFolders = await multiselect({\n\t\tmessage: 'What folders make use of Skeleton? (classes, imports, etc.)',\n\t\toptions: availableSourceFolders.map((folder) => ({ label: folder, value: folder })),\n\t\tinitialValues: availableSourceFolders,\n\t});\n\n\tif (isCancel(sourceFolders)) {\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t\treturn;\n\t}\n\n\t// Migrate package.json\n\tconst packageSpinner = spinner();\n\tpackageSpinner.start(`Migrating ${packageJson.name}...`);\n\ttry {\n\t\tconst packageJsonCode = await readFile(packageJson.paths.at(0)!, 'utf-8');\n\t\tconst skeletonVersion = await getLatestVersion('@skeletonlabs/skeleton', { version: '>=3.0.0-0 <4.0.0' });\n\t\tconst skeletonSvelteVersion = await getLatestVersion('@skeletonlabs/skeleton-svelte', { version: '>=1.0.0-0 <2.0.0' });\n\t\tconst transformedPackageJson = transformPackageJson(packageJsonCode, skeletonVersion, skeletonSvelteVersion);\n\t\tmigrations.push({ path: packageJson.paths.at(0)!, content: transformedPackageJson.code });\n\t\tpackageSpinner.stop(`Successfully migrated ${packageJson.name}!`);\n\t} catch (error) {\n\t\tpackageSpinner.stop(`Failed to migrate ${packageJson.name}: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t}\n\n\t// Migrate app.html\n\tlet theme: Theme | undefined;\n\tconst appHtmlSpinner = spinner();\n\tappHtmlSpinner.start(`Migrating ${appHtml.name}...`);\n\ttry {\n\t\tconst appHtmlCode = await readFile(appHtml.paths.at(0)!, 'utf-8');\n\t\tconst transformedAppHtml = transformAppHtml(appHtmlCode);\n\t\tif (transformedAppHtml.meta.theme && Object.hasOwn(THEME_MAPPINGS, transformedAppHtml.meta.theme.value)) {\n\t\t\ttheme = THEME_MAPPINGS[transformedAppHtml.meta.theme.value];\n\t\t} else if (transformedAppHtml.meta.theme) {\n\t\t\ttheme = transformedAppHtml.meta.theme;\n\t\t} else {\n\t\t\ttheme = FALLBACK_THEME;\n\t\t}\n\t\tmigrations.push({ path: appHtml.paths.at(0)!, content: transformedAppHtml.code });\n\t\tappHtmlSpinner.stop(`Successfully migrated ${appHtml.name}!`);\n\t} catch (error) {\n\t\tappHtmlSpinner.stop(`Failed to migrate ${appHtml.name}: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t}\n\n\t// Migrate app.css\n\tconst appCssSpinner = spinner();\n\tappCssSpinner.start(`Migrating ${appCss.name}...`);\n\ttry {\n\t\tconst appCssCode = await readFile(appCss.paths.at(0)!, 'utf-8');\n\t\tconst transformedAppCss = transformAppCss(appCssCode, theme ?? FALLBACK_THEME);\n\t\tmigrations.push({ path: appCss.paths.at(0)!, content: transformedAppCss.code });\n\t\tappCssSpinner.stop(`Successfully migrated ${appCss.name}!`);\n\t} catch (error) {\n\t\tappCssSpinner.stop(`Failed to migrate ${appCss.name}: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t}\n\n\t// Migrate source files\n\tif (sourceFolders.length > 0) {\n\t\tconst sourceFiles = await glob(\n\t\t\tsourceFolders.map((folder) => `${folder}**/*.{svelte,js,mjs,ts,mts,css,pcss,postcss}`),\n\t\t\t{\n\t\t\t\tcwd: cwd,\n\t\t\t\tignore: ['node_modules', 'src/app.css'],\n\t\t\t},\n\t\t);\n\t\tconst sourceFilesSpinner = spinner();\n\t\tsourceFilesSpinner.start(`Migrating source files...`);\n\t\tfor (const sourceFile of sourceFiles) {\n\t\t\tsourceFilesSpinner.message(`Migrating ${sourceFile}...`);\n\t\t\tconst extension = extname(sourceFile);\n\t\t\ttry {\n\t\t\t\tconst code = await readFile(sourceFile, 'utf-8');\n\t\t\t\tswitch (extension) {\n\t\t\t\t\tcase '.svelte': {\n\t\t\t\t\t\tconst transformedSvelte = transformSvelte(code);\n\t\t\t\t\t\tmigrations.push({ path: sourceFile, content: transformedSvelte.code });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase '.js':\n\t\t\t\t\tcase '.mjs':\n\t\t\t\t\tcase '.ts':\n\t\t\t\t\tcase '.mts': {\n\t\t\t\t\t\tconst transformedModule = transformModule(code);\n\t\t\t\t\t\tmigrations.push({ path: sourceFile, content: transformedModule.code });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase '.css':\n\t\t\t\t\tcase '.pcss':\n\t\t\t\t\tcase '.postcss': {\n\t\t\t\t\t\tconst transformedStyleSheet = transformStylesheet(code);\n\t\t\t\t\t\tmigrations.push({ path: sourceFile, content: transformedStyleSheet.code });\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsourceFilesSpinner.message(`Successfully migrated ${sourceFile}!`);\n\t\t\t} catch (error) {\n\t\t\t\tsourceFilesSpinner.stop(`Failed to migrate ${sourceFile}: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\t\t\tcli.error('Migration canceled, nothing written to disk');\n\t\t\t}\n\t\t}\n\t\tsourceFilesSpinner.stop(`Successfully migrated ${sourceFiles.length} source files!`);\n\t}\n\n\t// Write all migrations to disk\n\tconst writeSpinner = spinner();\n\twriteSpinner.start('Applying all migrations...');\n\ttry {\n\t\tawait Promise.all(migrations.map(({ path, content }) => writeFile(path, content)));\n\t\twriteSpinner.stop('Successfully applied all migrations!');\n\t} catch (error) {\n\t\twriteSpinner.stop(`Failed to apply migrations: ${error instanceof Error ? error.message.replace('\\n', ' ') : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled');\n\t}\n\n\t// Install dependencies\n\tconst installDependenciesSpinner = spinner();\n\tinstallDependenciesSpinner.start('Installing dependencies...');\n\ttry {\n\t\tawait installDependencies(cwd);\n\t\tinstallDependenciesSpinner.stop('Successfully installed dependencies!');\n\t} catch (error) {\n\t\tinstallDependenciesSpinner.stop(`Failed to install dependencies: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled');\n\t\treturn;\n\t}\n\n\tlog.info('Migration complete! Visit https://skeleton.dev for more information.');\n}\n","export const IDENTIFIER_MAPPINGS: Record<string, string> = {\n\tModal: 'Dialog',\n\t'Navigation.Bar': 'Navigation',\n\t'Navigation.Rail': 'Navigation',\n\tProgressRing: 'Progress',\n\tRatings: 'RatingGroup',\n\tSegment: 'SegmentedControl',\n\tToaster: 'Toast.Group',\n};\n","export const IMPORT_MAPPINGS: Record<string, string> = {\n\tModal: 'Dialog',\n\tNavigation: 'Navigation',\n\tProgressRing: 'Progress',\n\tRatings: 'RatingGroup',\n\tSegment: 'SegmentedControl',\n\tToaster: 'Toast',\n};\n","import { parseSourceFile } from '../../../../../utility/ts-morph/parse-source-file';\nimport { IDENTIFIER_MAPPINGS } from '../utility/identifier-mappings';\nimport { IMPORT_MAPPINGS } from '../utility/import-mappings';\nimport { Node } from 'ts-morph';\n\nfunction transformModule(code: string) {\n\tconst file = parseSourceFile(code);\n\tconst skeletonImports: string[] = [];\n\n\tfile.forEachDescendant((node) => {\n\t\tif (\n\t\t\tNode.isImportSpecifier(node) &&\n\t\t\t['@skeletonlabs/skeleton-svelte', '@skeletonlabs/skeleton-react'].includes(\n\t\t\t\tnode.getImportDeclaration().getModuleSpecifier().getLiteralText(),\n\t\t\t)\n\t\t) {\n\t\t\tconst name = node.getName();\n\t\t\tconst newName = IMPORT_MAPPINGS[name];\n\t\t\tif (newName) {\n\t\t\t\tskeletonImports.push(name);\n\t\t\t\tnode.setName(newName);\n\t\t\t}\n\t\t}\n\t});\n\n\tfile.forEachDescendant((node) => {\n\t\tif (Node.isPropertyAccessExpression(node)) {\n\t\t\tconst fullName = `${node.getExpression().getText()}.${node.getName()}`;\n\t\t\tconst newName = IDENTIFIER_MAPPINGS[fullName];\n\t\t\tif (newName) {\n\t\t\t\tnode.replaceWithText(newName);\n\t\t\t}\n\t\t} else if (Node.isIdentifier(node) && !Node.isImportSpecifier(node.getParent())) {\n\t\t\tconst newName = IDENTIFIER_MAPPINGS[node.getText()];\n\t\t\tif (newName) {\n\t\t\t\tnode.replaceWithText(newName);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn {\n\t\tcode: file.getFullText(),\n\t\tmeta: {\n\t\t\tskeletonImports: skeletonImports,\n\t\t},\n\t};\n}\n\nexport { transformModule };\n","import { sortPropertiesAlphabetically } from '../../../../../utility/sort-properties-alphabetically.js';\nimport detectIndent from 'detect-indent';\nimport { coerce, lt } from 'semver';\nimport type { PackageJson } from 'type-fest';\n\nfunction transformPackageJson(code: string) {\n\tconst pkg = JSON.parse(code) as PackageJson;\n\tfor (const field of ['dependencies', 'devDependencies'] as const) {\n\t\tif (!pkg[field]) {\n\t\t\tcontinue;\n\t\t}\n\t\tfor (const dep of ['@skeletonlabs/skeleton', '@skeletonlabs/skeleton-svelte', '@skeletonlabs/skeleton-react']) {\n\t\t\tif (!pkg[field][dep]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst coerced = coerce(pkg[field][dep]);\n\t\t\tif (coerced && lt(coerced.version, '4.0.0')) {\n\t\t\t\tdelete pkg[field][dep];\n\t\t\t\tpkg[field][dep] = 'next';\n\t\t\t}\n\t\t}\n\t\tpkg[field] = sortPropertiesAlphabetically(pkg[field] as Record<string, string>);\n\t}\n\treturn {\n\t\tcode: JSON.stringify(pkg, undefined, detectIndent(code).indent || '\\t'),\n\t};\n}\n\nexport { transformPackageJson };\n","import { AtRule, parse } from 'postcss';\n\nexport function transformStylesheet(content: string) {\n\tconst ast = parse(content);\n\n\tast.walkAtRules((atRule) => {\n\t\tif (atRule.name === 'import' && atRule.params.includes('@skeletonlabs/skeleton/optional/presets')) {\n\t\t\tatRule.remove();\n\t\t}\n\t\tif (atRule.name === 'source') {\n\t\t\tif (atRule.params.includes('@skeletonlabs/skeleton-svelte')) {\n\t\t\t\tatRule.replaceWith(\n\t\t\t\t\tnew AtRule({\n\t\t\t\t\t\tname: 'import',\n\t\t\t\t\t\tparams: `'@skeletonlabs/skeleton-svelte'`,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (atRule.params.includes('@skeletonlabs/skeleton-react')) {\n\t\t\t\tatRule.replaceWith(\n\t\t\t\t\tnew AtRule({\n\t\t\t\t\t\tname: 'import',\n\t\t\t\t\t\tparams: `'@skeletonlabs/skeleton-react'`,\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t});\n\n\treturn {\n\t\tcode: ast.toString(),\n\t};\n}\n","import { hasRange } from '../../../../../utility/svelte/has-range';\nimport { renameComponent } from '../../../../../utility/svelte/rename-component';\nimport { IDENTIFIER_MAPPINGS } from '../utility/identifier-mappings';\nimport { transformModule } from './transform-module';\nimport { transformStylesheet } from './transform-stylesheet';\nimport MagicString from 'magic-string';\nimport { parse } from 'svelte/compiler';\nimport type { AST } from 'svelte/compiler';\nimport { walk } from 'zimmerframe';\n\nfunction transformScript(s: MagicString, script: AST.Script | null) {\n\tif (\n\t\t!script ||\n\t\t!(\n\t\t\t'start' in script.content &&\n\t\t\ttypeof script.content.start === 'number' &&\n\t\t\t'end' in script.content &&\n\t\t\ttypeof script.content.end === 'number'\n\t\t)\n\t) {\n\t\treturn {\n\t\t\tmeta: {\n\t\t\t\tskeletonImports: [],\n\t\t\t},\n\t\t};\n\t}\n\tconst content = s.original.slice(script.content.start, script.content.end);\n\tconst transformed = transformModule(content);\n\ts.overwrite(script.content.start, script.content.end, transformed.code);\n\treturn transformed;\n}\n\nfunction transformCss(s: MagicString, css: AST.CSS.StyleSheet | null) {\n\tif (!css) {\n\t\treturn;\n\t}\n\tconst transformed = transformStylesheet(s.original.slice(css.content.start, css.content.end));\n\ts.overwrite(css.content.start, css.content.end, transformed.code);\n}\n\nfunction transformFragment(s: MagicString, fragment: AST.Fragment, skeletonImports: string[]) {\n\twalk(\n\t\tfragment as AST.SvelteNode,\n\t\t{},\n\t\t{\n\t\t\tComponent(node, ctx) {\n\t\t\t\tconst newName = IDENTIFIER_MAPPINGS[node.name];\n\t\t\t\tif (newName && hasRange(node) && skeletonImports.includes(node.name.split('.').at(0) || '')) {\n\t\t\t\t\trenameComponent(s, node, newName);\n\t\t\t\t}\n\t\t\t\tctx.next();\n\t\t\t},\n\t\t},\n\t);\n}\n\nfunction transformSvelte(code: string) {\n\tconst s = new MagicString(code);\n\tconst root = parse(code, {\n\t\tmodern: true,\n\t});\n\tconst skeletonImports = [\n\t\t...transformScript(s, root.module).meta.skeletonImports,\n\t\t...transformScript(s, root.instance).meta.skeletonImports,\n\t];\n\ttransformFragment(s, root.fragment, skeletonImports);\n\ttransformCss(s, root.css);\n\treturn {\n\t\tcode: s.toString(),\n\t};\n}\n\nexport { transformSvelte };\n","import type { MigrateOptions } from '../..';\nimport { cli } from '../../../..';\nimport type { FileMigration } from '../../../../utility/file-migration';\nimport { installDependencies } from '../../../../utility/install-dependencies';\nimport { transformModule } from './transformers/transform-module';\nimport { transformPackageJson } from './transformers/transform-package.json';\nimport { transformStylesheet } from './transformers/transform-stylesheet';\nimport { transformSvelte } from './transformers/transform-svelte';\nimport { isCancel, log, multiselect, spinner } from '@clack/prompts';\nimport { readFile, writeFile } from 'fs/promises';\nimport { extname } from 'path';\nimport { glob } from 'tinyglobby';\n\nexport default async function (options: MigrateOptions) {\n\tconst cwd = options.cwd ?? process.cwd();\n\tconst migrations: FileMigration[] = [];\n\n\t// Find all required files\n\tconst packageJson = {\n\t\tname: 'package.json',\n\t\tpaths: await glob('package.json', { cwd }),\n\t};\n\n\t// Validate file existence\n\tfor (const file of [packageJson]) {\n\t\tif (file.paths.length === 0) {\n\t\t\tcli.error(`\"${file.name}\" not found in directory \"${cwd}\".`);\n\t\t}\n\t\tif (file.paths.length > 1) {\n\t\t\tcli.error(`Multiple \"${file.name}\" entries found in directory: \"${cwd}\", please ensure there is only one`);\n\t\t}\n\t}\n\n\tconst availableSourceFolders = await glob('*', {\n\t\tcwd: cwd,\n\t\tonlyDirectories: true,\n\t\tignore: ['node_modules'],\n\t});\n\tconst sourceFolders = await multiselect({\n\t\tmessage: 'What folders make use of Skeleton? (classes, imports, etc.)',\n\t\toptions: availableSourceFolders.map((folder) => ({ label: folder, value: folder })),\n\t\tinitialValues: availableSourceFolders,\n\t});\n\n\tif (isCancel(sourceFolders)) {\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t\treturn;\n\t}\n\n\t// Migrate package.json\n\tconst packageSpinner = spinner();\n\tpackageSpinner.start(`Migrating ${packageJson.name}...`);\n\ttry {\n\t\tconst packageJsonCode = await readFile(packageJson.paths.at(0)!, 'utf-8');\n\t\tconst transformedPackageJson = transformPackageJson(packageJsonCode);\n\t\tmigrations.push({\n\t\t\tpath: packageJson.paths.at(0)!,\n\t\t\tcontent: transformedPackageJson.code,\n\t\t});\n\t\tpackageSpinner.stop(`Successfully migrated ${packageJson.name}!`);\n\t} catch (error) {\n\t\tpackageSpinner.stop(`Failed to migrate ${packageJson.name}: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled, nothing written to disk');\n\t}\n\n\t// Migrate source files\n\tconst sourceFiles = await glob(\n\t\tsourceFolders.map((folder) => `${folder}**/*.{svelte,js,mjs,ts,mts,css,pcss,postcss}`),\n\t\t{\n\t\t\tcwd: cwd,\n\t\t\tignore: ['node_modules'],\n\t\t},\n\t);\n\tconst sourceFilesSpinner = spinner();\n\tsourceFilesSpinner.start(`Migrating source files...`);\n\tfor (const path of sourceFiles) {\n\t\tconst content = await readFile(path, 'utf-8');\n\t\tswitch (extname(path)) {\n\t\t\tcase '.svelte':\n\t\t\t\tconst transformedSvelte = transformSvelte(content);\n\t\t\t\tmigrations.push({\n\t\t\t\t\tpath: path,\n\t\t\t\t\tcontent: transformedSvelte.code,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase '.css':\n\t\t\tcase '.pcss':\n\t\t\tcase '.postcss':\n\t\t\t\tconst transformedStylesheet = transformStylesheet(content);\n\t\t\t\tmigrations.push({\n\t\t\t\t\tpath: path,\n\t\t\t\t\tcontent: transformedStylesheet.code,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\tcase '.js':\n\t\t\tcase '.mjs':\n\t\t\tcase '.cjs':\n\t\t\tcase '.ts':\n\t\t\tcase '.mts':\n\t\t\tcase '.jsx':\n\t\t\tcase '.tsx':\n\t\t\t\tconst transformedModule = transformModule(content);\n\t\t\t\tmigrations.push({\n\t\t\t\t\tpath: path,\n\t\t\t\t\tcontent: transformedModule.code,\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t}\n\t\tsourceFilesSpinner.message(`Migrated source file: ${path}!`);\n\t}\n\tsourceFilesSpinner.stop(`Successfully migrated ${sourceFiles.length} source files!`);\n\n\t// Write all migrations to disk\n\tconst writeSpinner = spinner();\n\twriteSpinner.start('Applying all migrations...');\n\ttry {\n\t\tawait Promise.all(migrations.map(({ path, content }) => writeFile(path, content)));\n\t\twriteSpinner.stop('Successfully applied all migrations!');\n\t} catch (error) {\n\t\twriteSpinner.stop(`Failed to apply migrations: ${error instanceof Error ? error.message.replace('\\n', ' ') : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled');\n\t}\n\n\t// Install dependencies\n\tconst installDependenciesSpinner = spinner();\n\tinstallDependenciesSpinner.start('Installing dependencies...');\n\ttry {\n\t\tawait installDependencies(cwd);\n\t\tinstallDependenciesSpinner.stop('Successfully installed dependencies!');\n\t} catch (error) {\n\t\tinstallDependenciesSpinner.stop(`Failed to install dependencies: ${error instanceof Error ? error.message : 'Unknown error'}`, 1);\n\t\tcli.error('Migration canceled');\n\t\treturn;\n\t}\n\n\tlog.info('Migration complete! Visit https://skeleton.dev for more information.');\n}\n","import skeleton3 from './migrations/skeleton-3';\nimport skeleton4 from './migrations/skeleton-4';\nimport { Argument, Command, Option } from 'commander';\n\ninterface MigrateOptions {\n\tcwd?: string;\n}\nconst MIGRATIONS = {\n\t'skeleton-3': skeleton3,\n\t'skeleton-4': skeleton4,\n} as const;\n\nconst migrate = new Command('migrate')\n\t.description('Run a migration')\n\t.addArgument(new Argument('<migration>', 'The migration to run').choices(Object.keys(MIGRATIONS)))\n\t.addOption(new Option('--cwd <cwd>', 'The directory to run the migration in'))\n\t.action((migration: keyof typeof MIGRATIONS, options: MigrateOptions) => MIGRATIONS[migration](options));\n\nexport type { MigrateOptions };\nexport { migrate };\n","import { readFile } from 'node:fs/promises';\nimport { dirname, join } from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport type { PackageJson } from 'type-fest';\n\nasync function getOurPackageJson(): Promise<Required<PackageJson>> {\n\tconst packageJsonPath = join(dirname(fileURLToPath(import.meta.url)), '../package.json');\n\tconst content = await readFile(packageJsonPath, 'utf-8');\n\treturn JSON.parse(content);\n}\n\nexport { getOurPackageJson };\n","#!/usr/bin/env node\nimport { migrate } from './commands/migrate';\nimport { getOurPackageJson } from './utility/get-our-package-json';\nimport { intro, log, outro } from '@clack/prompts';\nimport { bgBlueBright, bgGreenBright, black, dim, red } from 'colorette';\nimport { Command } from 'commander';\n\nconst pkg = await getOurPackageJson();\n\nconst cli = new Command()\n\t.name(pkg.name)\n\t.description(pkg.description)\n\t.version(pkg.version)\n\t.addCommand(migrate)\n\t.copyInheritedSettings(migrate)\n\t.configureOutput({\n\t\twriteOut: log.info,\n\t\twriteErr(str) {\n\t\t\toutro(red(str.replace('\\n', ' ')));\n\t\t\tprocess.exit(1);\n\t\t},\n\t})\n\t.hook('preAction', (_, ctx) => {\n\t\tconst args = ctx.args.join(' ');\n\t\tlog.message(dim(`Running \"${`${ctx.name()}${args ? ` ${args}` : ''}`}\"...`));\n\t});\n\nasync function main() {\n\tintro(bgBlueBright(black(' Welcome to the Skeleton CLI 💀 ')));\n\tif (process.argv.length === 2) {\n\t\tcli.error('error: no command provided');\n\t}\n\tawait cli.parseAsync(process.argv);\n\toutro(bgGreenBright(black(' All Done! ')));\n}\n\nawait main();\n\nexport { cli };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,OAAO,UAAU,cAAc,KAAK;AAE1C,eAAe,oBAAoB,MAAM,QAAQ,KAAK,EAAE;CACvD,MAAM,KAAK,MAAM,OAAO,EAClB,KACL,CAAC;CACF,MAAM,kBAAkB,eAAe,IAAI,SAAS,OAAO,WAAW,EAAE,CAAC;AACzE,KAAI,CAAC,gBACJ,OAAM,IAAI,MAAM,6CAA6C;AAE9D,QAAO,KAAK,GAAG,gBAAgB,QAAQ,GAAG,gBAAgB,KAAK,KAAK,IAAI,IAAI,EACtE,KACL,CAAC;;;;;AChBH,MAAM,wBAAwB;CAC7B;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,qBAAqB;CAC1B;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,wBAAwB;CAC7B;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,sBAAsB;CAC3B;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,eAAe;CACpB;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;AAED,MAAM,4BAA4B,CACjC;CACC,MAAM;CACN,SAAS;CACT,EACD;CACC,MAAM;CACN,SAAS;CACT,CACD;AAED,MAAM,iBAAiB;CACtB;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,SAAS;EACT;CACD;EACC,MAAM;EACN,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,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,aAAa;EACZ,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,YAAY;EACX,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,cAAc;EACb,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,WAAW;EACV,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,WAAW;EACV,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,aAAa;EACZ,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,gBAAgB;EACf,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,YAAY;EACX,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,WAAW;EACV,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,aAAa;EACZ,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,SAAS;EACR,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,aAAa;EACZ,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;GACX,MAAM;GACN,OAAO;GACP;EACD;CACD,WAAW;EACV,aAAa;GACZ,MAAM;GACN,OAAO;GACP;EACD,YAAY;G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