@astryxdesign/cli 0.3.0-canary.c857354 → 0.3.0-canary.d52d2cb

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 (129) hide show
  1. package/api/component/_adapter.mjs +3 -0
  2. package/api/integration/validate-integration.d.mts +2 -18
  3. package/api/integration/validate-integration.mjs +16 -141
  4. package/api/template/copy/copy.d.mts +2 -2
  5. package/api/template/copy/copy.mjs +2 -2
  6. package/api/template/list/list.d.mts +2 -2
  7. package/api/template/list/list.mjs +2 -2
  8. package/api/template/show/show.d.mts +2 -2
  9. package/api/template/show/show.mjs +2 -2
  10. package/api/template/skeleton/skeleton.d.mts +3 -3
  11. package/api/template/skeleton/skeleton.mjs +3 -3
  12. package/api/template/template.d.mts +7 -7
  13. package/api/template/template.mjs +7 -7
  14. package/api/template/template.test.mjs +12 -13
  15. package/assets/codemods/transforms/v0.3.0/__tests__/migrate-grid-minchildwidth-to-columns.test.mjs +82 -0
  16. package/assets/codemods/transforms/v0.3.0/migrate-grid-minchildwidth-to-columns.mjs +38 -2
  17. package/assets/docs/layout.doc.dense.mjs +1 -1
  18. package/assets/templates/blocks/components/AspectRatio/AspectRatioCircleImage.tsx +1 -1
  19. package/assets/templates/blocks/components/AspectRatio/AspectRatioImageGallery.tsx +1 -1
  20. package/assets/templates/blocks/components/AspectRatio/AspectRatioShowcase.tsx +3 -3
  21. package/assets/templates/blocks/components/AspectRatio/AspectRatioSquareImage.tsx +1 -1
  22. package/assets/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx +1 -1
  23. package/assets/templates/blocks/components/Avatar/AvatarFallbackChain.tsx +6 -6
  24. package/assets/templates/blocks/components/Avatar/AvatarGroup.tsx +5 -5
  25. package/assets/templates/blocks/components/Avatar/AvatarInteractive.tsx +2 -2
  26. package/assets/templates/blocks/components/Avatar/AvatarShowcase.tsx +4 -4
  27. package/assets/templates/blocks/components/Avatar/AvatarTooltip.tsx +4 -4
  28. package/assets/templates/blocks/components/Avatar/AvatarUserCard.tsx +3 -3
  29. package/assets/templates/blocks/components/Avatar/AvatarWithImage.tsx +4 -4
  30. package/assets/templates/blocks/components/Avatar/AvatarWithStatus.tsx +3 -3
  31. package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerAttachments.tsx +5 -5
  32. package/assets/templates/blocks/components/Lightbox/LightboxGallery.tsx +4 -4
  33. package/assets/templates/blocks/components/Lightbox/LightboxShowcase.tsx +1 -1
  34. package/assets/templates/blocks/components/Lightbox/LightboxVideo.tsx +1 -1
  35. package/assets/templates/blocks/components/Lightbox/LightboxZoom.tsx +2 -2
  36. package/assets/templates/blocks/components/MediaTheme/MediaThemeImageOverlay.tsx +1 -1
  37. package/assets/templates/blocks/components/MediaTheme/MediaThemeLightScrim.tsx +1 -1
  38. package/assets/templates/blocks/components/MediaTheme/MediaThemeShowcase.tsx +1 -1
  39. package/assets/templates/blocks/components/Overlay/OverlayBottomStrip.tsx +1 -1
  40. package/assets/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +1 -1
  41. package/assets/templates/blocks/components/Overlay/OverlayShowcase.tsx +1 -1
  42. package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.tsx +1 -1
  43. package/assets/templates/pages/centered-hero/page.tsx +1 -1
  44. package/assets/templates/pages/classic-gallery/page.tsx +10 -10
  45. package/assets/templates/pages/detail-page/page.tsx +5 -5
  46. package/assets/templates/pages/form-two-column/page.tsx +1 -1
  47. package/assets/templates/pages/gallery-hero/page.tsx +3 -3
  48. package/assets/templates/pages/library/page.tsx +30 -30
  49. package/assets/templates/pages/login/page.tsx +1 -2
  50. package/assets/templates/pages/login-card/page.tsx +1 -2
  51. package/assets/templates/pages/login-split/page.tsx +5 -6
  52. package/assets/templates/pages/login-sso/page.tsx +2 -3
  53. package/assets/templates/pages/mixed-gallery/page.tsx +5 -5
  54. package/assets/templates/pages/payment-form/page.tsx +3 -3
  55. package/assets/templates/pages/product-detail/page.tsx +7 -7
  56. package/assets/templates/pages/product-gallery/page.tsx +6 -6
  57. package/assets/templates/pages/shell-top-nav/page.tsx +2 -2
  58. package/assets/templates/pages/side-gallery/page.tsx +9 -9
  59. package/assets/templates/pages/table-page-chart/page.tsx +6 -6
  60. package/assets/templates/pages/theme-showcase/page.tsx +6 -6
  61. package/authoring/_shared/errors.d.mts +21 -0
  62. package/authoring/codemod/codemod.doc.d.mts +11 -0
  63. package/authoring/codemod/parse.d.mts +48 -2
  64. package/authoring/config/config.doc.d.mts +10 -0
  65. package/authoring/config/parse.d.mts +54 -2
  66. package/authoring/doctypes/_schema.d.mts +248 -0
  67. package/authoring/doctypes/base/type.ts +6 -0
  68. package/authoring/doctypes/command/command.doc.d.mts +12 -0
  69. package/authoring/doctypes/command/parse.d.mts +11 -2
  70. package/authoring/doctypes/component/component.doc.d.mts +11 -0
  71. package/authoring/doctypes/component/parse.d.mts +11 -2
  72. package/authoring/doctypes/enum/enum.doc.d.mts +11 -0
  73. package/authoring/doctypes/enum/parse.d.mts +11 -2
  74. package/authoring/doctypes/function/function.doc.d.mts +11 -0
  75. package/authoring/doctypes/function/parse.d.mts +11 -2
  76. package/authoring/doctypes/function/parse.mjs +24 -4
  77. package/authoring/doctypes/hook/hook.doc.d.mts +10 -0
  78. package/authoring/doctypes/hook/parse.d.mts +11 -2
  79. package/authoring/doctypes/legacy.d.mts +13 -2
  80. package/authoring/doctypes/parse.d.mts +29 -20
  81. package/authoring/doctypes/reference/parse.d.mts +11 -2
  82. package/authoring/doctypes/reference/reference.doc.d.mts +11 -0
  83. package/authoring/doctypes/schema/parse.d.mts +11 -2
  84. package/authoring/doctypes/schema/schema.doc.d.mts +11 -0
  85. package/authoring/doctypes/template/parse.d.mts +12 -2
  86. package/authoring/doctypes/template/template.doc.d.mts +11 -0
  87. package/authoring/index.d.mts +16 -0
  88. package/authoring/integration/integration.doc.d.mts +10 -0
  89. package/authoring/integration/parse.d.mts +30 -2
  90. package/clients/cli/commands/hook.doc.mjs +1 -1
  91. package/clients/cli/lib/manifest.mjs +1 -1
  92. package/foundation/agent-docs/agent-docs.d.mts +197 -0
  93. package/foundation/agent-docs/agent-docs.mjs +3 -4
  94. package/foundation/agent-docs/agent-docs.test.mjs +8 -0
  95. package/foundation/config/config-cache.d.mts +53 -0
  96. package/foundation/config/project.d.mts +154 -0
  97. package/foundation/config/project.mjs +3 -3
  98. package/foundation/discovery/component-discovery.d.mts +140 -0
  99. package/foundation/discovery/component-loader.d.mts +50 -0
  100. package/foundation/discovery/hook-discovery.d.mts +28 -0
  101. package/{api/template/_adapter.d.mts → foundation/discovery/template-adapter.d.mts} +1 -1
  102. package/{api/template/_adapter.mjs → foundation/discovery/template-adapter.mjs} +28 -19
  103. package/foundation/env/node-version.d.mts +52 -0
  104. package/foundation/env/package-manager.d.mts +84 -0
  105. package/foundation/env/semver.d.mts +56 -0
  106. package/foundation/fs/module-loader.d.mts +36 -0
  107. package/foundation/fs/path-safety.d.mts +74 -0
  108. package/foundation/fs/paths.d.mts +35 -0
  109. package/foundation/integrations/integration-warnings.d.mts +17 -0
  110. package/foundation/integrations/integration-warnings.mjs +1 -1
  111. package/foundation/integrations/integrations.d.mts +80 -0
  112. package/foundation/integrations/validate-contributions.d.mts +22 -0
  113. package/foundation/integrations/validate-contributions.mjs +162 -0
  114. package/foundation/response/error-codes.d.mts +103 -0
  115. package/foundation/response/error-codes.doc.d.mts +11 -0
  116. package/foundation/response/json.d.mts +75 -0
  117. package/foundation/response/response-types.doc.d.mts +12 -0
  118. package/foundation/response/response.doc.d.mts +11 -0
  119. package/foundation/text/levenshtein.d.mts +21 -0
  120. package/foundation/text/string-utils.d.mts +43 -0
  121. package/foundation/xle/browser.d.mts +89 -0
  122. package/foundation/xle/expand.d.mts +23 -0
  123. package/foundation/xle/parse.d.mts +72 -0
  124. package/foundation/xle/print.d.mts +7 -0
  125. package/foundation/xle/registry-core.d.mts +168 -0
  126. package/foundation/xle/registry.d.mts +19 -0
  127. package/foundation/xle/splice.d.mts +42 -0
  128. package/foundation/xle/validate.d.mts +94 -0
  129. package/package.json +9 -9
