cascivo 0.7.1 → 0.8.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.
@@ -25,6 +25,7 @@ var config_exports = /* @__PURE__ */ __exportAll({
25
25
  installHint: () => installHint,
26
26
  isPackageManager: () => isPackageManager,
27
27
  loadConfig: () => loadConfig,
28
+ pinSpecifier: () => pinSpecifier,
28
29
  resolveConfig: () => resolveConfig
29
30
  });
30
31
  /**
@@ -152,12 +153,34 @@ function detectPackageManager(cwd = process.cwd(), opts = {}) {
152
153
  }
153
154
  return "npm";
154
155
  }
156
+ /**
157
+ * Pin every `@cascivo/*` package to an explicit version specifier.
158
+ *
159
+ * A bare name lets the package manager reuse whatever it already has resolvable. In a pnpm
160
+ * workspace a sibling package's lockfile entry won and `@cascivo/i18n` resolved to **0.2.14**
161
+ * while latest was **0.16.0** — then cascivo warned the adopter about the version it had
162
+ * just installed itself. `add name@latest` (or the registry's known floor) makes the intent
163
+ * explicit instead of leaving it to resolution order.
164
+ *
165
+ * Non-cascivo packages (`@preact/signals-react`) keep their bare name: their version is the
166
+ * app's business, and cascivo has no floor to assert.
167
+ */
168
+ function pinSpecifier(pkg, floors = {}) {
169
+ if (!pkg.startsWith("@cascivo/") && pkg !== "cascivo") return pkg;
170
+ if (pkg.includes("@", 1)) return pkg;
171
+ const floor = floors[pkg];
172
+ if (floor?.startsWith(">=")) return `${pkg}@${floor.slice(2)} - x`;
173
+ return `${pkg}@latest`;
174
+ }
155
175
  /** The install subcommand each package manager uses to add dependencies. */
156
176
  function installCommand(pm, packages, opts = {}) {
177
+ const verb = pm === "npm" ? "install" : "add";
178
+ const devFlag = opts.dev ? [pm === "npm" ? "--save-dev" : "-D"] : [];
179
+ const specs = packages.map((p) => opts.pin && (p.startsWith("@cascivo/") || p === "cascivo") ? `${p}@${opts.pin}` : pinSpecifier(p, opts.floors ?? {}));
157
180
  return [pm, [
158
- pm === "npm" ? "install" : "add",
159
- ...opts.dev ? [pm === "npm" ? "--save-dev" : "-D"] : [],
160
- ...packages
181
+ verb,
182
+ ...devFlag,
183
+ ...specs
161
184
  ]];
162
185
  }
163
186
  /** Human-readable install command a user can copy-paste, e.g. `pnpm add -D cascivo`. */
