@astryxdesign/cli 0.7.16 → 0.7.17-canary.g16fe6a8

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 (380) hide show
  1. package/README.md +76 -86
  2. package/api/build/_adapter.d.mts +12 -0
  3. package/api/build/_adapter.mjs +51 -34
  4. package/api/build/blocks/blocks.d.mts +7 -5
  5. package/api/build/blocks/blocks.mjs +113 -26
  6. package/api/build/build.doc.mjs +4 -3
  7. package/api/build/build.type.d.mts +2 -2
  8. package/api/build/build.type.mjs +3 -3
  9. package/api/build/kit/kind.d.mts +2 -1
  10. package/api/build/kit/kind.mjs +199 -10
  11. package/api/build/kit/kit.mjs +6 -4
  12. package/api/build/kit/rank.d.mts +4 -2
  13. package/api/build/kit/rank.mjs +125 -24
  14. package/api/build/kit/start.d.mts +5 -4
  15. package/api/build/kit/start.mjs +12 -8
  16. package/api/build/kit/weights.d.mts +39 -3
  17. package/api/build/kit/weights.json +1 -1
  18. package/api/build/kit/weights.mjs +340 -43
  19. package/api/build/kit/word-model.d.mts +23 -0
  20. package/api/build/kit/word-model.mjs +46 -0
  21. package/api/build/kit/words.d.mts +48 -0
  22. package/api/build/kit/words.mjs +90 -1
  23. package/api/component/__fixtures__/resolutions/modules.txt +4 -5
  24. package/api/component/list/list.d.mts +1 -1
  25. package/api/component/list/list.mjs +48 -6
  26. package/api/discover/_adapter.d.mts +1 -1
  27. package/api/discover/search/search.mjs +3 -2
  28. package/api/docs/_adapter.d.mts +28 -2
  29. package/api/docs/_adapter.mjs +249 -10
  30. package/api/docs/docs.d.mts +3 -0
  31. package/api/docs/docs.doc.mjs +7 -1
  32. package/api/docs/docs.mjs +12 -0
  33. package/api/docs/docs.type.d.mts +5 -0
  34. package/api/docs/docs.type.mjs +2 -0
  35. package/api/docs/node/node.mjs +1 -1
  36. package/api/doctor/_adapter.d.mts +27 -5
  37. package/api/doctor/_adapter.mjs +83 -10
  38. package/api/doctor/built-checks.mjs +40 -14
  39. package/api/doctor/doctor.d.mts +4 -3
  40. package/api/doctor/doctor.mjs +14 -7
  41. package/api/doctor/theme-checks.mjs +121 -17
  42. package/api/icon/_records.mjs +2 -1
  43. package/api/index.d.mts +2 -0
  44. package/api/index.mjs +2 -0
  45. package/api/integration/_adapter.d.mts +44 -0
  46. package/api/integration/_adapter.mjs +77 -1
  47. package/api/integration/authoring-checks.mjs +6 -6
  48. package/api/integration/example-scope.d.mts +14 -0
  49. package/api/integration/example-scope.mjs +44 -0
  50. package/api/integration/example-scope.type.d.mts +29 -0
  51. package/api/integration/example-scope.type.mjs +25 -0
  52. package/api/integration/integrationExampleScope.doc.d.mts +11 -0
  53. package/api/integration/integrationExampleScope.doc.mjs +59 -0
  54. package/api/integration/validate-integration.mjs +19 -1
  55. package/api/integration/validate-integration.type.d.mts +9 -0
  56. package/api/integration/validate-integration.type.mjs +1 -1
  57. package/api/integration/validateIntegration.doc.mjs +1 -1
  58. package/api/render/_adapter.mjs +591 -195
  59. package/api/render/render.doc.mjs +11 -3
  60. package/api/render/render.type.d.mts +52 -0
  61. package/api/render/render.type.mjs +31 -1
  62. package/api/search/ORDERING.md +1 -1
  63. package/api/search/_adapter.d.mts +9 -0
  64. package/api/search/_adapter.mjs +85 -0
  65. package/api/search/_candidate-score.mjs +51 -32
  66. package/api/search/_fit-order.mjs +3 -3
  67. package/api/search/_gather-components.d.mts +3 -2
  68. package/api/search/_gather-components.mjs +12 -3
  69. package/api/search/_lexical.d.mts +5 -0
  70. package/api/search/_lexical.mjs +8 -2
  71. package/api/search/_result.d.mts +11 -9
  72. package/api/search/_result.mjs +4 -4
  73. package/api/search/_score.d.mts +6 -1
  74. package/api/search/_score.mjs +15 -3
  75. package/api/search/search-index.mjs +7 -1
  76. package/api/search/search.d.mts +1 -1
  77. package/api/theme/_adapter.mjs +12 -1
  78. package/api/theme/build/build.d.mts +132 -1
  79. package/api/theme/build/build.mjs +482 -157
  80. package/api/theme/build/core-interception.d.mts +10 -0
  81. package/api/theme/build/core-interception.mjs +10 -0
  82. package/api/theme/build/font-warning.d.mts +44 -5
  83. package/api/theme/build/font-warning.mjs +118 -10
  84. package/api/theme/build/icon-imports.mjs +51 -9
  85. package/api/theme/theme.type.d.mts +10 -0
  86. package/api/theme/theme.type.mjs +7 -1
  87. package/api/theme-edit/_adapter.d.mts +115 -4
  88. package/api/theme-edit/_adapter.mjs +997 -83
  89. package/api/theme-edit/_catalog.d.mts +20 -2
  90. package/api/theme-edit/_catalog.mjs +50 -10
  91. package/api/theme-edit/_check.d.mts +75 -24
  92. package/api/theme-edit/_check.mjs +2672 -422
  93. package/api/theme-edit/_color.d.mts +10 -0
  94. package/api/theme-edit/_color.mjs +54 -1
  95. package/api/theme-edit/_compiler.d.mts +1 -0
  96. package/api/theme-edit/_compiler.mjs +133 -15
  97. package/api/theme-edit/_context.d.mts +14 -3
  98. package/api/theme-edit/_context.mjs +225 -65
  99. package/api/theme-edit/_css.d.mts +14 -0
  100. package/api/theme-edit/_css.mjs +46 -1
  101. package/api/theme-edit/_edit.d.mts +54 -4
  102. package/api/theme-edit/_edit.mjs +2966 -286
  103. package/api/theme-edit/_how-commands.d.mts +72 -1
  104. package/api/theme-edit/_how-commands.mjs +770 -9
  105. package/api/theme-edit/_how-question.d.mts +82 -5
  106. package/api/theme-edit/_how-question.mjs +6983 -701
  107. package/api/theme-edit/_how.d.mts +2 -1
  108. package/api/theme-edit/_how.mjs +237 -41
  109. package/api/theme-edit/_importers.d.mts +38 -0
  110. package/api/theme-edit/_importers.mjs +188 -0
  111. package/api/theme-edit/_marks.d.mts +31 -5
  112. package/api/theme-edit/_marks.mjs +57 -5
  113. package/api/theme-edit/_name-rule.d.mts +11 -0
  114. package/api/theme-edit/_name-rule.mjs +12 -0
  115. package/api/theme-edit/_normal.d.mts +303 -0
  116. package/api/theme-edit/_normal.mjs +1517 -0
  117. package/api/theme-edit/_palette.d.mts +12 -0
  118. package/api/theme-edit/_palette.mjs +37 -4
  119. package/api/theme-edit/_part-words.d.mts +31 -0
  120. package/api/theme-edit/_part-words.mjs +126 -0
  121. package/api/theme-edit/_parts.d.mts +28 -2
  122. package/api/theme-edit/_parts.mjs +267 -31
  123. package/api/theme-edit/_preview-app.d.mts +7 -13
  124. package/api/theme-edit/_preview-app.mjs +814 -406
  125. package/api/theme-edit/_preview.d.mts +116 -16
  126. package/api/theme-edit/_preview.mjs +649 -152
  127. package/api/theme-edit/_project.d.mts +22 -1
  128. package/api/theme-edit/_project.mjs +83 -3
  129. package/api/theme-edit/_settings.d.mts +467 -42
  130. package/api/theme-edit/_settings.mjs +3527 -468
  131. package/api/theme-edit/_tables.d.mts +21 -0
  132. package/api/theme-edit/_tables.mjs +97 -3
  133. package/api/theme-edit/_vet.d.mts +31 -0
  134. package/api/theme-edit/_vet.mjs +114 -8
  135. package/api/theme-edit/theme-edit.type.d.mts +16 -2
  136. package/api/theme-edit/theme-edit.type.mjs +6 -3
  137. package/api/theme-edit/themeEditHow.doc.mjs +1 -1
  138. package/api/theme-edit/themeEditNew.doc.d.mts +0 -1
  139. package/api/theme-edit/themeEditNew.doc.mjs +7 -4
  140. package/api/theme-edit/themeEditPreviewApp.doc.mjs +3 -3
  141. package/api/theme-edit/themeEditPreviewRemove.doc.mjs +2 -2
  142. package/api/upgrade/run/run.mjs +4 -3
  143. package/assets/codemods/integration-discovery.mjs +2 -1
  144. package/assets/codemods/run-codemod.mjs +87 -7
  145. package/assets/codemods/transforms/next/index.mjs +11 -1
  146. package/assets/codemods/transforms/next/migrate-item-swipe-actions-to-swipe.mjs +394 -0
  147. package/assets/component-list.generated.json +1 -0
  148. package/assets/docs/author-a-theme.doc.mjs +1 -0
  149. package/assets/docs/theme.doc.dense.mjs +2 -2
  150. package/assets/docs/theme.doc.mjs +1 -1
  151. package/assets/docs/tree/check-your-docs.doc.mjs +1 -1
  152. package/assets/docs/tree/checks.doc.mjs +1 -1
  153. package/assets/docs/tree/cli-command.doc.mjs +2 -3
  154. package/assets/docs/tree/render-pages.doc.mjs +44 -3
  155. package/assets/docs/tree/share-a-page.doc.mjs +157 -0
  156. package/assets/docs/tree/single-component.doc.mjs +4 -0
  157. package/assets/docs/tree/template-doc-overview.doc.mjs +1 -1
  158. package/assets/docs/tree/test-in-an-app.doc.mjs +1 -1
  159. package/assets/docs/use-a-theme.doc.mjs +1 -1
  160. package/assets/docs.generated.json +2 -2
  161. package/assets/search-catalog.generated.json +2 -0
  162. package/assets/self-audit.generated.json +1 -1
  163. package/assets/templates/blocks/components/ChatComposerInput/useChatDictationHookUsage.doc.mjs +14 -0
  164. package/assets/templates/blocks/components/ChatComposerInput/useChatDictationHookUsage.tsx +38 -0
  165. package/assets/templates/blocks/components/Hooks/useContainerRevealHookUsage.tsx +2 -2
  166. package/assets/templates/blocks/components/SyntaxTheme/useSyntaxThemeHookUsage.doc.mjs +14 -0
  167. package/assets/templates/blocks/components/SyntaxTheme/useSyntaxThemeHookUsage.tsx +36 -0
  168. package/assets/templates/components.generated.json +1 -1
  169. package/assets/templates/pages/ai-chat/template.doc.mjs +5 -4
  170. package/assets/templates/pages/ai-chat-landing/template.doc.mjs +5 -1
  171. package/assets/templates/pages/blank/template.doc.mjs +1 -1
  172. package/assets/templates/pages/canvas-editor/template.doc.mjs +4 -2
  173. package/assets/templates/pages/centered-hero/template.doc.mjs +9 -1
  174. package/assets/templates/pages/classic-gallery/template.doc.mjs +1 -1
  175. package/assets/templates/pages/contact-form/template.doc.mjs +2 -1
  176. package/assets/templates/pages/dashboard/template.doc.mjs +3 -2
  177. package/assets/templates/pages/dashboard-alert-rail/template.doc.mjs +2 -1
  178. package/assets/templates/pages/dashboard-cohort-funnel/template.doc.mjs +2 -1
  179. package/assets/templates/pages/dashboard-composition/template.doc.mjs +2 -1
  180. package/assets/templates/pages/dashboard-progress/template.doc.mjs +6 -3
  181. package/assets/templates/pages/detail-page/template.doc.mjs +10 -3
  182. package/assets/templates/pages/documentation/template.doc.mjs +4 -1
  183. package/assets/templates/pages/documentation-design/template.doc.mjs +7 -1
  184. package/assets/templates/pages/documentation-technical/template.doc.mjs +7 -1
  185. package/assets/templates/pages/editor/template.doc.mjs +2 -8
  186. package/assets/templates/pages/file-explorer/template.doc.mjs +1 -1
  187. package/assets/templates/pages/form-two-column/template.doc.mjs +4 -3
  188. package/assets/templates/pages/form-wizard/template.doc.mjs +5 -3
  189. package/assets/templates/pages/gallery-hero/template.doc.mjs +4 -2
  190. package/assets/templates/pages/ide/page.tsx +24 -2
  191. package/assets/templates/pages/kanban-board/template.doc.mjs +1 -9
  192. package/assets/templates/pages/library/template.doc.mjs +4 -1
  193. package/assets/templates/pages/login/template.doc.mjs +2 -1
  194. package/assets/templates/pages/login-card/template.doc.mjs +2 -1
  195. package/assets/templates/pages/login-split/template.doc.mjs +2 -1
  196. package/assets/templates/pages/login-sso/template.doc.mjs +4 -2
  197. package/assets/templates/pages/mixed-gallery/template.doc.mjs +2 -1
  198. package/assets/templates/pages/product-detail/template.doc.mjs +4 -2
  199. package/assets/templates/pages/product-gallery/template.doc.mjs +2 -1
  200. package/assets/templates/pages/settings-dialog/template.doc.mjs +2 -1
  201. package/assets/templates/pages/settings-sidebar/template.doc.mjs +2 -1
  202. package/assets/templates/pages/shell-nav/template.doc.mjs +4 -2
  203. package/assets/templates/pages/shell-side-nav/template.doc.mjs +5 -3
  204. package/assets/templates/pages/shell-top-nav/template.doc.mjs +2 -1
  205. package/assets/templates/pages/side-gallery/template.doc.mjs +9 -1
  206. package/assets/templates/pages/table-filter/template.doc.mjs +9 -8
  207. package/assets/templates/pages/table-grouped/template.doc.mjs +4 -2
  208. package/assets/templates/pages/table-page/template.doc.mjs +5 -4
  209. package/assets/templates/pages/table-tree/template.doc.mjs +6 -3
  210. package/assets/templates/pages/theme-showcase/template.doc.mjs +2 -9
  211. package/assets/templates/pages/work-item-detail/template.doc.mjs +1 -0
  212. package/assets/theme.template.ts +6 -0
  213. package/authoring/debug/parse.d.mts +3 -3
  214. package/authoring/doctypes/_schema.d.mts +3 -3
  215. package/authoring/doctypes/command/command.doc.mjs +1 -1
  216. package/authoring/doctypes/component/categories.d.mts +37 -0
  217. package/authoring/doctypes/component/categories.mjs +54 -0
  218. package/authoring/doctypes/template/template.doc.mjs +1 -1
  219. package/authoring/doctypes/template/type.ts +9 -0
  220. package/authoring/example/example.doc.d.mts +12 -0
  221. package/authoring/example/example.doc.mjs +69 -0
  222. package/authoring/example/preview.d.mts +92 -0
  223. package/authoring/example/preview.mjs +994 -0
  224. package/authoring/example/type.ts +102 -0
  225. package/authoring/index.d.mts +1 -0
  226. package/authoring/index.d.ts +12 -0
  227. package/authoring/index.mjs +3 -1
  228. package/clients/cli/bin/astryx.mjs +6 -9
  229. package/clients/cli/build-id.generated.json +1 -1
  230. package/clients/cli/commands/component.doc.mjs +1 -1
  231. package/clients/cli/commands/component.mjs +22 -3
  232. package/clients/cli/commands/docs.doc.mjs +7 -1
  233. package/clients/cli/commands/docs.mjs +3 -1
  234. package/clients/cli/commands/doctor.mjs +32 -14
  235. package/clients/cli/commands/experimental/render.mjs +42 -1
  236. package/clients/cli/commands/experimental/theme.mjs +573 -119
  237. package/clients/cli/commands/experimental-render.doc.mjs +2 -2
  238. package/clients/cli/commands/experimental-theme-compile.doc.mjs +3 -3
  239. package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +87 -1
  240. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +10 -3
  241. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +1 -1
  242. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +2 -2
  243. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +2 -2
  244. package/clients/cli/commands/experimental-theme-editor.doc.mjs +1 -1
  245. package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +1 -1
  246. package/clients/cli/commands/experimental-theme-preview-remove.doc.mjs +2 -2
  247. package/clients/cli/commands/experimental-theme-preview.doc.mjs +2 -1
  248. package/clients/cli/commands/experimental-theme.doc.mjs +5 -1
  249. package/clients/cli/commands/search.doc.mjs +2 -1
  250. package/clients/cli/commands/search.mjs +6 -1
  251. package/clients/cli/commands/template.mjs +4 -2
  252. package/clients/cli/commands/theme-build.doc.mjs +5 -1
  253. package/clients/cli/commands/theme.doc.mjs +1 -1
  254. package/clients/cli/commands/theme.mjs +718 -438
  255. package/clients/cli/commands/upgrade.mjs +42 -7
  256. package/clients/cli/index.mjs +1 -1
  257. package/clients/cli/lib/cli-error.mjs +2 -1
  258. package/clients/cli/lib/component-format.mjs +205 -98
  259. package/clients/cli/lib/hook-format.mjs +9 -19
  260. package/clients/cli/lib/json-shim.mjs +132 -24
  261. package/clients/cli/lib/manifest.mjs +3 -2
  262. package/clients/cli/manifest.generated.json +1 -1
  263. package/foundation/agent-docs/agent-docs.mjs +1 -1
  264. package/foundation/config/theme-state.d.mts +13 -1
  265. package/foundation/config/theme-state.mjs +47 -7
  266. package/foundation/discovery/authoring-self-docs.mjs +1 -0
  267. package/foundation/discovery/component-discovery.d.mts +11 -0
  268. package/foundation/discovery/component-discovery.mjs +56 -8
  269. package/foundation/discovery/component-replacement.mjs +130 -1
  270. package/foundation/discovery/copied-passages.mjs +2 -1
  271. package/foundation/discovery/core-component-docs.d.mts +29 -0
  272. package/foundation/discovery/core-component-docs.mjs +83 -0
  273. package/foundation/discovery/doc-types.mjs +4 -3
  274. package/foundation/discovery/entry-name-files.d.mts +43 -0
  275. package/foundation/discovery/entry-name-files.mjs +264 -0
  276. package/foundation/discovery/hook-discovery.d.mts +8 -2
  277. package/foundation/discovery/hook-discovery.mjs +22 -8
  278. package/foundation/discovery/icon-definition-discovery.mjs +2 -1
  279. package/foundation/discovery/icon-set-checks.mjs +2 -1
  280. package/foundation/discovery/icon-set-discovery.mjs +2 -1
  281. package/foundation/discovery/integration-doc-files.mjs +2 -1
  282. package/foundation/discovery/package-exports.d.mts +10 -0
  283. package/foundation/discovery/package-exports.mjs +56 -3
  284. package/foundation/discovery/prop-drift.mjs +9 -9
  285. package/foundation/discovery/runner-allowlist.d.mts +1 -0
  286. package/foundation/discovery/runner-allowlist.mjs +2 -0
  287. package/foundation/discovery/stored-component-list.d.mts +43 -0
  288. package/foundation/discovery/stored-component-list.mjs +90 -0
  289. package/foundation/discovery/stored-search-catalog.d.mts +115 -0
  290. package/foundation/discovery/stored-search-catalog.mjs +297 -0
  291. package/foundation/discovery/stored-self-audit.d.mts +26 -10
  292. package/foundation/discovery/stored-self-audit.mjs +38 -18
  293. package/foundation/discovery/template-adapter.d.mts +53 -1
  294. package/foundation/discovery/template-adapter.mjs +176 -12
  295. package/foundation/discovery/template-icons.mjs +2 -1
  296. package/foundation/discovery/theme-discovery.mjs +31 -4
  297. package/foundation/discovery/theme-imports.d.mts +14 -0
  298. package/foundation/discovery/theme-imports.mjs +43 -1
  299. package/foundation/discovery/theming-targets.d.mts +6 -5
  300. package/foundation/discovery/theming-targets.mjs +31 -47
  301. package/foundation/doc-compiler/import.mjs +7 -1
  302. package/foundation/doc-compiler/inputs.mjs +3 -2
  303. package/foundation/doc-compiler/parse-readable.mjs +4 -1
  304. package/foundation/doc-compiler/stored-docs.d.mts +22 -0
  305. package/foundation/doc-compiler/stored-docs.mjs +49 -0
  306. package/foundation/env/semver.mjs +3 -1
  307. package/foundation/fonts/font-stylesheet.d.mts +38 -0
  308. package/foundation/fonts/font-stylesheet.mjs +141 -0
  309. package/foundation/fs/cache-eviction.d.mts +21 -0
  310. package/foundation/fs/cache-eviction.mjs +73 -0
  311. package/foundation/fs/exact-codec.d.mts +12 -2
  312. package/foundation/fs/exact-codec.mjs +23 -6
  313. package/foundation/fs/file-protection.mjs +4 -3
  314. package/foundation/fs/gather-cache.d.mts +62 -4
  315. package/foundation/fs/gather-cache.mjs +517 -91
  316. package/foundation/fs/jiti-cache.d.mts +19 -1
  317. package/foundation/fs/jiti-cache.mjs +130 -6
  318. package/foundation/fs/kept-tree.d.mts +60 -0
  319. package/foundation/fs/kept-tree.mjs +154 -0
  320. package/foundation/fs/listing-cache.d.mts +7 -0
  321. package/foundation/fs/listing-cache.mjs +10 -0
  322. package/foundation/fs/module-loader.d.mts +24 -2
  323. package/foundation/fs/module-loader.mjs +94 -21
  324. package/foundation/fs/paths.d.mts +18 -0
  325. package/foundation/fs/paths.mjs +15 -2
  326. package/foundation/fs/read-record.d.mts +9 -0
  327. package/foundation/fs/read-record.mjs +19 -11
  328. package/foundation/fs/stop-cleanup.d.mts +12 -0
  329. package/foundation/fs/stop-cleanup.mjs +66 -0
  330. package/foundation/identity/provider-identity.d.mts +6 -0
  331. package/foundation/identity/provider-identity.mjs +10 -1
  332. package/foundation/integrations/contribution-inventory.mjs +4 -3
  333. package/foundation/integrations/example-code.d.mts +63 -0
  334. package/foundation/integrations/example-code.mjs +416 -0
  335. package/foundation/integrations/public-imports.d.mts +9 -0
  336. package/foundation/integrations/public-imports.mjs +3 -2
  337. package/foundation/integrations/validate-contributions.mjs +17 -45
  338. package/foundation/render/embedded-files.d.mts +6 -0
  339. package/foundation/render/embedded-files.mjs +25 -5
  340. package/foundation/render/embedded-imports.d.mts +39 -7
  341. package/foundation/render/embedded-imports.mjs +66 -27
  342. package/foundation/render/file-header.d.mts +66 -0
  343. package/foundation/render/file-header.mjs +118 -0
  344. package/foundation/render/host-answer.d.mts +18 -0
  345. package/foundation/render/host-answer.mjs +46 -0
  346. package/foundation/render/host-exit.d.mts +1 -0
  347. package/foundation/render/host-exit.mjs +6 -1
  348. package/foundation/render/html-reader.d.mts +55 -2
  349. package/foundation/render/html-reader.mjs +145 -26
  350. package/foundation/render/markup-edits.d.mts +57 -0
  351. package/foundation/render/markup-edits.mjs +182 -0
  352. package/foundation/render/page-host.mjs +29 -12
  353. package/foundation/render/page-worker.mjs +121 -13
  354. package/foundation/render/picture-chrome.d.mts +4 -0
  355. package/foundation/render/picture-chrome.mjs +185 -0
  356. package/foundation/render/picture-playwright.d.mts +4 -0
  357. package/foundation/render/picture-playwright.mjs +34 -0
  358. package/foundation/render/rebuild.mjs +2 -1
  359. package/foundation/render/render-page.d.mts +35 -3
  360. package/foundation/render/render-page.mjs +641 -96
  361. package/foundation/render/source-block.d.mts +85 -6
  362. package/foundation/render/source-block.mjs +211 -20
  363. package/foundation/render/ts-paths.d.mts +69 -6
  364. package/foundation/render/ts-paths.mjs +326 -40
  365. package/foundation/response/error-codes.d.mts +3 -1
  366. package/foundation/response/error-codes.d.ts +1 -0
  367. package/foundation/response/error-codes.doc.mjs +12 -1
  368. package/foundation/response/error-codes.mjs +11 -1
  369. package/foundation/response/response-types.doc.mjs +2 -2
  370. package/foundation/text/compare-text.d.mts +14 -0
  371. package/foundation/text/compare-text.mjs +68 -0
  372. package/foundation/text/css-escape.d.mts +18 -0
  373. package/foundation/text/css-escape.mjs +35 -0
  374. package/foundation/text/string-utils.d.mts +3 -2
  375. package/foundation/text/string-utils.mjs +18 -4
  376. package/foundation/text/suggest-order.d.mts +9 -0
  377. package/foundation/text/suggest-order.mjs +15 -1
  378. package/foundation/xle/expand.mjs +2 -1
  379. package/host/index.mjs +8 -6
  380. package/package.json +7 -6