@@ -1,4 +1,50 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
2
3
 
3
- import type {AstryxCodemod, AstryxConfigCodemod} from './type';
4
+ /**
5
+ * Compile-time drift-lock: sealed envelope must infer exactly the public
6
+ * stamped-codemod union.
7
+ *
8
+ * @typedef {import('../_shared/contract').Expect<
9
+ * import('../_shared/contract').Equal<
10
+ * z.infer<typeof codemodEnvelopeSchema>,
11
+ * AstryxCodemod | AstryxConfigCodemod
12
+ * >
13
+ * >} _CodemodDriftLock
14
+ */
15
+ /**
16
+ * Validate an unknown value as a stamped codemod default export, or throw.
17
+ *
18
+ * @param {unknown} input
19
+ * @param {string} [label]
20
+ * @returns {AstryxCodemod | AstryxConfigCodemod}
21
+ */
4
22
  export function parseCodemod(input: unknown, label?: string): AstryxCodemod | AstryxConfigCodemod;
23
+ /**
24
+ * Compile-time drift-lock: sealed envelope must infer exactly the public
25
+ * stamped-codemod union.
26
+ */
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
+ import { z } from 'zod';
32
+ /**
33
+ * The load-boundary contract: a stamped codemod default export, discriminated
34
+ * by `type` (`'code'` may carry `fileExtensions`; `'config'` may not).
35
+ */
36
+ declare const codemodEnvelopeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
37
+ title: z.ZodString;
38
+ description: z.ZodOptional<z.ZodString>;
39
+ isOptional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
40
+ fileExtensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
+ transform: z.ZodType<import("./type").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type").AstryxCodemodTransform, any>>;
42
+ type: z.ZodLiteral<"code">;
43
+ }, z.core.$strict>, z.ZodObject<{
44
+ title: z.ZodString;
45
+ description: z.ZodOptional<z.ZodString>;
46
+ isOptional: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
47
+ transform: z.ZodType<import("./type").AstryxCodemodTransform, any, z.core.$ZodTypeInternals<import("./type").AstryxCodemodTransform, any>>;
48
+ type: z.ZodLiteral<"config">;
49
+ }, z.core.$strict>], "type">;
50
+ export {};
@@ -0,0 +1,10 @@
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
+
4
+ /**
5
+ * @file SchemaDoc for the `astryx.config.*` file (AstryxConfig). Colocated with
6
+ * the schema (`type.ts` + `parse.mjs`) it documents.
7
+ * @position packages/cli/authoring/config — schema documentation
8
+ */
9
+ /** @type {import('@astryxdesign/cli/authoring').SchemaDoc} */
10
+ export const doc: import("@astryxdesign/cli/authoring").SchemaDoc;
@@ -1,4 +1,56 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
2
3
 
