@astryxdesign/cli 0.7.18-canary.gfca8508 → 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 (341) 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 +2 -2
  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 +1 -1
  16. package/api/icon/_adapter.mjs +1 -0
  17. package/api/icon/_authoring.mjs +17 -8
  18. package/api/icon/_default-look.mjs +15 -15
  19. package/api/icon/add/add.mjs +9 -4
  20. package/api/icon/exportIconIndex.doc.mjs +1 -1
  21. package/api/icon/icon.doc.mjs +1 -1
  22. package/api/icon/icon.type.d.mts +33 -33
  23. package/api/icon/icon.type.mjs +45 -45
  24. package/api/icon/iconAdd.doc.mjs +1 -1
  25. package/api/icon/iconNewSet.doc.mjs +3 -3
  26. package/api/icon/iconUse.doc.mjs +5 -5
  27. package/api/icon/rankIconIndex.doc.mjs +1 -1
  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/render/_adapter.mjs +7 -1
  32. package/api/search/ORDERING.md +1 -1
  33. package/api/search/_candidate-score.mjs +20 -0
  34. package/api/search/_words.d.mts +8 -0
  35. package/api/search/_words.mjs +15 -0
  36. package/api/template/template.type.d.mts +2 -2
  37. package/api/template/template.type.mjs +2 -2
  38. package/api/theme/_adapter.mjs +19 -11
  39. package/api/theme/build/build.d.mts +19 -51
  40. package/api/theme/build/build.mjs +195 -189
  41. package/api/theme/build/font-warning.d.mts +19 -2
  42. package/api/theme/build/font-warning.mjs +46 -5
  43. package/api/theme/generateTonalPalette.doc.mjs +1 -1
  44. package/api/theme/palette/generate/derive-look.mjs +108 -37
  45. package/api/theme/palette/generate/mapping.mjs +2 -0
  46. package/api/theme/template/template.d.mts +0 -17
  47. package/api/theme/template/template.mjs +1 -42
  48. package/api/theme/theme.type.d.mts +5 -4
  49. package/api/theme/theme.type.mjs +5 -4
  50. package/api/theme/themePaletteGenerate.doc.mjs +1 -1
  51. package/api/theme/themeRemove.doc.mjs +1 -1
  52. package/assets/codemods/transforms/v0.7.0/preserve-bottom-sheet-content-padding.mjs +3 -1
  53. package/assets/component-list.generated.json +1 -1
  54. package/assets/discover/official-packages.json +26 -2
  55. package/assets/docs/author-a-theme.doc.mjs +6 -5
  56. package/assets/docs/browser-support.doc.mjs +1 -0
  57. package/assets/docs/icons.doc.mjs +8 -7
  58. package/assets/docs/motion.doc.mjs +46 -0
  59. package/assets/docs/theme.doc.dense.mjs +6 -17
  60. package/assets/docs/theme.doc.mjs +6 -16
  61. package/assets/docs/theme.doc.zh.mjs +6 -16
  62. package/assets/docs/tree/ci-and-containers.doc.mjs +1 -1
  63. package/assets/docs/tree/font-setup.doc.mjs +30 -0
  64. package/assets/docs/tree/icon-sets.doc.mjs +1 -1
  65. package/assets/docs/tree/template-icons.doc.mjs +3 -3
  66. package/assets/docs/tree/tokens-color.doc.mjs +5 -0
  67. package/assets/docs/tree/tokens.doc.mjs +4 -3
  68. package/assets/docs/tree/updates.doc.mjs +1 -1
  69. package/assets/docs-routes.generated.json +1 -1
  70. package/assets/docs.generated.json +2 -2
  71. package/assets/icons/definitions/drag.doc.mjs +1 -0
  72. package/assets/search-catalog.generated.json +2 -2
  73. package/assets/self-audit.generated.json +1 -1
  74. package/assets/templates/blocks/components/Card/SelectableCardElevated.doc.mjs +1 -1
  75. package/assets/templates/blocks/components/Card/SelectableCardElevated.tsx +20 -10
  76. package/assets/templates/blocks/components/Card/SelectableCardShowcase.doc.mjs +1 -1
  77. package/assets/templates/blocks/components/Card/SelectableCardShowcase.tsx +36 -16
  78. package/assets/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.tsx +6 -0
  79. package/assets/templates/blocks/components/ChatComposerInput/ChatComposerInputMultipleTriggers.tsx +6 -0
  80. package/assets/templates/blocks/components/Hooks/useIndicatorFocusRingHookUsage.doc.mjs +14 -0
  81. package/assets/templates/blocks/components/Hooks/useIndicatorFocusRingHookUsage.tsx +63 -0
  82. package/assets/templates/blocks/components/Hooks/useLongPressHookUsage.doc.mjs +29 -0
  83. package/assets/templates/blocks/components/Hooks/useLongPressHookUsage.tsx +237 -0
  84. package/assets/templates/blocks/components/SideNav/SideNavShowcase.tsx +10 -72
  85. package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.doc.mjs +1 -1
  86. package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx +7 -7
  87. package/assets/templates/blocks/components/Table/TableCustomRowTable.doc.mjs +14 -0
  88. package/assets/templates/blocks/components/Table/TableCustomRowTable.tsx +96 -0
  89. package/assets/templates/components.generated.json +1 -1
  90. package/assets/templates/pages/ai-chat-landing/page.tsx +4 -0
  91. package/assets/templates/pages/dashboard-scorecard/page.tsx +26 -7
  92. package/assets/templates/pages/editor/page.tsx +13 -3
  93. package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +2 -2
  94. package/assets/templates/themes/butter/butterTheme.ts +12 -10
  95. package/assets/templates/themes/butter/icons.tsx +2 -0
  96. package/assets/templates/themes/chocolate/chocolateTheme.ts +1 -0
  97. package/assets/templates/themes/chocolate/icons.tsx +2 -0
  98. package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +1 -1
  99. package/assets/templates/themes/gothic/gothicTheme.ts +1 -0
  100. package/assets/templates/themes/gothic/icons.tsx +2 -0
  101. package/assets/templates/themes/matcha/icons.tsx +2 -0
  102. package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +2 -2
  103. package/assets/templates/themes/matcha/matchaTheme.ts +1 -0
  104. package/assets/templates/themes/neutral/icons.tsx +2 -0
  105. package/assets/templates/themes/neutral/neutralPaletteRefs.generated.ts +2 -2
  106. package/assets/templates/themes/neutral/neutralTheme.ts +1 -0
  107. package/assets/templates/themes/stone/icons.tsx +2 -0
  108. package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +1 -1
  109. package/assets/templates/themes/stone/stoneTheme.ts +1 -0
  110. package/assets/templates/themes/y2k/icons.tsx +2 -0
  111. package/assets/templates/themes/y2k/y2kTheme.ts +1 -0
  112. package/assets/theme.template.ts +9 -5
  113. package/authoring/config/parse.mjs +1 -1
  114. package/authoring/doctypes/base/type.ts +2 -3
  115. package/authoring/doctypes/component/component.doc.mjs +1 -1
  116. package/authoring/doctypes/icon-set/icon-names.mjs +1 -0
  117. package/authoring/integration/integration.doc.mjs +1 -1
  118. package/authoring/integration/type.ts +1 -1
  119. package/clients/cli/build-id.generated.json +1 -1
  120. package/clients/cli/commands/experimental/icon.mjs +7 -7
  121. package/clients/cli/commands/experimental/index.mjs +0 -5
  122. package/clients/cli/commands/experimental-icon-new-set.doc.mjs +2 -2
  123. package/clients/cli/commands/experimental-icon-use.doc.mjs +4 -4
  124. package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
  125. package/clients/cli/commands/experimental.doc.mjs +2 -6
  126. package/clients/cli/commands/template.mjs +1 -1
  127. package/clients/cli/commands/theme-build.doc.mjs +8 -1
  128. package/clients/cli/commands/theme-palette-generate.doc.mjs +1 -1
  129. package/clients/cli/commands/theme-remove.doc.mjs +1 -1
  130. package/clients/cli/commands/theme.doc.mjs +1 -11
  131. package/clients/cli/commands/theme.mjs +110 -475
  132. package/clients/cli/commands.generated.json +1 -1
  133. package/clients/cli/index.mjs +4 -34
  134. package/clients/cli/lib/base-gate.mjs +2 -3
  135. package/clients/cli/lib/cli-error.mjs +8 -72
  136. package/clients/cli/lib/define-command.mjs +0 -19
  137. package/clients/cli/lib/json-shim.mjs +11 -633
  138. package/clients/cli/lib/manifest.mjs +0 -4
  139. package/clients/cli/lib/stray-option.mjs +1 -2
  140. package/clients/cli/manifest.generated.json +1 -1
  141. package/foundation/agent-docs/agent-docs.mjs +1 -1
  142. package/foundation/color/css-color.mjs +2 -3
  143. package/foundation/discovery/app-layout.d.mts +13 -0
  144. package/foundation/discovery/app-layout.mjs +35 -0
  145. package/foundation/discovery/fixture-refs.d.mts +51 -0
  146. package/foundation/discovery/fixture-refs.mjs +351 -0
  147. package/foundation/discovery/icon-definition-discovery.mjs +1 -1
  148. package/foundation/discovery/icon-ranking.mjs +2 -2
  149. package/foundation/discovery/icon-set-checks.mjs +1 -1
  150. package/foundation/discovery/icon-set-discovery.mjs +1 -1
  151. package/foundation/discovery/icon-set-writer.d.mts +24 -7
  152. package/foundation/discovery/icon-set-writer.mjs +66 -22
  153. package/foundation/discovery/static-descriptor.d.mts +49 -0
  154. package/foundation/discovery/static-descriptor.mjs +548 -0
  155. package/foundation/discovery/template-adapter.d.mts +0 -47
  156. package/foundation/discovery/template-adapter.mjs +1 -333
  157. package/foundation/discovery/theme-discovery.d.mts +6 -47
  158. package/foundation/discovery/theme-discovery.mjs +15 -537
  159. package/foundation/doc-compiler/import.mjs +1 -1
  160. package/foundation/env/user-dirs.d.mts +5 -2
  161. package/foundation/env/user-dirs.mjs +12 -5
  162. package/foundation/fonts/next-font.d.mts +26 -0
  163. package/foundation/fonts/next-font.mjs +149 -0
  164. package/foundation/fs/empty-folder.mjs +2 -2
  165. package/foundation/fs/read-record.mjs +11 -4
  166. package/foundation/pictures/pictures.d.mts +1 -45
  167. package/foundation/pictures/pictures.mjs +8 -8
  168. package/foundation/release/folder-lock.mjs +3 -2
  169. package/foundation/render/cut-short.d.mts +2 -2
  170. package/foundation/render/cut-short.mjs +2 -2
  171. package/foundation/render/drawn-contrast.d.mts +2 -2
  172. package/foundation/render/drawn-contrast.mjs +2 -2
  173. package/foundation/render/font-probe.d.mts +2 -2
  174. package/foundation/render/font-probe.mjs +2 -2
  175. package/foundation/render/layers.mjs +1 -2
  176. package/foundation/render/package-resolve-hooks.d.mts +25 -5
  177. package/foundation/render/package-resolve-hooks.mjs +77 -14
  178. package/foundation/render/page-worker.mjs +24 -12
  179. package/foundation/render/part-boxes.d.mts +2 -3
  180. package/foundation/render/part-boxes.mjs +2 -3
  181. package/foundation/render/picture-chrome.mjs +5 -0
  182. package/foundation/render/render-page.d.mts +1 -1
  183. package/foundation/render/render-page.mjs +4 -5
  184. package/foundation/render/single-copy-hooks.d.mts +2 -0
  185. package/foundation/render/single-copy-hooks.mjs +2 -0
  186. package/foundation/response/error-codes.doc.mjs +14 -14
  187. package/foundation/response/error-codes.mjs +13 -13
  188. package/foundation/response/response-types.doc.mjs +7 -68
  189. package/foundation/runtime/css-tree.mjs +2 -2
  190. package/foundation/runtime/word-table.d.mts +1 -1
  191. package/foundation/runtime/word-table.mjs +1 -1
  192. package/foundation/suggest/other-command.d.mts +52 -15
  193. package/foundation/suggest/other-command.mjs +168 -45
  194. package/foundation/text/suggest-order.d.mts +7 -0
  195. package/foundation/text/suggest-order.mjs +1 -1
  196. package/package.json +7 -8
  197. package/api/theme-edit/_adapter.d.mts +0 -228
  198. package/api/theme-edit/_adapter.mjs +0 -2025
  199. package/api/theme-edit/_catalog.d.mts +0 -172
  200. package/api/theme-edit/_catalog.mjs +0 -806
  201. package/api/theme-edit/_check.d.mts +0 -391
  202. package/api/theme-edit/_check.mjs +0 -9370
  203. package/api/theme-edit/_color.d.mts +0 -135
  204. package/api/theme-edit/_color.mjs +0 -480
  205. package/api/theme-edit/_compiler.d.mts +0 -77
  206. package/api/theme-edit/_compiler.mjs +0 -1053
  207. package/api/theme-edit/_context.d.mts +0 -399
  208. package/api/theme-edit/_context.mjs +0 -1778
  209. package/api/theme-edit/_css.d.mts +0 -169
  210. package/api/theme-edit/_css.mjs +0 -1167
  211. package/api/theme-edit/_edit.d.mts +0 -167
  212. package/api/theme-edit/_edit.mjs +0 -11220
  213. package/api/theme-edit/_how-commands.d.mts +0 -315
  214. package/api/theme-edit/_how-commands.mjs +0 -1664
  215. package/api/theme-edit/_how-question.d.mts +0 -341
  216. package/api/theme-edit/_how-question.mjs +0 -33339
  217. package/api/theme-edit/_how-sides.d.mts +0 -22
  218. package/api/theme-edit/_how-sides.mjs +0 -173
  219. package/api/theme-edit/_how-steps.d.mts +0 -42
  220. package/api/theme-edit/_how-steps.mjs +0 -208
  221. package/api/theme-edit/_how-values.d.mts +0 -29
  222. package/api/theme-edit/_how-values.mjs +0 -111
  223. package/api/theme-edit/_how-words.d.mts +0 -15
  224. package/api/theme-edit/_how-words.mjs +0 -239
  225. package/api/theme-edit/_how.d.mts +0 -55
  226. package/api/theme-edit/_how.mjs +0 -2388
  227. package/api/theme-edit/_importers.d.mts +0 -38
  228. package/api/theme-edit/_importers.mjs +0 -188
  229. package/api/theme-edit/_marks.d.mts +0 -39
  230. package/api/theme-edit/_marks.mjs +0 -67
  231. package/api/theme-edit/_missed.d.mts +0 -56
  232. package/api/theme-edit/_missed.mjs +0 -1128
  233. package/api/theme-edit/_name-rule.d.mts +0 -11
  234. package/api/theme-edit/_name-rule.mjs +0 -12
  235. package/api/theme-edit/_normal.d.mts +0 -365
  236. package/api/theme-edit/_normal.mjs +0 -1978
  237. package/api/theme-edit/_overview.d.mts +0 -9
  238. package/api/theme-edit/_overview.mjs +0 -293
  239. package/api/theme-edit/_palette.d.mts +0 -616
  240. package/api/theme-edit/_palette.mjs +0 -2776
  241. package/api/theme-edit/_part-pieces.d.mts +0 -54
  242. package/api/theme-edit/_part-pieces.mjs +0 -179
  243. package/api/theme-edit/_part-words.d.mts +0 -39
  244. package/api/theme-edit/_part-words.mjs +0 -242
  245. package/api/theme-edit/_parts.d.mts +0 -402
  246. package/api/theme-edit/_parts.mjs +0 -2322
  247. package/api/theme-edit/_picture-traits.d.mts +0 -259
  248. package/api/theme-edit/_picture-traits.mjs +0 -1030
  249. package/api/theme-edit/_png.d.mts +0 -94
  250. package/api/theme-edit/_png.mjs +0 -479
  251. package/api/theme-edit/_preview-app.d.mts +0 -172
  252. package/api/theme-edit/_preview-app.mjs +0 -6430
  253. package/api/theme-edit/_preview.d.mts +0 -484
  254. package/api/theme-edit/_preview.mjs +0 -2775
  255. package/api/theme-edit/_project.d.mts +0 -207
  256. package/api/theme-edit/_project.mjs +0 -643
  257. package/api/theme-edit/_resolved.d.mts +0 -46
  258. package/api/theme-edit/_resolved.mjs +0 -800
  259. package/api/theme-edit/_set-line.d.mts +0 -29
  260. package/api/theme-edit/_set-line.mjs +0 -100
  261. package/api/theme-edit/_settings.d.mts +0 -2426
  262. package/api/theme-edit/_settings.mjs +0 -18449
  263. package/api/theme-edit/_tables.d.mts +0 -227
  264. package/api/theme-edit/_tables.mjs +0 -1128
  265. package/api/theme-edit/_text-looks.d.mts +0 -78
  266. package/api/theme-edit/_text-looks.mjs +0 -376
  267. package/api/theme-edit/_vet.d.mts +0 -50
  268. package/api/theme-edit/_vet.mjs +0 -166
  269. package/api/theme-edit/how/how.d.mts +0 -17
  270. package/api/theme-edit/how/how.mjs +0 -28
  271. package/api/theme-edit/new/new.d.mts +0 -11
  272. package/api/theme-edit/new/new.mjs +0 -22
  273. package/api/theme-edit/preview-add/preview-add.d.mts +0 -14
  274. package/api/theme-edit/preview-add/preview-add.mjs +0 -25
  275. package/api/theme-edit/preview-app/preview-app.d.mts +0 -13
  276. package/api/theme-edit/preview-app/preview-app.mjs +0 -24
  277. package/api/theme-edit/preview-list/preview-list.d.mts +0 -10
  278. package/api/theme-edit/preview-list/preview-list.mjs +0 -21
  279. package/api/theme-edit/preview-remove/preview-remove.d.mts +0 -12
  280. package/api/theme-edit/preview-remove/preview-remove.mjs +0 -23
  281. package/api/theme-edit/set/set.d.mts +0 -13
  282. package/api/theme-edit/set/set.mjs +0 -24
  283. package/api/theme-edit/show/show.d.mts +0 -13
  284. package/api/theme-edit/show/show.mjs +0 -24
  285. package/api/theme-edit/theme-edit.d.mts +0 -12
  286. package/api/theme-edit/theme-edit.mjs +0 -36
  287. package/api/theme-edit/theme-edit.type.d.mts +0 -730
  288. package/api/theme-edit/theme-edit.type.mjs +0 -342
  289. package/api/theme-edit/themeEditHow.doc.d.mts +0 -6
  290. package/api/theme-edit/themeEditHow.doc.mjs +0 -105
  291. package/api/theme-edit/themeEditNew.doc.d.mts +0 -5
  292. package/api/theme-edit/themeEditNew.doc.mjs +0 -112
  293. package/api/theme-edit/themeEditPreviewAdd.doc.d.mts +0 -6
  294. package/api/theme-edit/themeEditPreviewAdd.doc.mjs +0 -121
  295. package/api/theme-edit/themeEditPreviewApp.doc.d.mts +0 -6
  296. package/api/theme-edit/themeEditPreviewApp.doc.mjs +0 -87
  297. package/api/theme-edit/themeEditPreviewList.doc.d.mts +0 -6
  298. package/api/theme-edit/themeEditPreviewList.doc.mjs +0 -62
  299. package/api/theme-edit/themeEditPreviewRemove.doc.d.mts +0 -6
  300. package/api/theme-edit/themeEditPreviewRemove.doc.mjs +0 -96
  301. package/api/theme-edit/themeEditSet.doc.d.mts +0 -6
  302. package/api/theme-edit/themeEditSet.doc.mjs +0 -175
  303. package/api/theme-edit/themeEditShow.doc.d.mts +0 -6
  304. package/api/theme-edit/themeEditShow.doc.mjs +0 -118
  305. package/api/theme-edit/themeEditUndo.doc.d.mts +0 -6
  306. package/api/theme-edit/themeEditUndo.doc.mjs +0 -133
  307. package/api/theme-edit/undo/undo.d.mts +0 -13
  308. package/api/theme-edit/undo/undo.mjs +0 -24
  309. package/assets/preview-app/README.md +0 -6
  310. package/assets/preview-app/css.d.ts +0 -5
  311. package/assets/preview-app/gitignore +0 -4
  312. package/assets/preview-app/next.config.mjs +0 -12
  313. package/assets/preview-app/package.json +0 -24
  314. package/assets/preview-app/src/app/globals.css +0 -6
  315. package/assets/preview-app/src/app/layout.tsx +0 -21
  316. package/assets/preview-app/src/app/page.tsx +0 -94
  317. package/assets/preview-app/src/app/providers.tsx +0 -16
  318. package/assets/preview-app/tsconfig.json +0 -27
  319. package/clients/cli/commands/experimental/theme.mjs +0 -2990
  320. package/clients/cli/commands/experimental-theme-add.doc.mjs +0 -80
  321. package/clients/cli/commands/experimental-theme-compile.doc.mjs +0 -98
  322. package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +0 -196
  323. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +0 -174
  324. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +0 -139
  325. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +0 -77
  326. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +0 -105
  327. package/clients/cli/commands/experimental-theme-editor.doc.mjs +0 -49
  328. package/clients/cli/commands/experimental-theme-eject.doc.mjs +0 -72
  329. package/clients/cli/commands/experimental-theme-list.doc.mjs +0 -49
  330. package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +0 -88
  331. package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +0 -61
  332. package/clients/cli/commands/experimental-theme-preview-list.doc.mjs +0 -48
  333. package/clients/cli/commands/experimental-theme-preview-remove.doc.mjs +0 -59
  334. package/clients/cli/commands/experimental-theme-preview.doc.mjs +0 -41
  335. package/clients/cli/commands/experimental-theme-remove.doc.mjs +0 -57
  336. package/clients/cli/commands/experimental-theme-targets.doc.mjs +0 -62
  337. package/clients/cli/commands/experimental-theme-template.doc.mjs +0 -63
  338. package/clients/cli/commands/experimental-theme-use.doc.mjs +0 -57
  339. package/clients/cli/commands/experimental-theme.doc.mjs +0 -60
  340. package/foundation/fonts/fontsource-families.generated.d.mts +0 -5
  341. package/foundation/fonts/fontsource-families.generated.mjs +0 -2110