@@ -29,21 +29,40 @@ import {
29
29
  RenderError,
30
30
  } from '../../foundation/render/render-page.mjs';
31
31
  import {SAMPLE_PAGE, elementNames, pageSource} from './_catalog.mjs';
32
+ import {removeOnStop} from '../../foundation/fs/stop-cleanup.mjs';
32
33
 
33
34
  /** Bump when the shape of the cached part data changes. */
34
- const PART_DATA_VERSION = 4;
35
+ const PART_DATA_VERSION = 12;
36
+
37
+ /**
38
+ * Flags that change what a component does or whether it shows, not how it
39
+ * looks: the catalog never turns them on (disabled has its own entry).
40
+ */
41
+ const LIFECYCLE_FLAGS = new Set([
42
+ 'isDisabled',
43
+ 'isOpen',
44
+ 'isDefaultOpen',
45
+ 'hasAutoFocus',
46
+ 'isHidden',
47
+ ]);
35
48
 
36
49
  /**
37
50
  * @typedef {object} PartRecord
38
51
  * @property {Record<string, {tokens: Record<string, string[]>, values: string[]}>} own - property -> tokens (with conditions) and raw values
52
+ * @property {Record<string, Record<string, string>>} [at] - property -> the value under each condition, private variables resolved
39
53
  * @property {Record<string, string[]>} inside - tokens read by unnamed elements inside the part -> properties
40
54
  * @property {Record<string, string[]>} attrs - data attributes seen on the part
41
55
  * @property {string[]} contains - parts rendered inside it
56
+ * @property {string[]} [tags] - the elements it is rendered as (`tr` for a table row)
57
+ * @property {string[]} [innerCorners] - the radius tokens of the corners Core draws by place on the parts directly inside it (a button group's end buttons)
58
+ * @property {Record<string, Record<string, string>>} [inline] - state ('' for always) -> property -> the token Core paints it with as an inline style, which no theme rule can replace
42
59
  */
