/** * `memi view ` — open the source registry package for a component. * * Resolution order for the source registry: * 1. A fully-qualified ref (`@scope/name/Component`) — parsed directly. * 2. `--from ` flag. * 3. The local installed spec's `__memoireSource.registry` (written by `memi add`). * * Modes: * - Default: open the URL in the system browser. * - `--print`: print the URL to stdout, do not open. * - `--json`: emit `{ url, component, registry }`, do not open. */ import type { Command } from "commander"; import type { MemoireEngine } from "../engine/core.js"; export interface ViewPayload { status: "opened" | "printed" | "failed"; url?: string; marketplaceUrl?: string; component?: string; registry?: string; alias?: string; error?: string; } /** * Parse a possibly-qualified component reference. * Accepts: * - "Button" → { component: "Button" } * - "@acme/ds/Button" → { registry: "@acme/ds", component: "Button" } * - "acme-ds/Button" → { registry: "acme-ds", component: "Button" } */ export declare function parseComponentRef(ref: string): { registry?: string; component: string; }; /** * Launch the system browser without adding a new runtime dep. * Uses the platform's default URL opener. Detached so the CLI can exit. */ export declare function openInBrowser(url: string): void; export declare function registerViewCommand(program: Command, engine: MemoireEngine): void;