@astryxdesign/cli 0.7.18-canary.gfacee17 → 0.7.18

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 (363) hide show
  1. package/CHANGELOG.md +185 -19
  2. package/README.md +19 -19
  3. package/api/component/_adapter.d.mts +2 -1
  4. package/api/component/_adapter.mjs +2 -1
  5. package/api/docs/_adapter.d.mts +6 -5
  6. package/api/docs/_adapter.mjs +36 -5
  7. package/api/doctor/_adapter.d.mts +6 -3
  8. package/api/doctor/_adapter.mjs +13 -5
  9. package/api/doctor/doctor.mjs +5 -5
  10. package/api/doctor/font-packages.d.mts +36 -0
  11. package/api/doctor/font-packages.mjs +124 -0
  12. package/api/doctor/theme-checks.mjs +110 -49
  13. package/api/experimental.d.mts +0 -2
  14. package/api/experimental.mjs +0 -12
  15. package/api/icon/_adapter.d.mts +2 -2
  16. package/api/icon/_adapter.mjs +6 -2
  17. package/api/icon/_authoring.mjs +22 -13
  18. package/api/icon/_default-look.mjs +15 -15
  19. package/api/icon/add/add.mjs +14 -9
  20. package/api/icon/icon.doc.mjs +7 -7
  21. package/api/icon/icon.type.d.mts +33 -33
  22. package/api/icon/icon.type.mjs +45 -45
  23. package/api/icon/iconAdd.doc.mjs +9 -10
  24. package/api/icon/iconMap.doc.mjs +11 -12
  25. package/api/icon/iconNewDefinition.doc.mjs +8 -8
  26. package/api/icon/iconNewSet.doc.mjs +5 -5
  27. package/api/icon/map/map.mjs +7 -7
  28. package/api/icon/use/use.mjs +4 -4
  29. package/api/init/run/run.mjs +0 -1
  30. package/api/integration/add-helpers.mjs +1 -1
  31. package/api/integration/validate-integration.type.d.mts +6 -6
  32. package/api/integration/validate-integration.type.mjs +6 -6
  33. package/api/render/_adapter.d.mts +5 -3
  34. package/api/render/_adapter.mjs +64 -4
  35. package/api/render/render.doc.mjs +9 -2
  36. package/api/render/render.mjs +5 -2
  37. package/api/render/render.type.d.mts +17 -0
  38. package/api/render/render.type.mjs +10 -0
  39. package/api/search/ORDERING.md +1 -1
  40. package/api/search/_candidate-score.mjs +20 -0
  41. package/api/search/_words.d.mts +8 -0
  42. package/api/search/_words.mjs +15 -0
  43. package/api/template/template.type.d.mts +2 -2
  44. package/api/template/template.type.mjs +2 -2
  45. package/api/theme/_adapter.mjs +19 -11
  46. package/api/theme/build/build.d.mts +19 -51
  47. package/api/theme/build/build.mjs +195 -189
  48. package/api/theme/build/font-warning.d.mts +19 -2
  49. package/api/theme/build/font-warning.mjs +46 -5
  50. package/api/theme/generateTonalPalette.doc.mjs +1 -1
  51. package/api/theme/palette/generate/derive-look.mjs +108 -37
  52. package/api/theme/palette/generate/mapping.mjs +2 -0
  53. package/api/theme/template/template.d.mts +0 -17
  54. package/api/theme/template/template.mjs +1 -42
  55. package/api/theme/theme.type.d.mts +5 -4
  56. package/api/theme/theme.type.mjs +5 -4
  57. package/api/theme/themePaletteGenerate.doc.mjs +1 -1
  58. package/api/theme/themeRemove.doc.mjs +1 -1
  59. package/assets/codemods/transforms/v0.7.0/preserve-bottom-sheet-content-padding.mjs +3 -1
  60. package/assets/component-list.generated.json +1 -1
  61. package/assets/discover/official-packages.json +26 -2
  62. package/assets/docs/author-a-theme.doc.mjs +6 -5
  63. package/assets/docs/browser-support.doc.mjs +1 -0
  64. package/assets/docs/icons.doc.mjs +8 -7
  65. package/assets/docs/motion.doc.mjs +46 -0
  66. package/assets/docs/theme.doc.dense.mjs +6 -17
  67. package/assets/docs/theme.doc.mjs +6 -16
  68. package/assets/docs/theme.doc.zh.mjs +6 -16
  69. package/assets/docs/tree/ci-and-containers.doc.mjs +1 -1
  70. package/assets/docs/tree/data-colors-in-renderers.doc.mjs +400 -0
  71. package/assets/docs/tree/font-setup.doc.mjs +30 -0
  72. package/assets/docs/tree/icon-sets.doc.mjs +2 -2
  73. package/assets/docs/tree/share-a-page.doc.mjs +1 -1
  74. package/assets/docs/tree/template-icons.doc.mjs +3 -3
  75. package/assets/docs/tree/tokens-color.doc.mjs +5 -0
  76. package/assets/docs/tree/tokens.doc.mjs +4 -3
  77. package/assets/docs/tree/updates.doc.mjs +1 -1
  78. package/assets/docs/tree/visualization.doc.mjs +30 -0
  79. package/assets/docs-routes.generated.json +1 -1
  80. package/assets/docs.generated.json +2 -2
  81. package/assets/icons/definitions/drag.doc.mjs +1 -0
  82. package/assets/search-catalog.generated.json +2 -2
  83. package/assets/self-audit.generated.json +1 -1
  84. package/assets/templates/blocks/components/Card/SelectableCardElevated.doc.mjs +1 -1
  85. package/assets/templates/blocks/components/Card/SelectableCardElevated.tsx +20 -10
  86. package/assets/templates/blocks/components/Card/SelectableCardShowcase.doc.mjs +1 -1
  87. package/assets/templates/blocks/components/Card/SelectableCardShowcase.tsx +36 -16
  88. package/assets/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.tsx +6 -0
  89. package/assets/templates/blocks/components/ChatComposerInput/ChatComposerInputMultipleTriggers.tsx +6 -0
  90. package/assets/templates/blocks/components/Hooks/useIndicatorFocusRingHookUsage.doc.mjs +14 -0
  91. package/assets/templates/blocks/components/Hooks/useIndicatorFocusRingHookUsage.tsx +63 -0
  92. package/assets/templates/blocks/components/Hooks/useLongPressHookUsage.doc.mjs +29 -0
  93. package/assets/templates/blocks/components/Hooks/useLongPressHookUsage.tsx +237 -0
  94. package/assets/templates/blocks/components/SideNav/SideNavShowcase.tsx +10 -72
  95. package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.doc.mjs +1 -1
  96. package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx +7 -7
  97. package/assets/templates/blocks/components/Table/TableCustomRowTable.doc.mjs +14 -0
  98. package/assets/templates/blocks/components/Table/TableCustomRowTable.tsx +96 -0
  99. package/assets/templates/components.generated.json +1 -1
  100. package/assets/templates/pages/ai-chat-landing/page.tsx +4 -0
  101. package/assets/templates/pages/dashboard-scorecard/page.tsx +26 -7
  102. package/assets/templates/pages/editor/page.tsx +13 -3
  103. package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +2 -2
  104. package/assets/templates/themes/butter/butterTheme.ts +12 -10
  105. package/assets/templates/themes/butter/icons.tsx +2 -0
  106. package/assets/templates/themes/chocolate/chocolateTheme.ts +1 -0
  107. package/assets/templates/themes/chocolate/icons.tsx +2 -0
  108. package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +1 -1
  109. package/assets/templates/themes/gothic/gothicTheme.ts +1 -0
  110. package/assets/templates/themes/gothic/icons.tsx +2 -0
  111. package/assets/templates/themes/matcha/icons.tsx +2 -0
  112. package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +2 -2
  113. package/assets/templates/themes/matcha/matchaTheme.ts +1 -0
  114. package/assets/templates/themes/neutral/icons.tsx +2 -0
  115. package/assets/templates/themes/neutral/neutralPaletteRefs.generated.ts +2 -2
  116. package/assets/templates/themes/neutral/neutralTheme.ts +1 -0
  117. package/assets/templates/themes/stone/icons.tsx +2 -0
  118. package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +1 -1
  119. package/assets/templates/themes/stone/stoneTheme.ts +1 -0
  120. package/assets/templates/themes/y2k/icons.tsx +2 -0
  121. package/assets/templates/themes/y2k/y2kTheme.ts +1 -0
  122. package/assets/theme.template.ts +9 -5
  123. package/authoring/config/parse.mjs +1 -1
  124. package/authoring/doctypes/base/type.ts +2 -3
  125. package/authoring/doctypes/component/component.doc.mjs +1 -1
  126. package/authoring/doctypes/icon-set/icon-names.mjs +1 -0
  127. package/authoring/integration/integration.doc.mjs +1 -1
  128. package/authoring/integration/type.ts +1 -1
  129. package/clients/cli/build-id.generated.json +1 -1
  130. package/clients/cli/commands/doctor.mjs +2 -2
  131. package/clients/cli/commands/experimental/export.mjs +2 -1
  132. package/clients/cli/commands/experimental/icon.mjs +17 -17
  133. package/clients/cli/commands/experimental/index.mjs +0 -5
  134. package/clients/cli/commands/experimental/render-output.mjs +9 -0
  135. package/clients/cli/commands/experimental-export.doc.mjs +6 -0
  136. package/clients/cli/commands/experimental-icon-add.doc.mjs +8 -8
  137. package/clients/cli/commands/experimental-icon-map.doc.mjs +6 -6
  138. package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +6 -6
  139. package/clients/cli/commands/experimental-icon-new-set.doc.mjs +3 -3
  140. package/clients/cli/commands/experimental-icon-use.doc.mjs +1 -1
  141. package/clients/cli/commands/experimental-icon.doc.mjs +6 -6
  142. package/clients/cli/commands/experimental.doc.mjs +2 -6
  143. package/clients/cli/commands/template.mjs +1 -1
  144. package/clients/cli/commands/theme-build.doc.mjs +8 -1
  145. package/clients/cli/commands/theme-palette-generate.doc.mjs +1 -1
  146. package/clients/cli/commands/theme-remove.doc.mjs +1 -1
  147. package/clients/cli/commands/theme.doc.mjs +1 -11
  148. package/clients/cli/commands/theme.mjs +110 -475
  149. package/clients/cli/commands.generated.json +1 -1
  150. package/clients/cli/index.mjs +4 -34
  151. package/clients/cli/lib/base-gate.mjs +2 -3
  152. package/clients/cli/lib/cli-error.mjs +8 -72
  153. package/clients/cli/lib/define-command.mjs +0 -19
  154. package/clients/cli/lib/json-shim.mjs +11 -633
  155. package/clients/cli/lib/manifest.mjs +0 -4
  156. package/clients/cli/lib/stray-option.mjs +1 -2
  157. package/clients/cli/manifest.generated.json +1 -1
  158. package/foundation/agent-docs/agent-docs.mjs +1 -1
  159. package/foundation/color/css-color.mjs +2 -3
  160. package/foundation/discovery/app-layout.d.mts +13 -0
  161. package/foundation/discovery/app-layout.mjs +35 -0
  162. package/foundation/discovery/cli-self-docs.mjs +4 -4
  163. package/foundation/discovery/fixture-refs.d.mts +51 -0
  164. package/foundation/discovery/fixture-refs.mjs +351 -0
  165. package/foundation/discovery/icon-definition-discovery.mjs +7 -7
  166. package/foundation/discovery/icon-ranking.mjs +2 -2
  167. package/foundation/discovery/icon-set-checks.mjs +6 -6
  168. package/foundation/discovery/icon-set-discovery.mjs +2 -2
  169. package/foundation/discovery/icon-set-writer.d.mts +24 -7
  170. package/foundation/discovery/icon-set-writer.mjs +75 -31
  171. package/foundation/discovery/static-descriptor.d.mts +49 -0
  172. package/foundation/discovery/static-descriptor.mjs +548 -0
  173. package/foundation/discovery/template-adapter.d.mts +0 -47
  174. package/foundation/discovery/template-adapter.mjs +1 -333
  175. package/foundation/discovery/theme-discovery.d.mts +6 -47
  176. package/foundation/discovery/theme-discovery.mjs +15 -537
  177. package/foundation/doc-compiler/bundle.mjs +2 -2
  178. package/foundation/doc-compiler/import.mjs +1 -1
  179. package/foundation/env/user-dirs.d.mts +5 -2
  180. package/foundation/env/user-dirs.mjs +12 -5
  181. package/foundation/fonts/next-font.d.mts +26 -0
  182. package/foundation/fonts/next-font.mjs +149 -0
  183. package/foundation/fs/empty-folder.mjs +2 -2
  184. package/foundation/fs/read-record.mjs +11 -4
  185. package/foundation/pictures/pictures.d.mts +152 -0
  186. package/foundation/pictures/pictures.mjs +565 -0
  187. package/foundation/release/folder-lock.mjs +3 -2
  188. package/foundation/render/cut-short.d.mts +2 -2
  189. package/foundation/render/cut-short.mjs +2 -2
  190. package/foundation/render/drawn-contrast.d.mts +2 -2
  191. package/foundation/render/drawn-contrast.mjs +2 -2
  192. package/foundation/render/font-probe.d.mts +2 -2
  193. package/foundation/render/font-probe.mjs +2 -2
  194. package/foundation/render/layers.mjs +1 -2
  195. package/foundation/render/package-resolve-hooks.d.mts +25 -5
  196. package/foundation/render/package-resolve-hooks.mjs +77 -14
  197. package/foundation/render/page-worker.mjs +24 -12
  198. package/foundation/render/part-boxes.d.mts +2 -3
  199. package/foundation/render/part-boxes.mjs +2 -3
  200. package/foundation/render/picture-chrome.mjs +18 -15
  201. package/foundation/render/picture-playwright.mjs +10 -7
  202. package/foundation/render/picture-window.d.mts +13 -0
  203. package/foundation/render/picture-window.mjs +31 -0
  204. package/foundation/render/render-page.d.mts +1 -1
  205. package/foundation/render/render-page.mjs +4 -5
  206. package/foundation/render/single-copy-hooks.d.mts +2 -0
  207. package/foundation/render/single-copy-hooks.mjs +2 -0
  208. package/foundation/response/error-codes.doc.mjs +14 -14
  209. package/foundation/response/error-codes.mjs +13 -13
  210. package/foundation/response/response-types.doc.mjs +8 -69
  211. package/foundation/runtime/css-tree.mjs +2 -2
  212. package/foundation/runtime/word-table.d.mts +1 -1
  213. package/foundation/runtime/word-table.mjs +1 -1
  214. package/foundation/suggest/other-command.d.mts +52 -15
  215. package/foundation/suggest/other-command.mjs +168 -45
  216. package/foundation/text/suggest-order.d.mts +7 -0
  217. package/foundation/text/suggest-order.mjs +1 -1
  218. package/package.json +7 -8
  219. package/api/theme-edit/_adapter.d.mts +0 -228
  220. package/api/theme-edit/_adapter.mjs +0 -2025
  221. package/api/theme-edit/_catalog.d.mts +0 -172
  222. package/api/theme-edit/_catalog.mjs +0 -806
  223. package/api/theme-edit/_check.d.mts +0 -391
  224. package/api/theme-edit/_check.mjs +0 -9370
  225. package/api/theme-edit/_color.d.mts +0 -135
  226. package/api/theme-edit/_color.mjs +0 -480
  227. package/api/theme-edit/_compiler.d.mts +0 -77
  228. package/api/theme-edit/_compiler.mjs +0 -1053
  229. package/api/theme-edit/_context.d.mts +0 -399
  230. package/api/theme-edit/_context.mjs +0 -1778
  231. package/api/theme-edit/_css.d.mts +0 -169
  232. package/api/theme-edit/_css.mjs +0 -1167
  233. package/api/theme-edit/_edit.d.mts +0 -167
  234. package/api/theme-edit/_edit.mjs +0 -11220
  235. package/api/theme-edit/_how-commands.d.mts +0 -315
  236. package/api/theme-edit/_how-commands.mjs +0 -1664
  237. package/api/theme-edit/_how-question.d.mts +0 -341
  238. package/api/theme-edit/_how-question.mjs +0 -33291
  239. package/api/theme-edit/_how-sides.d.mts +0 -22
  240. package/api/theme-edit/_how-sides.mjs +0 -173
  241. package/api/theme-edit/_how-steps.d.mts +0 -42
  242. package/api/theme-edit/_how-steps.mjs +0 -208
  243. package/api/theme-edit/_how-values.d.mts +0 -29
  244. package/api/theme-edit/_how-values.mjs +0 -111
  245. package/api/theme-edit/_how-words.d.mts +0 -15
  246. package/api/theme-edit/_how-words.mjs +0 -239
  247. package/api/theme-edit/_how.d.mts +0 -55
  248. package/api/theme-edit/_how.mjs +0 -2388
  249. package/api/theme-edit/_importers.d.mts +0 -38
  250. package/api/theme-edit/_importers.mjs +0 -188
  251. package/api/theme-edit/_marks.d.mts +0 -39
  252. package/api/theme-edit/_marks.mjs +0 -67
  253. package/api/theme-edit/_missed.d.mts +0 -56
  254. package/api/theme-edit/_missed.mjs +0 -1128
  255. package/api/theme-edit/_name-rule.d.mts +0 -11
  256. package/api/theme-edit/_name-rule.mjs +0 -12
  257. package/api/theme-edit/_normal.d.mts +0 -365
  258. package/api/theme-edit/_normal.mjs +0 -1978
  259. package/api/theme-edit/_overview.d.mts +0 -9
  260. package/api/theme-edit/_overview.mjs +0 -293
  261. package/api/theme-edit/_palette.d.mts +0 -616
  262. package/api/theme-edit/_palette.mjs +0 -2776
  263. package/api/theme-edit/_part-pieces.d.mts +0 -54
  264. package/api/theme-edit/_part-pieces.mjs +0 -179
  265. package/api/theme-edit/_part-words.d.mts +0 -39
  266. package/api/theme-edit/_part-words.mjs +0 -242
  267. package/api/theme-edit/_parts.d.mts +0 -402
  268. package/api/theme-edit/_parts.mjs +0 -2294
  269. package/api/theme-edit/_picture-traits.d.mts +0 -259
  270. package/api/theme-edit/_picture-traits.mjs +0 -1030
  271. package/api/theme-edit/_png.d.mts +0 -94
  272. package/api/theme-edit/_png.mjs +0 -479
  273. package/api/theme-edit/_preview-app.d.mts +0 -172
  274. package/api/theme-edit/_preview-app.mjs +0 -6430
  275. package/api/theme-edit/_preview.d.mts +0 -549
  276. package/api/theme-edit/_preview.mjs +0 -3264
  277. package/api/theme-edit/_project.d.mts +0 -207
  278. package/api/theme-edit/_project.mjs +0 -643
  279. package/api/theme-edit/_resolved.d.mts +0 -46
  280. package/api/theme-edit/_resolved.mjs +0 -800
  281. package/api/theme-edit/_set-line.d.mts +0 -29
  282. package/api/theme-edit/_set-line.mjs +0 -100
  283. package/api/theme-edit/_settings.d.mts +0 -2426
  284. package/api/theme-edit/_settings.mjs +0 -18435
  285. package/api/theme-edit/_tables.d.mts +0 -227
  286. package/api/theme-edit/_tables.mjs +0 -1128
  287. package/api/theme-edit/_text-looks.d.mts +0 -78
  288. package/api/theme-edit/_text-looks.mjs +0 -376
  289. package/api/theme-edit/_vet.d.mts +0 -50
  290. package/api/theme-edit/_vet.mjs +0 -166
  291. package/api/theme-edit/how/how.d.mts +0 -17
  292. package/api/theme-edit/how/how.mjs +0 -28
  293. package/api/theme-edit/new/new.d.mts +0 -11
  294. package/api/theme-edit/new/new.mjs +0 -22
  295. package/api/theme-edit/preview-add/preview-add.d.mts +0 -14
  296. package/api/theme-edit/preview-add/preview-add.mjs +0 -25
  297. package/api/theme-edit/preview-app/preview-app.d.mts +0 -13
  298. package/api/theme-edit/preview-app/preview-app.mjs +0 -24
  299. package/api/theme-edit/preview-list/preview-list.d.mts +0 -10
  300. package/api/theme-edit/preview-list/preview-list.mjs +0 -21
  301. package/api/theme-edit/preview-remove/preview-remove.d.mts +0 -12
  302. package/api/theme-edit/preview-remove/preview-remove.mjs +0 -23
  303. package/api/theme-edit/set/set.d.mts +0 -13
  304. package/api/theme-edit/set/set.mjs +0 -24
  305. package/api/theme-edit/show/show.d.mts +0 -13
  306. package/api/theme-edit/show/show.mjs +0 -24
  307. package/api/theme-edit/theme-edit.d.mts +0 -12
  308. package/api/theme-edit/theme-edit.mjs +0 -36
  309. package/api/theme-edit/theme-edit.type.d.mts +0 -730
  310. package/api/theme-edit/theme-edit.type.mjs +0 -342
  311. package/api/theme-edit/themeEditHow.doc.d.mts +0 -6
  312. package/api/theme-edit/themeEditHow.doc.mjs +0 -105
  313. package/api/theme-edit/themeEditNew.doc.d.mts +0 -5
  314. package/api/theme-edit/themeEditNew.doc.mjs +0 -112
  315. package/api/theme-edit/themeEditPreviewAdd.doc.d.mts +0 -6
  316. package/api/theme-edit/themeEditPreviewAdd.doc.mjs +0 -121
  317. package/api/theme-edit/themeEditPreviewApp.doc.d.mts +0 -6
  318. package/api/theme-edit/themeEditPreviewApp.doc.mjs +0 -87
  319. package/api/theme-edit/themeEditPreviewList.doc.d.mts +0 -6
  320. package/api/theme-edit/themeEditPreviewList.doc.mjs +0 -62
  321. package/api/theme-edit/themeEditPreviewRemove.doc.d.mts +0 -6
  322. package/api/theme-edit/themeEditPreviewRemove.doc.mjs +0 -96
  323. package/api/theme-edit/themeEditSet.doc.d.mts +0 -6
  324. package/api/theme-edit/themeEditSet.doc.mjs +0 -175
  325. package/api/theme-edit/themeEditShow.doc.d.mts +0 -6
  326. package/api/theme-edit/themeEditShow.doc.mjs +0 -118
  327. package/api/theme-edit/themeEditUndo.doc.d.mts +0 -6
  328. package/api/theme-edit/themeEditUndo.doc.mjs +0 -133
  329. package/api/theme-edit/undo/undo.d.mts +0 -13
  330. package/api/theme-edit/undo/undo.mjs +0 -24
  331. package/assets/preview-app/README.md +0 -6
  332. package/assets/preview-app/css.d.ts +0 -5
  333. package/assets/preview-app/gitignore +0 -4
  334. package/assets/preview-app/next.config.mjs +0 -12
  335. package/assets/preview-app/package.json +0 -24
  336. package/assets/preview-app/src/app/globals.css +0 -6
  337. package/assets/preview-app/src/app/layout.tsx +0 -21
  338. package/assets/preview-app/src/app/page.tsx +0 -94
  339. package/assets/preview-app/src/app/providers.tsx +0 -16
  340. package/assets/preview-app/tsconfig.json +0 -27
  341. package/clients/cli/commands/experimental/theme.mjs +0 -2990
  342. package/clients/cli/commands/experimental-theme-add.doc.mjs +0 -80
  343. package/clients/cli/commands/experimental-theme-compile.doc.mjs +0 -98
  344. package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +0 -196
  345. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +0 -174
  346. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +0 -139
  347. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +0 -77
  348. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +0 -105
  349. package/clients/cli/commands/experimental-theme-editor.doc.mjs +0 -49
  350. package/clients/cli/commands/experimental-theme-eject.doc.mjs +0 -72
  351. package/clients/cli/commands/experimental-theme-list.doc.mjs +0 -49
  352. package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +0 -88
  353. package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +0 -61
  354. package/clients/cli/commands/experimental-theme-preview-list.doc.mjs +0 -48
  355. package/clients/cli/commands/experimental-theme-preview-remove.doc.mjs +0 -59
  356. package/clients/cli/commands/experimental-theme-preview.doc.mjs +0 -41
  357. package/clients/cli/commands/experimental-theme-remove.doc.mjs +0 -57
  358. package/clients/cli/commands/experimental-theme-targets.doc.mjs +0 -62
  359. package/clients/cli/commands/experimental-theme-template.doc.mjs +0 -63
  360. package/clients/cli/commands/experimental-theme-use.doc.mjs +0 -57
  361. package/clients/cli/commands/experimental-theme.doc.mjs +0 -60
  362. package/foundation/fonts/fontsource-families.generated.d.mts +0 -5
  363. package/foundation/fonts/fontsource-families.generated.mjs +0 -2110
