@dudousxd/nestjs-codegen 0.28.0 → 0.29.1

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/index.d.cts CHANGED
@@ -378,18 +378,29 @@ declare const DEFAULT_SANDBOX_KIT_OUTPUT = ".genui/sandbox-kit.json";
378
378
  interface WriteSandboxKitDocsOptions {
379
379
  root: string;
380
380
  output: string;
381
- entry?: string;
382
- include?: string | readonly string[];
383
- css?: string | readonly string[];
381
+ components?: string | readonly string[];
382
+ styles?: string | readonly string[];
383
+ wrapper?: string;
384
+ stylesDocs?: string;
384
385
  tsconfig?: string;
385
386
  }
387
+ /** The same options as the agent's Vite plugin (`@dudousxd/nestjs-agent/vite`). */
386
388
  interface GenuiSandboxKitOptions {
387
- /** A module whose exports are the kit (e.g. `src/genui/kit.ts`). */
388
- entry?: string;
389
- /** A glob (or several) whose files' exports are the kit (e.g. `web/components/ui/*.tsx`). */
390
- include?: string | readonly string[];
391
- /** Stylesheet glob(s) whose custom properties become the sandbox theme. */
392
- css?: string | readonly string[];
389
+ /**
390
+ * Modules whose exports are the kit's React components: files, globs, directories or packages
391
+ * (`web/components/ui`, `src/genui/kit.ts`, `@mui/material`). Default: the first shadcn
392
+ * `components/ui` dir found.
393
+ */
394
+ components?: string | readonly string[];
395
+ /**
396
+ * The app's style entry files (plain CSS, Sass, a Tailwind stylesheet…): what the model is told
397
+ * about the styles (Tailwind tokens, or the CSS class vocabulary) and the theme's variables.
398
+ */
399
+ styles?: string | readonly string[];
400
+ /** A module whose default export wraps the model's App (theme providers). */
401
+ wrapper?: string;
402
+ /** Guidance on the styles for the model: a markdown file, or the text itself. */
403
+ stylesDocs?: string;
393
404
  /** The tsconfig the component prop types are read through. */
394
405
  tsconfig?: string;
395
406
  /**
@@ -408,15 +419,17 @@ interface GenuiSandboxKitOptions {
408
419
  }
409
420
  /**
410
421
  * Writes the generative-UI **sandbox kit docs** — the app's design-system components (shadcn
411
- * `components/ui` by default) with the props read from their TypeScript types — to
422
+ * `components/ui` by default) with the props read from their TypeScript types, and what its
423
+ * `styles` are (Tailwind tokens, or a CSS class vocabulary, and the theme's variables) — to
412
424
  * `.genui/sandbox-kit.json`, where the `@dudousxd/nestjs-agent` server reads them.
413
425
  *
414
426
  * Runs on every generate pass (one-shot CLI, `--watch`, and the Nest module's watcher). The
415
427
  * descriptor lives outside `outDir`, so it is written by the generator itself, not through
416
- * `emitFiles`; the kit files, stylesheets and the descriptor are tracked as inputs, so editing
417
- * a component regenerates in watch mode and a deleted descriptor is rewritten.
428
+ * `emitFiles`; the kit files, the stylesheets (and what they import) and the descriptor are
429
+ * tracked as inputs, so editing a component or a stylesheet regenerates in watch mode and a
430
+ * deleted descriptor is rewritten.
418
431
  *
419
- * Needs the optional peer `@dudousxd/nestjs-agent-core` (>=0.52.0) unless `generate` is given.
432
+ * Needs the optional peer `@dudousxd/nestjs-agent-core` (>=0.53.0) unless `generate` is given.
420
433
  */
421
434
  declare function genuiSandboxKit(options?: GenuiSandboxKitOptions): CodegenExtension;
422
435
 
@@ -435,6 +448,6 @@ interface FastDiscoveryOptions {
435
448
  }
436
449
  declare function discoverContractsFast(opts: FastDiscoveryOptions): Promise<RouteDescriptor[]>;
437
450
 
438
- declare const VERSION = "0.28.0";
451
+ declare const VERSION = "0.29.1";
439
452
 
440
453
  export { type ChainModuleRendererOptions, CodegenError, type CodegenManifest, ConfigError, DEFAULT_SANDBOX_KIT_OUTPUT, DriftGuardError, type EntryPoint, type FastDiscoveryOptions, type GenuiSandboxKitOptions, type JsonSchema, type MocksEmitOptions, type OpenApiDocument, type OpenApiEmitOptions, type OpenApiInfo, RenderContext, RenderedModule, ResolvedConfig, RouteDescriptor, SchemaModule, SchemaNode, type TsTypeContext, UserConfig, VERSION, ValidationAdapter, type WatchOptions, type Watcher, type WriteSandboxKitDocsOptions, acquireLock, buildMocksFile, buildOpenApiSpec, createChainModuleRenderer, defineConfig, discoverContractsFast, emitApi, emitForms, emitMocks, emitOpenApi, emitRoutes, extractSchemaFromDto, generate, genuiSandboxKit, loadConfig, renderTsType, resolveConfig, schemaModuleToJsonSchema, schemaNodeToJsonSchema, toObjectKey, typeNameFor, watch };
package/dist/index.d.ts CHANGED
@@ -378,18 +378,29 @@ declare const DEFAULT_SANDBOX_KIT_OUTPUT = ".genui/sandbox-kit.json";
378
378
  interface WriteSandboxKitDocsOptions {
379
379
  root: string;
380
380
  output: string;
381
- entry?: string;
382
- include?: string | readonly string[];
383
- css?: string | readonly string[];
381
+ components?: string | readonly string[];
382
+ styles?: string | readonly string[];
383
+ wrapper?: string;
384
+ stylesDocs?: string;
384
385
  tsconfig?: string;
385
386
  }
387
+ /** The same options as the agent's Vite plugin (`@dudousxd/nestjs-agent/vite`). */
386
388
  interface GenuiSandboxKitOptions {
387
- /** A module whose exports are the kit (e.g. `src/genui/kit.ts`). */
388
- entry?: string;
389
- /** A glob (or several) whose files' exports are the kit (e.g. `web/components/ui/*.tsx`). */
390
- include?: string | readonly string[];
391
- /** Stylesheet glob(s) whose custom properties become the sandbox theme. */
392
- css?: string | readonly string[];
389
+ /**
390
+ * Modules whose exports are the kit's React components: files, globs, directories or packages
391
+ * (`web/components/ui`, `src/genui/kit.ts`, `@mui/material`). Default: the first shadcn
392
+ * `components/ui` dir found.
393
+ */
394
+ components?: string | readonly string[];
395
+ /**
396
+ * The app's style entry files (plain CSS, Sass, a Tailwind stylesheet…): what the model is told
397
+ * about the styles (Tailwind tokens, or the CSS class vocabulary) and the theme's variables.
398
+ */
399
+ styles?: string | readonly string[];
400
+ /** A module whose default export wraps the model's App (theme providers). */
401
+ wrapper?: string;
402
+ /** Guidance on the styles for the model: a markdown file, or the text itself. */
403
+ stylesDocs?: string;
393
404
  /** The tsconfig the component prop types are read through. */
394
405
  tsconfig?: string;
395
406
  /**
@@ -408,15 +419,17 @@ interface GenuiSandboxKitOptions {
408
419
  }
409
420
  /**
410
421
  * Writes the generative-UI **sandbox kit docs** — the app's design-system components (shadcn
411
- * `components/ui` by default) with the props read from their TypeScript types — to
422
+ * `components/ui` by default) with the props read from their TypeScript types, and what its
423
+ * `styles` are (Tailwind tokens, or a CSS class vocabulary, and the theme's variables) — to
412
424
  * `.genui/sandbox-kit.json`, where the `@dudousxd/nestjs-agent` server reads them.
413
425
  *
414
426
  * Runs on every generate pass (one-shot CLI, `--watch`, and the Nest module's watcher). The
415
427
  * descriptor lives outside `outDir`, so it is written by the generator itself, not through
416
- * `emitFiles`; the kit files, stylesheets and the descriptor are tracked as inputs, so editing
417
- * a component regenerates in watch mode and a deleted descriptor is rewritten.
428
+ * `emitFiles`; the kit files, the stylesheets (and what they import) and the descriptor are
429
+ * tracked as inputs, so editing a component or a stylesheet regenerates in watch mode and a
430
+ * deleted descriptor is rewritten.
418
431
  *
419
- * Needs the optional peer `@dudousxd/nestjs-agent-core` (>=0.52.0) unless `generate` is given.
432
+ * Needs the optional peer `@dudousxd/nestjs-agent-core` (>=0.53.0) unless `generate` is given.
420
433
  */
421
434
  declare function genuiSandboxKit(options?: GenuiSandboxKitOptions): CodegenExtension;
422
435
 
@@ -435,6 +448,6 @@ interface FastDiscoveryOptions {
435
448
  }
436
449
  declare function discoverContractsFast(opts: FastDiscoveryOptions): Promise<RouteDescriptor[]>;
437
450
 
438
- declare const VERSION = "0.28.0";
451
+ declare const VERSION = "0.29.1";
439
452
 
440
453
  export { type ChainModuleRendererOptions, CodegenError, type CodegenManifest, ConfigError, DEFAULT_SANDBOX_KIT_OUTPUT, DriftGuardError, type EntryPoint, type FastDiscoveryOptions, type GenuiSandboxKitOptions, type JsonSchema, type MocksEmitOptions, type OpenApiDocument, type OpenApiEmitOptions, type OpenApiInfo, RenderContext, RenderedModule, ResolvedConfig, RouteDescriptor, SchemaModule, SchemaNode, type TsTypeContext, UserConfig, VERSION, ValidationAdapter, type WatchOptions, type Watcher, type WriteSandboxKitDocsOptions, acquireLock, buildMocksFile, buildOpenApiSpec, createChainModuleRenderer, defineConfig, discoverContractsFast, emitApi, emitForms, emitMocks, emitOpenApi, emitRoutes, extractSchemaFromDto, generate, genuiSandboxKit, loadConfig, renderTsType, resolveConfig, schemaModuleToJsonSchema, schemaNodeToJsonSchema, toObjectKey, typeNameFor, watch };