@screenbook/core 1.4.0 → 1.6.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/index.cjs CHANGED
@@ -139,7 +139,13 @@ const screenSchema = zod.z.object({
139
139
  description: zod.z.string().optional(),
140
140
  links: zod.z.array(zod.z.object({
141
141
  label: zod.z.string(),
142
- url: zod.z.string().url()
142
+ url: zod.z.string().url(),
143
+ type: zod.z.enum([
144
+ "figma",
145
+ "storybook",
146
+ "docs",
147
+ "other"
148
+ ]).optional()
143
149
  })).optional(),
144
150
  mock: screenMockSchema.optional()
145
151
  });
@@ -153,6 +159,20 @@ const adoptionSchema = zod.z.object({
153
159
  minimumCoverage: zod.z.number().min(0).max(100).optional()
154
160
  });
155
161
  /**
162
+ * Schema for OpenAPI configuration (runtime validation)
163
+ * @internal
164
+ */
165
+ const openApiConfigSchema = zod.z.object({ sources: zod.z.array(zod.z.string()).min(1) });
166
+ /**
167
+ * Schema for API integration configuration (runtime validation)
168
+ * @internal
169
+ */
170
+ const apiIntegrationSchema = zod.z.object({
171
+ clientPackages: zod.z.array(zod.z.string()).optional(),
172
+ extractApiName: zod.z.any().optional(),
173
+ openapi: openApiConfigSchema.optional()
174
+ });
175
+ /**
156
176
  * Schema for Screenbook configuration (runtime validation)
157
177
  * @internal
158
178
  */