@@ -1,139 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file CommandDoc for `astryx experimental theme editor set`. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').CommandDoc} */
6
- export const doc = {
7
- type: 'command',
8
- name: 'experimental theme editor set',
9
- displayName: 'astryx experimental theme editor set',
10
- namespace: 'cli/commands',
11
- stability: 'experimental',
12
- summary:
13
- 'Change one thing in a theme: checked against what the components read, built, previewed',
14
- description:
15
- "Changes one thing. The thing is a dial (corners, spacing, accent, neutral, success, warning, danger, info, vibrancy, font, headings, surfaces, buttons, badges, type, text-size, base, mode: big moves with named rungs; `more`/`less` step a rung), a design token by name (--color-background-body; `how --list tokens`), or a CSS property on a part (background --on card; needs --on). Every change is CHECKED first against the installed Core: the part, the --when variant and value, the --state, the token's type (color, size, number, font, shadow; only colors may differ by mode; a shadow is one value for both), and whether the part, or a part inside it, actually reads the token for what you mean. A change that cannot take effect is REFUSED: exit 1, an error code, nothing written, and the suggestions lead with the command that works (the token the part really reads, or the property that sets it directly). A text size on a part whose text is drawn by elements inside it that each read a text size token goes into the token its main text reads, the largest (a top nav heading's title, not its supporting line), on that part; the setting is saved as typed and the result names the token. A text size said of a heading's title piece (`top-nav-heading-title` or `side-nav-heading-title`, also `-heading`) goes on that heading, the same way. A text size token said for a part that reads none, where the parts it holds read one size token (a tab list's tabs), goes into that one on the part; the setting is saved as typed and the result names the token. Groups: --on <group> (inputs, checks, containers, menus) styles every member; styling one member of an always-alike group (inputs, checks) styles the whole group unless --only (a height follows the control-height rule below). A height on a control (a button, an input, a selector, an input group, or a group of them) is every control's height at its size: it is written as that size's token (--size-element-sm, -md or -lg; the size --when names, md without one) on controls, and it replaces the other control heights at that size; with --only it stays on its one control; a height written as a size token must be a length (auto is refused there; a height for another variant or a state stays a plain height); a height on a part that is not a control (a text area, which sizes itself by its rows, or a complex selector) stays on that part. A control whose content is taller (a typeahead, a tokenizer) keeps its content's height, and a complex selector keeps its own. A control that grows with its content (a selector, a typeahead, a tokenizer) keeps Core's top and bottom padding, so a padding reaches it at its sides only and never makes it taller than the other controls. A file input's field does too; its drop zone (mode dropzone) pads itself, so a top or bottom padding set for the drop zone reaches it. A height or vertical padding on a bar (the app's header) reaches the one row of items drawn once across it (the top nav; never a menu's or side nav's items, a divider, a trigger or an avatar): the row fills the bar and gives up its own vertical padding, so its items sit in the middle; a value set on the row stays, and a part in the row taller than the bar is a problem with its fixing line. A row that sits in more than one bar takes the reach in every bar that holds it, and none when those bars leave it different heights (different heights, or the same height padded differently, as the app's header pads a safe area). A setting on a part beats a whole-theme dial, and a dial never overwrites one. After building, a plain part setting that a more specific base-theme rule would beat (such as a heading level) is repeated on those variant keys, and the result says so. The result lists resolved token changes, part styles written, contrast problems this theme caused versus its base (text below 4.5:1), notes (the shade a color's main token uses, any shade moved so text reads, and the generated color files; font loading: the exact install line when the font package is missing), and writes themes/<theme>/preview.html. Values with spaces go in quotes: gradients, several shadows, font stacks. Dials: corners square|small|medium|large|round|pill|more|less|<size>; spacing tight|compact|medium|roomy|spacious|more|less; accent, neutral, success, warning, danger, info <color> (a color: the editor generates its light and dark shades from the one color, with the same generator as `theme palette generate`, and points the color tokens at them; a token moves to a nearby shade when it must read: text at 4.5:1, the focus ring at 3:1; the whole theme only, no --on or --mode; `how colors` explains it and the Colors preview page shows every shade); vibrancy 0-100|more|less (how saturated the generated colors are; 50 is the default; needs a color); font <preset, open font, family or stack>; headings light|regular|medium|semibold|bold|heavy or tight|tighter|normal|wide; surfaces flat|outlined|raised|glass; buttons solid|outline|soft|caps; badges solid|soft|outline; type compact|standard|editorial|display; text-size small|medium|large|larger|more|less|<number of pixels, 10 to 32>; base <built-in theme>|none; mode both|light-only|dark-only. `astryx experimental theme editor how --list dials` explains each. An exact token always wins over the generated colors: `set <theme> --color-accent <color>` (with --on or --mode if you need them) is the escape hatch, whatever order the settings were made in. Experimental: it may change or be removed in a patch release.",
16
- fn: 'themeEditSet',
17
- args: [
18
- {
19
- name: 'theme',
20
- param: 'theme',
21
- required: true,
22
- },
23
- {
24
- name: 'thing',
25
- param: 'thing',
26
- required: true,
27
- },
28
- {
29
- name: 'value',
30
- param: 'value',
31
- required: false,
32
- variadic: true,
33
- },
34
- ],
35
- options: [
36
- {
37
- flag: '--on <where>',
38
- param: 'options.on',
39
- description:
40
- "Where it applies (default: the whole theme): a part (button, card, app-shell-header; how --list parts), a group (inputs, containers, checks, menus, or a family the census reads from each part's structure: button-like, overlays, option-rows, selected-items, accent-fills, inset-fields, status-surfaces, overlay-headers, controls; how --list groups), or for font a role (body, heading, code)",
41
- },
42
- {
43
- flag: '--when <prop:value>',
44
- param: 'options.when',
45
- description:
46
- 'Only that variant of the part, such as variant:primary or status:error, or one stripe of a table row, parity:odd or parity:even (the first body row is odd; how <part> lists them); give it once per prop for several at once (--when variant:ghost --when size:sm, or variant:ghost+size:sm); needs --on',
47
- },
48
- {
49
- flag: '--state <state>',
50
- param: 'options.state',
51
- description:
52
- 'Only that state of the part: hover, active, focus-visible, disabled, or a state the part lists (selected...); needs --on',
53
- },
54
- {
55
- flag: '--mode <mode>',
56
- param: 'options.mode',
57
- description:
58
- 'light or dark: only that color mode. Colors only; sizes, numbers, fonts and shadows are the same in both modes. A light-only or dark-only theme takes --mode for the other mode only, which applies where Core draws that mode (a toast, a lightbox); its own mode needs no --mode',
59
- },
60
- {
61
- flag: '--only',
62
- param: 'options.only',
63
- description:
64
- 'With one member of an always-alike group (inputs, checks), style just that part instead of the whole group',
65
- },
66
- {
67
- flag: '--png',
68
- param: 'options.png',
69
- description:
70
- "Also take PNG pictures of the previews (light and dark): preview.png, the sample page, and sheet-overlays.png, each control at rest, hovered, focused and pressed at its top, then every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds a picture of each family of components the theme sets a part of, or of the buttons when it sets none, and show --section <family> --png takes any other family; sheet.html, every component, is not pictured), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts (a browser that takes longer than 60 seconds, plus 20 seconds for each picture after the first, is stopped, and the result says so); without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet-overlays.png) is never written over: no picture is taken, and the result names the file. A change removes the pictures --png took of the look before it (the preview, the sheet and each section sheet, in each mode) and the result names them; a section sheet's page stays, marked as out of date",
71
- },
72
- ],
73
- examples: [
74
- {
75
- label: 'A big move with a dial',
76
- cli: 'astryx experimental theme editor set brand corners pill',
77
- },
78
- {
79
- label: 'Step a dial',
80
- cli: 'astryx experimental theme editor set brand spacing more',
81
- },
82
- {
83
- label: 'The brand color: its shades are generated, light and dark',
84
- cli: 'astryx experimental theme editor set brand accent "#7c3aed"',
85
- },
86
- {
87
- label: 'The gray of surfaces and text',
88
- cli: 'astryx experimental theme editor set brand neutral "#64748b"',
89
- },
90
- {
91
- label: 'How saturated the generated colors are',
92
- cli: 'astryx experimental theme editor set brand vibrancy 70',
93
- },
94
- {
95
- label: 'An exact accent that wins over the generated colors',
96
- cli: 'astryx experimental theme editor set brand --color-accent "#7c3aed"',
97
- },
98
- {
99
- label: 'A token, dark mode only',
100
- cli: 'astryx experimental theme editor set brand --color-text-primary "#e5e7eb" --mode dark',
101
- },
102
- {
103
- label: 'A CSS property on a part',
104
- cli: 'astryx experimental theme editor set brand background "linear-gradient(#f6d365, #fda085)" --on app-shell-header',
105
- },
106
- {
107
- label: 'One variant in one state',
108
- cli: 'astryx experimental theme editor set brand background-color "#f3e8ff" --on button --when variant:ghost --state hover',
109
- },
110
- {
111
- label:
112
- "Zebra rows: the odd rows of every data-driven table striped (in an isStriped table, also set the even rows transparent with --when parity:even --state striped to clear Core's own stripe)",
113
- cli: 'astryx experimental theme editor set brand background-color "#f9f9f9" --on table-row --when parity:odd',
114
- },
115
- {
116
- label: 'Every input',
117
- cli: 'astryx experimental theme editor set brand border "1px solid #9ca3af" --on inputs',
118
- },
119
- ],
120
- outsideProject: 'refuse',
121
- requires: ['themes.targets', 'themes.compile'],
122
- notes: [
123
- {
124
- type: 'prose',
125
- text: "In global mode: outside a project, with no package.json in the folder or above it, experimental theme editor set writes nothing and stops with `ERR_PROJECT_REQUIRED`; run it in the app project. In a project, the project's version of Astryx runs it, whichever astryx command you start. See {@link namespace:global} and {@link generic:problems}.",
126
- },
127
- ],
128
- exitCodes: [
129
- {
130
- code: 0,
131
- when: 'the change is written, built and previewed (notes and contrast problems included); or written but not checked, when the components could not be rendered: the output starts with [warn] saved, not checked (ERR_THEME_NOT_CHECKED) and the cause, such as two copies of React',
132
- },
133
- {
134
- code: 1,
135
- when: 'an unknown option, a refused change (an unknown part, variant, state, token or thing; a value of the wrong type; --mode on something that has no mode; a token the part never reads for that, unless it is a text size token and the parts it holds read one; corners on a part that shows no edge), a theme that does not exist, or a build failure, or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED); nothing is written',
136
- },
137
- ],
138
- related: ['experimental theme editor', 'experimental theme compile'],
139
- };
@@ -1,77 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file CommandDoc for `astryx experimental theme editor show`. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').CommandDoc} */
6
- export const doc = {
7
- type: 'command',
8
- name: 'experimental theme editor show',
9
- displayName: 'astryx experimental theme editor show',
10
- namespace: 'cli/commands',
11
- stability: 'experimental',
12
- summary:
13
- "Every setting, key values, problems the theme caused, and the theme-building page with every component; with --on, one part's resolved values for any theme",
14
- description:
15
- "With `--on` set to a part, a lookup that writes nothing: what one part of any theme the project builds shows, each property's final value with its tokens and who sets it. An editor theme is read from its saved settings: what its theme file adds by hand below them is not shown yet. Without it, lists every setting with where it applies and its source (dial, token or property), the resolved value of key tokens in each mode, the colors (the vibrancy; each color with its seed and the shade each token uses in light and dark, marked when an exact token setting wins; any shade moved so text reads), contrast problems this theme caused versus its base, font notes, and last the generated color files. Writes two self-contained HTML files: preview.html (the sample app page) and sheet.html (the theme-building page: every component grouped, each variant side by side, overlays open, and real template pages, with an auto/light/dark switch); a file of yours at a page's name (one without the editor's stamp, a link, a folder) is left alone, and the result names it. A theme with no build is built first, and an in-app preview (`preview add`) of the theme has its route and Colors page rewritten. --section limits the sheet to one section. An own change to <theme>.theme.ts since the last build is built first, and the colors mark where it wins over a generated shade; a theme source that no longer builds, or a token in it that is not text, is refused (ERR_THEME_INVALID, exit 1) and the folder stays as it was. Experimental: it may change or be removed in a patch release. The result ends with `wiring`: `astryx theme add <theme>` for the app copy of the theme (src/themes/<theme>/, a standard local theme every build writes), the `mode` of a one-mode theme for the `<Theme>`, and what builds it; only when a folder of yours holds src/themes/<theme>/ does it give the imports in the root file and the `<Theme>` by hand. When show builds the theme again (its build does not match the settings, say after a hand edit), the pictures --png took of the theme as it was are removed, and the result names them.",
16
- fn: 'themeEditShow',
17
- args: [
18
- {
19
- name: 'theme',
20
- param: 'theme',
21
- required: true,
22
- },
23
- ],
24
- options: [
25
- {
26
- flag: '--on <part>',
27
- param: 'options.on',
28
- description:
29
- "Only what one part shows, as a lookup that writes nothing: each CSS property the part reads, at rest and in each variant, with its final value (per mode when the modes differ), the declaration that gives it, the tokens it reads, and who decides it (`source`: core, the base theme it extends, or the theme's own file; which setting gives it is not shown yet). The theme may be any theme the project builds: an editor theme, a local theme or an installed theme package (a slug two packages provide is the one the app records). The text lists the part at rest and the first four variant values that differ from it, with how many there are; --json carries every value. An editor theme is read from its saved settings: what its theme file adds by hand below them is not shown yet.",
30
- },
31
- {
32
- flag: '--section <name>',
33
- param: 'options.section',
34
- description:
35
- 'Only one section of the sheet: actions, inputs, selection, navigation, feedback, data, containers, overlays, or pages',
36
- },
37
- {
38
- flag: '--png',
39
- param: 'options.png',
40
- description:
41
- "Also take PNG pictures of the previews (light and dark): preview.png, the sample page, and sheet-overlays.png, each control at rest, hovered, focused and pressed at its top, then every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds a picture of each family of components the theme sets a part of with --on, or of the buttons when it sets none: sheet-<family>.png, from the sheet-<family>.html it writes beside the full sheet; the families are actions, inputs, selection, navigation, feedback, data and containers, and a family taller than 1600px is cut between rows of parts into pictures of about that height (a row taller than that is a picture of its own), in order (sheet-<family>-1.png, -2 …), so each reads whole. With --section, that section's picture is taken in their place (the pages section, the sample app and each page template, is cut between pages the same way: sheet-pages-1.png, -2 …), so --section <family> --png pictures any other family. sheet.html, every component, is written but not pictured; the open states are taken with a section too), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts (a browser that takes longer than 60 seconds, plus 20 seconds for each picture after the first, is stopped, and the result says so); without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet-overlays.png) is never written over: no picture is taken, and the result names the file. Taking pictures changes nothing in the app, except that show first brings the app copy (src/themes/<theme>/) and an in-app preview up to date after a hand edit to <theme>.theme.ts",
42
- },
43
- ],
44
- examples: [
45
- {
46
- label: 'Everything',
47
- cli: 'astryx experimental theme editor show brand',
48
- },
49
- {
50
- label: 'With pictures',
51
- cli: 'astryx experimental theme editor show brand --png',
52
- },
53
- {
54
- label: "One part's resolved values, for any theme",
55
- cli: 'astryx experimental theme editor show neutral --on card',
56
- },
57
- ],
58
- outsideProject: 'refuse',
59
- requires: ['themes.compile'],
60
- notes: [
61
- {
62
- type: 'prose',
63
- text: "In global mode: outside a project, with no package.json in the folder or above it, experimental theme editor show writes nothing and stops with `ERR_PROJECT_REQUIRED`; run it in the app project. In a project, the project's version of Astryx runs it, whichever astryx command you start. See {@link namespace:global} and {@link generic:problems}.",
64
- },
65
- ],
66
- exitCodes: [
67
- {
68
- code: 0,
69
- when: "the settings are listed and both pages are written, or, with --on, the part's values are listed",
70
- },
71
- {
72
- code: 1,
73
- when: 'the theme does not exist or its base theme package is not installed (ERR_UNKNOWN_THEME), an unknown --section, an --on that names no part or a group, --on given two different parts, or --on with --png or --section (ERR_INVALID_ARGUMENT), with --on, a theme slug two packages provide that the app records none of (ERR_AMBIGUOUS_THEME; the suggestions add one to the app), a theme source that does not build or parse or a token in it that is not text (ERR_THEME_INVALID), a folder where a built file goes (ERR_FILE_EXISTS), a built file that cannot be read or written (ERR_WRITE_FAILED), another command changing the theme (ERR_THEME_BUSY), a page that does not render (ERR_RENDER_FAILED), or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED)',
74
- },
75
- ],
76
- related: ['experimental theme editor', 'experimental theme compile'],
77
- };
@@ -1,105 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file CommandDoc for `astryx experimental theme editor undo`. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').CommandDoc} */
6
- export const doc = {
7
- type: 'command',
8
- name: 'experimental theme editor undo',
9
- displayName: 'astryx experimental theme editor undo',
10
- namespace: 'cli/commands',
11
- stability: 'experimental',
12
- summary:
13
- 'Step back one change, or remove one setting; the result says what applies instead',
14
- description:
15
- "With only the theme, it steps back one change: the settings, the generated settings module and the build go back to how they were before the last change (your <theme>.theme.ts is not touched), and the preview is rewritten; the result names what was undone and how many earlier steps are left. When the settings file is damaged (not valid JSON), the step back restores the settings from before the last change without reading it. With a thing, it removes that one setting wherever it is in the settings, and the result says what applies now (`now`): the whole-theme setting for a part setting removed, or the base theme's value; the theme is rebuilt and previewed. Name the setting the way it was set: the same thing and the same --on, --when, --state, --mode and --only (`show` lists every setting that way). A value after the thing removes the setting only when that is its value; a value of several words may be typed unquoted, as set takes it. For the headings dial, name which half: weight or tracking; with no half named it removes the weight half, or the tracking half when that is the only one set. Removing a color (accent, neutral, success, warning, danger, info) stops generating it, and the tokens it fed go back to the base theme; with no color left, the generated color files the editor wrote are deleted; a palette.config.json you made, or one that holds a color of your own, stays. Removing vibrancy makes the colors again at the default, 50; removing the last color removes vibrancy too, as it needs a color. A setting the theme does not have is refused and the error lists the settings it has for that thing. `undo <theme> base` and `undo <theme> mode` go back to the base and mode the theme was made with; when they never changed, that is refused. The history keeps the last 80 steps (in <theme>.history.json); older steps are dropped. Experimental: it may change or be removed in a patch release.",
16
- fn: 'themeEditUndo',
17
- args: [
18
- {
19
- name: 'theme',
20
- param: 'theme',
21
- required: true,
22
- },
23
- {
24
- name: 'thing',
25
- param: 'options.thing',
26
- required: false,
27
- },
28
- {
29
- name: 'which',
30
- param: 'options.value',
31
- required: false,
32
- },
33
- ],
34
- options: [
35
- {
36
- flag: '--on <where>',
37
- param: 'options.on',
38
- description:
39
- "Where it applies (default: the whole theme): a part (button, card, app-shell-header; how --list parts), a group (inputs, containers, checks, menus, or a family the census reads from each part's structure: button-like, overlays, option-rows, selected-items, accent-fills, inset-fields, status-surfaces, overlay-headers, controls; how --list groups), or for font a role (body, heading, code)",
40
- },
41
- {
42
- flag: '--when <prop:value>',
43
- param: 'options.when',
44
- description:
45
- 'Only that variant of the part, such as variant:primary or status:error (how <part> lists them); give it once per prop for several at once (--when variant:ghost --when size:sm, or variant:ghost+size:sm); needs --on',
46
- },
47
- {
48
- flag: '--state <state>',
49
- param: 'options.state',
50
- description:
51
- 'Only that state of the part: hover, active, focus-visible, disabled, or a state the part lists (selected...); needs --on',
52
- },
53
- {
54
- flag: '--mode <mode>',
55
- param: 'options.mode',
56
- description:
57
- 'light or dark: only that color mode. Colors only; sizes, numbers, fonts and shadows are the same in both modes. In a light-only or dark-only theme, it removes a setting saved for the other mode (which applies where Core draws that mode)',
58
- },
59
- {
60
- flag: '--only',
61
- param: 'options.only',
62
- description:
63
- 'With one member of an always-alike group (inputs, checks), style just that part instead of the whole group',
64
- },
65
- {
66
- flag: '--png',
67
- param: 'options.png',
68
- description:
69
- "Also take PNG pictures of the previews (light and dark): preview.png, the sample page, and sheet-overlays.png, each control at rest, hovered, focused and pressed at its top, then every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds a picture of each family of components the theme sets a part of, or of the buttons when it sets none, and show --section <family> --png takes any other family; sheet.html, every component, is not pictured), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts (a browser that takes longer than 60 seconds, plus 20 seconds for each picture after the first, is stopped, and the result says so); without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet-overlays.png) is never written over: no picture is taken, and the result names the file. A change removes the pictures --png took of the look before it (the preview, the sheet and each section sheet, in each mode) and the result names them; a section sheet's page stays, marked as out of date",
70
- },
71
- ],
72
- examples: [
73
- {
74
- label: 'Step back',
75
- cli: 'astryx experimental theme editor undo brand',
76
- },
77
- {
78
- label: 'Remove a whole-theme dial',
79
- cli: 'astryx experimental theme editor undo brand corners',
80
- },
81
- {
82
- label: 'Remove a part setting',
83
- cli: 'astryx experimental theme editor undo brand background --on app-shell-header',
84
- },
85
- ],
86
- outsideProject: 'refuse',
87
- requires: ['themes.compile'],
88
- notes: [
89
- {
90
- type: 'prose',
91
- text: "In global mode: outside a project, with no package.json in the folder or above it, experimental theme editor undo writes nothing and stops with `ERR_PROJECT_REQUIRED`; run it in the app project. In a project, the project's version of Astryx runs it, whichever astryx command you start. See {@link namespace:global} and {@link generic:problems}.",
92
- },
93
- ],
94
- exitCodes: [
95
- {
96
- code: 0,
97
- when: 'the last change is undone, or the setting is removed',
98
- },
99
- {
100
- code: 1,
101
- when: 'an unknown option, there is no earlier change, the theme does not set the thing, or the theme does not exist; or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED)',
102
- },
103
- ],
104
- related: ['experimental theme editor', 'experimental theme editor show'],
105
- };
@@ -1,49 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file CommandDoc for the `astryx experimental theme editor` group: make and
5
- * change a theme one checked change at a time.
6
- */
7
-
8
- /** @type {import('@astryxdesign/cli/authoring').CommandDoc} */
9
- export const doc = {
10
- type: 'command',
11
- name: 'experimental theme editor',
12
- displayName: 'astryx experimental theme editor',
13
- namespace: 'cli/commands',
14
- stability: 'experimental',
15
- summary:
16
- 'Make and change a theme one checked change at a time (dials, tokens, part styles), with previews',
17
- description:
18
- "A type-safe compiler for themes. A theme lives in themes/<theme>/: <theme>.settings.json holds the checked settings and is owned by this command; <theme>.settings.ts is generated from it on every change; <theme>.theme.ts extends it, is written once and is yours to edit; <theme>.css and <theme>.js are built from it; build them again with `astryx experimental theme compile themes/<theme>/<theme>.theme.ts`, which checks the editor's settings first. Every build also writes the theme's app copy, src/themes/<theme>/: a standard local theme (descriptor, source, built module and stylesheets), never edited by hand, so `astryx theme add <theme>` puts the theme into the app and `theme use`, `remove` and `list` take it as they take any local theme. Your own files in that folder are left as they are and the copy is written around them; a file, folder or link of yours at one of the copy's names, a link on the way to it, or a folder that cannot be written stops it, and every set, undo, show and compile says so (`appCopyStale`), with `compile --check` failing while the copy is behind or gone. Every change is CHECKED against what the installed Core's components really read (derived from Core itself, version for version, and cached under node_modules/.cache/) and against the token's type; a change that cannot take effect is refused, nothing is written, and the error leads with the command that works. The thing you set is a dial (a big move with named rungs: corners, spacing, font, headings, text-size, base, mode; or a color: accent, neutral, success, warning, danger, info, each generating its light and dark shades from one color for the color tokens, and vibrancy, how saturated they are), a design token by name, or a CSS property on a part. Where it applies: --on <part|group>, --when <prop>:<value>, --state <state>, --mode light|dark, --only. Every accepted change rebuilds and writes preview.html (the sample app page); `show` adds the theme-building page with every component. PNG pictures only with --png. Commands on one theme run one after the other, through a lock in node_modules/.cache/astryx-theme/ of the project; when node_modules cannot be written (a read-only install), changes are refused and `show` still reads the last build. `how` answers everything else: what a part, group, setting or aspect does, how the colors are made, plain-words questions (with exact commands), a picture's colors, and lists of what you can set. Experimental: it may change or be removed in a patch release.",
19
- subcommands: ['new', 'set', 'undo', 'show', 'how'],
20
- examples: [
21
- {
22
- label: 'Start a theme',
23
- cli: 'astryx experimental theme editor new brand --like neutral',
24
- },
25
- {
26
- label: 'Round everything',
27
- cli: 'astryx experimental theme editor set brand corners pill',
28
- },
29
- {
30
- label: 'Ask how',
31
- cli: 'astryx experimental theme editor how "white text in the banner"',
32
- },
33
- {
34
- label: 'See it all',
35
- cli: 'astryx experimental theme editor show brand',
36
- },
37
- ],
38
- exitCodes: [
39
- {
40
- code: 0,
41
- when: 'help is shown or a subcommand succeeds',
42
- },
43
- {
44
- code: 1,
45
- when: 'an unknown subcommand, a refused change, or a subcommand failure',
46
- },
47
- ],
48
- related: ['experimental theme', 'theme build'],
49
- };
@@ -1,72 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file CommandDoc for `astryx experimental theme eject`: the experimental
5
- * copy of `astryx theme eject`, with the same function, flags and output.
6
- */
7
-
8
- /** @type {import('@astryxdesign/cli/authoring').CommandDoc} */
9
- export const doc = {
10
- type: 'command',
11
- name: 'experimental theme eject',
12
- displayName: 'astryx experimental theme eject',
13
- namespace: 'cli/commands',
14
- stability: 'experimental',
15
- summary: 'Fork a theme as editable local source',
16
- description:
17
- "Copies a bundled or installed package theme's complete source into the local themes root, including a local descriptor. Writes are atomic. Existing files require --overwrite. Eject never writes into a folder that holds another theme or a theme the theme editor made, even with --overwrite. A subfolder of a folder the theme editor made is written, and the CLI warns; to keep the editor folder to its own theme, fork into the default folder or a path outside it. When the fork imports packages the app lacks, the result names them with an install command. Use --package when package themes share a slug.",
18
- fn: 'themeEject',
19
- args: [
20
- {
21
- name: 'slug',
22
- param: 'slug',
23
- required: true,
24
- names: 'theme',
25
- },
26
- {
27
- name: 'path',
28
- param: 'options.targetPath',
29
- required: false,
30
- },
31
- ],
32
- options: [
33
- {
34
- flag: '-f, --overwrite',
35
- param: 'options.overwrite',
36
- description:
37
- 'Replace the existing files of an earlier fork of the same theme. Without it, an existing file fails with ERR_FILE_EXISTS and nothing is written',
38
- },
39
- {
40
- flag: '--package <package>',
41
- param: 'options.package',
42
- description: 'Select the package that owns the theme',
43
- },
44
- ],
45
- examples: [
46
- {
47
- label: 'Fork a theme into the local root',
48
- cli: 'astryx experimental theme eject ocean',
49
- },
50
- {
51
- label: 'Fork one package theme elsewhere',
52
- cli: 'astryx experimental theme eject ocean src/themes/my-ocean --package @acme/themes',
53
- },
54
- ],
55
- outsideProject: 'same',
56
- exitCodes: [
57
- {
58
- code: 0,
59
- when: 'all source and descriptor files are written',
60
- },
61
- {
62
- code: 1,
63
- when: 'the theme is unknown or ambiguous, a path escapes, a source file is missing, a destination exists, or the folder holds another theme',
64
- },
65
- ],
66
- related: [
67
- 'experimental theme add',
68
- 'experimental theme compile',
69
- 'experimental theme list',
70
- ],
71
- replaces: ['theme eject'],
72
- };
@@ -1,49 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file CommandDoc for `astryx experimental theme list`: the experimental
5
- * copy of `astryx theme list`, with the same function, flags and output.
6
- */
7
-
8
- /** @type {import('@astryxdesign/cli/authoring').CommandDoc} */
9
- export const doc = {
10
- type: 'command',
11
- name: 'experimental theme list',
12
- displayName: 'astryx experimental theme list',
13
- namespace: 'cli/commands',
14
- stability: 'experimental',
15
- summary: 'List themes available to add',
16
- description:
17
- 'Lists bundled, package, and local themes with their owner, source, added state, and default state. Earlier descriptor-less copies are not listed as themes; the receipt names them with the upgrade command.',
18
- fn: 'themeListAvailable',
19
- options: [
20
- {
21
- flag: '--package <package>',
22
- param: 'options.package',
23
- description: 'Show only themes owned by this package',
24
- },
25
- ],
26
- examples: [
27
- {
28
- label: 'List available themes',
29
- cli: 'astryx experimental theme list --json',
30
- },
31
- {
32
- label: 'List one integration package',
33
- cli: 'astryx experimental theme list --package @acme/themes',
34
- },
35
- ],
36
- outsideProject: 'same',
37
- exitCodes: [
38
- {
39
- code: 0,
40
- when: 'success',
41
- },
42
- {
43
- code: 1,
44
- when: 'a bundled or installed theme descriptor cannot be read',
45
- },
46
- ],
47
- related: ['experimental theme add', 'experimental theme compile'],
48
- replaces: ['theme list'],
49
- };
@@ -1,88 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file CommandDoc for `astryx experimental theme preview add`. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').CommandDoc} */
6
- export const doc = {
7
- type: 'command',
8
- name: 'experimental theme preview add',
9
- displayName: 'astryx experimental theme preview add',
10
- namespace: 'cli/commands',
11
- stability: 'experimental',
12
- summary:
13
- 'Add pages to the theme preview in the app: the default pages, the best template pages for a description, or one template',
14
- description:
15
- "Writes the theme preview into the app: one route, a normal page of the app that keeps its layout, global CSS and providers, in an app shell with a side nav item per preview page and a top bar with the theme name and, when it wears a theme made by `editor`, a light, dark and system switch. A description (\"a sales dashboard\") asks the same page ranking `build` uses for the template pages that fit it best (--top of them, default 1), and adds each as a page, saying in `matched` what it picked and why (the words of the description it covers). App frames (the Shell templates) are left out, since the preview is an app shell already. When no page is exactly the one described, the closest is added and `matched` says the rest of the description is not on it; only a description no page relates to is refused, writing nothing and naming the closest pages to add with --template, with the other options repeated. A page the app cannot show (a missing package, or StyleX without a compiler) is skipped and the next match is taken (from the ranking, then the template search), and the result says so. A page's nav label is its template's display name, however it was added; --template names one page template instead; with neither, it adds the default pages: Overview (the theme at a glance, built to show what themes most often break: long and short text, every text level on every surface, every button variant and size with disabled and loading, inputs in their states, selected navigation, status colors, a table, open layers), Components (every component grouped, each with the command that changes it most) and, when the theme sets a color, Colors (each color's shades in light and dark, with the shade number, the hex and the tokens that use each; it reads the theme's generated colors, so it changes with every `editor set`). The route goes in theme-preview/ in the app's routes folder (app/ or src/app/), or in --path; the first add records the pages and the files it wrote in theme-preview.json beside the route, so later calls find it. With no routes folder and no --path, it refuses and names both ways on: --path, or `experimental theme preview app <dir>`, which makes a new starter app with the preview in it. The route fills the whole window with the theme, shell and edges included. Every check (the theme, the template, the ranking and every file it writes) runs before the first write, so a refusal changes nothing. A template page that imports a package the app lacks, or that uses StyleX in an app with no StyleX compiler, is not added: the result names it and the command that installs what it needs. A file the preview did not write is never replaced. The pages wear --theme (default: the only theme under themes/; with none or several, the app's own theme). The pages go in _pages/ beside the route, a folder Next never serves as a route; a preview an older release wrote into pages/ is moved there. theme-preview.json records a hash of each file the preview writes: a file changed by hand since is never replaced (the refusal names it), and a page file that already holds exactly the planned text is taken over. The files are staged and renamed into place together; when a write fails, every file is put back as it was. A damaged theme-preview.json is refused with `ERR_THEME_INVALID`, naming the file. The folder is refused when it is a file, in themes/, node_modules/ or Next's build folder (.next/, out/ or the distDir next.config names), in a Pages Router folder (pages/ or src/pages/), in a folder Next does not route (_private, @slot, [param]), or written with Windows separators, a leading ~ or white space at either end. With no --path and no preview in the default place, a preview recorded for a theme is used; with several, the refusal names each. A theme the preview wore that is gone is replaced by the app's own theme, with a note; a changed theme writes the default pages again. A template page whose package the app's package.json names but nobody installed is skipped like a missing one. Only the first 40 different words of a long description go to the ranking, with a note. The description may be several words without quotes. The project root, src/ and the routes folder itself are refused too: they hold the app. An older preview found there is named, with the remove that clears it. A recorded page whose file is gone is written again (a default page, or the template its id names), or else left out of the nav, with a note. A formatter run (white space, quotes, semicolons, commas) does not count as a change by hand. Refusals never suggest deleting files: they say what to move or rename. Preview commands in one project run one after another. The folder is also refused when it holds a package.json, when another page or route handler of the app already serves its URL (in the folder itself, a route group or the Pages Router), when next.config sets pageExtensions without tsx, when it is in src/app/ while app/ is what Next serves, and when no root layout is above it (an app with its root layout in [locale]/ gets its preview there, opened at /<locale>/theme-preview; an app with a root layout in each route group takes the preview under any of them). A template's needs come from its real import statements, never words in comments or strings; a package the app does not name gets the command that adds it. A theme with no build is built only after every check passed, holding that theme's lock, with a note. An edit inside a string counts as a change by hand; a formatter run does not. Experimental: it may change or be removed in a patch release.",
16
- fn: 'themeEditPreviewAdd',
17
- args: [
18
- {
19
- name: 'description',
20
- param: 'description',
21
- required: false,
22
- variadic: true,
23
- },
24
- ],
25
- options: [
26
- {
27
- flag: '--theme <name>',
28
- param: 'options.theme',
29
- description:
30
- "The theme the pages wear: a theme made by experimental theme editor (default: the only one under themes/; with none or several, the app's own theme)",
31
- },
32
- {
33
- flag: '--template <id>',
34
- param: 'options.template',
35
- description:
36
- 'Add this page template (astryx template --list --type page) instead of ranking one from a description. A default page (overview, components, colors) adds just that page back when it is missing',
37
- },
38
- {
39
- flag: '--top <n>',
40
- param: 'options.top',
41
- description:
42
- 'With a description: how many of the best-fitting page templates to add, 1 to 3 (default 1)',
43
- },
44
- {
45
- flag: '--path <dir>',
46
- param: 'options.path',
47
- description:
48
- "The folder of the preview route, inside the project. Default: theme-preview/ in the app's routes folder (app/ or src/app/); later commands find it there, or take the same --path",
49
- },
50
- ],
51
- examples: [
52
- {
53
- label: 'The default pages',
54
- cli: 'astryx experimental theme preview add',
55
- },
56
- {
57
- label: 'The best page for an idea',
58
- cli: 'astryx experimental theme preview add "a sales dashboard" --top 2',
59
- },
60
- {
61
- label: 'One template',
62
- cli: 'astryx experimental theme preview add --template dashboard',
63
- },
64
- ],
65
- outsideProject: 'refuse',
66
- requires: ['themes.appModule'],
67
- notes: [
68
- {
69
- type: 'prose',
70
- text: "In global mode: outside a project, with no package.json in the folder or above it, experimental theme preview add writes nothing and stops with `ERR_PROJECT_REQUIRED`; run it in the app project, or make a new app with `experimental theme preview app <dir>`. In a project, the project's version of Astryx runs it, whichever astryx command you start. See {@link namespace:global} and {@link generic:problems}.",
71
- },
72
- ],
73
- exitCodes: [
74
- {
75
- code: 0,
76
- when: 'the pages are added',
77
- },
78
- {
79
- code: 1,
80
- when: 'outside a project, no routes folder and no --path, a --path that is no place for the preview, a file there that the preview did not write or that was changed by hand, a path outside the project, a damaged theme-preview.json, an unknown theme or template, an empty --template, no template page whose packages the app has, a bad --top, a failed write, or another preview command that did not finish within 30 seconds (ERR_THEME_BUSY)',
81
- },
82
- ],
83
- related: [
84
- 'experimental theme preview',
85
- 'experimental theme preview app',
86
- 'experimental theme editor show',
87
- ],
88
- };