@squadbase/vantage-template 0.1.1 → 0.2.0-dev1.20f95fa
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/README.md +19 -9
- package/base-template/.squadbase/skills/vantage-add-feature/SKILL.md +14 -7
- package/base-template/.squadbase/skills/vantage-app/SKILL.md +4 -0
- package/base-template/.squadbase/skills/vantage-design/SKILL.md +62 -52
- package/base-template/.squadbase/skills/vantage-design/references/extract.md +26 -27
- package/base-template/.squadbase/skills/vantage-design/references/format.md +12 -172
- package/base-template/.squadbase/skills/vantage-design/references/presets.md +50 -110
- package/base-template/.squadbase/skills/vantage-pitfalls/SKILL.md +50 -1
- package/base-template/.squadbase/skills/vantage-slide/SKILL.md +299 -0
- package/base-template/.squadbase/skills/vantage-slide/references/morph.md +102 -0
- package/base-template/.squadbase/skills/vantage-slide/references/steps.md +57 -0
- package/base-template/.squadbase/skills/vantage-slide/references/tokens.md +87 -0
- package/base-template/.squadbase/skills/vantage-slide/references/transitions.md +196 -0
- package/base-template/AGENTS.md +224 -17
- package/base-template/agents/api.md +36 -0
- package/base-template/agents/csv.md +2 -1
- package/base-template/agents/doc.md +52 -3
- package/base-template/agents/page.md +91 -10
- package/base-template/agents/slide.md +90 -4
- package/base-template/agents/xlsx.md +2 -1
- package/base-template/bun.lock +917 -0
- package/base-template/bunfig.toml +5 -0
- package/base-template/package.json +6 -6
- package/base-template/squadbase.yml +1 -0
- package/base-template/src/_layout.tsx +16 -7
- package/base-template/src/components/build-recovery.tsx +37 -1
- package/base-template/src/components/user-card.tsx +11 -11
- package/base-template/src/index.tsx +8 -3
- package/base-template/src/styles.css +108 -12
- package/dist/index.js +971 -6
- package/package.json +20 -17
- package/ui-templates/CLAUDE.md +2 -0
- package/ui-templates/kpi-chart-simple/pages/index.tsx +48 -48
- package/ui-templates/kpi-chart-simple-ja/pages/index.tsx +48 -48
- package/base-template/DESIGN.md +0 -108
- package/base-template/package-lock.json +0 -5841
package/dist/index.js
CHANGED
|
@@ -1022,27 +1022,36 @@ function initProject(options) {
|
|
|
1022
1022
|
applyChartPreset(targetDir, options.chart);
|
|
1023
1023
|
log("cyan", ` chart preset: ${options.chart}`);
|
|
1024
1024
|
}
|
|
1025
|
+
const packageManager = isBunAvailable() ? "bun" : "npm";
|
|
1025
1026
|
if (options.skipInstall) {
|
|
1026
1027
|
log("green", "\nProject initialized successfully!");
|
|
1027
1028
|
log("dim", "\nNext steps:");
|
|
1028
|
-
log("dim",
|
|
1029
|
-
log("dim",
|
|
1029
|
+
log("dim", ` ${packageManager} install`);
|
|
1030
|
+
log("dim", ` ${packageManager} run dev`);
|
|
1030
1031
|
return;
|
|
1031
1032
|
}
|
|
1032
|
-
log("green",
|
|
1033
|
-
|
|
1033
|
+
log("green", `
|
|
1034
|
+
Installing dependencies with ${packageManager}...`);
|
|
1035
|
+
const install = spawnSync(packageManager, ["install"], {
|
|
1034
1036
|
cwd: targetDir,
|
|
1035
1037
|
stdio: "inherit",
|
|
1036
1038
|
shell: process.platform === "win32"
|
|
1037
1039
|
});
|
|
1038
1040
|
if (install.error || install.status !== 0) {
|
|
1039
1041
|
log("red", "\nDependency installation failed.");
|
|
1040
|
-
log("yellow",
|
|
1042
|
+
log("yellow", `Run '${packageManager} install' manually in the project directory.`);
|
|
1041
1043
|
process.exit(1);
|
|
1042
1044
|
}
|
|
1043
1045
|
log("green", "\nProject initialized successfully!");
|
|
1044
1046
|
log("dim", "\nNext steps:");
|
|
1045
|
-
log("dim",
|
|
1047
|
+
log("dim", ` ${packageManager} run dev`);
|
|
1048
|
+
}
|
|
1049
|
+
function isBunAvailable() {
|
|
1050
|
+
const probe = spawnSync("bun", ["--version"], {
|
|
1051
|
+
stdio: "ignore",
|
|
1052
|
+
shell: process.platform === "win32"
|
|
1053
|
+
});
|
|
1054
|
+
return !probe.error && probe.status === 0;
|
|
1046
1055
|
}
|
|
1047
1056
|
|
|
1048
1057
|
// src/commands/list.ts
|
|
@@ -1105,6 +1114,947 @@ function listTemplates(options = {}) {
|
|
|
1105
1114
|
}
|
|
1106
1115
|
}
|
|
1107
1116
|
|
|
1117
|
+
// src/commands/theme.ts
|
|
1118
|
+
import { existsSync as existsSync8, readFileSync as readFileSync6, writeFileSync as writeFileSync4 } from "fs";
|
|
1119
|
+
import { relative as relative3 } from "path";
|
|
1120
|
+
|
|
1121
|
+
// ../squadkit/theme-presets/build-css.ts
|
|
1122
|
+
var LIGHT_ONLY = /* @__PURE__ */ new Set(["radius", "font-sans"]);
|
|
1123
|
+
var KEY_RE = /^[a-z0-9-]+$/i;
|
|
1124
|
+
var UNSAFE_VALUE_RE = /[;{}<>]/;
|
|
1125
|
+
var declarations = (vars, mode) => Object.entries(vars ?? {}).flatMap(([rawKey, rawValue]) => {
|
|
1126
|
+
const key = rawKey.replace(/^--/, "");
|
|
1127
|
+
const value = typeof rawValue === "string" ? rawValue.trim() : "";
|
|
1128
|
+
if (!KEY_RE.test(key) || !value || UNSAFE_VALUE_RE.test(value) || mode === "dark" && LIGHT_ONLY.has(key)) {
|
|
1129
|
+
return [];
|
|
1130
|
+
}
|
|
1131
|
+
return [[key, value]];
|
|
1132
|
+
});
|
|
1133
|
+
var resolveVars = (mode, vars) => Object.fromEntries(declarations(vars[mode], mode));
|
|
1134
|
+
var prettyBlock = (selector, vars) => {
|
|
1135
|
+
const entries = Object.entries(vars);
|
|
1136
|
+
return entries.length ? `${selector} {
|
|
1137
|
+
${entries.map(([key, value]) => ` --${key}: ${value};`).join("\n")}
|
|
1138
|
+
}` : "";
|
|
1139
|
+
};
|
|
1140
|
+
var buildThemeCss = (cssVars) => [
|
|
1141
|
+
prettyBlock(":root", resolveVars("light", cssVars)),
|
|
1142
|
+
prettyBlock('.dark,\n[data-theme="dark"]', resolveVars("dark", cssVars))
|
|
1143
|
+
].filter(Boolean).join("\n\n");
|
|
1144
|
+
|
|
1145
|
+
// ../squadkit/theme-presets/data.generated.ts
|
|
1146
|
+
var THEME_PRESETS_DATA = [
|
|
1147
|
+
{
|
|
1148
|
+
"id": "neutral",
|
|
1149
|
+
"title": "Neutral",
|
|
1150
|
+
"description": "A preset that restores the default neutral theme. It has the same values as the base theme and is the starting point when switching presets.",
|
|
1151
|
+
"cssVars": {
|
|
1152
|
+
"light": {
|
|
1153
|
+
"radius": "0.5rem",
|
|
1154
|
+
"font-sans": '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, ui-sans-serif, system-ui, sans-serif',
|
|
1155
|
+
"background": "oklch(0.975 0.004 255)",
|
|
1156
|
+
"card": "oklch(1 0 0)",
|
|
1157
|
+
"popover": "oklch(1 0 0)",
|
|
1158
|
+
"secondary": "oklch(0.965 0.005 255)",
|
|
1159
|
+
"muted": "oklch(0.965 0.005 255)",
|
|
1160
|
+
"accent": "oklch(0.955 0.01 255)",
|
|
1161
|
+
"sidebar": "oklch(0.985 0.003 255)",
|
|
1162
|
+
"sidebar-accent": "oklch(0.955 0.01 255)",
|
|
1163
|
+
"border": "oklch(0.93 0.006 255)",
|
|
1164
|
+
"input": "oklch(0.9 0.01 255)",
|
|
1165
|
+
"sidebar-border": "oklch(0.915 0.008 255)",
|
|
1166
|
+
"foreground": "oklch(0.21 0.02 260)",
|
|
1167
|
+
"card-foreground": "oklch(0.21 0.02 260)",
|
|
1168
|
+
"popover-foreground": "oklch(0.21 0.02 260)",
|
|
1169
|
+
"secondary-foreground": "oklch(0.25 0.02 260)",
|
|
1170
|
+
"muted-foreground": "oklch(0.5 0.02 258)",
|
|
1171
|
+
"accent-foreground": "oklch(0.25 0.02 260)",
|
|
1172
|
+
"sidebar-foreground": "oklch(0.21 0.02 260)",
|
|
1173
|
+
"sidebar-accent-foreground": "oklch(0.25 0.02 260)",
|
|
1174
|
+
"primary": "oklch(0.55 0.2 262)",
|
|
1175
|
+
"primary-foreground": "oklch(0.985 0 0)",
|
|
1176
|
+
"ring": "oklch(0.7 0.12 262)",
|
|
1177
|
+
"sidebar-primary": "oklch(0.55 0.2 262)",
|
|
1178
|
+
"sidebar-primary-foreground": "oklch(0.985 0 0)",
|
|
1179
|
+
"sidebar-ring": "oklch(0.7 0.12 262)",
|
|
1180
|
+
"chart-1": "oklch(0.55 0.2 262)",
|
|
1181
|
+
"chart-2": "oklch(0.62 0.17 118)",
|
|
1182
|
+
"chart-3": "oklch(0.5 0.19 352)",
|
|
1183
|
+
"chart-4": "oklch(0.62 0.1 195)",
|
|
1184
|
+
"chart-5": "oklch(0.44 0.18 300)",
|
|
1185
|
+
"positive": "oklch(0.52 0.14 150)",
|
|
1186
|
+
"positive-subtle": "oklch(0.96 0.04 150)",
|
|
1187
|
+
"positive-fill": "oklch(0.62 0.15 150)",
|
|
1188
|
+
"negative": "oklch(0.53 0.19 25)",
|
|
1189
|
+
"negative-subtle": "oklch(0.96 0.03 25)",
|
|
1190
|
+
"negative-fill": "oklch(0.62 0.17 25)",
|
|
1191
|
+
"warning": "oklch(0.53 0.12 70)",
|
|
1192
|
+
"warning-subtle": "oklch(0.96 0.05 85)",
|
|
1193
|
+
"warning-fill": "oklch(0.79 0.16 82)",
|
|
1194
|
+
"info": "oklch(0.52 0.16 255)",
|
|
1195
|
+
"info-subtle": "oklch(0.96 0.03 250)",
|
|
1196
|
+
"info-fill": "oklch(0.62 0.15 250)",
|
|
1197
|
+
"neutral": "oklch(0.52 0 0)",
|
|
1198
|
+
"neutral-subtle": "oklch(0.96 0 0)",
|
|
1199
|
+
"neutral-fill": "oklch(0.62 0 0)",
|
|
1200
|
+
"destructive": "oklch(0.53 0.21 27.325)",
|
|
1201
|
+
"destructive-foreground": "oklch(0.985 0 0)"
|
|
1202
|
+
},
|
|
1203
|
+
"dark": {
|
|
1204
|
+
"background": "oklch(0.16 0.012 262)",
|
|
1205
|
+
"card": "oklch(0.215 0.015 262)",
|
|
1206
|
+
"popover": "oklch(0.235 0.016 262)",
|
|
1207
|
+
"secondary": "oklch(0.27 0.016 262)",
|
|
1208
|
+
"muted": "oklch(0.27 0.016 262)",
|
|
1209
|
+
"accent": "oklch(0.3 0.02 262)",
|
|
1210
|
+
"sidebar": "oklch(0.2 0.014 262)",
|
|
1211
|
+
"sidebar-accent": "oklch(0.3 0.02 262)",
|
|
1212
|
+
"border": "oklch(1 0 0 / 10%)",
|
|
1213
|
+
"input": "oklch(1 0 0 / 15%)",
|
|
1214
|
+
"sidebar-border": "oklch(1 0 0 / 10%)",
|
|
1215
|
+
"foreground": "oklch(0.96 0.005 255)",
|
|
1216
|
+
"card-foreground": "oklch(0.96 0.005 255)",
|
|
1217
|
+
"popover-foreground": "oklch(0.96 0.005 255)",
|
|
1218
|
+
"secondary-foreground": "oklch(0.96 0.005 255)",
|
|
1219
|
+
"muted-foreground": "oklch(0.72 0.02 258)",
|
|
1220
|
+
"accent-foreground": "oklch(0.96 0.005 255)",
|
|
1221
|
+
"sidebar-foreground": "oklch(0.96 0.005 255)",
|
|
1222
|
+
"sidebar-accent-foreground": "oklch(0.96 0.005 255)",
|
|
1223
|
+
"primary": "oklch(0.68 0.19 262)",
|
|
1224
|
+
"primary-foreground": "oklch(0.145 0.02 262)",
|
|
1225
|
+
"ring": "oklch(0.6 0.15 262)",
|
|
1226
|
+
"sidebar-primary": "oklch(0.68 0.19 262)",
|
|
1227
|
+
"sidebar-primary-foreground": "oklch(0.145 0.02 262)",
|
|
1228
|
+
"sidebar-ring": "oklch(0.6 0.15 262)",
|
|
1229
|
+
"chart-1": "oklch(0.56 0.19 262)",
|
|
1230
|
+
"chart-2": "oklch(0.75 0.17 118)",
|
|
1231
|
+
"chart-3": "oklch(0.64 0.19 352)",
|
|
1232
|
+
"chart-4": "oklch(0.78 0.105 195)",
|
|
1233
|
+
"chart-5": "oklch(0.71 0.17 300)",
|
|
1234
|
+
"positive": "oklch(0.76 0.15 150)",
|
|
1235
|
+
"positive-subtle": "oklch(0.27 0.05 150)",
|
|
1236
|
+
"positive-fill": "oklch(0.56 0.13 150)",
|
|
1237
|
+
"negative": "oklch(0.74 0.15 22)",
|
|
1238
|
+
"negative-subtle": "oklch(0.27 0.06 25)",
|
|
1239
|
+
"negative-fill": "oklch(0.56 0.15 22)",
|
|
1240
|
+
"warning": "oklch(0.8 0.14 80)",
|
|
1241
|
+
"warning-subtle": "oklch(0.27 0.05 75)",
|
|
1242
|
+
"warning-fill": "oklch(0.73 0.145 78)",
|
|
1243
|
+
"info": "oklch(0.75 0.12 250)",
|
|
1244
|
+
"info-subtle": "oklch(0.27 0.06 255)",
|
|
1245
|
+
"info-fill": "oklch(0.56 0.13 250)",
|
|
1246
|
+
"neutral": "oklch(0.85 0 0)",
|
|
1247
|
+
"neutral-subtle": "oklch(0.27 0 0)",
|
|
1248
|
+
"neutral-fill": "oklch(0.56 0 0)",
|
|
1249
|
+
"destructive": "oklch(0.704 0.191 22.216)",
|
|
1250
|
+
"destructive-foreground": "oklch(0.145 0.02 262)"
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
"id": "ocean",
|
|
1256
|
+
"title": "Ocean",
|
|
1257
|
+
"description": "A blue preset with a calm, trustworthy palette and slightly smaller, squarer corners than the default.",
|
|
1258
|
+
"cssVars": {
|
|
1259
|
+
"light": {
|
|
1260
|
+
"radius": "0.375rem",
|
|
1261
|
+
"font-sans": '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, ui-sans-serif, system-ui, sans-serif',
|
|
1262
|
+
"background": "oklch(0.975 0.004 245)",
|
|
1263
|
+
"card": "oklch(1 0 245)",
|
|
1264
|
+
"popover": "oklch(1 0 245)",
|
|
1265
|
+
"secondary": "oklch(0.965 0.005 245)",
|
|
1266
|
+
"muted": "oklch(0.965 0.005 245)",
|
|
1267
|
+
"accent": "oklch(0.955 0.01 245)",
|
|
1268
|
+
"sidebar": "oklch(0.985 0.003 245)",
|
|
1269
|
+
"sidebar-accent": "oklch(0.955 0.01 245)",
|
|
1270
|
+
"border": "oklch(0.93 0.006 245)",
|
|
1271
|
+
"input": "oklch(0.9 0.01 245)",
|
|
1272
|
+
"sidebar-border": "oklch(0.915 0.008 245)",
|
|
1273
|
+
"foreground": "oklch(0.21 0.02 245)",
|
|
1274
|
+
"card-foreground": "oklch(0.21 0.02 245)",
|
|
1275
|
+
"popover-foreground": "oklch(0.21 0.02 245)",
|
|
1276
|
+
"secondary-foreground": "oklch(0.25 0.02 245)",
|
|
1277
|
+
"muted-foreground": "oklch(0.5 0.02 245)",
|
|
1278
|
+
"accent-foreground": "oklch(0.25 0.02 245)",
|
|
1279
|
+
"sidebar-foreground": "oklch(0.21 0.02 245)",
|
|
1280
|
+
"sidebar-accent-foreground": "oklch(0.25 0.02 245)",
|
|
1281
|
+
"primary": "oklch(0.52 0.2 258)",
|
|
1282
|
+
"primary-foreground": "oklch(0.985 0 0)",
|
|
1283
|
+
"ring": "oklch(0.7 0.12 255)",
|
|
1284
|
+
"sidebar-primary": "oklch(0.52 0.2 258)",
|
|
1285
|
+
"sidebar-primary-foreground": "oklch(0.985 0 0)",
|
|
1286
|
+
"sidebar-ring": "oklch(0.7 0.12 255)",
|
|
1287
|
+
"chart-1": "oklch(0.52 0.2 258)",
|
|
1288
|
+
"chart-2": "oklch(0.7 0.12 200)",
|
|
1289
|
+
"chart-3": "oklch(0.6 0.23 300)",
|
|
1290
|
+
"chart-4": "oklch(0.63 0.24 335)",
|
|
1291
|
+
"chart-5": "oklch(0.76 0.2 135)",
|
|
1292
|
+
"positive": "oklch(0.52 0.14 155)",
|
|
1293
|
+
"positive-subtle": "oklch(0.96 0.04 155)",
|
|
1294
|
+
"positive-fill": "oklch(0.62 0.15 155)",
|
|
1295
|
+
"negative": "oklch(0.53 0.19 22)",
|
|
1296
|
+
"negative-subtle": "oklch(0.96 0.03 22)",
|
|
1297
|
+
"negative-fill": "oklch(0.62 0.17 22)",
|
|
1298
|
+
"warning": "oklch(0.53 0.12 75)",
|
|
1299
|
+
"warning-subtle": "oklch(0.96 0.05 90)",
|
|
1300
|
+
"warning-fill": "oklch(0.79 0.16 87)",
|
|
1301
|
+
"info": "oklch(0.52 0.16 245)",
|
|
1302
|
+
"info-subtle": "oklch(0.96 0.03 240)",
|
|
1303
|
+
"info-fill": "oklch(0.62 0.15 240)",
|
|
1304
|
+
"neutral": "oklch(0.52 0 0)",
|
|
1305
|
+
"neutral-subtle": "oklch(0.96 0 0)",
|
|
1306
|
+
"neutral-fill": "oklch(0.62 0 0)",
|
|
1307
|
+
"destructive": "oklch(0.53 0.19 22)",
|
|
1308
|
+
"destructive-foreground": "oklch(0.985 0 0)"
|
|
1309
|
+
},
|
|
1310
|
+
"dark": {
|
|
1311
|
+
"background": "oklch(0.16 0.012 245)",
|
|
1312
|
+
"card": "oklch(0.215 0.015 245)",
|
|
1313
|
+
"popover": "oklch(0.235 0.016 245)",
|
|
1314
|
+
"secondary": "oklch(0.27 0.016 245)",
|
|
1315
|
+
"muted": "oklch(0.27 0.016 245)",
|
|
1316
|
+
"accent": "oklch(0.3 0.02 245)",
|
|
1317
|
+
"sidebar": "oklch(0.2 0.014 245)",
|
|
1318
|
+
"sidebar-accent": "oklch(0.3 0.02 245)",
|
|
1319
|
+
"border": "oklch(1 0 0 / 10%)",
|
|
1320
|
+
"input": "oklch(1 0 0 / 15%)",
|
|
1321
|
+
"sidebar-border": "oklch(1 0 0 / 10%)",
|
|
1322
|
+
"foreground": "oklch(0.96 0.005 245)",
|
|
1323
|
+
"card-foreground": "oklch(0.96 0.005 245)",
|
|
1324
|
+
"popover-foreground": "oklch(0.96 0.005 245)",
|
|
1325
|
+
"secondary-foreground": "oklch(0.96 0.005 245)",
|
|
1326
|
+
"muted-foreground": "oklch(0.72 0.02 245)",
|
|
1327
|
+
"accent-foreground": "oklch(0.96 0.005 245)",
|
|
1328
|
+
"sidebar-foreground": "oklch(0.96 0.005 245)",
|
|
1329
|
+
"sidebar-accent-foreground": "oklch(0.96 0.005 245)",
|
|
1330
|
+
"primary": "oklch(0.72 0.14 250)",
|
|
1331
|
+
"primary-foreground": "oklch(0.145 0.03 255)",
|
|
1332
|
+
"ring": "oklch(0.55 0.14 255)",
|
|
1333
|
+
"sidebar-primary": "oklch(0.72 0.14 250)",
|
|
1334
|
+
"sidebar-primary-foreground": "oklch(0.145 0.03 255)",
|
|
1335
|
+
"sidebar-ring": "oklch(0.55 0.14 255)",
|
|
1336
|
+
"chart-1": "oklch(0.55 0.2 258)",
|
|
1337
|
+
"chart-2": "oklch(0.78 0.12 200)",
|
|
1338
|
+
"chart-3": "oklch(0.68 0.2 300)",
|
|
1339
|
+
"chart-4": "oklch(0.7 0.22 335)",
|
|
1340
|
+
"chart-5": "oklch(0.82 0.19 135)",
|
|
1341
|
+
"positive": "oklch(0.76 0.15 155)",
|
|
1342
|
+
"positive-subtle": "oklch(0.27 0.05 155)",
|
|
1343
|
+
"positive-fill": "oklch(0.56 0.13 155)",
|
|
1344
|
+
"negative": "oklch(0.74 0.15 19)",
|
|
1345
|
+
"negative-subtle": "oklch(0.27 0.06 22)",
|
|
1346
|
+
"negative-fill": "oklch(0.56 0.15 19)",
|
|
1347
|
+
"warning": "oklch(0.8 0.14 85)",
|
|
1348
|
+
"warning-subtle": "oklch(0.27 0.05 80)",
|
|
1349
|
+
"warning-fill": "oklch(0.73 0.145 83)",
|
|
1350
|
+
"info": "oklch(0.75 0.12 240)",
|
|
1351
|
+
"info-subtle": "oklch(0.27 0.06 245)",
|
|
1352
|
+
"info-fill": "oklch(0.56 0.13 240)",
|
|
1353
|
+
"neutral": "oklch(0.85 0 0)",
|
|
1354
|
+
"neutral-subtle": "oklch(0.27 0 0)",
|
|
1355
|
+
"neutral-fill": "oklch(0.56 0 0)",
|
|
1356
|
+
"destructive": "oklch(0.74 0.15 19)",
|
|
1357
|
+
"destructive-foreground": "oklch(0.145 0.03 255)"
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
"id": "forest",
|
|
1363
|
+
"title": "Forest",
|
|
1364
|
+
"description": "A green preset with slightly smaller corners. The font is a rounded sans-serif (ui-rounded in Safari, Hiragino Maru Gothic on macOS and iOS, the default font elsewhere).",
|
|
1365
|
+
"cssVars": {
|
|
1366
|
+
"light": {
|
|
1367
|
+
"radius": "0.5rem",
|
|
1368
|
+
"font-sans": 'ui-rounded, "Hiragino Maru Gothic ProN", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, ui-sans-serif, system-ui, sans-serif',
|
|
1369
|
+
"background": "oklch(0.975 0.004 175)",
|
|
1370
|
+
"card": "oklch(1 0 175)",
|
|
1371
|
+
"popover": "oklch(1 0 175)",
|
|
1372
|
+
"secondary": "oklch(0.965 0.005 175)",
|
|
1373
|
+
"muted": "oklch(0.965 0.005 175)",
|
|
1374
|
+
"accent": "oklch(0.955 0.01 175)",
|
|
1375
|
+
"sidebar": "oklch(0.985 0.003 175)",
|
|
1376
|
+
"sidebar-accent": "oklch(0.955 0.01 175)",
|
|
1377
|
+
"border": "oklch(0.93 0.006 175)",
|
|
1378
|
+
"input": "oklch(0.9 0.01 175)",
|
|
1379
|
+
"sidebar-border": "oklch(0.915 0.008 175)",
|
|
1380
|
+
"foreground": "oklch(0.21 0.02 175)",
|
|
1381
|
+
"card-foreground": "oklch(0.21 0.02 175)",
|
|
1382
|
+
"popover-foreground": "oklch(0.21 0.02 175)",
|
|
1383
|
+
"secondary-foreground": "oklch(0.25 0.02 175)",
|
|
1384
|
+
"muted-foreground": "oklch(0.5 0.02 175)",
|
|
1385
|
+
"accent-foreground": "oklch(0.25 0.02 175)",
|
|
1386
|
+
"sidebar-foreground": "oklch(0.21 0.02 175)",
|
|
1387
|
+
"sidebar-accent-foreground": "oklch(0.25 0.02 175)",
|
|
1388
|
+
"primary": "oklch(0.5 0.12 183)",
|
|
1389
|
+
"primary-foreground": "oklch(0.985 0 0)",
|
|
1390
|
+
"ring": "oklch(0.7 0.1 183)",
|
|
1391
|
+
"sidebar-primary": "oklch(0.5 0.12 183)",
|
|
1392
|
+
"sidebar-primary-foreground": "oklch(0.985 0 0)",
|
|
1393
|
+
"sidebar-ring": "oklch(0.7 0.1 183)",
|
|
1394
|
+
"chart-1": "oklch(0.5 0.12 183)",
|
|
1395
|
+
"chart-2": "oklch(0.6 0.19 255)",
|
|
1396
|
+
"chart-3": "oklch(0.72 0.2 125)",
|
|
1397
|
+
"chart-4": "oklch(0.58 0.22 310)",
|
|
1398
|
+
"chart-5": "oklch(0.64 0.22 345)",
|
|
1399
|
+
"positive": "oklch(0.52 0.126 142)",
|
|
1400
|
+
"positive-subtle": "oklch(0.96 0.04 142)",
|
|
1401
|
+
"positive-fill": "oklch(0.62 0.12 142)",
|
|
1402
|
+
"negative": "oklch(0.53 0.171 28)",
|
|
1403
|
+
"negative-subtle": "oklch(0.96 0.03 28)",
|
|
1404
|
+
"negative-fill": "oklch(0.62 0.136 28)",
|
|
1405
|
+
"warning": "oklch(0.53 0.108 78)",
|
|
1406
|
+
"warning-subtle": "oklch(0.96 0.05 93)",
|
|
1407
|
+
"warning-fill": "oklch(0.79 0.128 90)",
|
|
1408
|
+
"info": "oklch(0.52 0.144 250)",
|
|
1409
|
+
"info-subtle": "oklch(0.96 0.03 245)",
|
|
1410
|
+
"info-fill": "oklch(0.62 0.12 245)",
|
|
1411
|
+
"neutral": "oklch(0.52 0 0)",
|
|
1412
|
+
"neutral-subtle": "oklch(0.96 0 0)",
|
|
1413
|
+
"neutral-fill": "oklch(0.62 0 0)",
|
|
1414
|
+
"destructive": "oklch(0.53 0.171 28)",
|
|
1415
|
+
"destructive-foreground": "oklch(0.985 0 0)"
|
|
1416
|
+
},
|
|
1417
|
+
"dark": {
|
|
1418
|
+
"background": "oklch(0.16 0.012 175)",
|
|
1419
|
+
"card": "oklch(0.215 0.015 175)",
|
|
1420
|
+
"popover": "oklch(0.235 0.016 175)",
|
|
1421
|
+
"secondary": "oklch(0.27 0.016 175)",
|
|
1422
|
+
"muted": "oklch(0.27 0.016 175)",
|
|
1423
|
+
"accent": "oklch(0.3 0.02 175)",
|
|
1424
|
+
"sidebar": "oklch(0.2 0.014 175)",
|
|
1425
|
+
"sidebar-accent": "oklch(0.3 0.02 175)",
|
|
1426
|
+
"border": "oklch(1 0 0 / 10%)",
|
|
1427
|
+
"input": "oklch(1 0 0 / 15%)",
|
|
1428
|
+
"sidebar-border": "oklch(1 0 0 / 10%)",
|
|
1429
|
+
"foreground": "oklch(0.96 0.005 175)",
|
|
1430
|
+
"card-foreground": "oklch(0.96 0.005 175)",
|
|
1431
|
+
"popover-foreground": "oklch(0.96 0.005 175)",
|
|
1432
|
+
"secondary-foreground": "oklch(0.96 0.005 175)",
|
|
1433
|
+
"muted-foreground": "oklch(0.72 0.02 175)",
|
|
1434
|
+
"accent-foreground": "oklch(0.96 0.005 175)",
|
|
1435
|
+
"sidebar-foreground": "oklch(0.96 0.005 175)",
|
|
1436
|
+
"sidebar-accent-foreground": "oklch(0.96 0.005 175)",
|
|
1437
|
+
"primary": "oklch(0.75 0.13 183)",
|
|
1438
|
+
"primary-foreground": "oklch(0.145 0.03 183)",
|
|
1439
|
+
"ring": "oklch(0.53 0.12 183)",
|
|
1440
|
+
"sidebar-primary": "oklch(0.75 0.13 183)",
|
|
1441
|
+
"sidebar-primary-foreground": "oklch(0.145 0.03 183)",
|
|
1442
|
+
"sidebar-ring": "oklch(0.53 0.12 183)",
|
|
1443
|
+
"chart-1": "oklch(0.53 0.12 183)",
|
|
1444
|
+
"chart-2": "oklch(0.7 0.18 255)",
|
|
1445
|
+
"chart-3": "oklch(0.8 0.2 125)",
|
|
1446
|
+
"chart-4": "oklch(0.7 0.2 310)",
|
|
1447
|
+
"chart-5": "oklch(0.72 0.2 345)",
|
|
1448
|
+
"positive": "oklch(0.76 0.135 142)",
|
|
1449
|
+
"positive-subtle": "oklch(0.27 0.05 142)",
|
|
1450
|
+
"positive-fill": "oklch(0.56 0.104 142)",
|
|
1451
|
+
"negative": "oklch(0.74 0.135 25)",
|
|
1452
|
+
"negative-subtle": "oklch(0.27 0.06 28)",
|
|
1453
|
+
"negative-fill": "oklch(0.56 0.12 25)",
|
|
1454
|
+
"warning": "oklch(0.8 0.126 88)",
|
|
1455
|
+
"warning-subtle": "oklch(0.27 0.05 83)",
|
|
1456
|
+
"warning-fill": "oklch(0.73 0.116 86)",
|
|
1457
|
+
"info": "oklch(0.75 0.108 245)",
|
|
1458
|
+
"info-subtle": "oklch(0.27 0.06 250)",
|
|
1459
|
+
"info-fill": "oklch(0.56 0.104 245)",
|
|
1460
|
+
"neutral": "oklch(0.85 0 0)",
|
|
1461
|
+
"neutral-subtle": "oklch(0.27 0 0)",
|
|
1462
|
+
"neutral-fill": "oklch(0.56 0 0)",
|
|
1463
|
+
"destructive": "oklch(0.74 0.135 25)",
|
|
1464
|
+
"destructive-foreground": "oklch(0.145 0.03 183)"
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
"id": "sunset",
|
|
1470
|
+
"title": "Sunset",
|
|
1471
|
+
"description": "An orange preset with a warm palette and slightly larger corners.",
|
|
1472
|
+
"cssVars": {
|
|
1473
|
+
"light": {
|
|
1474
|
+
"radius": "0.75rem",
|
|
1475
|
+
"font-sans": '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, ui-sans-serif, system-ui, sans-serif',
|
|
1476
|
+
"background": "oklch(0.975 0.004 60)",
|
|
1477
|
+
"card": "oklch(1 0 60)",
|
|
1478
|
+
"popover": "oklch(1 0 60)",
|
|
1479
|
+
"secondary": "oklch(0.965 0.005 60)",
|
|
1480
|
+
"muted": "oklch(0.965 0.005 60)",
|
|
1481
|
+
"accent": "oklch(0.955 0.01 60)",
|
|
1482
|
+
"sidebar": "oklch(0.985 0.003 60)",
|
|
1483
|
+
"sidebar-accent": "oklch(0.955 0.01 60)",
|
|
1484
|
+
"border": "oklch(0.93 0.006 60)",
|
|
1485
|
+
"input": "oklch(0.9 0.01 60)",
|
|
1486
|
+
"sidebar-border": "oklch(0.915 0.008 60)",
|
|
1487
|
+
"foreground": "oklch(0.21 0.02 60)",
|
|
1488
|
+
"card-foreground": "oklch(0.21 0.02 60)",
|
|
1489
|
+
"popover-foreground": "oklch(0.21 0.02 60)",
|
|
1490
|
+
"secondary-foreground": "oklch(0.25 0.02 60)",
|
|
1491
|
+
"muted-foreground": "oklch(0.5 0.02 60)",
|
|
1492
|
+
"accent-foreground": "oklch(0.25 0.02 60)",
|
|
1493
|
+
"sidebar-foreground": "oklch(0.21 0.02 60)",
|
|
1494
|
+
"sidebar-accent-foreground": "oklch(0.25 0.02 60)",
|
|
1495
|
+
"primary": "oklch(0.56 0.15 47)",
|
|
1496
|
+
"primary-foreground": "oklch(0.985 0 0)",
|
|
1497
|
+
"ring": "oklch(0.72 0.12 47)",
|
|
1498
|
+
"sidebar-primary": "oklch(0.56 0.15 47)",
|
|
1499
|
+
"sidebar-primary-foreground": "oklch(0.985 0 0)",
|
|
1500
|
+
"sidebar-ring": "oklch(0.72 0.12 47)",
|
|
1501
|
+
"chart-1": "oklch(0.56 0.15 47)",
|
|
1502
|
+
"chart-2": "oklch(0.58 0.2 255)",
|
|
1503
|
+
"chart-3": "oklch(0.63 0.24 335)",
|
|
1504
|
+
"chart-4": "oklch(0.7 0.12 195)",
|
|
1505
|
+
"chart-5": "oklch(0.58 0.23 300)",
|
|
1506
|
+
"positive": "oklch(0.52 0.14 148)",
|
|
1507
|
+
"positive-subtle": "oklch(0.96 0.04 148)",
|
|
1508
|
+
"positive-fill": "oklch(0.62 0.15 148)",
|
|
1509
|
+
"negative": "oklch(0.53 0.19 17)",
|
|
1510
|
+
"negative-subtle": "oklch(0.96 0.03 17)",
|
|
1511
|
+
"negative-fill": "oklch(0.62 0.17 17)",
|
|
1512
|
+
"warning": "oklch(0.5 0.12 82)",
|
|
1513
|
+
"warning-subtle": "oklch(0.96 0.05 97)",
|
|
1514
|
+
"warning-fill": "oklch(0.77 0.16 94)",
|
|
1515
|
+
"info": "oklch(0.52 0.16 250)",
|
|
1516
|
+
"info-subtle": "oklch(0.96 0.03 245)",
|
|
1517
|
+
"info-fill": "oklch(0.62 0.15 245)",
|
|
1518
|
+
"neutral": "oklch(0.52 0 0)",
|
|
1519
|
+
"neutral-subtle": "oklch(0.96 0 0)",
|
|
1520
|
+
"neutral-fill": "oklch(0.62 0 0)",
|
|
1521
|
+
"destructive": "oklch(0.53 0.19 17)",
|
|
1522
|
+
"destructive-foreground": "oklch(0.985 0 0)"
|
|
1523
|
+
},
|
|
1524
|
+
"dark": {
|
|
1525
|
+
"background": "oklch(0.16 0.012 60)",
|
|
1526
|
+
"card": "oklch(0.215 0.015 60)",
|
|
1527
|
+
"popover": "oklch(0.235 0.016 60)",
|
|
1528
|
+
"secondary": "oklch(0.27 0.016 60)",
|
|
1529
|
+
"muted": "oklch(0.27 0.016 60)",
|
|
1530
|
+
"accent": "oklch(0.3 0.02 60)",
|
|
1531
|
+
"sidebar": "oklch(0.2 0.014 60)",
|
|
1532
|
+
"sidebar-accent": "oklch(0.3 0.02 60)",
|
|
1533
|
+
"border": "oklch(1 0 0 / 10%)",
|
|
1534
|
+
"input": "oklch(1 0 0 / 15%)",
|
|
1535
|
+
"sidebar-border": "oklch(1 0 0 / 10%)",
|
|
1536
|
+
"foreground": "oklch(0.96 0.005 60)",
|
|
1537
|
+
"card-foreground": "oklch(0.96 0.005 60)",
|
|
1538
|
+
"popover-foreground": "oklch(0.96 0.005 60)",
|
|
1539
|
+
"secondary-foreground": "oklch(0.96 0.005 60)",
|
|
1540
|
+
"muted-foreground": "oklch(0.72 0.02 60)",
|
|
1541
|
+
"accent-foreground": "oklch(0.96 0.005 60)",
|
|
1542
|
+
"sidebar-foreground": "oklch(0.96 0.005 60)",
|
|
1543
|
+
"sidebar-accent-foreground": "oklch(0.96 0.005 60)",
|
|
1544
|
+
"primary": "oklch(0.76 0.16 52)",
|
|
1545
|
+
"primary-foreground": "oklch(0.145 0.03 50)",
|
|
1546
|
+
"ring": "oklch(0.58 0.13 47)",
|
|
1547
|
+
"sidebar-primary": "oklch(0.76 0.16 52)",
|
|
1548
|
+
"sidebar-primary-foreground": "oklch(0.145 0.03 50)",
|
|
1549
|
+
"sidebar-ring": "oklch(0.58 0.13 47)",
|
|
1550
|
+
"chart-1": "oklch(0.57 0.15 47)",
|
|
1551
|
+
"chart-2": "oklch(0.68 0.18 255)",
|
|
1552
|
+
"chart-3": "oklch(0.7 0.22 335)",
|
|
1553
|
+
"chart-4": "oklch(0.78 0.12 195)",
|
|
1554
|
+
"chart-5": "oklch(0.68 0.2 300)",
|
|
1555
|
+
"positive": "oklch(0.76 0.15 148)",
|
|
1556
|
+
"positive-subtle": "oklch(0.27 0.05 148)",
|
|
1557
|
+
"positive-fill": "oklch(0.56 0.13 148)",
|
|
1558
|
+
"negative": "oklch(0.74 0.15 15)",
|
|
1559
|
+
"negative-subtle": "oklch(0.27 0.06 18)",
|
|
1560
|
+
"negative-fill": "oklch(0.56 0.15 15)",
|
|
1561
|
+
"warning": "oklch(0.8 0.14 92)",
|
|
1562
|
+
"warning-subtle": "oklch(0.27 0.05 87)",
|
|
1563
|
+
"warning-fill": "oklch(0.73 0.145 90)",
|
|
1564
|
+
"info": "oklch(0.75 0.12 245)",
|
|
1565
|
+
"info-subtle": "oklch(0.27 0.06 250)",
|
|
1566
|
+
"info-fill": "oklch(0.56 0.13 245)",
|
|
1567
|
+
"neutral": "oklch(0.85 0 0)",
|
|
1568
|
+
"neutral-subtle": "oklch(0.27 0 0)",
|
|
1569
|
+
"neutral-fill": "oklch(0.56 0 0)",
|
|
1570
|
+
"destructive": "oklch(0.74 0.15 15)",
|
|
1571
|
+
"destructive-foreground": "oklch(0.145 0.03 50)"
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"id": "violet",
|
|
1577
|
+
"title": "Violet",
|
|
1578
|
+
"description": "A purple preset with large, soft corners.",
|
|
1579
|
+
"cssVars": {
|
|
1580
|
+
"light": {
|
|
1581
|
+
"radius": "0.875rem",
|
|
1582
|
+
"font-sans": '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, ui-sans-serif, system-ui, sans-serif',
|
|
1583
|
+
"background": "oklch(0.975 0.004 290)",
|
|
1584
|
+
"card": "oklch(1 0 290)",
|
|
1585
|
+
"popover": "oklch(1 0 290)",
|
|
1586
|
+
"secondary": "oklch(0.965 0.005 290)",
|
|
1587
|
+
"muted": "oklch(0.965 0.005 290)",
|
|
1588
|
+
"accent": "oklch(0.955 0.01 290)",
|
|
1589
|
+
"sidebar": "oklch(0.985 0.003 290)",
|
|
1590
|
+
"sidebar-accent": "oklch(0.955 0.01 290)",
|
|
1591
|
+
"border": "oklch(0.93 0.006 290)",
|
|
1592
|
+
"input": "oklch(0.9 0.01 290)",
|
|
1593
|
+
"sidebar-border": "oklch(0.915 0.008 290)",
|
|
1594
|
+
"foreground": "oklch(0.21 0.02 290)",
|
|
1595
|
+
"card-foreground": "oklch(0.21 0.02 290)",
|
|
1596
|
+
"popover-foreground": "oklch(0.21 0.02 290)",
|
|
1597
|
+
"secondary-foreground": "oklch(0.25 0.02 290)",
|
|
1598
|
+
"muted-foreground": "oklch(0.5 0.02 290)",
|
|
1599
|
+
"accent-foreground": "oklch(0.25 0.02 290)",
|
|
1600
|
+
"sidebar-foreground": "oklch(0.21 0.02 290)",
|
|
1601
|
+
"sidebar-accent-foreground": "oklch(0.25 0.02 290)",
|
|
1602
|
+
"primary": "oklch(0.5 0.22 292)",
|
|
1603
|
+
"primary-foreground": "oklch(0.985 0 0)",
|
|
1604
|
+
"ring": "oklch(0.7 0.14 292)",
|
|
1605
|
+
"sidebar-primary": "oklch(0.5 0.22 292)",
|
|
1606
|
+
"sidebar-primary-foreground": "oklch(0.985 0 0)",
|
|
1607
|
+
"sidebar-ring": "oklch(0.7 0.14 292)",
|
|
1608
|
+
"chart-1": "oklch(0.5 0.22 292)",
|
|
1609
|
+
"chart-2": "oklch(0.7 0.13 215)",
|
|
1610
|
+
"chart-3": "oklch(0.63 0.24 335)",
|
|
1611
|
+
"chart-4": "oklch(0.76 0.2 125)",
|
|
1612
|
+
"chart-5": "oklch(0.58 0.2 255)",
|
|
1613
|
+
"positive": "oklch(0.52 0.14 152)",
|
|
1614
|
+
"positive-subtle": "oklch(0.96 0.04 152)",
|
|
1615
|
+
"positive-fill": "oklch(0.62 0.15 152)",
|
|
1616
|
+
"negative": "oklch(0.53 0.19 20)",
|
|
1617
|
+
"negative-subtle": "oklch(0.96 0.03 20)",
|
|
1618
|
+
"negative-fill": "oklch(0.62 0.17 20)",
|
|
1619
|
+
"warning": "oklch(0.53 0.12 75)",
|
|
1620
|
+
"warning-subtle": "oklch(0.96 0.05 90)",
|
|
1621
|
+
"warning-fill": "oklch(0.79 0.16 87)",
|
|
1622
|
+
"info": "oklch(0.52 0.16 245)",
|
|
1623
|
+
"info-subtle": "oklch(0.96 0.03 240)",
|
|
1624
|
+
"info-fill": "oklch(0.62 0.15 240)",
|
|
1625
|
+
"neutral": "oklch(0.52 0 0)",
|
|
1626
|
+
"neutral-subtle": "oklch(0.96 0 0)",
|
|
1627
|
+
"neutral-fill": "oklch(0.62 0 0)",
|
|
1628
|
+
"destructive": "oklch(0.53 0.19 20)",
|
|
1629
|
+
"destructive-foreground": "oklch(0.985 0 0)"
|
|
1630
|
+
},
|
|
1631
|
+
"dark": {
|
|
1632
|
+
"background": "oklch(0.16 0.012 290)",
|
|
1633
|
+
"card": "oklch(0.215 0.015 290)",
|
|
1634
|
+
"popover": "oklch(0.235 0.016 290)",
|
|
1635
|
+
"secondary": "oklch(0.27 0.016 290)",
|
|
1636
|
+
"muted": "oklch(0.27 0.016 290)",
|
|
1637
|
+
"accent": "oklch(0.3 0.02 290)",
|
|
1638
|
+
"sidebar": "oklch(0.2 0.014 290)",
|
|
1639
|
+
"sidebar-accent": "oklch(0.3 0.02 290)",
|
|
1640
|
+
"border": "oklch(1 0 0 / 10%)",
|
|
1641
|
+
"input": "oklch(1 0 0 / 15%)",
|
|
1642
|
+
"sidebar-border": "oklch(1 0 0 / 10%)",
|
|
1643
|
+
"foreground": "oklch(0.96 0.005 290)",
|
|
1644
|
+
"card-foreground": "oklch(0.96 0.005 290)",
|
|
1645
|
+
"popover-foreground": "oklch(0.96 0.005 290)",
|
|
1646
|
+
"secondary-foreground": "oklch(0.96 0.005 290)",
|
|
1647
|
+
"muted-foreground": "oklch(0.72 0.02 290)",
|
|
1648
|
+
"accent-foreground": "oklch(0.96 0.005 290)",
|
|
1649
|
+
"sidebar-foreground": "oklch(0.96 0.005 290)",
|
|
1650
|
+
"sidebar-accent-foreground": "oklch(0.96 0.005 290)",
|
|
1651
|
+
"primary": "oklch(0.72 0.15 293)",
|
|
1652
|
+
"primary-foreground": "oklch(0.145 0.03 293)",
|
|
1653
|
+
"ring": "oklch(0.55 0.16 293)",
|
|
1654
|
+
"sidebar-primary": "oklch(0.72 0.15 293)",
|
|
1655
|
+
"sidebar-primary-foreground": "oklch(0.145 0.03 293)",
|
|
1656
|
+
"sidebar-ring": "oklch(0.55 0.16 293)",
|
|
1657
|
+
"chart-1": "oklch(0.55 0.22 292)",
|
|
1658
|
+
"chart-2": "oklch(0.78 0.13 215)",
|
|
1659
|
+
"chart-3": "oklch(0.7 0.22 335)",
|
|
1660
|
+
"chart-4": "oklch(0.82 0.19 125)",
|
|
1661
|
+
"chart-5": "oklch(0.68 0.18 255)",
|
|
1662
|
+
"positive": "oklch(0.76 0.15 152)",
|
|
1663
|
+
"positive-subtle": "oklch(0.27 0.05 152)",
|
|
1664
|
+
"positive-fill": "oklch(0.56 0.13 152)",
|
|
1665
|
+
"negative": "oklch(0.74 0.15 17)",
|
|
1666
|
+
"negative-subtle": "oklch(0.27 0.06 20)",
|
|
1667
|
+
"negative-fill": "oklch(0.56 0.15 17)",
|
|
1668
|
+
"warning": "oklch(0.8 0.14 85)",
|
|
1669
|
+
"warning-subtle": "oklch(0.27 0.05 80)",
|
|
1670
|
+
"warning-fill": "oklch(0.73 0.145 83)",
|
|
1671
|
+
"info": "oklch(0.75 0.12 240)",
|
|
1672
|
+
"info-subtle": "oklch(0.27 0.06 245)",
|
|
1673
|
+
"info-fill": "oklch(0.56 0.13 240)",
|
|
1674
|
+
"neutral": "oklch(0.85 0 0)",
|
|
1675
|
+
"neutral-subtle": "oklch(0.27 0 0)",
|
|
1676
|
+
"neutral-fill": "oklch(0.56 0 0)",
|
|
1677
|
+
"destructive": "oklch(0.74 0.15 17)",
|
|
1678
|
+
"destructive-foreground": "oklch(0.145 0.03 293)"
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
"id": "rose",
|
|
1684
|
+
"title": "Rose",
|
|
1685
|
+
"description": "A magenta-to-pink preset in muted tones that don't read as the destructive red, with large corners.",
|
|
1686
|
+
"cssVars": {
|
|
1687
|
+
"light": {
|
|
1688
|
+
"radius": "1rem",
|
|
1689
|
+
"font-sans": '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, ui-sans-serif, system-ui, sans-serif',
|
|
1690
|
+
"background": "oklch(0.975 0.004 350)",
|
|
1691
|
+
"card": "oklch(1 0 350)",
|
|
1692
|
+
"popover": "oklch(1 0 350)",
|
|
1693
|
+
"secondary": "oklch(0.965 0.005 350)",
|
|
1694
|
+
"muted": "oklch(0.965 0.005 350)",
|
|
1695
|
+
"accent": "oklch(0.955 0.01 350)",
|
|
1696
|
+
"sidebar": "oklch(0.985 0.003 350)",
|
|
1697
|
+
"sidebar-accent": "oklch(0.955 0.01 350)",
|
|
1698
|
+
"border": "oklch(0.93 0.006 350)",
|
|
1699
|
+
"input": "oklch(0.9 0.01 350)",
|
|
1700
|
+
"sidebar-border": "oklch(0.915 0.008 350)",
|
|
1701
|
+
"foreground": "oklch(0.21 0.02 350)",
|
|
1702
|
+
"card-foreground": "oklch(0.21 0.02 350)",
|
|
1703
|
+
"popover-foreground": "oklch(0.21 0.02 350)",
|
|
1704
|
+
"secondary-foreground": "oklch(0.25 0.02 350)",
|
|
1705
|
+
"muted-foreground": "oklch(0.5 0.02 350)",
|
|
1706
|
+
"accent-foreground": "oklch(0.25 0.02 350)",
|
|
1707
|
+
"sidebar-foreground": "oklch(0.21 0.02 350)",
|
|
1708
|
+
"sidebar-accent-foreground": "oklch(0.25 0.02 350)",
|
|
1709
|
+
"primary": "oklch(0.54 0.19 350)",
|
|
1710
|
+
"primary-foreground": "oklch(0.985 0 0)",
|
|
1711
|
+
"ring": "oklch(0.72 0.1 350)",
|
|
1712
|
+
"sidebar-primary": "oklch(0.54 0.19 350)",
|
|
1713
|
+
"sidebar-primary-foreground": "oklch(0.985 0 0)",
|
|
1714
|
+
"sidebar-ring": "oklch(0.72 0.1 350)",
|
|
1715
|
+
"chart-1": "oklch(0.54 0.19 350)",
|
|
1716
|
+
"chart-2": "oklch(0.7 0.12 200)",
|
|
1717
|
+
"chart-3": "oklch(0.58 0.22 295)",
|
|
1718
|
+
"chart-4": "oklch(0.76 0.2 130)",
|
|
1719
|
+
"chart-5": "oklch(0.58 0.2 255)",
|
|
1720
|
+
"positive": "oklch(0.52 0.14 150)",
|
|
1721
|
+
"positive-subtle": "oklch(0.96 0.04 150)",
|
|
1722
|
+
"positive-fill": "oklch(0.62 0.15 150)",
|
|
1723
|
+
"negative": "oklch(0.53 0.19 30)",
|
|
1724
|
+
"negative-subtle": "oklch(0.96 0.03 30)",
|
|
1725
|
+
"negative-fill": "oklch(0.62 0.17 30)",
|
|
1726
|
+
"warning": "oklch(0.53 0.12 75)",
|
|
1727
|
+
"warning-subtle": "oklch(0.96 0.05 90)",
|
|
1728
|
+
"warning-fill": "oklch(0.79 0.16 87)",
|
|
1729
|
+
"info": "oklch(0.52 0.16 250)",
|
|
1730
|
+
"info-subtle": "oklch(0.96 0.03 245)",
|
|
1731
|
+
"info-fill": "oklch(0.62 0.15 245)",
|
|
1732
|
+
"neutral": "oklch(0.52 0 0)",
|
|
1733
|
+
"neutral-subtle": "oklch(0.96 0 0)",
|
|
1734
|
+
"neutral-fill": "oklch(0.62 0 0)",
|
|
1735
|
+
"destructive": "oklch(0.53 0.19 30)",
|
|
1736
|
+
"destructive-foreground": "oklch(0.985 0 0)"
|
|
1737
|
+
},
|
|
1738
|
+
"dark": {
|
|
1739
|
+
"background": "oklch(0.16 0.012 350)",
|
|
1740
|
+
"card": "oklch(0.215 0.015 350)",
|
|
1741
|
+
"popover": "oklch(0.235 0.016 350)",
|
|
1742
|
+
"secondary": "oklch(0.27 0.016 350)",
|
|
1743
|
+
"muted": "oklch(0.27 0.016 350)",
|
|
1744
|
+
"accent": "oklch(0.3 0.02 350)",
|
|
1745
|
+
"sidebar": "oklch(0.2 0.014 350)",
|
|
1746
|
+
"sidebar-accent": "oklch(0.3 0.02 350)",
|
|
1747
|
+
"border": "oklch(1 0 0 / 10%)",
|
|
1748
|
+
"input": "oklch(1 0 0 / 15%)",
|
|
1749
|
+
"sidebar-border": "oklch(1 0 0 / 10%)",
|
|
1750
|
+
"foreground": "oklch(0.96 0.005 350)",
|
|
1751
|
+
"card-foreground": "oklch(0.96 0.005 350)",
|
|
1752
|
+
"popover-foreground": "oklch(0.96 0.005 350)",
|
|
1753
|
+
"secondary-foreground": "oklch(0.96 0.005 350)",
|
|
1754
|
+
"muted-foreground": "oklch(0.72 0.02 350)",
|
|
1755
|
+
"accent-foreground": "oklch(0.96 0.005 350)",
|
|
1756
|
+
"sidebar-foreground": "oklch(0.96 0.005 350)",
|
|
1757
|
+
"sidebar-accent-foreground": "oklch(0.96 0.005 350)",
|
|
1758
|
+
"primary": "oklch(0.76 0.14 350)",
|
|
1759
|
+
"primary-foreground": "oklch(0.145 0.03 350)",
|
|
1760
|
+
"ring": "oklch(0.58 0.12 350)",
|
|
1761
|
+
"sidebar-primary": "oklch(0.76 0.14 350)",
|
|
1762
|
+
"sidebar-primary-foreground": "oklch(0.145 0.03 350)",
|
|
1763
|
+
"sidebar-ring": "oklch(0.58 0.12 350)",
|
|
1764
|
+
"chart-1": "oklch(0.55 0.19 350)",
|
|
1765
|
+
"chart-2": "oklch(0.78 0.12 200)",
|
|
1766
|
+
"chart-3": "oklch(0.68 0.2 295)",
|
|
1767
|
+
"chart-4": "oklch(0.82 0.19 130)",
|
|
1768
|
+
"chart-5": "oklch(0.68 0.18 255)",
|
|
1769
|
+
"positive": "oklch(0.76 0.15 150)",
|
|
1770
|
+
"positive-subtle": "oklch(0.27 0.05 150)",
|
|
1771
|
+
"positive-fill": "oklch(0.56 0.13 150)",
|
|
1772
|
+
"negative": "oklch(0.74 0.15 27)",
|
|
1773
|
+
"negative-subtle": "oklch(0.27 0.06 30)",
|
|
1774
|
+
"negative-fill": "oklch(0.56 0.15 27)",
|
|
1775
|
+
"warning": "oklch(0.8 0.14 85)",
|
|
1776
|
+
"warning-subtle": "oklch(0.27 0.05 80)",
|
|
1777
|
+
"warning-fill": "oklch(0.73 0.145 83)",
|
|
1778
|
+
"info": "oklch(0.75 0.12 245)",
|
|
1779
|
+
"info-subtle": "oklch(0.27 0.06 250)",
|
|
1780
|
+
"info-fill": "oklch(0.56 0.13 245)",
|
|
1781
|
+
"neutral": "oklch(0.85 0 0)",
|
|
1782
|
+
"neutral-subtle": "oklch(0.27 0 0)",
|
|
1783
|
+
"neutral-fill": "oklch(0.56 0 0)",
|
|
1784
|
+
"destructive": "oklch(0.74 0.15 27)",
|
|
1785
|
+
"destructive-foreground": "oklch(0.145 0.03 350)"
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
},
|
|
1789
|
+
{
|
|
1790
|
+
"id": "mono",
|
|
1791
|
+
"title": "Mono",
|
|
1792
|
+
"description": "A near-grayscale preset with muted chart colors, the smallest corners and a monospace font (the system monospace font).",
|
|
1793
|
+
"cssVars": {
|
|
1794
|
+
"light": {
|
|
1795
|
+
"radius": "0.25rem",
|
|
1796
|
+
"font-sans": 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, monospace',
|
|
1797
|
+
"background": "oklch(0.975 0 0)",
|
|
1798
|
+
"card": "oklch(1 0 0)",
|
|
1799
|
+
"popover": "oklch(1 0 0)",
|
|
1800
|
+
"secondary": "oklch(0.965 0 0)",
|
|
1801
|
+
"muted": "oklch(0.965 0 0)",
|
|
1802
|
+
"accent": "oklch(0.955 0 0)",
|
|
1803
|
+
"sidebar": "oklch(0.985 0 0)",
|
|
1804
|
+
"sidebar-accent": "oklch(0.955 0 0)",
|
|
1805
|
+
"border": "oklch(0.93 0 0)",
|
|
1806
|
+
"input": "oklch(0.9 0 0)",
|
|
1807
|
+
"sidebar-border": "oklch(0.915 0 0)",
|
|
1808
|
+
"foreground": "oklch(0.21 0 0)",
|
|
1809
|
+
"card-foreground": "oklch(0.21 0 0)",
|
|
1810
|
+
"popover-foreground": "oklch(0.21 0 0)",
|
|
1811
|
+
"secondary-foreground": "oklch(0.25 0 0)",
|
|
1812
|
+
"muted-foreground": "oklch(0.5 0 0)",
|
|
1813
|
+
"accent-foreground": "oklch(0.25 0 0)",
|
|
1814
|
+
"sidebar-foreground": "oklch(0.21 0 0)",
|
|
1815
|
+
"sidebar-accent-foreground": "oklch(0.25 0 0)",
|
|
1816
|
+
"primary": "oklch(0.3 0.01 250)",
|
|
1817
|
+
"primary-foreground": "oklch(0.985 0 0)",
|
|
1818
|
+
"ring": "oklch(0.708 0.01 250)",
|
|
1819
|
+
"sidebar-primary": "oklch(0.3 0.01 250)",
|
|
1820
|
+
"sidebar-primary-foreground": "oklch(0.985 0 0)",
|
|
1821
|
+
"sidebar-ring": "oklch(0.708 0.01 250)",
|
|
1822
|
+
"chart-1": "hsl(220 12% 28%)",
|
|
1823
|
+
"chart-2": "hsl(190 28% 45%)",
|
|
1824
|
+
"chart-3": "hsl(325 20% 56%)",
|
|
1825
|
+
"chart-4": "hsl(150 20% 40%)",
|
|
1826
|
+
"chart-5": "hsl(270 18% 58%)",
|
|
1827
|
+
"positive": "oklch(0.52 0.14 150)",
|
|
1828
|
+
"positive-subtle": "oklch(0.96 0.04 150)",
|
|
1829
|
+
"positive-fill": "oklch(0.62 0.15 150)",
|
|
1830
|
+
"negative": "oklch(0.53 0.19 25)",
|
|
1831
|
+
"negative-subtle": "oklch(0.96 0.03 25)",
|
|
1832
|
+
"negative-fill": "oklch(0.62 0.17 25)",
|
|
1833
|
+
"warning": "oklch(0.53 0.12 75)",
|
|
1834
|
+
"warning-subtle": "oklch(0.96 0.05 90)",
|
|
1835
|
+
"warning-fill": "oklch(0.79 0.16 87)",
|
|
1836
|
+
"info": "oklch(0.52 0.16 255)",
|
|
1837
|
+
"info-subtle": "oklch(0.96 0.03 250)",
|
|
1838
|
+
"info-fill": "oklch(0.62 0.15 250)",
|
|
1839
|
+
"neutral": "oklch(0.52 0 0)",
|
|
1840
|
+
"neutral-subtle": "oklch(0.96 0 0)",
|
|
1841
|
+
"neutral-fill": "oklch(0.62 0 0)",
|
|
1842
|
+
"destructive": "oklch(0.53 0.19 25)",
|
|
1843
|
+
"destructive-foreground": "oklch(0.985 0 0)"
|
|
1844
|
+
},
|
|
1845
|
+
"dark": {
|
|
1846
|
+
"background": "oklch(0.16 0 0)",
|
|
1847
|
+
"card": "oklch(0.215 0 0)",
|
|
1848
|
+
"popover": "oklch(0.235 0 0)",
|
|
1849
|
+
"secondary": "oklch(0.27 0 0)",
|
|
1850
|
+
"muted": "oklch(0.27 0 0)",
|
|
1851
|
+
"accent": "oklch(0.3 0 0)",
|
|
1852
|
+
"sidebar": "oklch(0.2 0 0)",
|
|
1853
|
+
"sidebar-accent": "oklch(0.3 0 0)",
|
|
1854
|
+
"border": "oklch(1 0 0 / 10%)",
|
|
1855
|
+
"input": "oklch(1 0 0 / 15%)",
|
|
1856
|
+
"sidebar-border": "oklch(1 0 0 / 10%)",
|
|
1857
|
+
"foreground": "oklch(0.96 0 0)",
|
|
1858
|
+
"card-foreground": "oklch(0.96 0 0)",
|
|
1859
|
+
"popover-foreground": "oklch(0.96 0 0)",
|
|
1860
|
+
"secondary-foreground": "oklch(0.96 0 0)",
|
|
1861
|
+
"muted-foreground": "oklch(0.72 0 0)",
|
|
1862
|
+
"accent-foreground": "oklch(0.96 0 0)",
|
|
1863
|
+
"sidebar-foreground": "oklch(0.96 0 0)",
|
|
1864
|
+
"sidebar-accent-foreground": "oklch(0.96 0 0)",
|
|
1865
|
+
"primary": "oklch(0.88 0.005 250)",
|
|
1866
|
+
"primary-foreground": "oklch(0.2 0.01 250)",
|
|
1867
|
+
"ring": "oklch(0.556 0.01 250)",
|
|
1868
|
+
"sidebar-primary": "oklch(0.88 0.005 250)",
|
|
1869
|
+
"sidebar-primary-foreground": "oklch(0.2 0.01 250)",
|
|
1870
|
+
"sidebar-ring": "oklch(0.556 0.01 250)",
|
|
1871
|
+
"chart-1": "hsl(220 12% 46%)",
|
|
1872
|
+
"chart-2": "hsl(190 28% 55%)",
|
|
1873
|
+
"chart-3": "hsl(325 20% 66%)",
|
|
1874
|
+
"chart-4": "hsl(150 20% 50%)",
|
|
1875
|
+
"chart-5": "hsl(270 18% 68%)",
|
|
1876
|
+
"positive": "oklch(0.76 0.15 150)",
|
|
1877
|
+
"positive-subtle": "oklch(0.27 0.05 150)",
|
|
1878
|
+
"positive-fill": "oklch(0.56 0.13 150)",
|
|
1879
|
+
"negative": "oklch(0.74 0.15 22)",
|
|
1880
|
+
"negative-subtle": "oklch(0.27 0.06 25)",
|
|
1881
|
+
"negative-fill": "oklch(0.56 0.15 22)",
|
|
1882
|
+
"warning": "oklch(0.8 0.14 85)",
|
|
1883
|
+
"warning-subtle": "oklch(0.27 0.05 80)",
|
|
1884
|
+
"warning-fill": "oklch(0.73 0.145 83)",
|
|
1885
|
+
"info": "oklch(0.75 0.12 250)",
|
|
1886
|
+
"info-subtle": "oklch(0.27 0.06 255)",
|
|
1887
|
+
"info-fill": "oklch(0.56 0.13 250)",
|
|
1888
|
+
"neutral": "oklch(0.85 0 0)",
|
|
1889
|
+
"neutral-subtle": "oklch(0.27 0 0)",
|
|
1890
|
+
"neutral-fill": "oklch(0.56 0 0)",
|
|
1891
|
+
"destructive": "oklch(0.74 0.15 22)",
|
|
1892
|
+
"destructive-foreground": "oklch(0.2 0.01 250)"
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
];
|
|
1897
|
+
|
|
1898
|
+
// ../squadkit/theme-presets/types.ts
|
|
1899
|
+
var THEME_PRESET_IDS = ["neutral", "ocean", "forest", "sunset", "violet", "rose", "mono"];
|
|
1900
|
+
|
|
1901
|
+
// ../squadkit/theme-presets/index.ts
|
|
1902
|
+
var THEME_PRESETS = THEME_PRESETS_DATA;
|
|
1903
|
+
var THEME_START_MARKER = "/* squadkit-theme \u2014 regenerated by `theme`; edits here are lost */";
|
|
1904
|
+
var THEME_END_MARKER = "/* squadkit-theme:end */";
|
|
1905
|
+
var CHART_START_MARKER = "/* vantage-template:chart-preset \u2014 regenerated by `chart`; edits here are lost */";
|
|
1906
|
+
var CHART_END_MARKER = "/* vantage-template:chart-preset:end */";
|
|
1907
|
+
var LEGACY_IDS = {
|
|
1908
|
+
default: "neutral",
|
|
1909
|
+
calm: "ocean",
|
|
1910
|
+
vivid: "sunset",
|
|
1911
|
+
mono: "mono"
|
|
1912
|
+
};
|
|
1913
|
+
function isThemePresetId(v) {
|
|
1914
|
+
return THEME_PRESET_IDS.includes(v);
|
|
1915
|
+
}
|
|
1916
|
+
function resolveThemePresetId(v) {
|
|
1917
|
+
if (isThemePresetId(v)) return v;
|
|
1918
|
+
return Object.prototype.hasOwnProperty.call(LEGACY_IDS, v) ? LEGACY_IDS[v] : null;
|
|
1919
|
+
}
|
|
1920
|
+
function getPreset(id) {
|
|
1921
|
+
const preset = THEME_PRESETS.find((p) => p.id === id);
|
|
1922
|
+
if (!preset) throw new Error(`unknown theme preset: ${id}`);
|
|
1923
|
+
return preset;
|
|
1924
|
+
}
|
|
1925
|
+
function themePresetCss(id) {
|
|
1926
|
+
return buildThemeCss(getPreset(id).cssVars);
|
|
1927
|
+
}
|
|
1928
|
+
function themeBlock(id) {
|
|
1929
|
+
return `${THEME_START_MARKER}
|
|
1930
|
+
/* theme: ${id} */
|
|
1931
|
+
${themePresetCss(id)}
|
|
1932
|
+
${THEME_END_MARKER}`;
|
|
1933
|
+
}
|
|
1934
|
+
var ThemeStylesheetError = class extends Error {
|
|
1935
|
+
code;
|
|
1936
|
+
constructor(code, reason) {
|
|
1937
|
+
super(`malformed theme range in styles.css: ${reason}`);
|
|
1938
|
+
this.name = "ThemeStylesheetError";
|
|
1939
|
+
this.code = code;
|
|
1940
|
+
}
|
|
1941
|
+
};
|
|
1942
|
+
function countOf(css, needle) {
|
|
1943
|
+
let n = 0;
|
|
1944
|
+
for (let at = css.indexOf(needle); at !== -1; at = css.indexOf(needle, at + needle.length)) n += 1;
|
|
1945
|
+
return n;
|
|
1946
|
+
}
|
|
1947
|
+
function findRange(css, startMarker, endMarker) {
|
|
1948
|
+
const starts = countOf(css, startMarker);
|
|
1949
|
+
const ends = countOf(css, endMarker);
|
|
1950
|
+
if (starts === 0 && ends === 0) return null;
|
|
1951
|
+
if (starts === 0) throw new ThemeStylesheetError("malformed-theme-block", "end marker without a start marker");
|
|
1952
|
+
if (ends === 0) throw new ThemeStylesheetError("malformed-theme-block", "start marker without an end marker");
|
|
1953
|
+
if (starts > 1) throw new ThemeStylesheetError("malformed-theme-block", "duplicate start markers");
|
|
1954
|
+
if (ends > 1) throw new ThemeStylesheetError("malformed-theme-block", "duplicate end markers");
|
|
1955
|
+
const start = css.indexOf(startMarker);
|
|
1956
|
+
const endAt = css.indexOf(endMarker);
|
|
1957
|
+
if (endAt < start) throw new ThemeStylesheetError("malformed-theme-block", "end marker before the start marker");
|
|
1958
|
+
return { start, end: endAt + endMarker.length };
|
|
1959
|
+
}
|
|
1960
|
+
function removeRange(css, range) {
|
|
1961
|
+
let end = range.end;
|
|
1962
|
+
if (css[end] === "\n") end += 1;
|
|
1963
|
+
if (css[end] === "\n") end += 1;
|
|
1964
|
+
return css.slice(0, range.start) + css.slice(end);
|
|
1965
|
+
}
|
|
1966
|
+
function applyThemeToStylesheet(css, id, opts = {}) {
|
|
1967
|
+
const block = themeBlock(id);
|
|
1968
|
+
let next = css;
|
|
1969
|
+
let repaired = false;
|
|
1970
|
+
const existing = findRange(next, THEME_START_MARKER, THEME_END_MARKER);
|
|
1971
|
+
if (opts.chart === "reset") {
|
|
1972
|
+
const chart = findChartRange(next);
|
|
1973
|
+
if (chart) next = removeRange(next, chart);
|
|
1974
|
+
}
|
|
1975
|
+
if (existing) {
|
|
1976
|
+
const range = findRange(next, THEME_START_MARKER, THEME_END_MARKER);
|
|
1977
|
+
next = next.slice(0, range.start) + block + next.slice(range.end);
|
|
1978
|
+
} else {
|
|
1979
|
+
repaired = true;
|
|
1980
|
+
const chartStart = next.indexOf(CHART_START_MARKER);
|
|
1981
|
+
if (chartStart !== -1) {
|
|
1982
|
+
next = `${next.slice(0, chartStart)}${block}
|
|
1983
|
+
|
|
1984
|
+
${next.slice(chartStart)}`;
|
|
1985
|
+
} else {
|
|
1986
|
+
next = `${next.trimEnd()}
|
|
1987
|
+
|
|
1988
|
+
${block}
|
|
1989
|
+
`;
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
return { css: next, changed: next !== css, repaired };
|
|
1993
|
+
}
|
|
1994
|
+
function findChartRange(css) {
|
|
1995
|
+
const start = css.indexOf(CHART_START_MARKER);
|
|
1996
|
+
if (start === -1) return null;
|
|
1997
|
+
const endAt = css.indexOf(CHART_END_MARKER, start);
|
|
1998
|
+
return endAt === -1 ? null : { start, end: endAt + CHART_END_MARKER.length };
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
// src/commands/theme.ts
|
|
2002
|
+
function setTheme(themeId, options) {
|
|
2003
|
+
const projectRoot = process.cwd();
|
|
2004
|
+
const stylesPath = resolveStylesPath(projectRoot);
|
|
2005
|
+
const stylesLabel = relative3(projectRoot, stylesPath);
|
|
2006
|
+
if (!existsSync8(stylesPath)) {
|
|
2007
|
+
log("red", `${stylesLabel} not found. Are you in a Squadbase Vantage project?`);
|
|
2008
|
+
process.exit(1);
|
|
2009
|
+
}
|
|
2010
|
+
const id = resolveThemePresetId(themeId);
|
|
2011
|
+
if (!id) {
|
|
2012
|
+
log("red", `Theme "${themeId}" not found.`);
|
|
2013
|
+
log("yellow", `Available themes: ${THEME_PRESET_IDS.join(", ")}`);
|
|
2014
|
+
process.exit(1);
|
|
2015
|
+
}
|
|
2016
|
+
log("green", `Applying theme: ${id}`);
|
|
2017
|
+
if (id !== themeId) {
|
|
2018
|
+
log("dim", ` (legacy id "${themeId}" \u2192 "${id}")`);
|
|
2019
|
+
}
|
|
2020
|
+
const description = THEME_PRESETS.find((p) => p.id === id)?.description;
|
|
2021
|
+
if (description) {
|
|
2022
|
+
log("dim", ` ${description}`);
|
|
2023
|
+
}
|
|
2024
|
+
const current = readFileSync6(stylesPath, "utf-8");
|
|
2025
|
+
let result;
|
|
2026
|
+
try {
|
|
2027
|
+
result = applyThemeToStylesheet(current, id, {
|
|
2028
|
+
chart: options.resetChart ? "reset" : "keep"
|
|
2029
|
+
});
|
|
2030
|
+
} catch (err) {
|
|
2031
|
+
if (err instanceof ThemeStylesheetError) {
|
|
2032
|
+
log("red", `The theme range in ${stylesLabel} is broken (${err.message}).`);
|
|
2033
|
+
log(
|
|
2034
|
+
"yellow",
|
|
2035
|
+
`Fix the lines from "/* squadkit-theme ... */" to "/* squadkit-theme:end */" by hand, or delete them, then run this again.`
|
|
2036
|
+
);
|
|
2037
|
+
process.exit(1);
|
|
2038
|
+
}
|
|
2039
|
+
throw err;
|
|
2040
|
+
}
|
|
2041
|
+
if (options.dryRun) {
|
|
2042
|
+
log("yellow", "(dry run \u2014 no files will be changed)");
|
|
2043
|
+
log("dim", `
|
|
2044
|
+
--- ${stylesLabel} (preview) ---`);
|
|
2045
|
+
console.log(result.css);
|
|
2046
|
+
return;
|
|
2047
|
+
}
|
|
2048
|
+
if (!result.changed) {
|
|
2049
|
+
log("dim", ` unchanged: ${stylesLabel}`);
|
|
2050
|
+
log("green", "\nTheme already applied.");
|
|
2051
|
+
return;
|
|
2052
|
+
}
|
|
2053
|
+
writeFileSync4(stylesPath, result.css, "utf-8");
|
|
2054
|
+
log("cyan", ` updated: ${stylesLabel}${result.repaired ? " (theme range added)" : ""}`);
|
|
2055
|
+
log("green", "\nTheme applied successfully!");
|
|
2056
|
+
}
|
|
2057
|
+
|
|
1108
2058
|
// src/index.ts
|
|
1109
2059
|
var HELP = `
|
|
1110
2060
|
Usage: npx @squadbase/vantage-template <command> [options]
|
|
@@ -1112,12 +2062,14 @@ Usage: npx @squadbase/vantage-template <command> [options]
|
|
|
1112
2062
|
Commands:
|
|
1113
2063
|
init Initialize a new Squadbase Vantage project
|
|
1114
2064
|
add <template-name> Apply a UI template to the current project
|
|
2065
|
+
theme <theme-id> Apply a SquadKit theme (neutral, ocean, forest, sunset, violet, rose, mono)
|
|
1115
2066
|
chart <preset-name> Switch the chart color preset
|
|
1116
2067
|
list List available templates and chart presets
|
|
1117
2068
|
|
|
1118
2069
|
Options:
|
|
1119
2070
|
--force Overwrite existing files
|
|
1120
2071
|
--dry-run Show what would be done without making changes
|
|
2072
|
+
--reset-chart Drop the chart preset range so the theme's chart colors apply (theme only)
|
|
1121
2073
|
--skip-install Skip dependency installation after init
|
|
1122
2074
|
--chart <preset> Apply a chart preset during init (e.g. --chart sunset)
|
|
1123
2075
|
--json Output as JSON (for the list / add commands)
|
|
@@ -1135,6 +2087,7 @@ AI customization (add only):
|
|
|
1135
2087
|
Examples:
|
|
1136
2088
|
npx @squadbase/vantage-template init
|
|
1137
2089
|
npx @squadbase/vantage-template list --lang ja
|
|
2090
|
+
npx @squadbase/vantage-template theme ocean
|
|
1138
2091
|
npx @squadbase/vantage-template add kpi-chart-simple \\
|
|
1139
2092
|
--prompt "SaaS MRR/ARR dashboard" --provider openai --apiKey $OPENAI_API_KEY
|
|
1140
2093
|
npx @squadbase/vantage-template add funnel --prompt "..." \\
|
|
@@ -1145,6 +2098,7 @@ async function main() {
|
|
|
1145
2098
|
options: {
|
|
1146
2099
|
force: { type: "boolean", default: false },
|
|
1147
2100
|
"dry-run": { type: "boolean", default: false },
|
|
2101
|
+
"reset-chart": { type: "boolean", default: false },
|
|
1148
2102
|
"skip-install": { type: "boolean", default: false },
|
|
1149
2103
|
chart: { type: "string" },
|
|
1150
2104
|
json: { type: "boolean", default: false },
|
|
@@ -1233,6 +2187,17 @@ async function main() {
|
|
|
1233
2187
|
setChartPreset(presetName, {
|
|
1234
2188
|
dryRun: values["dry-run"] ?? false
|
|
1235
2189
|
});
|
|
2190
|
+
} else if (command === "theme") {
|
|
2191
|
+
const themeId = positionals[1];
|
|
2192
|
+
if (!themeId) {
|
|
2193
|
+
log("red", "Missing theme id.");
|
|
2194
|
+
log("dim", "Usage: npx @squadbase/vantage-template theme <theme-id> [--reset-chart] [--dry-run]");
|
|
2195
|
+
process.exit(1);
|
|
2196
|
+
}
|
|
2197
|
+
setTheme(themeId, {
|
|
2198
|
+
dryRun: values["dry-run"] ?? false,
|
|
2199
|
+
resetChart: values["reset-chart"] ?? false
|
|
2200
|
+
});
|
|
1236
2201
|
} else {
|
|
1237
2202
|
log("red", `Unknown command: "${command}"`);
|
|
1238
2203
|
console.log(HELP);
|