@@ -1,121 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file FunctionDoc for `themeEditPreviewAdd()` / `astryx experimental theme preview add`. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
6
- export const doc = {
7
- type: 'function',
8
- kind: 'api',
9
- name: 'themeEditPreviewAdd',
10
- namespace: 'cli/api',
11
- stability: 'experimental',
12
- displayName: 'themeEditPreviewAdd()',
13
- summary:
14
- 'Add pages to the theme preview in the app: the default pages, the best template pages for a description, or one template.',
15
- description:
16
- "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 `themeEditPreviewApp`, 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 lists it in `skipped`, with 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 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.",
17
- importPath: '@astryxdesign/cli/api/experimental',
18
- signature:
19
- 'themeEditPreviewAdd(description?: string, options?: object): Promise<object>',
20
- keywords: ['theme', 'experimental theme', 'preview', 'theme preview'],
21
- params: [
22
- {
23
- name: 'description',
24
- type: 'string',
25
- description:
26
- 'What the page is for; the build ranking picks the template pages that fit it.',
27
- },
28
- {
29
- name: 'options.theme',
30
- type: 'string',
31
- description: 'The theme the pages wear.',
32
- },
33
- {
34
- name: 'options.template',
35
- type: 'string',
36
- description: 'Add this page template instead of ranking one.',
37
- },
38
- {
39
- name: 'options.top',
40
- type: 'number',
41
- description:
42
- 'With a description: how many template pages, 1 to 3 (default 1).',
43
- },
44
- {
45
- name: 'options.path',
46
- type: 'string',
47
- description: 'The folder of the preview route, inside the project.',
48
- },
49
- {
50
- name: 'options.cwd',
51
- type: 'string',
52
- description:
53
- 'The folder to start from (default: the current directory): commands act on the Astryx project at or above it, so a subfolder of an app works.',
54
- },
55
- ],
56
- returns: [
57
- {
58
- type: 'themeEdit.previewAdd',
59
- description:
60
- 'The route folder, the theme, the pages added, the template pages skipped for missing packages, every page, the files written, and how to open the preview.',
61
- },
62
- ],
63
- throws: [
64
- {
65
- code: 'ERR_NOT_FOUND',
66
- when: 'no routes folder and no `path`, or no page template to show',
67
- },
68
- {
69
- code: 'ERR_FILE_EXISTS',
70
- when: 'a file there that the preview did not write, or one it wrote and someone changed since',
71
- },
72
- {
73
- code: 'ERR_PATH_TRAVERSAL',
74
- when: '`path` is outside the project, or a file it writes leads outside the route folder through a link',
75
- },
76
- {
77
- code: 'ERR_INVALID_ARGUMENT',
78
- when: 'a description with `template`, an empty `template`, `top` other than 1, 2 or 3 as typed or with no description, or a folder that is no place for the preview',
79
- },
80
- {
81
- code: 'ERR_DEP_MISSING',
82
- when: 'every template page asked for imports a package the app lacks or needs a StyleX compiler it lacks; the suggestion is the install command',
83
- },
84
- {
85
- code: 'ERR_UNKNOWN_TEMPLATE',
86
- when: '`template` names no page template (a block is named as one), with the closest page templates as commands',
87
- },
88
- {
89
- code: 'ERR_THEME_LOAD',
90
- when: 'the theme the pages wear has no build and does not build; nothing is written',
91
- },
92
- {
93
- code: 'ERR_UNKNOWN_THEME',
94
- when: '`theme` names a theme this command did not make',
95
- },
96
- {
97
- code: 'ERR_THEME_INVALID',
98
- when: 'theme-preview.json is damaged, or the theme does not load; nothing is written',
99
- },
100
- {
101
- code: 'ERR_WRITE_FAILED',
102
- when: 'a write failed; every file is put back as it was',
103
- },
104
- {
105
- code: 'ERR_THEME_BUSY',
106
- when: 'another preview command in the project did not finish within 30 seconds; nothing is changed',
107
- },
108
- {
109
- code: 'ERR_PROJECT_REQUIRED',
110
- when: 'no package.json in the folder or above it',
111
- },
112
- ],
113
- examples: [
114
- {
115
- label: 'Default pages',
116
- code: 'await themeEditPreviewAdd(...)',
117
- },
118
- ],
119
- command: 'experimental theme preview add',
120
- related: ['themeEditShow', 'themeEditPreviewApp'],
121
- };
@@ -1,6 +0,0 @@
1
- // @generated by scripts/sync-api-types.mjs from the JSDoc in api/**/*.mjs.
2
- // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
-
4
- /** @file FunctionDoc for `themeEditPreviewApp()` / `astryx experimental theme preview app`. */
5
- /** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
6
- export const doc: import("@astryxdesign/cli/authoring").FunctionDoc;
@@ -1,87 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file FunctionDoc for `themeEditPreviewApp()` / `astryx experimental theme preview app`. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
6
- export const doc = {
7
- type: 'function',
8
- kind: 'api',
9
- name: 'themeEditPreviewApp',
10
- namespace: 'cli/api',
11
- stability: 'experimental',
12
- displayName: 'themeEditPreviewApp()',
13
- summary: 'Make a new starter app with the theme preview inside.',
14
- description:
15
- "Writes a new starter app into `dir` (Next.js app router, Core and the neutral theme, with the Astryx packages pinned to this CLI's release; with `theme`, Core and the base theme are pinned to the versions this project has, the ones the copied build was made on, with a note), with the theme preview route and its default pages (the sample app page and every component grouped) in src/app/theme-preview/. With `theme`, the theme folder is copied into the app's themes/ and the pages wear it; a base theme or font package it needs is added to package.json. No install runs: the result says how to install, run and open it. `dir` must be new or empty, inside the project folder (from a subfolder too); a folder that is not empty is refused, with a free folder name to use instead. Every check runs before the first write, so a refusal changes nothing. Every open font the theme names is added to package.json, at the version this project has or a pinned range, and the route imports it (a family the CLI does not know to be open, with no package of it in this project, is named in the result instead, with the package that would load it); a theme with generated colors gets the Colors page too, and a one-mode theme starts the route in its mode. The app is written into a temp folder beside the folder and moved into place, so a failure leaves nothing behind. A folder holding only .git, .DS_Store or Thumbs.db counts as empty. The folder is refused when it is a file, a dangling link, inside this app's routes folder, themes/, node_modules/ or Next's build folder (.next/, out/ or the distDir next.config names), or written with Windows separators, white space at either end or a name too long. A theme whose build is missing or older than its settings is built first, with a note. The app's home page links to the preview, and its .gitignore leaves out node_modules, next-env.d.ts and *.tsbuildinfo. Inside a project with a tsconfig.json, a note says to exclude the new folder. With a theme, it holds that theme's lock while it builds and copies it, so an `editor set` on the same theme waits for it. A folder given from a subfolder of the project is taken from where it was given. An app is refused in public/ (served as files at the site root) and under a name Windows does not allow; a base theme passed to --theme is named as a package theme, installed or not, with the command that adds it. Experimental: it may change or be removed in a patch release.",
16
- importPath: '@astryxdesign/cli/api/experimental',
17
- signature:
18
- 'themeEditPreviewApp(dir: string, options?: object): Promise<object>',
19
- keywords: [
20
- 'theme',
21
- 'experimental theme',
22
- 'preview',
23
- 'starter app',
24
- 'next.js',
25
- ],
26
- params: [
27
- {
28
- name: 'dir',
29
- type: 'string',
30
- description:
31
- 'The folder for the new app: new or empty, inside the project folder.',
32
- required: true,
33
- },
34
- {
35
- name: 'options.theme',
36
- type: 'string',
37
- description:
38
- "A theme made by `experimental theme editor` here: copied into the app, and the pages wear it (default: the app's own neutral theme).",
39
- },
40
- {
41
- name: 'options.cwd',
42
- type: 'string',
43
- description: 'The folder the app folder is inside.',
44
- },
45
- ],
46
- returns: [
47
- {
48
- type: 'themeEdit.previewApp',
49
- description:
50
- 'The app folder, the theme the pages wear, the pages, the files written, notes, and how to install, run and open it.',
51
- },
52
- ],
53
- throws: [
54
- {
55
- code: 'ERR_FILE_EXISTS',
56
- when: '`dir` is not empty, is a file or a dangling link, or was filled while the app was written',
57
- },
58
- {
59
- code: 'ERR_PATH_TRAVERSAL',
60
- when: '`dir` is outside the project folder, or a file it writes leads outside it through a link',
61
- },
62
- {
63
- code: 'ERR_UNKNOWN_THEME',
64
- when: '`theme` names a theme `experimental theme editor` did not make; the closest editor theme is named, and for a package theme what to do instead',
65
- },
66
- {
67
- code: 'ERR_THEME_BUSY',
68
- when: 'another command changing the theme did not finish within 30 seconds; nothing is written',
69
- },
70
- {
71
- code: 'ERR_INVALID_ARGUMENT',
72
- when: 'no `dir`, or a folder that is no place for an app',
73
- },
74
- {
75
- code: 'ERR_WRITE_FAILED',
76
- when: 'a write failed; nothing is left behind',
77
- },
78
- ],
79
- examples: [
80
- {
81
- label: 'A new app',
82
- code: "await themeEditPreviewApp('theme-app')",
83
- },
84
- ],
85
- command: 'experimental theme preview app',
86
- related: ['themeEditPreviewAdd'],
87
- };
@@ -1,6 +0,0 @@
1
- // @generated by scripts/sync-api-types.mjs from the JSDoc in api/**/*.mjs.
2
- // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
-
4
- /** @file FunctionDoc for `themeEditPreviewList()` / `astryx experimental theme preview list`. */
5
- /** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
6
- export const doc: import("@astryxdesign/cli/authoring").FunctionDoc;
@@ -1,62 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file FunctionDoc for `themeEditPreviewList()` / `astryx experimental theme preview list`. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
6
- export const doc = {
7
- type: 'function',
8
- kind: 'api',
9
- name: 'themeEditPreviewList',
10
- namespace: 'cli/api',
11
- stability: 'experimental',
12
- displayName: 'themeEditPreviewList()',
13
- summary: 'The pages of the theme preview in the app.',
14
- description:
15
- 'Lists the pages of the theme preview, in nav order, with the theme they wear and the route folder. With no preview, and with no routes folder (app/ or src/app/) for one, the list is empty. A damaged theme-preview.json is refused with `ERR_THEME_INVALID`, naming the file. With no folder given and no preview in the default place, a preview recorded for a theme is listed; with several, the refusal names each. When the theme the preview wears is gone, `themeMissing` is true and `notes` names the command that switches it. Experimental: it may change or be removed in a patch release.',
16
- importPath: '@astryxdesign/cli/api/experimental',
17
- signature: 'themeEditPreviewList(options?: object): Promise<object>',
18
- keywords: ['theme', 'experimental theme', 'preview', 'theme preview'],
19
- params: [
20
- {
21
- name: 'options.path',
22
- type: 'string',
23
- description:
24
- 'The folder of the preview route, when it is not in the default place.',
25
- },
26
- {
27
- name: 'options.cwd',
28
- type: 'string',
29
- description:
30
- 'The folder to start from (default: the current directory): commands act on the Astryx project at or above it, so a subfolder of an app works.',
31
- },
32
- ],
33
- returns: [
34
- {
35
- type: 'themeEdit.previewList',
36
- description:
37
- 'The route folder (null with no preview), the theme, whether that theme is gone (`themeMissing`), the pages and notes.',
38
- },
39
- ],
40
- throws: [
41
- {
42
- code: 'ERR_THEME_INVALID',
43
- when: 'theme-preview.json is damaged',
44
- },
45
- {
46
- code: 'ERR_INVALID_ARGUMENT',
47
- when: 'several recorded previews and none in the default place',
48
- },
49
- {
50
- code: 'ERR_PROJECT_REQUIRED',
51
- when: 'no package.json in the folder or above it',
52
- },
53
- ],
54
- examples: [
55
- {
56
- label: 'Every page',
57
- code: 'await themeEditPreviewList(...)',
58
- },
59
- ],
60
- command: 'experimental theme preview list',
61
- related: ['themeEditShow'],
62
- };
@@ -1,6 +0,0 @@
1
- // @generated by scripts/sync-api-types.mjs from the JSDoc in api/**/*.mjs.
2
- // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
-
4
- /** @file FunctionDoc for `themeEditPreviewRemove()` / `astryx experimental theme preview remove`. */
5
- /** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
6
- export const doc: import("@astryxdesign/cli/authoring").FunctionDoc;
@@ -1,96 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file FunctionDoc for `themeEditPreviewRemove()` / `astryx experimental theme preview remove`. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
6
- export const doc = {
7
- type: 'function',
8
- kind: 'api',
9
- name: 'themeEditPreviewRemove',
10
- namespace: 'cli/api',
11
- stability: 'experimental',
12
- displayName: 'themeEditPreviewRemove()',
13
- summary: 'Remove one page from the theme preview, or the whole preview.',
14
- description:
15
- 'Removes one page and its nav item, and rewrites the route. With no page, or for the last page, it removes the whole preview: only the files the preview wrote (theme-preview.json lists them) are deleted, and the folder only when nothing else is in it. A path in theme-preview.json that leads outside the route folder is dropped from the record and named in a note; nothing outside the folder is deleted. Only files the preview wrote are deleted: a page file it did not write, or one changed by hand since it wrote it (by the hash theme-preview.json records), is kept and named in `kept`, with a note; files already gone are named in `missing`, and the route and Colors page written again in `rewritten`. Every check runs before the first delete: the theme the route wears is loaded first, so a theme that does not load is refused with nothing deleted, and the refusal names the whole-preview remove, which needs no theme. A theme that is gone is replaced by the theme of the app itself, with a note. A page id matches in any case. A damaged theme-preview.json (not JSON, the wrong shape, a duplicate page, a folder or an absolute path in its files) is refused with `ERR_THEME_INVALID`, naming the file. With no folder given and no preview in the default place, a preview recorded for a theme is used. A whole remove stops, deleting nothing, when page.tsx was changed by hand: it imports the pages. A page whose file is gone leaves the nav, with a note. Refusals never suggest deleting files. Preview commands in one project run one after another. A remove deletes only the route file, the record and the page files of recorded pages (in _pages/, or pages/ for an older release), and only when a recorded hash shows they are as the preview wrote them: any other file the record names, and any file with no recorded hash, is kept and named, so a copied or edited record never deletes a project file. A route that stays keeps the pages it imports. Experimental: it may change or be removed in a patch release.',
16
- importPath: '@astryxdesign/cli/api/experimental',
17
- signature:
18
- 'themeEditPreviewRemove(page?: string, options?: object): Promise<object>',
19
- keywords: ['theme', 'experimental theme', 'preview', 'theme preview'],
20
- params: [
21
- {
22
- name: 'page',
23
- type: 'string',
24
- description: 'The page to remove; none removes the whole preview.',
25
- },
26
- {
27
- name: 'options.path',
28
- type: 'string',
29
- description:
30
- 'The folder of the preview route, when it is not in the default place.',
31
- },
32
- {
33
- name: 'options.cwd',
34
- type: 'string',
35
- description:
36
- 'The folder to start from (default: the current directory): commands act on the Astryx project at or above it, so a subfolder of an app works.',
37
- },
38
- ],
39
- returns: [
40
- {
41
- type: 'themeEdit.previewRemove',
42
- description:
43
- 'The files deleted, kept, missing and written again, notes, and the pages left.',
44
- },
45
- ],
46
- throws: [
47
- {
48
- code: 'ERR_PATH_TRAVERSAL',
49
- when: '--path leads outside the project; nothing is deleted',
50
- },
51
- {
52
- code: 'ERR_NOT_FOUND',
53
- when: 'there is no preview, or it has no such page',
54
- },
55
- {
56
- code: 'ERR_THEME_INVALID',
57
- when: 'theme-preview.json is damaged, or the theme the route wears does not load; nothing is deleted',
58
- },
59
- {
60
- code: 'ERR_UNKNOWN_THEME',
61
- when: 'the theme the route wears is not a theme; nothing is deleted',
62
- },
63
- {
64
- code: 'ERR_FILE_EXISTS',
65
- when: 'the route file was changed by hand, so it is not written again (a page remove) or its pages are not deleted (a whole remove); nothing is deleted',
66
- },
67
- {
68
- code: 'ERR_WRITE_FAILED',
69
- when: 'a write or delete failed; the files are put back',
70
- },
71
- {
72
- code: 'ERR_THEME_BUSY',
73
- when: 'another preview command in the project did not finish within 30 seconds; nothing is changed',
74
- },
75
- {
76
- code: 'ERR_THEME_LOAD',
77
- when: 'the theme the route wears has no build and does not build; nothing is deleted',
78
- },
79
- {
80
- code: 'ERR_INVALID_ARGUMENT',
81
- when: 'a second page or another extra argument on the command line',
82
- },
83
- {
84
- code: 'ERR_PROJECT_REQUIRED',
85
- when: 'no package.json in the folder or above it',
86
- },
87
- ],
88
- examples: [
89
- {
90
- label: 'One page',
91
- code: 'await themeEditPreviewRemove(...)',
92
- },
93
- ],
94
- command: 'experimental theme preview remove',
95
- related: ['themeEditShow'],
96
- };
@@ -1,6 +0,0 @@
1
- // @generated by scripts/sync-api-types.mjs from the JSDoc in api/**/*.mjs.
2
- // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
-
4
- /** @file FunctionDoc for `themeEditSet()` / `astryx experimental theme editor set`. */
5
- /** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
6
- export const doc: import("@astryxdesign/cli/authoring").FunctionDoc;
@@ -1,175 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- /** @file FunctionDoc for `themeEditSet()` / `astryx experimental theme editor set`. */
4
-
5
- /** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
6
- export const doc = {
7
- type: 'function',
8
- kind: 'api',
9
- name: 'themeEditSet',
10
- namespace: 'cli/api',
11
- stability: 'experimental',
12
- displayName: 'themeEditSet()',
13
- summary:
14
- 'Change one thing in a theme: checked against what the components read, built, previewed.',
15
- description:
16
- "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; when sheet.html (made by `show`) now shows the theme as it was, it says so at its top and the result's sheetStale says so. 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.",
17
- importPath: '@astryxdesign/cli/api/experimental',
18
- signature:
19
- 'themeEditSet(theme: string, thing: string, value: string, options?: object): Promise<object>',
20
- keywords: [
21
- 'theme',
22
- 'experimental theme',
23
- 'set',
24
- 'design tokens',
25
- 'type-checked',
26
- ],
27
- params: [
28
- {
29
- name: 'theme',
30
- type: 'string',
31
- description: 'The theme name.',
32
- required: true,
33
- },
34
- {
35
- name: 'thing',
36
- type: 'string',
37
- description: 'A dial, a design token, or a CSS property.',
38
- required: true,
39
- },
40
- {
41
- name: 'value',
42
- type: 'string',
43
- description:
44
- "The value: a dial rung, `more`/`less`, or an exact value of the thing's type.",
45
- required: true,
46
- },
47
- {
48
- name: 'options.on',
49
- type: 'string',
50
- description: 'A part, a group, or for `font` a role.',
51
- },
52
- {
53
- name: 'options.when',
54
- type: 'string',
55
- description: '`<prop>:<value>`: only that variant.',
56
- },
57
- {
58
- name: 'options.state',
59
- type: 'string',
60
- description: 'Only that state.',
61
- },
62
- {
63
- name: 'options.mode',
64
- type: 'string',
65
- description:
66
- '`light` or `dark`: only that color mode (colors only; a shadow is one value for both modes).',
67
- },
68
- {
69
- name: 'options.only',
70
- type: 'boolean',
71
- description:
72
- 'With a member of an always-alike group, style just that part.',
73
- },
74
- {
75
- name: 'options.png',
76
- type: 'boolean',
77
- description: 'Also take PNG pictures of the preview.',
78
- },
79
- {
80
- name: 'options.cwd',
81
- type: 'string',
82
- description:
83
- 'The folder to start from (default: the current directory): commands act on the Astryx project at or above it, so a subfolder of an app works.',
84
- },
85
- ],
86
- returns: [
87
- {
88
- type: 'themeEdit.set',
89
- description:
90
- 'The setting written and the one it replaced, the parts and group it styles, resolved token changes, part styles written, part settings a dial kept, newly lifted variant keys, notes, contrast problems, build warnings, and the preview.',
91
- },
92
- ],
93
- throws: [
94
- {
95
- code: 'ERR_MISSING_ARGUMENT',
96
- when: 'no thing or value, or --when/--state without --on',
97
- },
98
- {
99
- code: 'ERR_THEME_UNKNOWN_PART',
100
- when: '--on is not a part or a group',
101
- },
102
- {
103
- code: 'ERR_THEME_UNKNOWN_VARIANT',
104
- when: '--when names a prop or value the part does not have',
105
- },
106
- {
107
- code: 'ERR_THEME_UNKNOWN_STATE',
108
- when: '--state is not a state of the part (a word for exactly one of its states is read as that state)',
109
- },
110
- {
111
- code: 'ERR_THEME_UNKNOWN_TOKEN',
112
- when: 'the token does not exist',
113
- },
114
- {
115
- code: 'ERR_THEME_PRIVATE_TOKEN',
116
- when: 'the variable is private to a component',
117
- },
118
- {
119
- code: 'ERR_THEME_UNKNOWN_THING',
120
- when: 'the thing is not a dial, a token or a CSS property',
121
- },
122
- {
123
- code: 'ERR_THEME_BAD_VALUE',
124
- when: 'the value does not fit the thing',
125
- },
126
- {
127
- code: 'ERR_THEME_NO_MODE',
128
- when: '--mode on something that cannot differ by mode',
129
- },
130
- {
131
- code: 'ERR_THEME_NO_EFFECT',
132
- when: 'the change could not take effect; the suggestions name what works',
133
- },
134
- {
135
- code: 'ERR_THEME_NOT_SET',
136
- when: '`reset` names a setting the theme does not have',
137
- },
138
- {
139
- code: 'ERR_INVALID_ARGUMENT',
140
- when: '--only on a part that is not a member of an always-alike group',
141
- },
142
- {
143
- code: 'ERR_UNKNOWN_THEME',
144
- when: 'the theme does not exist; the suggestion is the `new` command',
145
- },
146
- {
147
- code: 'ERR_PROJECT_REQUIRED',
148
- when: '@astryxdesign/core is not installed in the folder',
149
- },
150
- {
151
- code: 'ERR_THEME_BUSY',
152
- when: 'another command is changing the same theme and did not finish within 30 seconds; nothing was changed',
153
- },
154
- {
155
- code: 'ERR_THEME_INVALID',
156
- when: 'the theme does not build (the change is undone)',
157
- },
158
- {
159
- code: 'ERR_DEP_MISSING',
160
- when: "a package the build loads is broken in node_modules (it needs a package it declares, and that package is missing); the suggestion is the app's install command, or, when the run uses a CLI copy of its own (global, one-off or cached) and the app's install does not hold the package that needs it, the message names that copy (a release-cache copy: the folder to remove); nothing was changed",
161
- },
162
- {
163
- code: 'ERR_RENDER_FAILED',
164
- when: "the components or the preview do not render with the project's React",
165
- },
166
- ],
167
- examples: [
168
- {
169
- label: 'A big move with a dial',
170
- code: 'await themeEditSet(...)',
171
- },
172
- ],
173
- command: 'experimental theme editor set',
174
- related: ['themeBuild', 'themePaletteGenerate'],
175
- };
@@ -1,6 +0,0 @@
1
- // @generated by scripts/sync-api-types.mjs from the JSDoc in api/**/*.mjs.
2
- // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
-
4
- /** @file FunctionDoc for `themeEditShow()` / `astryx experimental theme editor show`. */
5
- /** @type {import('@astryxdesign/cli/authoring').FunctionDoc} */
6
- export const doc: import("@astryxdesign/cli/authoring").FunctionDoc;