@adieyal/catalogue-cli 0.1.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.
Files changed (50) hide show
  1. package/dist/bin.d.ts +5 -0
  2. package/dist/bin.d.ts.map +1 -0
  3. package/dist/bin.js +53 -0
  4. package/dist/bin.js.map +1 -0
  5. package/dist/commands/build.d.ts +9 -0
  6. package/dist/commands/build.d.ts.map +1 -0
  7. package/dist/commands/dev.d.ts +9 -0
  8. package/dist/commands/dev.d.ts.map +1 -0
  9. package/dist/commands/index.d.ts +8 -0
  10. package/dist/commands/index.d.ts.map +1 -0
  11. package/dist/commands/init.d.ts +7 -0
  12. package/dist/commands/init.d.ts.map +1 -0
  13. package/dist/commands/new.d.ts +11 -0
  14. package/dist/commands/new.d.ts.map +1 -0
  15. package/dist/commands/preview.d.ts +9 -0
  16. package/dist/commands/preview.d.ts.map +1 -0
  17. package/dist/commands/test.d.ts +10 -0
  18. package/dist/commands/test.d.ts.map +1 -0
  19. package/dist/commands/validate.d.ts +8 -0
  20. package/dist/commands/validate.d.ts.map +1 -0
  21. package/dist/config/index.d.ts +3 -0
  22. package/dist/config/index.d.ts.map +1 -0
  23. package/dist/config/loader.d.ts +17 -0
  24. package/dist/config/loader.d.ts.map +1 -0
  25. package/dist/config/schema.d.ts +229 -0
  26. package/dist/config/schema.d.ts.map +1 -0
  27. package/dist/index.d.ts +11 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +23 -0
  30. package/dist/index.js.map +1 -0
  31. package/dist/init-CI0WzrG1.js +2702 -0
  32. package/dist/init-CI0WzrG1.js.map +1 -0
  33. package/dist/registry/file-loader.d.ts +21 -0
  34. package/dist/registry/file-loader.d.ts.map +1 -0
  35. package/dist/registry/index.d.ts +2 -0
  36. package/dist/registry/index.d.ts.map +1 -0
  37. package/dist/vite/entry.d.ts +6 -0
  38. package/dist/vite/entry.d.ts.map +1 -0
  39. package/dist/vite/index.d.ts +4 -0
  40. package/dist/vite/index.d.ts.map +1 -0
  41. package/dist/vite/plugin.d.ts +15 -0
  42. package/dist/vite/plugin.d.ts.map +1 -0
  43. package/dist/vite/server.d.ts +15 -0
  44. package/dist/vite/server.d.ts.map +1 -0
  45. package/package.json +59 -0
  46. package/skills/document-component.md +83 -0
  47. package/skills/migrate-library.md +193 -0
  48. package/skills/new-component.md +98 -0
  49. package/skills/new-scenario.md +56 -0
  50. package/skills/setup-tokens.md +148 -0