3
- import type {AstryxConfig} from './type';
4
+ /**
5
+ * Compile-time drift-lock: the sealed schema must infer EXACTLY the public
6
+ * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
7
+ * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
8
+ *
9
+ * @typedef {import('../_shared/contract').Expect<
10
+ * import('../_shared/contract').MutuallyAssignable<z.infer<typeof configSchema>, AstryxConfig>
11
+ * >} _ConfigDriftLock
12
+ */
13
+ /**
14
+ * Validate an unknown value as an Astryx config, or throw a readable error.
15
+ *
16
+ * @param {unknown} input
17
+ * @param {string} [label]
18
+ * @returns {AstryxConfig}
19
+ */
4
20
  export function parseConfig(input: unknown, label?: string): AstryxConfig;
21
+ /**
22
+ * Compile-time drift-lock: the sealed schema must infer EXACTLY the public
23
+ * {@link AstryxConfig} type. If they drift, `Equal` becomes `false` and
24
+ * `Expect<false>` fails the `tsconfig.authoring-contract.json` typecheck.
25
+ */
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
+ import { z } from 'zod';
31
+ declare const configSchema: z.ZodObject<{
32
+ integrations: z.ZodOptional<z.ZodArray<z.ZodString>>;
33
+ issuesUrl: z.ZodOptional<z.ZodString>;
34
+ hooks: z.ZodOptional<z.ZodObject<{
35
+ postCodemod: z.ZodOptional<z.ZodArray<z.ZodObject<{
36
+ name: z.ZodOptional<z.ZodString>;
37
+ buildCommand: z.ZodType<(ctx: {
38
+ packageDir: string;
39
+ files: string[];
40
+ }) => import("./type").PostCodemodCommand | null | undefined | Promise<import("./type").PostCodemodCommand | null | undefined>, any, z.core.$ZodTypeInternals<(ctx: {
41
+ packageDir: string;
42
+ files: string[];
43
+ }) => import("./type").PostCodemodCommand | null | undefined | Promise<import("./type").PostCodemodCommand | null | undefined>, any>>;
44
+ }, z.core.$strict>>>;
45
+ }, z.core.$strict>>;
46
+ experimental: z.ZodOptional<z.ZodObject<{
47
+ xle: z.ZodOptional<z.ZodObject<{
48
+ components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
49
+ from: z.ZodString;
50
+ description: z.ZodOptional<z.ZodString>;
51
+ default: z.ZodOptional<z.ZodBoolean>;
52
+ }, z.core.$strict>>>;
53
+ }, z.core.$strict>>;
54
+ }, z.core.$strict>>;
55
+ }, z.core.$strict>;
56
+ export {};
@@ -0,0 +1,248 @@
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
+
4
+ /** New-format stamped component doc (`type: 'component'`). */
5
+ export const ComponentDocKindSchema: z.ZodObject<{
6
+ type: z.ZodLiteral<"component">;
7
+ props: z.ZodArray<z.ZodObject<{
8
+ name: z.ZodString;
9
+ type: z.ZodString;
10
+ description: z.ZodString;
11
+ default: z.ZodOptional<z.ZodString>;
12
+ required: z.ZodOptional<z.ZodBoolean>;
13
+ }, z.core.$loose>>;
14
+ theming: z.ZodOptional<z.ZodUnknown>;
15
+ playground: z.ZodOptional<z.ZodUnknown>;
16
+ examples: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
17
+ name: z.ZodString;
18
+ displayName: z.ZodOptional<z.ZodString>;
19
+ description: z.ZodOptional<z.ZodString>;
20
+ usage: z.ZodOptional<z.ZodUnknown>;
21
+ group: z.ZodOptional<z.ZodString>;
22
+ category: z.ZodOptional<z.ZodString>;
23
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
+ parent: z.ZodOptional<z.ZodString>;
25
+ relatedDocs: z.ZodOptional<z.ZodArray<z.ZodString>>;
26
+ hidden: z.ZodOptional<z.ZodBoolean>;
27
+ isHiddenFromOverview: z.ZodOptional<z.ZodBoolean>;
28
+ }, z.core.$loose>;
29
+ /** New-format stamped function doc (`type: 'function'`) — hooks and CLI/API
30
+ * functions alike (the discriminant and schema are shared). */
31
+ export const FunctionDocKindSchema: z.ZodObject<{
32
+ type: z.ZodLiteral<"function">;
33
+ params: z.ZodArray<z.ZodObject<{
34
+ name: z.ZodString;
35
+ type: z.ZodString;
36
+ description: z.ZodString;
37
+ default: z.ZodOptional<z.ZodString>;
38
+ required: z.ZodOptional<z.ZodBoolean>;
39
+ }, z.core.$loose>>;
40
+ returns: z.ZodArray<z.ZodObject<{
41
+ name: z.ZodOptional<z.ZodString>;
42
+ type: z.ZodString;
43
+ description: z.ZodString;
44
+ }, z.core.$loose>>;
45
+ name: z.ZodString;
46
+ displayName: z.ZodOptional<z.ZodString>;
47
+ description: z.ZodOptional<z.ZodString>;
48
+ usage: z.ZodOptional<z.ZodUnknown>;
49
+ group: z.ZodOptional<z.ZodString>;
50
+ category: z.ZodOptional<z.ZodString>;
51
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
52
+ parent: z.ZodOptional<z.ZodString>;
53
+ relatedDocs: z.ZodOptional<z.ZodArray<z.ZodString>>;
54
+ hidden: z.ZodOptional<z.ZodBoolean>;
55
+ isHiddenFromOverview: z.ZodOptional<z.ZodBoolean>;
56
+ }, z.core.$loose>;
57
+ /** New-format stamped generic reference/topic doc (`type: 'generic'`). */
58
+ export const GenericDocKindSchema: z.ZodObject<{
59
+ type: z.ZodLiteral<"generic">;
60
+ name: z.ZodString;
61
+ displayName: z.ZodOptional<z.ZodString>;
62
+ description: z.ZodOptional<z.ZodString>;
63
+ usage: z.ZodOptional<z.ZodUnknown>;
64
+ group: z.ZodOptional<z.ZodString>;
65
+ category: z.ZodOptional<z.ZodString>;
66
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
67
+ parent: z.ZodOptional<z.ZodString>;
68
+ relatedDocs: z.ZodOptional<z.ZodArray<z.ZodString>>;
69
+ hidden: z.ZodOptional<z.ZodBoolean>;
70
+ isHiddenFromOverview: z.ZodOptional<z.ZodBoolean>;
71
+ }, z.core.$loose>;
72
+ /** New stamped schema doc (`type: 'schema'`) — documents an authored object. */
73
+ export const SchemaDocKindSchema: z.ZodObject<{
74
+ type: z.ZodLiteral<"schema">;
75
+ name: z.ZodString;
76
+ displayName: z.ZodString;
77
+ description: z.ZodString;
78
+ namespace: z.ZodOptional<z.ZodString>;
79
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
80
+ appliesTo: z.ZodOptional<z.ZodString>;
81
+ fields: z.ZodArray<z.ZodType<import("./schema/type").SchemaFieldDoc, any, z.core.$ZodTypeInternals<import("./schema/type").SchemaFieldDoc, any>>>;
82
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
83
+ label: z.ZodOptional<z.ZodString>;
84
+ code: z.ZodString;
85
+ }, z.core.$loose>>>;
86
+ notes: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
87
+ }, z.core.$loose>;
88
+ /** New stamped command doc (`type: 'command'`) — a function's terminal binding;
89
+ * references a FunctionDoc via `fn`. */
90
+ export const CommandDocKindSchema: z.ZodObject<{
91
+ type: z.ZodLiteral<"command">;
92
+ name: z.ZodString;
93
+ displayName: z.ZodString;
94
+ summary: z.ZodString;
95
+ description: z.ZodOptional<z.ZodString>;
96
+ namespace: z.ZodOptional<z.ZodString>;
97
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
98
+ fn: z.ZodOptional<z.ZodString>;
99
+ args: z.ZodOptional<z.ZodArray<z.ZodObject<{
100
+ name: z.ZodString;
101
+ param: z.ZodOptional<z.ZodString>;
102
+ description: z.ZodOptional<z.ZodString>;
103
+ required: z.ZodOptional<z.ZodBoolean>;
104
+ variadic: z.ZodOptional<z.ZodBoolean>;
105
+ }, z.core.$loose>>>;
106
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
107
+ flag: z.ZodString;
108
+ param: z.ZodOptional<z.ZodString>;
109
+ description: z.ZodOptional<z.ZodString>;
110
+ choices: z.ZodOptional<z.ZodArray<z.ZodString>>;
111
+ default: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean, z.ZodArray<z.ZodString>]>>;
112
+ cliOnly: z.ZodOptional<z.ZodBoolean>;
113
+ }, z.core.$loose>>>;
114
+ subcommands: z.ZodOptional<z.ZodArray<z.ZodString>>;
115
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
116
+ label: z.ZodOptional<z.ZodString>;
117
+ cli: z.ZodString;
118
+ output: z.ZodOptional<z.ZodString>;
119
+ }, z.core.$loose>>>;
120
+ exitCodes: z.ZodOptional<z.ZodArray<z.ZodObject<{
121
+ code: z.ZodNumber;
122
+ when: z.ZodString;
123
+ }, z.core.$loose>>>;
124
+ related: z.ZodOptional<z.ZodArray<z.ZodString>>;
125
+ notes: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
126
+ }, z.core.$loose>;
127
+ /** New stamped enum doc (`type: 'enum'`) — a closed vocabulary (error codes,
128
+ * response-type discriminants). */
129
+ export const EnumDocKindSchema: z.ZodObject<{
130
+ type: z.ZodLiteral<"enum">;
131
+ name: z.ZodString;
132
+ displayName: z.ZodString;
133
+ description: z.ZodString;
134
+ namespace: z.ZodOptional<z.ZodString>;
135
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
136
+ members: z.ZodArray<z.ZodObject<{
137
+ value: z.ZodString;
138
+ description: z.ZodString;
139
+ deprecated: z.ZodOptional<z.ZodString>;
140
+ }, z.core.$loose>>;
141
+ }, z.core.$loose>;
142
+ /** The permissive legacy union (sub-component first, then hook, multi, single). */
143
+ export const LegacyDocSchema: z.ZodUnion<readonly [z.ZodObject<{
144
+ name: z.ZodString;
145
+ displayName: z.ZodOptional<z.ZodString>;
146
+ group: z.ZodOptional<z.ZodString>;
147
+ category: z.ZodOptional<z.ZodString>;
148
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
149
+ isHiddenFromOverview: z.ZodOptional<z.ZodBoolean>;
150
+ hidden: z.ZodOptional<z.ZodBoolean>;
151
+ hiddenComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
152
+ usage: z.ZodOptional<z.ZodUnknown>;
153
+ playground: z.ZodOptional<z.ZodUnknown>;
154
+ theming: z.ZodOptional<z.ZodUnknown>;
155
+ examples: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
156
+ showcase: z.ZodOptional<z.ZodUnknown>;
157
+ parent: z.ZodOptional<z.ZodString>;
158
+ relatedDocs: z.ZodOptional<z.ZodArray<z.ZodString>>;
159
+ relatedComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
160
+ relatedHooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
161
+ subComponentOf: z.ZodString;
162
+ description: z.ZodString;
163
+ props: z.ZodArray<z.ZodObject<{
164
+ name: z.ZodString;
165
+ type: z.ZodString;
166
+ description: z.ZodString;
167
+ default: z.ZodOptional<z.ZodString>;
168
+ required: z.ZodOptional<z.ZodBoolean>;
169
+ }, z.core.$loose>>;
170
+ }, z.core.$loose>, z.ZodObject<{
171
+ name: z.ZodString;
172
+ displayName: z.ZodOptional<z.ZodString>;
173
+ description: z.ZodOptional<z.ZodString>;
174
+ group: z.ZodOptional<z.ZodString>;
175
+ category: z.ZodOptional<z.ZodString>;
176
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
177
+ isHiddenFromOverview: z.ZodOptional<z.ZodBoolean>;
178
+ hidden: z.ZodOptional<z.ZodBoolean>;
179
+ hiddenComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
180
+ usage: z.ZodOptional<z.ZodUnknown>;
181
+ playground: z.ZodOptional<z.ZodUnknown>;
182
+ theming: z.ZodOptional<z.ZodUnknown>;
183
+ examples: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
184
+ showcase: z.ZodOptional<z.ZodUnknown>;
185
+ parent: z.ZodOptional<z.ZodString>;
186
+ relatedDocs: z.ZodOptional<z.ZodArray<z.ZodString>>;
187
+ relatedComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
188
+ relatedHooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
189
+ params: z.ZodArray<z.ZodObject<{
190
+ name: z.ZodString;
191
+ type: z.ZodString;
192
+ description: z.ZodString;
193
+ default: z.ZodOptional<z.ZodString>;
194
+ required: z.ZodOptional<z.ZodBoolean>;
195
+ }, z.core.$loose>>;
196
+ returns: z.ZodArray<z.ZodObject<{
197
+ name: z.ZodString;
198
+ type: z.ZodString;
199
+ description: z.ZodString;
200
+ }, z.core.$loose>>;
201
+ }, z.core.$loose>, z.ZodObject<{
202
+ name: z.ZodString;
203
+ displayName: z.ZodOptional<z.ZodString>;
204
+ description: z.ZodOptional<z.ZodString>;
205
+ group: z.ZodOptional<z.ZodString>;
206
+ category: z.ZodOptional<z.ZodString>;
207
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
208
+ isHiddenFromOverview: z.ZodOptional<z.ZodBoolean>;
209
+ hidden: z.ZodOptional<z.ZodBoolean>;
210
+ hiddenComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
211
+ usage: z.ZodOptional<z.ZodUnknown>;
212
+ playground: z.ZodOptional<z.ZodUnknown>;
213
+ theming: z.ZodOptional<z.ZodUnknown>;
214
+ examples: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
215
+ showcase: z.ZodOptional<z.ZodUnknown>;
216
+ parent: z.ZodOptional<z.ZodString>;
217
+ relatedDocs: z.ZodOptional<z.ZodArray<z.ZodString>>;
218
+ relatedComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
219
+ relatedHooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
220
+ components: z.ZodArray<z.ZodUnknown>;
221
+ }, z.core.$loose>, z.ZodObject<{
222
+ name: z.ZodString;
223
+ displayName: z.ZodOptional<z.ZodString>;
224
+ description: z.ZodOptional<z.ZodString>;
225
+ group: z.ZodOptional<z.ZodString>;
226
+ category: z.ZodOptional<z.ZodString>;
227
+ keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
228
+ isHiddenFromOverview: z.ZodOptional<z.ZodBoolean>;
229
+ hidden: z.ZodOptional<z.ZodBoolean>;
230
+ hiddenComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
231
+ usage: z.ZodOptional<z.ZodUnknown>;
232
+ playground: z.ZodOptional<z.ZodUnknown>;
233
+ theming: z.ZodOptional<z.ZodUnknown>;
234
+ examples: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
235
+ showcase: z.ZodOptional<z.ZodUnknown>;
236
+ parent: z.ZodOptional<z.ZodString>;
237
+ relatedDocs: z.ZodOptional<z.ZodArray<z.ZodString>>;
238
+ relatedComponents: z.ZodOptional<z.ZodArray<z.ZodString>>;
239
+ relatedHooks: z.ZodOptional<z.ZodArray<z.ZodString>>;
240
+ props: z.ZodArray<z.ZodObject<{
241
+ name: z.ZodString;
242
+ type: z.ZodString;
243
+ description: z.ZodString;
244
+ default: z.ZodOptional<z.ZodString>;
245
+ required: z.ZodOptional<z.ZodBoolean>;
246
+ }, z.core.$loose>>;
247
+ }, z.core.$loose>]>;
248
+ import { z } from 'zod';
@@ -270,6 +270,12 @@ export interface ComponentThemingDerivedVar {
270
270
  /** Named expansion strategy instead of specific vars.
271
271
  * `'container'` — expands padding to 7 container layout tokens. */
272
272
  expand?: 'container';
273
+ /** Emit only the internal `vars`, dropping the source property from the
274
+ * generated rule. Use when the class-carrying element must not receive the
275
+ * standard property itself — the value reaches a child through the var
276
+ * (e.g. TextArea's flush wrapper drives the inner textarea's inline
277
+ * padding). Without this, the property is emitted alongside the var. */
278
+ replaces?: boolean;
273
279
  }