43
60
 
44
61
  /**
45
62
  * @typedef {{target: string | null, tokens: string[], raw: string | null}} PaintSide
46
- * @typedef {{text: string, fg: PaintSide, bg: PaintSide, sample: string}} TextPair
63
+ * @typedef {{text: string, fg: PaintSide, bg: PaintSide, sample: string, over?: PaintSide}} TextPair
64
+ * `over`: the region the part sits in (a header), whose background shows
65
+ * through a see-through background of the part's own, else the page
47
66
  * @typedef {{version: number, coreKey: string, map: Record<string, PartRecord>, pairs: TextPair[], rendered: number, items: number}} PartData
48
67
  */
49
68
 
@@ -177,7 +196,8 @@ export function isItemOf(project, name) {
177
196
  * A component's catalog entries, all from its doc: its demo props
178
197
  * ({@link demoProps}), then once per value of each visual prop with a
179
198
  * closed set of values (`variant`, `status`, `color`, and a number union
180
- * such as a heading's level), and its checked and disabled states. An
199
+ * such as a heading's level), its checked and disabled states, and each look
200
+ * flag (`isStriped`) turned on. An
181
201
  * overlay the playground shows in place renders open; on a page people
182
202
  * see, once, as some of its variants size the window, not the card.
183
203
  * @param {import('./_project.mjs').ThemeProject} project
@@ -223,6 +243,12 @@ export function catalogVariants(project, name, cap, opts = {}) {
223
243
  // The states the doc names that a prop sets: checked (a boolean value)
224
244
  // and disabled. The label says the state shown.
225
245
  const states = new Set(info.targets.flatMap(t => t.states ?? []));
246
+ // A value the doc lists beside true and false (a checkbox's
247
+ // 'indeterminate'): rendered too, so the look Core gives it is read.
248
+ if (states.has('checked'))
249
+ for (const word of literals(info.props?.value?.type ?? ''))
250
+ if (word !== 'true' && word !== 'false')
251
+ variants.push({label: word, props: {...base, value: word}});
226
252
  if (states.has('checked') && info.props?.value?.type.startsWith('boolean')) {
227
253
  const on = base.value !== true;
228
254
  variants.push({
@@ -243,6 +269,17 @@ export function catalogVariants(project, name, cap, opts = {}) {
243
269
  if (n !== base[p])
244
270
  variants.push({label: `${p} ${n}`, props: {...base, [p]: n}});
245
271
  }
272
+ // Each look flag the doc names (`isStriped`, `hasHover`), turned on, so
273
+ // the styles Core gives only under it are read too: a table row's hover
274
+ // and stripes come from its table's flags.
275
+ for (const [p, doc] of Object.entries(info.props ?? {}))
276
+ if (
277
+ /^(is|has)[A-Z]/.test(p) &&
278
+ !LIFECYCLE_FLAGS.has(p) &&
279
+ String(/** @type {any} */ (doc)?.type ?? '').trim() === 'boolean' &&
280
+ base[p] !== true
281
+ )
282
+ variants.push({label: p, props: {...base, [p]: true}});
246
283
  return variants.slice(0, cap);
247
284
  }
248
285
 
@@ -367,14 +404,9 @@ export async function renderGenerated(project, file, source, extra = []) {
367
404
  );
368
405
  })();
369
406
  fs.mkdirSync(dir, {recursive: true});
370
- // Stopped by a signal, the render folder still goes.
371
- const cleanup = () => fs.rmSync(dir, {recursive: true, force: true});
372
- const onSignal = (/** @type {NodeJS.Signals} */ sig) => {
373
- cleanup();
374
- process.kill(process.pid, sig);
375
- };
376
- process.once('SIGINT', onSignal);
377
- process.once('SIGTERM', onSignal);
407
+ // Stopped by a signal (the terminal closing too), the render folder
408
+ // still goes.
409
+ const untrack = removeOnStop(dir);
378
410
  const entry = path.join(dir, file);
379
411
  // Demo images point at the docs site's own folder (`/template-assets/…`),
380
412
  // which a page opened from disk cannot reach: the inline placeholder
@@ -430,8 +462,7 @@ export async function renderGenerated(project, file, source, extra = []) {
430
462
  fs.rmSync(f, {force: true});
431
463
  // Another render may still use it: a folder with a file in it stays.
432
464
  removeEmptyFolder(madeThemes ? themes : dir, {deep: true});
433
- process.removeListener('SIGINT', onSignal);
434
- process.removeListener('SIGTERM', onSignal);
465
+ untrack();
435
466
  }
436
467
  }
437
468
 
@@ -473,6 +504,141 @@ export async function partData(project) {
473
504
  return data;
474
505
  }
475
506
 
507
+ /** The tokens Core's indicator focus ring is drawn from, per property. */
508
+ const RING_TOKENS = {
509
+ 'outline-width': '--focus-outline-width',
510
+ 'outline-style': '--focus-outline-style',
511
+ 'outline-color': '--focus-outline-color',
512
+ };
513
+
514
+ /**
515
+ * Add the focus ring a control draws on its indicator at focus time (Core's
516
+ * `useIndicatorFocusRing`, used by a control whose input is visually
517
+ * hidden): an inline style the server render never shows, read from the
518
+ * focus outline tokens. The tokens are read by the indicator always (it
519
+ * never takes focus itself, so no state reaches the ring), and the outline
520
+ * properties are painted inline, which no theme rule can replace. The
521
+ * indicator is the control's own `-indicator` target, or for a part of
522
+ * another component (a radio list's item), that component's.
523
+ * @param {import('./_project.mjs').ThemeProject} project
524
+ * @param {Record<string, PartRecord>} map
525
+ */
526
+ function addIndicatorRings(project, map) {
527
+ for (const [name, info] of Object.entries(project.components)) {
528
+ const at = info.importPath?.split('/').pop();
529
+ let source;
530
+ try {
531
+ source = at
532
+ ? fs.readFileSync(
533
+ path.join(project.coreDir, 'dist', at, `${name}.js`),
534
+ 'utf8',
535
+ )
536
+ : '';
537
+ } catch {
538
+ continue;
539
+ }
540
+ if (!source.includes('useIndicatorFocusRing')) continue;
541
+ /** @param {import('./_project.mjs').ComponentInfo | undefined} c */
542
+ const indicators = c =>
543
+ (c?.targets ?? [])
544
+ .map(t => t.className.replace(/^astryx-/, ''))
545
+ .filter(k => k.endsWith('-indicator'));
546
+ const own = indicators(info);
547
+ const keys = own.length
548
+ ? own
549
+ : indicators(
550
+ info.subComponentOf
551
+ ? project.components[info.subComponentOf]
552
+ : undefined,
553
+ );
554
+ for (const key of keys) {
555
+ const rec = (map[key] ??= {
556
+ own: {},
557
+ inside: {},
558
+ attrs: {},
559
+ contains: [],
560
+ });
561
+ for (const [prop, token] of Object.entries(RING_TOKENS)) {
562
+ rec.inside[token] = [...new Set([...(rec.inside[token] ?? []), prop])];
563
+ (rec.inline ??= {})[''] = {...rec.inline?.[''], [prop]: token};
564
+ }
565
+ }
566
+ }
567
+ }
568
+
569
+ /**
570
+ * Add the paint Core writes as an inline style when it sets a theme state
571
+ * at run time (a table row's selection wash, set by the selection plugin
572
+ * beside the row's `selected` state): something the server render never
573
+ * shows. A built module under a component's folder that writes a state's
574
+ * attribute (`themeDataAttributes({selected: 'selected'})`) and an inline
575
+ * property from a color token (`el.style.backgroundColor = …` with
576
+ * `colorVars['--color-accent-muted']`) paints that state with it, on each
577
+ * of the component's targets that lists the state.
578
+ * @param {import('./_project.mjs').ThemeProject} project
579
+ * @param {Record<string, PartRecord>} map
580
+ */
581
+ function addInlineStatePaint(project, map) {
582
+ const dist = path.join(project.coreDir, 'dist');
583
+ /** @param {string} dir @returns {string[]} */
584
+ const modules = dir => {
585
+ let entries;
586
+ try {
587
+ entries = fs.readdirSync(dir, {withFileTypes: true});
588
+ } catch {
589
+ return [];
590
+ }
591
+ return entries.flatMap(e =>
592
+ e.isDirectory()
593
+ ? modules(path.join(dir, e.name))
594
+ : e.name.endsWith('.js')
595
+ ? [path.join(dir, e.name)]
596
+ : [],
597
+ );
598
+ };
599
+ for (const [name, info] of Object.entries(project.components)) {
600
+ const folder = info.importPath?.split('/').pop();
601
+ if (!folder || folder !== name) continue;
602
+ const withStates = info.targets.filter(t => t.states.length);
603
+ if (!withStates.length) continue;
604
+ for (const file of modules(path.join(dist, folder))) {
605
+ const source = fs.readFileSync(file, 'utf8');
606
+ const states = [
607
+ ...source.matchAll(
608
+ /themeDataAttributes\(\{\s*([\w-]+):\s*'\1'\s*\}\)/g,
609
+ ),
610
+ ].map(m => m[1]);
611
+ if (!states.length) continue;
612
+ const props = [
613
+ ...source.matchAll(/\.style\.([a-z][A-Za-z]*)\s*=(?!=)/g),
614
+ ].map(m => m[1].replace(/[A-Z]/g, c => `-${c.toLowerCase()}`));
615
+ const colorTokens = [
616
+ ...source.matchAll(/colorVars\[['"](--color-[\w-]+)['"]\]/g),
617
+ ].map(m => m[1]);
618
+ if (!props.length || colorTokens.length !== 1) continue;
619
+ for (const t of withStates) {
620
+ const key = t.className.replace(/^astryx-/, '');
621
+ const rec = map[key];
622
+ if (!rec) continue;
623
+ for (const state of states.filter(st => t.states.includes(st)))
624
+ for (const prop of props) {
625
+ (rec.inline ??= {})[state] = {
626
+ ...rec.inline?.[state],
627
+ [prop]: colorTokens[0],
628
+ };
629
+ const own = (rec.own[prop] ??= {tokens: {}, values: []});
630
+ own.tokens[colorTokens[0]] = [
631
+ ...new Set([
632
+ ...(own.tokens[colorTokens[0]] ?? []),
633
+ `${state}=${state}`,
634
+ ]),
635
+ ];
636
+ }
637
+ }
638
+ }
639
+ }
640
+ }
641
+
476
642
  /**
477
643
  * Build the part data: render the catalog, then walk its markup.
478
644
  * @param {import('./_project.mjs').ThemeProject} project
@@ -496,7 +662,9 @@ async function buildPartData(project) {
496
662
  // No stylesheet: every part reads nothing.
497
663
  }
498
664
  const tokens = new Set(Object.keys(project.core.tokenDefaults ?? {}));
499
- const result = walkMarkup(markup, declarations(css), tokens);
665
+ const result = walkMarkup(markup, declarations(css), tokens, project.target);
666
+ addInlineStatePaint(project, result.map);
667
+ addIndicatorRings(project, result.map);
500
668
  return {
501
669
  version: PART_DATA_VERSION,
502
670
  coreKey: project.coreKey,
@@ -666,16 +834,35 @@ function expand(v, env, tokens, seen = new Set(), depth = 0) {
666
834
  return out;
667
835
  }
668
836
 
837
+ /**
838
+ * A value with the private variables set on the element or its ancestors
839
+ * put in (a variable with no fallback only), so it reads public tokens and
840
+ * literal values alone where it can.
841
+ * @param {string} v
842
+ * @param {Record<string, string>} env
843
+ * @param {Set<string>} tokens
844
+ * @param {number} [depth]
845
+ * @returns {string}
846
+ */
847
+ function resolvePrivate(v, env, tokens, depth = 0) {
848
+ if (depth > 8) return v;
849
+ const out = v.replace(/var\((--[a-zA-Z0-9_-]+)\)/g, (m, name) =>
850
+ !tokens.has(name) && env[name] != null ? env[name] : m,
851
+ );
852
+ return out === v ? v : resolvePrivate(out, env, tokens, depth + 1);
853
+ }
854
+
669
855
  /**
670
856
  * Walk server-rendered markup: for each element, its classes' declarations
671
857
  * become what its part reads; text records the color pair it sits on.
672
858
  * @param {string} html
673
859
  * @param {ReturnType<typeof declarations>} decls
674
860
  * @param {Set<string>} tokens
861
+ * @param {Map<string, {props: string[], states: string[]}>} [targets] the theming targets by key: the visual props and runtime states each declares are the data attributes read as its conditions
675
862
  * @returns {{map: Record<string, PartRecord>, pairs: TextPair[]}}
676
863
  */
677
- export function walkMarkup(html, decls, tokens) {
678
- /** @type {Record<string, {own: Record<string, {tokens: Record<string, Set<string>>, values: Set<string>}>, inside: Record<string, Set<string>>, attrs: Record<string, Set<string>>, contains: Set<string>}>} */
864
+ export function walkMarkup(html, decls, tokens, targets = new Map()) {
865
+ /** @type {Record<string, {own: Record<string, {tokens: Record<string, Set<string>>, values: Set<string>}>, at: Record<string, Record<string, string>>, inside: Record<string, Set<string>>, attrs: Record<string, Set<string>>, contains: Set<string>, tags: Set<string>, innerCorners: Set<string>}>} */
679
866
  const map = {};
680
867
  /** @type {Array<{env: Record<string, string>, target: string | null, fg: PaintSide | null, bg: PaintSide | null}>} */
681
868
  const stack = [{env: {}, target: null, fg: null, bg: null}];
@@ -706,14 +893,35 @@ export function walkMarkup(html, decls, tokens) {
706
893
  const cls = (/class="([^"]*)"/.exec(attrs)?.[1] ?? '')
707
894
  .split(/\s+/)
708
895
  .filter(Boolean);
896
+ const parent = stack[stack.length - 1];
897
+ // The theming targets the element carries (else the one it sits in).
898
+ const keys = cls
899
+ .filter(c => c.startsWith('astryx-') && !c.startsWith('astryx-theme'))
900
+ .map(c => c.slice(7));
901
+ const declaredBy = (keys.length ? keys : [parent.target])
902
+ .map(k => (k ? targets.get(k) : undefined))
903
+ .filter(t => t != null);
904
+ const props = new Set(declaredBy.flatMap(t => t.props));
905
+ const states = new Set(declaredBy.flatMap(t => t.states));
906
+ // A data attribute the element's target declares (a visual prop or a
907
+ // runtime state, written by `themeProps` as `data-<name>`) is a
908
+ // condition of what the part reads.
709
909
  const dataAttrs = Object.fromEntries(
710
- [
711
- ...attrs.matchAll(
712
- /data-(variant|status|size|selected|state|elevation|tone|color|level|weight)="([^"]*)"/g,
713
- ),
714
- ].map(x => [x[1], x[2]]),
910
+ [...attrs.matchAll(/\bdata-([a-z][\w-]*)="([^"]*)"/g)]
911
+ .filter(x => props.has(x[1]) || states.has(x[1]))
912
+ .map(x => [x[1], x[2]]),
715
913
  );
716
- const parent = stack[stack.length - 1];
914
+ // The place another component puts a part in (the current page's
915
+ // button in a pagination, a pressed toggle) is a condition of what that
916
+ // component styles it with there, never the part's look at rest. A part
917
+ // that marks the place with a runtime state of its own (a selected tab)
918
+ // is conditioned by that state already.
919
+ const ownState = Object.keys(dataAttrs).some(k => states.has(k));
920
+ const context = ownState
921
+ ? []
922
+ : [...attrs.matchAll(/\b(aria-(?:current|pressed))="([^"]*)"/g)]
923
+ .filter(x => x[2] !== 'false')
924
+ .map(x => `${x[1]}=${x[2]}`);
717
925
  const env = {...parent.env};
718
926
  const own = cls.flatMap(c => decls.get(c) ?? []);
719
927
  for (const d of own)
@@ -723,25 +931,39 @@ export function walkMarkup(html, decls, tokens) {
723
931
  );
724
932
  const target = named[0]?.slice(7) ?? parent.target;
725
933
  const ownsTarget = named.length > 0;
726
- if (target) {
727
- const T = (map[target] ??= {
934
+ // An element can carry several targets (a shell's side nav region is a
935
+ // layout panel too): its declarations are each one's own.
936
+ for (const t of ownsTarget ? named.map(c => c.slice(7)) : [target]) {
937
+ if (!t) continue;
938
+ const T = (map[t] ??= {
728
939
  own: {},
940
+ at: {},
729
941
  inside: {},
730
942
  attrs: {},
731
943
  contains: new Set(),
944
+ tags: new Set(),
945
+ innerCorners: new Set(),
732
946
  });
733
947
  if (ownsTarget)
734
948
  for (const [k, v] of Object.entries(dataAttrs))
735
949
  (T.attrs[k] ??= new Set()).add(v);
736
- const cond0 = Object.entries(dataAttrs)
737
- .map(([k, v]) => `${k}=${v}`)
738
- .join(',');
950
+ const cond0 = [
951
+ ...Object.entries(dataAttrs).map(([k, v]) => `${k}=${v}`),
952
+ ...context,
953
+ ].join(',');
739
954
  for (const d of own) {
740
955
  if (d.prop.startsWith('--')) continue;
956
+ // (An inherited background paints nothing of its own: it reads no
957
+ // token, and what shows is its parent's.)
741
958
  const toks = expand(d.value, env, tokens);
742
959
  const cond = [cond0, d.cond].filter(Boolean).join(' ');
743
960
  if (ownsTarget) {
744
961
  const P = (T.own[d.prop] ??= {tokens: {}, values: new Set()});
962
+ (T.at[d.prop] ??= {})[cond || 'always'] ??= resolvePrivate(
963
+ d.value,
964
+ env,
965
+ tokens,
966
+ );
745
967
  P.values.add(
746
968
  d.value.length > 80 ? `${d.value.slice(0, 80)}...` : d.value,
747
969
  );
@@ -763,14 +985,25 @@ export function walkMarkup(html, decls, tokens) {
763
985
  }
764
986
  if (d.prop === 'background-color') {
765
987
  const t = [...expand(d.value, env, tokens)];
766
- if (t.length || !/transparent/.test(d.value))
988
+ if (t.length || !/transparent|^\s*inherit\s*$/i.test(d.value))
767
989
  bg = {target, tokens: t, raw: t.length ? null : d.value};
768
990
  }
769
991
  }
770
- if (ownsTarget && target)
992
+ for (const t of ownsTarget ? named.map(c => c.slice(7)) : [])
771
993
  for (const anc of stack)
772
- if (anc.target && anc.target !== target)
773
- map[anc.target].contains.add(target);
994
+ if (anc.target && anc.target !== t) map[anc.target].contains.add(t);
995
+ if (ownsTarget) {
996
+ for (const t of named) map[t.slice(7)].tags.add(tag.toLowerCase());
997
+ // Corners Core draws on a part by its place among its siblings (a
998
+ // button group's first and last buttons): the radius token they read
999
+ // is the enclosing part's corners.
1000
+ if (parent.target && !named.includes(`astryx-${parent.target}`))
1001
+ for (const d of own)
1002
+ if (/^border-(start|end)-(start|end)-radius$/.test(d.prop))
1003
+ for (const tok of expand(d.value, env, tokens))
1004
+ if (/^--radius-/.test(tok))
1005
+ map[parent.target].innerCorners.add(tok);
1006
+ }
774
1007
  if (!selfClose && !VOID.has(tag.toLowerCase()))
775
1008
  stack.push({env, target, fg, bg});
776
1009
  }
@@ -792,6 +1025,7 @@ export function walkMarkup(html, decls, tokens) {
792
1025
  },
793
1026
  ]),
794
1027
  ),
1028
+ at: v.at,
795
1029
  inside: Object.fromEntries(
796
1030
  Object.entries(v.inside).map(([k, s]) => [k, [...s]]),
797
1031
  ),
@@ -799,6 +1033,8 @@ export function walkMarkup(html, decls, tokens) {
799
1033
  Object.entries(v.attrs).map(([k, s]) => [k, [...s]]),
800
1034
  ),
801
1035
  contains: [...v.contains],
1036
+ tags: [...v.tags],
1037
+ innerCorners: [...v.innerCorners],
802
1038
  };
803
1039
  }
804
1040
  return {map: out, pairs: [...pairs.values()]};
@@ -26,18 +26,6 @@ export function addWiring(cwd: string, slug: string, mode?: "light" | "dark" | "
26
26
  * @returns {string[]}
27
27
  */
28
28
  export function appWiring(ctx: import("./_settings.mjs").Ctx, slug: string, data: import("./_settings.mjs").ThemeData): string[];
29
- /**
30
- * For tests: stop the next preview changes at the step where `when`
31
- * returns true, as a kill would, with nothing put back. Null clears it.
32
- * @param {((step: string) => boolean) | null} when
33
- */
34
- export function stopPreviewCommitAt(when: ((step: string) => boolean) | null): void;
35
- /**
36
- * For tests: read at most `n` source files when checking for importers
37
- * (null: the default).
38
- * @param {number | null} n
39
- */
40
- export function setImporterScanMax(n: number | null): void;
41
29
  /**
42
30
  * Rewrite the in-app preview routes of a theme when their imports changed, so
43
31
  * a font package installed after `set` loads on the next change or `show`,
@@ -68,12 +56,18 @@ export function refreshPreviewRoute(cwd: string, slug: string): Promise<{
68
56
  * @param {'colors' | 'components' | 'overview'} focus
69
57
  * @param {{code: string, cause: string} | null} [notChecked] why the change
70
58
  * could not be rendered
59
+ * @param {{pictureProblem?: string | null, stale?: string[]}} [extra] this
60
+ * result's picture problem (what kept --png from taking pictures) and its
61
+ * previewStale entries (an in-app preview changed by hand)
71
62
  * @returns {string}
72
63
  */
73
64
  export function seeLine(cwd: string, slug: string, focus: "colors" | "components" | "overview", notChecked?: {
74
65
  code: string;
75
66
  cause: string;
76
- } | null): string;
67
+ } | null, extra?: {
68
+ pictureProblem?: string | null;
69
+ stale?: string[];
70
+ }): string;
77
71
  /**
78
72
  * Add pages to the in-app theme preview, and write the preview route the
79
73
  * first time. With a description, the build ranking picks the template