@astryxdesign/cli 0.6.4-canary.f0355e3 → 0.6.4

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 (331) hide show
  1. package/README.md +96 -99
  2. package/api/build/build.doc.mjs +1 -6
  3. package/api/build/build.test.mjs +0 -22
  4. package/api/build/kit/kit.mjs +5 -44
  5. package/api/component/_adapter.d.mts +0 -25
  6. package/api/component/_adapter.mjs +5 -59
  7. package/api/component/component.d.mts +3 -6
  8. package/api/component/component.doc.mjs +17 -37
  9. package/api/component/component.mjs +9 -249
  10. package/api/component/component.type.d.mts +0 -25
  11. package/api/component/component.type.mjs +0 -44
  12. package/api/discover/_adapter.d.mts +6 -114
  13. package/api/discover/_adapter.mjs +17 -372
  14. package/api/discover/detail/detail.d.mts +6 -18
  15. package/api/discover/detail/detail.mjs +13 -67
  16. package/api/discover/detail/detail.test.mjs +0 -85
  17. package/api/discover/discover.d.mts +9 -3
  18. package/api/discover/discover.doc.mjs +18 -61
  19. package/api/discover/discover.mjs +36 -220
  20. package/api/discover/discover.test.mjs +2 -11
  21. package/api/discover/discover.type.d.mts +8 -147
  22. package/api/discover/discover.type.mjs +12 -102
  23. package/api/discover/list/list.d.mts +6 -20
  24. package/api/discover/list/list.mjs +12 -45
  25. package/api/discover/list/list.test.mjs +0 -46
  26. package/api/discover/search/search.d.mts +16 -18
  27. package/api/discover/search/search.mjs +56 -102
  28. package/api/discover/search/search.test.mjs +10 -144
  29. package/api/docs/_adapter.d.mts +3 -8
  30. package/api/docs/_adapter.mjs +6 -14
  31. package/api/docs/docOverlays.test.mjs +1 -27
  32. package/api/docs/docs.doc.mjs +2 -2
  33. package/api/docs/docs.test.mjs +243 -0
  34. package/api/docs/integration-tree.test.mjs +555 -0
  35. package/api/docs/integrationDocs.test.mjs +314 -0
  36. package/api/doctor/doctor.d.mts +3 -8
  37. package/api/doctor/doctor.doc.mjs +8 -17
  38. package/api/doctor/doctor.mjs +9 -90
  39. package/api/doctor/doctor.test.mjs +10 -122
  40. package/api/doctor/doctor.type.d.mts +1 -1
  41. package/api/doctor/doctor.type.mjs +1 -1
  42. package/api/gap-report/gap-report.doc.mjs +10 -19
  43. package/api/hook/hook.doc.mjs +3 -6
  44. package/api/index.d.mts +2 -1
  45. package/api/index.mjs +5 -5
  46. package/api/init/init.doc.mjs +12 -17
  47. package/api/integration/add-helpers.d.mts +2 -5
  48. package/api/integration/add-helpers.mjs +9 -36
  49. package/api/integration/add-theme.mjs +1 -22
  50. package/api/integration/add-theme.test.mjs +0 -34
  51. package/api/integration/authoring-checks.mjs +2 -2
  52. package/api/integration/integrationPackCheck.doc.mjs +3 -3
  53. package/api/integration/pack-check.mjs +9 -82
  54. package/api/integration/pack-check.test.mjs +0 -90
  55. package/api/integration/pack-check.type.mjs +1 -1
  56. package/api/json/assertResponse.doc.mjs +1 -1
  57. package/api/json/index.ts +1 -0
  58. package/api/json/isError.doc.mjs +1 -1
  59. package/api/layout/_adapter.d.mts +34 -0
  60. package/api/layout/_adapter.mjs +148 -0
  61. package/api/layout/check/check.d.mts +16 -0
  62. package/api/layout/check/check.mjs +40 -0
  63. package/api/layout/expand/expand.d.mts +22 -0
  64. package/api/layout/expand/expand.mjs +155 -0
  65. package/api/layout/expand/expand.path-safety.test.mjs +53 -0
  66. package/api/layout/grammar/grammar.d.mts +13 -0
  67. package/api/layout/grammar/grammar.mjs +87 -0
  68. package/api/layout/layout.d.mts +6 -0
  69. package/api/layout/layout.mjs +17 -0
  70. package/api/layout/layout.test.mjs +297 -0
  71. package/api/layout/layout.type.d.mts +89 -0
  72. package/api/layout/layout.type.mjs +103 -0
  73. package/api/layout/layoutCheck.doc.d.mts +11 -0
  74. package/api/layout/layoutCheck.doc.mjs +85 -0
  75. package/api/layout/layoutExpand.doc.d.mts +11 -0
  76. package/api/layout/layoutExpand.doc.mjs +107 -0
  77. package/api/layout/layoutGrammar.doc.d.mts +11 -0
  78. package/api/layout/layoutGrammar.doc.mjs +57 -0
  79. package/api/search/search.d.mts +1 -27
  80. package/api/search/search.doc.mjs +2 -2
  81. package/api/search/search.mjs +16 -228
  82. package/api/search/search.test.mjs +512 -0
  83. package/api/swizzle/swizzle.doc.mjs +5 -7
  84. package/api/template/copy/copy.mjs +1 -1
  85. package/api/template/copy/copy.test.mjs +0 -9
  86. package/api/template/template-integration.test.mjs +65 -1
  87. package/api/template/template.doc.mjs +1 -2
  88. package/api/template/template.mjs +1 -1
  89. package/api/theme/add/add.mjs +25 -17
  90. package/api/theme/add/add.staging.test.mjs +23 -40
  91. package/api/theme/build/build.family.test.mjs +12 -7
  92. package/api/theme/build/build.mjs +18 -8
  93. package/api/theme/generateTonalPalette.doc.mjs +2 -1
  94. package/api/theme/listThemes.doc.mjs +1 -1
  95. package/api/theme/themeAdd.doc.mjs +10 -9
  96. package/api/theme/themeBuild.doc.mjs +13 -13
  97. package/api/theme/themeList.doc.mjs +1 -1
  98. package/api/theme/themeListAvailable.doc.mjs +1 -2
  99. package/api/theme/themePaletteGenerate.doc.mjs +8 -15
  100. package/api/theme/themeTargets.doc.mjs +2 -3
  101. package/api/theme/themeTemplate.doc.mjs +1 -2
  102. package/api/upgrade/run/run.mjs +4 -6
  103. package/api/upgrade/upgrade.doc.mjs +22 -24
  104. package/api/upgrade/upgrade.type.mjs +2 -2
  105. package/assets/codemods/__tests__/runner.test.mjs +1 -3
  106. package/assets/codemods/integration-runner.mjs +3 -3
  107. package/assets/codemods/runner.mjs +4 -5
  108. package/assets/docs/README.md +2 -4
  109. package/assets/docs/browser-support.doc.mjs +11 -11
  110. package/assets/docs/color.doc.mjs +2 -8
  111. package/assets/docs/elevation.doc.mjs +4 -6
  112. package/assets/docs/getting-started.doc.mjs +16 -5
  113. package/assets/docs/icons.doc.mjs +21 -2
  114. package/assets/docs/illustrations.doc.mjs +15 -7
  115. package/assets/docs/internationalization.doc.mjs +5 -7
  116. package/assets/docs/layout.doc.dense.mjs +82 -130
  117. package/assets/docs/layout.doc.mjs +77 -133
  118. package/assets/docs/migration.doc.mjs +21 -19
  119. package/assets/docs/motion.doc.mjs +3 -16
  120. package/assets/docs/principles.doc.dense.mjs +5 -5
  121. package/assets/docs/principles.doc.mjs +0 -8
  122. package/assets/docs/principles.doc.zh.mjs +6 -6
  123. package/assets/docs/shape.doc.mjs +3 -8
  124. package/assets/docs/spacing.doc.mjs +2 -7
  125. package/assets/docs/styling-libraries.doc.mjs +2 -6
  126. package/assets/docs/styling.doc.mjs +23 -19
  127. package/assets/docs/theme.doc.dense.mjs +18 -58
  128. package/assets/docs/theme.doc.mjs +46 -56
  129. package/assets/docs/theme.doc.zh.mjs +8 -9
  130. package/assets/docs/tokens.doc.dense.mjs +2 -2
  131. package/assets/docs/tokens.doc.mjs +8 -389
  132. package/assets/docs/tokens.doc.zh.mjs +2 -2
  133. package/assets/docs/tree/integrations.doc.mjs +451 -25
  134. package/assets/docs/tree/integrations.test.mjs +62 -0
  135. package/assets/docs/tree/writing-docs.doc.mjs +286 -0
  136. package/assets/docs/typography.doc.mjs +4 -24
  137. package/assets/docs/working-with-ai.doc.mjs +22 -30
  138. package/assets/templates/blocks/components/InternationalizationProvider/InternationalizationProvider01ShippedLocale.tsx +1 -1
  139. package/authoring/config/config.doc.mjs +2 -10
  140. package/authoring/config/parse.d.mts +0 -2
  141. package/authoring/config/parse.mjs +0 -19
  142. package/authoring/config/parse.test.mjs +0 -8
  143. package/authoring/config/type.ts +2 -13
  144. package/authoring/doctypes/_schema.d.mts +2 -3
  145. package/authoring/doctypes/_schema.mjs +0 -6
  146. package/authoring/doctypes/base/graph-fields.doc.mjs +3 -3
  147. package/authoring/doctypes/base/type.ts +2 -4
  148. package/authoring/doctypes/command/command.doc.mjs +1 -1
  149. package/authoring/doctypes/command/type.ts +1 -1
  150. package/authoring/doctypes/component/component.doc.mjs +0 -6
  151. package/authoring/doctypes/component/type.ts +0 -8
  152. package/authoring/doctypes/reference/reference.doc.mjs +0 -7
  153. package/authoring/doctypes/reference/type.ts +0 -5
  154. package/authoring/doctypes/schema/schema.doc.mjs +2 -2
  155. package/authoring/doctypes/template/template.doc.mjs +1 -1
  156. package/authoring/doctypes/template/type.ts +2 -2
  157. package/authoring/index.d.mts +0 -1
  158. package/authoring/index.d.ts +0 -10
  159. package/authoring/index.mjs +0 -1
  160. package/authoring/integration/integration.doc.mjs +10 -12
  161. package/clients/cli/command-result-coverage.test.mjs +7 -7
  162. package/clients/cli/commands/component/index.mjs +55 -152
  163. package/clients/cli/commands/component-ownership.test.mjs +0 -89
  164. package/clients/cli/commands/component.doc.mjs +9 -27
  165. package/clients/cli/commands/debug-result-summary.test.mjs +2 -2
  166. package/clients/cli/commands/discover.doc.mjs +9 -53
  167. package/clients/cli/commands/discover.mjs +118 -393
  168. package/clients/cli/commands/docs.doc.mjs +1 -1
  169. package/clients/cli/commands/docs.mjs +17 -60
  170. package/clients/cli/commands/docs.test.mjs +294 -0
  171. package/clients/cli/commands/doctor-integration-docs.doc.mjs +2 -3
  172. package/clients/cli/commands/doctor-integration.test.mjs +0 -53
  173. package/clients/cli/commands/doctor.doc.mjs +1 -3
  174. package/clients/cli/commands/doctor.mjs +5 -49
  175. package/clients/cli/commands/gap-report.doc.mjs +9 -10
  176. package/clients/cli/commands/init.doc.mjs +6 -9
  177. package/clients/cli/commands/integration-add.doc.mjs +9 -9
  178. package/clients/cli/commands/integration-authoring.test.mjs +10 -61
  179. package/clients/cli/commands/integration-pack.doc.mjs +9 -5
  180. package/clients/cli/commands/integration-real-world.test.mjs +1 -1
  181. package/clients/cli/commands/integration.doc.mjs +4 -4
  182. package/clients/cli/commands/integration.mjs +43 -74
  183. package/clients/cli/commands/layout-check.doc.mjs +65 -0
  184. package/clients/cli/commands/layout-expand.doc.mjs +83 -0
  185. package/clients/cli/commands/layout-grammar.doc.mjs +30 -0
  186. package/clients/cli/commands/layout.doc.mjs +34 -0
  187. package/clients/cli/commands/layout.error-codes.test.mjs +66 -0
  188. package/clients/cli/commands/layout.exit-parity.test.mjs +41 -0
  189. package/clients/cli/commands/layout.mjs +275 -0
  190. package/clients/cli/commands/layout.path-help.test.mjs +33 -0
  191. package/clients/cli/commands/layout.stdin-cap.test.mjs +47 -0
  192. package/clients/cli/commands/layout.text-fields.test.mjs +39 -0
  193. package/clients/cli/commands/manifest.doc.mjs +1 -1
  194. package/clients/cli/commands/search.doc.mjs +3 -10
  195. package/clients/cli/commands/search.mjs +2 -21
  196. package/clients/cli/commands/search.test.mjs +4 -21
  197. package/clients/cli/commands/swizzle.doc.mjs +1 -1
  198. package/clients/cli/commands/template.doc.mjs +1 -1
  199. package/clients/cli/commands/text-json-parity.test.mjs +16 -5
  200. package/clients/cli/commands/theme-add.doc.mjs +1 -1
  201. package/clients/cli/commands/theme-palette-generate.doc.mjs +2 -3
  202. package/clients/cli/commands/theme-palette.doc.mjs +2 -1
  203. package/clients/cli/commands/theme-targets.doc.mjs +2 -2
  204. package/clients/cli/commands/theme.doc.mjs +1 -2
  205. package/clients/cli/commands/upgrade.doc.mjs +3 -62
  206. package/clients/cli/index.mjs +10 -28
  207. package/clients/cli/lib/define-command.mjs +4 -28
  208. package/clients/cli/lib/define-command.test.mjs +0 -54
  209. package/clients/cli/lib/exit-codes.test.mjs +9 -18
  210. package/clients/cli/lib/json-shim.mjs +14 -24
  211. package/clients/cli/lib/json-shim.test.mjs +20 -6
  212. package/clients/cli/lib/manifest.mjs +13 -18
  213. package/clients/cli/lib/manifest.test.mjs +2 -5
  214. package/foundation/agent-docs/agent-docs.mjs +1 -1
  215. package/foundation/agent-docs/agent-docs.test.mjs +1159 -0
  216. package/foundation/discovery/authoring-self-docs.mjs +0 -1
  217. package/foundation/discovery/authoring-self-docs.test.mjs +2 -6
  218. package/foundation/discovery/cli-self-docs.mjs +2 -16
  219. package/foundation/discovery/cli-self-docs.test.mjs +0 -20
  220. package/foundation/discovery/docs-discovery.mjs +1 -5
  221. package/foundation/discovery/docs-discovery.test.mjs +0 -21
  222. package/foundation/discovery/docs-section-key.d.mts +1 -1
  223. package/foundation/discovery/docs-section-key.mjs +1 -1
  224. package/foundation/discovery/template-adapter.mjs +1 -1
  225. package/foundation/doc-compiler/doc-loads.test.mjs +14 -3
  226. package/foundation/doc-compiler/tree.d.mts +0 -4
  227. package/foundation/doc-compiler/tree.mjs +1 -6
  228. package/foundation/doc-compiler/tree.test.mjs +598 -0
  229. package/foundation/integrations/cli-requirement.d.mts +6 -26
  230. package/foundation/integrations/cli-requirement.mjs +11 -46
  231. package/foundation/integrations/cli-requirement.test.mjs +2 -7
  232. package/foundation/integrations/contribution-inventory.mjs +1 -1
  233. package/foundation/integrations/integrations.d.mts +1 -14
  234. package/foundation/integrations/integrations.mjs +1 -41
  235. package/foundation/integrations/integrations.test.mjs +0 -31
  236. package/foundation/response/error-codes.doc.mjs +8 -6
  237. package/foundation/response/error-codes.test.mjs +5 -30
  238. package/foundation/response/response-types.doc.d.mts +3 -4
  239. package/foundation/response/response-types.doc.mjs +27 -40
  240. package/foundation/response/response-types.doc.test.mjs +0 -23
  241. package/foundation/response/response.doc.mjs +10 -11
  242. package/foundation/xle/browser.d.mts +3 -3
  243. package/foundation/xle/browser.mjs +3 -3
  244. package/foundation/xle/expand.mjs +2 -2
  245. package/foundation/xle/parse.mjs +1 -1
  246. package/foundation/xle/print.mjs +2 -2
  247. package/foundation/xle/splice.mjs +1 -1
  248. package/package.json +9 -9
  249. package/api/discover/_adapter.test.mjs +0 -215
  250. package/api/discover/_catalog-view.d.mts +0 -115
  251. package/api/discover/_catalog-view.mjs +0 -203
  252. package/api/discover/_catalog-view.test.mjs +0 -128
  253. package/api/discover/detail/item/item.d.mts +0 -26
  254. package/api/discover/detail/item/item.mjs +0 -78
  255. package/api/discover/detail/item/item.test.mjs +0 -73
  256. package/api/integration/pack-check.lifecycle-output.test.mjs +0 -107
  257. package/api/theme/add/add.rollback.test.mjs +0 -158
  258. package/api/theme/build/build.rollback.test.mjs +0 -148
  259. package/api/upgrade/run/files-changed.test.mjs +0 -111
  260. package/assets/codemods/file-count.test.mjs +0 -163
  261. package/assets/docs/tree/add-a-component.doc.mjs +0 -75
  262. package/assets/docs/tree/add-a-theme.doc.mjs +0 -85
  263. package/assets/docs/tree/add-a-topic.doc.mjs +0 -144
  264. package/assets/docs/tree/agent-guidance.doc.mjs +0 -138
  265. package/assets/docs/tree/block-template.doc.mjs +0 -130
  266. package/assets/docs/tree/build-the-template.doc.mjs +0 -28
  267. package/assets/docs/tree/building-blocks.doc.mjs +0 -46
  268. package/assets/docs/tree/check-your-docs.doc.mjs +0 -137
  269. package/assets/docs/tree/checks.doc.mjs +0 -119
  270. package/assets/docs/tree/codemods.doc.mjs +0 -147
  271. package/assets/docs/tree/component-family.doc.mjs +0 -113
  272. package/assets/docs/tree/component-imports.doc.mjs +0 -69
  273. package/assets/docs/tree/component-lookups.doc.mjs +0 -149
  274. package/assets/docs/tree/components.doc.mjs +0 -23
  275. package/assets/docs/tree/configuration.doc.mjs +0 -23
  276. package/assets/docs/tree/debug-and-gap-reports.doc.mjs +0 -182
  277. package/assets/docs/tree/define-the-theme.doc.mjs +0 -118
  278. package/assets/docs/tree/describe-the-component.doc.mjs +0 -57
  279. package/assets/docs/tree/docs.doc.mjs +0 -21
  280. package/assets/docs/tree/document-the-template.doc.mjs +0 -28
  281. package/assets/docs/tree/document-the-theme.doc.mjs +0 -68
  282. package/assets/docs/tree/export-template-assets.doc.mjs +0 -147
  283. package/assets/docs/tree/extend-or-replace.doc.mjs +0 -103
  284. package/assets/docs/tree/fonts-and-assets.doc.mjs +0 -106
  285. package/assets/docs/tree/generate-a-palette.doc.mjs +0 -66
  286. package/assets/docs/tree/grade-template-with-agent.doc.mjs +0 -105
  287. package/assets/docs/tree/help.doc.mjs +0 -16
  288. package/assets/docs/tree/links.doc.mjs +0 -98
  289. package/assets/docs/tree/package-and-test.doc.mjs +0 -32
  290. package/assets/docs/tree/page-template.doc.mjs +0 -71
  291. package/assets/docs/tree/publishing.doc.mjs +0 -111
  292. package/assets/docs/tree/quick-start.doc.mjs +0 -272
  293. package/assets/docs/tree/replace-a-core-component.doc.mjs +0 -104
  294. package/assets/docs/tree/replace-a-core-template.doc.mjs +0 -172
  295. package/assets/docs/tree/sections-and-placement.doc.mjs +0 -108
  296. package/assets/docs/tree/see-it-in-an-app.doc.mjs +0 -59
  297. package/assets/docs/tree/ship.doc.mjs +0 -16
  298. package/assets/docs/tree/short-and-findable.doc.mjs +0 -108
  299. package/assets/docs/tree/single-component.doc.mjs +0 -165
  300. package/assets/docs/tree/start-a-template.doc.mjs +0 -143
  301. package/assets/docs/tree/subcomponent.doc.mjs +0 -115
  302. package/assets/docs/tree/template-assets.doc.mjs +0 -64
  303. package/assets/docs/tree/template-doc-overview.doc.mjs +0 -109
  304. package/assets/docs/tree/template-fonts.doc.mjs +0 -102
  305. package/assets/docs/tree/template-grading-rubric.doc.mjs +0 -452
  306. package/assets/docs/tree/template-icons.doc.mjs +0 -97
  307. package/assets/docs/tree/template-images-media.doc.mjs +0 -127
  308. package/assets/docs/tree/template-styles.doc.mjs +0 -93
  309. package/assets/docs/tree/templates.doc.mjs +0 -34
  310. package/assets/docs/tree/test-in-an-app.doc.mjs +0 -115
  311. package/assets/docs/tree/test-template-in-app.doc.mjs +0 -128
  312. package/assets/docs/tree/themes.doc.mjs +0 -39
  313. package/assets/docs/tree/troubleshooting.doc.mjs +0 -149
  314. package/assets/docs/tree/upgrading.doc.mjs +0 -103
  315. package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +0 -51
  316. package/assets/docs/tree/verify-packed-template.doc.mjs +0 -77
  317. package/assets/docs/tree/versioning.doc.mjs +0 -161
  318. package/assets/docs/tree/write-good-templates.doc.mjs +0 -64
  319. package/assets/docs/tree/write-the-template-file.doc.mjs +0 -154
  320. package/authoring/discover/discover.doc.d.mts +0 -13
  321. package/authoring/discover/discover.doc.mjs +0 -138
  322. package/authoring/discover/parse.d.mts +0 -24
  323. package/authoring/discover/parse.mjs +0 -128
  324. package/authoring/discover/parse.test.mjs +0 -124
  325. package/authoring/discover/type.ts +0 -87
  326. package/clients/cli/commands/component-batch.test.mjs +0 -341
  327. package/clients/cli/commands/discover.sources.test.mjs +0 -267
  328. package/clients/cli/commands/integration-verify.doc.mjs +0 -22
  329. package/clients/cli/lib/parse-error-format.test.mjs +0 -81
  330. package/foundation/response/batch.type.d.mts +0 -33
  331. package/foundation/response/batch.type.mjs +0 -34
