@astryxdesign/cli 0.7.16-canary.ge95b87c → 0.7.16

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 (120) hide show
  1. package/CHANGELOG.md +369 -0
  2. package/README.md +1 -1
  3. package/api/build/_adapter.d.mts +9 -0
  4. package/api/build/_adapter.mjs +24 -0
  5. package/api/build/kit/shell.weights.json +1 -0
  6. package/api/build/kit/shellcall.d.mts +26 -0
  7. package/api/build/kit/shellcall.mjs +87 -0
  8. package/api/build/kit/start.mjs +67 -4
  9. package/api/build/kit/weights.d.mts +15 -0
  10. package/api/build/kit/weights.mjs +27 -0
  11. package/api/component/__fixtures__/resolutions/modules.txt +1 -1
  12. package/api/doctor/_adapter.d.mts +3 -2
  13. package/api/doctor/_adapter.mjs +7 -1
  14. package/api/doctor/doctor.d.mts +8 -0
  15. package/api/doctor/doctor.mjs +53 -8
  16. package/api/doctor/theme-checks.mjs +157 -8
  17. package/api/icon/_adapter.d.mts +7 -3
  18. package/api/icon/_adapter.mjs +12 -3
  19. package/api/icon/icon.type.d.mts +15 -0
  20. package/api/icon/icon.type.mjs +10 -3
  21. package/api/icon/iconUse.doc.mjs +19 -5
  22. package/api/icon/list/list.mjs +7 -1
  23. package/api/icon/use/use.d.mts +8 -5
  24. package/api/icon/use/use.mjs +95 -13
  25. package/api/init/run/run.mjs +1 -0
  26. package/api/template/template.type.d.mts +6 -2
  27. package/api/template/template.type.mjs +2 -1
  28. package/api/theme/_adapter.mjs +16 -2
  29. package/api/theme/build/build.d.mts +10 -6
  30. package/api/theme/build/build.mjs +42 -29
  31. package/api/theme/generateTonalPalette.doc.mjs +2 -2
  32. package/api/theme/palette/generate/generator.mjs +141 -2
  33. package/api/theme/theme.type.d.mts +39 -0
  34. package/api/theme/theme.type.mjs +21 -0
  35. package/api/theme/themeBuild.doc.mjs +1 -1
  36. package/api/theme/themePaletteGenerate.doc.mjs +1 -1
  37. package/api/theme-edit/_adapter.d.mts +1 -0
  38. package/api/theme-edit/_adapter.mjs +79 -21
  39. package/api/theme-edit/_check.d.mts +25 -2
  40. package/api/theme-edit/_check.mjs +251 -61
  41. package/api/theme-edit/_context.d.mts +2 -1
  42. package/api/theme-edit/_context.mjs +19 -1
  43. package/api/theme-edit/_edit.d.mts +16 -0
  44. package/api/theme-edit/_edit.mjs +360 -59
  45. package/api/theme-edit/_how-question.d.mts +8 -0
  46. package/api/theme-edit/_how-question.mjs +169 -22
  47. package/api/theme-edit/_marks.d.mts +13 -0
  48. package/api/theme-edit/_marks.mjs +15 -0
  49. package/api/theme-edit/_palette.d.mts +27 -0
  50. package/api/theme-edit/_palette.mjs +112 -8
  51. package/api/theme-edit/_preview-app.d.mts +46 -1
  52. package/api/theme-edit/_preview-app.mjs +367 -36
  53. package/api/theme-edit/_preview.d.mts +55 -0
  54. package/api/theme-edit/_preview.mjs +231 -6
  55. package/api/theme-edit/_project.d.mts +4 -0
  56. package/api/theme-edit/_project.mjs +27 -6
  57. package/api/theme-edit/_settings.d.mts +61 -2
  58. package/api/theme-edit/_settings.mjs +317 -115
  59. package/api/theme-edit/_tables.mjs +1 -1
  60. package/api/theme-edit/theme-edit.type.d.mts +30 -2
  61. package/api/theme-edit/theme-edit.type.mjs +10 -2
  62. package/api/theme-edit/themeEditPreviewApp.doc.mjs +1 -1
  63. package/assets/docs/author-a-theme.doc.mjs +1 -1
  64. package/assets/docs/theme.doc.dense.mjs +1 -1
  65. package/assets/docs/theme.doc.mjs +1 -1
  66. package/assets/docs/theme.doc.zh.mjs +4 -3
  67. package/assets/docs/tree/define-the-theme.doc.mjs +1 -1
  68. package/assets/docs/tree/icon-sets.doc.mjs +63 -8
  69. package/assets/docs.generated.json +2 -2
  70. package/assets/self-audit.generated.json +1 -1
  71. package/assets/templates/blocks/components/Outline/useOutlineFromDOMHookUsage.doc.mjs +21 -0
  72. package/assets/templates/blocks/components/Outline/useOutlineFromDOMHookUsage.tsx +62 -0
  73. package/assets/templates/components.generated.json +1 -1
  74. package/assets/templates/pages/ai-chat/page.tsx +20 -2
  75. package/assets/templates/themes/neutral/neutralPalettes.generated.receipt.json +2 -0
  76. package/authoring/config/config.doc.mjs +8 -0
  77. package/authoring/config/parse.d.mts +1 -0
  78. package/authoring/config/parse.mjs +12 -0
  79. package/authoring/config/type.ts +8 -0
  80. package/authoring/doctypes/icon-set/icon-set-data.doc.mjs +3 -3
  81. package/clients/cli/build-id.generated.json +1 -1
  82. package/clients/cli/commands/experimental/icon.mjs +61 -6
  83. package/clients/cli/commands/experimental/theme.mjs +9 -2
  84. package/clients/cli/commands/experimental-icon-use.doc.mjs +12 -5
  85. package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +2 -2
  86. package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +1 -1
  87. package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +2 -2
  88. package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +1 -1
  89. package/clients/cli/commands/experimental-theme-editor.doc.mjs +1 -1
  90. package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +1 -1
  91. package/clients/cli/commands/theme.doc.mjs +7 -2
  92. package/clients/cli/commands/theme.mjs +41 -18
  93. package/clients/cli/commands.generated.json +1 -1
  94. package/clients/cli/index.mjs +25 -5
  95. package/clients/cli/manifest.generated.json +1 -1
  96. package/foundation/agent-docs/agent-docs.mjs +1 -1
  97. package/foundation/config/config-writer.d.mts +23 -0
  98. package/foundation/config/config-writer.mjs +150 -56
  99. package/foundation/config/project.mjs +43 -2
  100. package/foundation/discovery/component-discovery.mjs +6 -5
  101. package/foundation/discovery/icon-set-checks.mjs +164 -48
  102. package/foundation/discovery/icon-set-discovery.d.mts +38 -5
  103. package/foundation/discovery/icon-set-discovery.mjs +50 -6
  104. package/foundation/discovery/icon-set-theme-maps.d.mts +59 -0
  105. package/foundation/discovery/icon-set-theme-maps.mjs +95 -0
  106. package/foundation/discovery/icon-set-writer.d.mts +2 -3
  107. package/foundation/discovery/icon-set-writer.mjs +57 -16
  108. package/foundation/discovery/template-icons.d.mts +27 -10
  109. package/foundation/discovery/template-icons.mjs +142 -26
  110. package/foundation/discovery/theme-discovery.d.mts +25 -0
  111. package/foundation/discovery/theme-discovery.mjs +48 -7
  112. package/foundation/fs/gather-cache.mjs +6 -2
  113. package/foundation/integrations/autolink.d.mts +4 -2
  114. package/foundation/integrations/autolink.mjs +4 -2
  115. package/foundation/integrations/cli-requirement.d.mts +16 -5
  116. package/foundation/integrations/cli-requirement.mjs +27 -6
  117. package/foundation/integrations/may-have-integrations.mjs +5 -2
  118. package/foundation/integrations/missing-dependency.d.mts +9 -0
  119. package/foundation/integrations/missing-dependency.mjs +100 -0
  120. package/package.json +6 -6