@@ -168,4 +191,4 @@ function installHint(pm, packages, opts = {}) {
168
191
  //#endregion
169
192
  export { detectPackageManager as a, isPackageManager as c, config_exports as i, loadConfig as l, DEFAULT_CONFIG as n, installCommand as o, THEMES as r, installHint as s, CASCIVO_HOST as t, __exportAll as u };
170
193
 
171
- //# sourceMappingURL=config-C6GdrbvF.mjs.map
194
+ //# sourceMappingURL=config-D7ddWN_9.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-C6GdrbvF.mjs","names":[],"sources":["../src/utils/config.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'node:fs'\nimport { dirname, join } from 'node:path'\nimport { pathToFileURL } from 'node:url'\n\n/**\n * Canonical (and only) host for hosted cascivo artifacts (registry.json, per-item\n * r/<name>.json, marketplace.json, /llms/*, /context/*). The legacy docs.cascivo.com\n * subdomain is retired and 301s here. Keep in sync with CASCIVO_HOST in packages/mcp.\n */\nexport const CASCIVO_HOST = 'https://cascivo.com'\n\n/** All first-party themes shipped by @cascivo/themes (selectable via data-theme). */\nexport const THEMES = [\n 'light',\n 'dark',\n 'warm',\n 'flat',\n 'minimal',\n 'midnight',\n 'pastel',\n 'brutalist',\n 'corporate',\n 'terminal',\n 'cyberpunk',\n 'arcade',\n] as const\n\nexport type ThemeName = (typeof THEMES)[number]\n\nexport type RegistryNamespaceConfig =\n | string\n | { url: string; headers?: Record<string, string>; params?: Record<string, string> }\n\nexport interface CascadeConfig {\n /** URL of the registry.json index. */\n registry: string\n /** Directory (relative to project root) where components are written. */\n outputDir: string\n /** Default theme imported by `cascade init`. */\n theme: ThemeName\n /** Namespace → registry URL template (with {name} placeholder) or auth config. */\n registries?: Record<string, RegistryNamespaceConfig>\n /** Whether to copy test files (*.contract.test.tsx) when adding components. */\n tests?: boolean\n}\n\nexport const DEFAULT_CONFIG: CascadeConfig = {\n // Canonical hosted registry index (served from the landing site, documented in\n // llms.txt). Prefer this over a branch's GitHub raw URL, which 404s for\n // unauthenticated/private-repo requests and breaks `cascivo list`/`add`.\n registry: `${CASCIVO_HOST}/registry.json`,\n outputDir: 'src/components/ui',\n theme: 'light',\n}\n\nconst CONFIG_FILES = ['cascivo.config.ts', 'cascivo.config.js', 'cascivo.config.mjs']\n\n/** Apply defaults over a (possibly partial) user config object. */\nexport function resolveConfig(partial: Partial<CascadeConfig> | null | undefined): CascadeConfig {\n return { ...DEFAULT_CONFIG, ...partial }\n}\n\n/** Let env vars override config — used by the MCP server to pass `outputDir`. */\nexport function applyEnvOverrides(\n config: CascadeConfig,\n env: NodeJS.ProcessEnv = process.env,\n): CascadeConfig {\n return {\n ...config,\n ...(env.CASCIVO_REGISTRY ? { registry: env.CASCIVO_REGISTRY } : {}),\n ...(env.CASCIVO_OUTPUT_DIR ? { outputDir: env.CASCIVO_OUTPUT_DIR } : {}),\n }\n}\n\n/**\n * Locate and load `cascivo.config.{ts,js,mjs}` from `cwd`. Falls back to the\n * default config when no file is found or the file cannot be loaded. Env vars\n * (`CASCIVO_REGISTRY`, `CASCIVO_OUTPUT_DIR`) take precedence.\n */\nexport async function loadConfig(cwd: string = process.cwd()): Promise<CascadeConfig> {\n for (const file of CONFIG_FILES) {\n const path = join(cwd, file)\n if (!existsSync(path)) continue\n try {\n const mod = (await import(pathToFileURL(path).href)) as {\n default?: Partial<CascadeConfig>\n }\n return applyEnvOverrides(resolveConfig(mod.default ?? (mod as Partial<CascadeConfig>)))\n } catch {\n // Unloadable config (e.g. unsupported TS syntax) — fall back to defaults.\n return applyEnvOverrides(resolveConfig(null))\n }\n }\n return applyEnvOverrides(resolveConfig(null))\n}\n\nexport type PackageManager = 'pnpm' | 'yarn' | 'npm' | 'bun'\n\n/** Narrow an arbitrary string to a known PackageManager. */\nexport function isPackageManager(value: string | undefined): value is PackageManager {\n return value === 'pnpm' || value === 'yarn' || value === 'npm' || value === 'bun'\n}\n\n/**\n * Lock files in probe order. `bun.lock` (bun ≥ 1.2 text lockfile) sits beside the\n * legacy binary `bun.lockb`; `package-lock.json` is npm's marker so a walk that\n * reaches an npm workspace root still resolves to npm rather than the default.\n */\nconst PM_LOCKFILES: readonly [string, PackageManager][] = [\n ['pnpm-lock.yaml', 'pnpm'],\n ['yarn.lock', 'yarn'],\n ['bun.lockb', 'bun'],\n ['bun.lock', 'bun'],\n ['package-lock.json', 'npm'],\n]\n\n/** The package manager that invoked this process, from `npm_config_user_agent`. */\nfunction pmFromUserAgent(ua: string | undefined): PackageManager | undefined {\n if (!ua) return undefined\n const name = ua.split('/')[0]\n return isPackageManager(name) ? name : undefined\n}\n\n/** The `packageManager` corepack field of a package.json, if it names a known PM. */\nfunction pmFromPackageJson(dir: string): PackageManager | undefined {\n try {\n const pkg = JSON.parse(readFileSync(join(dir, 'package.json'), 'utf8')) as {\n packageManager?: string\n }\n const name = pkg.packageManager?.split('@')[0]\n return isPackageManager(name) ? name : undefined\n } catch {\n return undefined\n }\n}\n\n/**\n * Detect the package manager in use. Precedence, highest first:\n * 1. explicit override (the `--package-manager`/`--pm` flag)\n * 2. `CASCIVO_PACKAGE_MANAGER` env var\n * 3. `npm_config_user_agent` (the PM that spawned the CLI, e.g. `pnpm dlx`)\n * 4. an upward walk from `cwd` for a lock file or `packageManager` field —\n * this is what makes detection work inside a workspace, where the lock\n * file lives at the repo root, not in the app subdirectory the user runs\n * the CLI from. The walk stops after a directory containing `.git`.\n * 5. default `npm`.\n */\nexport function detectPackageManager(\n cwd: string = process.cwd(),\n opts: { override?: string; env?: NodeJS.ProcessEnv } = {},\n): PackageManager {\n const env = opts.env ?? process.env\n\n if (isPackageManager(opts.override)) return opts.override\n\n const envPm = env.CASCIVO_PACKAGE_MANAGER\n if (isPackageManager(envPm)) return envPm\n\n const uaPm = pmFromUserAgent(env.npm_config_user_agent)\n if (uaPm) return uaPm\n\n let current = cwd\n for (;;) {\n for (const [file, pm] of PM_LOCKFILES) {\n if (existsSync(join(current, file))) return pm\n }\n const fromField = pmFromPackageJson(current)\n if (fromField) return fromField\n // A `.git` directory marks the repo root — do not walk past it.\n if (existsSync(join(current, '.git'))) break\n const parent = dirname(current)\n if (parent === current) break\n current = parent\n }\n\n return 'npm'\n}\n\n/** The install subcommand each package manager uses to add dependencies. */\nexport function installCommand(\n pm: PackageManager,\n packages: string[],\n opts: { dev?: boolean } = {},\n): [string, string[]] {\n const verb = pm === 'npm' ? 'install' : 'add'\n const devFlag = opts.dev ? [pm === 'npm' ? '--save-dev' : '-D'] : []\n return [pm, [verb, ...devFlag, ...packages]]\n}\n\n/** Human-readable install command a user can copy-paste, e.g. `pnpm add -D cascivo`. */\nexport function installHint(\n pm: PackageManager,\n packages: string[],\n opts: { dev?: boolean } = {},\n): string {\n const [cmd, args] = installCommand(pm, packages, opts)\n return `${cmd} ${args.join(' ')}`\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"config-D7ddWN_9.mjs","names":[],"sources":["../src/utils/config.ts"],"sourcesContent":["import { existsSync, readFileSync } from 'node:fs'\nimport { dirname, join } from 'node:path'\nimport { pathToFileURL } from 'node:url'\n\n/**\n * Canonical (and only) host for hosted cascivo artifacts (registry.json, per-item\n * r/<name>.json, marketplace.json, /llms/*, /context/*). The legacy docs.cascivo.com\n * subdomain is retired and 301s here. Keep in sync with CASCIVO_HOST in packages/mcp.\n */\nexport const CASCIVO_HOST = 'https://cascivo.com'\n\n/** All first-party themes shipped by @cascivo/themes (selectable via data-theme). */\nexport const THEMES = [\n 'light',\n 'dark',\n 'warm',\n 'flat',\n 'minimal',\n 'midnight',\n 'pastel',\n 'brutalist',\n 'corporate',\n 'terminal',\n 'cyberpunk',\n 'arcade',\n] as const\n\nexport type ThemeName = (typeof THEMES)[number]\n\nexport type RegistryNamespaceConfig =\n | string\n | { url: string; headers?: Record<string, string>; params?: Record<string, string> }\n\nexport interface CascadeConfig {\n /** URL of the registry.json index. */\n registry: string\n /** Directory (relative to project root) where components are written. */\n outputDir: string\n /** Default theme imported by `cascade init`. */\n theme: ThemeName\n /** Namespace → registry URL template (with {name} placeholder) or auth config. */\n registries?: Record<string, RegistryNamespaceConfig>\n /** Whether to copy test files (*.contract.test.tsx) when adding components. */\n tests?: boolean\n}\n\nexport const DEFAULT_CONFIG: CascadeConfig = {\n // Canonical hosted registry index (served from the landing site, documented in\n // llms.txt). Prefer this over a branch's GitHub raw URL, which 404s for\n // unauthenticated/private-repo requests and breaks `cascivo list`/`add`.\n registry: `${CASCIVO_HOST}/registry.json`,\n outputDir: 'src/components/ui',\n theme: 'light',\n}\n\nconst CONFIG_FILES = ['cascivo.config.ts', 'cascivo.config.js', 'cascivo.config.mjs']\n\n/** Apply defaults over a (possibly partial) user config object. */\nexport function resolveConfig(partial: Partial<CascadeConfig> | null | undefined): CascadeConfig {\n return { ...DEFAULT_CONFIG, ...partial }\n}\n\n/** Let env vars override config — used by the MCP server to pass `outputDir`. */\nexport function applyEnvOverrides(\n config: CascadeConfig,\n env: NodeJS.ProcessEnv = process.env,\n): CascadeConfig {\n return {\n ...config,\n ...(env.CASCIVO_REGISTRY ? { registry: env.CASCIVO_REGISTRY } : {}),\n ...(env.CASCIVO_OUTPUT_DIR ? { outputDir: env.CASCIVO_OUTPUT_DIR } : {}),\n }\n}\n\n/**\n * Locate and load `cascivo.config.{ts,js,mjs}` from `cwd`. Falls back to the\n * default config when no file is found or the file cannot be loaded. Env vars\n * (`CASCIVO_REGISTRY`, `CASCIVO_OUTPUT_DIR`) take precedence.\n */\nexport async function loadConfig(cwd: string = process.cwd()): Promise<CascadeConfig> {\n for (const file of CONFIG_FILES) {\n const path = join(cwd, file)\n if (!existsSync(path)) continue\n try {\n const mod = (await import(pathToFileURL(path).href)) as {\n default?: Partial<CascadeConfig>\n }\n return applyEnvOverrides(resolveConfig(mod.default ?? (mod as Partial<CascadeConfig>)))\n } catch {\n // Unloadable config (e.g. unsupported TS syntax) — fall back to defaults.\n return applyEnvOverrides(resolveConfig(null))\n }\n }\n return applyEnvOverrides(resolveConfig(null))\n}\n\nexport type PackageManager = 'pnpm' | 'yarn' | 'npm' | 'bun'\n\n/** Narrow an arbitrary string to a known PackageManager. */\nexport function isPackageManager(value: string | undefined): value is PackageManager {\n return value === 'pnpm' || value === 'yarn' || value === 'npm' || value === 'bun'\n}\n\n/**\n * Lock files in probe order. `bun.lock` (bun ≥ 1.2 text lockfile) sits beside the\n * legacy binary `bun.lockb`; `package-lock.json` is npm's marker so a walk that\n * reaches an npm workspace root still resolves to npm rather than the default.\n */\nconst PM_LOCKFILES: readonly [string, PackageManager][] = [\n ['pnpm-lock.yaml', 'pnpm'],\n ['yarn.lock', 'yarn'],\n ['bun.lockb', 'bun'],\n ['bun.lock', 'bun'],\n ['package-lock.json', 'npm'],\n]\n\n/** The package manager that invoked this process, from `npm_config_user_agent`. */\nfunction pmFromUserAgent(ua: string | undefined): PackageManager | undefined {\n if (!ua) return undefined\n const name = ua.split('/')[0]\n return isPackageManager(name) ? name : undefined\n}\n\n/** The `packageManager` corepack field of a package.json, if it names a known PM. */\nfunction pmFromPackageJson(dir: string): PackageManager | undefined {\n try {\n const pkg = JSON.parse(readFileSync(join(dir, 'package.json'), 'utf8')) as {\n packageManager?: string\n }\n const name = pkg.packageManager?.split('@')[0]\n return isPackageManager(name) ? name : undefined\n } catch {\n return undefined\n }\n}\n\n/**\n * Detect the package manager in use. Precedence, highest first:\n * 1. explicit override (the `--package-manager`/`--pm` flag)\n * 2. `CASCIVO_PACKAGE_MANAGER` env var\n * 3. `npm_config_user_agent` (the PM that spawned the CLI, e.g. `pnpm dlx`)\n * 4. an upward walk from `cwd` for a lock file or `packageManager` field —\n * this is what makes detection work inside a workspace, where the lock\n * file lives at the repo root, not in the app subdirectory the user runs\n * the CLI from. The walk stops after a directory containing `.git`.\n * 5. default `npm`.\n */\nexport function detectPackageManager(\n cwd: string = process.cwd(),\n opts: { override?: string; env?: NodeJS.ProcessEnv } = {},\n): PackageManager {\n const env = opts.env ?? process.env\n\n if (isPackageManager(opts.override)) return opts.override\n\n const envPm = env.CASCIVO_PACKAGE_MANAGER\n if (isPackageManager(envPm)) return envPm\n\n const uaPm = pmFromUserAgent(env.npm_config_user_agent)\n if (uaPm) return uaPm\n\n let current = cwd\n for (;;) {\n for (const [file, pm] of PM_LOCKFILES) {\n if (existsSync(join(current, file))) return pm\n }\n const fromField = pmFromPackageJson(current)\n if (fromField) return fromField\n // A `.git` directory marks the repo root — do not walk past it.\n if (existsSync(join(current, '.git'))) break\n const parent = dirname(current)\n if (parent === current) break\n current = parent\n }\n\n return 'npm'\n}\n\n/**\n * Pin every `@cascivo/*` package to an explicit version specifier.\n *\n * A bare name lets the package manager reuse whatever it already has resolvable. In a pnpm\n * workspace a sibling package's lockfile entry won and `@cascivo/i18n` resolved to **0.2.14**\n * while latest was **0.16.0** — then cascivo warned the adopter about the version it had\n * just installed itself. `add name@latest` (or the registry's known floor) makes the intent\n * explicit instead of leaving it to resolution order.\n *\n * Non-cascivo packages (`@preact/signals-react`) keep their bare name: their version is the\n * app's business, and cascivo has no floor to assert.\n */\nexport function pinSpecifier(pkg: string, floors: Record<string, string> = {}): string {\n if (!pkg.startsWith('@cascivo/') && pkg !== 'cascivo') return pkg\n if (pkg.includes('@', 1)) return pkg // already carries an explicit version\n const floor = floors[pkg]\n // `>=x.y.z` is not an installable specifier on its own; widen it to a range the package\n // manager understands, so a known floor is honoured rather than silently ignored.\n if (floor?.startsWith('>=')) return `${pkg}@${floor.slice(2)} - x`\n return `${pkg}@latest`\n}\n\n/** The install subcommand each package manager uses to add dependencies. */\nexport function installCommand(\n pm: PackageManager,\n packages: string[],\n opts: { dev?: boolean; floors?: Record<string, string>; pin?: string } = {},\n): [string, string[]] {\n const verb = pm === 'npm' ? 'install' : 'add'\n const devFlag = opts.dev ? [pm === 'npm' ? '--save-dev' : '-D'] : []\n const specs = packages.map((p) =>\n opts.pin && (p.startsWith('@cascivo/') || p === 'cascivo')\n ? `${p}@${opts.pin}`\n : pinSpecifier(p, opts.floors ?? {}),\n )\n return [pm, [verb, ...devFlag, ...specs]]\n}\n\n/** Human-readable install command a user can copy-paste, e.g. `pnpm add -D cascivo`. */\nexport function installHint(\n pm: PackageManager,\n packages: string[],\n opts: { dev?: boolean } = {},\n): string {\n const [cmd, args] = installCommand(pm, packages, opts)\n return `${cmd} ${args.join(' ')}`\n}\n"],"mappings":"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"}
@@ -2,25 +2,28 @@ import { t as readFileSafe } from "./fs-m7ZvuBBm.mjs";
2
2
  import { c as findComponent, n as readLock, o as fetchRegistry, r as sha256 } from "./lock-CW8UuEPJ.mjs";
3
3
  import { t as checkPeerVersions } from "./peer-versions-Cep8Brn3.mjs";
4
4
  //#region src/commands/drift.ts
5
- /**
6
- * `cascivo doctor --drift` — compares installed components against the
7
- * registry. Two drift classes:
8
- *
9
- * 1. Local-edit drift: an installed file's content no longer matches what
10
- * was copied at install time (hand edits, or deleted after install).
11
- * 2. Peer-version drift: the currently-registered component source needs a
12
- * newer `@cascivo/*` peer package (per `peerVersions`) than what's
13
- * actually installed in node_modules — the dashboard-feedback failure
14
- * mode (DataTable referencing an i18n builtin key an older published
15
- * @cascivo/i18n build doesn't have).
16
- */
17
5
  async function runDoctorDrift(config, cwd = process.cwd()) {
18
6
  const lock = await readLock(cwd);
19
7
  if (!lock || Object.keys(lock.items).length === 0) {
20
8
  console.log("No installed components found in cascivo.lock.");
21
- return;
9
+ return {
10
+ ran: false,
11
+ reason: "no components installed (cascivo.lock is empty or missing)",
12
+ issues: 0
13
+ };
14
+ }
15
+ let registry;
16
+ try {
17
+ registry = await fetchRegistry(config.registry);
18
+ } catch (error) {
19
+ const reason = `could not reach the registry (${error instanceof Error ? error.message : String(error)})`;
20
+ console.log(`Drift check skipped: ${reason}`);
21
+ return {
22
+ ran: false,
23
+ reason,
24
+ issues: 0
25
+ };
22
26
  }
23
- const registry = await fetchRegistry(config.registry);
24
27
  let driftCount = 0;
25
28
  for (const [name, entry] of Object.entries(lock.items)) {
26
29
  const current = findComponent(registry, name);
@@ -50,8 +53,12 @@ async function runDoctorDrift(config, cwd = process.cwd()) {
50
53
  console.log(`\n${driftCount} drift issue(s) found.`);
51
54
  process.exitCode = 1;
52
55
  } else console.log("No drift detected — installed components match the registry.");
56
+ return {
57
+ ran: true,
58
+ issues: driftCount
59
+ };
53
60
  }
54
61
  //#endregion
55
62
  export { runDoctorDrift };
56
63
 
57
- //# sourceMappingURL=drift-qTzJ75Ds.mjs.map
64
+ //# sourceMappingURL=drift-B02BbFN_.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drift-B02BbFN_.mjs","names":[],"sources":["../src/commands/drift.ts"],"sourcesContent":["import type { CascadeConfig } from '../utils/config.js'\nimport { readFileSafe } from '../utils/fs.js'\nimport { readLock, sha256 } from '../utils/lock.js'\nimport { checkPeerVersions } from '../utils/peer-versions.js'\nimport { fetchRegistry, findComponent } from '../utils/registry.js'\n\n/**\n * `cascivo doctor --drift` — compares installed components against the\n * registry. Two drift classes:\n *\n * 1. Local-edit drift: an installed file's content no longer matches what\n * was copied at install time (hand edits, or deleted after install).\n * 2. Peer-version drift: the currently-registered component source needs a\n * newer `@cascivo/*` peer package (per `peerVersions`) than what's\n * actually installed in node_modules — the dashboard-feedback failure\n * mode (DataTable referencing an i18n builtin key an older published\n * @cascivo/i18n build doesn't have).\n */\n/**\n * What a drift run actually managed to do.\n *\n * `runDoctorDrift` used to return void, so the default `cascivo doctor` could not run it and\n * still say something honest. That is how \"No violations found.\" got printed by a run that\n * had never looked: the two were disjoint branches, and `--drift` reported five real issues\n * on the same project.\n */\nexport interface DriftOutcome {\n /** False when the check could not run at all (no lockfile, offline, unreachable registry). */\n ran: boolean\n /** Why it could not run — printed instead of an unqualified \"clean\". */\n reason?: string\n issues: number\n}\n\nexport async function runDoctorDrift(\n config: CascadeConfig,\n cwd: string = process.cwd(),\n): Promise<DriftOutcome> {\n const lock = await readLock(cwd)\n if (!lock || Object.keys(lock.items).length === 0) {\n console.log('No installed components found in cascivo.lock.')\n return {\n ran: false,\n reason: 'no components installed (cascivo.lock is empty or missing)',\n issues: 0,\n }\n }\n\n let registry: Awaited<ReturnType<typeof fetchRegistry>>\n try {\n registry = await fetchRegistry(config.registry)\n } catch (error) {\n const reason = `could not reach the registry (${error instanceof Error ? error.message : String(error)})`\n console.log(`Drift check skipped: ${reason}`)\n return { ran: false, reason, issues: 0 }\n }\n let driftCount = 0\n\n for (const [name, entry] of Object.entries(lock.items)) {\n const current = findComponent(registry, name)\n if (!current) continue\n\n for (const [path, lockedHash] of Object.entries(entry.files)) {\n const content = await readFileSafe(path)\n if (content === null) {\n console.log(`${name}: ${path} is missing (installed, then deleted)`)\n driftCount++\n continue\n }\n if (sha256(content) !== lockedHash) {\n console.log(`${name}: ${path} has local edits (differs from the version installed)`)\n driftCount++\n }\n }\n\n if (current.peerVersions) {\n const violations = await checkPeerVersions(cwd, current.peerVersions)\n for (const v of violations) {\n const installedDesc = v.installed ? `${v.installed} is installed` : 'it is not installed'\n console.log(`${name}: needs ${v.pkg} ${v.required}, but ${installedDesc}.`)\n driftCount++\n }\n }\n }\n\n if (driftCount > 0) {\n console.log(`\\n${driftCount} drift issue(s) found.`)\n process.exitCode = 1\n } else {\n console.log('No drift detected — installed components match the registry.')\n }\n return { ran: true, issues: driftCount }\n}\n"],"mappings":";;;;AAkCA,eAAsB,eACpB,QACA,MAAc,QAAQ,IAAI,GACH;CACvB,MAAM,OAAO,MAAM,SAAS,GAAG;CAC/B,IAAI,CAAC,QAAQ,OAAO,KAAK,KAAK,KAAK,CAAC,CAAC,WAAW,GAAG;EACjD,QAAQ,IAAI,gDAAgD;EAC5D,OAAO;GACL,KAAK;GACL,QAAQ;GACR,QAAQ;EACV;CACF;CAEA,IAAI;CACJ,IAAI;EACF,WAAW,MAAM,cAAc,OAAO,QAAQ;CAChD,SAAS,OAAO;EACd,MAAM,SAAS,iCAAiC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAE;EACvG,QAAQ,IAAI,wBAAwB,QAAQ;EAC5C,OAAO;GAAE,KAAK;GAAO;GAAQ,QAAQ;EAAE;CACzC;CACA,IAAI,aAAa;CAEjB,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,KAAK,KAAK,GAAG;EACtD,MAAM,UAAU,cAAc,UAAU,IAAI;EAC5C,IAAI,CAAC,SAAS;EAEd,KAAK,MAAM,CAAC,MAAM,eAAe,OAAO,QAAQ,MAAM,KAAK,GAAG;GAC5D,MAAM,UAAU,MAAM,aAAa,IAAI;GACvC,IAAI,YAAY,MAAM;IACpB,QAAQ,IAAI,GAAG,KAAK,IAAI,KAAK,sCAAsC;IACnE;IACA;GACF;GACA,IAAI,OAAO,OAAO,MAAM,YAAY;IAClC,QAAQ,IAAI,GAAG,KAAK,IAAI,KAAK,sDAAsD;IACnF;GACF;EACF;EAEA,IAAI,QAAQ,cAAc;GACxB,MAAM,aAAa,MAAM,kBAAkB,KAAK,QAAQ,YAAY;GACpE,KAAK,MAAM,KAAK,YAAY;IAC1B,MAAM,gBAAgB,EAAE,YAAY,GAAG,EAAE,UAAU,iBAAiB;IACpE,QAAQ,IAAI,GAAG,KAAK,UAAU,EAAE,IAAI,GAAG,EAAE,SAAS,QAAQ,cAAc,EAAE;IAC1E;GACF;EACF;CACF;CAEA,IAAI,aAAa,GAAG;EAClB,QAAQ,IAAI,KAAK,WAAW,uBAAuB;EACnD,QAAQ,WAAW;CACrB,OACE,QAAQ,IAAI,8DAA8D;CAE5E,OAAO;EAAE,KAAK;EAAM,QAAQ;CAAW;AACzC"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.16.0",
2
+ "version": "0.17.0",
3
3
  "tokens": [
4
4
  { "name": "--cascivo-gray-0", "resolvedDefault": "oklch(1 0 0)" },
5
5
  { "name": "--cascivo-gray-50", "resolvedDefault": "oklch(0.985 0.002 264)" },
@@ -92,6 +92,14 @@
92
92
  { "name": "--cascivo-text-2xl", "resolvedDefault": "1.5rem" },
93
93
  { "name": "--cascivo-text-3xl", "resolvedDefault": "1.875rem" },
94
94
  { "name": "--cascivo-text-4xl", "resolvedDefault": "2.25rem" },
95
+ { "name": "--cascivo-font-size-xs", "resolvedDefault": "0.75rem" },
96
+ { "name": "--cascivo-font-size-sm", "resolvedDefault": "0.875rem" },
97
+ { "name": "--cascivo-font-size-base", "resolvedDefault": "1rem" },
98
+ { "name": "--cascivo-font-size-lg", "resolvedDefault": "1.125rem" },
99
+ { "name": "--cascivo-font-size-xl", "resolvedDefault": "1.25rem" },
100
+ { "name": "--cascivo-font-size-2xl", "resolvedDefault": "1.5rem" },
101
+ { "name": "--cascivo-font-size-3xl", "resolvedDefault": "1.875rem" },
102
+ { "name": "--cascivo-font-size-4xl", "resolvedDefault": "2.25rem" },
95
103
  { "name": "--cascivo-font-normal", "resolvedDefault": "400" },
96
104
  { "name": "--cascivo-font-medium", "resolvedDefault": "500" },
97
105
  { "name": "--cascivo-font-semibold", "resolvedDefault": "600" },
@@ -502,7 +510,8 @@
502
510
  { "name": "footer", "type": "ReactNode", "required": false },
503
511
  { "name": "open", "type": "boolean", "required": false },
504
512
  { "name": "defaultOpen", "type": "boolean", "required": false },
505
- { "name": "onOpenChange", "type": "(open: boolean) => void", "required": false }
513
+ { "name": "onOpenChange", "type": "(open: boolean) => void", "required": false },
514
+ { "name": "padding", "type": "SpaceStep | 'none'", "required": false }
506
515
  ]
507
516
  },
508
517
  {
@@ -1117,6 +1126,16 @@
1117
1126
  { "name": "className", "type": "string", "required": false }
1118
1127
  ]
1119
1128
  },