@@ -1,85 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file `astryx docs cli/integrations/building-blocks/themes/add-a-theme`:
5
- * scaffold a theme in a package — blank, or forked from an existing theme.
6
- */
7
-
8
- /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
9
- export const docs = {
10
- type: 'generic',
11
- name: 'add-a-theme',
12
- placement: {parent: 'namespace:themes', slot: 'guides', order: 10},
13
- title: 'Add a theme',
14
- category: 'guide',
15
- description:
16
- 'Scaffold a theme in your package — blank, or forked from an existing theme.',
17
- sections: [
18
- {
19
- id: 'add-a-theme',
20
- title: 'Add a theme',
21
- content: [
22
- {
23
- type: 'prose',
24
- text: 'Run `integration add theme` with a lowercase kebab-case slug. It writes a blank theme — a `defineTheme` skeleton and its descriptor — into a folder named after the slug.',
25
- },
26
- {
27
- type: 'code',
28
- lang: 'bash',
29
- code: 'npx astryx integration add theme ocean',
30
- },
31
- {
32
- type: 'code',
33
- lang: 'text',
34
- code: `theme contribution added
35
-
36
- [ok] ocean
37
-
38
- Declare theme root ./themes in astryx.integration.mjs.
39
-
40
- - themes/ocean/oceanTheme.ts
41
- - themes/ocean/oceanTheme.doc.mjs
42
- - package.json
43
- - astryx.integration.mjs`,
44
- },
45
- {
46
- type: 'prose',
47
- text: "`oceanTheme.ts` exports `oceanTheme`, a `defineTheme` source. `oceanTheme.doc.mjs` describes it with `type: 'theme'`, `name`, `displayName`, `description`, and `maintained`; `theme list` shows its `name`, `description`, and `maintained`. Every field is in {@link generic:authoring}.",
48
- },
49
- {
50
- type: 'prose',
51
- text: 'The source ships in your package. An app installs the package and applies the theme — it is not copied; see {@link generic:use-a-theme-in-an-app}.',
52
- },
53
- ],
54
- },
55
- {
56
- id: 'start-from-an-existing-theme',
57
- title: 'Start from an existing theme',
58
- content: [
59
- {
60
- type: 'prose',
61
- text: 'To begin from an existing theme instead of a blank one, pass `--from`. It copies that theme as your starting point to diverge from — a fork, with no link back.',
62
- },
63
- {
64
- type: 'code',
65
- lang: 'bash',
66
- code: 'npx astryx integration add theme ocean --from neutral',
67
- },
68
- {
69
- type: 'prose',
70
- text: 'Use `--from` when you want to change a lot. For a small change that should stay linked to a base theme, use `extends` instead ({@link generic:define-the-theme}).',
71
- },
72
- ],
73
- },
74
- {
75
- id: 'ship-several-themes',
76
- title: 'Ship several themes',
77
- content: [
78
- {
79
- type: 'prose',
80
- text: 'A package can ship more than one theme. Run `integration add theme` once per slug; each theme gets its own folder and descriptor, and `theme list` shows them all.',
81
- },
82
- ],
83
- },
84
- ],
85
- };
@@ -1,144 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file `astryx docs cli/integrations/docs/add-a-topic`: add a doc topic to an
5
- * integration package, write its sections, and pick the doc kind for each
6
- * thing the package ships.
7
- */
8
-
9
- /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
10
- export const docs = {
11
- type: 'generic',
12
- name: 'add-a-topic',
13
- placement: {parent: 'namespace:docs', slot: 'guides', order: 10},
14
- title: 'Add a topic',
15
- category: 'guide',
16
- keywords: ['add a doc', 'integration docs', 'write docs'],
17
- description: 'Add a doc topic to your package and write its sections.',
18
- sections: [
19
- {
20
- id: 'add-a-topic-with-the-cli',
21
- title: 'Add a topic with the CLI',
22
- content: [
23
- {
24
- type: 'prose',
25
- text: 'Run `integration add doc` in your package to add a topic. It writes the topic file and declares the `docs` root in `astryx.integration.mjs`.',
26
- },
27
- {
28
- type: 'code',
29
- lang: 'bash',
30
- code: 'npx astryx integration add doc deploying\n# Read it the way an app will\nnpx astryx docs deploying',
31
- },
32
- {
33
- type: 'code',
34
- lang: 'text',
35
- code: 'doc contribution added\n\n[ok] deploying\n\nDeclare doc root ./docs in astryx.integration.mjs.\n\n- docs/deploying.doc.mjs\n- astryx.integration.mjs',
36
- },
37
- {
38
- type: 'list',
39
- style: 'unordered',
40
- items: [
41
- 'Name the topic in lowercase kebab-case, such as `deploying`. Readers type the name as a command argument, so it holds only letters, digits, `_`, and `-`.',
42
- 'Keep the name stable: readers and links find the topic by it.',
43
- 'Pick a name no Core topic uses. To take over or add to a Core topic, see {@link generic:extend-or-replace}.',
44
- ],
45
- },
46
- ],
47
- },
48
- {
49
- id: 'write-the-sections',
50
- title: 'Write the sections',
51
- content: [
52
- {
53
- type: 'prose',
54
- text: "A topic is a plain object with `type: 'generic'`, a `name`, a `title`, a one-sentence `description`, and `sections`. Each section has a `title` and a list of `content` blocks.",
55
- },
56
- {
57
- type: 'code',
58
- lang: 'javascript',
59
- label: 'docs/deploying.doc.mjs',
60
- code: "/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */\nexport default {\n type: 'generic',\n name: 'deploying',\n title: 'Deploying',\n description: 'Ship an app built with Acme widgets.',\n sections: [{\n id: 'build-before-you-ship',\n title: 'Build before you ship',\n content: [\n {type: 'prose', text: 'Build the app, then upload the `dist` folder.'},\n {type: 'code', lang: 'bash', code: 'npm run build'},\n {type: 'list', style: 'unordered', items: ['Keep `dist` out of git.']},\n {type: 'table', headers: ['Variable', 'Value'], rows: [['`NODE_ENV`', '`production`']]},\n ],\n }],\n};",
61
- },
62
- {
63
- type: 'list',
64
- style: 'unordered',
65
- items: [
66
- 'Content blocks are `prose`, `code`, `list`, and `table`, as shown; `heading`, with a `level` from 3 to 6 and a `text`; and `token-ref`, which inlines a token table from another topic.',
67
- '`id` is optional: a stable key for the section. Without it, the key comes from the title. A stable CLI before 0.7.0 cannot read `id`; see {@link generic:versioning}.',
68
- 'Replace the `Overview` placeholder that `integration add` writes. Every field is in {@link generic:authoring}.',
69
- ],
70
- },
71
- ],
72
- },
73
- {
74
- id: 'pick-the-doc-kind',
75
- title: 'Pick the doc kind',
76
- content: [
77
- {
78
- type: 'prose',
79
- text: 'Every doc is a `.doc.mjs` file whose `type` says what it describes. `integration add` writes the right `type` and file for each kind.',
80
- },
81
- {
82
- type: 'table',
83
- headers: [
84
- 'You document',
85
- '`type`',
86
- 'File that `integration add` writes',
87
- ],
88
- rows: [
89
- ['A guide or topic', "`'generic'`", '`docs/deploying.doc.mjs`'],
90
- [
91
- "Your package's docs section",
92
- "`'namespace'`",
93
- '`docs/acme.doc.mjs`',
94
- ],
95
- [
96
- 'A component',
97
- "`'component'`",
98
- '`components/AcmeCarousel.doc.mjs`, beside `AcmeCarousel.tsx`',
99
- ],
100
- [
101
- 'A template',
102
- "`'page'` or `'block'`",
103
- '`templates/acme-dashboard.doc.mjs`, beside `acme-dashboard.tsx`',
104
- ],
105
- [
106
- 'A theme',
107
- "`'theme'`",
108
- '`themes/ocean/oceanTheme.doc.mjs`, beside `oceanTheme.ts`',
109
- ],
110
- ],
111
- },
112
- {
113
- type: 'prose',
114
- text: 'Only guides, topics, and your docs section go in the `docs` root. The others have their own guides: {@link namespace:components}, {@link namespace:templates}, and {@link namespace:themes}.',
115
- },
116
- ],
117
- },
118
- {
119
- id: 'keep-topics-in-the-docs-root',
120
- title: 'Keep topics in the docs root',
121
- content: [
122
- {
123
- type: 'prose',
124
- text: 'The `docs` field in `astryx.integration.mjs` names the folder that holds your topics. The CLI reads every `.doc.mjs` file under it, in subfolders too.',
125
- },
126
- {
127
- type: 'code',
128
- lang: 'javascript',
129
- label: 'astryx.integration.mjs',
130
- code: "export default {\n docs: './docs'\n};",
131
- },
132
- {
133
- type: 'list',
134
- style: 'unordered',
135
- items: [
136
- 'Readers open a topic by its `name`, not its file name. Name the file after the doc, `<name>.doc.mjs`, so each one is easy to find.',
137
- 'A topic with no `placement` is a flat topic: the docs list shows it under Topics, and readers open it by its name.',
138
- 'To give your package its own section in the docs tree instead, see {@link generic:sections-and-placement}.',
139
- ],
140
- },
141
- ],
142
- },
143
- ],
144
- };
@@ -1,138 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file `astryx docs cli/integrations/agent-guidance`: add short lines of
5
- * guidance that apps put in front of their AI agents, within the limits.
6
- */
7
-
8
- /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
9
- export const docs = {
10
- type: 'generic',
11
- name: 'agent-guidance',
12
- placement: {parent: 'namespace:configuration', slot: 'guides', order: 10},
13
- title: 'Agent guidance',
14
- category: 'guide',
15
- keywords: ['agent docs', 'agents.md'],
16
- description:
17
- 'Add a few lines of guidance that apps put in front of the AI agents working in their code.',
18
- sections: [
19
- {
20
- id: 'add-a-guidance-line',
21
- title: 'Add a line of guidance',
22
- content: [
23
- {
24
- type: 'prose',
25
- text: '`integration add agent-doc` adds one line for AI agents that work in apps using your package. Apps show it in their agent file, such as `AGENTS.md`.',
26
- },
27
- {
28
- type: 'code',
29
- lang: 'bash',
30
- code: "npx astryx integration add agent-doc 'Use AcmeCarousel for rotating content.'",
31
- },
32
- {
33
- type: 'prose',
34
- text: 'The line lands in `agentDocs.append` in your manifest:',
35
- },
36
- {
37
- type: 'code',
38
- lang: 'js',
39
- code: `// astryx.integration.mjs
40
- export default {
41
- components: './components',
42
- agentDocs: {
43
- append: ['Use AcmeCarousel for rotating content.'],
44
- },
45
- };`,
46
- },
47
- {
48
- type: 'prose',
49
- text: 'Adding the same line again changes nothing. To reword or remove a line, edit `agentDocs.append` by hand.',
50
- },
51
- ],
52
- },
53
- {
54
- id: 'keep-within-the-limits',
55
- title: 'Keep within the limits',
56
- content: [
57
- {
58
- type: 'prose',
59
- text: "Every line costs space in each app's agent file, so the CLI keeps guidance short and few. Put detail in your docs instead.",
60
- },
61
- {
62
- type: 'table',
63
- headers: ['Limit', 'What happens past it'],
64
- rows: [
65
- [
66
- '8 lines per package',
67
- '`integration add` fails: `append may contain at most 8 lines`.',
68
- ],
69
- [
70
- '240 characters per line',
71
- '`integration add` fails: `must contain at most 240 Unicode code points`.',
72
- ],
73
- [
74
- '32 lines per app, from all its packages',
75
- '`init` writes no agent block and prints `Could not install agent docs.`',
76
- ],
77
- ],
78
- },
79
- {
80
- type: 'prose',
81
- text: 'A line is one line of plain text. Line breaks, control characters, spaces at either end, and managed-block markers such as `<!-- ASTRYX:START -->` are rejected.',
82
- },
83
- ],
84
- },
85
- {
86
- id: 'see-what-agents-read',
87
- title: 'See what agents read',
88
- content: [
89
- {
90
- type: 'prose',
91
- text: "An app's `astryx init` writes your lines at the end of its managed agent block, each labeled with your package name. The CLI owns the heading, the labels, and the markers.",
92
- },
93
- {
94
- type: 'code',
95
- lang: 'bash',
96
- code: 'npx astryx init --features agents',
97
- },
98
- {
99
- type: 'code',
100
- lang: 'text',
101
- code: `INTEGRATIONS:
102
- - \`@acme/astryx-widgets\`: Use AcmeCarousel for rotating content.
103
- <!-- ASTRYX:END -->`,
104
- },
105
- {
106
- type: 'prose',
107
- text: 'The block collects lines from every integration the app has installed, with or without an `astryx.config` entry.',
108
- },
109
- ],
110
- },
111
- {
112
- id: 'refresh-the-block',
113
- title: 'Refresh the block in an app',
114
- content: [
115
- {
116
- type: 'prose',
117
- text: 'The block changes only when the app runs `init`, or `upgrade --from <version> --apply`. After an app installs a version of your package with new lines, it runs one of them.',
118
- },
119
- {
120
- type: 'code',
121
- lang: 'bash',
122
- code: `npx astryx init --features agents
123
- # Or: --from takes the Core version the app had before
124
- npx astryx upgrade --from 0.7.0 --apply`,
125
- },
126
- {
127
- type: 'code',
128
- lang: 'text',
129
- code: '[ok] Agent docs refreshed -> AGENTS.md',
130
- },
131
- {
132
- type: 'prose',
133
- text: '`upgrade --apply` prints that line; `init` prints `[ok] AI agent docs installed -> AGENTS.md`. Without `--apply`, `upgrade` only reports `Agent docs differ from the installed Astryx and integration configuration.` It refreshes the block even when Core did not change. See {@link command:upgrade}.',
134
- },
135
- ],
136
- },
137
- ],
138
- };
@@ -1,130 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file `astryx docs cli/integrations/templates/document-the-template/block-template`:
5
- * the block-only fields: component relationships and the preview shape.
6
- */
7
-
8
- /** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
9
- export const docs = {
10
- type: 'generic',
11
- name: 'block-template',
12
- placement: {
13
- parent: 'namespace:document-the-template',
14
- slot: 'guides',
15
- order: 30,
16
- },
17
- title: 'Block template',
18
- category: 'guide',
19
- description:
20
- 'Describe a smaller composition, choose its preview shape, and connect it to component examples only when that relationship is real.',
21
- sections: [
22
- {
23
- id: 'start-with-a-standalone-block',
24
- title: 'Start with a standalone block',
25
- content: [
26
- {
27
- type: 'prose',
28
- text: 'Most blocks stand alone. Start with this shape unless the block is specifically the example or showcase for one component.',
29
- },
30
- {
31
- type: 'code',
32
- lang: 'javascript',
33
- label: 'templates/acme-stat-card.doc.mjs',
34
- code: `/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
35
- export default {
36
- type: 'block',
37
- name: 'acme-stat-card',
38
- displayName: 'Acme Stat Card',
39
- description:
40
- 'A compact metric card with a current value, period delta, and supporting trend. KPI, scorecard, summary, or dashboard statistic.',
41
- isReady: false,
42
- aspectRatio: 4 / 3,
43
- componentsUsed: ['Card', 'HStack', 'Text', 'VStack'],
44
- };`,
45
- },
46
- {
47
- type: 'prose',
48
- text: 'Do not add `exampleFor` only because the block uses a component. `componentsUsed` records composition; `exampleFor` declares that one component owns the example.',
49
- },
50
- ],
51
- },
52
- {
53
- id: 'choose-the-component-relationship',
54
- title: 'Choose the component relationship',
55
- content: [
56
- {
57
- type: 'reference',
58
- target: 'schema:template-doc',
59
- projection: {
60
- fields: [
61
- 'exampleFor',
62
- 'alsoExampleFor',
63
- 'alsoShowcaseFor',
64
- 'componentsUsed',
65
- 'isShowcase',
66
- ],
67
- },
68
- presentation: 'full',
69
- },
70
- {
71
- type: 'prose',
72
- text: 'Keep one clear primary owner. Use the `also*` fields only for intentional secondary placements.',
73
- },
74
- {
75
- type: 'code',
76
- lang: 'javascript',
77
- label: 'templates/acme-status-card-showcase.doc.mjs',
78
- code: `/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
79
- export default {
80
- type: 'block',
81
- name: 'acme-status-card-showcase',
82
- displayName: 'Acme Status Card Showcase',
83
- description:
84
- 'An account-health summary that demonstrates status, trend, and action states for AcmeStatusCard.',
85
- isReady: true,
86
- exampleFor: 'AcmeStatusCard',
87
- isShowcase: true,
88
- alsoExampleFor: ['AcmeDashboard'],
89
- aspectRatio: 4 / 3,
90
- componentsUsed: ['AcmeStatusCard', 'Button', 'HStack', 'VStack'],
91
- };`,
92
- },
93
- {
94
- type: 'prose',
95
- text: 'Then check the package-scoped template list ({@link generic:template-doc-overview}) and confirm the entry carries the relationship you set. `astryx component` does not show integration blocks, so the list is where to check.',
96
- },
97
- ],
98
- },
99
- {
100
- id: 'choose-a-useful-preview',
101
- title: 'Choose a useful preview',
102
- content: [
103
- {
104
- type: 'reference',
105
- target: 'schema:template-doc',
106
- projection: {fields: ['aspectRatio']},
107
- presentation: 'full',
108
- },
109
- {
110
- type: 'prose',
111
- text: 'Start from the value for the closest shape below, render the block at that ratio, and adjust it until it neither clips nor leaves large empty space. These are starting points, not contract defaults.',
112
- },
113
- {
114
- type: 'table',
115
- headers: ['Block shape', 'Starting value'],
116
- rows: [
117
- ['Wide navigation, banner, toolbar, or tabs', '`16 / 4`'],
118
- ['Square button, badge, avatar, icon, spinner, or status', '`1`'],
119
- ['Tall navigation, calendar, list, or tree', '`3 / 4`'],
120
- ['Content card, dialog, table, or form group', '`4 / 3`'],
121
- ],
122
- },
123
- {
124
- type: 'prose',
125
- text: "`scale` affects only Astryx's own block previews. Integration blocks can leave it out.",
126
- },
127
- ],
128
- },
129
- ],
130
- };
@@ -1,28 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file `astryx docs cli/integrations/templates/build-the-template`:
5
- * author portable template source and every asset that source needs.
6
- */
7
-
8
- /** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
9
- export const docs = {
10
- type: 'namespace',
11
- name: 'build-the-template',
12
- placement: {parent: 'namespace:templates', slot: 'build', order: 30},
13
- title: 'Build the template',
14
- summary:
15
- 'Make sure your template works when an app copies it: write the template file, set up its styles, fonts, icons, and images, then package and test it.',
16
- keywords: [
17
- 'template source',
18
- 'portable template',
19
- 'template assets',
20
- 'template imports',
21
- ],
22
- slots: {
23
- guides: {
24
- title: 'Guides',
25
- accepts: {kinds: ['generic', 'namespace']},
26
- },
27
- },
28
- };
@@ -1,46 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file astryx docs cli/integrations/building-blocks — the kinds you can add. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').NamespaceDoc} */
6
- export const docs = {
7
- type: 'namespace',
8
- name: 'building-blocks',
9
- placement: {parent: 'namespace:integrations', slot: 'guides', order: 20},
10
- title: 'Building Blocks',
11
- summary:
12
- 'Add components, templates, themes, docs, and codemods, and configure how it behaves.',
13
- keywords: [
14
- 'building blocks',
15
- 'contribute',
16
- 'add to an integration',
17
- 'contribution kinds',
18
- ],
19
- slots: {
20
- guides: {
21
- title: 'Building Blocks',
22
- accepts: {kinds: ['generic', 'namespace']},
23
- },
24
- },
25
- blocks: [
26
- {
27
- type: 'prose',
28
- text: 'These are everything you can add to an integration. Mix them however you like. You are not limited to any one thing.',
29
- },
30
- {
31
- type: 'list',
32
- style: 'unordered',
33
- items: [
34
- 'One component, or a whole library of them.',
35
- 'Components together with themes and templates.',
36
- 'Only docs, if that is all you need.',
37
- 'Agent guidance, so the AI agents in an app follow your library.',
38
- 'Codemods that update app code across your breaking changes.',
39
- ],
40
- },
41
- {
42
- type: 'prose',
43
- text: 'Each kind below is its own guide. Open one to learn, in depth, how to add it and how to keep it healthy as your package grows.',
44
- },
45
- ],
46
- };