@astryxdesign/cli 0.6.3-canary.c3f0391 → 0.6.3-canary.ccfce9a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/authoring/_shared/contract.ts +0 -22
  2. package/authoring/codemod/codemod.doc.mjs +1 -6
  3. package/authoring/codemod/parse.d.mts +8 -8
  4. package/authoring/codemod/parse.mjs +6 -8
  5. package/authoring/config/parse.d.mts +13 -13
  6. package/authoring/config/parse.mjs +8 -8
  7. package/authoring/config/type.ts +3 -3
  8. package/authoring/debug/parse.d.mts +4 -4
  9. package/authoring/debug/parse.mjs +3 -3
  10. package/authoring/doctypes/_schema.d.mts +11 -121
  11. package/authoring/doctypes/_schema.mjs +13 -144
  12. package/authoring/doctypes/base/graph-fields.doc.mjs +4 -11
  13. package/authoring/doctypes/base/type.ts +4 -8
  14. package/authoring/doctypes/command/command.doc.mjs +2 -3
  15. package/authoring/doctypes/command/parse.d.mts +2 -2
  16. package/authoring/doctypes/command/parse.mjs +1 -1
  17. package/authoring/doctypes/command/type.ts +2 -2
  18. package/authoring/doctypes/component/component.doc.mjs +2 -5
  19. package/authoring/doctypes/component/parse.d.mts +2 -2
  20. package/authoring/doctypes/component/parse.mjs +1 -1
  21. package/authoring/doctypes/component/type.ts +1 -1
  22. package/authoring/doctypes/enum/parse.d.mts +2 -2
  23. package/authoring/doctypes/enum/parse.mjs +1 -1
  24. package/authoring/doctypes/enum/type.ts +1 -1
  25. package/authoring/doctypes/function/function.doc.mjs +0 -4
  26. package/authoring/doctypes/function/parse.d.mts +2 -2
  27. package/authoring/doctypes/function/parse.mjs +1 -1
  28. package/authoring/doctypes/function/type.ts +1 -1
  29. package/authoring/doctypes/hook/hook.doc.mjs +0 -4
  30. package/authoring/doctypes/hook/parse.d.mts +2 -2
  31. package/authoring/doctypes/hook/parse.mjs +1 -1
  32. package/authoring/doctypes/hook/type.ts +1 -1
  33. package/authoring/doctypes/legacy.d.mts +6 -6
  34. package/authoring/doctypes/legacy.mjs +3 -3
  35. package/authoring/doctypes/namespace/namespace.doc.mjs +3 -7
  36. package/authoring/doctypes/namespace/parse.d.mts +2 -2
  37. package/authoring/doctypes/namespace/parse.mjs +1 -1
  38. package/authoring/doctypes/namespace/type.ts +2 -2
  39. package/authoring/doctypes/parse.d.mts +18 -18
  40. package/authoring/doctypes/parse.mjs +9 -9
  41. package/authoring/doctypes/reference/parse.d.mts +2 -2
  42. package/authoring/doctypes/reference/parse.mjs +1 -1
  43. package/authoring/doctypes/reference/reference.doc.mjs +2 -6
  44. package/authoring/doctypes/reference/type.ts +1 -1
  45. package/authoring/doctypes/schema/parse.d.mts +2 -2
  46. package/authoring/doctypes/schema/parse.mjs +1 -1
  47. package/authoring/doctypes/schema/type.ts +2 -2
  48. package/authoring/doctypes/template/parse.d.mts +1 -92
  49. package/authoring/doctypes/template/parse.mjs +1 -33
  50. package/authoring/doctypes/template/template.doc.mjs +0 -4
  51. package/authoring/doctypes/template/type.ts +1 -4
  52. package/authoring/doctypes/types.ts +10 -10
  53. package/authoring/gap-report/parse.d.mts +9 -9
  54. package/authoring/gap-report/parse.mjs +6 -6
  55. package/authoring/gap-report/type.ts +1 -1
  56. package/authoring/identity/identity.doc.mjs +2 -3
  57. package/authoring/identity/type.ts +10 -10
  58. package/authoring/index.d.ts +19 -19
  59. package/authoring/integration/parse.d.mts +2 -2
  60. package/authoring/integration/parse.mjs +1 -1
  61. package/authoring/integration/schema.d.mts +4 -4
  62. package/authoring/integration/schema.mjs +3 -3
  63. package/authoring/integration/type.ts +1 -1
  64. package/foundation/discovery/authoring-self-docs.test.mjs +12 -71
  65. package/foundation/discovery/docs-discovery.d.mts +0 -4
  66. package/foundation/discovery/docs-discovery.mjs +2 -16
  67. package/foundation/discovery/docs-discovery.test.mjs +11 -47
  68. package/package.json +9 -9
  69. package/authoring/doctypes/load-contract.test.mjs +0 -207