1129
+ {
1130
+ "name": "InfiniteScroll",
1131
+ "props": [
1132
+ { "name": "onLoadMore", "type": "() => Promise<unknown> | unknown", "required": true },
1133
+ { "name": "disabled", "type": "boolean", "required": false },
1134
+ { "name": "rootMargin", "type": "string", "required": false },
1135
+ { "name": "labels", "type": "{ loadMore?: string; loading?: string }", "required": false },
1136
+ { "name": "className", "type": "string", "required": false }
1137
+ ]
1138
+ },
1120
1139
  {
1121
1140
  "name": "InlineLoading",
1122
1141
  "props": [
@@ -1180,6 +1199,18 @@
1180
1199
  { "name": "labels", "type": "{ required?: string }", "required": false }
1181
1200
  ]
1182
1201
  },
1202
+ {
1203
+ "name": "LargeTitleHeader",
1204
+ "props": [
1205
+ { "name": "title", "type": "string", "required": true },
1206
+ { "name": "children", "type": "React.ReactNode", "required": true },
1207
+ { "name": "leading", "type": "React.ReactNode", "required": false },
1208
+ { "name": "actions", "type": "React.ReactNode", "required": false },
1209
+ { "name": "level", "type": "1 | 2 | 3", "required": false },
1210
+ { "name": "collapseDistance", "type": "number", "required": false },
1211
+ { "name": "className", "type": "string", "required": false }
1212
+ ]
1213
+ },
1183
1214
  {
1184
1215
  "name": "Link",
1185
1216
  "props": [
@@ -1531,6 +1562,20 @@
1531
1562
  { "name": "format", "type": "Intl.RelativeTimeFormatOptions", "required": false }
1532
1563
  ]
1533
1564
  },