@@ -162,7 +182,8 @@ const configSchema = zod.z.object({
162
182
  routesPattern: zod.z.string().optional(),
163
183
  routesFile: zod.z.string().optional(),
164
184
  ignore: zod.z.array(zod.z.string()).default(["**/node_modules/**", "**/.git/**"]),
165
- adoption: adoptionSchema.optional()
185
+ adoption: adoptionSchema.optional(),
186
+ apiIntegration: apiIntegrationSchema.optional()
166
187
  }).refine((data) => !(data.routesPattern && data.routesFile), {
167
188
  message: "Cannot specify both 'routesPattern' and 'routesFile'. Use one or the other.",
168
189
  path: ["routesFile"]
@@ -227,9 +248,11 @@ function defineConfig(input = {}) {
227
248
 
228
249
  //#endregion
229
250
  exports.adoptionSchema = adoptionSchema;
251
+ exports.apiIntegrationSchema = apiIntegrationSchema;
230
252
  exports.configSchema = configSchema;
231
253
  exports.defineConfig = defineConfig;
232
254
  exports.defineScreen = defineScreen;
233
255
  exports.extractNavigationTargets = extractNavigationTargets;
256
+ exports.openApiConfigSchema = openApiConfigSchema;
234
257
  exports.screenMockSchema = screenMockSchema;
235
258
  exports.screenSchema = screenSchema;
package/dist/index.d.cts CHANGED
@@ -2,6 +2,10 @@ import { z } from "zod";
2
2
 
3
3
  //#region src/types.d.ts
4
4
 
5
+ /**
6
+ * Type of external link for icon display
7
+ */
8
+ type ScreenLinkType = "figma" | "storybook" | "docs" | "other";
5
9
  /**
6
10
  * External link to related resources
7
11
  */
@@ -18,6 +22,13 @@ interface ScreenLink {
18
22
  * @example "https://storybook.example.com/?path=/story/billing-invoice"
19
23
  */
20
24
  url: string;
25
+ /**
26
+ * Type of link for icon display
27
+ * If not specified, the type is inferred from the URL
28
+ * @example "figma"
29
+ * @example "storybook"
30
+ */
31
+ type?: ScreenLinkType;
21
32
  }
22
33
  /**
23
34
  * Screen metadata definition for the screen catalog.
@@ -248,6 +259,12 @@ declare const screenSchema: z.ZodObject<{
248
259
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
249
260
  label: z.ZodString;
250
261
  url: z.ZodString;
262
+ type: z.ZodOptional<z.ZodEnum<{
263
+ figma: "figma";
264
+ storybook: "storybook";
265
+ docs: "docs";
266
+ other: "other";
267
+ }>>;
251
268
  }, z.core.$strip>>>;
252
269
  mock: z.ZodOptional<z.ZodObject<{
253
270
  sections: z.ZodArray<z.ZodType<MockSection, unknown, z.core.$ZodTypeInternals<MockSection, unknown>>>;
@@ -300,6 +317,78 @@ declare const adoptionSchema: z.ZodObject<{
300
317
  includePatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
301
318
  minimumCoverage: z.ZodOptional<z.ZodNumber>;
302
319
  }, z.core.$strip>;
320
+ /**
321
+ * API integration configuration for auto-detecting dependencies from
322
+ * OpenAPI-generated clients (Orval, openapi-typescript, etc.).
323
+ *
324
+ * @example
325
+ * ```ts
326
+ * const apiIntegration: ApiIntegrationConfig = {
327
+ * clientPackages: ["@/api/generated", "@company/backend-client"],
328
+ * extractApiName: (name) => name.replace(/^use/, ""),
329
+ * }
330
+ * ```
331
+ */
332
+ /**
333
+ * OpenAPI specification configuration for validating dependsOn references.
334
+ *
335
+ * @example
336
+ * ```ts
337
+ * const openapi: OpenApiConfig = {
338
+ * sources: ["./openapi.yaml", "https://api.example.com/openapi.json"],
339
+ * }
340
+ * ```
341
+ */
342
+ interface OpenApiConfig {
343
+ /**
344
+ * OpenAPI specification sources (local files or remote URLs).
345
+ * Supports OpenAPI 2.0 (Swagger) and 3.x specifications.
346
+ * @example ["./openapi.yaml"]
347
+ * @example ["./openapi.yaml", "https://api.example.com/openapi.json"]
348
+ */
349
+ sources: string[];
350
+ }
351
+ interface ApiIntegrationConfig {
352
+ /**
353
+ * Package names to scan for API client imports.
354
+ * These should match the import paths used in your code.
355
+ * @example ["@/api/generated"]
356
+ * @example ["@company/backend-client", "@company/auth-client"]
357
+ */
358
+ clientPackages?: string[];
359
+ /**
360
+ * Optional transform function to convert import name to dependsOn format.
361
+ * If not provided, the import name is used as-is.
362
+ * @example (name) => name.replace(/^use/, "")
363
+ * @example (name) => `API.${name}`
364
+ */
365
+ extractApiName?: (importName: string) => string;
366
+ /**
367
+ * OpenAPI specification configuration for validating dependsOn references.
368
+ * When configured, `screenbook lint` will validate that dependsOn values
369
+ * match operationIds or HTTP method + path from the OpenAPI spec.
370
+ * @example { sources: ["./openapi.yaml"] }
371
+ */
372
+ openapi?: OpenApiConfig;
373
+ }
374
+ /**
375
+ * Schema for OpenAPI configuration (runtime validation)
376
+ * @internal
377
+ */
378
+ declare const openApiConfigSchema: z.ZodObject<{
379
+ sources: z.ZodArray<z.ZodString>;
380
+ }, z.core.$strip>;
381
+ /**
382
+ * Schema for API integration configuration (runtime validation)
383
+ * @internal
384
+ */
385
+ declare const apiIntegrationSchema: z.ZodObject<{
386
+ clientPackages: z.ZodOptional<z.ZodArray<z.ZodString>>;
387
+ extractApiName: z.ZodOptional<z.ZodAny>;
388
+ openapi: z.ZodOptional<z.ZodObject<{
389
+ sources: z.ZodArray<z.ZodString>;
390
+ }, z.core.$strip>>;
391
+ }, z.core.$strip>;
303
392
  /**
304
393
  * Screenbook configuration options.
305
394
  */
@@ -346,6 +435,12 @@ interface Config {
346
435
  * @example { mode: "progressive", includePatterns: ["src/pages/billing/**"], minimumCoverage: 80 }
347
436
  */
348
437
  adoption?: AdoptionConfig;
438
+ /**
439
+ * API integration configuration for auto-detecting dependencies
440
+ * from OpenAPI-generated clients (Orval, openapi-typescript, etc.)
441
+ * @example { clientPackages: ["@/api/generated"] }
442
+ */
443
+ apiIntegration?: ApiIntegrationConfig;
349
444
  }
350
445
  /**
351
446
  * Input type for defineConfig function.
@@ -395,6 +490,11 @@ interface ConfigInput {
395
490
  * Progressive adoption configuration
396
491
  */
397
492
  adoption?: AdoptionConfig;
493
+ /**
494
+ * API integration configuration for auto-detecting dependencies
495
+ * from OpenAPI-generated clients
496
+ */
497
+ apiIntegration?: ApiIntegrationConfig;
398
498
  }
399
499
  /**
400
500
  * Schema for Screenbook configuration (runtime validation)
@@ -414,6 +514,13 @@ declare const configSchema: z.ZodObject<{
414
514
  includePatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
415
515
  minimumCoverage: z.ZodOptional<z.ZodNumber>;
416
516
  }, z.core.$strip>>;
517
+ apiIntegration: z.ZodOptional<z.ZodObject<{
518
+ clientPackages: z.ZodOptional<z.ZodArray<z.ZodString>>;
519
+ extractApiName: z.ZodOptional<z.ZodAny>;
520
+ openapi: z.ZodOptional<z.ZodObject<{
521
+ sources: z.ZodArray<z.ZodString>;
522
+ }, z.core.$strip>>;
523
+ }, z.core.$strip>>;
417
524
  }, z.core.$strip>;
418
525
  //#endregion
419
526
  //#region src/defineScreen.d.ts
@@ -487,5 +594,5 @@ declare function defineConfig(input?: ConfigInput): Config;
487
594
  */
488
595
  declare function extractNavigationTargets(mock: ScreenMock): string[];
489
596
  //#endregion
490
- export { type AdoptionConfig, type Config, type ConfigInput, type MockButtonElement, type MockElement, type MockElementType, type MockImageElement, type MockInputElement, type MockLayout, type MockLinkElement, type MockListElement, type MockSection, type MockTableElement, type MockTextElement, type Screen, type ScreenInput, type ScreenLink, type ScreenMock, adoptionSchema, configSchema, defineConfig, defineScreen, extractNavigationTargets, screenMockSchema, screenSchema };
597
+ export { type AdoptionConfig, type ApiIntegrationConfig, type Config, type ConfigInput, type MockButtonElement, type MockElement, type MockElementType, type MockImageElement, type MockInputElement, type MockLayout, type MockLinkElement, type MockListElement, type MockSection, type MockTableElement, type MockTextElement, type OpenApiConfig, type Screen, type ScreenInput, type ScreenLink, type ScreenLinkType, type ScreenMock, adoptionSchema, apiIntegrationSchema, configSchema, defineConfig, defineScreen, extractNavigationTargets, openApiConfigSchema, screenMockSchema, screenSchema };
491
598
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/defineScreen.ts","../src/extractNavigationTargets.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;AA+BiB,UA/BA,UAAA,CA6GR;EAiBG;AAKZ;AAOU;AAeV;AAWA;EAWiB,KAAA,EAAA,MAAA;EASA;AASjB;AASA;AAWA;AAaA;EACG,GAAA,EAAA,MAAA;;;;;;;;AAWH;;;;;AAcA;AAiFA;;;;UA9SiB,MAAA;;;;;AAwTjB;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAyB,WAAA,CAAA,EAAA,MAAA,EAAA;EAkCR;AA8BjB;;;;;;;;;;;EASiB,WAAM,CAAA,EAAA,OA+CX;EAeK;AA+CjB;;;;;;;;UAtaS;;;;;;SAOD;;;;;KAUI,UAAA;;;;AAqZa,KAhZb,eAAA,GAgZa,QAAA,GAAA,OAAA,GAAA,MAAA,GA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AAA;;YAEN;;;;;;cA+EE,kBAAgB,CAAA,CAAA;;;;;;;KAUjB,WAAA,GAAc;;;;;cAMb,cAAY,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAmCR,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8BJ,gBAAc,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA4BV,aAAA;;;;;;;;;UAUA,oBAAA;;;;;;;;;;;;;;;;;;;;;YAuBN;;;;;;cAOE,qBAAmB,CAAA,CAAA;;;;;;;cAQnB,sBAAoB,CAAA,CAAA;;;;;;;;;;UAUhB,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA+CL;;;;;;mBAOM;;;;;;;;;;;;;;UAeD,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwCL;;;;;mBAMM;;;;;;cAOL,cAAY,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA1nBzB;AAKA;AAsCA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYA;;;;AAQuB,iBCjOP,YAAA,CDiOO,KAAA,ECjOa,WDiOb,CAAA,ECjO2B,MDiO3B;AAMvB;AAiFA;;;;;;;;;AAUA;AAMA;iBC3SgB,YAAA,SAAoB,cAAmB;;;;;AD9DvD;AAKA;AAsCA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYiB,iBErOD,wBAAA,CFqOY,IAAA,EErOmB,UFqOnB,CAAA,EAAA,MAAA,EAAA"}
package/dist/index.d.mts CHANGED
@@ -2,6 +2,10 @@ import { z } from "zod";
2
2
 
3
3
  //#region src/types.d.ts
4
4
 
5
+ /**
6
+ * Type of external link for icon display
7
+ */
8
+ type ScreenLinkType = "figma" | "storybook" | "docs" | "other";
5
9
  /**
6
10
  * External link to related resources
7
11
  */
@@ -18,6 +22,13 @@ interface ScreenLink {
18
22
  * @example "https://storybook.example.com/?path=/story/billing-invoice"
19
23
  */
20
24
  url: string;
25
+ /**
26
+ * Type of link for icon display
27
+ * If not specified, the type is inferred from the URL
28
+ * @example "figma"
29
+ * @example "storybook"
30
+ */
31
+ type?: ScreenLinkType;
21
32
  }
22
33
  /**
23
34
  * Screen metadata definition for the screen catalog.
@@ -248,6 +259,12 @@ declare const screenSchema: z.ZodObject<{
248
259
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
249
260
  label: z.ZodString;
250
261
  url: z.ZodString;
262
+ type: z.ZodOptional<z.ZodEnum<{
263
+ figma: "figma";
264
+ storybook: "storybook";
265
+ docs: "docs";
266
+ other: "other";
267
+ }>>;
251
268
  }, z.core.$strip>>>;
252
269
  mock: z.ZodOptional<z.ZodObject<{
253
270
  sections: z.ZodArray<z.ZodType<MockSection, unknown, z.core.$ZodTypeInternals<MockSection, unknown>>>;
@@ -300,6 +317,78 @@ declare const adoptionSchema: z.ZodObject<{
300
317
  includePatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
301
318
  minimumCoverage: z.ZodOptional<z.ZodNumber>;
302
319
  }, z.core.$strip>;
320
+ /**
321
+ * API integration configuration for auto-detecting dependencies from
322
+ * OpenAPI-generated clients (Orval, openapi-typescript, etc.).
323
+ *
324
+ * @example
325
+ * ```ts
326
+ * const apiIntegration: ApiIntegrationConfig = {
327
+ * clientPackages: ["@/api/generated", "@company/backend-client"],
328
+ * extractApiName: (name) => name.replace(/^use/, ""),
329
+ * }
330
+ * ```
331
+ */
332
+ /**
333
+ * OpenAPI specification configuration for validating dependsOn references.
334
+ *
335
+ * @example
336
+ * ```ts
337
+ * const openapi: OpenApiConfig = {
338
+ * sources: ["./openapi.yaml", "https://api.example.com/openapi.json"],
339
+ * }
340
+ * ```
341
+ */
342
+ interface OpenApiConfig {
343
+ /**
344
+ * OpenAPI specification sources (local files or remote URLs).
345
+ * Supports OpenAPI 2.0 (Swagger) and 3.x specifications.
346
+ * @example ["./openapi.yaml"]
347
+ * @example ["./openapi.yaml", "https://api.example.com/openapi.json"]
348
+ */
349
+ sources: string[];
350
+ }
351
+ interface ApiIntegrationConfig {
352
+ /**
353
+ * Package names to scan for API client imports.
354
+ * These should match the import paths used in your code.
355
+ * @example ["@/api/generated"]
356
+ * @example ["@company/backend-client", "@company/auth-client"]
357
+ */
358
+ clientPackages?: string[];
359
+ /**
360
+ * Optional transform function to convert import name to dependsOn format.
361
+ * If not provided, the import name is used as-is.
362
+ * @example (name) => name.replace(/^use/, "")
363
+ * @example (name) => `API.${name}`
364
+ */
365
+ extractApiName?: (importName: string) => string;
366
+ /**
367
+ * OpenAPI specification configuration for validating dependsOn references.
368
+ * When configured, `screenbook lint` will validate that dependsOn values
369
+ * match operationIds or HTTP method + path from the OpenAPI spec.
370
+ * @example { sources: ["./openapi.yaml"] }
371
+ */
372
+ openapi?: OpenApiConfig;
373
+ }
374
+ /**
375
+ * Schema for OpenAPI configuration (runtime validation)
376
+ * @internal
377
+ */
378
+ declare const openApiConfigSchema: z.ZodObject<{
379
+ sources: z.ZodArray<z.ZodString>;
380
+ }, z.core.$strip>;
381
+ /**
382
+ * Schema for API integration configuration (runtime validation)
383
+ * @internal
384
+ */
385
+ declare const apiIntegrationSchema: z.ZodObject<{
386
+ clientPackages: z.ZodOptional<z.ZodArray<z.ZodString>>;
387
+ extractApiName: z.ZodOptional<z.ZodAny>;
388
+ openapi: z.ZodOptional<z.ZodObject<{
389
+ sources: z.ZodArray<z.ZodString>;
390
+ }, z.core.$strip>>;
391
+ }, z.core.$strip>;
303
392
  /**
304
393
  * Screenbook configuration options.
305
394
  */
@@ -346,6 +435,12 @@ interface Config {
346
435
  * @example { mode: "progressive", includePatterns: ["src/pages/billing/**"], minimumCoverage: 80 }
347
436
  */
348
437
  adoption?: AdoptionConfig;
438
+ /**
439
+ * API integration configuration for auto-detecting dependencies
440
+ * from OpenAPI-generated clients (Orval, openapi-typescript, etc.)
441
+ * @example { clientPackages: ["@/api/generated"] }
442
+ */
443
+ apiIntegration?: ApiIntegrationConfig;
349
444
  }
350
445
  /**
351
446
  * Input type for defineConfig function.
@@ -395,6 +490,11 @@ interface ConfigInput {
395
490
  * Progressive adoption configuration
396
491
  */
397
492
  adoption?: AdoptionConfig;
493
+ /**
494
+ * API integration configuration for auto-detecting dependencies
495
+ * from OpenAPI-generated clients
496
+ */
497
+ apiIntegration?: ApiIntegrationConfig;
398
498
  }
399
499
  /**
400
500
  * Schema for Screenbook configuration (runtime validation)
@@ -414,6 +514,13 @@ declare const configSchema: z.ZodObject<{
414
514
  includePatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
415
515
  minimumCoverage: z.ZodOptional<z.ZodNumber>;
416
516
  }, z.core.$strip>>;
517
+ apiIntegration: z.ZodOptional<z.ZodObject<{
518
+ clientPackages: z.ZodOptional<z.ZodArray<z.ZodString>>;
519
+ extractApiName: z.ZodOptional<z.ZodAny>;
520
+ openapi: z.ZodOptional<z.ZodObject<{
521
+ sources: z.ZodArray<z.ZodString>;
522
+ }, z.core.$strip>>;
523
+ }, z.core.$strip>>;
417
524
  }, z.core.$strip>;
418
525
  //#endregion
419
526
  //#region src/defineScreen.d.ts
@@ -487,5 +594,5 @@ declare function defineConfig(input?: ConfigInput): Config;
487
594
  */
488
595
  declare function extractNavigationTargets(mock: ScreenMock): string[];
489
596
  //#endregion
490
- export { type AdoptionConfig, type Config, type ConfigInput, type MockButtonElement, type MockElement, type MockElementType, type MockImageElement, type MockInputElement, type MockLayout, type MockLinkElement, type MockListElement, type MockSection, type MockTableElement, type MockTextElement, type Screen, type ScreenInput, type ScreenLink, type ScreenMock, adoptionSchema, configSchema, defineConfig, defineScreen, extractNavigationTargets, screenMockSchema, screenSchema };
597
+ export { type AdoptionConfig, type ApiIntegrationConfig, type Config, type ConfigInput, type MockButtonElement, type MockElement, type MockElementType, type MockImageElement, type MockInputElement, type MockLayout, type MockLinkElement, type MockListElement, type MockSection, type MockTableElement, type MockTextElement, type OpenApiConfig, type Screen, type ScreenInput, type ScreenLink, type ScreenLinkType, type ScreenMock, adoptionSchema, apiIntegrationSchema, configSchema, defineConfig, defineScreen, extractNavigationTargets, openApiConfigSchema, screenMockSchema, screenSchema };
491
598
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/defineScreen.ts","../src/extractNavigationTargets.ts"],"sourcesContent":[],"mappings":";;;;;;AAKA;AA+BiB,UA/BA,UAAA,CA6GR;EAiBG;AAKZ;AAOU;AAeV;AAWA;EAWiB,KAAA,EAAA,MAAA;EASA;AASjB;AASA;AAWA;AAaA;EACG,GAAA,EAAA,MAAA;;;;;;;;AAWH;;;;;AAcA;AAiFA;;;;UA9SiB,MAAA;;;;;AAwTjB;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAyB,WAAA,CAAA,EAAA,MAAA,EAAA;EAkCR;AA8BjB;;;;;;;;;;;EASiB,WAAM,CAAA,EAAA,OA+CX;EAeK;AA+CjB;;;;;;;;UAtaS;;;;;;SAOD;;;;;KAUI,UAAA;;;;AAqZa,KAhZb,eAAA,GAgZa,QAAA,GAAA,OAAA,GAAA,MAAA,GAAA,MAAA,GAAA,OAAA,GAAA,MAAA,GAAA,OAAA;;;;UApYf,eAAA;EC9GM;EA6BA,IAAA,EDmFT,eCnFqB;;;;ACzC5B;;;UFoIiB,iBAAA,SAA0B;;;;;;;;;;UAW1B,gBAAA,SAAyB;;;;;;;;;;UAWzB,eAAA,SAAwB;;;;;;;;UASxB,eAAA,SAAwB;;;;;;;;UASxB,gBAAA,SAAyB;;;;;;;;UASzB,eAAA,SAAwB;;;;;;;;;;UAWxB,gBAAA,SAAyB;;;;;;;;;;;;KAa9B,WAAA,GACT,oBACA,mBACA,kBACA,kBACA,mBACA,kBACA;;;;UAKc,WAAA;;;;WAIP;;YAEC;;aAEC;;;;;UAMK,UAAA;;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;;;;;;;;;;;;;;;;aA+CL;;;;;;mBAOM;;;;;;;;;;;;;;UAeD,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAwCL;;;;;mBAMM;;;;;;cAOL,cAAY,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA1nBzB;AAKA;AAsCA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYA;;;;AAQuB,iBCjOP,YAAA,CDiOO,KAAA,ECjOa,WDiOb,CAAA,ECjO2B,MDiO3B;AAMvB;AAiFA;;;;;;;;;AAUA;AAMA;iBC3SgB,YAAA,SAAoB,cAAmB;;;;;AD9DvD;AAKA;AAsCA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYiB,iBErOD,wBAAA,CFqOY,IAAA,EErOmB,UFqOnB,CAAA,EAAA,MAAA,EAAA"}
package/dist/index.mjs CHANGED
@@ -139,7 +139,13 @@ const screenSchema = z.object({
139
139
  description: z.string().optional(),
140
140
  links: z.array(z.object({
141
141
  label: z.string(),
142
- url: z.string().url()
142
+ url: z.string().url(),
143
+ type: z.enum([
144
+ "figma",
145
+ "storybook",
146
+ "docs",
147
+ "other"
148
+ ]).optional()
143
149
  })).optional(),
144
150
  mock: screenMockSchema.optional()
145
151
  });
@@ -153,6 +159,20 @@ const adoptionSchema = z.object({
153
159
  minimumCoverage: z.number().min(0).max(100).optional()
154
160
  });
155
161
  /**
162
+ * Schema for OpenAPI configuration (runtime validation)
163
+ * @internal
164
+ */
165
+ const openApiConfigSchema = z.object({ sources: z.array(z.string()).min(1) });
166
+ /**
167
+ * Schema for API integration configuration (runtime validation)
168
+ * @internal
169
+ */
170
+ const apiIntegrationSchema = z.object({
171
+ clientPackages: z.array(z.string()).optional(),
172
+ extractApiName: z.any().optional(),
173
+ openapi: openApiConfigSchema.optional()
174
+ });
175
+ /**
156
176
  * Schema for Screenbook configuration (runtime validation)
157
177
  * @internal
158
178
  */
@@ -162,7 +182,8 @@ const configSchema = z.object({
162
182
  routesPattern: z.string().optional(),
163
183
  routesFile: z.string().optional(),
164
184
  ignore: z.array(z.string()).default(["**/node_modules/**", "**/.git/**"]),
165
- adoption: adoptionSchema.optional()
185
+ adoption: adoptionSchema.optional(),
186
+ apiIntegration: apiIntegrationSchema.optional()
166
187
  }).refine((data) => !(data.routesPattern && data.routesFile), {
167
188
  message: "Cannot specify both 'routesPattern' and 'routesFile'. Use one or the other.",
168
189
  path: ["routesFile"]
@@ -226,5 +247,5 @@ function defineConfig(input = {}) {
226
247
  }
227
248
 
228
249
  //#endregion
229
- export { adoptionSchema, configSchema, defineConfig, defineScreen, extractNavigationTargets, screenMockSchema, screenSchema };
250
+ export { adoptionSchema, apiIntegrationSchema, configSchema, defineConfig, defineScreen, extractNavigationTargets, openApiConfigSchema, screenMockSchema, screenSchema };
230
251
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["mockSectionSchema: z.ZodType<MockSection>"],"sources":["../src/extractNavigationTargets.ts","../src/types.ts","../src/defineScreen.ts"],"sourcesContent":["import type { MockSection, ScreenMock } from \"./types.js\"\n\n/**\n * Extracts all navigation target screen IDs from a mock definition.\n *\n * This function collects all `navigateTo`, `itemNavigateTo`, and `rowNavigateTo`\n * values from mock elements to automatically derive the `next` array.\n * It recursively processes child sections.\n *\n * @param mock - The screen mock definition\n * @returns Array of unique screen IDs that can be navigated to\n *\n * @example\n * ```ts\n * const mock = {\n * sections: [{\n * elements: [\n * { type: \"button\", label: \"Edit\", navigateTo: \"billing.invoice.edit\" },\n * { type: \"list\", label: \"Items\", itemNavigateTo: \"billing.item.detail\" },\n * ]\n * }]\n * }\n * extractNavigationTargets(mock)\n * // => [\"billing.invoice.edit\", \"billing.item.detail\"]\n * ```\n */\nexport function extractNavigationTargets(mock: ScreenMock): string[] {\n\tconst targets = new Set<string>()\n\n\tfunction processSection(section: MockSection): void {\n\t\tfor (const element of section.elements) {\n\t\t\t// Button and Link elements have navigateTo\n\t\t\tif (\"navigateTo\" in element && element.navigateTo) {\n\t\t\t\ttargets.add(element.navigateTo)\n\t\t\t}\n\n\t\t\t// List elements have itemNavigateTo\n\t\t\tif (\"itemNavigateTo\" in element && element.itemNavigateTo) {\n\t\t\t\ttargets.add(element.itemNavigateTo)\n\t\t\t}\n\n\t\t\t// Table elements have rowNavigateTo\n\t\t\tif (\"rowNavigateTo\" in element && element.rowNavigateTo) {\n\t\t\t\ttargets.add(element.rowNavigateTo)\n\t\t\t}\n\t\t}\n\n\t\t// Recursively process child sections\n\t\tif (section.children) {\n\t\t\tfor (const child of section.children) {\n\t\t\t\tprocessSection(child)\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const section of mock.sections) {\n\t\tprocessSection(section)\n\t}\n\n\treturn Array.from(targets)\n}\n","import { z } from \"zod\"\n\n/**\n * External link to related resources\n */\nexport interface ScreenLink {\n\t/**\n\t * Display label for the link\n\t * @example \"Figma Design\"\n\t * @example \"Storybook\"\n\t */\n\tlabel: string\n\t/**\n\t * URL to the external resource\n\t * @example \"https://figma.com/file/...\"\n\t * @example \"https://storybook.example.com/?path=/story/billing-invoice\"\n\t */\n\turl: string\n}\n\n/**\n * Screen metadata definition for the screen catalog.\n *\n * @example\n * ```ts\n * const screen: Screen = {\n * id: \"billing.invoice.detail\",\n * title: \"Invoice Detail\",\n * route: \"/billing/invoices/:id\",\n * owner: [\"billing-team\"],\n * tags: [\"billing\", \"invoice\"],\n * dependsOn: [\"InvoiceAPI.getDetail\"],\n * next: [\"billing.invoice.edit\"],\n * }\n * ```\n */\nexport interface Screen {\n\t/**\n\t * Unique identifier for the screen using dot notation\n\t * @example \"billing.invoice.detail\"\n\t * @example \"auth.login\"\n\t * @example \"settings.profile\"\n\t */\n\tid: string\n\n\t/**\n\t * Human-readable title displayed in the screen catalog\n\t * @example \"Invoice Detail\"\n\t * @example \"Login\"\n\t * @example \"User Profile Settings\"\n\t */\n\ttitle: string\n\n\t/**\n\t * Route path pattern with optional dynamic segments\n\t * @example \"/billing/invoices/:id\"\n\t * @example \"/auth/login\"\n\t * @example \"/settings/profile\"\n\t */\n\troute: string\n\n\t/**\n\t * Team(s) or domain(s) that own this screen\n\t * @example [\"billing-team\"]\n\t * @example [\"platform\", \"billing\"]\n\t */\n\towner?: string[]\n\n\t/**\n\t * Tags for categorization and filtering in the catalog\n\t * @example [\"billing\", \"invoice\"]\n\t * @example [\"auth\", \"security\"]\n\t */\n\ttags?: string[]\n\n\t/**\n\t * APIs or services this screen depends on for impact analysis\n\t * @example [\"InvoiceAPI.getDetail\", \"PaymentAPI.getStatus\"]\n\t * @example [\"UserAPI.getProfile\"]\n\t */\n\tdependsOn?: string[]\n\n\t/**\n\t * Screen IDs that can navigate to this screen (incoming edges)\n\t * @example [\"billing.invoice.list\"]\n\t * @example [\"dashboard.home\", \"nav.sidebar\"]\n\t */\n\tentryPoints?: string[]\n\n\t/**\n\t * Screen IDs this screen can navigate to (outgoing edges)\n\t * @example [\"billing.invoice.edit\", \"billing.payment.start\"]\n\t * @example [\"billing.invoice.list\"]\n\t */\n\tnext?: string[]\n\n\t/**\n\t * Allow circular navigation involving this screen.\n\t * When true, cycles that include this screen will not trigger warnings.\n\t * @default false\n\t * @example true\n\t */\n\tallowCycles?: boolean\n\n\t/**\n\t * Optional description explaining the screen's purpose\n\t * @example \"Displays detailed invoice information including line items and payment status\"\n\t */\n\tdescription?: string\n\n\t/**\n\t * Links to external resources like Storybook, Figma, or documentation\n\t * @example [{ label: \"Figma\", url: \"https://figma.com/file/...\" }]\n\t */\n\tlinks?: ScreenLink[]\n\n\t/**\n\t * Wireframe-level mock definition for UI documentation.\n\t * When defined, navigation targets (navigateTo, itemNavigateTo, rowNavigateTo)\n\t * are automatically extracted and merged into the `next` array.\n\t */\n\tmock?: ScreenMock\n}\n\n// =============================================================================\n// Mock Types - Wireframe-level UI mockups for screen flow documentation\n// =============================================================================\n\n/**\n * Layout direction for mock sections\n */\nexport type MockLayout = \"vertical\" | \"horizontal\"\n\n/**\n * Available element types for mock wireframes\n */\nexport type MockElementType =\n\t| \"button\"\n\t| \"input\"\n\t| \"link\"\n\t| \"text\"\n\t| \"image\"\n\t| \"list\"\n\t| \"table\"\n\n/**\n * Base interface for all mock elements\n */\ninterface MockElementBase {\n\t/** Element type identifier */\n\ttype: MockElementType\n\t/** Display label for the element */\n\tlabel: string\n}\n\n/**\n * Button element with optional navigation and styling\n */\nexport interface MockButtonElement extends MockElementBase {\n\ttype: \"button\"\n\t/** Screen ID to navigate to when clicked */\n\tnavigateTo?: string\n\t/** Visual style variant */\n\tvariant?: \"primary\" | \"secondary\" | \"danger\"\n}\n\n/**\n * Input field element\n */\nexport interface MockInputElement extends MockElementBase {\n\ttype: \"input\"\n\t/** Placeholder text */\n\tplaceholder?: string\n\t/** Input type for semantics */\n\tinputType?: \"text\" | \"email\" | \"password\" | \"textarea\" | \"search\"\n}\n\n/**\n * Link element with optional navigation\n */\nexport interface MockLinkElement extends MockElementBase {\n\ttype: \"link\"\n\t/** Screen ID to navigate to when clicked */\n\tnavigateTo?: string\n}\n\n/**\n * Text element for labels and headings\n */\nexport interface MockTextElement extends MockElementBase {\n\ttype: \"text\"\n\t/** Text style variant */\n\tvariant?: \"heading\" | \"subheading\" | \"body\" | \"caption\"\n}\n\n/**\n * Image placeholder element\n */\nexport interface MockImageElement extends MockElementBase {\n\ttype: \"image\"\n\t/** Aspect ratio (e.g., \"16:9\", \"1:1\") */\n\taspectRatio?: string\n}\n\n/**\n * List element for displaying multiple items\n */\nexport interface MockListElement extends MockElementBase {\n\ttype: \"list\"\n\t/** Number of items to display (default: 3) */\n\titemCount?: number\n\t/** Screen ID to navigate to when an item is clicked */\n\titemNavigateTo?: string\n}\n\n/**\n * Table element for displaying tabular data\n */\nexport interface MockTableElement extends MockElementBase {\n\ttype: \"table\"\n\t/** Column headers */\n\tcolumns?: string[]\n\t/** Number of rows to display (default: 3) */\n\trowCount?: number\n\t/** Screen ID to navigate to when a row is clicked */\n\trowNavigateTo?: string\n}\n\n/**\n * Union type of all mock element variants\n */\nexport type MockElement =\n\t| MockButtonElement\n\t| MockInputElement\n\t| MockLinkElement\n\t| MockTextElement\n\t| MockImageElement\n\t| MockListElement\n\t| MockTableElement\n\n/**\n * Section containing grouped mock elements\n */\nexport interface MockSection {\n\t/** Optional section title */\n\ttitle?: string\n\t/** Layout direction (default: \"vertical\") */\n\tlayout?: MockLayout\n\t/** Elements within this section */\n\telements: MockElement[]\n\t/** Nested child sections */\n\tchildren?: MockSection[]\n}\n\n/**\n * Complete mock definition for a screen\n */\nexport interface ScreenMock {\n\t/** Sections containing UI elements */\n\tsections: MockSection[]\n}\n\n// =============================================================================\n// Mock Zod Schemas\n// =============================================================================\n\nconst mockLayoutSchema = z.enum([\"vertical\", \"horizontal\"])\n\nconst mockElementBaseSchema = z.object({\n\ttype: z.enum([\"button\", \"input\", \"link\", \"text\", \"image\", \"list\", \"table\"]),\n\tlabel: z.string().min(1),\n})\n\nconst mockButtonElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"button\"),\n\tnavigateTo: z.string().optional(),\n\tvariant: z.enum([\"primary\", \"secondary\", \"danger\"]).optional(),\n})\n\nconst mockInputElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"input\"),\n\tplaceholder: z.string().optional(),\n\tinputType: z\n\t\t.enum([\"text\", \"email\", \"password\", \"textarea\", \"search\"])\n\t\t.optional(),\n})\n\nconst mockLinkElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"link\"),\n\tnavigateTo: z.string().optional(),\n})\n\nconst mockTextElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"text\"),\n\tvariant: z.enum([\"heading\", \"subheading\", \"body\", \"caption\"]).optional(),\n})\n\nconst mockImageElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"image\"),\n\taspectRatio: z.string().optional(),\n})\n\nconst mockListElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"list\"),\n\titemCount: z.number().int().positive().optional(),\n\titemNavigateTo: z.string().optional(),\n})\n\nconst mockTableElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"table\"),\n\tcolumns: z.array(z.string()).optional(),\n\trowCount: z.number().int().positive().optional(),\n\trowNavigateTo: z.string().optional(),\n})\n\nconst mockElementSchema = z.discriminatedUnion(\"type\", [\n\tmockButtonElementSchema,\n\tmockInputElementSchema,\n\tmockLinkElementSchema,\n\tmockTextElementSchema,\n\tmockImageElementSchema,\n\tmockListElementSchema,\n\tmockTableElementSchema,\n])\n\nconst mockSectionSchema: z.ZodType<MockSection> = z.lazy(() =>\n\tz.object({\n\t\ttitle: z.string().optional(),\n\t\tlayout: mockLayoutSchema.optional(),\n\t\telements: z.array(mockElementSchema),\n\t\tchildren: z.array(mockSectionSchema).optional(),\n\t}),\n)\n\n/**\n * Schema for screen mock definition (runtime validation)\n * @internal\n */\nexport const screenMockSchema = z.object({\n\tsections: z.array(mockSectionSchema),\n})\n\n// =============================================================================\n\n/**\n * Input type for defineScreen function.\n * Same as Screen but used for input validation.\n */\nexport type ScreenInput = Screen\n\n/**\n * Schema for screen metadata definition (runtime validation)\n * @internal\n */\nexport const screenSchema = z.object({\n\tid: z.string().min(1),\n\ttitle: z.string().min(1),\n\troute: z.string().min(1),\n\towner: z.array(z.string()).optional(),\n\ttags: z.array(z.string()).optional(),\n\tdependsOn: z.array(z.string()).optional(),\n\tentryPoints: z.array(z.string()).optional(),\n\tnext: z.array(z.string()).optional(),\n\tallowCycles: z.boolean().optional(),\n\tdescription: z.string().optional(),\n\tlinks: z\n\t\t.array(\n\t\t\tz.object({\n\t\t\t\tlabel: z.string(),\n\t\t\t\turl: z.string().url(),\n\t\t\t}),\n\t\t)\n\t\t.optional(),\n\tmock: screenMockSchema.optional(),\n})\n\n/**\n * Progressive adoption configuration for gradual rollout.\n *\n * @example\n * ```ts\n * const adoption: AdoptionConfig = {\n * mode: \"progressive\",\n * includePatterns: [\"src/pages/billing/**\"],\n * minimumCoverage: 80,\n * }\n * ```\n */\nexport interface AdoptionConfig {\n\t/**\n\t * Adoption mode for screen metadata coverage\n\t * - `\"full\"`: All routes must have screen.meta.ts (default)\n\t * - `\"progressive\"`: Only check coverage within includePatterns\n\t * @default \"full\"\n\t * @example \"full\"\n\t * @example \"progressive\"\n\t */\n\tmode?: \"full\" | \"progressive\"\n\n\t/**\n\t * Glob patterns to include for coverage checking (progressive mode only)\n\t * @example [\"src/pages/billing/**\"]\n\t * @example [\"src/pages/auth/**\", \"src/pages/settings/**\"]\n\t */\n\tincludePatterns?: string[]\n\n\t/**\n\t * Minimum coverage percentage required to pass lint (0-100)\n\t * @example 80\n\t * @example 100\n\t */\n\tminimumCoverage?: number\n}\n\n/**\n * Schema for progressive adoption configuration (runtime validation)\n * @internal\n */\nexport const adoptionSchema = z.object({\n\tmode: z.enum([\"full\", \"progressive\"]).default(\"full\"),\n\tincludePatterns: z.array(z.string()).optional(),\n\tminimumCoverage: z.number().min(0).max(100).optional(),\n})\n\n/**\n * Screenbook configuration options.\n */\nexport interface Config {\n\t/**\n\t * Output directory for generated files\n\t * @default \".screenbook\"\n\t * @example \".screenbook\"\n\t * @example \"dist/screenbook\"\n\t */\n\toutDir: string\n\n\t/**\n\t * Glob pattern for screen metadata files.\n\t * Supports colocation: place screen.meta.ts alongside your route files.\n\t * @default \"src/**\\/screen.meta.ts\"\n\t * @example \"src/**\\/screen.meta.ts\"\n\t * @example \"app/**\\/screen.meta.ts\"\n\t */\n\tmetaPattern: string\n\n\t/**\n\t * Glob pattern for route files (for generate/lint commands).\n\t * Use this for file-based routing frameworks (Next.js, Nuxt, Remix, etc.).\n\t * Cannot be used together with routesFile.\n\t * @example \"src/pages/**\\/page.tsx\"\n\t * @example \"app/**\\/page.tsx\"\n\t * @example \"src/routes/**\\/*.tsx\"\n\t */\n\troutesPattern?: string\n\n\t/**\n\t * Path to a router configuration file (for config-based routing).\n\t * Use this for frameworks like Vue Router, React Router, etc.\n\t * Cannot be used together with routesPattern.\n\t * @example \"src/router/routes.ts\"\n\t * @example \"src/router/index.ts\"\n\t */\n\troutesFile?: string\n\n\t/**\n\t * Patterns to ignore when scanning (glob patterns).\n\t * Defaults to node_modules and .git directories.\n\t */\n\tignore: string[]\n\n\t/**\n\t * Progressive adoption configuration for gradual rollout\n\t * @example { mode: \"progressive\", includePatterns: [\"src/pages/billing/**\"], minimumCoverage: 80 }\n\t */\n\tadoption?: AdoptionConfig\n}\n\n/**\n * Input type for defineConfig function.\n * All fields with defaults are optional in input.\n *\n * @example\n * ```ts\n * defineConfig({\n * metaPattern: \"app/**\\/screen.meta.ts\",\n * routesPattern: \"app/**\\/page.tsx\",\n * })\n * ```\n */\nexport interface ConfigInput {\n\t/**\n\t * Output directory for generated files\n\t * @default \".screenbook\"\n\t * @example \".screenbook\"\n\t */\n\toutDir?: string\n\n\t/**\n\t * Glob pattern for screen metadata files\n\t * @default \"src/**\\/screen.meta.ts\"\n\t * @example \"app/**\\/screen.meta.ts\"\n\t */\n\tmetaPattern?: string\n\n\t/**\n\t * Glob pattern for route files (for generate/lint commands).\n\t * Use this for file-based routing frameworks.\n\t * Cannot be used together with routesFile.\n\t * @example \"src/pages/**\\/page.tsx\"\n\t */\n\troutesPattern?: string\n\n\t/**\n\t * Path to a router configuration file (for config-based routing).\n\t * Use this for frameworks like Vue Router, React Router, etc.\n\t * Cannot be used together with routesPattern.\n\t * @example \"src/router/routes.ts\"\n\t */\n\troutesFile?: string\n\n\t/**\n\t * Patterns to ignore when scanning.\n\t * Defaults to node_modules and .git directories.\n\t */\n\tignore?: string[]\n\n\t/**\n\t * Progressive adoption configuration\n\t */\n\tadoption?: AdoptionConfig\n}\n\n/**\n * Schema for Screenbook configuration (runtime validation)\n * @internal\n */\nexport const configSchema = z\n\t.object({\n\t\toutDir: z.string().default(\".screenbook\"),\n\t\tmetaPattern: z.string().default(\"src/**/screen.meta.ts\"),\n\t\troutesPattern: z.string().optional(),\n\t\troutesFile: z.string().optional(),\n\t\tignore: z.array(z.string()).default([\"**/node_modules/**\", \"**/.git/**\"]),\n\t\tadoption: adoptionSchema.optional(),\n\t})\n\t.refine((data) => !(data.routesPattern && data.routesFile), {\n\t\tmessage:\n\t\t\t\"Cannot specify both 'routesPattern' and 'routesFile'. Use one or the other.\",\n\t\tpath: [\"routesFile\"],\n\t})\n","import { extractNavigationTargets } from \"./extractNavigationTargets.js\"\nimport {\n\ttype Config,\n\ttype ConfigInput,\n\tconfigSchema,\n\ttype Screen,\n\ttype ScreenInput,\n\tscreenSchema,\n} from \"./types.js\"\n\n/**\n * Define a screen with metadata for the screen catalog.\n *\n * When a `mock` is defined, navigation targets (navigateTo, itemNavigateTo,\n * rowNavigateTo) are automatically extracted and merged into the `next` array.\n *\n * @example\n * ```ts\n * export const screen = defineScreen({\n * id: \"billing.invoice.detail\",\n * title: \"Invoice Detail\",\n * route: \"/billing/invoices/:id\",\n * owner: [\"billing\"],\n * tags: [\"billing\", \"invoice\"],\n * dependsOn: [\"InvoiceAPI.getDetail\"],\n * entryPoints: [\"billing.invoice.list\"],\n * next: [\"billing.invoice.edit\"],\n * mock: {\n * sections: [{\n * elements: [\n * { type: \"button\", label: \"Pay\", navigateTo: \"billing.payment.start\" },\n * ],\n * }],\n * },\n * })\n * // next will be [\"billing.invoice.edit\", \"billing.payment.start\"]\n * ```\n */\nexport function defineScreen(input: ScreenInput): Screen {\n\tconst validated = screenSchema.parse(input)\n\n\t// Auto-derive next from mock if mock exists\n\tif (validated.mock) {\n\t\tconst mockTargets = extractNavigationTargets(validated.mock)\n\t\tif (mockTargets.length > 0) {\n\t\t\t// Merge with existing next, avoiding duplicates\n\t\t\tconst existingNext = validated.next ?? []\n\t\t\tconst mergedNext = [...new Set([...existingNext, ...mockTargets])]\n\t\t\tvalidated.next = mergedNext\n\t\t}\n\t}\n\n\treturn validated\n}\n\n/**\n * Define Screenbook configuration.\n *\n * @example\n * ```ts\n * export default defineConfig({\n * screensDir: \"src/screens\",\n * outDir: \".screenbook\",\n * metaPattern: \"**\\/screen.meta.ts\",\n * })\n * ```\n */\nexport function defineConfig(input: ConfigInput = {}): Config {\n\treturn configSchema.parse(input)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,yBAAyB,MAA4B;CACpE,MAAM,0BAAU,IAAI,KAAa;CAEjC,SAAS,eAAe,SAA4B;AACnD,OAAK,MAAM,WAAW,QAAQ,UAAU;AAEvC,OAAI,gBAAgB,WAAW,QAAQ,WACtC,SAAQ,IAAI,QAAQ,WAAW;AAIhC,OAAI,oBAAoB,WAAW,QAAQ,eAC1C,SAAQ,IAAI,QAAQ,eAAe;AAIpC,OAAI,mBAAmB,WAAW,QAAQ,cACzC,SAAQ,IAAI,QAAQ,cAAc;;AAKpC,MAAI,QAAQ,SACX,MAAK,MAAM,SAAS,QAAQ,SAC3B,gBAAe,MAAM;;AAKxB,MAAK,MAAM,WAAW,KAAK,SAC1B,gBAAe,QAAQ;AAGxB,QAAO,MAAM,KAAK,QAAQ;;;;;AC+M3B,MAAM,mBAAmB,EAAE,KAAK,CAAC,YAAY,aAAa,CAAC;AAE3D,MAAM,wBAAwB,EAAE,OAAO;CACtC,MAAM,EAAE,KAAK;EAAC;EAAU;EAAS;EAAQ;EAAQ;EAAS;EAAQ;EAAQ,CAAC;CAC3E,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE;CACxB,CAAC;AAEF,MAAM,0BAA0B,sBAAsB,OAAO;CAC5D,MAAM,EAAE,QAAQ,SAAS;CACzB,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,SAAS,EAAE,KAAK;EAAC;EAAW;EAAa;EAAS,CAAC,CAAC,UAAU;CAC9D,CAAC;AAEF,MAAM,yBAAyB,sBAAsB,OAAO;CAC3D,MAAM,EAAE,QAAQ,QAAQ;CACxB,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,WAAW,EACT,KAAK;EAAC;EAAQ;E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Ae,UAAU;CACnC,CAAC,CACD,QAAQ,SAAS,EAAE,KAAK,iBAAiB,KAAK,aAAa;CAC3D,SACC;CACD,MAAM,CAAC,aAAa;CACpB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/fH,SAAgB,aAAa,OAA4B;CACxD,MAAM,YAAY,aAAa,MAAM,MAAM;AAG3C,KAAI,UAAU,MAAM;EACnB,MAAM,cAAc,yBAAyB,UAAU,KAAK;AAC5D,MAAI,YAAY,SAAS,GAAG;GAE3B,MAAM,eAAe,UAAU,QAAQ,EAAE;AAEzC,aAAU,OADS,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,cAAc,GAAG,YAAY,CAAC,CAAC;;;AAKpE,QAAO;;;;;;;;;;;;;;AAeR,SAAgB,aAAa,QAAqB,EAAE,EAAU;AAC7D,QAAO,aAAa,MAAM,MAAM"}
1
+ {"version":3,"file":"index.mjs","names":["mockSectionSchema: z.ZodType<MockSection>"],"sources":["../src/extractNavigationTargets.ts","../src/types.ts","../src/defineScreen.ts"],"sourcesContent":["import type { MockSection, ScreenMock } from \"./types.js\"\n\n/**\n * Extracts all navigation target screen IDs from a mock definition.\n *\n * This function collects all `navigateTo`, `itemNavigateTo`, and `rowNavigateTo`\n * values from mock elements to automatically derive the `next` array.\n * It recursively processes child sections.\n *\n * @param mock - The screen mock definition\n * @returns Array of unique screen IDs that can be navigated to\n *\n * @example\n * ```ts\n * const mock = {\n * sections: [{\n * elements: [\n * { type: \"button\", label: \"Edit\", navigateTo: \"billing.invoice.edit\" },\n * { type: \"list\", label: \"Items\", itemNavigateTo: \"billing.item.detail\" },\n * ]\n * }]\n * }\n * extractNavigationTargets(mock)\n * // => [\"billing.invoice.edit\", \"billing.item.detail\"]\n * ```\n */\nexport function extractNavigationTargets(mock: ScreenMock): string[] {\n\tconst targets = new Set<string>()\n\n\tfunction processSection(section: MockSection): void {\n\t\tfor (const element of section.elements) {\n\t\t\t// Button and Link elements have navigateTo\n\t\t\tif (\"navigateTo\" in element && element.navigateTo) {\n\t\t\t\ttargets.add(element.navigateTo)\n\t\t\t}\n\n\t\t\t// List elements have itemNavigateTo\n\t\t\tif (\"itemNavigateTo\" in element && element.itemNavigateTo) {\n\t\t\t\ttargets.add(element.itemNavigateTo)\n\t\t\t}\n\n\t\t\t// Table elements have rowNavigateTo\n\t\t\tif (\"rowNavigateTo\" in element && element.rowNavigateTo) {\n\t\t\t\ttargets.add(element.rowNavigateTo)\n\t\t\t}\n\t\t}\n\n\t\t// Recursively process child sections\n\t\tif (section.children) {\n\t\t\tfor (const child of section.children) {\n\t\t\t\tprocessSection(child)\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const section of mock.sections) {\n\t\tprocessSection(section)\n\t}\n\n\treturn Array.from(targets)\n}\n","import { z } from \"zod\"\n\n/**\n * Type of external link for icon display\n */\nexport type ScreenLinkType = \"figma\" | \"storybook\" | \"docs\" | \"other\"\n\n/**\n * External link to related resources\n */\nexport interface ScreenLink {\n\t/**\n\t * Display label for the link\n\t * @example \"Figma Design\"\n\t * @example \"Storybook\"\n\t */\n\tlabel: string\n\t/**\n\t * URL to the external resource\n\t * @example \"https://figma.com/file/...\"\n\t * @example \"https://storybook.example.com/?path=/story/billing-invoice\"\n\t */\n\turl: string\n\t/**\n\t * Type of link for icon display\n\t * If not specified, the type is inferred from the URL\n\t * @example \"figma\"\n\t * @example \"storybook\"\n\t */\n\ttype?: ScreenLinkType\n}\n\n/**\n * Screen metadata definition for the screen catalog.\n *\n * @example\n * ```ts\n * const screen: Screen = {\n * id: \"billing.invoice.detail\",\n * title: \"Invoice Detail\",\n * route: \"/billing/invoices/:id\",\n * owner: [\"billing-team\"],\n * tags: [\"billing\", \"invoice\"],\n * dependsOn: [\"InvoiceAPI.getDetail\"],\n * next: [\"billing.invoice.edit\"],\n * }\n * ```\n */\nexport interface Screen {\n\t/**\n\t * Unique identifier for the screen using dot notation\n\t * @example \"billing.invoice.detail\"\n\t * @example \"auth.login\"\n\t * @example \"settings.profile\"\n\t */\n\tid: string\n\n\t/**\n\t * Human-readable title displayed in the screen catalog\n\t * @example \"Invoice Detail\"\n\t * @example \"Login\"\n\t * @example \"User Profile Settings\"\n\t */\n\ttitle: string\n\n\t/**\n\t * Route path pattern with optional dynamic segments\n\t * @example \"/billing/invoices/:id\"\n\t * @example \"/auth/login\"\n\t * @example \"/settings/profile\"\n\t */\n\troute: string\n\n\t/**\n\t * Team(s) or domain(s) that own this screen\n\t * @example [\"billing-team\"]\n\t * @example [\"platform\", \"billing\"]\n\t */\n\towner?: string[]\n\n\t/**\n\t * Tags for categorization and filtering in the catalog\n\t * @example [\"billing\", \"invoice\"]\n\t * @example [\"auth\", \"security\"]\n\t */\n\ttags?: string[]\n\n\t/**\n\t * APIs or services this screen depends on for impact analysis\n\t * @example [\"InvoiceAPI.getDetail\", \"PaymentAPI.getStatus\"]\n\t * @example [\"UserAPI.getProfile\"]\n\t */\n\tdependsOn?: string[]\n\n\t/**\n\t * Screen IDs that can navigate to this screen (incoming edges)\n\t * @example [\"billing.invoice.list\"]\n\t * @example [\"dashboard.home\", \"nav.sidebar\"]\n\t */\n\tentryPoints?: string[]\n\n\t/**\n\t * Screen IDs this screen can navigate to (outgoing edges)\n\t * @example [\"billing.invoice.edit\", \"billing.payment.start\"]\n\t * @example [\"billing.invoice.list\"]\n\t */\n\tnext?: string[]\n\n\t/**\n\t * Allow circular navigation involving this screen.\n\t * When true, cycles that include this screen will not trigger warnings.\n\t * @default false\n\t * @example true\n\t */\n\tallowCycles?: boolean\n\n\t/**\n\t * Optional description explaining the screen's purpose\n\t * @example \"Displays detailed invoice information including line items and payment status\"\n\t */\n\tdescription?: string\n\n\t/**\n\t * Links to external resources like Storybook, Figma, or documentation\n\t * @example [{ label: \"Figma\", url: \"https://figma.com/file/...\" }]\n\t */\n\tlinks?: ScreenLink[]\n\n\t/**\n\t * Wireframe-level mock definition for UI documentation.\n\t * When defined, navigation targets (navigateTo, itemNavigateTo, rowNavigateTo)\n\t * are automatically extracted and merged into the `next` array.\n\t */\n\tmock?: ScreenMock\n}\n\n// =============================================================================\n// Mock Types - Wireframe-level UI mockups for screen flow documentation\n// =============================================================================\n\n/**\n * Layout direction for mock sections\n */\nexport type MockLayout = \"vertical\" | \"horizontal\"\n\n/**\n * Available element types for mock wireframes\n */\nexport type MockElementType =\n\t| \"button\"\n\t| \"input\"\n\t| \"link\"\n\t| \"text\"\n\t| \"image\"\n\t| \"list\"\n\t| \"table\"\n\n/**\n * Base interface for all mock elements\n */\ninterface MockElementBase {\n\t/** Element type identifier */\n\ttype: MockElementType\n\t/** Display label for the element */\n\tlabel: string\n}\n\n/**\n * Button element with optional navigation and styling\n */\nexport interface MockButtonElement extends MockElementBase {\n\ttype: \"button\"\n\t/** Screen ID to navigate to when clicked */\n\tnavigateTo?: string\n\t/** Visual style variant */\n\tvariant?: \"primary\" | \"secondary\" | \"danger\"\n}\n\n/**\n * Input field element\n */\nexport interface MockInputElement extends MockElementBase {\n\ttype: \"input\"\n\t/** Placeholder text */\n\tplaceholder?: string\n\t/** Input type for semantics */\n\tinputType?: \"text\" | \"email\" | \"password\" | \"textarea\" | \"search\"\n}\n\n/**\n * Link element with optional navigation\n */\nexport interface MockLinkElement extends MockElementBase {\n\ttype: \"link\"\n\t/** Screen ID to navigate to when clicked */\n\tnavigateTo?: string\n}\n\n/**\n * Text element for labels and headings\n */\nexport interface MockTextElement extends MockElementBase {\n\ttype: \"text\"\n\t/** Text style variant */\n\tvariant?: \"heading\" | \"subheading\" | \"body\" | \"caption\"\n}\n\n/**\n * Image placeholder element\n */\nexport interface MockImageElement extends MockElementBase {\n\ttype: \"image\"\n\t/** Aspect ratio (e.g., \"16:9\", \"1:1\") */\n\taspectRatio?: string\n}\n\n/**\n * List element for displaying multiple items\n */\nexport interface MockListElement extends MockElementBase {\n\ttype: \"list\"\n\t/** Number of items to display (default: 3) */\n\titemCount?: number\n\t/** Screen ID to navigate to when an item is clicked */\n\titemNavigateTo?: string\n}\n\n/**\n * Table element for displaying tabular data\n */\nexport interface MockTableElement extends MockElementBase {\n\ttype: \"table\"\n\t/** Column headers */\n\tcolumns?: string[]\n\t/** Number of rows to display (default: 3) */\n\trowCount?: number\n\t/** Screen ID to navigate to when a row is clicked */\n\trowNavigateTo?: string\n}\n\n/**\n * Union type of all mock element variants\n */\nexport type MockElement =\n\t| MockButtonElement\n\t| MockInputElement\n\t| MockLinkElement\n\t| MockTextElement\n\t| MockImageElement\n\t| MockListElement\n\t| MockTableElement\n\n/**\n * Section containing grouped mock elements\n */\nexport interface MockSection {\n\t/** Optional section title */\n\ttitle?: string\n\t/** Layout direction (default: \"vertical\") */\n\tlayout?: MockLayout\n\t/** Elements within this section */\n\telements: MockElement[]\n\t/** Nested child sections */\n\tchildren?: MockSection[]\n}\n\n/**\n * Complete mock definition for a screen\n */\nexport interface ScreenMock {\n\t/** Sections containing UI elements */\n\tsections: MockSection[]\n}\n\n// =============================================================================\n// Mock Zod Schemas\n// =============================================================================\n\nconst mockLayoutSchema = z.enum([\"vertical\", \"horizontal\"])\n\nconst mockElementBaseSchema = z.object({\n\ttype: z.enum([\"button\", \"input\", \"link\", \"text\", \"image\", \"list\", \"table\"]),\n\tlabel: z.string().min(1),\n})\n\nconst mockButtonElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"button\"),\n\tnavigateTo: z.string().optional(),\n\tvariant: z.enum([\"primary\", \"secondary\", \"danger\"]).optional(),\n})\n\nconst mockInputElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"input\"),\n\tplaceholder: z.string().optional(),\n\tinputType: z\n\t\t.enum([\"text\", \"email\", \"password\", \"textarea\", \"search\"])\n\t\t.optional(),\n})\n\nconst mockLinkElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"link\"),\n\tnavigateTo: z.string().optional(),\n})\n\nconst mockTextElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"text\"),\n\tvariant: z.enum([\"heading\", \"subheading\", \"body\", \"caption\"]).optional(),\n})\n\nconst mockImageElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"image\"),\n\taspectRatio: z.string().optional(),\n})\n\nconst mockListElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"list\"),\n\titemCount: z.number().int().positive().optional(),\n\titemNavigateTo: z.string().optional(),\n})\n\nconst mockTableElementSchema = mockElementBaseSchema.extend({\n\ttype: z.literal(\"table\"),\n\tcolumns: z.array(z.string()).optional(),\n\trowCount: z.number().int().positive().optional(),\n\trowNavigateTo: z.string().optional(),\n})\n\nconst mockElementSchema = z.discriminatedUnion(\"type\", [\n\tmockButtonElementSchema,\n\tmockInputElementSchema,\n\tmockLinkElementSchema,\n\tmockTextElementSchema,\n\tmockImageElementSchema,\n\tmockListElementSchema,\n\tmockTableElementSchema,\n])\n\nconst mockSectionSchema: z.ZodType<MockSection> = z.lazy(() =>\n\tz.object({\n\t\ttitle: z.string().optional(),\n\t\tlayout: mockLayoutSchema.optional(),\n\t\telements: z.array(mockElementSchema),\n\t\tchildren: z.array(mockSectionSchema).optional(),\n\t}),\n)\n\n/**\n * Schema for screen mock definition (runtime validation)\n * @internal\n */\nexport const screenMockSchema = z.object({\n\tsections: z.array(mockSectionSchema),\n})\n\n// =============================================================================\n\n/**\n * Input type for defineScreen function.\n * Same as Screen but used for input validation.\n */\nexport type ScreenInput = Screen\n\n/**\n * Schema for screen metadata definition (runtime validation)\n * @internal\n */\nexport const screenSchema = z.object({\n\tid: z.string().min(1),\n\ttitle: z.string().min(1),\n\troute: z.string().min(1),\n\towner: z.array(z.string()).optional(),\n\ttags: z.array(z.string()).optional(),\n\tdependsOn: z.array(z.string()).optional(),\n\tentryPoints: z.array(z.string()).optional(),\n\tnext: z.array(z.string()).optional(),\n\tallowCycles: z.boolean().optional(),\n\tdescription: z.string().optional(),\n\tlinks: z\n\t\t.array(\n\t\t\tz.object({\n\t\t\t\tlabel: z.string(),\n\t\t\t\turl: z.string().url(),\n\t\t\t\ttype: z.enum([\"figma\", \"storybook\", \"docs\", \"other\"]).optional(),\n\t\t\t}),\n\t\t)\n\t\t.optional(),\n\tmock: screenMockSchema.optional(),\n})\n\n/**\n * Progressive adoption configuration for gradual rollout.\n *\n * @example\n * ```ts\n * const adoption: AdoptionConfig = {\n * mode: \"progressive\",\n * includePatterns: [\"src/pages/billing/**\"],\n * minimumCoverage: 80,\n * }\n * ```\n */\nexport interface AdoptionConfig {\n\t/**\n\t * Adoption mode for screen metadata coverage\n\t * - `\"full\"`: All routes must have screen.meta.ts (default)\n\t * - `\"progressive\"`: Only check coverage within includePatterns\n\t * @default \"full\"\n\t * @example \"full\"\n\t * @example \"progressive\"\n\t */\n\tmode?: \"full\" | \"progressive\"\n\n\t/**\n\t * Glob patterns to include for coverage checking (progressive mode only)\n\t * @example [\"src/pages/billing/**\"]\n\t * @example [\"src/pages/auth/**\", \"src/pages/settings/**\"]\n\t */\n\tincludePatterns?: string[]\n\n\t/**\n\t * Minimum coverage percentage required to pass lint (0-100)\n\t * @example 80\n\t * @example 100\n\t */\n\tminimumCoverage?: number\n}\n\n/**\n * Schema for progressive adoption configuration (runtime validation)\n * @internal\n */\nexport const adoptionSchema = z.object({\n\tmode: z.enum([\"full\", \"progressive\"]).default(\"full\"),\n\tincludePatterns: z.array(z.string()).optional(),\n\tminimumCoverage: z.number().min(0).max(100).optional(),\n})\n\n/**\n * API integration configuration for auto-detecting dependencies from\n * OpenAPI-generated clients (Orval, openapi-typescript, etc.).\n *\n * @example\n * ```ts\n * const apiIntegration: ApiIntegrationConfig = {\n * clientPackages: [\"@/api/generated\", \"@company/backend-client\"],\n * extractApiName: (name) => name.replace(/^use/, \"\"),\n * }\n * ```\n */\n/**\n * OpenAPI specification configuration for validating dependsOn references.\n *\n * @example\n * ```ts\n * const openapi: OpenApiConfig = {\n * sources: [\"./openapi.yaml\", \"https://api.example.com/openapi.json\"],\n * }\n * ```\n */\nexport interface OpenApiConfig {\n\t/**\n\t * OpenAPI specification sources (local files or remote URLs).\n\t * Supports OpenAPI 2.0 (Swagger) and 3.x specifications.\n\t * @example [\"./openapi.yaml\"]\n\t * @example [\"./openapi.yaml\", \"https://api.example.com/openapi.json\"]\n\t */\n\tsources: string[]\n}\n\nexport interface ApiIntegrationConfig {\n\t/**\n\t * Package names to scan for API client imports.\n\t * These should match the import paths used in your code.\n\t * @example [\"@/api/generated\"]\n\t * @example [\"@company/backend-client\", \"@company/auth-client\"]\n\t */\n\tclientPackages?: string[]\n\n\t/**\n\t * Optional transform function to convert import name to dependsOn format.\n\t * If not provided, the import name is used as-is.\n\t * @example (name) => name.replace(/^use/, \"\")\n\t * @example (name) => `API.${name}`\n\t */\n\textractApiName?: (importName: string) => string\n\n\t/**\n\t * OpenAPI specification configuration for validating dependsOn references.\n\t * When configured, `screenbook lint` will validate that dependsOn values\n\t * match operationIds or HTTP method + path from the OpenAPI spec.\n\t * @example { sources: [\"./openapi.yaml\"] }\n\t */\n\topenapi?: OpenApiConfig\n}\n\n/**\n * Schema for OpenAPI configuration (runtime validation)\n * @internal\n */\nexport const openApiConfigSchema = z.object({\n\tsources: z.array(z.string()).min(1),\n})\n\n/**\n * Schema for API integration configuration (runtime validation)\n * @internal\n */\nexport const apiIntegrationSchema = z.object({\n\tclientPackages: z.array(z.string()).optional(),\n\t// Function validation is complex in Zod v4, so we use z.any() for the optional transform function\n\textractApiName: z.any().optional(),\n\topenapi: openApiConfigSchema.optional(),\n})\n\n/**\n * Screenbook configuration options.\n */\nexport interface Config {\n\t/**\n\t * Output directory for generated files\n\t * @default \".screenbook\"\n\t * @example \".screenbook\"\n\t * @example \"dist/screenbook\"\n\t */\n\toutDir: string\n\n\t/**\n\t * Glob pattern for screen metadata files.\n\t * Supports colocation: place screen.meta.ts alongside your route files.\n\t * @default \"src/**\\/screen.meta.ts\"\n\t * @example \"src/**\\/screen.meta.ts\"\n\t * @example \"app/**\\/screen.meta.ts\"\n\t */\n\tmetaPattern: string\n\n\t/**\n\t * Glob pattern for route files (for generate/lint commands).\n\t * Use this for file-based routing frameworks (Next.js, Nuxt, Remix, etc.).\n\t * Cannot be used together with routesFile.\n\t * @example \"src/pages/**\\/page.tsx\"\n\t * @example \"app/**\\/page.tsx\"\n\t * @example \"src/routes/**\\/*.tsx\"\n\t */\n\troutesPattern?: string\n\n\t/**\n\t * Path to a router configuration file (for config-based routing).\n\t * Use this for frameworks like Vue Router, React Router, etc.\n\t * Cannot be used together with routesPattern.\n\t * @example \"src/router/routes.ts\"\n\t * @example \"src/router/index.ts\"\n\t */\n\troutesFile?: string\n\n\t/**\n\t * Patterns to ignore when scanning (glob patterns).\n\t * Defaults to node_modules and .git directories.\n\t */\n\tignore: string[]\n\n\t/**\n\t * Progressive adoption configuration for gradual rollout\n\t * @example { mode: \"progressive\", includePatterns: [\"src/pages/billing/**\"], minimumCoverage: 80 }\n\t */\n\tadoption?: AdoptionConfig\n\n\t/**\n\t * API integration configuration for auto-detecting dependencies\n\t * from OpenAPI-generated clients (Orval, openapi-typescript, etc.)\n\t * @example { clientPackages: [\"@/api/generated\"] }\n\t */\n\tapiIntegration?: ApiIntegrationConfig\n}\n\n/**\n * Input type for defineConfig function.\n * All fields with defaults are optional in input.\n *\n * @example\n * ```ts\n * defineConfig({\n * metaPattern: \"app/**\\/screen.meta.ts\",\n * routesPattern: \"app/**\\/page.tsx\",\n * })\n * ```\n */\nexport interface ConfigInput {\n\t/**\n\t * Output directory for generated files\n\t * @default \".screenbook\"\n\t * @example \".screenbook\"\n\t */\n\toutDir?: string\n\n\t/**\n\t * Glob pattern for screen metadata files\n\t * @default \"src/**\\/screen.meta.ts\"\n\t * @example \"app/**\\/screen.meta.ts\"\n\t */\n\tmetaPattern?: string\n\n\t/**\n\t * Glob pattern for route files (for generate/lint commands).\n\t * Use this for file-based routing frameworks.\n\t * Cannot be used together with routesFile.\n\t * @example \"src/pages/**\\/page.tsx\"\n\t */\n\troutesPattern?: string\n\n\t/**\n\t * Path to a router configuration file (for config-based routing).\n\t * Use this for frameworks like Vue Router, React Router, etc.\n\t * Cannot be used together with routesPattern.\n\t * @example \"src/router/routes.ts\"\n\t */\n\troutesFile?: string\n\n\t/**\n\t * Patterns to ignore when scanning.\n\t * Defaults to node_modules and .git directories.\n\t */\n\tignore?: string[]\n\n\t/**\n\t * Progressive adoption configuration\n\t */\n\tadoption?: AdoptionConfig\n\n\t/**\n\t * API integration configuration for auto-detecting dependencies\n\t * from OpenAPI-generated clients\n\t */\n\tapiIntegration?: ApiIntegrationConfig\n}\n\n/**\n * Schema for Screenbook configuration (runtime validation)\n * @internal\n */\nexport const configSchema = z\n\t.object({\n\t\toutDir: z.string().default(\".screenbook\"),\n\t\tmetaPattern: z.string().default(\"src/**/screen.meta.ts\"),\n\t\troutesPattern: z.string().optional(),\n\t\troutesFile: z.string().optional(),\n\t\tignore: z.array(z.string()).default([\"**/node_modules/**\", \"**/.git/**\"]),\n\t\tadoption: adoptionSchema.optional(),\n\t\tapiIntegration: apiIntegrationSchema.optional(),\n\t})\n\t.refine((data) => !(data.routesPattern && data.routesFile), {\n\t\tmessage:\n\t\t\t\"Cannot specify both 'routesPattern' and 'routesFile'. Use one or the other.\",\n\t\tpath: [\"routesFile\"],\n\t})\n","import { extractNavigationTargets } from \"./extractNavigationTargets.js\"\nimport {\n\ttype Config,\n\ttype ConfigInput,\n\tconfigSchema,\n\ttype Screen,\n\ttype ScreenInput,\n\tscreenSchema,\n} from \"./types.js\"\n\n/**\n * Define a screen with metadata for the screen catalog.\n *\n * When a `mock` is defined, navigation targets (navigateTo, itemNavigateTo,\n * rowNavigateTo) are automatically extracted and merged into the `next` array.\n *\n * @example\n * ```ts\n * export const screen = defineScreen({\n * id: \"billing.invoice.detail\",\n * title: \"Invoice Detail\",\n * route: \"/billing/invoices/:id\",\n * owner: [\"billing\"],\n * tags: [\"billing\", \"invoice\"],\n * dependsOn: [\"InvoiceAPI.getDetail\"],\n * entryPoints: [\"billing.invoice.list\"],\n * next: [\"billing.invoice.edit\"],\n * mock: {\n * sections: [{\n * elements: [\n * { type: \"button\", label: \"Pay\", navigateTo: \"billing.payment.start\" },\n * ],\n * }],\n * },\n * })\n * // next will be [\"billing.invoice.edit\", \"billing.payment.start\"]\n * ```\n */\nexport function defineScreen(input: ScreenInput): Screen {\n\tconst validated = screenSchema.parse(input)\n\n\t// Auto-derive next from mock if mock exists\n\tif (validated.mock) {\n\t\tconst mockTargets = extractNavigationTargets(validated.mock)\n\t\tif (mockTargets.length > 0) {\n\t\t\t// Merge with existing next, avoiding duplicates\n\t\t\tconst existingNext = validated.next ?? []\n\t\t\tconst mergedNext = [...new Set([...existingNext, ...mockTargets])]\n\t\t\tvalidated.next = mergedNext\n\t\t}\n\t}\n\n\treturn validated\n}\n\n/**\n * Define Screenbook configuration.\n *\n * @example\n * ```ts\n * export default defineConfig({\n * screensDir: \"src/screens\",\n * outDir: \".screenbook\",\n * metaPattern: \"**\\/screen.meta.ts\",\n * })\n * ```\n */\nexport function defineConfig(input: ConfigInput = {}): Config {\n\treturn configSchema.parse(input)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAgB,yBAAyB,MAA4B;CACpE,MAAM,0BAAU,IAAI,KAAa;CAEjC,SAAS,eAAe,SAA4B;AACnD,OAAK,MAAM,WAAW,QAAQ,UAAU;AAEvC,OAAI,gBAAgB,WAAW,QAAQ,WACtC,SAAQ,IAAI,QAAQ,WAAW;AAIhC,OAAI,oBAAoB,WAAW,QAAQ,eAC1C,SAAQ,IAAI,QAAQ,eAAe;AAIpC,OAAI,mBAAmB,WAAW,QAAQ,cACzC,SAAQ,IAAI,QAAQ,cAAc;;AAKpC,MAAI,QAAQ,SACX,MAAK,MAAM,SAAS,QAAQ,SAC3B,gBAAe,MAAM;;AAKxB,MAAK,MAAM,WAAW,KAAK,SAC1B,gBAAe,QAAQ;AAGxB,QAAO,MAAM,KAAK,QAAQ;;;;;AC2N3B,MAAM,mBAAmB,EAAE,KAAK,CAAC,YAAY,aAAa,CAAC;AAE3D,MAAM,wBAAwB,EAAE,OAAO;CACtC,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GAAG,IAAI,IAAI,CAAC,GAAG,cAAc,GAAG,YAAY,CAAC,CAAC;;;AAKpE,QAAO;;;;;;;;;;;;;;AAeR,SAAgB,aAAa,QAAqB,EAAE,EAAU;AAC7D,QAAO,aAAa,MAAM,MAAM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@screenbook/core",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "Define screens in code with TypeScript. Core library for screen catalog and navigation graph generation.",
5
5
  "type": "module",
6
6
  "exports": {