@loworbitstudio/visor 0.10.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.json +31 -1
- package/dist/index.js +32 -22
- package/dist/registry.json +196 -22
- package/dist/visor-manifest.json +385 -8
- package/package.json +2 -2
package/dist/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "0.4.0",
|
|
3
|
-
"generated_at": "2026-05-
|
|
3
|
+
"generated_at": "2026-05-18T21:20:42.449Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"accessibility-specimen": {
|
|
6
6
|
"changeType": "current",
|
|
@@ -104,6 +104,12 @@
|
|
|
104
104
|
"breakingChange": false,
|
|
105
105
|
"migrationNote": null
|
|
106
106
|
},
|
|
107
|
+
"chrome-button": {
|
|
108
|
+
"changeType": "current",
|
|
109
|
+
"files": [],
|
|
110
|
+
"breakingChange": false,
|
|
111
|
+
"migrationNote": null
|
|
112
|
+
},
|
|
107
113
|
"code-block": {
|
|
108
114
|
"changeType": "current",
|
|
109
115
|
"files": [],
|
|
@@ -368,6 +374,12 @@
|
|
|
368
374
|
"breakingChange": false,
|
|
369
375
|
"migrationNote": null
|
|
370
376
|
},
|
|
377
|
+
"quick-actions": {
|
|
378
|
+
"changeType": "current",
|
|
379
|
+
"files": [],
|
|
380
|
+
"breakingChange": false,
|
|
381
|
+
"migrationNote": null
|
|
382
|
+
},
|
|
371
383
|
"radio-group": {
|
|
372
384
|
"changeType": "current",
|
|
373
385
|
"files": [],
|
|
@@ -392,6 +404,12 @@
|
|
|
392
404
|
"breakingChange": false,
|
|
393
405
|
"migrationNote": null
|
|
394
406
|
},
|
|
407
|
+
"section-header": {
|
|
408
|
+
"changeType": "current",
|
|
409
|
+
"files": [],
|
|
410
|
+
"breakingChange": false,
|
|
411
|
+
"migrationNote": null
|
|
412
|
+
},
|
|
395
413
|
"select": {
|
|
396
414
|
"changeType": "current",
|
|
397
415
|
"files": [],
|
|
@@ -440,6 +458,12 @@
|
|
|
440
458
|
"breakingChange": false,
|
|
441
459
|
"migrationNote": null
|
|
442
460
|
},
|
|
461
|
+
"sparkline": {
|
|
462
|
+
"changeType": "current",
|
|
463
|
+
"files": [],
|
|
464
|
+
"breakingChange": false,
|
|
465
|
+
"migrationNote": null
|
|
466
|
+
},
|
|
443
467
|
"stat-card": {
|
|
444
468
|
"changeType": "current",
|
|
445
469
|
"files": [],
|
|
@@ -464,6 +488,12 @@
|
|
|
464
488
|
"breakingChange": false,
|
|
465
489
|
"migrationNote": null
|
|
466
490
|
},
|
|
491
|
+
"status-dot": {
|
|
492
|
+
"changeType": "current",
|
|
493
|
+
"files": [],
|
|
494
|
+
"breakingChange": false,
|
|
495
|
+
"migrationNote": null
|
|
496
|
+
},
|
|
467
497
|
"stepper": {
|
|
468
498
|
"changeType": "current",
|
|
469
499
|
"files": [],
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
+
import { readFileSync as readFileSync22 } from "fs";
|
|
5
|
+
import { dirname as dirname8, join as join20 } from "path";
|
|
6
|
+
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
4
7
|
import { Command as Command2 } from "commander";
|
|
5
8
|
|
|
6
9
|
// src/commands/check.ts
|
|
@@ -1173,9 +1176,9 @@ function readPackageJson(cwd) {
|
|
|
1173
1176
|
return JSON.parse(readFileSync5(pkgPath, "utf-8"));
|
|
1174
1177
|
}
|
|
1175
1178
|
function isPackageInstalled(packageName, cwd) {
|
|
1176
|
-
const
|
|
1177
|
-
if (!
|
|
1178
|
-
return !!(
|
|
1179
|
+
const pkg2 = readPackageJson(cwd);
|
|
1180
|
+
if (!pkg2) return false;
|
|
1181
|
+
return !!(pkg2.dependencies?.[packageName] || pkg2.devDependencies?.[packageName]);
|
|
1179
1182
|
}
|
|
1180
1183
|
function hasVisorTokens(cwd) {
|
|
1181
1184
|
return isPackageInstalled("@loworbitstudio/visor-core", cwd);
|
|
@@ -1439,9 +1442,9 @@ function readVisorCliVersion() {
|
|
|
1439
1442
|
const segments = new Array(i).fill("..");
|
|
1440
1443
|
const candidate = join6(here, ...segments, "package.json");
|
|
1441
1444
|
try {
|
|
1442
|
-
const
|
|
1443
|
-
if (
|
|
1444
|
-
return
|
|
1445
|
+
const pkg2 = JSON.parse(readFileSync6(candidate, "utf-8"));
|
|
1446
|
+
if (pkg2.name === "@loworbitstudio/visor" && pkg2.version) {
|
|
1447
|
+
return pkg2.version;
|
|
1445
1448
|
}
|
|
1446
1449
|
} catch {
|
|
1447
1450
|
}
|
|
@@ -2459,7 +2462,9 @@ function themeApplyCommand(file, cwd, options) {
|
|
|
2459
2462
|
};
|
|
2460
2463
|
switch (options.adapter) {
|
|
2461
2464
|
case "nextjs":
|
|
2462
|
-
css = nextjsAdapter2(adapterInput
|
|
2465
|
+
css = nextjsAdapter2(adapterInput, {
|
|
2466
|
+
scopePrefix: options.scopePrefix
|
|
2467
|
+
});
|
|
2463
2468
|
break;
|
|
2464
2469
|
case "fumadocs":
|
|
2465
2470
|
css = fumadocsAdapter(adapterInput);
|
|
@@ -3177,8 +3182,8 @@ function extractFontHints(targetDir) {
|
|
|
3177
3182
|
const pkgPath = join11(targetDir, "package.json");
|
|
3178
3183
|
if (!existsSync9(pkgPath)) return void 0;
|
|
3179
3184
|
try {
|
|
3180
|
-
const
|
|
3181
|
-
const allDeps = { ...
|
|
3185
|
+
const pkg2 = JSON.parse(readFileSync12(pkgPath, "utf-8"));
|
|
3186
|
+
const allDeps = { ...pkg2.dependencies, ...pkg2.devDependencies };
|
|
3182
3187
|
const fonts2 = [];
|
|
3183
3188
|
for (const [dep, _] of Object.entries(allDeps)) {
|
|
3184
3189
|
const family = FONT_PACKAGE_MAP[dep];
|
|
@@ -3216,9 +3221,9 @@ function inferThemeName(targetDir) {
|
|
|
3216
3221
|
const pkgPath = join11(targetDir, "package.json");
|
|
3217
3222
|
if (existsSync9(pkgPath)) {
|
|
3218
3223
|
try {
|
|
3219
|
-
const
|
|
3220
|
-
if (
|
|
3221
|
-
const name =
|
|
3224
|
+
const pkg2 = JSON.parse(readFileSync12(pkgPath, "utf-8"));
|
|
3225
|
+
if (pkg2.name) {
|
|
3226
|
+
const name = pkg2.name.replace(/^@[\w-]+\//, "");
|
|
3222
3227
|
return `${name}-theme`;
|
|
3223
3228
|
}
|
|
3224
3229
|
} catch {
|
|
@@ -3448,11 +3453,11 @@ function detectVisorWorkspace(cwd) {
|
|
|
3448
3453
|
const pkgPath = join12(current, "package.json");
|
|
3449
3454
|
if (existsSync10(pkgPath)) {
|
|
3450
3455
|
try {
|
|
3451
|
-
const
|
|
3452
|
-
const workspaces =
|
|
3456
|
+
const pkg2 = JSON.parse(readFileSync13(pkgPath, "utf-8"));
|
|
3457
|
+
const workspaces = pkg2.workspaces ?? [];
|
|
3453
3458
|
const hasCli = workspaces.some((w) => w.includes("packages/cli"));
|
|
3454
3459
|
const hasEngine = workspaces.some((w) => w.includes("packages/theme-engine"));
|
|
3455
|
-
if (
|
|
3460
|
+
if (pkg2.name === "visor" && hasCli && hasEngine) {
|
|
3456
3461
|
return current;
|
|
3457
3462
|
}
|
|
3458
3463
|
} catch {
|
|
@@ -3840,7 +3845,7 @@ import {
|
|
|
3840
3845
|
} from "fs";
|
|
3841
3846
|
import { join as join15, basename as basename3, resolve as resolve11, sep } from "path";
|
|
3842
3847
|
import { parse as parseYaml2 } from "yaml";
|
|
3843
|
-
import { generateThemeData as generateThemeData4, validateFontCoverage } from "@loworbitstudio/visor-theme-engine";
|
|
3848
|
+
import { generateThemeData as generateThemeData4, validateFontCoverage, formatFontCoverageError } from "@loworbitstudio/visor-theme-engine";
|
|
3844
3849
|
import { docsAdapter as docsAdapter3 } from "@loworbitstudio/visor-theme-engine/adapters";
|
|
3845
3850
|
var PRIVATE_THEMES_REPO_URL = "git@github.com:low-orbit-studio/visor-themes-private.git";
|
|
3846
3851
|
var PRIVATE_THEMES_ENV_VAR = "VISOR_THEMES_PRIVATE_PATH";
|
|
@@ -4239,9 +4244,7 @@ function themeSyncCommand(cwd, options) {
|
|
|
4239
4244
|
const coverage = validateFontCoverage(css);
|
|
4240
4245
|
if (coverage.errors.length > 0) {
|
|
4241
4246
|
for (const e of coverage.errors) {
|
|
4242
|
-
errors.push(
|
|
4243
|
-
`${basename3(filePath)}: ${e.declaredAt} declares "${e.family}" with no matching @font-face. Set typography.<slot>.source: visor-fonts (with org:) or google-fonts, or pick a system font.`
|
|
4244
|
-
);
|
|
4247
|
+
errors.push(formatFontCoverageError(basename3(filePath), e.declaredAt, e.family));
|
|
4245
4248
|
}
|
|
4246
4249
|
return;
|
|
4247
4250
|
}
|
|
@@ -4921,8 +4924,8 @@ async function doctorCommand(cwd, options, cliVersion) {
|
|
|
4921
4924
|
}
|
|
4922
4925
|
const pkgJsonPath = path.join(cwd, "package.json");
|
|
4923
4926
|
try {
|
|
4924
|
-
const
|
|
4925
|
-
const reactVersion =
|
|
4927
|
+
const pkg2 = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
|
|
4928
|
+
const reactVersion = pkg2.dependencies?.react ?? pkg2.devDependencies?.react ?? "";
|
|
4926
4929
|
const versionNum = parseFloat(reactVersion.replace(/[^0-9.]/g, ""));
|
|
4927
4930
|
if (!reactVersion) {
|
|
4928
4931
|
checks.push({
|
|
@@ -5720,8 +5723,12 @@ function migrateTokenSubstitutionCommand(targetArg, cwd, options) {
|
|
|
5720
5723
|
}
|
|
5721
5724
|
|
|
5722
5725
|
// src/index.ts
|
|
5726
|
+
var __dirname2 = dirname8(fileURLToPath3(import.meta.url));
|
|
5727
|
+
var pkg = JSON.parse(
|
|
5728
|
+
readFileSync22(join20(__dirname2, "..", "package.json"), "utf-8")
|
|
5729
|
+
);
|
|
5723
5730
|
var program = new Command2();
|
|
5724
|
-
program.name("visor").description("CLI for the Visor design system").version(
|
|
5731
|
+
program.name("visor").description("CLI for the Visor design system").version(pkg.version);
|
|
5725
5732
|
program.addCommand(checkCommand());
|
|
5726
5733
|
program.command("init").description("Initialize Visor \u2014 with --template nextjs, scaffolds a complete runnable Borealis-native Next.js app in one command").option("--template <name>", "scaffold a complete runnable app (templates: nextjs)").option("--json", "output structured JSON (for AI agents)").action((options) => {
|
|
5727
5734
|
initCommand(process.cwd(), options);
|
|
@@ -5753,6 +5760,9 @@ theme.command("apply").description(
|
|
|
5753
5760
|
).option("--json", "output structured JSON (for AI agents)").option(
|
|
5754
5761
|
"--adapter <name>",
|
|
5755
5762
|
"target adapter: nextjs, fumadocs, deck, docs, flutter"
|
|
5763
|
+
).option(
|
|
5764
|
+
"--scope-prefix <selector>",
|
|
5765
|
+
"(nextjs) CSS selector to wrap all rules under (e.g. 'body.blacklight-theme'); enables body-class theme swap. Default: :root"
|
|
5756
5766
|
).option(
|
|
5757
5767
|
"--package-name <name>",
|
|
5758
5768
|
"(flutter) Dart package name for generated pubspec.yaml (default: ui)"
|