1565
+ {
1566
+ "name": "ReorderList",
1567
+ "props": [
1568
+ { "name": "value", "type": "ReorderItem[]", "required": true },
1569
+ { "name": "onValueChange", "type": "(value: ReorderItem[]) => void", "required": true },
1570
+ { "name": "disabled", "type": "boolean", "required": false },
1571
+ {
1572
+ "name": "labels",
1573
+ "type": "{ handle?: string; grabbed?: string; moved?: string; dropped?: string; cancelled?: string }",
1574
+ "required": false
1575
+ },
1576
+ { "name": "className", "type": "string", "required": false }
1577
+ ]
1578
+ },
1534
1579
  {
1535
1580
  "name": "Resizable",
1536
1581
  "props": [
@@ -1984,10 +2029,38 @@
1984
2029
  { "name": "avatarProps", "type": "AvatarProps", "required": false }
1985
2030
  ]
1986
2031
  },
2032
+ {
2033
+ "name": "VirtualList",
2034
+ "props": [
2035
+ { "name": "items", "type": "Item[]", "required": true },
2036
+ { "name": "itemHeight", "type": "number", "required": true },
2037
+ { "name": "height", "type": "number", "required": true },
2038
+ {
2039
+ "name": "renderItem",
2040
+ "type": "(item: Item, index: number) => React.ReactNode",
2041
+ "required": true
2042
+ },
2043
+ { "name": "overscan", "type": "number", "required": false },
2044
+ { "name": "ariaLabel", "type": "string", "required": false },
2045
+ { "name": "className", "type": "string", "required": false }
2046
+ ]
2047
+ },
1987
2048
  {
1988
2049
  "name": "VisuallyHidden",
1989
2050
  "props": [{ "name": "children", "type": "ReactNode", "required": true }]
1990
2051
  },
