@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
@@ -40,16 +40,16 @@
40
40
  * @property {string} export - The named export that draws the default variant.
41
41
  * @property {string} import - The import line for the default variant.
42
42
  * @property {string[]} words - Terms a person might search for.
43
- * @property {string[]} definitions - The icon definitions the set's `map` names this icon for.
43
+ * @property {string[]} definitions - The icon meanings the set's `map` names this icon for.
44
44
  * @property {IconVariantEntry[]} variants - Other variants.
45
45
  */
46
46
 
47
47
  /**
48
- * A definition in the same group as another (its family of related
48
+ * A meaning in the same group as another (its family of related
49
49
  * meanings), so a reader picks the one that fits.
50
50
  * @experimental May change or be removed in a patch release.
51
51
  * @typedef {object} IconDefinitionRelative
52
- * @property {string} definition - The related definition's name.
52
+ * @property {string} definition - The related meaning's name.
53
53
  * @property {string} description - What it means.
54
54
  */
55
55
 
@@ -57,9 +57,9 @@
57
57
  * One ranked icon match. When the project picks a look and the match's set
58
58
  * is in its list, `module`, `export`, and `import` draw that look; `look`
59
59
  * is present when the icon does not have it. `relatives` is present when the
60
- * groups of the definitions it draws have other members: those definitions,
60
+ * groups of the meanings it draws have other members: those meanings,
61
61
  * Astryx's and its set's own. In the `icon.search` answer, `meaningImport` is
62
- * present when the set's `map` names the icon for a definition: the import
62
+ * present when the set's `map` names the icon for a meaning: the import
63
63
  * line that names the icon by that meaning
64
64
  * (`import {TrashIcon as DeleteIcon} from '…'`).
65
65
  * @experimental May change or be removed in a patch release.
@@ -67,15 +67,15 @@
67
67
  */
68
68
 
69
69
  /**
70
- * One Astryx icon definition that matches a query when no icon set is
70
+ * One Astryx icon meaning that matches a query when no icon set is
71
71
  * installed.
72
72
  * @experimental May change or be removed in a patch release.
73
73
  * @typedef {object} IconSearchDefinition
74
- * @property {string} name - The definition's name.
74
+ * @property {string} name - The meaning's name.
75
75
  * @property {boolean} builtIn - Core draws it by name with no icon set.
76
- * @property {string} description - What the definition means.
77
- * @property {string} [group] - Present when the definition names one: the family of related definitions it belongs to.
78
- * @property {IconDefinitionRelative[]} [relatives] - Present when its group has other members: those definitions, so a reader picks the one that fits.
76
+ * @property {string} description - What it means.
77
+ * @property {string} [group] - Present when the meaning names one: the family of related meanings it belongs to.
78
+ * @property {IconDefinitionRelative[]} [relatives] - Present when its group has other members: those meanings, so a reader picks the one that fits.
79
79
  */
80
80
 
81
81
  /**
@@ -88,7 +88,7 @@
88
88
  * @property {number} data.matchCount - Every match, before `limit`.
89
89
  * @property {IconMatchEntry[]} data.matches - The ranked matches, at most `limit`.
90
90
  * @property {string} [data.reason] - Present when no icon set is installed: why nothing matches.
91
- * @property {IconSearchDefinition[]} [data.definitions] - Present when no icon set is installed: the Astryx icon definitions that match, built-in ones first, with the built-in that draws in place of a matching definition Core does not draw (`help` brings `info`) unless a match ranked above it has none, at most `limit`.
91
+ * @property {IconSearchDefinition[]} [data.definitions] - Present when no icon set is installed: the Astryx icon meanings that match, built-in ones first, with the built-in that draws in place of a matching meaning Core does not draw (`help` brings `info`) unless a match ranked above it has none, at most `limit`.
92
92
  * @property {string} [data.next] - Present when no icon set is installed: how to get one.
93
93
  */
94
94
 
@@ -113,7 +113,7 @@
113
113
  * @property {number} iconCount
114
114
  * @property {IconSetDefaultVariant | null} default
115
115
  * @property {string[] | null} variants - The variants the set declares: named looks such as outline or solid; size comes from CSS.
116
- * @property {IconSetCoverage} coverage - Which icon definitions the set's `map` covers.
116
+ * @property {IconSetCoverage} coverage - Which icon meanings the set's `map` covers.
117
117
  * @property {boolean} project - Whether this is the project's icon set.
118
118
  * @property {'main' | 'backup' | null} role - The set's place in the project's list: its main set, a backup, or not listed.
119
119
  * @property {number | null} rank - The set's position in the list, the main set at 1; null when it is not listed.
@@ -121,12 +121,12 @@
121
121
  */
122
122
 
123
123
  /**
124
- * Which icon definitions one set's `map` covers.
124
+ * Which icon meanings one set's `map` covers.
125
125
  * @experimental May change or be removed in a patch release.
126
126
  * @typedef {object} IconSetCoverage
127
- * @property {{mapped: number, total: number, missing: string[]}} builtIn - Built-in definitions: every set maps them all.
128
- * @property {{mapped: number, total: number}} astryx - Every Astryx definition, built in or not.
129
- * @property {string[]} own - The definitions the set declares itself, in its `definitions` folder.
127
+ * @property {{mapped: number, total: number, missing: string[]}} builtIn - Built-in meanings: every set maps them all.
128
+ * @property {{mapped: number, total: number}} astryx - Every Astryx meaning, built in or not.
129
+ * @property {string[]} own - The meanings the set declares itself, in its `definitions` folder.
130
130
  */
131
131
 
132
132
  /**
@@ -187,8 +187,8 @@
187
187
  * @typedef {object} IconMapOptions
188
188
  * @property {string} [cwd]
189
189
  * @property {string} [set] - The set to edit, when the package ships several.
190
- * @property {boolean} [remove] - Remove the definition's entry instead.
191
- * @property {string | string[]} [pairs] - Many entries at once, as `<definition>=<icon>` pairs separated by commas or spaces; then no definition or icon is passed. All are checked before any is written.
190
+ * @property {boolean} [remove] - Remove the meaning's entry instead.
191
+ * @property {string | string[]} [pairs] - Many entries at once, as `<definition>=<icon>` pairs separated by commas or spaces; then no meaning or icon is passed. All are checked before any is written.
192
192
  */
193
193
 