@@ -28,27 +28,5 @@ export type MutuallyAssignable<A, B> = [A] extends [B]
28
28
  : false
29
29
  : false;
30
30
 
31
- /**
32
- * `T` without string or number index signatures, at every depth. A
33
- * `.passthrough()` schema infers one and a hand-written interface never has
34
- * one, so a lock drops them before comparing named fields. Recursive fields
35
- * that a schema casts to their public type compare equal by construction.
36
- */
37
- export type NamedFields<T> = T extends readonly (infer U)[]
38
- ? NamedFields<U>[]
39
- : T extends (...args: never[]) => unknown
40
- ? T
41
- : T extends object
42
- ? {
43
- [
44
- K in keyof T as string extends K
45
- ? never
46
- : number extends K
47
- ? never
48
- : K
49
- ]: NamedFields<T[K]>;
50
- }
51
- : T;
52
-
53
31
  /** Compiles only when `T` is exactly `true`; otherwise a type error. */
54
32
  export type Expect<T extends true> = T;
@@ -63,13 +63,11 @@ export const doc = {
63
63
  name: 'file.path',
64
64
  type: 'string',
65
65
  description: 'Absolute path to the file being transformed.',
66
- required: true,
67
66
  },
68
67
  {
69
68
  name: 'file.source',
70
69
  type: 'string',
71
70
  description: 'The current source contents of the file.',
72
- required: true,
73
71
  },
74
72
  ],
75
73
  },
@@ -83,21 +81,18 @@ export const doc = {
83
81
  type: 'unknown',
84
82
  description:
85
83
  'A jscodeshift instance configured with a parser for the file.',
86
- required: true,
87
84
  },
88
85
  {
89
86
  name: 'api.stats',
90
87
  type: '(...args: unknown[]) => void',
91
88
  description:
92
89
  'Report a statistic (no-op-friendly; provided for jscodeshift parity).',
93
- required: true,
94
90
  },
95
91
  {
96
92
  name: 'api.report',
97
93
  type: '(...args: unknown[]) => void',
98
94
  description:
99
95
  'Report progress (no-op-friendly; provided for jscodeshift parity).',
100
- required: true,
101
96
  },
102
97
  ],
103
98
  },
@@ -105,7 +100,7 @@ export const doc = {
105
100
  },