2052
+ {
2053
+ "name": "WheelPicker",
2054
+ "props": [
2055
+ { "name": "options", "type": "WheelPickerOption[]", "required": true },
2056
+ { "name": "value", "type": "string", "required": true },
2057
+ { "name": "onValueChange", "type": "(value: string) => void", "required": true },
2058
+ { "name": "visibleCount", "type": "number", "required": false },
2059
+ { "name": "itemHeight", "type": "number", "required": false },
2060
+ { "name": "ariaLabel", "type": "string", "required": false },
2061
+ { "name": "className", "type": "string", "required": false }
2062
+ ]
2063
+ },
1991
2064
  {
1992
2065
  "name": "AppFrame",
1993
2066
  "props": [
@@ -2181,7 +2254,17 @@
2181
2254
  "type": "boolean | { method?: 'lttb' | 'minmax'; threshold?: number }",
2182
2255
  "required": false
2183
2256
  },
2184
- { "name": "toolbox", "type": "boolean | ToolboxOptions", "required": false }
2257
+ { "name": "toolbox", "type": "boolean | ToolboxOptions", "required": false },
2258
+ {
2259
+ "name": "format",
2260
+ "type": "(value: number | string | Date) => string",
2261
+ "required": false
2262
+ },
2263
+ {
2264
+ "name": "secondAxis",
2265
+ "type": "{ label?: string; format?: (value: number) => string }",
2266
+ "required": false
2267
+ }
2185
2268
  ]