274
280
 
275
281
  /**
@@ -0,0 +1,12 @@
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
+
4
+ /**
5
+ * @file SchemaDoc for the `CommandDoc` doc-type — how to author the TERMINAL
6
+ * binding of an operation. A command is a FunctionDoc exposed on the CLI, so it
7
+ * references the function via `fn` and only carries CLI-surface facts. Colocated
8
+ * with the type it describes (`type.ts`).
9
+ * @position packages/cli/authoring/doctypes/command — doc-type documentation
10
+ */
11
+ /** @type {import('@astryxdesign/cli/authoring').SchemaDoc} */
12
+ export const doc: import("@astryxdesign/cli/authoring").SchemaDoc;
@@ -1,4 +1,13 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
2
3
 
3
- import type {CommandDoc} from '../types';
4
+ /** @typedef {import('../types').CommandDoc} CommandDoc */
5
+ /**
6
+ * Validate an unknown value as a stamped command doc, or throw.
7
+ *
8
+ * @param {unknown} input
9
+ * @param {string} [label]
10
+ * @returns {CommandDoc}
11
+ */
4
12
  export function parseCommand(input: unknown, label?: string): CommandDoc;
13
+ export type CommandDoc = import("../types").CommandDoc;
@@ -0,0 +1,11 @@
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
+
4
+ /**
5
+ * @file SchemaDoc for the `ComponentDoc` doc-type — how to author a component
6
+ * directory's `{Name}.doc.mjs`. A discriminated union (Single/Multi/Sub) that
7
+ * shares ComponentBaseDoc. Colocated with the type it describes (`type.ts`).
8
+ * @position packages/cli/authoring/doctypes/component — doc-type documentation
9
+ */
10
+ /** @type {import('@astryxdesign/cli/authoring').SchemaDoc} */
11
+ export const doc: import("@astryxdesign/cli/authoring").SchemaDoc;
@@ -1,4 +1,13 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
2
3
 