194
194
  /**
@@ -203,9 +203,9 @@
203
203
  * @property {Array<{definition: string, icon: string, previous: string | null, changed: boolean}>} data.entries - Each pair, in order, and what it replaced.
204
204
  * @property {boolean} data.changed - Whether the file was written.
205
205
  * @property {{previous: string, module: string}} [data.moduleUpdate] - The data file's `module` before and after this command, when the package was renamed and the command wrote its new name.
206
- * @property {Array<{key: string, definition: string}>} [data.replacedKeys] - Each `map` key that named a replaced icon definition; the command wrote it under the definition that replaced it.
206
+ * @property {Array<{key: string, definition: string}>} [data.replacedKeys] - Each `map` key that named a replaced icon meaning; the command wrote it under the meaning that replaced it.
207
207
  * @property {string[]} [data.files] - The generated module and its types, when its theme map was rewritten.
208
- * @property {IconTemplateMeanings} [data.templateMeanings] - After a write: the icon definitions the bundled templates use that the set's `map` does not name. A copied template renders a placeholder for each in a project that uses this set.
208
+ * @property {IconTemplateMeanings} [data.templateMeanings] - After a write: the icon meanings the bundled templates use that the set's `map` does not name. A copied template renders a placeholder for each in a project that uses this set.
209
209
  */
210
210
 
211
211
  /**
@@ -222,9 +222,9 @@
222
222
  * @property {string | null} data.previous - The icon id it replaced.
223
223
  * @property {boolean} data.changed - Whether the file was written.
224
224
  * @property {{previous: string, module: string}} [data.moduleUpdate] - The data file's `module` before and after this command, when the package was renamed and the command wrote its new name.
225
- * @property {Array<{key: string, definition: string}>} [data.replacedKeys] - Each `map` key that named a replaced icon definition; the command wrote it under the definition that replaced it.
225
+ * @property {Array<{key: string, definition: string}>} [data.replacedKeys] - Each `map` key that named a replaced icon meaning; the command wrote it under the meaning that replaced it.
226
226
  * @property {string[]} [data.files] - The generated module and its types, when its theme map was rewritten.
227
- * @property {IconTemplateMeanings} [data.templateMeanings] - After a write: the icon definitions the bundled templates use that the set's `map` does not name. A copied template renders a placeholder for each in a project that uses this set.
227
+ * @property {IconTemplateMeanings} [data.templateMeanings] - After a write: the icon meanings the bundled templates use that the set's `map` does not name. A copied template renders a placeholder for each in a project that uses this set.
228
228
  */
229
229
 
230
230
  /**
@@ -234,8 +234,8 @@
234
234
  * @property {string} [cwd]
235
235
  * @property {string} from - The module the icon is exported from: a package, a package subpath, or a relative path in this package.
236
236
  * @property {string} [set] - The set to edit, when the package ships several.
237
- * @property {string} [definition] - The icon definition to map the icon to.
238
- * @property {string} [newDefinition] - Add the set's own definition with this name (camelCase, or kebab-case written as camelCase) and map the icon to it.
237
+ * @property {string} [definition] - The icon meaning to map the icon to.
238
+ * @property {string} [newDefinition] - Add the set's own meaning with this name (camelCase, or kebab-case written as camelCase) and map the icon to it.
239
239
  * @property {string} [description] - With `newDefinition`: what the icon is for.
240
240
  * @property {string[]} [words] - With `newDefinition`: words people search for.
241
241
  * @property {boolean} [useDefault] - The module's default export is the icon.
@@ -272,30 +272,30 @@
272
272
  * @property {string} data.package
273
273
  * @property {{id: string, export: string, module: string}} data.icon
274
274
  * @property {string} [data.variant] - The variant, when the export was added as one.
275
- * @property {string | null} data.definition - The definition mapped to the icon.
276
- * @property {string} [data.newDefinition] - The set's own definition the command wrote.
275
+ * @property {string | null} data.definition - The meaning mapped to the icon.
276
+ * @property {string} [data.newDefinition] - The set's own meaning the command wrote.
277
277
  * @property {string[]} data.files - Files written, relative to the package.
278
278
  * @property {boolean} data.changed - Whether anything was written.
279
- * @property {boolean} data.added - Whether the icon, its variant, its `map` entry, or a new definition was added. False when the set already had them, even when `changed` is true because the command wrote a renamed package's new name.
279
+ * @property {boolean} data.added - Whether the icon, its variant, its `map` entry, or a new meaning was added. False when the set already had them, even when `changed` is true because the command wrote a renamed package's new name.
280
280
  * @property {{previous: string, module: string}} [data.moduleUpdate] - The data file's `module` before and after this command, when the package was renamed and the command wrote its new name.
281
281
  * @property {string} [data.note] - What the package still needs, as text to copy: the entry line that exports the icon from the set's module, and the package.json `files` that publishes a `./` source.
282
- * @property {IconTemplateMeanings} [data.templateMeanings] - After a write: the icon definitions the bundled templates use that the set's `map` does not name. A copied template renders a placeholder for each in a project that uses this set.
282
+ * @property {IconTemplateMeanings} [data.templateMeanings] - After a write: the icon meanings the bundled templates use that the set's `map` does not name. A copied template renders a placeholder for each in a project that uses this set.
283
283
  */
284
284
 
285
285
  /**
286
- * One icon definition that fits an export.
286
+ * One icon meaning that fits an export.
287
287
  * @experimental May change or be removed in a patch release.
288
288
  * @typedef {object} IconDefinitionMatch
289
289
  * @property {string} name
290
290
  * @property {string} description
291
- * @property {'astryx' | 'set'} source - Astryx's definition, or the set's own.
291
+ * @property {'astryx' | 'set'} source - Astryx's meaning, or the set's own.
292
292
  * @property {number} score
293
293
  * @property {string} reason
294
294
  * @property {string} command - The `experimental icon add` command that maps the icon to it.
295
295
  */
296
296
 