2186
2269
  },
2187
2270
  {
@@ -2215,7 +2298,8 @@
2215
2298
  },
2216
2299
  { "name": "onSelect", "type": "(point: ChartPoint) => void", "required": false },
2217
2300
  { "name": "fill", "type": "'solid' | 'gradient' | 'pattern'", "required": false },
2218
- { "name": "patternKind", "type": "'dots' | 'lines' | 'cross'", "required": false }
2301
+ { "name": "patternKind", "type": "'dots' | 'lines' | 'cross'", "required": false },
2302
+ { "name": "format", "type": "(value: number | string | Date) => string", "required": false }
2219
2303
  ]
2220
2304
  },
2221
2305
  {
@@ -2231,7 +2315,8 @@
2231
2315
  { "name": "width", "type": "number", "required": false },
2232
2316
  { "name": "height", "type": "number", "required": false },
2233
2317
  { "name": "className", "type": "string", "required": false },
2234
- { "name": "plain", "type": "boolean", "required": false }
2318
+ { "name": "plain", "type": "boolean", "required": false },
2319
+ { "name": "format", "type": "(value: number | string | Date) => string", "required": false }
2235
2320
  ]
2236
2321
  },
2237
2322
  {
@@ -2249,7 +2334,12 @@
2249
2334
  { "name": "tooltip", "type": "boolean", "required": false },
2250
2335
  { "name": "className", "type": "string", "required": false },
2251
2336
  { "name": "plain", "type": "boolean", "required": false },
2252
- { "name": "glyph", "type": "GlyphShape | ((d, seriesId) => GlyphShape)", "required": false }
2337
+ {
2338
+ "name": "glyph",
2339
+ "type": "GlyphShape | ((d, seriesId) => GlyphShape)",
2340
+ "required": false
2341
+ },
2342
+ { "name": "format", "type": "(value: number | string | Date) => string", "required": false }
2253
2343
  ]