3
- import type {ComponentDoc} from '../types';
4
+ /** @typedef {import('../types').ComponentDoc} ComponentDoc */
5
+ /**
6
+ * Validate an unknown value as a stamped component doc, or throw.
7
+ *
8
+ * @param {unknown} input
9
+ * @param {string} [label]
10
+ * @returns {ComponentDoc}
11
+ */
4
12
  export function parseComponent(input: unknown, label?: string): ComponentDoc;
13
+ export type ComponentDoc = import("../types").ComponentDoc;
@@ -0,0 +1,11 @@
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
+
4
+ /**
5
+ * @file SchemaDoc for the `EnumDoc` doc-type — how to author a doc for a closed
6
+ * vocabulary (error codes, response-type discriminants). Colocated with the
7
+ * type it describes (`type.ts`).
8
+ * @position packages/cli/authoring/doctypes/enum — doc-type documentation
9
+ */
10
+ /** @type {import('@astryxdesign/cli/authoring').SchemaDoc} */
11
+ export const doc: import("@astryxdesign/cli/authoring").SchemaDoc;
@@ -1,4 +1,13 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
2
3
 
3
- import type {EnumDoc} from '../types';
4
+ /** @typedef {import('../types').EnumDoc} EnumDoc */
5
+ /**
6
+ * Validate an unknown value as a stamped enum doc, or throw.
7
+ *
8
+ * @param {unknown} input
9
+ * @param {string} [label]
10
+ * @returns {EnumDoc}
11
+ */
4
12
  export function parseEnum(input: unknown, label?: string): EnumDoc;