@@ -0,0 +1 @@
1
+ {"threshold":1.5,"weights":{"b:above_an":-0.5,"b:above_existing":-0.5,"b:action_and":-1.0,"b:action_with":-1.0,"b:actions_and":-1.0,"b:add_button":1.0,"b:all_and":-1.0,"b:an_add":0.5,"b:an_empty":-1.0,"b:an_existing":-1.5,"b:an_external":-1.0,"b:an_open":-1.0,"b:an_optional":-0.5,"b:analytics_dashboard":-0.5,"b:and_accessible":-1.5,"b:and_action":-1.0,"b:and_after":0.5,"b:and_before":-0.5,"b:and_cancel":-0.5,"b:and_collapsed":-1.0,"b:and_collapsible":0.5,"b:and_compact":1.5,"b:and_confirmation":-0.5,"b:and_current":-0.5,"b:and_dark":-1.0,"b:and_data":0.5,"b:and_date":-0.5,"b:and_dense":0.5,"b:and_detail":1.5,"b:and_empty":-0.5,"b:and_evidence":0.5,"b:and_explicit":1.0,"b:and_inline":1.0,"b:and_links":0.5,"b:and_live":1.0,"b:and_metadata":1.0,"b:and_next":1.0,"b:and_no":-1.0,"b:and_one":0.5,"b:and_open":0.5,"b:and_optional":1.0,"b:and_percentage":-0.5,"b:and_refresh":-1.0,"b:and_saved":-0.5,"b:and_selected":1.0,"b:and_separate":1.0,"b:and_show":1.5,"b:and_source":-0.5,"b:and_status":0.5,"b:and_table":-0.5,"b:and_three":-1.0,"b:and_time":-0.5,"b:and_two":1.0,"b:and_unavailable":-1.5,"b:app_name":-0.5,"b:app_shell":0.5,"b:app_with":0.5,"b:banner_for":-0.5,"b:banner_with":-0.5,"b:bar_and":-1.0,"b:bar_chart":-0.5,"b:bar_with":0.5,"b:bars_and":0.5,"b:before_after":1.0,"b:before_and":0.5,"b:below_the":-0.5,"b:beside_an":-0.5,"b:button_and":1.0,"b:button_in":-0.5,"b:button_opening":-0.5,"b:button_with":-0.5,"b:buttons_and":0.5,"b:calendar_with":1.5,"b:card_with":-1.5,"b:cards_and":1.5,"b:cell_with":-0.5,"b:chart_and":1.0,"b:chart_legend":-0.5,"b:chart_with":-1.5,"b:charts_with":-1.5,"b:columns_and":-0.5,"b:compact_chart":-0.5,"b:compact_inline":-0.5,"b:compact_model":-0.5,"b:compact_read":-0.5,"b:compact_status":-0.5,"b:compact_table":-1.0,"b:comparison_table":0.5,"b:comparison_with":1.0,"b:confirmation_dialog":-0.5,"b:controls_for":-0.5,"b:controls_with":-1.5,"b:copy_link":-1.0,"b:counts_and":1.0,"b:coverage_and":-0.5,"b:coverage_table":-0.5,"b:dashboard_with":0.5,"b:data_dashboard":-0.5,"b:data_source":0.5,"b:data_table":-0.5,"b:date_and":-0.5,"b:dense_data":1.0,"b:dense_read":0.5,"b:dense_table":-1.0,"b:description_and":0.5,"b:detail_dialog":1.0,"b:detail_page":-0.5,"b:detail_panel":0.5,"b:detail_with":1.0,"b:details_and":-0.5,"b:details_dialog":-0.5,"b:details_panel":0.5,"b:details_with":-0.5,"b:dialog_and":-0.5,"b:dialog_with":-2.5,"b:each_with":-1.5,"b:empty_and":0.5,"b:empty_state":-0.5,"b:empty_states":-0.5,"b:error_and":0.5,"b:error_banner":0.5,"b:error_states":-0.5,"b:evidence_and":1.0,"b:evidence_table":1.0,"b:existing_analytics":-0.5,"b:existing_app":3.0,"b:existing_dashboard":-0.5,"b:existing_dense":-2.0,"b:existing_metric":-0.5,"b:existing_metrics":-0.5,"b:existing_overview":-0.5,"b:existing_page":-1.0,"b:existing_review":-0.5,"b:existing_run":-0.5,"b:existing_sidebar":-0.5,"b:existing_test":-0.5,"b:external_link":-0.5,"b:external_links":-0.5,"b:fields_and":-0.5,"b:filter_for":-0.5,"b:filters_and":0.5,"b:filters_with":-0.5,"b:for_an":1.0,"b:for_the":1.0,"b:form_and":0.5,"b:form_dialog":-0.5,"b:form_to":0.5,"b:form_with":1.0,"b:full_width":0.5,"b:graph_with":-0.5,"b:grid_of":1.0,"b:grid_with":1.0,"b:header_and":-2.0,"b:header_with":-0.5,"b:heading_and":-0.5,"b:headings_and":-0.5,"b:health_dashboard":-0.5,"b:history_table":0.5,"b:history_with":0.5,"b:hover_card":-0.5,"b:in_an":-0.5,"b:inside_existing":-0.5,"b:inside_the":2.0,"b:inspector_with":-1.0,"b:keep_existing":-0.5,"b:keep_the":-2.0,"b:keyboard_accessible":-0.5,"b:label_and":-1.0,"b:labels_and":-0.5,"b:landing_page":-0.5,"b:last_updated":0.5,"b:left_and":1.0,"b:light_and":-0.5,"b:line_chart":1.5,"b:link_button":-0.5,"b:link_to":1.0,"b:links_and":-0.5,"b:links_in":-1.0,"b:links_to":1.5,"b:list_and":-1.0,"b:list_with":1.0,"b:loading_empty":1.0,"b:loading_error":0.5,"b:menu_with":-1.0,"b:metadata_and":0.5,"b:metadata_rows":-0.5,"b:metadata_with":-1.0,"b:metric_card":-0.5,"b:metric_cards":-1.0,"b:metrics_and":-1.0,"b:metrics_table":-1.0,"b:metrics_with":0.5,"b:modal_with":-0.5,"b:name_and":-0.5,"b:names_and":-0.5,"b:navigation_and":0.5,"b:navigation_with":-0.5,"b:next_action":0.5,"b:next_to":-0.5,"b:notice_with":-0.5,"b:of_an":-0.5,"b:of_the":0.5,"b:on_an":-0.5,"b:on_hover":-0.5,"b:on_mobile":-0.5,"b:on_the":0.5,"b:one_compact":-0.5,"b:one_primary":-0.5,"b:overview_and":-1.0,"b:overview_with":2.0,"b:page_and":-0.5,"b:page_for":1.0,"b:page_frame":-1.0,"b:page_header":-1.0,"b:page_with":1.0,"b:panel_with":-2.5,"b:per_row":0.5,"b:picker_with":-0.5,"b:popover_with":-1.0,"b:preserve_the":-0.5,"b:primary_action":0.5,"b:report_with":1.0,"b:results_table":-0.5,"b:results_with":-0.5,"b:retry_button":-0.5,"b:review_page":0.5,"b:review_queue":0.5,"b:review_table":-0.5,"b:review_with":0.5,"b:right_side":-0.5,"b:row_and":-0.5,"b:row_with":-0.5,"b:rows_and":0.5,"b:rows_in":-0.5,"b:rows_with":-0.5,"b:run_history":0.5,"b:save_and":-0.5,"b:search_and":-0.5,"b:search_with":1.5,"b:searchable_multi":-1.0,"b:section_with":-1.0,"b:sections_with":-1.5,"b:segmented_control":-0.5,"b:selector_for":-0.5,"b:selector_in":-0.5,"b:selector_to":-1.0,"b:selectors_and":-0.5,"b:series_chart":-1.0,"b:shell_and":1.5,"b:shell_with":-0.5,"b:side_navigation":-1.0,"b:sidebar_and":1.5,"b:sidebar_with":-1.5,"b:single_page":1.5,"b:source_and":0.5,"b:source_details":-0.5,"b:source_links":1.0,"b:state_for":-0.5,"b:status_in":-0.5,"b:status_rows":1.0,"b:summary_and":1.0,"b:summary_card":-0.5,"b:summary_table":-0.5,"b:summary_with":-1.0,"b:switch_and":0.5,"b:tab_with":0.5,"b:table_and":0.5,"b:table_cell":-0.5,"b:table_column":-1.0,"b:table_of":0.5,"b:table_row":-1.0,"b:table_rows":-0.5,"b:table_to":-0.5,"b:table_with":0.5,"b:tables_and":1.0,"b:tables_with":0.5,"b:tags_and":-0.5,"b:text_and":-0.5,"b:text_input":2.5,"b:that_opens":-0.5,"b:the_app":1.0,"b:the_current":-1.5,"b:the_existing":-1.0,"b:the_left":0.5,"b:the_page":-1.0,"b:the_right":0.5,"b:the_selected":0.5,"b:time_and":-1.0,"b:time_range":0.5,"b:time_series":0.5,"b:timeline_with":-0.5,"b:timestamp_and":-0.5,"b:title_and":-0.5,"b:to_show":-1.0,"b:to_the":-1.0,"b:toggle_to":-0.5,"b:tokens_and":-0.5,"b:tool_with":0.5,"b:toolbar_and":1.0,"b:toolbar_with":-1.0,"b:trend_and":0.5,"b:two_column":-0.5,"b:two_compact":-1.0,"b:unavailable_states":-1.0,"b:update_the":-0.5,"b:using_the":1.0,"b:warning_and":-0.5,"b:while_preserving":-0.5,"b:with_clickable":0.5,"b:with_colored":-0.5,"b:with_compact":-0.5,"b:with_copy":-1.0,"b:with_counts":-0.5,"b:with_current":0.5,"b:with_editable":0.5,"b:with_exact":-0.5,"b:with_expandable":-1.0,"b:with_explicit":-0.5,"b:with_filters":0.5,"b:with_four":-0.5,"b:with_grouped":0.5,"b:with_hover":1.0,"b:with_independent":-0.5,"b:with_inline":1.5,"b:with_one":0.5,"b:with_per":0.5,"b:with_progress":-1.0,"b:with_read":-0.5,"b:with_request":1.0,"b:with_search":-0.5,"b:with_separate":-0.5,"b:with_shared":0.5,"b:with_tabs":0.5,"b:with_the":-0.5,"b:with_title":-1.0,"b:without_changing":-0.5,"b:workflow_with":1.5,"b:workspace_with":1.5,"base":-0.5,"commas:0":-0.5,"commas:3":1.0,"commas:4":1.0,"h:3":-0.5,"k:edit":-1.0,"k:page":0.5,"k:part":-0.5,"len:0":-1.0,"len:1":-1.0,"len:2":-0.5,"len:4":0.5,"len:5":0.5,"len:6":1.5,"s:0":-0.5,"s:4":0.5,"s:5":0.5,"u:above":-0.5,"u:accepted":-0.5,"u:access":1.0,"u:accessible":-1.0,"u:account":0.5,"u:actions":-0.5,"u:add":-1.5,"u:admin":1.0,"u:after":-0.5,"u:agent":0.5,"u:ai":0.5,"u:alert":1.0,"u:all":-0.5,"u:analytics":0.5,"u:animated":0.5,"u:answer":0.5,"u:application":0.5,"u:apply":-0.5,"u:architecture":1.0,"u:area":-0.5,"u:areas":1.0,"u:artifact":-0.5,"u:artifacts":-0.5,"u:as":-0.5,"u:assistant":-0.5,"u:at":0.5,"u:attachment":-1.0,"u:badge":-1.0,"u:banner":-0.5,"u:bar":-0.5,"u:below":-1.0,"u:benchmark":1.0,"u:between":-0.5,"u:blocked":-0.5,"u:blocking":-0.5,"u:blocks":0.5,"u:board":1.5,"u:body":0.5,"u:bounded":-1.0,"u:brief":0.5,"u:browser":1.0,"u:bug":-1.0,"u:bulk":-0.5,"u:button":-0.5,"u:buttons":-0.5,"u:by":0.5,"u:calendar":1.0,"u:cancel":-0.5,"u:candidate":0.5,"u:candidates":-0.5,"u:capture":0.5,"u:card":-0.5,"u:catalog":0.5,"u:category":0.5,"u:cells":0.5,"u:center":0.5,"u:change":-0.5,"u:changes":-0.5,"u:changing":-0.5,"u:chart":-1.0,"u:charts":0.5,"u:check":0.5,"u:checkboxes":-1.0,"u:chips":-1.0,"u:choose":-1.0,"u:clear":-1.0,"u:close":-0.5,"u:closed":-1.5,"u:cohort":0.5,"u:collapse":-0.5,"u:collapsed":-1.5,"u:collapsible":-0.5,"u:color":-0.5,"u:colors":-0.5,"u:columns":0.5,"u:comment":-0.5,"u:comments":-1.5,"u:compact":-0.5,"u:compare":2.0,"u:completed":-1.0,"u:completion":-0.5,"u:component":1.0,"u:concise":-0.5,"u:config":1.0,"u:configuration":-0.5,"u:confirm":-1.0,"u:confirmed":-1.0,"u:console":1.0,"u:containing":0.5,"u:content":-1.0,"u:contextual":-1.0,"u:conversation":-0.5,"u:copy":-0.5,"u:count":-0.5,"u:counts":-1.0,"u:create":0.5,"u:custom":-0.5,"u:daily":0.5,"u:dark":0.5,"u:dashboard":0.5,"u:data":-0.5,"u:dataset":0.5,"u:day":-0.5,"u:days":-0.5,"u:decision":0.5,"u:decisions":1.5,"u:default":-2.0,"u:definition":-0.5,"u:definitions":0.5,"u:delete":-0.5,"u:delta":-1.5,"u:demand":-0.5,"u:dense":0.5,"u:dependency":-1.0,"u:description":-0.5,"u:descriptions":-1.0,"u:destination":-1.5,"u:detailed":-0.5,"u:details":0.5,"u:diagnostic":0.5,"u:diagnostics":0.5,"u:dialog":-1.0,"u:directory":2.5,"u:disabled":-0.5,"u:disclosure":-0.5,"u:display":-0.5,"u:distinct":-0.5,"u:document":1.5,"u:documentation":0.5,"u:dot":-0.5,"u:dots":0.5,"u:drafts":-0.5,"u:drawer":-1.0,"u:drill":0.5,"u:drop":-0.5,"u:dropdown":-0.5,"u:duration":-0.5,"u:each":1.0,"u:editable":1.0,"u:editor":-0.5,"u:edits":-1.0,"u:embedded":-1.0,"u:end":-0.5,"u:entity":0.5,"u:error":-0.5,"u:event":0.5,"u:events":0.5,"u:evidence":-0.5,"u:existing":-2.5,"u:expand":-1.0,"u:expandable":-0.5,"u:expanded":-1.5,"u:experiment":-0.5,"u:explain":-1.0,"u:explaining":-0.5,"u:explicit":-1.0,"u:failed":-0.5,"u:failure":-0.5,"u:fallback":-1.0,"u:feature":1.0,"u:feed":0.5,"u:feedback":-0.5,"u:fields":-0.5,"u:file":0.5,"u:filterable":1.5,"u:filtered":-1.0,"u:filters":0.5,"u:findings":0.5,"u:first":0.5,"u:flow":-0.5,"u:follow":0.5,"u:footer":-1.5,"u:for":-1.0,"u:form":1.0,"u:four":1.0,"u:from":-0.5,"u:gallery":0.5,"u:gap":-0.5,"u:gate":1.0,"u:generate":0.5,"u:generated":-0.5,"u:global":0.5,"u:graph":0.5,"u:grid":1.0,"u:group":0.5,"u:grouped":0.5,"u:guide":2.0,"u:header":-0.5,"u:headers":-0.5,"u:heading":-0.5,"u:headings":0.5,"u:headline":0.5,"u:health":0.5,"u:hierarchy":-0.5,"u:highlight":-0.5,"u:highlighted":0.5,"u:home":0.5,"u:horizontal":0.5,"u:host":-0.5,"u:hours":0.5,"u:hover":-1.0,"u:icon":-1.5,"u:icons":-0.5,"u:id":-0.5,"u:in":-1.0,"u:inbox":1.0,"u:independently":0.5,"u:indicator":-0.5,"u:info":-1.0,"u:information":-0.5,"u:informational":-1.0,"u:inline":-1.5,"u:inside":-1.0,"u:inspector":1.5,"u:intake":1.5,"u:interactive":1.0,"u:into":-1.0,"u:inventory":1.5,"u:item":-0.5,"u:items":-1.5,"u:its":0.5,"u:job":0.5,"u:jobs":-0.5,"u:json":0.5,"u:keep":-1.0,"u:keeping":-0.5,"u:label":-1.0,"u:labeled":-0.5,"u:labeling":1.0,"u:labels":-1.0,"u:landing":1.0,"u:legend":-0.5,"u:level":-1.0,"u:library":0.5,"u:lifecycle":0.5,"u:light":-0.5,"u:line":-0.5,"u:lines":-0.5,"u:linked":-1.0,"u:links":-0.5,"u:list":1.0,"u:listing":1.0,"u:lists":0.5,"u:load":-0.5,"u:loading":-1.0,"u:log":2.0,"u:long":-0.5,"u:lookup":1.0,"u:manager":0.5,"u:match":-1.0,"u:matching":1.0,"u:matrix":1.5,"u:measured":0.5,"u:measurement":0.5,"u:message":-0.5,"u:messages":-1.5,"u:metadata":-0.5,"u:metric":0.5,"u:minimal":-0.5,"u:mobile":1.0,"u:modal":-1.0,"u:mode":-0.5,"u:model":-0.5,"u:monitoring":-0.5,"u:more":0.5,"u:multi":0.5,"u:multiple":-0.5,"u:my":1.0,"u:name":-0.5,"u:names":-0.5,"u:nav":-0.5,"u:navigation":-0.5,"u:neutral":-1.0,"u:new":-0.5,"u:node":-0.5,"u:not":-1.0,"u:note":1.0,"u:numbered":-0.5,"u:numbers":-1.5,"u:observed":-1.0,"u:of":0.5,"u:on":-1.0,"u:only":0.5,"u:open":-0.5,"u:opening":-0.5,"u:opens":-0.5,"u:operations":0.5,"u:option":0.5,"u:optional":-1.0,"u:options":-1.5,"u:outcome":-1.0,"u:output":-0.5,"u:over":-1.0,"u:overlay":-1.0,"u:owner":0.5,"u:page":1.0,"u:pages":0.5,"u:paginated":0.5,"u:pagination":-0.5,"u:pane":1.0,"u:panel":-0.5,"u:panels":1.0,"u:percentage":-0.5,"u:performance":0.5,"u:person":-0.5,"u:pill":-1.5,"u:pills":-0.5,"u:pinned":0.5,"u:pipeline":-1.0,"u:placeholder":-2.0,"u:plus":0.5,"u:popover":-0.5,"u:post":0.5,"u:presentation":1.5,"u:preserve":-1.5,"u:preserving":-2.5,"u:preview":0.5,"u:previews":0.5,"u:primary":0.5,"u:priority":1.5,"u:production":0.5,"u:progress":0.5,"u:project":0.5,"u:projects":1.0,"u:prominent":0.5,"u:prompt":1.0,"u:public":1.0,"u:publication":0.5,"u:publish":1.0,"u:published":1.5,"u:quality":-0.5,"u:query":-0.5,"u:question":1.5,"u:queue":1.0,"u:quick":0.5,"u:quiet":1.0,"u:rail":-2.0,"u:range":-1.0,"u:ranked":0.5,"u:rate":0.5,"u:read":0.5,"u:readiness":-0.5,"u:reading":0.5,"u:reason":-0.5,"u:reasoning":-0.5,"u:recording":0.5,"u:reference":0.5,"u:region":-1.0,"u:release":0.5,"u:rename":-0.5,"u:report":1.0,"u:reporting":-0.5,"u:reports":0.5,"u:request":0.5,"u:requirement":-0.5,"u:resizable":-0.5,"u:response":-1.0,"u:responsive":-0.5,"u:result":-0.5,"u:results":0.5,"u:retain":-1.0,"u:retry":-1.0,"u:review":0.5,"u:reviewed":0.5,"u:rollout":-0.5,"u:routing":1.0,"u:rows":0.5,"u:rule":-0.5,"u:running":-1.5,"u:runs":0.5,"u:save":-1.5,"u:saved":0.5,"u:scoped":0.5,"u:score":0.5,"u:scorecard":0.5,"u:scroll":-1.5,"u:scrollable":0.5,"u:scrolling":-0.5,"u:search":0.5,"u:section":-1.0,"u:sections":1.0,"u:segment":-1.0,"u:select":-1.0,"u:selectable":-0.5,"u:selecting":-0.5,"u:selection":0.5,"u:semantic":-0.5,"u:send":-0.5,"u:separate":-1.0,"u:separated":-1.0,"u:series":-0.5,"u:server":0.5,"u:service":0.5,"u:sessions":0.5,"u:setup":0.5,"u:share":-1.0,"u:shared":-0.5,"u:shell":0.5,"u:short":0.5,"u:show":-0.5,"u:shows":1.0,"u:side":0.5,"u:sidebar":-0.5,"u:single":0.5,"u:six":1.0,"u:small":-0.5,"u:snapshot":-1.0,"u:sortable":0.5,"u:sources":-1.0,"u:spacing":-1.0,"u:stacked":-1.0,"u:stage":0.5,"u:stale":-1.0,"u:step":-0.5,"u:stepper":1.0,"u:steps":0.5,"u:sticky":0.5,"u:strip":-1.0,"u:style":1.0,"u:submission":0.5,"u:submit":1.0,"u:suggestions":-1.0,"u:summaries":0.5,"u:surface":-0.5,"u:svg":0.5,"u:system":1.5,"u:tab":-0.5,"u:table":0.5,"u:tables":0.5,"u:tabs":0.5,"u:tag":-1.0,"u:tags":-0.5,"u:target":-0.5,"u:team":1.0,"u:technical":-0.5,"u:text":-0.5,"u:that":-0.5,"u:the":-1.0,"u:theme":0.5,"u:then":2.0,"u:tiles":1.0,"u:timestamp":-1.5,"u:timing":0.5,"u:to":-0.5,"u:toggles":1.0,"u:token":-0.5,"u:tokens":-0.5,"u:tool":1.0,"u:toolbar":-0.5,"u:tools":0.5,"u:top":-1.0,"u:totals":-0.5,"u:trace":-0.5,"u:tracker":0.5,"u:tracking":1.0,"u:transcript":-0.5,"u:tree":1.0,"u:trends":2.0,"u:triage":0.5,"u:turn":-0.5,"u:type":-0.5,"u:typed":-0.5,"u:types":-1.5,"u:unavailable":-1.5,"u:up":-0.5,"u:updated":0.5,"u:upload":1.0,"u:url":0.5,"u:usage":-1.0,"u:use":-0.5,"u:using":0.5,"u:validation":-1.0,"u:value":-0.5,"u:values":-1.0,"u:version":-1.0,"u:versus":-0.5,"u:vertical":-0.5,"u:vertically":-0.5,"u:view":0.5,"u:viewer":1.0,"u:visible":-0.5,"u:visual":1.0,"u:visualization":-0.5,"u:volume":0.5,"u:warning":-1.0,"u:warnings":0.5,"u:weekly":1.5,"u:when":-2.0,"u:where":1.0,"u:while":-2.0,"u:widget":-1.0,"u:widgets":-1.5,"u:windows":1.0,"u:with":0.5,"u:without":-1.5,"u:wizard":-0.5,"u:work":0.5,"u:workflow":0.5,"u:workspace":1.0,"u:wrapped":-0.5,"u:wrapping":-0.5}}
@@ -0,0 +1,26 @@
1
+ // @generated by scripts/sync-api-types.mjs from the JSDoc in api/**/*.mjs.
2
+ // DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
3
+
4
+ /**
5
+ * Whether an idea carries an edit phrase. It needs no word table.
6
+ * @param {string} idea
7
+ * @returns {boolean}
8
+ */
9
+ export function hasEditPhrase(idea: string): boolean;
10
+ /**
11
+ * The ranker's best page template that is not a shell, or undefined.
12
+ * @param {import('./rank.mjs').RankedPage[]} ranked
13
+ */
14
+ export function bestPage(ranked: import("./rank.mjs").RankedPage[]): import("./words.mjs").RankedPage | undefined;
15
+ /**
16
+ * The text score without its threshold, and whether the edit rule fires.
17
+ * Null without the table or a page to weigh.
18
+ * @param {string} idea
19
+ * @param {import('./rank.mjs').IdeaKind} kind
20
+ * @param {import('./rank.mjs').RankedPage[]} ranked
21
+ * @returns {{edit: boolean, score: number} | null}
22
+ */
23
+ export function shellCallScore(idea: string, kind: import("./rank.mjs").IdeaKind, ranked: import("./rank.mjs").RankedPage[]): {
24
+ edit: boolean;
25
+ score: number;
26
+ } | null;
@@ -0,0 +1,87 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file Whether an idea that build would start on the app shell still asks
5
+ * for a whole page.
6
+ *
7
+ * @input The idea, its kind (`ideaKind`), and the page ranker's output.
8
+ * @output True when the idea reads as a new page, so build starts from the
9
+ * closest page template instead of the empty shell.
10
+ * @position Beside start.mjs (api/build/kit/). It runs only on a shell start,
11
+ * after the placement rules. An idea with an edit phrase keeps the shell.
12
+ *
13
+ * The call is a linear score over fixed weights
14
+ * (`shell.weights.json`): the idea's words and word pairs, its kind, its
15
+ * length, and how strongly the ranker's best page template matched.
16
+ */
17
+
18
+ import {loadShellWeights} from '../_adapter.mjs';
19
+ import {SHELL_FAMILY} from './words.mjs';
20
+
21
+ /**
22
+ * Words that mark a change to a page or app the builder already has.
23
+ */
24
+ const EDIT =
25
+ /\b(existing|current|my (page|app|dashboard|screen|site)|add (a |an |the )?\w* ?to|change|fix|move|rename|restyle|update|modify|replace|remove|tweak|adjust|improve|refactor|our (page|app))\b/;
26
+
27
+ /**
28
+ * Whether an idea carries an edit phrase. It needs no word table.
29
+ * @param {string} idea
30
+ * @returns {boolean}
31
+ */
32
+ export function hasEditPhrase(idea) {
33
+ return EDIT.test(String(idea).toLowerCase());
34
+ }
35
+
36
+ /**
37
+ * The features the weights are keyed by.
38
+ * @param {string} text the idea, lower case
39
+ * @param {string} kind
40
+ * @param {import('./rank.mjs').RankedPage | undefined} best the ranker's best
41
+ * page template that is not a shell
42
+ * @returns {Set<string>}
43
+ */
44
+ function featuresOf(text, kind, best) {
45
+ const words = text.match(/[a-z]+/g) ?? [];
46
+ const features = new Set(['bias', `k:${kind}`]);
47
+ words.forEach((word, i) => {
48
+ features.add(`u:${word}`);
49
+ if (i > 0) features.add(`b:${words[i - 1]}_${word}`);
50
+ });
51
+ if (best) {
52
+ features.add(`s:${Math.min(Math.floor(best.score / 5), 6)}`);
53
+ features.add(`h:${Math.min(best.hits, 4)}`);
54
+ if (best.familyNamed) features.add('fam');
55
+ if (best.base) features.add('base');
56
+ }
57
+ features.add(`len:${Math.min(Math.floor(words.length / 5), 6)}`);
58
+ features.add(`commas:${Math.min((text.match(/,/g) ?? []).length, 4)}`);
59
+ return features;
60
+ }
61
+
62
+ /**
63
+ * The ranker's best page template that is not a shell, or undefined.
64
+ * @param {import('./rank.mjs').RankedPage[]} ranked
65
+ */
66
+ export function bestPage(ranked) {
67
+ return ranked.find(r => r.family !== SHELL_FAMILY && r.score > 0);
68
+ }
69
+
70
+ /**
71
+ * The text score without its threshold, and whether the edit rule fires.
72
+ * Null without the table or a page to weigh.
73
+ * @param {string} idea
74
+ * @param {import('./rank.mjs').IdeaKind} kind
75
+ * @param {import('./rank.mjs').RankedPage[]} ranked
76
+ * @returns {{edit: boolean, score: number} | null}
77
+ */
78
+ export function shellCallScore(idea, kind, ranked) {
79
+ const weights = loadShellWeights();
80
+ if (!weights) return null;
81
+ const text = String(idea).toLowerCase();
82
+ const best = bestPage(ranked);
83
+ let score = 0;
84
+ for (const feature of featuresOf(text, kind, best))
85
+ score += weights.weights[feature] ?? 0;
86
+ return {edit: EDIT.test(text), score};
87
+ }
@@ -8,7 +8,8 @@
8
8
  import {loadWeights} from '../_adapter.mjs';