297
297
  /**
298
- * `astryx --json experimental icon add <Export> --from <module>` with no definition.
298
+ * `astryx --json experimental icon add <Export> --from <module>` with no meaning.
299
299
  * @experimental May change or be removed in a patch release.
300
300
  * @typedef {object} IconDefinitionMatchesResponse
301
301
  * @property {'icon.definitionMatches'} type
@@ -304,7 +304,7 @@
304
304
  * @property {string} data.from
305
305
  * @property {string} data.id - The id the icon would get.
306
306
  * @property {IconDefinitionMatch[]} data.matches - At most 10, best first.
307
- * @property {string | null} data.newDefinition - The command that adds the set's own definition, when no match fits.
307
+ * @property {string | null} data.newDefinition - The command that adds the set's own meaning, when no match fits.
308
308
  * @property {string} [data.variant] - When the set already has an icon for the export's glyph from another export of the library: the command that adds this export as that icon's variant.
309
309
  */
310
310
 
@@ -317,7 +317,7 @@
317
317
  * @property {string} [set] - Keep one set, by name or `<package>/<set>`; with `definitions`, the set whose `map` they are checked against.
318
318
  * @property {number} [limit] - Max matches (default 10).
319
319
  * @property {boolean} [allIcons] - With `set` and no query: every icon of that set.
320
- * @property {boolean} [definitions] - Every Astryx icon definition, and nothing else.
320
+ * @property {boolean} [definitions] - Every Astryx icon meaning, and nothing else.
321
321
  */
322
322
 
323
323
  /**
@@ -327,15 +327,15 @@
327
327
  * @property {'icon.definitions'} type
328
328
  * @property {object} data
329
329
  * @property {string | null} data.set - The set `mapped` describes, as `<package>/<set>`: the one `set` names, else the project's main set, else the only set of the icon-set package the command runs in; null when there is none.
330
- * @property {Array<{name: string, builtIn: boolean, description: string, words: string[], group?: string, replaces?: string, templates: number, mapped?: boolean, fallback?: string}>} data.definitions - Every Astryx icon definition, by name; `builtIn` ones every set maps. `group`: the family of related definitions it belongs to, present when it names one. `replaces`: the older definition it took the place of, whose name answers with it. `templates`: how many bundled templates use it. `mapped`: whether the set's `map` names it, present when `set` is not null. `fallback`: when it is not mapped, the definition's fallback the set maps, which a template icon with it draws by.
330
+ * @property {Array<{name: string, builtIn: boolean, description: string, words: string[], group?: string, replaces?: string, templates: number, mapped?: boolean, fallback?: string}>} data.definitions - Every Astryx icon meaning, by name; `builtIn` ones every set maps. `group`: the family of related meanings it belongs to, present when it names one. `replaces`: the older meaning it took the place of, whose name answers with it. `templates`: how many bundled templates use it. `mapped`: whether the set's `map` names it, present when `set` is not null. `fallback`: when it is not mapped, the meaning's fallback the set maps, which a template icon with it draws by.
331
331
  */
332
332
 
333
333
  /**
334
- * The icon definitions the bundled templates use that a set's `map` does not
334
+ * The icon meanings the bundled templates use that a set's `map` does not
335
335
  * name.
336
336
  * @experimental May change or be removed in a patch release.
337
337
  * @typedef {object} IconTemplateMeanings
338
- * @property {Array<{definition: string, templates: number}>} unmapped - Each such definition and how many bundled templates use it, most used first, then by name, leaving out a definition whose fallback the set maps; empty when the set maps them all.
338
+ * @property {Array<{definition: string, templates: number}>} unmapped - Each such meaning and how many bundled templates use it, most used first, then by name, leaving out a meaning whose fallback the set maps; empty when the set maps them all.
339
339
  */
340
340
 
341
341
  /**
@@ -347,7 +347,7 @@
347
347
  * @property {string} data.set
348
348
  * @property {string} data.package
349
349
  * @property {number} data.iconCount
350
- * @property {Array<{id: string, export: string, words: string[], definitions: string[]}>} data.icons - Every icon, by id, with the definitions `map` names it for.
350
+ * @property {Array<{id: string, export: string, words: string[], definitions: string[]}>} data.icons - Every icon, by id, with the meanings `map` names it for.
351
351
  */
352
352
 
353
353
  /**
@@ -372,9 +372,9 @@
372
372
  * @property {string} [cwd] - A directory inside the icon-set package.
373
373
  * @property {boolean} [dryRun] - Return the receipt without writing.
374
374
  * @property {string} [set] - The set, when the package ships several.
375
- * @property {string} [description] - What an icon with this definition is for.
375
+ * @property {string} [description] - What an icon with this meaning is for.
376
376
  * @property {string[] | string} [words] - Words people search for; a string is split on commas.
377
- * @property {string} [icon] - An icon id to map the definition to.
377
+ * @property {string} [icon] - An icon id to map the meaning to.
378
378
  */
379
379
 
380
380
  /**
@@ -395,11 +395,11 @@
395
395
  * @property {Array<{id: string, from: string, to: string}>} [moved] - On a refresh from a package root: the icons that read one file of that package (`from`) and now import from the root (`to`); each keeps its id, export, `map` entries, variants, and words.
396
396
  * @property {{library: string, path: string}} [licenseNoticeMissing] - With `from`: the wrapped library (`name@version`) ships no license file to copy and the set has none. `path` is where to add a NOTICE file that names the library and its license; the CLI never writes it.
397
397
  * @property {Array<{from: string, to: string}>} [renamed] - On a refresh: the icons whose id this release's id rule changes, matched by the export the library still has; each keeps its `map` entries, variants, and words.
398
- * @property {Array<{definition: string, icon: string}>} [mapped] - With `from`: the `map` entries an icon with the definition's exact name gives (on a refresh, every such entry, kept or new); check each.
399
- * @property {Array<{definition: string, icon: string, word: string}>} [suggestions] - With `from`: for each unmapped Astryx definition, up to three icons it might map to, best first: the definition's name in another spelling or as another name of an icon, ids that start with it, an id or another name that is one of its words, then two-word ids that are a one-word word sized, shaped, or numbered (`grid-2x2`); never a negated form, the opposite direction, or an icon already mapped. `word` is the name or word that matched. Never written.
398
+ * @property {Array<{definition: string, icon: string}>} [mapped] - With `from`: the `map` entries an icon with the meaning's exact name gives (on a refresh, every such entry, kept or new); check each.
399
+ * @property {Array<{definition: string, icon: string, word: string}>} [suggestions] - With `from`: for each unmapped Astryx meaning, up to three icons it might map to, best first: the meaning's name in another spelling or as another name of an icon, ids that start with it, an id or another name that is one of its words, then two-word ids that are a one-word word sized, shaped, or numbered (`grid-2x2`); never a negated form, the opposite direction, or an icon already mapped. `word` is the name or word that matched. Never written.
400
400
  * @property {string[]} [notes] - What the author does next, including each change the package needs that the CLI never makes itself (its entry, peers, scripts), as text to copy.
401
- * @property {{previous: string, module: string}} [moduleUpdate] - On a refresh, an update, or a new definition with `icon`: the data file's `module` before and after this command, when the package was renamed and the command writes its new name.
402
- * @property {IconTemplateMeanings} [templateMeanings] - From `iconNewSet()`, except in a dry run: the icon definitions the bundled templates use that the set's `map` does not name. A copied template renders a placeholder for each in a project that uses this set.
401
+ * @property {{previous: string, module: string}} [moduleUpdate] - On a refresh, an update, or a new meaning with `icon`: the data file's `module` before and after this command, when the package was renamed and the command writes its new name.
402
+ * @property {IconTemplateMeanings} [templateMeanings] - From `iconNewSet()`, except in a dry run: the icon meanings the bundled templates use that the set's `map` does not name. A copied template renders a placeholder for each in a project that uses this set.
403
403
  */