13
+ export type EnumDoc = import("../types").EnumDoc;
@@ -0,0 +1,11 @@
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
+
4
+ /**
5
+ * @file SchemaDoc for the `FunctionDoc` doc-type — the generalized
6
+ * `type: 'function'` doc that covers BOTH React hooks and CLI/programmatic API
7
+ * functions. Colocated with the type it describes (`type.ts`).
8
+ * @position packages/cli/authoring/doctypes/function — doc-type documentation
9
+ */
10
+ /** @type {import('@astryxdesign/cli/authoring').SchemaDoc} */
11
+ export const doc: import("@astryxdesign/cli/authoring").SchemaDoc;
@@ -1,4 +1,13 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
2
3
 
3
- import type {FunctionDoc} from '../types';
4
+ /** @typedef {import('../types').FunctionDoc} FunctionDoc */
5
+ /**
6
+ * Validate an unknown value as a stamped function doc, or throw.
7
+ *
8
+ * @param {unknown} input
9
+ * @param {string} [label]
10
+ * @returns {FunctionDoc}
11
+ */
4
12
  export function parseFunction(input: unknown, label?: string): FunctionDoc;
13
+ export type FunctionDoc = import("../types").FunctionDoc;
@@ -2,9 +2,29 @@
2
2
 
3
3
  /**
4
4
  * @file Function doc parser (stamped `type: 'function'`). Hooks and CLI/API
5
- * functions share the discriminant and the sealed schema, so this is the same
6
- * validator as `parseHook`, exported under the general name. Consumers call
7
- * `parseFunction` or use `parseDoc`.
5
+ * functions share the discriminant and the sealed schema, so this delegates to
6
+ * the same validator as `parseHook`. Consumers call `parseFunction` or use
7
+ * `parseDoc`.
8
+ *
9
+ * This is a wrapper rather than `export {parseHook as parseFunction}` on
10
+ * purpose: a bare re-export publishes `parseHook`'s narrower `HookDoc` return
11
+ * type under the general name. `label` is forwarded untouched so `parseHook`'s
12
+ * own default still supplies the message prefix.
8
13
  */