9
9
  import {asksForNewPage} from './kind.mjs';
10
10
  import {pickAlternatives, pickStart} from './rank.mjs';
11
- import {blendOrder, weighStart} from './weights.mjs';
11
+ import {hasEditPhrase, shellCallScore} from './shellcall.mjs';
12
+ import {blendOrder, blendSummary, weighStart} from './weights.mjs';
12
13
 
13
14
  /**
14
15
  * @typedef {import('../../search/search.type.mjs').SearchResultEntry} SearchResultEntry
@@ -57,6 +58,60 @@ function placement(kind, inPage) {
57
58
  return null;
58
59
  }
59
60
 
61
+ /**
62
+ * Fixed coefficients of a logistic decision over build's own numbers: bias,
63
+ * whole page, edit, blend margin over the shell, the shell's blend score, the
64
+ * gap to the blend's second template, the idea's comma count, the text score
65
+ * (shellcall.mjs) and its edit-word flag. Fixed constants; nothing is trained
66
+ * at run time. An edit phrase keeps the shell before the decision runs, so the
67
+ * two edit inputs are 0 whenever it runs; they stay because the constants were
68
+ * fit with them.
69
+ */
70
+ const LIFT = [
71
+ -0.7707, 0.6706, -0.2642, 0.2815, -0.1621, 0.1759, 0.1713, 0.2891, -0.3491,
72
+ ];
73
+
74
+ /** The decision replaces the shell with a page when p >= 0.30. */
75
+ const LIFT_AT = 0.3;
76
+
77
+ /**
78
+ * The page template that replaces an app-shell start, or null to keep the
79
+ * shell. The blend's best template takes the start when the decision's
80
+ * whole-page probability is at least 0.30.
81
+ * @param {import('./rank.mjs').RankedPage[]} ranked
82
+ * @param {import('./rank.mjs').IdeaKind} kind
83
+ * @param {PageTemplate[]} catalog
84
+ * @param {string} idea
85
+ * @returns {PageTemplate | null}
86
+ */
87
+ function liftFromShell(ranked, kind, catalog, idea) {
88
+ const b = blendSummary(
89
+ idea,
90
+ ranked,
91
+ pickStart(ranked, 'page'),
92
+ catalog,
93
+ loadWeights(),
94
+ );
95
+ if (!b || !b.best) return null;
96
+ // A change to a page or app the builder already has keeps its shell.
97
+ if (hasEditPhrase(idea)) return null;
98
+ const text = shellCallScore(idea, kind, ranked);
99
+ const x = [
100
+ 1,
101
+ kind === 'page' ? 1 : 0,
102
+ kind === 'edit' ? 1 : 0,
103
+ b.bestScore - b.shell,
104
+ b.shell,
105
+ b.bestScore - b.secondScore,
106
+ (String(idea).match(/,/g) ?? []).length,
107
+ text?.score ?? 0,
108
+ text?.edit ? 1 : 0,
109
+ ];
110
+ const logit = x.reduce((s, v, i) => s + v * LIFT[i], 0);
111
+ if (1 / (1 + Math.exp(-logit)) < LIFT_AT) return null;
112
+ return catalog.find(t => t.name === b.best) ?? null;
113
+ }
114
+
60
115
  /**
61
116
  * The template to start from: the ready page the ranker puts first when it
62
117
  * has the evidence to lead, else the first fallback shell the project can
@@ -113,10 +168,18 @@ export function chooseStart(ranked, kind, pages, directMatch, catalog, idea) {
113
168
  ? proposed
114
169
  : null
115
170
  : (ranked.find(r => r.name === weighed) ?? proposed);
116
- const closest = pick && catalog.find(t => t.name === pick.name);
117
- if (pick && closest) {
171
+ // An idea that would start on the app shell starts from the blend's best page
172
+ // when the decision's whole-page probability is at least 0.30. A direct match,
173
+ // ready or not, keeps the start and reason it already has.
174
+ const lifted =
175
+ !direct && (!pick || pick.family === 'Shell')
176
+ ? liftFromShell(ranked, kind, catalog, idea)
177
+ : null;
178
+ const closest = lifted ?? (pick && catalog.find(t => t.name === pick.name));
179
+ if (closest) {
118
180
  const agrees = closest.name === direct;
119
- const place = placement(kind, pick.base && pick.familyNamed);
181
+ const place =
182
+ lifted || !pick ? null : placement(kind, pick.base && pick.familyNamed);
120
183
  return {
121
184
  ...asTemplate(closest),
122
185
  basis: agrees ? 'direct' : 'closest',
@@ -40,6 +40,21 @@ export function weighStart(idea: string, ranked: import("./rank.mjs").RankedPage
40
40
  weights?: WeightsFile | null;
41
41
  newPage?: boolean;
42
42
  }): string | null | undefined;
43
+ /**
44
+ * The blend's scores: the app shell's, and the best non-shell template with
45
+ * its score and the runner-up's. Null without weights.
46
+ * @param {string} idea
47
+ * @param {import('./rank.mjs').RankedPage[]} ranked
48
+ * @param {import('./rank.mjs').RankedPage | null} pick
49
+ * @param {DescribedTemplate[]} catalog
50
+ * @param {WeightsFile | null} weights
51
+ */
52
+ export function blendSummary(idea: string, ranked: import("./rank.mjs").RankedPage[], pick: import("./rank.mjs").RankedPage | null, catalog: DescribedTemplate[], weights: WeightsFile | null): {
53
+ shell: number;
54
+ best: string;
55
+ bestScore: number;
56
+ secondScore: number;
57
+ } | null;
43
58
  /** The app shell, as one candidate. */
