@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,80 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file CommandDoc for `astryx experimental theme add`: the experimental
5
- * copy of `astryx theme add`, 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 add',
12
- displayName: 'astryx experimental theme add',
13
- namespace: 'cli/commands',
14
- stability: 'experimental',
15
- summary:
16
- "Add a built theme to the app. To copy a theme's source as an editable fork, run `experimental theme eject <slug> [path] [--overwrite]`.",
17
- description:
18
- "Records the theme in the generated app module and imports its built module and stylesheets. --import remains accepted as a compatibility no-op. To copy a theme's source as an editable fork, run `experimental theme eject <slug> [path] [--overwrite]`. A bare command or --list delegates to themeListCopySources(), whose released JSON bytes stay unchanged while its text names the current add and eject commands; use --package when owners share a slug. Outside a project, a bare command or --list lists the available themes as in a new project; given a slug it writes nothing and fails, naming the app project it needs (ERR_THEME_INVALID), or with ERR_UNKNOWN_THEME when no theme has that slug. Given a shared theme instead of a slug (a path to its folder, a .tgz archive of it, or an https URL to a .tgz), it copies that theme into src/themes/<name>, installs the Astryx packages it imports that the app lacks, and records it as the default, as `theme add` does; `experimental theme remove` undoes it.",
19
- fn: 'themeAdd',
20
- args: [
21
- {
22
- name: 'slug',
23
- param: 'slug',
24
- required: false,
25
- names: 'theme',
26
- },
27
- ],
28
- options: [
29
- {
30
- flag: '--list',
31
- description: 'List available themes',
32
- },
33
- {
34
- flag: '--import',
35
- param: 'options.import',
36
- description:
37
- 'Compatibility no-op; the built theme is added with or without this flag',
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: 'Add a built theme to the app',
48
- cli: 'astryx experimental theme add ocean',
49
- },
50
- {
51
- label: 'Select a package theme over a local theme',
52
- cli: 'astryx experimental theme add ocean --package @acme/themes',
53
- },
54
- ],
55
- outsideProject: 'own',
56
- requires: ['themes.appModule'],
57
- exitCodes: [
58
- {
59
- code: 0,
60
- when: 'the theme is listed or added',
61
- },
62
- {
63
- code: 1,
64
- when: 'the theme, its built imports, its record, or the option combination is invalid',
65
- },
66
- ],
67
- related: [
68
- 'experimental theme list',
69
- 'experimental theme remove',
70
- 'experimental theme use',
71
- 'experimental theme eject',
72
- ],
73
- notes: [
74
- {
75
- type: 'prose',
76
- text: 'In global mode: outside a project, experimental theme add with no slug lists the themes available, as in a new project; with a slug it writes nothing and stops with `ERR_THEME_INVALID`: "No package.json found. Run this command inside an 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}.',
77
- },
78
- ],
79
- replaces: ['theme add'],
80
- };
@@ -1,98 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /**
4
- * @file CommandDoc for `astryx experimental theme compile`: the experimental
5
- * copy of `astryx theme build`, 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 compile',
12
- displayName: 'astryx experimental theme compile',
13
- namespace: 'cli/commands',
14
- stability: 'experimental',
15
- summary: 'Compile standalone themes or one keyed theme family',
16
- description:
17
- "Compiles defineTheme() sources through the same theme pipeline into scoped CSS, standard ESM, and type declarations. Compiling a theme made by experimental theme editor (themes/<theme>/<theme>.theme.ts) takes that theme's lock and also writes its app copy in src/themes/<theme>/ again; --check fails while that copy is behind or gone. The app copy's own files (src/themes/<theme>/<theme>Theme.ts and the rest) are not compiled: compile the theme itself. With --out somewhere else, compile builds and --check checks only the files --out names: themes/<theme>/ and the app copy are not written or checked, and the result says so (appCopySkipped). The result also says what the copy write did: appCopy names the files of its first write, and appCopyStale says what kept it back. An --out in the theme's own folder, other than its default stylesheet, is refused, as one in the app copy is. Ordinary mode writes one complete set per theme. --family combines one selected extension tree into the three files named by the required --family-key, ready for one CSS load and identity-only switching. With --check it writes nothing and reports source drift. --icons-specifier keeps its existing generated-module behavior. It prints one line per built theme and one line naming fonts the themes do not load; --detail full adds the install example and the font recipe, once for a batch.",
18
- fn: 'themeBuild',
19
- args: [
20
- {
21
- name: 'files',
22
- param: 'file',
23
- required: true,
24
- variadic: true,
25
- },
26
- ],
27
- options: [
28
- {
29
- flag: '--family',
30
- description:
31
- 'Build the selected extension family into one keyed CSS, JS, and declaration set, written beside the family root theme file, which must be inside the working directory to build (ERR_PATH_TRAVERSAL); --check only reads, so it compares outputs anywhere. Requires --family-key; refused with --out or --watch (ERR_THEME_INVALID)',
32
- },
33
- {
34
- flag: '--family-key <key>',
35
- description:
36
- 'Lower-kebab filename stem required with --family and refused without it; must differ from every member name (ERR_THEME_INVALID)',
37
- },
38
- {
39
- flag: '-o, --out <path>',
40
- param: 'options.out',
41
- description:
42
- "Output CSS file path, relative or absolute; the .js and .d.ts are written beside it (default: <theme name>.css next to the source). A folder, or a path ending in /, writes <theme name>.css into it. The path should end in .css: a TypeScript declaration file (.d.ts) or a stylesheet source map (.css.map) is refused with the .css path to give (ERR_INVALID_ARGUMENT), and nothing is written; any other name still builds, with a warning naming the .css path meant. A build never replaces the theme source (ERR_THEME_INVALID). Beside the source and at a path --out names, it replaces its own earlier outputs (beside the source, those of the CLI before it was named Astryx too), and the output of another theme source with a warning that names both sources; any other existing file, such as your own brand.css beside brand.ts, fails with ERR_FILE_EXISTS naming it, and nothing is written: build with --out, or move or rename the file. Into a folder the theme editor made (folder <slug>/ holds <slug>.settings.json), a source outside that folder builds there too, with a warning; to keep the editor folder to its own theme, build beside the source, or pass an --out outside it. A build writes only inside the working directory, the defaults beside the source too (ERR_PATH_TRAVERSAL); --check writes nothing, so it compares outputs anywhere and refuses only a relative path that escapes the working directory. Single theme only: refused with more than one file or with --family (ERR_THEME_INVALID) An --out in an editor theme's app copy folder (src/themes/<theme>/, the folder itself too) is refused (ERR_INVALID_ARGUMENT): the editor writes that folder after every build",
43
- },
44
- {
45
- flag: '--icons-specifier <specifier>',
46
- param: 'options.iconsSpecifier',
47
- description:
48
- "Override the icon-registry import in the generated JS module, for example ./icons.mjs; the build then does not compile the registry (default: a TypeScript or JSX registry's compiled copy in <name>.modules/, or a plain JavaScript registry's own path). With --family it applies to every member's icon import",
49
- },
50
- {
51
- flag: '-w, --watch',
52
- description:
53
- 'Rebuild automatically when the theme source, or a local file it imports, changes (Ctrl-C to stop). Refused with --check, --family, or --json (ERR_THEME_INVALID)',
54
- },
55
- {
56
- flag: '-c, --check',
57
- param: 'options.check',
58
- description:
59
- 'Verify the committed outputs match the source without writing; exit non-zero if stale. Composes with --family and several files; refused with --watch (ERR_THEME_INVALID)',
60
- },
61
- ],
62
- examples: [
63
- {
64
- label: 'Build to a CSS file',
65
- cli: 'astryx experimental theme compile ./src/themes/ocean.ts --out ./dist/ocean.css',
66
- },
67
- {
68
- label: 'Build one related family for attribute-only switching',
69
- cli: 'astryx experimental theme compile --family ./themes/ocean.mjs ./themes/ocean-calm.mjs --family-key ocean-family',
70
- },
71
- {
72
- label: 'Build every theme in a directory',
73
- cli: 'astryx experimental theme compile ./src/themes/*.ts',
74
- },
75
- {
76
- label: 'Check for drift (CI)',
77
- cli: 'astryx experimental theme compile ./src/themes/ocean.ts --check',
78
- },
79
- {
80
- label: 'Build against a separately compiled icon registry',
81
- cli: 'astryx experimental theme compile ./src/themes/ocean.ts --icons-specifier ./icons.mjs',
82
- },
83
- ],
84
- outsideProject: 'same',
85
- requires: ['themes.compile'],
86
- exitCodes: [
87
- {
88
- code: 0,
89
- when: 'the theme builds, or --check finds the outputs up to date',
90
- },
91
- {
92
- code: 1,
93
- when: "a build or validation error (an error envelope), or --check finds stale or missing outputs (the check result, with upToDate false, the stale files and code ERR_THEME_STALE, is still printed: it is a result, not an error). One exception: an editor theme whose settings changed after its build is refused (ERR_THEME_INVALID, an error envelope) before any file is checked, with `editor show <theme>` to build it again. An editor theme run from a folder other than its app root is refused (ERR_INVALID_ARGUMENT) with the `cd` to the root and the same command; `--family` does not take an editor theme (ERR_INVALID_ARGUMENT); its damaged or unbuildable settings are refused (ERR_THEME_INVALID). An editor theme's compile also writes its app copy in src/themes/<theme>/ from what it just built (its font stylesheet from the fonts the theme loads now), and --check also compares that copy once the theme's outputs are current: a copy that is kept back, missing a file or not the current build fails the check with the same check result (upToDate false, code ERR_THEME_STALE) and appCopyStale naming why. The copy's own files, its source included, are not compile targets (ERR_INVALID_ARGUMENT, naming the theme to compile). With --out outside the theme's folder neither themes/<theme>/ nor the copy is written or checked, and the result says so in appCopySkipped; an --out in the theme's own folder, other than its default stylesheet, is refused (ERR_INVALID_ARGUMENT)",
94
- },
95
- ],
96
- related: ['experimental theme add', 'experimental theme list'],
97
- replaces: ['theme build'],
98
- };
@@ -1,196 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file CommandDoc for `astryx experimental theme editor how`. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').CommandDoc} */
6
- export const doc = {
7
- type: 'command',
8
- name: 'experimental theme editor how',
9
- displayName: 'astryx experimental theme editor how',
10
- namespace: 'cli/commands',
11
- stability: 'experimental',
12
- summary:
13
- "Look up a part, group, setting or aspect; answer a question in plain words; read a picture's colors and look; or list what you can set",
14
- description:
15
- 'One command for every question. With nothing named, it prints its usage and examples. A part (button, card; --list parts): what it reads for each aspect (text, background, border, corners, shadow, spacing, font, size), each condition written as the --when and --state flags `set` takes or marked not settable with the reason, its variants, every state `set` accepts, the parts inside it (a token set --on the part reaches them), and its group; a part the part data does not have says so, with commands that still apply. A group (inputs, containers, checks, menus): its members and whether styling one styles all. A setting: a dial\'s rungs and examples, a token\'s type, default and the parts that read it (and, when none does, whether Core\'s stylesheet still uses it), or a CSS property and the parts that set it. An aspect (text, background, border, corners, shadow, spacing, font, size): the dial and the whole-theme tokens most parts read for it. `colors` (or `palette`): how the theme\'s colors are made: one seed per color, light and dark shades generated with the same generator as `theme palette generate`, the shade each token starts from, vibrancy, the Colors preview page and the exact-token escape hatch. A lookup takes any case, a plural, and a token name without its dashes. A question in plain words ("bold white text in the header", "remove shadows from cards", "cards: 8px radius; buttons: 4px"): it reads each clause for the parts (and their variant, size, state or mode), what to change, the values typed (hex, rgb(), lengths, dashed), and whether it asks for more, less or none ("shouldn\'t", "turn off", "never", "too sharp", "everything except X" included), and answers with exact commands; a typed value always wins over a color word, and a hex color with the wrong number of digits is refused by name, never replaced with a sample. "In dark mode" carries --mode dark to every color command; a change that cannot differ by mode, or a dark-mode ask on a light-only theme, says so instead. A question about what something is ("what does --color-accent do") gets the lookup. Several changes in one question come first as one sequence (`sequence: true`: run every command in order, at most 12), with repeated and overwritten steps left out; two asks that contradict each other are offered as choices. Changes come before lookups. A result with `offer: true` is more than the ask (a colored variant changed too): it follows every other result and is never the answer itself, so running the first result\'s commands never runs one; where what the ask writes is in place already, the first result says so with no command. Every suggested command names the theme (`theme`: the one named with `theme`, the only one, or the one an editor command changed last, said in `themeNote`; `themeChosenBy` says which: named, only, last-changed or none; with none, my-theme, made first), holds a real value, never a placeholder or a comment, and is checked as `set` checks it: a command `set` would refuse, or that changes nothing, is left out and listed in `refused` with the reason. A question with no answer says why in `hint`, with the next commands in `run`, the first of them this help, whose examples labeled "Asks how understands" list the kinds of ask it answers. A PNG picture (by any file name; other formats are refused by their bytes): its main colors from every pixel (on an even grid past 4 million), biggest share first, with where each sits, see-through pixels skipped, tRNS included (a number after the file sets how many, default 14), and the look\'s traits measured from its pixels (control height, the checks\' box, corners, edge width, how panels sit, the accent fill, line spacing), each written as the line that sets it where enough boxes agree and otherwise listed as unsure, with the settings that would make it where one exists, or with --at the exact color and alpha at pixel points; a picture over 40 million pixels (20 million at 16 bits), or with pixel data that is damaged or shorter than its header says, is refused before it is decoded. --list <what> lists what a change can name (dials, tokens, parts, groups or properties, in any case, singular or plural; kinds or no word lists those kinds), and the other words filter the list. Experimental: it may change or be removed in a patch release.',
16
- fn: 'themeEditHow',
17
- args: [
18
- {
19
- name: 'subject',
20
- param: 'subject',
21
- required: false,
22
- variadic: true,
23
- },
24
- ],
25
- options: [
26
- {
27
- flag: '--list',
28
- param: 'options.list',
29
- description:
30
- 'List what a change can name; the word that names a kind says what, wherever it is (any case, singular or plural): dials, tokens (with type, default and how many parts read each), parts (one item per name, with its components, group, variants and states), groups, or properties (the common CSS properties; a filter searches every standard one). The other words filter the list, and may start with --. --list=tokens works too. With no word, or kinds, the kinds it lists',
31
- },
32
- {
33
- flag: '--theme <name>',
34
- param: 'options.theme',
35
- description:
36
- 'The theme the suggested commands are for, checked against its settings (default: the only theme the editor made in the app; with several, the one an editor command changed last; with none, a theme named my-theme that the answer makes first). An empty name or --theme given twice is refused, for every subject',
37
- },
38
- {
39
- flag: '--at <points...>',
40
- param: 'options.at',
41
- description:
42
- 'With a PNG picture: the exact color and alpha at pixel points x,y (whole numbers inside the picture), given as "40,20;300,180", "40,20 300,180", a repeated --at, or a flat "40,20,300,180"',
43
- },
44
- ],
45
- examples: [
46
- {
47
- label: 'A part',
48
- cli: 'astryx experimental theme editor how banner',
49
- },
50
- {
51
- label: 'A question',
52
- cli: 'astryx experimental theme editor how "bold white text in the header"',
53
- },
54
- {
55
- label: 'A question, with commands for one theme',
56
- cli: 'astryx experimental theme editor how "remove shadows from cards" --theme brand',
57
- },
58
- {
59
- label: 'A setting',
60
- cli: 'astryx experimental theme editor how --color-accent',
61
- },
62
- {
63
- label: 'Colors in a picture',
64
- cli: 'astryx experimental theme editor how target.png --at "40,20;300,180"',
65
- },
66
- {
67
- label: 'How the colors are made',
68
- cli: 'astryx experimental theme editor how colors',
69
- },
70
- {
71
- label: 'A color question in plain words',
72
- cli: 'astryx experimental theme editor how "make it more colorful"',
73
- },
74
- {
75
- label: 'Every dial',
76
- cli: 'astryx experimental theme editor how --list dials',
77
- },
78
- {
79
- label: 'Accent tokens',
80
- cli: 'astryx experimental theme editor how accent --list tokens',
81
- },
82
- {
83
- label: 'Asks how understands: change a dial',
84
- cli: 'astryx experimental theme editor how "make everything more compact"',
85
- },
86
- {
87
- label: 'Asks how understands: change a dial',
88
- cli: 'astryx experimental theme editor how "make it more colorful"',
89
- },
90
- {
91
- label: "Asks how understands: a part's property, by an amount or a value",
92
- cli: 'astryx experimental theme editor how "card padding 2 steps more"',
93
- },
94
- {
95
- label: "Asks how understands: a part's property, by an amount or a value",
96
- cli: 'astryx experimental theme editor how "card padding 24x24px"',
97
- },
98
- {
99
- label: 'Asks how understands: a direction, with or without a reference',
100
- cli: 'astryx experimental theme editor how "make the card background lighter"',
101
- },
102
- {
103
- label: 'Asks how understands: a direction, with or without a reference',
104
- cli: 'astryx experimental theme editor how "make the card padding bigger than 24px"',
105
- },
106
- {
107
- label: 'Asks how understands: comparisons with another part',
108
- cli: 'astryx experimental theme editor how "make primary buttons as round as cards"',
109
- },
110
- {
111
- label: 'Asks how understands: comparisons with another part',
112
- cli: 'astryx experimental theme editor how "make cards 4px rounder than buttons"',
113
- },
114
- {
115
- label:
116
- 'Asks how understands: everything except some parts, or keeping a part',
117
- cli: 'astryx experimental theme editor how "make everything rounder except buttons and cards"',
118
- },
119
- {
120
- label:
121
- 'Asks how understands: everything except some parts, or keeping a part',
122
- cli: 'astryx experimental theme editor how "make everything rounder but keep cards as they are"',
123
- },
124
- {
125
- label: 'Asks how understands: prohibitions',
126
- cli: 'astryx experimental theme editor how "make everything rounder; never round the inputs"',
127
- },
128
- {
129
- label: 'Asks how understands: prohibitions',
130
- cli: 'astryx experimental theme editor how "never use pure black for text"',
131
- },
132
- {
133
- label: 'Asks how understands: one mode',
134
- cli: 'astryx experimental theme editor how "make shadows darker in dark mode"',
135
- },
136
- {
137
- label: 'Asks how understands: one mode',
138
- cli: 'astryx experimental theme editor how "in dark mode, cards should be #1c1c1e"',
139
- },
140
- {
141
- label: 'Asks how understands: removals',
142
- cli: 'astryx experimental theme editor how "no shadow and no border on dialogs"',
143
- },
144
- {
145
- label: 'Asks how understands: removals',
146
- cli: 'astryx experimental theme editor how "remove the card background"',
147
- },
148
- {
149
- label: "Asks how understands: a part's own piece taken away",
150
- cli: 'astryx experimental theme editor how "hide the code block copy button"',
151
- },
152
- {
153
- label: 'Asks how understands: one variant made to look like another',
154
- cli: 'astryx experimental theme editor how "ghost buttons look like the default button"',
155
- },
156
- {
157
- label: 'Asks how understands: several changes in one ask',
158
- cli: 'astryx experimental theme editor how "cards: 8px radius; buttons: 4px"',
159
- },
160
- {
161
- label: 'Asks how understands: several changes in one ask',
162
- cli: 'astryx experimental theme editor how "rounder cards without shadows"',
163
- },
164
- {
165
- label: 'Asks how understands: value questions',
166
- cli: 'astryx experimental theme editor how "what is the padding of buttons"',
167
- },
168
- {
169
- label: 'Asks how understands: value questions',
170
- cli: 'astryx experimental theme editor how "how round are the cards now?"',
171
- },
172
- ],
173
- outsideProject: 'refuse',
174
- requires: ['themes.targets'],
175
- notes: [
176
- {
177
- type: 'prose',
178
- text: 'The examples labeled "Asks how understands" list the kinds of ask a question in plain words can be, each with examples it answers with commands: a dial for the whole theme, a part\'s property by an amount or a value, a direction (lighter, darker, bigger, smaller, with or without a reference), a comparison with another part, one variant made to look like another (ghost buttons look like the default button), everything except some parts or keeping a part, a prohibition (never …), one mode (in dark mode), a removal (no shadow, remove …, or a part\'s own piece such as a code block\'s copy button or an alert\'s icon, which is then not drawn), several changes in one ask, and a question about a value. An ask of another kind may still be answered; one it cannot answer says so and points here.',
179
- },
180
- {
181
- type: 'prose',
182
- text: "In global mode: outside a project, with no package.json in the folder or above it, experimental theme editor how 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}.",
183
- },
184
- ],
185
- exitCodes: [
186
- {
187
- code: 0,
188
- when: 'the usage (nothing named) or the answer (an empty answer or list included)',
189
- },
190
- {
191
- code: 1,
192
- when: 'an unknown option, an unknown or empty theme, --theme given twice, an unknown --list kind, --list given twice, --at without a picture, a picture that is not a PNG or is damaged or too big, an --at point that is not whole pixel numbers or falls outside the picture, a count beside --at, or a count that is not a positive whole number, or a missing picture; or a folder outside a project with Core installed (ERR_PROJECT_REQUIRED)',
193
- },
194
- ],
195
- related: ['experimental theme editor', 'experimental theme targets'],
196
- };
@@ -1,174 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file CommandDoc for `astryx experimental theme editor new`. */
4
-
5
- import {NAME_RULE} from '../../../api/theme-edit/_name-rule.mjs';
6
-
7
- /** @type {import('@astryxdesign/cli/authoring').CommandDoc} */
8
- export const doc = {
9
- type: 'command',
10
- name: 'experimental theme editor new',
11
- displayName: 'astryx experimental theme editor new',
12
- namespace: 'cli/commands',
13
- stability: 'experimental',
14
- summary: 'Start a theme in themes/<theme>/, optionally on a built-in theme',
15
- description:
16
- 'Makes themes/<theme>/ with <theme>.settings.json (the settings this command owns), the generated <theme>.settings.ts, <theme>.theme.ts (which extends it and is yours), and the built <theme>.css and <theme>.js (build them again with `astryx experimental theme compile themes/<theme>/<theme>.theme.ts`, which checks the editor settings first), then writes preview.html, the sample app page with the theme. --like builds on a built-in theme (neutral, stone, matcha, y2k, gothic, chocolate, butter; its package must be installed); without it, or with --like none, the theme starts from Astryx defaults. Any `set` dial except base (that is --like) can be a flag too (--accent "#7c3aed" --font inter --corners round --vibrancy 60 ...): the same names, values and checks as `set`, all applied in the one build, with one result that lists them. Change the base later with `astryx experimental theme editor set <theme> base <theme|none>`. Afterwards, <theme>.theme.ts is yours: it extends the generated <theme>.settings.ts, and every later change rewrites only the settings files, so your own edits in <theme>.theme.ts survive. A theme name is ' +
17
- NAME_RULE +
18
- ', and not the name of a built-in theme. 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.',
19
- fn: 'themeEditNew',
20
- args: [
21
- {
22
- name: 'theme',
23
- param: 'theme',
24
- required: true,
25
- },
26
- ],
27
- options: [
28
- {
29
- flag: '--like <theme>',
30
- param: 'options.like',
31
- names: 'theme',
32
- description:
33
- 'A built-in theme to build on: neutral, stone, matcha, y2k, gothic, chocolate, or butter; or none, for Astryx defaults (the same as leaving it out)',
34
- },
35
- {
36
- flag: '--png',
37
- param: 'options.png',
38
- description:
39
- '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',
40
- },
41
- {
42
- flag: '--corners <rung>',
43
- param: 'options.settings',
44
- description:
45
- 'How round corners are: square, small, medium, large, round, pill, or a size like 6px. The same value and check as `set <theme> corners`',
46
- },
47
- {
48
- flag: '--spacing <rung>',
49
- param: 'options.settings',
50
- description:
51
- 'How much room: tight, compact, medium, roomy or spacious. The same value and check as `set <theme> spacing`',
52
- },
53
- {
54
- flag: '--accent <color>',
55
- param: 'options.settings',
56
- description:
57
- 'The brand color; its light and dark shades are generated from it. The same value and check as `set <theme> accent`',
58
- },
59
- {
60
- flag: '--neutral <color>',
61
- param: 'options.settings',
62
- description:
63
- 'The gray of surfaces, text and borders; its shades are generated from it. The same value and check as `set <theme> neutral`',
64
- },
65
- {
66
- flag: '--success <color>',
67
- param: 'options.settings',
68
- description:
69
- 'The success color. The same value and check as `set <theme> success`',
70
- },
71
- {
72
- flag: '--warning <color>',
73
- param: 'options.settings',
74
- description:
75
- 'The warning color. The same value and check as `set <theme> warning`',
76
- },
77
- {
78
- flag: '--danger <color>',
79
- param: 'options.settings',
80
- description:
81
- 'The danger (error) color. The same value and check as `set <theme> danger`',
82
- },
83
- {
84
- flag: '--info <color>',
85
- param: 'options.settings',
86
- description:
87
- 'The info color. The same value and check as `set <theme> info`',
88
- },
89
- {
90
- flag: '--vibrancy <0-100>',
91
- param: 'options.settings',
92
- description:
93
- 'How saturated the generated colors are (50 is the default); needs a color. The same value and check as `set <theme> vibrancy`',
94
- },
95
- {
96
- flag: '--font <font>',
97
- param: 'options.settings',
98
- description:
99
- 'The typeface: a preset, an open font, a family name or a stack. The same value and check as `set <theme> font`',
100
- },
101
- {
102
- flag: '--headings <style>',
103
- param: 'options.settings',
104
- description:
105
- 'Heading weight (light to heavy) or tracking (tight, tighter, normal, wide). The same value and check as `set <theme> headings`',
106
- },
107
- {
108
- flag: '--surfaces <style>',
109
- param: 'options.settings',
110
- description:
111
- 'flat, outlined, raised or glass. The same value and check as `set <theme> surfaces`',
112
- },
113
- {
114
- flag: '--buttons <style>',
115
- param: 'options.settings',
116
- description:
117
- 'solid, outline, soft or caps. The same value and check as `set <theme> buttons`',
118
- },
119
- {
120
- flag: '--type <style>',
121
- param: 'options.settings',
122
- description:
123
- 'compact, standard, editorial or display. The same value and check as `set <theme> type`',
124
- },
125
- {
126
- flag: '--text-size <size>',
127
- param: 'options.settings',
128
- description:
129
- 'small, medium, large, larger, or a number. The same value and check as `set <theme> text-size`',
130
- },
131
- {
132
- flag: '--mode <modes>',
133
- param: 'options.settings',
134
- description:
135
- 'both, light-only or dark-only. The same value and check as `set <theme> mode`',
136
- },
137
- ],
138
- examples: [
139
- {
140
- label: 'Start on a built-in theme',
141
- cli: 'astryx experimental theme editor new brand --like neutral',
142
- },
143
- {
144
- label: 'Start from Astryx defaults',
145
- cli: 'astryx experimental theme editor new brand',
146
- },
147
- {
148
- label: 'Start with settings, in one build',
149
- cli: 'astryx experimental theme editor new brand --like neutral --accent "#7c3aed" --font inter --corners round --vibrancy 60',
150
- },
151
- ],
152
- outsideProject: 'refuse',
153
- requires: ['themes.targets', 'themes.compile'],
154
- notes: [
155
- {
156
- type: 'prose',
157
- text: "In global mode: outside a project, with no package.json in the folder or above it, experimental theme editor new 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}.",
158
- },
159
- ],
160
- exitCodes: [
161
- {
162
- code: 0,
163
- when: 'the theme is made and built, and its preview is written; or made 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',
164
- },
165
- {
166
- code: 1,
167
- when:
168
- 'a name that breaks the theme-name rule (' +
169
- NAME_RULE +
170
- ') or is the name of a built-in theme, a theme that already exists, a --like that is not a built-in theme or is not installed, a setting flag that `set` would refuse, no Core installed in the folder, or a build failure (nothing is left behind)',
171
- },
172
- ],
173
- related: ['experimental theme editor', 'experimental theme compile'],
174
- };