@screenbook/core 1.1.2 → 1.2.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
@@ -160,8 +160,12 @@ const configSchema = zod.z.object({
160
160
  outDir: zod.z.string().default(".screenbook"),
161
161
  metaPattern: zod.z.string().default("src/**/screen.meta.ts"),
162
162
  routesPattern: zod.z.string().optional(),
163
+ routesFile: zod.z.string().optional(),
163
164
  ignore: zod.z.array(zod.z.string()).default(["**/node_modules/**", "**/.git/**"]),
164
165
  adoption: adoptionSchema.optional()
166
+ }).refine((data) => !(data.routesPattern && data.routesFile), {
167
+ message: "Cannot specify both 'routesPattern' and 'routesFile'. Use one or the other.",
168
+ path: ["routesFile"]
165
169
  });
166
170
 
167
171
  //#endregion
package/dist/index.d.cts CHANGED
@@ -320,12 +320,22 @@ interface Config {
320
320
  */
321
321
  metaPattern: string;
322
322
  /**
323
- * Glob pattern for route files (for generate/lint commands)
323
+ * Glob pattern for route files (for generate/lint commands).
324
+ * Use this for file-based routing frameworks (Next.js, Nuxt, Remix, etc.).
325
+ * Cannot be used together with routesFile.
324
326
  * @example "src/pages/**\/page.tsx"
325
327
  * @example "app/**\/page.tsx"
326
328
  * @example "src/routes/**\/*.tsx"
327
329
  */
328
330
  routesPattern?: string;
331
+ /**
332
+ * Path to a router configuration file (for config-based routing).
333
+ * Use this for frameworks like Vue Router, React Router, etc.
334
+ * Cannot be used together with routesPattern.
335
+ * @example "src/router/routes.ts"
336
+ * @example "src/router/index.ts"
337
+ */
338
+ routesFile?: string;
329
339
  /**
330
340
  * Patterns to ignore when scanning (glob patterns).
331
341
  * Defaults to node_modules and .git directories.
@@ -363,10 +373,19 @@ interface ConfigInput {
363
373
  */
364
374
  metaPattern?: string;
365
375
  /**
366
- * Glob pattern for route files (for generate/lint commands)
376
+ * Glob pattern for route files (for generate/lint commands).
377
+ * Use this for file-based routing frameworks.
378
+ * Cannot be used together with routesFile.
367
379
  * @example "src/pages/**\/page.tsx"
368
380
  */
369
381
  routesPattern?: string;
382
+ /**
383
+ * Path to a router configuration file (for config-based routing).
384
+ * Use this for frameworks like Vue Router, React Router, etc.
385
+ * Cannot be used together with routesPattern.
386
+ * @example "src/router/routes.ts"
387
+ */
388
+ routesFile?: string;
370
389
  /**
371
390
  * Patterns to ignore when scanning.
372
391
  * Defaults to node_modules and .git directories.
@@ -385,6 +404,7 @@ declare const configSchema: z.ZodObject<{
385
404
  outDir: z.ZodDefault<z.ZodString>;
386
405
  metaPattern: z.ZodDefault<z.ZodString>;
387
406
  routesPattern: z.ZodOptional<z.ZodString>;
407
+ routesFile: z.ZodOptional<z.ZodString>;
388
408
  ignore: z.ZodDefault<z.ZodArray<z.ZodString>>;
389
409
  adoption: z.ZodOptional<z.ZodObject<{
390
410
  mode: z.ZodDefault<z.ZodEnum<{
@@ -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,OAoCX;EAeK;AAqCjB;;;;;;;;UAjZS;;;;;;SAOD;;;;;KAUI,UAAA;;;;KAKA,eAAA;;;AClGZ;AA6BA,UDiFU,eAAA,CCjFkB;;QDmFrB;;EE5HS,KAAA,EAAA,MAAA;;;;;UFoIC,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;;YAEN;;;;;;cA+EE,kBAAgB,CAAA,CAAA;;;;;;;KAUjB,WAAA,GAAc;;;;;cAMb,cAAY,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkCR,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8BJ,gBAAc,CAAA,CAAA;;;;;;;;;;;UASV,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAoCL;;;;;;;;;;;;;;UAeK,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;aA8BL;;;;;;cAOC,cAAY,CAAA,CAAA;;;;;;;;;;;;;;;;;;AA9fzB;AA+BA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYA;;;;;AAciB,iBC3ND,YAAA,CD6NL,KAAW,EC7Nc,WD6Nd,CAAA,EC7N4B,MD6N5B;AA+EtB;;;;;;;;;AAUA;AAMA;;iBC/RgB,YAAA,SAAoB,cAAmB;;;;;AD9DvD;AA+BA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYA;AAIU,iBE7NM,wBAAA,CF6NN,IAAA,EE7NqC,UF6NrC,CAAA,EAAA,MAAA,EAAA"}
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;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,CAAA;;;;;;;;;;;;;;;;;;;AAnhBzB;AA+BA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYA;;;;;AAciB,iBC3ND,YAAA,CD6NL,KAAW,EC7Nc,WD6Nd,CAAA,EC7N4B,MD6N5B;AA+EtB;;;;;;;;;AAUA;AAMA;;iBC/RgB,YAAA,SAAoB,cAAmB;;;;;AD9DvD;AA+BA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYA;AAIU,iBE7NM,wBAAA,CF6NN,IAAA,EE7NqC,UF6NrC,CAAA,EAAA,MAAA,EAAA"}
package/dist/index.d.mts CHANGED
@@ -320,12 +320,22 @@ interface Config {
320
320
  */
321
321
  metaPattern: string;
322
322
  /**
323
- * Glob pattern for route files (for generate/lint commands)
323
+ * Glob pattern for route files (for generate/lint commands).
324
+ * Use this for file-based routing frameworks (Next.js, Nuxt, Remix, etc.).
325
+ * Cannot be used together with routesFile.
324
326
  * @example "src/pages/**\/page.tsx"
325
327
  * @example "app/**\/page.tsx"
326
328
  * @example "src/routes/**\/*.tsx"
327
329
  */
328
330
  routesPattern?: string;
331
+ /**
332
+ * Path to a router configuration file (for config-based routing).
333
+ * Use this for frameworks like Vue Router, React Router, etc.
334
+ * Cannot be used together with routesPattern.
335
+ * @example "src/router/routes.ts"
336
+ * @example "src/router/index.ts"
337
+ */
338
+ routesFile?: string;
329
339
  /**
330
340
  * Patterns to ignore when scanning (glob patterns).
331
341
  * Defaults to node_modules and .git directories.
@@ -363,10 +373,19 @@ interface ConfigInput {
363
373
  */
364
374
  metaPattern?: string;
365
375
  /**
366
- * Glob pattern for route files (for generate/lint commands)
376
+ * Glob pattern for route files (for generate/lint commands).
377
+ * Use this for file-based routing frameworks.
378
+ * Cannot be used together with routesFile.
367
379
  * @example "src/pages/**\/page.tsx"
368
380
  */
369
381
  routesPattern?: string;
382
+ /**
383
+ * Path to a router configuration file (for config-based routing).
384
+ * Use this for frameworks like Vue Router, React Router, etc.
385
+ * Cannot be used together with routesPattern.
386
+ * @example "src/router/routes.ts"
387
+ */
388
+ routesFile?: string;
370
389
  /**
371
390
  * Patterns to ignore when scanning.
372
391
  * Defaults to node_modules and .git directories.
@@ -385,6 +404,7 @@ declare const configSchema: z.ZodObject<{
385
404
  outDir: z.ZodDefault<z.ZodString>;
386
405
  metaPattern: z.ZodDefault<z.ZodString>;
387
406
  routesPattern: z.ZodOptional<z.ZodString>;
407
+ routesFile: z.ZodOptional<z.ZodString>;
388
408
  ignore: z.ZodDefault<z.ZodArray<z.ZodString>>;
389
409
  adoption: z.ZodOptional<z.ZodObject<{
390
410
  mode: z.ZodDefault<z.ZodEnum<{
@@ -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,OAoCX;EAeK;AAqCjB;;;;;;;;UAjZS;;;;;;SAOD;;;;;KAUI,UAAA;;;;KAKA,eAAA;;;AClGZ;AA6BA,UDiFU,eAAA,CCjFkB;;QDmFrB;;EE5HS,KAAA,EAAA,MAAA;;;;;UFoIC,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;;YAEN;;;;;;cA+EE,kBAAgB,CAAA,CAAA;;;;;;;KAUjB,WAAA,GAAc;;;;;cAMb,cAAY,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkCR,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;cA8BJ,gBAAc,CAAA,CAAA;;;;;;;;;;;UASV,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAoCL;;;;;;;;;;;;;;UAeK,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;aA8BL;;;;;;cAOC,cAAY,CAAA,CAAA;;;;;;;;;;;;;;;;;;AA9fzB;AA+BA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYA;;;;;AAciB,iBC3ND,YAAA,CD6NL,KAAW,EC7Nc,WD6Nd,CAAA,EC7N4B,MD6N5B;AA+EtB;;;;;;;;;AAUA;AAMA;;iBC/RgB,YAAA,SAAoB,cAAmB;;;;;AD9DvD;AA+BA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYA;AAIU,iBE7NM,wBAAA,CF6NN,IAAA,EE7NqC,UF6NrC,CAAA,EAAA,MAAA,EAAA"}
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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U;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYA;;;;;AAciB,iBC3ND,YAAA,CD6NL,KAAW,EC7Nc,WD6Nd,CAAA,EC7N4B,MD6N5B;AA+EtB;;;;;;;;;AAUA;AAMA;;iBC/RgB,YAAA,SAAoB,cAAmB;;;;;AD9DvD;AA+BA;AA+FA;AAKA;AAOU;AAeV;AAWA;AAWA;AASA;AASA;AASA;AAWA;AAaA;;;;;;;;;AAYA;AAIU,iBE7NM,wBAAA,CF6NN,IAAA,EE7NqC,UF6NrC,CAAA,EAAA,MAAA,EAAA"}
package/dist/index.mjs CHANGED
@@ -160,8 +160,12 @@ const configSchema = z.object({
160
160
  outDir: z.string().default(".screenbook"),
161
161
  metaPattern: z.string().default("src/**/screen.meta.ts"),
162
162
  routesPattern: z.string().optional(),
163
+ routesFile: z.string().optional(),
163
164
  ignore: z.array(z.string()).default(["**/node_modules/**", "**/.git/**"]),
164
165
  adoption: adoptionSchema.optional()
166
+ }).refine((data) => !(data.routesPattern && data.routesFile), {
167
+ message: "Cannot specify both 'routesPattern' and 'routesFile'. Use one or the other.",
168
+ path: ["routesFile"]
165
169
  });
166
170
 
167
171
  //#endregion
@@ -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 * @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 * 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 * @example \"src/pages/**\\/page.tsx\"\n\t */\n\troutesPattern?: 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.object({\n\toutDir: z.string().default(\".screenbook\"),\n\tmetaPattern: z.string().default(\"src/**/screen.meta.ts\"),\n\troutesPattern: z.string().optional(),\n\tignore: z.array(z.string()).default([\"**/node_modules/**\", \"**/.git/**\"]),\n\tadoption: adoptionSchema.optional(),\n})\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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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,MA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core library for Screenbook - screen metadata definitions and validation",
5
5
  "type": "module",
6
6
  "exports": {