44
59
  export const SHELL: "SHELL";
45
60
  export type WeightTable = {
@@ -418,3 +418,30 @@ export function weighStart(
418
418
  if (newPage && kept) return kept;
419
419
  return null;
420
420
  }
421
+
422
+ /**
423
+ * The blend's scores: the app shell's, and the best non-shell template with
424
+ * its score and the runner-up's. Null without weights.
425
+ * @param {string} idea
426
+ * @param {import('./rank.mjs').RankedPage[]} ranked
427
+ * @param {import('./rank.mjs').RankedPage | null} pick
428
+ * @param {DescribedTemplate[]} catalog
429
+ * @param {WeightsFile | null} weights
430
+ */
431
+ export function blendSummary(idea, ranked, pick, catalog, weights) {
432
+ if (!weights) return null;
433
+ const {cands, scores} = blend(idea, ranked, pick, catalog, weights);
434
+ let shell = 0;
435
+ const rest = [];
436
+ for (let i = 0; i < cands.length; i++) {
437
+ if (cands[i] === SHELL) shell = scores[i];
438
+ else rest.push({name: cands[i], score: scores[i], i});
439
+ }
440
+ rest.sort((x, y) => y.score - x.score || x.i - y.i);
441
+ return {
442
+ shell,
443
+ best: rest[0]?.name ?? null,
444
+ bestScore: rest[0]?.score ?? 0,
445
+ secondScore: rest[1]?.score ?? 0,
446
+ };
447
+ }
@@ -277,7 +277,7 @@ useMenuDrillIn useMenuDrillIn DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/use
277
277
  useMenuHover useMenuHover hooks/useAnimatedLayout.doc.mjs hooks/useMenuHover.ts
278
278
  useMenuOverflow useMenuOverflow DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/useMenuOverflow.ts
279
279
  useMobileKeyboard ERR_UNKNOWN_COMPONENT - keyboard/useMobileKeyboard.ts
280
- useOutlineFromDOM useOutlineFromDOM Outline/Outline.doc.mjs Outline/useOutlineFromDOM.ts
280
+ useOutlineFromDOM useOutlineFromDOM Outline/useOutlineFromDOM.doc.mjs Outline/useOutlineFromDOM.ts
281
281
  useOverlay useOverlay Overlay/useOverlay.doc.mjs Overlay/useOverlay.tsx
282
282
  useOwnScrollGesture useOwnScrollGesture DateInput/DateInput.doc.mjs DateInput/useOwnScrollGesture.ts
283
283
  usePager usePager hooks/useAnimatedLayout.doc.mjs hooks/usePager.ts
@@ -282,7 +282,6 @@ export function readBuiltPath(target: string, { fileLimit }?: {
282
282
  */
283
283
  export function builtIntegrationPackages(target: string, cwd: string): string[];
284
284
  export { placeholderFixes } from "../../foundation/discovery/template-icons.mjs";
285
- export { unlistedIconSets } from "../../foundation/discovery/icon-set-discovery.mjs";
286
285
  export { installCommandFor as packageInstallCommand } from "../../foundation/discovery/template-needs.mjs";
287
286
  export { resolveRecordedTheme } from "../theme/theme.mjs";
288
287
  export { collectUnloadedFonts } from "../theme/build/font-warning.mjs";
@@ -298,6 +297,8 @@ import { lastNoticeSkip } from '../../foundation/release/notices.mjs';
298
297
  import { lastCheckFailure } from '../../foundation/release/global-state.mjs';
299
298
  import { stateLockHolder } from '../../foundation/release/global-state.mjs';
300
299
  import { displayHomePath } from '../../foundation/agent-docs/computer-agent-text.mjs';
300
+ export { iconUseCommand, unlistedIconSets } from "../../foundation/discovery/icon-set-discovery.mjs";
301
301
  export { isLocalThemeOwner, planThemeAppWrite, readThemeState, resolveThemeModule } from "../../foundation/config/theme-state.mjs";
302
- export { missingThemePackage, themeBuild, validateThemePrivateInputs } from "../theme/build/build.mjs";
302
+ export { GENERATED_MARKER, isPrivateVarRefusal, missingThemePackage, themeBuild, validateThemePrivateInputs } from "../theme/build/build.mjs";
303
+ export { APP_COPY_MARK, EDITOR_GENERATED_MARK } from "../theme-edit/_marks.mjs";
303
304
  export { AUTHORING_AUDIT, authoringAudit, authoringAuditData } from "./_authoring-audit.mjs";
@@ -41,7 +41,10 @@ import {computerAgentTextSettings} from '../../foundation/env/user-settings.mjs'
41
41
  import * as fs from 'node:fs';
42
42
  import {placeholderUses} from '../../foundation/discovery/template-icons.mjs';
43
43
  export {placeholderFixes} from '../../foundation/discovery/template-icons.mjs';
44
- export {unlistedIconSets} from '../../foundation/discovery/icon-set-discovery.mjs';
44
+ export {
45
+ iconUseCommand,
46
+ unlistedIconSets,
47
+ } from '../../foundation/discovery/icon-set-discovery.mjs';
45
48
  import {elementPropOrigins} from '../../foundation/discovery/module-exports.mjs';
46
49
  import {cssImports} from '../../foundation/render/embedded-imports.mjs';
47
50
  import {satisfiesRange} from '../../foundation/env/semver.mjs';
@@ -73,10 +76,13 @@ export {
73
76
  resolveThemeModule,
74
77
  } from '../../foundation/config/theme-state.mjs';
75
78
  export {
79
+ GENERATED_MARKER,
80
+ isPrivateVarRefusal,
76
81
  missingThemePackage,
77
82
  themeBuild,
78
83
  validateThemePrivateInputs,
79
84
  } from '../theme/build/build.mjs';
85
+ export {APP_COPY_MARK, EDITOR_GENERATED_MARK} from '../theme-edit/_marks.mjs';
80
86
  export {installCommandFor as packageInstallCommand} from '../../foundation/discovery/template-needs.mjs';
81
87
  export {resolveRecordedTheme} from '../theme/theme.mjs';
82
88
  export {collectUnloadedFonts} from '../theme/build/font-warning.mjs';
@@ -482,6 +482,14 @@ export type DoctorContext = {
482
482
  status: "selected" | "none" | "ambiguous" | "missing" | "withdrawn";
483
483
  reason: string;
484
484
  configured?: string;
485
+ set?: {
486
+ name: string;
487
+ package: string;
488
+ data: {
489
+ variants?: string[];
490
+ };
491
+ };
492
+ variant?: string;
485
493
  backups?: Array<{
486
494
  selector: string;
487
495
  status: "selected" | "ambiguous" | "missing" | "withdrawn";
@@ -110,6 +110,7 @@ import {
110
110
  projectHasOwnCli,
111
111
  computerIntegrationsOutside,
112
112
  findIconPlaceholders,
113
+ iconUseCommand,
113
114
  placeholderFixes,
114
115
  unlistedIconSets,
115
116
  computerIntegrationsToAdd,
@@ -168,7 +169,7 @@ import {checkBuilt} from './built-checks.mjs';
168
169
  * Combined project-level integration issues, including cross-package template replacement warnings.
169
170
  * @property {Error|null} [configError] - Error thrown while resolving the config
170
171
  * path (e.g. multiple config files present), surfaced by checkConfig as a FAIL.
171
- * @property {{sets: Array<{name: string, package: string}>, withdrawn: Array<{name: string, package: string, reason: string}>, choice: {status: 'selected'|'none'|'ambiguous'|'missing'|'withdrawn', reason: string, configured?: string, backups?: Array<{selector: string, status: 'selected'|'ambiguous'|'missing'|'withdrawn', reason: string}>, order?: Array<{name: string, package: string}>}}|null} [iconSets]
172
+ * @property {{sets: Array<{name: string, package: string}>, withdrawn: Array<{name: string, package: string, reason: string}>, choice: {status: 'selected'|'none'|'ambiguous'|'missing'|'withdrawn', reason: string, configured?: string, set?: {name: string, package: string, data: {variants?: string[]}}, variant?: string, backups?: Array<{selector: string, status: 'selected'|'ambiguous'|'missing'|'withdrawn', reason: string}>, order?: Array<{name: string, package: string}>}}|null} [iconSets]
172
173
  * The project's icon sets (AST-084 FR17), or null when they could not be read.
173
174
  * Experimental: may change or be removed in a patch release.
174
175
  * @property {Array<{file: string, local: string, meanings: string[] | null, uses: number}>|null} [iconPlaceholders]
@@ -652,9 +653,11 @@ export function checkImplicitIntegrations(ctx) {
652
653
 
653
654
  /**
654
655
  * The sentence `implicit-integrations` adds for dependencies whose manifest
655
- * could not be loaded, or '' when there are none. Still informational: the
656
- * package is a dependency's own bug, which `doctor integration validate`
657
- * diagnoses, but doctor must not report it as absent.
656
+ * could not be loaded, or '' when there are none. Still informational: a
657
+ * broken install (a package the dependency requires is missing) is also that
658
+ * package's integration issue (INV14), and anything else is the dependency's
659
+ * own bug, which `doctor integration validate` diagnoses; either way doctor
660
+ * must not report it as absent.
658
661
  * @param {Array<{spec: string, error: string}>} failures
659
662
  * @returns {string}
660
663
  */
@@ -1145,11 +1148,34 @@ export function checkIconSets(ctx) {
1145
1148
  fix: 'Write each name in experimental.iconSet as "<package>/<set>" (`astryx experimental icon --list` names them).',
1146
1149
  };
1147
1150
  }
1151
+ // The look a project picks is one of its main set's variants.
1152
+ const declared = choice.set?.data.variants ?? [];
1153
+ if (choice.set && choice.variant && !declared.includes(choice.variant)) {
1154
+ return {
1155
+ id,
1156
+ label,
1157
+ status: 'fail',
1158
+ message:
1159
+ declared.length === 0
1160
+ ? `experimental.iconVariant names "${choice.variant}", but the main set ${choice.configured} declares no variants: it draws one look.`
1161
+ : `experimental.iconVariant names "${choice.variant}", but the main set ${choice.configured} declares no such variant. Its variants: ${declared.join(', ')}.`,
1162
+ fix:
1163
+ declared.length === 0
1164
+ ? `Remove experimental.iconVariant: run \`${iconUseCommandOf(choice)}\`.`
1165
+ : `Pick one of its variants: \`${iconUseCommandOf(choice, '<variant>')}\`.`,
1166
+ };
1167
+ }
1148
1168
  const order = choice.order ?? [];
1149
1169
  const unlisted = sets.filter(set => !order.includes(set));
1150
1170
  if (sets.length > 1 && unlisted.length > 0 && order.length > 0) {
1151
1171
  const [main, ...backups] = order;
1152
- const {problem, fix} = unlistedIconSets(sets, main, backups, unlisted);
1172
+ const {problem, fix} = unlistedIconSets(
1173
+ sets,
1174
+ main,
1175
+ backups,
1176
+ unlisted,
1177
+ choice.variant,
1178
+ );
1153
1179
  return {
1154
1180
  id,
1155
1181
  label,
@@ -1171,10 +1197,24 @@ export function checkIconSets(ctx) {
1171
1197
  id,
1172
1198
  label,
1173
1199
  status: 'pass',
1174
- message: `${sets.length} icon set${sets.length === 1 ? '' : 's'} installed. ${choice.reason}`,
1200
+ message: `${sets.length} icon set${sets.length === 1 ? '' : 's'} installed. ${choice.reason}${choice.variant ? ` Each icon draws its "${choice.variant}" look where its set has one.` : ''}`,
1175
1201
  };
1176
1202
  }
1177
1203
 
1204
+ /**
1205
+ * The `experimental icon use` command that writes the project's list again,
1206
+ * as astryx.config names it, with a variant when one is given.
1207
+ * @param {NonNullable<DoctorContext['iconSets']>['choice']} choice
1208
+ * @param {string} [variant]
1209
+ */
1210
+ function iconUseCommandOf(choice, variant) {
1211
+ return iconUseCommand(
1212
+ /** @type {string} */ (choice.configured),
1213
+ (choice.backups ?? []).map(each => each.selector),
1214
+ variant,
1215
+ );
1216
+ }
1217
+
1178
1218
  /**
1179
1219
  * The placeholder component for a missing icon, still in the project's own
1180
1220
  * source (AST-084): each file and the meanings it stands for, with the commands that give each a
@@ -1207,7 +1247,12 @@ export function checkIconPlaceholders(ctx) {
1207
1247
  )
1208
1248
  .join(', ');
1209
1249
  const uses = found.reduce((total, each) => total + each.uses, 0);
1210
- const [mapFix, backupFix] = placeholderFixes(meanings, main);
1250
+ const [mapFix, backupFix] = placeholderFixes(
1251
+ meanings,
1252
+ main,
1253
+ (choice.backups ?? []).map(each => each.selector),
1254
+ choice.variant,
1255
+ );
1211
1256
  return {
1212
1257
  id,
1213
1258
  label,
@@ -2277,7 +2322,7 @@ export function checkGatherCache() {
2277
2322
  id: 'gather-cache',
2278
2323
  label: 'Kept catalog cache',
2279
2324
  status: 'info',
2280
- message: `search, build, component, template, theme, discover and doctor keep what they gather (search's catalogs, each integration's check results, template discovery's records, integrations' theme records, and doctor's docs checks) in ${summary.dir} (${summary.entries} ${summary.entries === 1 ? 'entry' : 'entries'}, ${size})${summary.pnp ? ", but not in a run under Yarn Plug'n'Play's loader, such as `yarn astryx`, which gathers every time" : ''}; each is used only while nothing it read has changed, and deleting the folder clears it.`,
2325
+ message: `search, build, component, template, theme, discover, docs and doctor keep what they gather (search's catalogs, each integration's check results, template discovery's records, integrations' theme records, and doctor's docs checks) in ${summary.dir} (${summary.entries} ${summary.entries === 1 ? 'entry' : 'entries'}, ${size})${summary.pnp ? ", but not in a run under Yarn Plug'n'Play's loader, such as `yarn astryx`, which gathers every time" : ''}; each is used only while nothing it read has changed, and deleting the folder clears it.`,
2281
2326
  };
2282
2327
  }
2283
2328