404
404
 
405
405
  /**
@@ -431,8 +431,8 @@
431
431
  * @property {string} name - The set's name.
432
432
  * @property {string} package - The integration package that ships the set.
433
433
  * @property {import('../../authoring/doctypes/icon-set/type').IconSetData} data - The set's data file.
434
- * @property {Array<{doc: Record<string, unknown>}>} definitions - The set's own icon definitions.
435
- * @property {Array<{name: string, definition: string}>} [replacedDefinitions] - The old names of the set's own definitions, each with the current definition it answers with.
434
+ * @property {Array<{doc: Record<string, unknown>}>} definitions - The set's own icon meanings.
435
+ * @property {Array<{name: string, definition: string}>} [replacedDefinitions] - The old names of the set's own meanings, each with the current meaning it answers with.
436
436
  * @property {string} [look] - The look the folder's project draws the set in (`experimental.iconVariant`), when the set is in its list.
437
437
  */
438
438
 
@@ -118,7 +118,7 @@ export const doc = {
118
118
  },
119
119
  {
120
120
  code: 'ERR_INVALID_ARGUMENT',
121
- when: "the export is data rather than a component, a new meaning is named like an Astryx one, or the variant is not one the set declares, is the variant each icon's own export already draws, or is no look word of a library whose export names carry look words, or `id` starts with a digit",
121
+ when: "the export is data rather than a component, a new meaning is named like an Astryx one, or the variant is not one the set declares, is the look each icon's own export already draws, or is no look word of a library whose export names carry look words, or `id` starts with a digit",
122
122
  },
123
123
  {code: 'ERR_FILE_EXISTS', when: 'another icon already has the id'},