2254
2344
  },
2255
2345
  {
@@ -2302,7 +2392,8 @@
2302
2392
  { "name": "dataZoom", "type": "boolean", "required": false },
2303
2393
  { "name": "zoom", "type": "boolean", "required": false },
2304
2394
  { "name": "syncId", "type": "string", "required": false },
2305
- { "name": "tooltipMode", "type": "'item' | 'axis'", "required": false }
2395
+ { "name": "tooltipMode", "type": "'item' | 'axis'", "required": false },
2396
+ { "name": "format", "type": "(value: number | string | Date) => string", "required": false }
2306
2397
  ]
2307
2398
  },
2308
2399
  {
@@ -2318,7 +2409,16 @@
2318
2409
  { "name": "tooltip", "type": "boolean", "required": false },
2319
2410
  { "name": "className", "type": "string", "required": false },
2320
2411
  { "name": "plain", "type": "boolean", "required": false },
2321
- { "name": "annotations", "type": "Annotation[]", "required": false }
2412
+ { "name": "annotations", "type": "Annotation[]", "required": false },
2413
+ { "name": "barsLabel", "type": "string", "required": false },
2414
+ {
2415
+ "name": "format",
2416
+ "type": "(value: number | string | Date) => string",
2417
+ "required": false
2418
+ },
2419
+ { "name": "legend", "type": "boolean", "required": false },
2420
+ { "name": "lineLabel", "type": "string", "required": false },
2421
+ { "name": "xLabelEvery", "type": "number", "required": false }
2322
2422
  ]
2323
2423
  },
2324
2424
  {
@@ -2364,7 +2464,8 @@
2364
2464
  { "name": "className", "type": "string", "required": false },
2365
2465
  { "name": "plain", "type": "boolean", "required": false },
2366
2466
  { "name": "visualMap", "type": "VisualMapOptions", "required": false },
2367
- { "name": "toolbox", "type": "boolean | ToolboxOptions", "required": false }
2467
+ { "name": "toolbox", "type": "boolean | ToolboxOptions", "required": false },
2468
+ { "name": "format", "type": "(value: number | string | Date) => string", "required": false }
2368
2469
  ]
2369
2470
  },
2370
2471
  {
@@ -2378,7 +2479,8 @@
2378
2479
  { "name": "width", "type": "number", "required": false },
2379
2480
  { "name": "height", "type": "number", "required": false },
2380
2481
  { "name": "className", "type": "string", "required": false },
2381
- { "name": "plain", "type": "boolean", "required": false }
2482
+ { "name": "plain", "type": "boolean", "required": false },
2483
+ { "name": "format", "type": "(value: number | string | Date) => string", "required": false }
2382
2484
  ]
2383
2485
  },
2384
2486
  {
@@ -2463,6 +2565,11 @@
2463
2565
  "name": "onAfterDraw",
2464
2566
  "type": "(ctx: { width: number; height: number }) => ReactNode",
2465
2567
  "required": false
2568
+ },
2569
+ {
2570
+ "name": "secondAxis",
2571
+ "type": "{ label?: string; format?: (value: number) => string }",
2572
+ "required": false
2466
2573
  }
2467
2574
  ]
2468
2575
  },
@@ -2504,7 +2611,8 @@
2504
2611
  "type": "boolean | { format?: (v: number) => string; position?: string }",
2505
2612
  "required": false
2506
2613
  },
2507
- { "name": "onSelect", "type": "(point: ChartPoint) => void", "required": false }
2614
+ { "name": "onSelect", "type": "(point: ChartPoint) => void", "required": false },
2615
+ { "name": "tooltip", "type": "boolean", "required": false }
2508
2616
  ]
2509
2617
  },
2510
2618
  {
@@ -2599,7 +2707,8 @@
2599
2707
  },
2600
2708
  { "name": "renderer", "type": "'svg' | 'canvas' | 'auto'", "required": false },
2601
2709
  { "name": "visualMap", "type": "VisualMapOptions", "required": false },