9
14
 
10
- export {parseHook as parseFunction} from '../hook/parse.mjs';
15
+ import {parseHook} from '../hook/parse.mjs';
16
+
17
+ /** @typedef {import('../types').FunctionDoc} FunctionDoc */
18
+
19
+ /**
20
+ * Validate an unknown value as a stamped function doc, or throw.
21
+ *
22
+ * @param {unknown} input
23
+ * @param {string} [label]
24
+ * @returns {FunctionDoc}
25
+ */
26
+ export function parseFunction(input, label) {
27
+ return /** @type {FunctionDoc} */ (
28
+ /** @type {unknown} */ (parseHook(input, label))
29
+ );
30
+ }
@@ -0,0 +1,10 @@
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
+
4
+ /**
5
+ * @file SchemaDoc for the `HookDoc` doc-type — how to author a standalone
6
+ * React hook's `.doc.mjs`. Colocated with the type it describes (`type.ts`).
7
+ * @position packages/cli/authoring/doctypes/hook — doc-type documentation
8
+ */
9
+ /** @type {import('@astryxdesign/cli/authoring').SchemaDoc} */
10
+ export const doc: import("@astryxdesign/cli/authoring").SchemaDoc;
@@ -1,4 +1,13 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
2
3
 
3
- import type {HookDoc} from '../types';
4
+ /** @typedef {import('../types').HookDoc} HookDoc */
5
+ /**
6
+ * Validate an unknown value as a stamped function/hook doc, or throw.
7
+ *
8
+ * @param {unknown} input
9
+ * @param {string} [label]
10
+ * @returns {HookDoc}
11
+ */
4
12
  export function parseHook(input: unknown, label?: string): HookDoc;