124
124
  {
@@ -10,7 +10,7 @@ export const doc = {
10
10
  displayName: 'iconNewSet()',
11
11
  summary: 'Add an icon set to an integration package.',
12
12
  description:
13
- "Creates an integration manifest when the package has none, writes the set directory with its strongly typed same-stem IconSetDoc and a starter data file (schemaVersion 1, module set to the package name, no icons and an empty map yet), and the set's generated module with its declaration file and an empty themeIcons theme map; with from, it wraps a library's icons into them, records the installed library and version as the data file's source, copies the library's license notices into the set, uses the library's license, maps each Astryx meaning whose name is an icon id, and returns up to three likely icons for each other meaning as suggestions (by its name, its words, and the other names the library gives an icon; never a part of a word, a negated form, or the opposite direction), never written. A library whose export names end in style, size and weight words gives one icon per glyph, named without those words, in the variant the set's default variant names, else the library's usual default (outline, regular, the middle weight). With adapter, it declares the data file's adapter, so `from` also wraps a library's data exports through it. Over an existing set with icons, `from` refreshes it (the first `from` into a set with no icons creates them); without `from`, `variants`, `defaultVariant`, `displayName` and `description` update it in place and leave its icons, map and generated module unchanged (a variant an icon has must stay declared, and a set with icons keeps its default variant). It declares the manifest's `experimental.iconSets` root on first use, and includes the manifest and root in package.json files when the package already uses an allowlist. It never writes the package's entry, exports, main, types, files list, peers, or scripts: its notes name each change the package needs as text to copy. Every path is confined to the package, and an existing set is changed only as above. Experimental: it may change or be removed in a patch release.",
13
+ "Creates an integration manifest when the package has none, writes the set directory with its strongly typed same-stem IconSetDoc and a starter data file (schemaVersion 1, module set to the package name, no icons and an empty map yet), and the set's generated module with its declaration file and an empty themeIcons theme map; with from, it wraps a library's icons into them, records the installed library and version as the data file's source, copies the library's license notices into the set, uses the library's license, maps each Astryx meaning whose name is an icon id, and returns up to three likely icons for each other meaning as suggestions (by its name, its words, and the other names the library gives an icon; never a part of a word, a negated form, or the opposite direction), never written. A library whose export names end in style, size and weight words gives one icon per glyph, named without those words, in the look the default variant names, else the library's usual default (outline, regular, the middle weight). With adapter, it declares the data file's adapter, so `from` also wraps a library's data exports through it. Over an existing set with icons, `from` refreshes it (the first `from` into a set with no icons creates them); without `from`, `variants`, `defaultVariant`, `displayName` and `description` update it in place and leave its icons, map and generated module unchanged (a variant an icon has must stay declared, and a set with icons keeps its default variant). It declares the manifest's `experimental.iconSets` root on first use, and includes the manifest and root in package.json files when the package already uses an allowlist. It never writes the package's entry, exports, main, types, files list, peers, or scripts: its notes name each change the package needs as text to copy. Every path is confined to the package, and an existing set is changed only as above. Experimental: it may change or be removed in a patch release.",
14
14
  importPath: '@astryxdesign/cli/api',
15
15
  signature:
16
16
  'iconNewSet(name: string, options?: IconNewSetOptions): Promise<IconNewSetResponse>',
@@ -62,7 +62,7 @@ export const doc = {
62
62
  name: 'options.defaultVariant',
63
63
  type: 'string',
64
64
  description:
65
- "With variants: the variant each icon's own export draws, written to the data file's default. In a library whose export names carry look words, it must be one of the library's look words, and when absent it is the variant the icons' exports draw (with from and no icons yet, the library's usual default), which variants must list. Otherwise, when absent, an existing set keeps its default while variants declares it; a set without icons takes the first variant, and a set with icons and none declared needs it. Without from, a set with icons refuses a default other than the variant they draw; when its icons' export names carry no look words, it refuses one other than its declared default with from too.",
65
+ "With variants: the variant each icon's own export draws, written to the data file's default. In a library whose export names carry look words, it must be one of the library's look words, and when absent it is the look the icons' exports draw (with from and no icons yet, the library's usual default), which variants must list. Otherwise, when absent, an existing set keeps its default while variants declares it; a set without icons takes the first variant, and a set with icons and none declared needs it. Without from, a set with icons refuses a default other than the look they draw; when its icons' export names carry no look words, it refuses one other than its declared default with from too.",
66
66
  },
67
67
  {
68
68
  name: 'options.displayName',
@@ -91,7 +91,7 @@ export const doc = {
91
91
  },
92
92
  {
93
93
  code: 'ERR_INVALID_OPTION',
94
- when: '`exclude` is given without `from`, or `defaultVariant` without `variants`; `variants` leave out the default variant: the variant the icons draw in a library whose export names carry look words, or the declared default of a set with icons whose export names carry no look words; or such a set declares no default and `defaultVariant` names none',
94
+ when: '`exclude` is given without `from`, or `defaultVariant` without `variants`; `variants` leave out the default variant: the look the icons draw in a library whose export names carry look words, or the declared default of a set with icons whose export names carry no look words; or such a set declares no default and `defaultVariant` names none',
95
95
  },
96
96
  {
97
97
  code: 'ERR_FILE_EXISTS',
@@ -10,9 +10,9 @@ export const doc = {
10
10
  namespace: 'cli/api',
11
11
  stability: 'experimental',
12
12
  displayName: 'iconUse()',
13
- summary: "Choose the project's main icon set, backups, and variant.",
13
+ summary: "Choose the project's main icon set, backups, and look.",
14
14
  description:
15
- "Writes `experimental.iconSet` in the project's astryx.config (creating astryx.config.mjs when there is none), so templates and blocks the project copies use that set's icons. With no backups it writes the set name as a string. With backups it writes a list, the main set first and then each backup in order: a copied template takes each icon from the first set in the list that has its meaning, and draws a placeholder the copied file declares when none has it. With `variant`, it writes `experimental.iconVariant` in the same write: the variant every icon draws, one of the main set's variants. Each set in the list draws its variant of that name, or its default variant when it declares none (`looks`), and `themeMap` names the export a theme sets as `icons` to draw the built-in icons in that variant. Without `variant`, it removes `experimental.iconVariant`, so each set draws its default variant. Every set must be installed; a name two installed packages both ship is refused with each `<package>/<set>` form. The receipt lists installed sets the list leaves out (`unlisted`), which Doctor fails, with the command that adds them. Experimental: it may change or be removed in a patch release.",
15
+ "Writes `experimental.iconSet` in the project's astryx.config (creating astryx.config.mjs when there is none), so templates and blocks the project copies use that set's icons. With no backups it writes the set name as a string. With backups it writes a list, the main set first and then each backup in order: a copied template takes each icon from the first set in the list that has its meaning, and draws a placeholder the copied file declares when none has it. With `variant`, it writes `experimental.iconVariant` in the same write: the look every icon draws, one of the main set's variants. Each set in the list draws its variant of that name, or its default look when it declares none (`looks`), and `themeMap` names the export a theme sets as `icons` to draw the built-in icons in that look. Without `variant`, it removes `experimental.iconVariant`, so each set draws its default look. Every set must be installed; a name two installed packages both ship is refused with each `<package>/<set>` form. The receipt lists installed sets the list leaves out (`unlisted`), which Doctor fails, with the command that adds them. Experimental: it may change or be removed in a patch release.",
16
16
  importPath: '@astryxdesign/cli/api',
17
17
  signature:
18
18
  'iconUse(set: string, options?: {cwd?: string, backups?: string[], variant?: string}): Promise<IconUseResponse>',
@@ -51,14 +51,14 @@ export const doc = {
51
51
  name: 'options.variant',
52
52
  type: 'string',
53
53
  description:
54
- "The variant every icon draws, such as `outline` or `filled`: one of the main set's variants. Leave it out to remove `experimental.iconVariant`, so each set draws its default variant.",
54
+ "The look every icon draws, such as `outline` or `filled`: one of the main set's variants. Leave it out to remove `experimental.iconVariant`, so each set draws its default look.",
55
55
  },
56
56
  ],
57
57
  returns: [
58
58
  {
59
59
  type: 'icon.use',
60
60
  description:
61
- "The main set and the backups written, the sets they name, the variant written (`variant`, or null), the config file, whether it was created, the values it replaced (`previous`, `previousVariant`), the installed sets the list leaves out (`unlisted`, with a `next` command), with `variant`, the variant each listed set draws (`looks`) and the main set's theme map for that variant (`themeMap`), and a `warning` when the project's @astryxdesign/cli range admits a release that refuses the config: before 0.7.4 for a string, before 0.7.12 for a list, before 0.7.16 for a variant.",
61
+ "The main set and the backups written, the sets they name, the variant written (`variant`, or null), the config file, whether it was created, the values it replaced (`previous`, `previousVariant`), the installed sets the list leaves out (`unlisted`, with a `next` command), with a variant the look each listed set draws (`looks`) and the main set's theme map for that look (`themeMap`), and a `warning` when the project's @astryxdesign/cli range admits a release that refuses the config: before 0.7.4 for a string, before 0.7.12 for a list, before 0.7.16 for a variant.",
62
62
  },
63
63
  ],
64
64
  throws: [
@@ -98,7 +98,7 @@ export const doc = {
98
98
  code: "await iconUse('outline', {backups: ['@acme/brand-icons/brand']});",
99
99
  },
100
100
  {
101
- label: 'Draw every icon in one variant',
101
+ label: 'Draw every icon in one look',
102
102
  code: "await iconUse('brand', {variant: 'filled'});",
103
103
  },
104
104
  ],
@@ -17,7 +17,7 @@ export const doc = {
17
17
  summary:
18
18
  "Ranks stored icon indexes with icon()'s own ranking: an index made in one folder answers as icon() does there.",
19
19
  description:
20
- "Ranks the sets of every index together, with the same ranking as {@link function:icon}. An index made with `exportIconIndex()` in one folder answers a word search exactly as `icon(query)` does in that folder: the same matches, order, scores, and `matchCount`. A `<set>/<id>` query, which `icon()` reads as one icon, is refused. Indexes made in separate folders are ranked as one list, in the order they are given: equal scores keep that order, as `icon()` keeps a project's set order. An index holds no project order, so no set leads unless its index comes first; each set draws the variant its index carries. `set` keeps one set, by name or `<package>/<set>`, with the errors `icon()` gives. Every index must come from this CLI's version, because the sets' shape is the ranker's input. Experimental: it may change or be removed in a patch release.",
20
+ "Ranks the sets of every index together, with the same ranking as {@link function:icon}. An index made with `exportIconIndex()` in one folder answers a word search exactly as `icon(query)` does in that folder: the same matches, order, scores, and `matchCount`. A `<set>/<id>` query, which `icon()` reads as one icon, is refused. Indexes made in separate folders are ranked as one list, in the order they are given: equal scores keep that order, as `icon()` keeps a project's set order. An index holds no project order, so no set leads unless its index comes first; each set draws the look its index carries. `set` keeps one set, by name or `<package>/<set>`, with the errors `icon()` gives. Every index must come from this CLI's version, because the sets' shape is the ranker's input. Experimental: it may change or be removed in a patch release.",
21
21
  importPath: '@astryxdesign/cli/api',
22
22
  signature:
23
23
  'rankIconIndex(query: string, indexes: IconIndex | IconIndex[], options?: {set?: string, limit?: number}): Promise<IconSearchResponse>',
@@ -77,21 +77,21 @@ function checkVariant(main, selector, backups, variant) {
77
77
  const fallback = main.data.default?.variant;
78
78
  throw new AstryxError(
79
79
  declared.length === 0
80
- ? `Icon set "${iconSetKey(main)}" declares no variants, so it takes no --variant.`
80
+ ? `Icon set "${iconSetKey(main)}" declares no variants: it draws one look, so it takes no --variant.`
81
81
  : `Icon set "${iconSetKey(main)}" declares no "${variant}" variant. Its variants: ${declared.join(', ')}.`,
82
82
  declared.length === 0
83
83
  ? [
84
84
  {
85
85
  name: iconUseCommand(selector, backups),
86
- reason: 'use it as it is',
86
+ reason: 'use it in its one look',
87
87
  },
88
88
  ]
89
89
  : declared.map(each => ({
90
90
  name: iconUseCommand(selector, backups, each),
91
91
  reason:
92
92
  each === fallback
93
- ? `its default variant, ${each}`
94
- : `its ${each} variant`,
93
+ ? `its default look, ${each}`
94
+ : `its ${each} look`,
95
95
  })),
96
96
  ERROR_CODES.ERR_INVALID_ARGUMENT,
97
97
  );
@@ -108,7 +108,6 @@ export function getNextSteps(invocation, cwd = process.cwd()) {
108
108
  " import { themes, defaultThemeSlug } from './astryx-themes'",
109
109
  ' <Theme theme={themes[defaultThemeSlug]}>...</Theme>',
110
110
  ` Extend an imported theme to customize it. Run \`${invocation} theme eject <slug>\` only to fork source.`,
111
- ` To make or change a theme: the experimental theme editor, \`${invocation} experimental theme editor new <name> --like neutral\` (then editor set / editor how).`,
112
111
  ` 5. ${invocation} --help for all commands`,
113
112
  '',
114
113
  ];
@@ -387,7 +387,7 @@ export function applyWrites(plans) {
387
387
  staged.push({...plan, temporary, original, mode});
388
388
  }
389
389
 
390
- // Under a folder lock (the theme editor's), a run that lost the lock
390
+ // Under a folder lock, a run that lost the lock
391
391
  // while it was stopped publishes nothing. Outside a lock this does
392
392
  // nothing.
393
393
  stillHolds();
@@ -888,7 +888,13 @@ async function pagePictures(output, cwd, input) {
888
888
  // The system temp folder, as for a template's scratch copy: never a disk's
889
889
  // root or a folder that holds the home folder.
890
890
  const [temp] = tempFolders();
891
- if (!temp) return {skipped: 'there is no system temp folder to write them to (a disk root or a folder holding the home folder is not one)'};
891
+ if (!temp) {
892
+ // Node reads the temp folder from TEMP on Windows and from TMPDIR elsewhere.
893
+ const tempVariable = process.platform === 'win32' ? 'TEMP' : 'TMPDIR';
894
+ return {
895
+ skipped: `there is no system temp folder to write them to (a disk root or a folder holding the home folder is not one); set ${tempVariable} to a writable folder outside the home folder, then run the command again`,
896
+ };
897
+ }
892
898
  /** @type {string} */
893
899
  let dir;
894
900
  try {
@@ -1,6 +1,6 @@
1
1
  # Search ordering data
2
2
 
3
- `astryx search` decides **what matches**, and each match's score and reason, with the lexical ranker (`_lexical.mjs` and the files it imports). The files in this folder only decide **the order of matches inside one score band**: they never add or drop a match, change a score, or move a match past one of another band or kind (doc or not), except a family root the lexical ranker marks, which moves directly before its part (below). The bands are scores 195 and up, 188–194, 170–187, 160–169, 151–159, 100–150, 55–99, and under 55. A band can be wide (55–99 holds keyword matches beside one-word description hits), so inside a band a lower score can lead a higher one. In search's own reading of the catalog (`searchView` in `_named-keywords.mjs`), another entry's name is that entry's evidence: a component a block uses (its doc's `componentsUsed`) can make the block's answer to a query word stronger but never answers a word alone, so it never lifts the block into the every-word tier (`_score.mjs`), while the order files here still read it as the block's docs text (`_entries.mjs`, `_fit-order.mjs`); an entry that is not a doc takes that tier only with two strong query words, each a keyword-strength hit or a word of its own name, display name or title, or the start of one, since one strong word and a mention of the others matches that word, not the ask, while a doc, which answers in prose, needs one (`_score.mjs`); a title inside the query takes the title tier only when every query word it leaves unanswered names no component or hook, or also names a doc; and a match whose name of two or more words the query writes as one whole word (`TableSortableTable`, `table-sortable-table`, a doc's `tokens-color`) leads the answer, alone or inside a longer query, unless a longer named run of the query, or a block's display name or a doc's title or heading that the query holds (`heldTitle` in `_titles.mjs`, as the title tier reads it), contains it (`_lexical.mjs`). An entry whose name of three or more words the query spells out as words apart, every word in order and at most one word misspelled with its first letter kept, as the lexical scorer reads a misspelled name (`pagination dots carousle`), leads its band, also ahead of its family's root, unless a longer name the query names, or another entry's display name or title the query holds, contains it; two words apart stay plain language (`_lexical.mjs`). The order files keep such an entry first in its run. In that reading, a doc that opens a level (a docs-tree namespace, holding the docs under its route as `_summarizes`) does not answer a query word through its text (its prose, or a code term or table cell its keywords gather) when a doc beneath it answers that word at least as strongly (`_candidate-score.mjs`); its name, title, description and declared keywords stay its own. `searchCore`, which build reads, keeps the gathered reading.
3
+ `astryx search` decides **what matches**, and each match's score and reason, with the lexical ranker (`_lexical.mjs` and the files it imports). The files in this folder only decide **the order of matches inside one score band**: they never add or drop a match, change a score, or move a match past one of another band or kind (doc or not), except a family root the lexical ranker marks, which moves directly before its part (below). The bands are scores 195 and up, 188–194, 170–187, 160–169, 151–159, 100–150, 55–99, and under 55. A band can be wide (55–99 holds keyword matches beside one-word description hits), so inside a band a lower score can lead a higher one. In search's own reading of the catalog (`searchView` in `_named-keywords.mjs`), another entry's name is that entry's evidence: a component a block uses (its doc's `componentsUsed`) can make the block's answer to a query word stronger but never answers a word alone, so it never lifts the block into the every-word tier (`_score.mjs`), while the order files here still read it as the block's docs text (`_entries.mjs`, `_fit-order.mjs`); an entry that is not a doc takes that tier only with two strong query words, each a keyword-strength hit or a word of its own name, display name or title, or the start of one, since one strong word and a mention of the others matches that word, not the ask, while a doc, which answers in prose, needs one (`_score.mjs`); a query word of 3+ letters, as typed, that is a whole word of a component's or hook's name is a name hit (`name contains`), however short against the name (`list` in MetadataList), while a hook's leading `use` and a template's name keep the half-the-name rule (`_candidate-score.mjs`); a title inside the query takes the title tier only when every query word it leaves unanswered names no component or hook, or also names a doc; and a match whose name of two or more words the query writes as one whole word (`TableSortableTable`, `table-sortable-table`, a doc's `tokens-color`) leads the answer, alone or inside a longer query, unless a longer named run of the query, or a block's display name or a doc's title or heading that the query holds (`heldTitle` in `_titles.mjs`, as the title tier reads it), contains it (`_lexical.mjs`). An entry whose name of three or more words the query spells out as words apart, every word in order and at most one word misspelled with its first letter kept, as the lexical scorer reads a misspelled name (`pagination dots carousle`), leads its band, also ahead of its family's root, unless a longer name the query names, or another entry's display name or title the query holds, contains it; two words apart stay plain language (`_lexical.mjs`). The order files keep such an entry first in its run. In that reading, a doc that opens a level (a docs-tree namespace, holding the docs under its route as `_summarizes`) does not answer a query word through its text (its prose, or a code term or table cell its keywords gather) when a doc beneath it answers that word at least as strongly (`_candidate-score.mjs`); its name, title, description and declared keywords stay its own. `searchCore`, which build reads, keeps the gathered reading.
4
4
 
5
5
  ## Rule
6
6
 
@@ -15,6 +15,7 @@
15
15
  * 80 name Levenshtein distance 1 (one-word lookups, words of 5+ letters)
16
16
  * 70 keyword word prefix / distance 1 (distance: one-word lookups, 5+ letters)
17
17
  * 60 name word prefix (>=4 chars, >=50% coverage)
18
+ * 60 whole word of a component or hook name (>=3 chars; search's reading)
18
19
  * 60 exact weak-keyword match
19
20
  * 50 description / prose mentions the term
20
21
  * 45 usage guidance mentions the term
@@ -44,6 +45,7 @@ import {
44
45
  wordsOf,
45
46
  joined,
46
47
  typoDistance,
48
+ isATermWordOf,
47
49
  } from './_words.mjs';
48
50
  import {pluralOf} from './_query.mjs';
49
51
 
@@ -409,6 +411,24 @@ export function scoreCandidate(
409
411
  consider(90, `name "${candidateName}" ends in "${term}"`);
410
412
  } else if (startsATermWordOf(t, candidateName)) {
411
413
  consider(60, `name contains "${term}"`);
414
+ } else if (
415
+ ownEvidence &&
416
+ !synonym &&
417
+ (domain === 'component' || domain === 'hook') &&
418
+ term.length >= 3 &&
419
+ isATermWordOf(
420
+ t,
421
+ domain === 'hook'
422
+ ? candidateName.replace(/^use(?=[A-Z])/, '')
423
+ : candidateName,
424
+ )
425
+ ) {
426
+ // In search's reading, a query word of 3+ letters that is a whole
427
+ // word of a component's or hook's name is a name hit however short
428
+ // against the name: `list` in MetadataList. A hook's leading `use`,
429
+ // which nearly every hook name starts with, is no such word, and a
430
+ // synonym standing in for a query word is not the word itself.
431
+ consider(60, `name contains "${term}"`);
412
432
  }
413
433
  if (fuzzy) {
414
434
  const dist = typoDistance(term, nameLower);
@@ -63,6 +63,14 @@ export function startsAWordOf(term: string, text: string): boolean;
63
63
  * @returns {boolean}
64
64
  */
65
65
  export function startsATermWordOf(t: TermWords, text: string): boolean;
66
+ /**
67
+ * Whether a term is one of a text's words, in any of its forms, however short
68
+ * against the whole text: `chat` in ChatComposer.
69
+ * @param {TermWords} t
70
+ * @param {string} text - The name or keyword as authored.
71
+ * @returns {boolean}
72
+ */
73
+ export function isATermWordOf(t: TermWords, text: string): boolean;
66
74
  /**
67
75
  * Whether a term is one of a text's words, or the start of one, however
68
76
  * short against the whole text: `avata` in AvatarGroupInteractive.
@@ -205,6 +205,21 @@ export function startsATermWordOf(t, text) {
205
205
  return false;
206
206
  }
207
207
 
208
+ /**
209
+ * Whether a term is one of a text's words, in any of its forms, however short
210
+ * against the whole text: `chat` in ChatComposer.
211
+ * @param {TermWords} t
212
+ * @param {string} text - The name or keyword as authored.
213
+ * @returns {boolean}
214
+ */
215
+ export function isATermWordOf(t, text) {
216
+ const words = wordsOf(text);
217
+ for (let i = 0; i < words.length; i++) {
218
+ if (sameTermWord(t, words[i])) return true;
219
+ }
220
+ return false;
221
+ }
222
+
208
223
  /**
209
224
  * Whether a term is one of a text's words, or the start of one, however
210
225
  * short against the whole text: `avata` in AvatarGroupInteractive.
@@ -140,7 +140,7 @@ export type TemplateIconsReport = {
140
140
  */
141
141
  order?: string[] | undefined;
142
142
  /**
143
- * The variant the project's icons draw, as `experimental.iconVariant` names it; present when it is set.
143
+ * The look the project's icons draw, as `experimental.iconVariant` names it; present when it is set.
144
144
  */
145
145
  variant?: string | undefined;
146
146
  /**
@@ -148,7 +148,7 @@ export type TemplateIconsReport = {
148
148
  */
149
149
  reason: string;
150
150
  /**
151
- * Icons rewritten to the first set in the project's list that has them, and the rule that chose each one: a reviewed `exact` or `strong` match, the icon the set's `map` names for the icon meaning the template declares, or `variant`, an icon the template already imports from a set in the list, moved to its export for the project's variant. `target.set` names the set used. `dropped` names the library's sizing props (`size`, `strokeWidth`, `absoluteStrokeWidth`) removed from the icon's elements: an icon set's icons take their size from CSS. `variant` is present when the variant asked for, the project's variant or else the variant the template's icon draws, is one the set's icon does not have: that variant and the set's default variant used instead.
151
+ * Icons rewritten to the first set in the project's list that has them, and the rule that chose each one: a reviewed `exact` or `strong` match, the icon the set's `map` names for the icon meaning the template declares, or `variant`, an icon the template already imports from a set in the list, moved to its export for the project's variant. `target.set` names the set used. `dropped` names the library's sizing props (`size`, `strokeWidth`, `absoluteStrokeWidth`) removed from the icon's elements: an icon set's icons take their size from CSS. `variant` is present when the look asked for, the project's variant or else the look the template's icon draws, is one the set's icon does not have: that look and the set's default look used instead.
152
152
  */
153
153
  mapped: Array<{
154
154
  source: {
@@ -105,9 +105,9 @@
105
105
  * @property {'selected' | 'none' | 'ambiguous' | 'missing' | 'withdrawn'} status The project's icon-set state.
106
106
  * @property {string | null} set The project's main icon set as `<package>/<set>`, when selected.
107
107
  * @property {string[]} [order] The main set and each backup set as `<package>/<set>`, in the order icons are looked up; present when the project lists backups.
108
- * @property {string} [variant] The variant the project's icons draw, as `experimental.iconVariant` names it; present when it is set.
108
+ * @property {string} [variant] The look the project's icons draw, as `experimental.iconVariant` names it; present when it is set.
109
109
  * @property {string} reason Why the project has that set, or none.
110
- * @property {Array<{source: {module: string, export: string}, target: {set: string, package: string, id: string, module: string, export: string}, by: 'match' | 'definition' | 'variant', dropped?: string[], variant?: {asked: string, used: string | null}}>} mapped Icons rewritten to the first set in the project's list that has them, and the rule that chose each one: a reviewed `exact` or `strong` match, the icon the set's `map` names for the icon meaning the template declares, or `variant`, an icon the template already imports from a set in the list, moved to its export for the project's variant. `target.set` names the set used. `dropped` names the library's sizing props (`size`, `strokeWidth`, `absoluteStrokeWidth`) removed from the icon's elements: an icon set's icons take their size from CSS. `variant` is present when the variant asked for, the project's variant or else the variant the template's icon draws, is one the set's icon does not have: that variant and the set's default variant used instead.
110
+ * @property {Array<{source: {module: string, export: string}, target: {set: string, package: string, id: string, module: string, export: string}, by: 'match' | 'definition' | 'variant', dropped?: string[], variant?: {asked: string, used: string | null}}>} mapped Icons rewritten to the first set in the project's list that has them, and the rule that chose each one: a reviewed `exact` or `strong` match, the icon the set's `map` names for the icon meaning the template declares, or `variant`, an icon the template already imports from a set in the list, moved to its export for the project's variant. `target.set` names the set used. `dropped` names the library's sizing props (`size`, `strokeWidth`, `absoluteStrokeWidth`) removed from the icon's elements: an icon set's icons take their size from CSS. `variant` is present when the look asked for, the project's variant or else the look the template's icon draws, is one the set's icon does not have: that look and the set's default look used instead.
111
111
  * @property {Array<{source: {module: string, export: string}, target: {local: string}, definitions: string[], fixes: string[], dropped?: string[], suggestion?: {set: string, id: string, module: string, export: string, confidence: 'likely'}}>} placeholder Icons with a meaning that no set in the project's list has. The template's original import is removed. The written code declares a small placeholder component once (`target.local`, `MissingIcon` unless the file already uses that name), and each use of the icon renders it, with a comment that names the meaning. It needs no package. `fixes` are the commands that give it a real icon: map the meaning in the main set, or add a backup set that has it.
112
112
  * @property {Array<{module: string | null, export: string, reason: string, suggestion?: {set: string, id: string, module: string, export: string, confidence: 'likely'}}>} kept Icons left as the template wrote them, with why, and a `likely` reviewed match as a suggestion when the project set has one. Every declared key is mapped, a placeholder, or kept; `module` is null for a key the template does not import, and `export` is `default` for a default import and `*` for a namespace import.
113
113
  * @property {Array<{set: string, license: string, icons: number}>} sets Each set the mapped icons come from, as `<package>/<set>`, with its license and how many icons it gave.