2602
- { "name": "toolbox", "type": "boolean | ToolboxOptions", "required": false }
2710
+ { "name": "toolbox", "type": "boolean | ToolboxOptions", "required": false },
2711
+ { "name": "format", "type": "(value: number | string | Date) => string", "required": false }
2603
2712
  ]
2604
2713
  },
2605
2714
  {
@@ -2628,7 +2737,8 @@
2628
2737
  { "name": "legend", "type": "boolean", "required": false },
2629
2738
  { "name": "tooltip", "type": "boolean", "required": false },
2630
2739
  { "name": "className", "type": "string", "required": false },
2631
- { "name": "plain", "type": "boolean", "required": false }
2740
+ { "name": "plain", "type": "boolean", "required": false },
2741
+ { "name": "format", "type": "(value: number | string | Date) => string", "required": false }
2632
2742
  ]
2633
2743
  },
2634
2744
  {
@@ -2687,7 +2797,8 @@
2687
2797
  },
2688
2798
  { "name": "commands", "type": "SlashCommand[]", "required": false },
2689
2799
  { "name": "ref", "type": "Ref<CodeEditorHandle>", "required": false },
2690
- { "name": "className", "type": "string", "required": false }
2800
+ { "name": "className", "type": "string", "required": false },
2801
+ { "name": "virtualize", "type": "boolean", "required": false }
2691
2802
  ]
2692
2803
  },
2693
2804
  {
@@ -2699,7 +2810,9 @@
2699
2810
  { "name": "wrap", "type": "boolean", "required": false },
2700
2811
  { "name": "tabSize", "type": "number", "required": false },
2701
2812
  { "name": "label", "type": "string", "required": false },
2702
- { "name": "className", "type": "string", "required": false }
2813
+ { "name": "className", "type": "string", "required": false },
2814
+ { "name": "gutterRef", "type": "Ref<HTMLDivElement>", "required": false },
2815
+ { "name": "preRef", "type": "Ref<HTMLPreElement>", "required": false }
2703
2816
  ]
2704
2817
  },
2705
2818
  {
@@ -2779,7 +2892,15 @@
2779
2892
  "required": false
2780
2893
  },
2781
2894
  { "name": "interactive", "type": "boolean", "required": false },
2782
- { "name": "className", "type": "string", "required": false }
2895
+ { "name": "className", "type": "string", "required": false },
2896
+ {
2897
+ "name": "activeDirection",
2898
+ "type": "'forward' | 'reverse' | undefined",
2899
+ "required": false
2900
+ },
2901
+ { "name": "activeEdgeId", "type": "string | undefined", "required": false },
2902
+ { "name": "maxZoom", "type": "number", "required": false },
2903
+ { "name": "minZoom", "type": "number", "required": false }
2783
2904
  ]
2784
2905
  },
2785
2906
  {
@@ -2822,7 +2943,12 @@
2822
2943
  { "name": "selected", "type": "boolean", "required": false },
2823
2944
  { "name": "markerStart", "type": "boolean", "required": false },
2824
2945
  { "name": "markerEnd", "type": "boolean", "required": false },
2825
- { "name": "className", "type": "string", "required": false }
2946
+ { "name": "className", "type": "string", "required": false },
2947
+ { "name": "active", "type": "boolean | undefined", "required": false },
2948
+ { "name": "direction", "type": "'forward' | 'reverse' | undefined", "required": false },
2949
+ { "name": "id", "type": "string", "required": false },
2950
+ { "name": "sourcePosition", "type": "HandlePosition | undefined", "required": false },
2951
+ { "name": "targetPosition", "type": "HandlePosition | undefined", "required": false }
2826
2952
  ]
2827
2953
  },
2828
2954
  {
@@ -2850,7 +2976,9 @@
2850
2976
  "required": false
2851
2977
  },
2852
2978
  { "name": "onViewportChange", "type": "(viewport: Viewport) => void", "required": false },
2853
- { "name": "className", "type": "string", "required": false }
2979
+ { "name": "className", "type": "string", "required": false },
2980
+ { "name": "label", "type": "string | undefined", "required": false },
2981
+ { "name": "nodeColor", "type": "string | undefined", "required": false }
2854
2982
  ]
2855
2983
  },
2856
2984
  {
@@ -2866,7 +2994,8 @@
2866
2994
  { "name": "interactive", "type": "boolean", "required": false },
2867
2995
  { "name": "onSelect", "type": "(id: string) => void", "required": false },
2868
2996
  { "name": "children", "type": "ReactNode", "required": false },
2869
- { "name": "className", "type": "string", "required": false }
2997
+ { "name": "className", "type": "string", "required": false },
2998
+ { "name": "onMeasure", "type": "(size: NodeSize) => void", "required": false }
2870
2999
  ]
2871
3000
  },
2872
3001
  {
@@ -2896,7 +3025,10 @@
2896
3025
  { "name": "controls", "type": "boolean", "required": false },
2897
3026
  { "name": "autoPlay", "type": "boolean", "required": false },
2898
3027
  { "name": "interactive", "type": "boolean", "required": false },
2899
- { "name": "className", "type": "string", "required": false }
3028
+ { "name": "className", "type": "string", "required": false },
3029
+ { "name": "background", "type": "boolean", "required": false },
3030
+ { "name": "clock", "type": "StoryClock", "required": false },
3031
+ { "name": "labels", "type": "FlowStoryLabels", "required": false }
2900
3032
  ]
2901
3033
  },
2902
3034
  {
@@ -2910,7 +3042,11 @@
2910
3042
  { "name": "panOnDrag", "type": "boolean", "required": false },
2911
3043
  { "name": "zoomOnScroll", "type": "boolean", "required": false },
2912
3044
  { "name": "fitView", "type": "boolean", "required": false },
2913
- { "name": "className", "type": "string", "required": false }
3045
+ { "name": "className", "type": "string", "required": false },
3046
+ { "name": "chrome", "type": "ReactNode", "required": false },
3047
+ { "name": "controller", "type": "UseViewportReturn", "required": false },
3048
+ { "name": "defaultViewport", "type": "Viewport", "required": false },
3049
+ { "name": "flow", "type": "FlowStore", "required": false }
2914
3050
  ]
2915
3051
  }
2916
3052
  ],