package/dist/bin.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * CLI entry point for the catalogue.
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":"AAAA;;GAEG"}
package/dist/bin.js ADDED
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+ import { cac } from "cac";
3
+ import { f as dev, h as build, p as preview, v as validate, t as test, n as newComponent, i as init } from "./init-CI0WzrG1.js";
4
+ const cli = cac("catalogue");
5
+ cli.command("dev", "Start the development server").option("-c, --config <file>", "Path to config file").option("-p, --port <port>", "Port to listen on").action((options) => {
6
+ dev({
7
+ config: options.config,
8
+ port: options.port ? parseInt(options.port, 10) : void 0
9
+ });
10
+ });
11
+ cli.command("build", "Build the static catalogue").option("-c, --config <file>", "Path to config file").option("-o, --out-dir <dir>", "Output directory").action((options) => {
12
+ build({
13
+ config: options.config,
14
+ outDir: options.outDir
15
+ });
16
+ });
17
+ cli.command("preview", "Preview the built catalogue").option("-c, --config <file>", "Path to config file").option("-p, --port <port>", "Port to listen on").action((options) => {
18
+ preview({
19
+ config: options.config,
20
+ port: options.port ? parseInt(options.port, 10) : void 0
21
+ });
22
+ });
23
+ cli.command("validate", "Validate the component registry").option("-c, --config <file>", "Path to config file").action((options) => {
24
+ validate({
25
+ config: options.config
26
+ });
27
+ });
28
+ cli.command("test", "Run Playwright visual tests").option("-c, --config <file>", "Path to config file").option("-u, --update", "Update snapshots").option("--headed", "Run tests in headed mode").action((options) => {
29
+ test({
30
+ config: options.config,
31
+ update: options.update,
32
+ headed: options.headed
33
+ });
34
+ });
35
+ cli.command("new <component-id>", "Create a new component").option("-c, --config <file>", "Path to config file").option("-t, --title <title>", "Component title").option("-s, --status <status>", "Component status (stable, beta, deprecated)").option("-k, --kind <kind>", "Component kind (standalone, subcomponent, feature)").action((componentId, options) => {
36
+ newComponent(componentId, {
37
+ config: options.config,
38
+ title: options.title,
39
+ status: options.status,
40
+ kind: options.kind
41
+ });
42
+ });
43
+ cli.command("init", "Initialize a new component catalogue").option("-n, --name <name>", "Project name").option("-f, --force", "Overwrite existing files").option("--with-claude", "Install Claude Code skills").action((options) => {
44
+ init({
45
+ name: options.name,
46
+ force: options.force,
47
+ withClaude: options.withClaude
48
+ });
49
+ });
50
+ cli.help();
51
+ cli.version("0.1.0");
52
+ cli.parse();
53
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sources":["../src/bin.ts"],"sourcesContent":["/**\n * CLI entry point for the catalogue.\n */\n\nimport { cac } from 'cac';\nimport { dev } from './commands/dev.js';\nimport { build } from './commands/build.js';\nimport { preview } from './commands/preview.js';\nimport { validate } from './commands/validate.js';\nimport { test } from './commands/test.js';\nimport { newComponent } from './commands/new.js';\nimport { init } from './commands/init.js';\n\nconst cli = cac('catalogue');\n\ncli\n .command('dev', 'Start the development server')\n .option('-c, --config <file>', 'Path to config file')\n .option('-p, --port <port>', 'Port to listen on')\n .action((options) => {\n dev({\n config: options.config,\n port: options.port ? parseInt(options.port, 10) : undefined,\n });\n });\n\ncli\n .command('build', 'Build the static catalogue')\n .option('-c, --config <file>', 'Path to config file')\n .option('-o, --out-dir <dir>', 'Output directory')\n .action((options) => {\n build({\n config: options.config,\n outDir: options.outDir,\n });\n });\n\ncli\n .command('preview', 'Preview the built catalogue')\n .option('-c, --config <file>', 'Path to config file')\n .option('-p, --port <port>', 'Port to listen on')\n .action((options) => {\n preview({\n config: options.config,\n port: options.port ? parseInt(options.port, 10) : undefined,\n });\n });\n\ncli\n .command('validate', 'Validate the component registry')\n .option('-c, --config <file>', 'Path to config file')\n .action((options) => {\n validate({\n config: options.config,\n });\n });\n\ncli\n .command('test', 'Run Playwright visual tests')\n .option('-c, --config <file>', 'Path to config file')\n .option('-u, --update', 'Update snapshots')\n .option('--headed', 'Run tests in headed mode')\n .action((options) => {\n test({\n config: options.config,\n update: options.update,\n headed: options.headed,\n });\n });\n\ncli\n .command('new <component-id>', 'Create a new component')\n .option('-c, --config <file>', 'Path to config file')\n .option('-t, --title <title>', 'Component title')\n .option('-s, --status <status>', 'Component status (stable, beta, deprecated)')\n .option('-k, --kind <kind>', 'Component kind (standalone, subcomponent, feature)')\n .action((componentId, options) => {\n newComponent(componentId, {\n config: options.config,\n title: options.title,\n status: options.status,\n kind: options.kind,\n });\n });\n\ncli\n .command('init', 'Initialize a new component catalogue')\n .option('-n, --name <name>', 'Project name')\n .option('-f, --force', 'Overwrite existing files')\n .option('--with-claude', 'Install Claude Code skills')\n .action((options) => {\n init({\n name: options.name,\n force: options.force,\n withClaude: options.withClaude,\n });\n });\n\ncli.help();\ncli.version('0.1.0');\n\ncli.parse();\n"],"names":[],"mappings":";;AAaA,MAAM,MAAM,IAAI,WAAW;AAE3B,IACG,QAAQ,OAAO,8BAA8B,EAC7C,OAAO,uBAAuB,qBAAqB,EACnD,OAAO,qBAAqB,mBAAmB,EAC/C,OAAO,CAAC,YAAY;AACnB,MAAI;AAAA,IACF,QAAQ,QAAQ;AAAA,IAChB,MAAM,QAAQ,OAAO,SAAS,QAAQ,MAAM,EAAE,IAAI;AAAA,EAAA,CACnD;AACH,CAAC;AAEH,IACG,QAAQ,SAAS,4BAA4B,EAC7C,OAAO,uBAAuB,qBAAqB,EACnD,OAAO,uBAAuB,kBAAkB,EAChD,OAAO,CAAC,YAAY;AACnB,QAAM;AAAA,IACJ,QAAQ,QAAQ;AAAA,IAChB,QAAQ,QAAQ;AAAA,EAAA,CACjB;AACH,CAAC;AAEH,IACG,QAAQ,WAAW,6BAA6B,EAChD,OAAO,uBAAuB,qBAAqB,EACnD,OAAO,qBAAqB,mBAAmB,EAC/C,OAAO,CAAC,YAAY;AACnB,UAAQ;AAAA,IACN,QAAQ,QAAQ;AAAA,IAChB,MAAM,QAAQ,OAAO,SAAS,QAAQ,MAAM,EAAE,IAAI;AAAA,EAAA,CACnD;AACH,CAAC;AAEH,IACG,QAAQ,YAAY,iCAAiC,EACrD,OAAO,uBAAuB,qBAAqB,EACnD,OAAO,CAAC,YAAY;AACnB,WAAS;AAAA,IACP,QAAQ,QAAQ;AAAA,EAAA,CACjB;AACH,CAAC;AAEH,IACG,QAAQ,QAAQ,6BAA6B,EAC7C,OAAO,uBAAuB,qBAAqB,EACnD,OAAO,gBAAgB,kBAAkB,EACzC,OAAO,YAAY,0BAA0B,EAC7C,OAAO,CAAC,YAAY;AACnB,OAAK;AAAA,IACH,QAAQ,QAAQ;AAAA,IAChB,QAAQ,QAAQ;AAAA,IAChB,QAAQ,QAAQ;AAAA,EAAA,CACjB;AACH,CAAC;AAEH,IACG,QAAQ,sBAAsB,wBAAwB,EACtD,OAAO,uBAAuB,qBAAqB,EACnD,OAAO,uBAAuB,iBAAiB,EAC/C,OAAO,yBAAyB,6CAA6C,EAC7E,OAAO,qBAAqB,oDAAoD,EAChF,OAAO,CAAC,aAAa,YAAY;AAChC,eAAa,aAAa;AAAA,IACxB,QAAQ,QAAQ;AAAA,IAChB,OAAO,QAAQ;AAAA,IACf,QAAQ,QAAQ;AAAA,IAChB,MAAM,QAAQ;AAAA,EAAA,CACf;AACH,CAAC;AAEH,IACG,QAAQ,QAAQ,sCAAsC,EACtD,OAAO,qBAAqB,cAAc,EAC1C,OAAO,eAAe,0BAA0B,EAChD,OAAO,iBAAiB,4BAA4B,EACpD,OAAO,CAAC,YAAY;AACnB,OAAK;AAAA,IACH,MAAM,QAAQ;AAAA,IACd,OAAO,QAAQ;AAAA,IACf,YAAY,QAAQ;AAAA,EAAA,CACrB;AACH,CAAC;AAEH,IAAI,KAAA;AACJ,IAAI,QAAQ,OAAO;AAEnB,IAAI,MAAA;"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Build command - Build the static catalogue site.
3
+ */
4
+ export interface BuildOptions {
5
+ config?: string;
6
+ outDir?: string;
7
+ }
8
+ export declare function build(options?: BuildOptions): Promise<void>;
9
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,KAAK,CAAC,OAAO,GAAE,YAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoBrE"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Dev command - Start the Vite development server.
3
+ */
4
+ export interface DevOptions {
5
+ config?: string;
6
+ port?: number;
7
+ }
8
+ export declare function dev(options?: DevOptions): Promise<void>;
9
+ //# sourceMappingURL=dev.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,GAAG,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBjE"}
@@ -0,0 +1,8 @@
1
+ export { dev, type DevOptions } from './dev.js';
2
+ export { build, type BuildOptions } from './build.js';
3
+ export { preview, type PreviewOptions } from './preview.js';
4
+ export { validate, type ValidateOptions } from './validate.js';
5
+ export { test, type TestOptions } from './test.js';
6
+ export { newComponent, type NewOptions } from './new.js';
7
+ export { init, type InitOptions } from './init.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,7 @@
1
+ export interface InitOptions {
2
+ name?: string;
3
+ force?: boolean;
4
+ withClaude?: boolean;
5
+ }
6
+ export declare function init(options?: InitOptions): Promise<void>;
7
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAsB,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkUnE"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * New command - Scaffold a new component.
3
+ */
4
+ export interface NewOptions {
5
+ config?: string;
6
+ title?: string;
7
+ status?: 'stable' | 'beta' | 'deprecated';
8
+ kind?: 'standalone' | 'subcomponent' | 'feature';
9
+ }
10
+ export declare function newComponent(componentId: string, options?: NewOptions): Promise<void>;
11
+ //# sourceMappingURL=new.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../src/commands/new.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,YAAY,CAAC;IAC1C,IAAI,CAAC,EAAE,YAAY,GAAG,cAAc,GAAG,SAAS,CAAC;CAClD;AAED,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAmM/F"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Preview command - Serve the built catalogue.
3
+ */
4
+ export interface PreviewOptions {
5
+ config?: string;
6
+ port?: number;
7
+ }
8
+ export declare function preview(options?: PreviewOptions): Promise<void>;
9
+ //# sourceMappingURL=preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../src/commands/preview.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAsB,OAAO,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBzE"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Test command - Run Playwright visual tests.
3
+ */
4
+ export interface TestOptions {
5
+ config?: string;
6
+ update?: boolean;
7
+ headed?: boolean;
8
+ }
9
+ export declare function test(options?: TestOptions): Promise<void>;
10
+ //# sourceMappingURL=test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/commands/test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAsB,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuFnE"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Validate command - Validate the registry.
3
+ */
4
+ export interface ValidateOptions {
5
+ config?: string;
6
+ }
7
+ export declare function validate(options?: ValidateOptions): Promise<void>;
8
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,MAAM,WAAW,eAAe;IAC9B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD3E"}
@@ -0,0 +1,3 @@
1
+ export { CatalogueConfigSchema, validateConfig, type CatalogueConfig, type ResolvedConfig, } from './schema.js';
2
+ export { loadConfig, createDefaultConfig, type LoadConfigOptions, } from './loader.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,UAAU,EACV,mBAAmB,EACnB,KAAK,iBAAiB,GACvB,MAAM,aAAa,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { ResolvedConfig, CatalogueConfig } from './schema.js';
2
+
3
+ export interface LoadConfigOptions {
4
+ /** Working directory to search for config */
5
+ cwd?: string;
6
+ /** Explicit config file path */
7
+ configFile?: string;
8
+ }
9
+ /**
10
+ * Load and resolve the catalogue configuration.
11
+ */
12
+ export declare function loadConfig(options?: LoadConfigOptions): Promise<ResolvedConfig>;
13
+ /**
14
+ * Create a default config object.
15
+ */
16
+ export declare function createDefaultConfig(): CatalogueConfig;
17
+ //# sourceMappingURL=loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/config/loader.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,EAAkB,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAQxF,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,cAAc,CAAC,CA2DzF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,eAAe,CAmBrD"}
@@ -0,0 +1,229 @@
1
+ import { z } from 'zod';
2
+
3
+ export declare const CategoryDefinitionSchema: z.ZodObject<{
4
+ /** Unique category identifier (kebab-case) */
5
+ id: z.ZodString;
6
+ /** Human-readable label */
7
+ label: z.ZodString;
8
+ /** Optional description */
9
+ description: z.ZodOptional<z.ZodString>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ id: string;
12
+ label: string;
13
+ description?: string | undefined;
14
+ }, {
15
+ id: string;
16
+ label: string;
17
+ description?: string | undefined;
18
+ }>;
19
+ export type CategoryDefinition = z.infer<typeof CategoryDefinitionSchema>;
20
+ export declare const CategoriesConfigSchema: z.ZodObject<{
21
+ /** Category definitions */
22
+ items: z.ZodDefault<z.ZodArray<z.ZodObject<{
23
+ /** Unique category identifier (kebab-case) */
24
+ id: z.ZodString;
25
+ /** Human-readable label */
26
+ label: z.ZodString;
27
+ /** Optional description */
28
+ description: z.ZodOptional<z.ZodString>;
29
+ }, "strip", z.ZodTypeAny, {
30
+ id: string;
31
+ label: string;
32
+ description?: string | undefined;
33
+ }, {
34
+ id: string;
35
+ label: string;
36
+ description?: string | undefined;
37
+ }>, "many">>;
38
+ /** Label for uncategorised components */
39
+ uncategorisedLabel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ items: {
42
+ id: string;
43
+ label: string;
44
+ description?: string | undefined;
45
+ }[];
46
+ uncategorisedLabel: string;
47
+ }, {
48
+ items?: {
49
+ id: string;
50
+ label: string;
51
+ description?: string | undefined;
52
+ }[] | undefined;
53
+ uncategorisedLabel?: string | undefined;
54
+ }>;
55
+ export declare const CatalogueConfigSchema: z.ZodObject<{
56
+ /** Title for the catalogue */
57
+ title: z.ZodDefault<z.ZodOptional<z.ZodString>>;
58
+ /** Category configuration */
59
+ categories: z.ZodDefault<z.ZodOptional<z.ZodObject<{
60
+ /** Category definitions */
61
+ items: z.ZodDefault<z.ZodArray<z.ZodObject<{
62
+ /** Unique category identifier (kebab-case) */
63
+ id: z.ZodString;
64
+ /** Human-readable label */
65
+ label: z.ZodString;
66
+ /** Optional description */
67
+ description: z.ZodOptional<z.ZodString>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ id: string;
70
+ label: string;
71
+ description?: string | undefined;
72
+ }, {
73
+ id: string;
74
+ label: string;
75
+ description?: string | undefined;
76
+ }>, "many">>;
77
+ /** Label for uncategorised components */
78
+ uncategorisedLabel: z.ZodDefault<z.ZodOptional<z.ZodString>>;
79
+ }, "strip", z.ZodTypeAny, {
80
+ items: {
81
+ id: string;
82
+ label: string;
83
+ description?: string | undefined;
84
+ }[];
85
+ uncategorisedLabel: string;
86
+ }, {
87
+ items?: {
88
+ id: string;
89
+ label: string;
90
+ description?: string | undefined;
91
+ }[] | undefined;
92
+ uncategorisedLabel?: string | undefined;
93
+ }>>>;
94
+ /** Path to the registry directory (relative to config) */
95
+ registryDir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
96
+ /** Output directory for builds (relative to config) */
97
+ outDir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
98
+ /** Base path for deployment (e.g., '/docs/ui/') */
99
+ basePath: z.ZodDefault<z.ZodOptional<z.ZodString>>;
100
+ /** Port for dev server */
101
+ port: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
102
+ /** Component imports configuration */
103
+ components: z.ZodDefault<z.ZodOptional<z.ZodObject<{
104
+ /** Path to component entry point (relative to config) */
105
+ entry: z.ZodDefault<z.ZodOptional<z.ZodString>>;
106
+ /** Package name for imports */
107
+ package: z.ZodOptional<z.ZodString>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ entry: string;
110
+ package?: string | undefined;
111
+ }, {
112
+ entry?: string | undefined;
113
+ package?: string | undefined;
114
+ }>>>;
115
+ /** Playwright test configuration */
116
+ playwright: z.ZodDefault<z.ZodOptional<z.ZodObject<{
117
+ /** Breakpoints for visual regression tests */
118
+ breakpoints: z.ZodOptional<z.ZodArray<z.ZodObject<{
119
+ name: z.ZodString;
120
+ width: z.ZodNumber;
121
+ height: z.ZodNumber;
122
+ }, "strip", z.ZodTypeAny, {
123
+ name: string;
124
+ width: number;
125
+ height: number;
126
+ }, {
127
+ name: string;
128
+ width: number;
129
+ height: number;
130
+ }>, "many">>;
131
+ /** Themes to test */
132
+ themes: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEnum<["light", "dark"]>, "many">>>;
133
+ /** Screenshot directory */
134
+ screenshotDir: z.ZodDefault<z.ZodOptional<z.ZodString>>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ themes: ("light" | "dark")[];
137
+ screenshotDir: string;
138
+ breakpoints?: {
139
+ name: string;
140
+ width: number;
141
+ height: number;
142
+ }[] | undefined;
143
+ }, {
144
+ breakpoints?: {
145
+ name: string;
146
+ width: number;
147
+ height: number;
148
+ }[] | undefined;
149
+ themes?: ("light" | "dark")[] | undefined;
150
+ screenshotDir?: string | undefined;
151
+ }>>>;
152
+ /** Additional Vite configuration */
153
+ vite: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
154
+ }, "strip", z.ZodTypeAny, {
155
+ title: string;
156
+ categories: {
157
+ items: {
158
+ id: string;
159
+ label: string;
160
+ description?: string | undefined;
161
+ }[];
162
+ uncategorisedLabel: string;
163
+ };
164
+ registryDir: string;
165
+ outDir: string;
166
+ basePath: string;
167
+ port: number;
168
+ components: {
169
+ entry: string;
170
+ package?: string | undefined;
171
+ };
172
+ playwright: {
173
+ themes: ("light" | "dark")[];
174
+ screenshotDir: string;
175
+ breakpoints?: {
176
+ name: string;
177
+ width: number;
178
+ height: number;
179
+ }[] | undefined;
180
+ };
181
+ vite?: Record<string, unknown> | undefined;
182
+ }, {
183
+ title?: string | undefined;
184
+ categories?: {
185
+ items?: {
186
+ id: string;
187
+ label: string;
188
+ description?: string | undefined;
189
+ }[] | undefined;
190
+ uncategorisedLabel?: string | undefined;
191
+ } | undefined;
192
+ registryDir?: string | undefined;
193
+ outDir?: string | undefined;
194
+ basePath?: string | undefined;
195
+ port?: number | undefined;
196
+ components?: {
197
+ entry?: string | undefined;
198
+ package?: string | undefined;
199
+ } | undefined;
200
+ playwright?: {
201
+ breakpoints?: {
202
+ name: string;
203
+ width: number;
204
+ height: number;
205
+ }[] | undefined;
206
+ themes?: ("light" | "dark")[] | undefined;
207
+ screenshotDir?: string | undefined;
208
+ } | undefined;
209
+ vite?: Record<string, unknown> | undefined;
210
+ }>;
211
+ export type CatalogueConfig = z.infer<typeof CatalogueConfigSchema>;
212
+ export interface ResolvedConfig extends CatalogueConfig {
213
+ /** Absolute path to config file */
214
+ configPath: string;
215
+ /** Absolute path to config directory */
216
+ configDir: string;
217
+ /** Absolute path to registry */
218
+ registryPath: string;
219
+ /** Absolute path to output directory */
220
+ outPath: string;
221
+ }
222
+ export declare function validateConfig(data: unknown): {
223
+ success: true;
224
+ data: CatalogueConfig;
225
+ } | {
226
+ success: false;
227
+ errors: string[];
228
+ };
229
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,wBAAwB;IACnC,8CAA8C;;IAI9C,2BAA2B;;IAE3B,2BAA2B;;;;;;;;;;EAE3B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,sBAAsB;IACjC,2BAA2B;;QAb3B,8CAA8C;;QAI9C,2BAA2B;;QAE3B,2BAA2B;;;;;;;;;;;IAS3B,yCAAyC;;;;;;;;;;;;;;;;EAEzC,CAAC;AAEH,eAAO,MAAM,qBAAqB;IAChC,8BAA8B;;IAG9B,6BAA6B;;QAV7B,2BAA2B;;YAb3B,8CAA8C;;YAI9C,2BAA2B;;YAE3B,2BAA2B;;;;;;;;;;;QAS3B,yCAAyC;;;;;;;;;;;;;;;;;IAWzC,0DAA0D;;IAG1D,uDAAuD;;IAGvD,mDAAmD;;IAGnD,0BAA0B;;IAG1B,sCAAsC;;QAEpC,yDAAyD;;QAEzD,+BAA+B;;;;;;;;;IAIjC,oCAAoC;;QAElC,8CAA8C;;;;;;;;;;;;;;QAM9C,qBAAqB;;QAErB,2BAA2B;;;;;;;;;;;;;;;;;;;IAI7B,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEpC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAS7H"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @adieyal/catalogue-cli
3
+ *
4
+ * CLI for the component catalogue.
5
+ */
6
+ export * from './commands/index.js';
7
+ export * from './config/index.js';
8
+ export { loadRegistryFiles, generateRegistryModule, getRegistryWatchPaths } from './registry/file-loader.js';
9
+ export { cataloguePlugin, createHtmlTemplate } from './vite/plugin.js';
10
+ export { startDevServer, buildStatic, startPreviewServer } from './vite/server.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAC7G,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ import { C, h, d, c, m, b, f, g, a, i, k, l, n, p, s, e, t, v, j } from "./init-CI0WzrG1.js";
2
+ export {
3
+ C as CatalogueConfigSchema,
4
+ h as build,
5
+ d as buildStatic,
6
+ c as cataloguePlugin,
7
+ m as createDefaultConfig,
8
+ b as createHtmlTemplate,
9
+ f as dev,
10
+ g as generateRegistryModule,
11
+ a as getRegistryWatchPaths,
12
+ i as init,
13
+ k as loadConfig,
14
+ l as loadRegistryFiles,
15
+ n as newComponent,
16
+ p as preview,
17
+ s as startDevServer,
18
+ e as startPreviewServer,
19
+ t as test,
20
+ v as validate,
21
+ j as validateConfig
22
+ };
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}