106
101
  {
107
102
  name: 'type',
108
- type: "'code' | 'config'",
103
+ type: "'code'",
109
104
  description:
110
105
  "Discriminant for the file-transforming variant. Use 'config' for a " +
111
106
  'codemod that rewrites astryx.config.* instead (see notes).',
@@ -5,8 +5,8 @@
5
5
  * Compile-time drift-lock: sealed envelope must infer exactly the public
6
6
  * stamped-codemod union.
7
7
  *
8
- * @typedef {import('../_shared/contract.js').Expect<
9
- * import('../_shared/contract.js').Equal<
8
+ * @typedef {import('../_shared/contract').Expect<
9
+ * import('../_shared/contract').Equal<
10
10
  * z.infer<typeof codemodEnvelopeSchema>,
11
11
  * AstryxCodemod | AstryxConfigCodemod
12
12
  * >
@@ -24,10 +24,10 @@ export function parseCodemod(input: unknown, label?: string): AstryxCodemod | As
24
24
  * Compile-time drift-lock: sealed envelope must infer exactly the public
25
25
  * stamped-codemod union.
26
26
  */
27
- export type _CodemodDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof codemodEnvelopeSchema>, AstryxCodemod | AstryxConfigCodemod>>;
28
- export type AstryxCodemod = import("./type.js").AstryxCodemod;
29
- export type AstryxConfigCodemod = import("./type.js").AstryxConfigCodemod;
30
- export type AstryxCodemodTransform = import("./type.js").AstryxCodemodTransform;
27
+ export type _CodemodDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").Equal<z.infer<typeof codemodEnvelopeSchema>, AstryxCodemod | AstryxConfigCodemod>>;
28
+ export type AstryxCodemod = import("./type").AstryxCodemod;
29
+ export type AstryxConfigCodemod = import("./type").AstryxConfigCodemod;
30
+ export type AstryxCodemodTransform = import("./type").AstryxCodemodTransform;
31
31
  import { z } from 'zod';
32
32
  /**
33
33
  * The load-boundary contract: a stamped codemod default export, discriminated
@@ -38,13 +38,13 @@ declare const codemodEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
38
38
  description: z.ZodOptional<z.ZodString>;
39
39
  isOptional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
40
40
  fileExtensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
- transform: z.ZodType<import("./type.js").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type.js").AstryxCodemodTransform, any>>;
41
+ transform: z.ZodType<import("./type").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type").AstryxCodemodTransform, any>>;
42
42
  type: z.ZodLiteral<"code">;
43
43
  }, z.core.$strict>, z.ZodObject<{
44
44
  title: z.ZodString;
45
45
  description: z.ZodOptional<z.ZodString>;
46
46
  isOptional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
47
- transform: z.ZodType<import("./type.js").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type.js").AstryxCodemodTransform, any>>;
47
+ transform: z.ZodType<import("./type").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type").AstryxCodemodTransform, any>>;
48
48
  type: z.ZodLiteral<"config">;
49
49
  }, z.core.$strict>], "type">;
50
50
  export {};
@@ -10,14 +10,12 @@
10
10
  import {z} from 'zod';
11
11
  import {formatZodError} from '../_shared/errors.mjs';
12
12
 
13
- /** @typedef {import('./type.js').AstryxCodemod} AstryxCodemod */
14
- /** @typedef {import('./type.js').AstryxConfigCodemod} AstryxConfigCodemod */
15
- /** @typedef {import('./type.js').AstryxCodemodTransform} AstryxCodemodTransform */
13
+ /** @typedef {import('./type').AstryxCodemod} AstryxCodemod */
14
+ /** @typedef {import('./type').AstryxConfigCodemod} AstryxConfigCodemod */
15
+ /** @typedef {import('./type').AstryxCodemodTransform} AstryxCodemodTransform */
16
16
 
17
17
  const transform = /** @type {z.ZodType<AstryxCodemodTransform>} */ (
18
- z.custom(value => typeof value === 'function', {
19
- message: 'Expected a function',
20
- })
18
+ z.custom(value => typeof value === 'function', {message: 'Expected a function'})
21
19
  );
22
20
 
23
21
  const codeCodemodSchema = z
@@ -54,8 +52,8 @@ const codemodEnvelopeSchema = z.discriminatedUnion('type', [
54
52
  * Compile-time drift-lock: sealed envelope must infer exactly the public
55
53
  * stamped-codemod union.
56
54
  *
57
- * @typedef {import('../_shared/contract.js').Expect<
58
- * import('../_shared/contract.js').Equal<
55
+ * @typedef {import('../_shared/contract').Expect<
56
+ * import('../_shared/contract').Equal<
59
57
  * z.infer<typeof codemodEnvelopeSchema>,
60
58
  * AstryxCodemod | AstryxConfigCodemod
61
59
  * >
@@ -6,8 +6,8 @@
6
6
  * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
7
7
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
8
8
  *
9
- * @typedef {import('../_shared/contract.js').Expect<
10
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
9
+ * @typedef {import('../_shared/contract').Expect<
10
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
11
11
  * >} _ConfigDriftLock
12
12
  */
13
13
  /**
@@ -23,13 +23,13 @@ export function parseConfig(input: unknown, label?: string): AstryxConfig;
23
23
  * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
24
24
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
25
25
  */
26
- export type _ConfigDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>>;
27
- export type AstryxConfig = import("./type.js").AstryxConfig;
28
- export type PostCodemodHook = import("./type.js").PostCodemodHook;
29
- export type XleComponent = import("./type.js").XleComponent;
30
- export type DebugConfig = import("./type.js").DebugConfig;
31
- export type DebugEventHandler = import("../debug/type.js").DebugEventHandler;
32
- export type GapReportHandler = import("../gap-report/type.js").GapReportHandler;
26
+ export type _ConfigDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>>;
27
+ export type AstryxConfig = import("./type").AstryxConfig;
28
+ export type PostCodemodHook = import("./type").PostCodemodHook;
29
+ export type XleComponent = import("./type").XleComponent;
30
+ export type DebugConfig = import("./type").DebugConfig;
31
+ export type DebugEventHandler = import("../debug/type").DebugEventHandler;
32
+ export type GapReportHandler = import("../gap-report/type").GapReportHandler;
33
33
  import { z } from 'zod';
34
34
  declare const configSchema: z.ZodObject<{
35
35
  integrations: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -40,14 +40,14 @@ declare const configSchema: z.ZodObject<{
40
40
  buildCommand: z.ZodType<(ctx: {
41
41
  packageDir: string;
42
42
  files: string[];
43
- }) => import("./type.js").PostCodemodCommand | null | undefined | Promise<import("./type.js").PostCodemodCommand | null | undefined>, any, z.core.$ZodTypeInternals<(ctx: {
43
+ }) => import("./type").PostCodemodCommand | null | undefined | Promise<import("./type").PostCodemodCommand | null | undefined>, any, z.core.$ZodTypeInternals<(ctx: {
44
44
  packageDir: string;
45
45
  files: string[];
46
- }) => import("./type.js").PostCodemodCommand | null | undefined | Promise<import("./type.js").PostCodemodCommand | null | undefined>, any>>;
46
+ }) => import("./type").PostCodemodCommand | null | undefined | Promise<import("./type").PostCodemodCommand | null | undefined>, any>>;
47
47
  }, z.core.$strict>>>;
48
48
  }, z.core.$strict>>;
49
- debug: z.ZodOptional<z.ZodType<import("../debug/type.js").DebugEventHandler, any, z.core.$ZodTypeInternals<import("../debug/type.js").DebugEventHandler, any>>>;
50
- gapReport: z.ZodOptional<z.ZodType<import("../gap-report/type.js").GapReportHandler, any, z.core.$ZodTypeInternals<import("../gap-report/type.js").GapReportHandler, any>>>;
49
+ debug: z.ZodOptional<z.ZodType<import("../debug/type").DebugEventHandler, any, z.core.$ZodTypeInternals<import("../debug/type").DebugEventHandler, any>>>;
50
+ gapReport: z.ZodOptional<z.ZodType<import("../gap-report/type").GapReportHandler, any, z.core.$ZodTypeInternals<import("../gap-report/type").GapReportHandler, any>>>;
51
51
  experimental: z.ZodOptional<z.ZodObject<{
52
52
  xle: z.ZodOptional<z.ZodObject<{
53
53
  components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
@@ -13,12 +13,12 @@ import {z} from 'zod';
13
13
  import {formatZodError} from '../_shared/errors.mjs';
14
14
  import {parseGapReportHandler} from '../gap-report/parse.mjs';
15
15
 
16
- /** @typedef {import('./type.js').AstryxConfig} AstryxConfig */
17
- /** @typedef {import('./type.js').PostCodemodHook} PostCodemodHook */
18
- /** @typedef {import('./type.js').XleComponent} XleComponent */
19
- /** @typedef {import('./type.js').DebugConfig} DebugConfig */
20
- /** @typedef {import('../debug/type.js').DebugEventHandler} DebugEventHandler */
21
- /** @typedef {import('../gap-report/type.js').GapReportHandler} GapReportHandler */
16
+ /** @typedef {import('./type').AstryxConfig} AstryxConfig */
17
+ /** @typedef {import('./type').PostCodemodHook} PostCodemodHook */
18
+ /** @typedef {import('./type').XleComponent} XleComponent */
19
+ /** @typedef {import('./type').DebugConfig} DebugConfig */
20
+ /** @typedef {import('../debug/type').DebugEventHandler} DebugEventHandler */
21
+ /** @typedef {import('../gap-report/type').GapReportHandler} GapReportHandler */
22
22
 
23
23
  // Typed `z.custom` so `z.infer` reproduces the real function type (not `unknown`).
24
24
  const buildCommand = /** @type {z.ZodType<PostCodemodHook['buildCommand']>} */ (
@@ -95,8 +95,8 @@ const configSchema = z
95
95
  * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
96
96
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
97
97
  *
98
- * @typedef {import('../_shared/contract.js').Expect<
99
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
98
+ * @typedef {import('../_shared/contract').Expect<
99
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
100
100
  * >} _ConfigDriftLock
101
101
  */
102
102
 
@@ -9,8 +9,8 @@
9
9
  * boundary; there is no factory to call.
10
10
  */
11
11
 
12
- import type {DebugEventHandler} from '../debug/type.js';
13
- import type {GapReportHandler} from '../gap-report/type.js';
12
+ import type {DebugEventHandler} from '../debug/type';
13
+ import type {GapReportHandler} from '../gap-report/type';
14
14
 
15
15
  /**
16
16
  * A command to run as part of a post-codemod hook. Returned by a hook's
@@ -21,7 +21,7 @@ export interface PostCodemodCommand {
21
21
  args?: string[];
22
22
  options?: {
23
23
  cwd?: string;
24
- env?: Record<string, string | undefined>;
24
+ env?: NodeJS.ProcessEnv;
25
25
  timeout?: number;
26
26
  };
27
27
  }
@@ -7,8 +7,8 @@
7
7
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck —
8
8
  * so a field added to the recorder without being published here breaks CI.
9
9
  *
10
- * @typedef {import('../_shared/contract.js').Expect<
11
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
10
+ * @typedef {import('../_shared/contract').Expect<
11
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
12
12
  * >} _DebugEventDriftLock
13
13
  */
14
14
  /**
@@ -29,8 +29,8 @@ export function parseDebugEvent(input: unknown, label?: string): DebugEvent;
29
29
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck —
30
30
  * so a field added to the recorder without being published here breaks CI.
31
31
  */
32
- export type _DebugEventDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>>;
33
- export type DebugEvent = import("./type.js").DebugEvent;
32
+ export type _DebugEventDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>>;
33
+ export type DebugEvent = import("./type").DebugEvent;
34
34
  import { z } from 'zod';
35
35
  declare const eventSchema: z.ZodObject<{
36
36
  schemaVersion: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>;
@@ -22,7 +22,7 @@
22
22
  import {z} from 'zod';
23
23
  import {formatZodError} from '../_shared/errors.mjs';
24
24
 
25
- /** @typedef {import('./type.js').DebugEvent} DebugEvent */
25
+ /** @typedef {import('./type').DebugEvent} DebugEvent */
26
26
 
27
27
  const outcomeSchema = z.enum([
28
28
  'ok',
@@ -169,8 +169,8 @@ const eventSchema = z
169
169
  * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck —
170
170
  * so a field added to the recorder without being published here breaks CI.
171
171
  *
172
- * @typedef {import('../_shared/contract.js').Expect<
173
- * import('../_shared/contract.js').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
172
+ * @typedef {import('../_shared/contract').Expect<
173
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof eventSchema>, DebugEvent>
174
174
  * >} _DebugEventDriftLock
175
175
  */
176
176
 
@@ -91,12 +91,7 @@ export const ReferenceContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
91
  full: "full";
92
92
  }>>;
93
93
  }, z.core.$strict>], "type">;
94
- /**
95
- * New-format stamped component doc (`type: 'component'`): one component's
96
- * `props`, or the `components` a group doc documents together. These are the
97
- * shapes the published ComponentDoc type allows, and the ones an unstamped doc
98
- * may already take.
99
- */
94
+ /** New-format stamped component doc (`type: 'component'`). */
100
95
  export const ComponentDocKindSchema: z.ZodObject<{
101
96
  type: z.ZodLiteral<"component">;
102
97
  theming: z.ZodOptional<z.ZodUnknown>;
@@ -124,16 +119,13 @@ export const ComponentDocKindSchema: z.ZodObject<{
124
119
  public: "public";
125
120
  internal: "internal";
126
121
  }>>;
127
- props: z.ZodOptional<z.ZodArray<z.ZodObject<{
122
+ props: z.ZodArray<z.ZodObject<{
128
123
  name: z.ZodString;
129
124
  type: z.ZodString;
130
125
  description: z.ZodString;
131
126
  default: z.ZodOptional<z.ZodString>;
132
127
  required: z.ZodOptional<z.ZodBoolean>;
133
- }, z.core.$loose>>>;
134
- components: z.ZodOptional<z.ZodArray<z.ZodObject<{
135
- name: z.ZodString;
136
- }, z.core.$loose>>>;
128
+ }, z.core.$loose>>;
137
129
  }, z.core.$loose>;
138
130
  /** New-format stamped function doc (`type: 'function'`). */
139
131
  export const FunctionDocKindSchema: z.ZodObject<{
@@ -173,26 +165,6 @@ export const FunctionDocKindSchema: z.ZodObject<{
173
165
  internal: "internal";
174
166
  }>>;
175
167
  }, z.core.$loose>;
176
- /**
177
- * A stamped function doc as it loads: as with components, `displayName` may be
178
- * missing and `usage` passes through unchecked.
179
- *
180
- * @typedef {Omit<FunctionDoc, 'type' | 'displayName' | 'usage'>
181
- * & {type: 'function', displayName?: string, usage?: unknown}} LoadedFunctionDoc
182
- */
183
- /**
184
- * @typedef {import('../_shared/contract.js').Expect<
185
- * import('../_shared/contract.js').MutuallyAssignable<
186
- * import('../_shared/contract.js').NamedFields<z.infer<typeof FunctionDocKindSchema>>,
187
- * import('../_shared/contract.js').NamedFields<LoadedFunctionDoc>
188
- * >
189
- * >} _FunctionDocDriftLock
190
- */
191
- /**
192
- * Every HookDoc is a FunctionDoc, so the one function schema covers both.
193
- *
194
- * @typedef {import('../_shared/contract.js').Expect<[HookDoc] extends [FunctionDoc] ? true : false>} _HookDocIsFunctionDocLock
195
- */
196
168
  /**
197
169
  * Stamped generic reference/topic doc (`type: 'generic'`). `title` and
198
170
  * `sections` stay optional at this parser boundary for docs produced by the
@@ -317,7 +289,7 @@ export const SchemaDocKindSchema: z.ZodObject<{
317
289
  description: z.ZodString;
318
290
  namespace: z.ZodOptional<z.ZodString>;
319
291
  appliesTo: z.ZodOptional<z.ZodString>;
320
- fields: z.ZodArray<z.ZodType<import("./schema/type.js").SchemaFieldDoc, any, z.core.$ZodTypeInternals<import("./schema/type.js").SchemaFieldDoc, any>>>;
292
+ fields: z.ZodArray<z.ZodType<import("./schema/type").SchemaFieldDoc, any, z.core.$ZodTypeInternals<import("./schema/type").SchemaFieldDoc, any>>>;
321
293
  examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
322
294
  label: z.ZodOptional<z.ZodString>;
323
295
  code: z.ZodString;
@@ -398,14 +370,6 @@ export const SchemaDocKindSchema: z.ZodObject<{
398
370
  internal: "internal";
399
371
  }>>;
400
372
  }, z.core.$loose>;
401
- /**
402
- * @typedef {import('../_shared/contract.js').Expect<
403
- * import('../_shared/contract.js').MutuallyAssignable<
404
- * import('../_shared/contract.js').NamedFields<z.infer<typeof SchemaDocKindSchema>>,
405
- * import('../_shared/contract.js').NamedFields<SchemaDoc & {type: 'schema'}>
406
- * >
407
- * >} _SchemaDocDriftLock
408
- */
409
373
  /** New stamped command doc (`type: 'command'`). */
410
374
  export const CommandDocKindSchema: z.ZodObject<{
411
375
  type: z.ZodLiteral<"command">;
@@ -517,14 +481,6 @@ export const CommandDocKindSchema: z.ZodObject<{
517
481
  internal: "internal";
518
482
  }>>;
519
483
  }, z.core.$loose>;
520
- /**
521
- * @typedef {import('../_shared/contract.js').Expect<
522
- * import('../_shared/contract.js').MutuallyAssignable<
523
- * import('../_shared/contract.js').NamedFields<z.infer<typeof CommandDocKindSchema>>,
524
- * import('../_shared/contract.js').NamedFields<CommandDoc & {type: 'command'}>
525
- * >
526
- * >} _CommandDocDriftLock
527
- */
528
484
  /** New stamped enum doc (`type: 'enum'`). */
529
485
  export const EnumDocKindSchema: z.ZodObject<{
530
486
  type: z.ZodLiteral<"enum">;
@@ -929,79 +885,13 @@ export const LegacyDocSchema: z.ZodUnion<readonly [z.ZodObject<{
929
885
  extends: z.ZodOptional<z.ZodString>;
930
886
  tokenCategory: z.ZodOptional<z.ZodString>;
931
887
  }, z.core.$loose>]>;
932
- export type AuthoredDocGraphFieldsType = import("./base/type.js").AuthoredDocGraphFields;
933
- export type AuthoredDocKind = import("./base/type.js").AuthoredDocKind;
934
- export type NamespaceDoc = import("./namespace/type.js").NamespaceDoc;
935
- export type ReferenceContentBlock = import("./reference/type.js").ReferenceContentBlock;
936
- export type ReferenceDoc = import("./reference/type.js").ReferenceDoc;
937
- export type SingleComponentDoc = import("./component/type.js").SingleComponentDoc;
938
- export type ComponentPropDoc = import("./base/type.js").ComponentPropDoc;
939
- export type HookDoc = import("./hook/type.js").HookDoc;
940
- export type FunctionDoc = import("./function/type.js").FunctionDoc;
941
- export type SchemaDoc = import("./schema/type.js").SchemaDoc;
942
- export type CommandDoc = import("./command/type.js").CommandDoc;
943
- export type EnumDoc = import("./enum/type.js").EnumDoc;
944
- export type _AuthoredDocKindDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof AuthoredDocKindSchema>, AuthoredDocKind>>;
945
- export type _AuthoredDocGraphDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<z.infer<typeof _AuthoredDocGraphSchema>, AuthoredDocGraphFieldsType>>;
946
- export type _ReferenceContentBlockDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof ReferenceContentBlockSchema>, ReferenceContentBlock>>;
947
- /**
948
- * A stamped component doc as it loads. The loader accepts what the unstamped
949
- * format always accepted, so stamping an existing doc never breaks it:
950
- * `displayName` may be missing, `category` is any string, `usage`, `theming`,
951
- * `playground` and `examples` pass through unchecked, and a doc has `props`,
952
- * `components`, or both; each `components` entry needs only a `name`. Every
953
- * other field matches the published type.
954
- */
955
- export type LoadedComponentDoc = Omit<SingleComponentDoc, "type" | "displayName" | "category" | "usage" | "theming" | "examples" | "playground" | "props"> & {
956
- type: "component";
957
- displayName?: string;
958
- category?: string;
959
- usage?: unknown;
960
- theming?: unknown;
961
- examples?: unknown[];
962
- playground?: unknown;
963
- props?: ComponentPropDoc[];
964
- components?: Array<{
965
- name: string;
966
- }>;
967
- };
968
- export type _ComponentDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof ComponentDocKindSchema>>, import("../_shared/contract.js").NamedFields<LoadedComponentDoc>>>;
969
- /**
970
- * A stamped function doc as it loads: as with components, `displayName` may be
971
- * missing and `usage` passes through unchecked.
972
- */
973
- export type LoadedFunctionDoc = Omit<FunctionDoc, "type" | "displayName" | "usage"> & {
974
- type: "function";
975
- displayName?: string;
976
- usage?: unknown;
977
- };
978
- export type _FunctionDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof FunctionDocKindSchema>>, import("../_shared/contract.js").NamedFields<LoadedFunctionDoc>>>;
979
- /**
980
- * Every HookDoc is a FunctionDoc, so the one function schema covers both.
981
- */
982
- export type _HookDocIsFunctionDocLock = import("../_shared/contract.js").Expect<[HookDoc] extends [FunctionDoc] ? true : false>;
983
- /**
984
- * A stamped generic doc as the load check accepts it. `title`, `description`
985
- * and `sections` may be missing, as in docs the v0.3.0 factory-removal codemod
986
- * produced; `parseReference` then fills them (title from `displayName` or
987
- * `name`, an empty description, no sections), so its result is a full
988
- * ReferenceDoc. Only a doc with a description and sections is a usable topic
989
- * (see `problemsInTopic`).
990
- */
991
- export type LoadedReferenceDoc = Omit<ReferenceDoc, "type" | "title" | "description" | "sections"> & {
992
- type: "generic";
993
- } & Partial<Pick<ReferenceDoc, "title" | "description" | "sections">>;
994
- export type _ReferenceDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof GenericDocKindSchema>>, import("../_shared/contract.js").NamedFields<LoadedReferenceDoc>>>;
995
- export type _SchemaDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof SchemaDocKindSchema>>, import("../_shared/contract.js").NamedFields<SchemaDoc & {
996
- type: "schema";
997
- }>>>;
998
- export type _CommandDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof CommandDocKindSchema>>, import("../_shared/contract.js").NamedFields<CommandDoc & {
999
- type: "command";
1000
- }>>>;
1001
- export type _EnumDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof EnumDocKindSchema>>, import("../_shared/contract.js").NamedFields<EnumDoc & {
1002
- type: "enum";
1003
- }>>>;
1004
- export type _NamespaceDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof NamespaceDocKindSchema>, NamespaceDoc>>;
888
+ export type AuthoredDocGraphFieldsType = import("./base/type").AuthoredDocGraphFields;
889
+ export type AuthoredDocKind = import("./base/type").AuthoredDocKind;
890
+ export type NamespaceDoc = import("./namespace/type").NamespaceDoc;
891
+ export type ReferenceContentBlock = import("./reference/type").ReferenceContentBlock;
892
+ export type _AuthoredDocGraphDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").MutuallyAssignable<z.infer<typeof _AuthoredDocGraphSchema>, AuthoredDocGraphFieldsType>>;
893
+ export type _ReferenceContentBlockDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").Equal<z.infer<typeof ReferenceContentBlockSchema>, ReferenceContentBlock>>;
894
+ export type _NamespaceDocDriftLock = import("../_shared/contract").Expect<import("../_shared/contract").Equal<z.infer<typeof NamespaceDocKindSchema>, NamespaceDoc>>;
1005
895
  import { z } from 'zod';
1006
896
  declare const _AuthoredDocGraphSchema: z.ZodObject<{
1007
897
  placement: z.ZodOptional<z.ZodObject<{