13
+ export type HookDoc = import("../types").HookDoc;
@@ -1,4 +1,15 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
2
3
 
3
- import type {ComponentDoc, HookDoc} from './types';
4
+ /** @typedef {import('./types').ComponentDoc} ComponentDoc */
5
+ /** @typedef {import('./types').HookDoc} HookDoc */
6
+ /**
7
+ * Validate an unknown value as a legacy (unstamped) doc, or throw.
8
+ *
9
+ * @param {unknown} input
10
+ * @param {string} [label]
11
+ * @returns {ComponentDoc | HookDoc}
12
+ */
4
13
  export function parseLegacyDoc(input: unknown, label?: string): ComponentDoc | HookDoc;
14
+ export type ComponentDoc = import("./types").ComponentDoc;
15
+ export type HookDoc = import("./types").HookDoc;
@@ -1,21 +1,30 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
2
3
 
3
- import type {
4
- ComponentDoc,
5
- HookDoc,
6
- FunctionDoc,
7
- ReferenceDoc,
8
- TemplateDoc,
9
- SchemaDoc,
10
- CommandDoc,
11
- EnumDoc,
12
- } from './types';
13
-
14
- // Must stay in step with the @returns of parseDoc in ./parse.mjs — one entry per
15
- // doc kind it dispatches to. This declaration shadows the implementation for
16
- // published consumers, so a missing member silently makes that kind unnarrowable.
17
- // check:cli-structure enforces the coverage.
18
- export function parseDoc(
19
- input: unknown,
20
- label?: string,
21
- ): ComponentDoc | HookDoc | FunctionDoc | ReferenceDoc | TemplateDoc | SchemaDoc | CommandDoc | EnumDoc;
4
+ /** @typedef {import('./types').ComponentDoc} ComponentDoc */
5
+ /** @typedef {import('./types').HookDoc} HookDoc */
6
+ /** @typedef {import('./types').FunctionDoc} FunctionDoc */
7
+ /** @typedef {import('./types').ReferenceDoc} ReferenceDoc */
8
+ /** @typedef {import('./types').TemplateDoc} TemplateDoc */
9
+ /** @typedef {import('./types').SchemaDoc} SchemaDoc */
10
+ /** @typedef {import('./types').CommandDoc} CommandDoc */
11
+ /** @typedef {import('./types').EnumDoc} EnumDoc */
12
+ /**
13
+ * Validate an unknown loaded doc value into its typed shape, or throw.
14
+ * Dispatches on the stamped `type`; unstamped docs fall back to
15
+ * shape-sniffing. The reference/topic discriminant is `'generic'`; a hook and a
16
+ * CLI/API function share `'function'`.
17
+ *
18
+ * @param {unknown} input
19
+ * @param {string} [label]
20
+ * @returns {ComponentDoc | HookDoc | FunctionDoc | ReferenceDoc | TemplateDoc | SchemaDoc | CommandDoc | EnumDoc}
21
+ */
22
+ export function parseDoc(input: unknown, label?: string): ComponentDoc | HookDoc | FunctionDoc | ReferenceDoc | TemplateDoc | SchemaDoc | CommandDoc | EnumDoc;
23
+ export type ComponentDoc = import("./types").ComponentDoc;
24
+ export type HookDoc = import("./types").HookDoc;
25
+ export type FunctionDoc = import("./types").FunctionDoc;
26
+ export type ReferenceDoc = import("./types").ReferenceDoc;
27
+ export type TemplateDoc = import("./types").TemplateDoc;
28
+ export type SchemaDoc = import("./types").SchemaDoc;
29
+ export type CommandDoc = import("./types").CommandDoc;
30
+ export type EnumDoc = import("./types").EnumDoc;