@astryxdesign/cli 0.7.17-canary.gffd1fc0 → 0.7.17
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.
- package/CHANGELOG.md +1877 -0
- package/README.md +90 -84
- package/api/build/_adapter.d.mts +51 -0
- package/api/build/_adapter.mjs +133 -7
- package/api/build/build.doc.mjs +3 -3
- package/api/build/build.mjs +23 -14
- package/api/build/build.type.d.mts +1 -1
- package/api/build/build.type.mjs +2 -2
- package/api/build/help/help.d.mts +15 -14
- package/api/build/help/help.mjs +65 -6
- package/api/build/kit/kit.mjs +1 -1
- package/api/build/kit/start.mjs +1 -1
- package/api/component/_adapter.d.mts +28 -4
- package/api/component/_adapter.mjs +79 -45
- package/api/component/component.d.mts +1 -1
- package/api/component/component.mjs +18 -7
- package/api/component/detail/showcase/showcase.mjs +19 -8
- package/api/discover/_adapter.d.mts +71 -8
- package/api/discover/_adapter.mjs +320 -69
- package/api/discover/_catalog-view.d.mts +22 -0
- package/api/discover/_catalog-view.mjs +30 -1
- package/api/discover/_icon-set-coverage.d.mts +22 -0
- package/api/discover/_icon-set-coverage.mjs +32 -0
- package/api/discover/detail/detail.d.mts +6 -3
- package/api/discover/detail/detail.mjs +14 -6
- package/api/discover/detail/doc/doc.mjs +1 -1
- package/api/discover/detail/item/item.d.mts +11 -1
- package/api/discover/detail/item/item.mjs +29 -8
- package/api/discover/discover.d.mts +36 -0
- package/api/discover/discover.doc.mjs +1 -1
- package/api/discover/discover.mjs +206 -29
- package/api/discover/discover.type.d.mts +33 -7
- package/api/discover/discover.type.mjs +21 -7
- package/api/discover/search/search.d.mts +22 -0
- package/api/discover/search/search.mjs +293 -70
- package/api/docs/_adapter.d.mts +92 -1
- package/api/docs/_adapter.mjs +264 -14
- package/api/docs/_entry-names.mjs +4 -3
- package/api/docs/docs.d.mts +4 -2
- package/api/docs/docs.doc.mjs +10 -0
- package/api/docs/docs.mjs +25 -5
- package/api/docs/docs.type.d.mts +48 -0
- package/api/docs/docs.type.mjs +26 -0
- package/api/docs/skills/skills.d.mts +51 -0
- package/api/docs/skills/skills.mjs +216 -0
- package/api/doctor/_adapter.d.mts +256 -10
- package/api/doctor/_adapter.mjs +1233 -51
- package/api/doctor/built-checks.d.mts +39 -3
- package/api/doctor/built-checks.mjs +203 -7
- package/api/doctor/doctor.d.mts +222 -10
- package/api/doctor/doctor.doc.mjs +4 -4
- package/api/doctor/doctor.mjs +1005 -43
- package/api/doctor/doctor.type.d.mts +6 -1
- package/api/doctor/doctor.type.mjs +3 -1
- package/api/doctor/theme-checks.d.mts +20 -1
- package/api/doctor/theme-checks.mjs +307 -7
- package/api/error.d.mts +12 -1
- package/api/error.mjs +18 -6
- package/api/icon/_adapter.d.mts +13 -2
- package/api/icon/_adapter.mjs +32 -16
- package/api/icon/_authoring.mjs +21 -7
- package/api/icon/_records.d.mts +3 -1
- package/api/icon/_records.mjs +30 -3
- package/api/icon/add/add.mjs +1 -1
- package/api/icon/definitions/definitions.mjs +19 -8
- package/api/icon/exportIconIndex.doc.mjs +1 -1
- package/api/icon/icon.doc.mjs +4 -4
- package/api/icon/icon.type.d.mts +80 -2
- package/api/icon/icon.type.mjs +40 -5
- package/api/icon/iconMap.doc.mjs +2 -2
- package/api/icon/list/list.mjs +7 -5
- package/api/icon/map/map.mjs +13 -4
- package/api/icon/rankIconIndex.doc.mjs +1 -1
- package/api/icon/search/icon-index.mjs +22 -9
- package/api/icon/search/search.d.mts +47 -3
- package/api/icon/search/search.mjs +306 -9
- package/api/init/_adapter.d.mts +97 -0
- package/api/init/_adapter.mjs +284 -15
- package/api/init/init.d.mts +3 -3
- package/api/init/init.doc.mjs +30 -6
- package/api/init/init.mjs +150 -11
- package/api/init/init.type.d.mts +102 -8
- package/api/init/init.type.mjs +44 -3
- package/api/init/remove/remove.d.mts +7 -4
- package/api/init/remove/remove.mjs +124 -26
- package/api/init/run/run.d.mts +48 -3
- package/api/init/run/run.mjs +444 -37
- package/api/integration/_adapter.d.mts +21 -4
- package/api/integration/_adapter.mjs +52 -6
- package/api/integration/integrationCheck.doc.mjs +1 -1
- package/api/integration/pack-check.d.mts +2 -1
- package/api/integration/pack-check.mjs +10 -18
- package/api/integration/validate-integration.d.mts +6 -3
- package/api/integration/validate-integration.mjs +86 -15
- package/api/integration/validate-integration.type.d.mts +12 -5
- package/api/integration/validate-integration.type.mjs +12 -5
- package/api/integration/validateIntegration.doc.mjs +4 -2
- package/api/render/_adapter.d.mts +6 -2
- package/api/render/_adapter.mjs +301 -51
- package/api/render/render.doc.d.mts +1 -1
- package/api/render/render.doc.mjs +20 -10
- package/api/render/render.mjs +16 -13
- package/api/render/render.type.d.mts +57 -10
- package/api/render/render.type.mjs +26 -13
- package/api/search/ORDERING.md +3 -3
- package/api/search/_adapter.d.mts +31 -0
- package/api/search/_adapter.mjs +107 -15
- package/api/search/_candidate-score.d.mts +12 -4
- package/api/search/_candidate-score.mjs +94 -16
- package/api/search/_cards.json +4 -1
- package/api/search/_entries.d.mts +8 -3
- package/api/search/_entries.mjs +109 -12
- package/api/search/_fit-order.d.mts +8 -4
- package/api/search/_fit-order.mjs +35 -7
- package/api/search/_gather-docs.mjs +85 -15
- package/api/search/_gather-templates.mjs +6 -0
- package/api/search/_icons.d.mts +50 -0
- package/api/search/_icons.mjs +85 -0
- package/api/search/_lexical.d.mts +14 -1
- package/api/search/_lexical.mjs +240 -12
- package/api/search/_main-searcher.mjs +13 -0
- package/api/search/_named-keywords.d.mts +6 -3
- package/api/search/_named-keywords.mjs +70 -19
- package/api/search/_order.d.mts +34 -1
- package/api/search/_order.mjs +156 -13
- package/api/search/_result.d.mts +30 -0
- package/api/search/_result.mjs +38 -0
- package/api/search/_score.d.mts +20 -6
- package/api/search/_score.mjs +96 -16
- package/api/search/_titles.d.mts +14 -0
- package/api/search/_titles.mjs +16 -3
- package/api/search/_words.d.mts +8 -0
- package/api/search/_words.mjs +26 -1
- package/api/search/search-index.mjs +23 -12
- package/api/search/search.d.mts +3 -1
- package/api/search/search.doc.mjs +5 -4
- package/api/search/search.mjs +69 -26
- package/api/search/search.type.d.mts +55 -1
- package/api/search/search.type.mjs +35 -1
- package/api/swizzle/_adapter.d.mts +1 -1
- package/api/swizzle/_adapter.mjs +1 -5
- package/api/swizzle/_moduleGraph.d.mts +0 -6
- package/api/swizzle/_moduleGraph.mjs +0 -12
- package/api/swizzle/copy/copy.mjs +1 -1
- package/api/template/_adapter.d.mts +46 -0
- package/api/template/_adapter.mjs +198 -2
- package/api/template/cdn/cdn.mjs +5 -3
- package/api/template/copy/copy.d.mts +12 -2
- package/api/template/copy/copy.mjs +95 -21
- package/api/template/show/show.d.mts +10 -3
- package/api/template/show/show.mjs +16 -4
- package/api/template/template.doc.mjs +3 -3
- package/api/template/template.mjs +55 -7
- package/api/template/template.type.d.mts +3 -0
- package/api/template/template.type.mjs +5 -2
- package/api/theme/_adapter.d.mts +28 -2
- package/api/theme/_adapter.mjs +675 -17
- package/api/theme/_app-provider.d.mts +42 -0
- package/api/theme/_app-provider.mjs +61 -27
- package/api/theme/_shared-source.d.mts +33 -0
- package/api/theme/_shared-source.mjs +348 -0
- package/api/theme/add/add.d.mts +3 -0
- package/api/theme/add/add.mjs +21 -4
- package/api/theme/build/build.d.mts +61 -30
- package/api/theme/build/build.mjs +552 -489
- package/api/theme/build/core-interception.d.mts +10 -0
- package/api/theme/build/core-interception.mjs +24 -0
- package/api/theme/build/family.mjs +4 -2
- package/api/theme/build/import-specifier.d.mts +14 -0
- package/api/theme/build/import-specifier.mjs +36 -0
- package/api/theme/build/input-fields.d.mts +9 -0
- package/api/theme/build/input-fields.mjs +155 -16
- package/api/theme/build/null-values.d.mts +22 -0
- package/api/theme/build/null-values.mjs +110 -21
- package/api/theme/build/radius-values.d.mts +18 -0
- package/api/theme/build/radius-values.mjs +76 -0
- package/api/theme/build/self-contained.mjs +32 -11
- package/api/theme/build/setting-effects.d.mts +254 -0
- package/api/theme/build/setting-effects.mjs +1065 -0
- package/api/theme/build/style-keys.d.mts +33 -0
- package/api/theme/build/style-keys.mjs +154 -0
- package/api/theme/build/theme-object.d.mts +47 -0
- package/api/theme/build/theme-object.mjs +144 -0
- package/api/theme/build/typography-values.mjs +7 -23
- package/api/theme/build/written-values.d.mts +18 -0
- package/api/theme/build/written-values.mjs +107 -31
- package/api/theme/eject/eject.mjs +6 -1
- package/api/theme/palette/generate/color.d.mts +41 -9
- package/api/theme/palette/generate/color.mjs +108 -39
- package/api/theme/palette/generate/generate.mjs +10 -0
- package/api/theme/palette/generate/generator.d.mts +45 -27
- package/api/theme/palette/generate/generator.mjs +347 -149
- package/api/theme/palette/generate/mapping.d.mts +456 -0
- package/api/theme/palette/generate/mapping.mjs +1903 -0
- package/api/theme/palette/generate/newer-recipe.d.mts +28 -0
- package/api/theme/palette/generate/newer-recipe.mjs +87 -0
- package/api/theme/palette/generate/types.d.mts +270 -0
- package/api/theme/palette/generate/types.mjs +123 -0
- package/api/theme/theme.d.mts +25 -4
- package/api/theme/theme.mjs +55 -5
- package/api/theme/theme.type.d.mts +71 -2
- package/api/theme/theme.type.mjs +37 -5
- package/api/theme/themeAdd.doc.mjs +3 -2
- package/api/theme/themeBuild.doc.mjs +4 -4
- package/api/theme/themeEject.doc.mjs +1 -1
- package/api/theme/themeRemove.doc.mjs +1 -1
- package/api/theme/themeTargets.doc.mjs +1 -1
- package/api/theme-edit/_catalog.d.mts +40 -0
- package/api/theme-edit/_catalog.mjs +101 -23
- package/api/theme-edit/_check.mjs +333 -79
- package/api/theme-edit/_color.d.mts +2 -60
- package/api/theme-edit/_color.mjs +33 -847
- package/api/theme-edit/_compiler.mjs +52 -0
- package/api/theme-edit/_context.d.mts +23 -3
- package/api/theme-edit/_context.mjs +173 -32
- package/api/theme-edit/_css.d.mts +4 -35
- package/api/theme-edit/_css.mjs +10 -91
- package/api/theme-edit/_edit.mjs +667 -87
- package/api/theme-edit/_how-question.d.mts +15 -0
- package/api/theme-edit/_how-question.mjs +2729 -179
- package/api/theme-edit/_how.mjs +62 -3
- package/api/theme-edit/_missed.d.mts +2 -1
- package/api/theme-edit/_missed.mjs +128 -29
- package/api/theme-edit/_normal.d.mts +22 -5
- package/api/theme-edit/_normal.mjs +95 -4
- package/api/theme-edit/_palette.d.mts +34 -74
- package/api/theme-edit/_palette.mjs +261 -1278
- package/api/theme-edit/_part-words.mjs +29 -6
- package/api/theme-edit/_parts.d.mts +16 -2
- package/api/theme-edit/_parts.mjs +161 -41
- package/api/theme-edit/_png.d.mts +24 -0
- package/api/theme-edit/_png.mjs +99 -0
- package/api/theme-edit/_preview-app.d.mts +16 -0
- package/api/theme-edit/_preview-app.mjs +52 -18
- package/api/theme-edit/_preview.d.mts +44 -26
- package/api/theme-edit/_preview.mjs +304 -89
- package/api/theme-edit/_project.d.mts +18 -2
- package/api/theme-edit/_project.mjs +27 -3
- package/api/theme-edit/_settings.d.mts +118 -1
- package/api/theme-edit/_settings.mjs +1336 -76
- package/api/theme-edit/_tables.d.mts +19 -11
- package/api/theme-edit/_tables.mjs +55 -37
- package/api/theme-edit/theme-edit.type.d.mts +20 -2
- package/api/theme-edit/theme-edit.type.mjs +9 -6
- package/api/upgrade/_adapter.d.mts +43 -4
- package/api/upgrade/_adapter.mjs +281 -8
- package/api/upgrade/run/run.mjs +4 -0
- package/api/upgrade/upgrade.mjs +1 -1
- package/api/upgrade/upgrade.type.d.mts +46 -7
- package/api/upgrade/upgrade.type.mjs +24 -9
- package/assets/codemods/registry.mjs +1 -0
- package/assets/codemods/transforms/next/index.mjs +1 -11
- package/assets/codemods/transforms/v0.7.17/index.mjs +28 -0
- package/assets/codemods/transforms/v0.7.17/migrate-item-swipe-actions-to-swipe.mjs +2160 -0
- package/assets/codemods/transforms/v0.7.17/preserve-chat-radius.mjs +515 -0
- package/assets/component-list.generated.json +1 -1
- package/assets/discover/official-packages.json +72 -0
- package/assets/docs/author-a-theme.doc.mjs +7 -4
- package/assets/docs/getting-started.doc.mjs +1 -1
- package/assets/docs/principles.doc.dense.mjs +1 -1
- package/assets/docs/principles.doc.mjs +1 -1
- package/assets/docs/principles.doc.zh.mjs +1 -1
- package/assets/docs/styling-overview.doc.mjs +5 -1
- package/assets/docs/tree/agent-guidance.doc.mjs +34 -3
- package/assets/docs/tree/check-the-props.doc.mjs +1 -1
- package/assets/docs/tree/checks.doc.mjs +2 -2
- package/assets/docs/tree/computer-integrations.doc.mjs +1 -1
- package/assets/docs/tree/doc-syntax.doc.mjs +1 -1
- package/assets/docs/tree/export-pages.doc.mjs +164 -0
- package/assets/docs/tree/fonts-and-assets.doc.mjs +1 -1
- package/assets/docs/tree/host-entry.doc.mjs +4 -0
- package/assets/docs/tree/i18n-library-integration.doc.mjs +7 -3
- package/assets/docs/tree/icon-definitions.doc.mjs +3 -3
- package/assets/docs/tree/icon-sets.doc.mjs +87 -11
- package/assets/docs/tree/layout.doc.mjs +16 -5
- package/assets/docs/tree/problems.doc.mjs +2 -2
- package/assets/docs/tree/responsive.doc.mjs +2 -2
- package/assets/docs/tree/scaffold.doc.mjs +1 -0
- package/assets/docs/tree/share-a-page.doc.mjs +14 -16
- package/assets/docs/tree/short-and-findable.doc.mjs +3 -3
- package/assets/docs/tree/skill-places.doc.mjs +91 -0
- package/assets/docs/tree/styling.doc.mjs +41 -3
- package/assets/docs/tree/template-grading-rubric.doc.mjs +1 -1
- package/assets/docs/tree/test-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/tokens-and-setup.doc.mjs +2 -4
- package/assets/docs/tree/tokens-color.doc.mjs +2 -2
- package/assets/docs/tree/tokens-radius.doc.mjs +1 -1
- package/assets/docs/tree/tokens.doc.mjs +32 -0
- package/assets/docs/tree/troubleshooting.doc.mjs +8 -0
- package/assets/docs/tree/typography.doc.mjs +31 -2
- package/assets/docs/tree/updates.doc.mjs +1 -1
- package/assets/docs/tree/versioning.doc.mjs +1 -1
- package/assets/docs/use-a-theme.doc.mjs +4 -0
- package/assets/docs/working-with-ai.doc.mjs +44 -9
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/icons/definitions/alert.doc.mjs +9 -0
- package/assets/icons/definitions/alignBottom.doc.mjs +1 -0
- package/assets/icons/definitions/alignCenter.doc.mjs +1 -0
- package/assets/icons/definitions/alignEnd.doc.mjs +1 -0
- package/assets/icons/definitions/alignJustify.doc.mjs +1 -0
- package/assets/icons/definitions/alignMiddle.doc.mjs +1 -0
- package/assets/icons/definitions/alignStart.doc.mjs +1 -0
- package/assets/icons/definitions/alignTop.doc.mjs +1 -0
- package/assets/icons/definitions/arrowDown.doc.mjs +1 -0
- package/assets/icons/definitions/arrowLeft.doc.mjs +1 -0
- package/assets/icons/definitions/arrowRight.doc.mjs +1 -0
- package/assets/icons/definitions/arrowUp.doc.mjs +1 -0
- package/assets/icons/definitions/arrowsUpDown.doc.mjs +1 -0
- package/assets/icons/definitions/bank.doc.mjs +1 -0
- package/assets/icons/definitions/block.doc.mjs +9 -0
- package/assets/icons/definitions/bold.doc.mjs +1 -0
- package/assets/icons/definitions/bookmark.doc.mjs +1 -0
- package/assets/icons/definitions/bookmarkAdd.doc.mjs +1 -0
- package/assets/icons/definitions/cart.doc.mjs +1 -0
- package/assets/icons/definitions/channel.doc.mjs +9 -0
- package/assets/icons/definitions/check.doc.mjs +1 -0
- package/assets/icons/definitions/checkDouble.doc.mjs +1 -0
- package/assets/icons/definitions/checklist.doc.mjs +9 -0
- package/assets/icons/definitions/chevronDown.doc.mjs +1 -0
- package/assets/icons/definitions/chevronLeft.doc.mjs +1 -0
- package/assets/icons/definitions/chevronRight.doc.mjs +1 -0
- package/assets/icons/definitions/chevronUp.doc.mjs +1 -0
- package/assets/icons/definitions/chevronsLeft.doc.mjs +1 -0
- package/assets/icons/definitions/chevronsRight.doc.mjs +1 -0
- package/assets/icons/definitions/clipboard.doc.mjs +1 -0
- package/assets/icons/definitions/cloud.doc.mjs +1 -1
- package/assets/icons/definitions/collapse.doc.mjs +1 -0
- package/assets/icons/definitions/columnSettings.doc.mjs +9 -0
- package/assets/icons/definitions/compose.doc.mjs +1 -0
- package/assets/icons/definitions/conversation.doc.mjs +1 -0
- package/assets/icons/definitions/copy.doc.mjs +1 -0
- package/assets/icons/definitions/copyText.doc.mjs +9 -0
- package/assets/icons/definitions/cornerRadius.doc.mjs +1 -0
- package/assets/icons/definitions/create.doc.mjs +9 -0
- package/assets/icons/definitions/creditCard.doc.mjs +1 -0
- package/assets/icons/definitions/currency.doc.mjs +9 -0
- package/assets/icons/definitions/cut.doc.mjs +1 -0
- package/assets/icons/definitions/desktop.doc.mjs +1 -0
- package/assets/icons/definitions/discount.doc.mjs +1 -0
- package/assets/icons/definitions/document.doc.mjs +1 -0
- package/assets/icons/definitions/documentSearch.doc.mjs +1 -0
- package/assets/icons/definitions/download.doc.mjs +1 -0
- package/assets/icons/definitions/error.doc.mjs +1 -0
- package/assets/icons/definitions/exitFullScreen.doc.mjs +16 -0
- package/assets/icons/definitions/expand.doc.mjs +1 -0
- package/assets/icons/definitions/eye.doc.mjs +1 -0
- package/assets/icons/definitions/eyeSlash.doc.mjs +1 -0
- package/assets/icons/definitions/file.doc.mjs +1 -0
- package/assets/icons/definitions/flipHorizontal.doc.mjs +1 -0
- package/assets/icons/definitions/flipVertical.doc.mjs +1 -0
- package/assets/icons/definitions/folder.doc.mjs +1 -0
- package/assets/icons/definitions/folderAdd.doc.mjs +1 -0
- package/assets/icons/definitions/fullScreen.doc.mjs +16 -0
- package/assets/icons/definitions/globe.doc.mjs +1 -1
- package/assets/icons/definitions/groupRows.doc.mjs +9 -0
- package/assets/icons/definitions/halftone.doc.mjs +9 -0
- package/assets/icons/definitions/help.doc.mjs +9 -0
- package/assets/icons/definitions/house.doc.mjs +9 -0
- package/assets/icons/definitions/info.doc.mjs +1 -0
- package/assets/icons/definitions/italic.doc.mjs +1 -0
- package/assets/icons/definitions/listView.doc.mjs +9 -0
- package/assets/icons/definitions/lock.doc.mjs +1 -0
- package/assets/icons/definitions/lowercase.doc.mjs +1 -0
- package/assets/icons/definitions/mail.doc.mjs +1 -1
- package/assets/icons/definitions/media.doc.mjs +9 -0
- package/assets/icons/definitions/message.doc.mjs +2 -1
- package/assets/icons/definitions/mobile.doc.mjs +1 -0
- package/assets/icons/definitions/money.doc.mjs +1 -0
- package/assets/icons/definitions/moon.doc.mjs +1 -0
- package/assets/icons/definitions/moveToFolder.doc.mjs +9 -0
- package/assets/icons/definitions/notification.doc.mjs +1 -0
- package/assets/icons/definitions/notificationActive.doc.mjs +1 -0
- package/assets/icons/definitions/notificationOff.doc.mjs +1 -0
- package/assets/icons/definitions/paddingHorizontal.doc.mjs +1 -0
- package/assets/icons/definitions/paddingPerSide.doc.mjs +1 -0
- package/assets/icons/definitions/paddingVertical.doc.mjs +1 -0
- package/assets/icons/definitions/panelBottom.doc.mjs +1 -0
- package/assets/icons/definitions/panelLeft.doc.mjs +1 -0
- package/assets/icons/definitions/panelRight.doc.mjs +1 -0
- package/assets/icons/definitions/paste.doc.mjs +9 -0
- package/assets/icons/definitions/pause.doc.mjs +1 -0
- package/assets/icons/definitions/play.doc.mjs +1 -0
- package/assets/icons/definitions/radiusPerCorner.doc.mjs +1 -0
- package/assets/icons/definitions/redo.doc.mjs +1 -0
- package/assets/icons/definitions/review.doc.mjs +9 -0
- package/assets/icons/definitions/rotate.doc.mjs +1 -0
- package/assets/icons/definitions/rotateCounterclockwise.doc.mjs +1 -0
- package/assets/icons/definitions/scale.doc.mjs +1 -2
- package/assets/icons/definitions/schedule.doc.mjs +9 -0
- package/assets/icons/definitions/search.doc.mjs +1 -0
- package/assets/icons/definitions/send.doc.mjs +1 -0
- package/assets/icons/definitions/shoppingBag.doc.mjs +1 -0
- package/assets/icons/definitions/signal.doc.mjs +9 -0
- package/assets/icons/definitions/stop.doc.mjs +1 -0
- package/assets/icons/definitions/strikethrough.doc.mjs +1 -0
- package/assets/icons/definitions/success.doc.mjs +1 -0
- package/assets/icons/definitions/sun.doc.mjs +1 -0
- package/assets/icons/definitions/tablet.doc.mjs +1 -0
- package/assets/icons/definitions/team.doc.mjs +9 -0
- package/assets/icons/definitions/textCase.doc.mjs +2 -1
- package/assets/icons/definitions/textRegular.doc.mjs +1 -0
- package/assets/icons/definitions/thumbsDown.doc.mjs +1 -0
- package/assets/icons/definitions/thumbsUp.doc.mjs +1 -0
- package/assets/icons/definitions/transfer.doc.mjs +1 -0
- package/assets/icons/definitions/trendDown.doc.mjs +1 -0
- package/assets/icons/definitions/trendUp.doc.mjs +1 -0
- package/assets/icons/definitions/underline.doc.mjs +1 -0
- package/assets/icons/definitions/undo.doc.mjs +1 -0
- package/assets/icons/definitions/unlock.doc.mjs +1 -0
- package/assets/icons/definitions/upload.doc.mjs +1 -0
- package/assets/icons/definitions/uppercase.doc.mjs +1 -0
- package/assets/icons/definitions/user.doc.mjs +1 -0
- package/assets/icons/definitions/userAdd.doc.mjs +1 -0
- package/assets/icons/definitions/userCircle.doc.mjs +1 -0
- package/assets/icons/definitions/userRemove.doc.mjs +1 -0
- package/assets/icons/definitions/users.doc.mjs +1 -0
- package/assets/icons/definitions/verified.doc.mjs +9 -0
- package/assets/icons/definitions/wallet.doc.mjs +1 -0
- package/assets/icons/definitions/warning.doc.mjs +1 -0
- package/assets/icons/definitions/wrench.doc.mjs +1 -1
- package/assets/icons/installed-icon-set.doc.mjs +30 -0
- package/assets/icons/template-icons.json +661 -0
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/AppShell/AppShellShowcase.doc.mjs +0 -7
- package/assets/templates/blocks/components/AppShell/AppShellShowcase.tsx +8 -10
- package/assets/templates/blocks/components/AppShell/AppShellSideNavOnly.doc.mjs +0 -8
- package/assets/templates/blocks/components/AppShell/AppShellSideNavOnly.tsx +10 -8
- package/assets/templates/blocks/components/AppShell/AppShellTopNavOnly.doc.mjs +0 -1
- package/assets/templates/blocks/components/AppShell/AppShellTopNavOnly.tsx +4 -2
- package/assets/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.doc.mjs +0 -8
- package/assets/templates/blocks/components/AppShell/AppShellTopNavWithSideNav.tsx +10 -8
- package/assets/templates/blocks/components/AppShell/AppShellWithBanner.doc.mjs +0 -8
- package/assets/templates/blocks/components/AppShell/AppShellWithBanner.tsx +10 -8
- package/assets/templates/blocks/components/AspectRatio/AspectRatioImageGallery.tsx +1 -1
- package/assets/templates/blocks/components/AspectRatio/AspectRatioWidescreen.tsx +1 -1
- package/assets/templates/blocks/components/AspectRatio/AspectRatioWithSkeleton.tsx +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarInteractive.tsx +6 -1
- package/assets/templates/blocks/components/Avatar/AvatarShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarTooltip.tsx +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarWithStatus.tsx +1 -1
- package/assets/templates/blocks/components/AvatarStatusDot/AvatarStatusDotShowcase.tsx +1 -1
- package/assets/templates/blocks/components/AvatarStatusDot/AvatarStatusDotVariants.tsx +1 -1
- package/assets/templates/blocks/components/Badge/BadgeShowcase.tsx +2 -2
- package/assets/templates/blocks/components/Banner/BannerCollapsibleContent.tsx +14 -1
- package/assets/templates/blocks/components/Banner/BannerSectionVariant.tsx +10 -1
- package/assets/templates/blocks/components/Banner/BannerWithActionButton.tsx +25 -3
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadCustomSearch.doc.mjs +0 -1
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadCustomSearch.tsx +2 -2
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadMenu.doc.mjs +0 -1
- package/assets/templates/blocks/components/BaseTypeahead/BaseTypeaheadMenu.tsx +1 -1
- package/assets/templates/blocks/components/BottomSheet/BottomSheetSnapPoints.doc.mjs +0 -8
- package/assets/templates/blocks/components/BottomSheet/BottomSheetSnapPoints.tsx +5 -5
- package/assets/templates/blocks/components/BreadcrumbItem/BreadcrumbItemShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/BreadcrumbItem/BreadcrumbItemShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsDeepHierarchy.doc.mjs +0 -1
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsDeepHierarchy.tsx +1 -1
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.doc.mjs +0 -1
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsWithIcons.tsx +2 -2
- package/assets/templates/blocks/components/Button/ButtonFloating.doc.mjs +0 -1
- package/assets/templates/blocks/components/Button/ButtonFloating.tsx +25 -2
- package/assets/templates/blocks/components/Button/ButtonShowcase.tsx +42 -4
- package/assets/templates/blocks/components/Button/ButtonSizeVariants.tsx +24 -2
- package/assets/templates/blocks/components/Button/ButtonVariants.tsx +28 -1
- package/assets/templates/blocks/components/Button/ButtonWithEndSlot.tsx +9 -0
- package/assets/templates/blocks/components/Button/ButtonWithIcon.doc.mjs +0 -6
- package/assets/templates/blocks/components/Button/ButtonWithIcon.tsx +35 -9
- package/assets/templates/blocks/components/ButtonGroup/ButtonGroupBasic.tsx +20 -3
- package/assets/templates/blocks/components/ButtonGroup/ButtonGroupFloating.tsx +16 -3
- package/assets/templates/blocks/components/ButtonGroup/ButtonGroupShowcase.doc.mjs +0 -6
- package/assets/templates/blocks/components/ButtonGroup/ButtonGroupShowcase.tsx +37 -8
- package/assets/templates/blocks/components/Center/CenterHorizontal.doc.mjs +0 -8
- package/assets/templates/blocks/components/Center/CenterHorizontal.tsx +23 -5
- package/assets/templates/blocks/components/Center/CenterInsideACard.doc.mjs +0 -1
- package/assets/templates/blocks/components/Center/CenterInsideACard.tsx +1 -1
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFlat.doc.mjs +0 -5
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFlat.tsx +8 -3
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFooterActions.doc.mjs +0 -5
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFooterActions.tsx +8 -3
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFullFeatured.doc.mjs +0 -7
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFullFeatured.tsx +10 -7
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerShowcase.tsx +2 -2
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerWithProgress.doc.mjs +0 -1
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx +3 -3
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataFooter.doc.mjs +0 -6
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataFooter.tsx +9 -9
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.doc.mjs +0 -6
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +10 -10
- package/assets/templates/blocks/components/ChatSendButton/ChatSendButtonCustomIcon.doc.mjs +0 -6
- package/assets/templates/blocks/components/ChatSendButton/ChatSendButtonCustomIcon.tsx +8 -5
- package/assets/templates/blocks/components/ChatSendButton/ChatSendButtonShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/ChatSendButton/ChatSendButtonShowcase.tsx +1 -1
- package/assets/templates/blocks/components/ChatSystemMessage/ChatSystemMessageStatusUpdates.doc.mjs +0 -5
- package/assets/templates/blocks/components/ChatSystemMessage/ChatSystemMessageStatusUpdates.tsx +7 -7
- package/assets/templates/blocks/components/ChatSystemMessage/ChatSystemMessageWithIcon.doc.mjs +0 -6
- package/assets/templates/blocks/components/ChatSystemMessage/ChatSystemMessageWithIcon.tsx +7 -7
- package/assets/templates/blocks/components/CodeBlock/CodeBlockTerminal.tsx +1 -1
- package/assets/templates/blocks/components/ContextMenu/ContextMenuBottomSheet.doc.mjs +0 -6
- package/assets/templates/blocks/components/ContextMenu/ContextMenuBottomSheet.tsx +7 -7
- package/assets/templates/blocks/components/DropdownMenu/DropdownMenuBottomSheet.doc.mjs +0 -6
- package/assets/templates/blocks/components/DropdownMenu/DropdownMenuBottomSheet.tsx +7 -7
- package/assets/templates/blocks/components/DropdownMenu/DropdownMenuNoChevron.doc.mjs +0 -1
- package/assets/templates/blocks/components/DropdownMenu/DropdownMenuNoChevron.tsx +2 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateActions.doc.mjs +0 -1
- package/assets/templates/blocks/components/EmptyState/EmptyStateActions.tsx +2 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateCompact.doc.mjs +0 -1
- package/assets/templates/blocks/components/EmptyState/EmptyStateCompact.tsx +1 -1
- package/assets/templates/blocks/components/EmptyState/EmptyStateContainer.doc.mjs +0 -1
- package/assets/templates/blocks/components/EmptyState/EmptyStateContainer.tsx +2 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.tsx +2 -2
- package/assets/templates/blocks/components/Grid/GridShowcase.tsx +1 -1
- package/assets/templates/blocks/components/GridSpan/GridSpanColumns.tsx +1 -1
- package/assets/templates/blocks/components/GridSpan/GridSpanShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Heading/HeadingTruncation.tsx +3 -2
- package/assets/templates/blocks/components/Hooks/useClipboardHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/Hooks/useContainerRevealHookUsage.doc.mjs +0 -1
- package/assets/templates/blocks/components/Hooks/useContainerRevealHookUsage.tsx +38 -19
- package/assets/templates/blocks/components/Hooks/useGridFocusHookUsage.tsx +6 -6
- package/assets/templates/blocks/components/Hooks/useHotkeysHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/Hooks/useInputContainerHookUsage.doc.mjs +0 -1
- package/assets/templates/blocks/components/Hooks/useInputContainerHookUsage.tsx +2 -2
- package/assets/templates/blocks/components/Hooks/useKeyboardHintHookUsage.doc.mjs +0 -1
- package/assets/templates/blocks/components/Hooks/useKeyboardHintHookUsage.tsx +2 -2
- package/assets/templates/blocks/components/Hooks/useListFocusHookUsage.tsx +8 -1
- package/assets/templates/blocks/components/Hooks/useOverflowHookUsage.tsx +17 -6
- package/assets/templates/blocks/components/Hooks/useStreamingTextHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/Hooks/useTreeFocusHookUsage.doc.mjs +0 -1
- package/assets/templates/blocks/components/Hooks/useTreeFocusHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/HoverCard/HoverCardInteractiveContent.doc.mjs +0 -1
- package/assets/templates/blocks/components/HoverCard/HoverCardInteractiveContent.tsx +1 -1
- package/assets/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.doc.mjs +0 -1
- package/assets/templates/blocks/components/HoverCard/HoverCardProfileHoverCard.tsx +1 -1
- package/assets/templates/blocks/components/Icon/useIconHookUsage.doc.mjs +0 -5
- package/assets/templates/blocks/components/Icon/useIconHookUsage.tsx +7 -7
- package/assets/templates/blocks/components/IconButton/IconButtonActionBar.tsx +11 -0
- package/assets/templates/blocks/components/IconButton/IconButtonFloating.doc.mjs +0 -1
- package/assets/templates/blocks/components/IconButton/IconButtonFloating.tsx +25 -2
- package/assets/templates/blocks/components/IconButton/IconButtonShowcase.tsx +3 -0
- package/assets/templates/blocks/components/IconButton/IconButtonTooltipIconButton.tsx +5 -0
- package/assets/templates/blocks/components/InternationalizationProvider/InternationalizationProvider02Overrides.doc.mjs +3 -3
- package/assets/templates/blocks/components/InternationalizationProvider/InternationalizationProvider02Overrides.tsx +36 -13
- package/assets/templates/blocks/components/Item/ItemDocumentTabs.doc.mjs +0 -1
- package/assets/templates/blocks/components/Item/ItemDocumentTabs.tsx +4 -4
- package/assets/templates/blocks/components/Item/ItemShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/Item/ItemShowcase.tsx +7 -3
- package/assets/templates/blocks/components/Layout/LayoutBasicCardLayout.tsx +14 -2
- package/assets/templates/blocks/components/Layout/LayoutContentWidth.tsx +14 -2
- package/assets/templates/blocks/components/Layout/LayoutFullBleedContent.tsx +8 -1
- package/assets/templates/blocks/components/Layout/LayoutShowcase.tsx +8 -1
- package/assets/templates/blocks/components/Layout/LayoutSidebarLayout.tsx +14 -2
- package/assets/templates/blocks/components/LinkProvider/LinkProviderCustomLink.tsx +3 -1
- package/assets/templates/blocks/components/Markdown/MarkdownShowcase.tsx +1 -1
- package/assets/templates/blocks/components/MediaTheme/MediaThemeImageOverlay.tsx +18 -4
- package/assets/templates/blocks/components/MediaTheme/MediaThemeLightScrim.tsx +11 -3
- package/assets/templates/blocks/components/MediaTheme/MediaThemeShowcase.tsx +27 -5
- package/assets/templates/blocks/components/MobileNav/MobileNavBasicMobileNav.doc.mjs +0 -7
- package/assets/templates/blocks/components/MobileNav/MobileNavBasicMobileNav.tsx +5 -9
- package/assets/templates/blocks/components/MobileNav/MobileNavEndSideMobileNav.doc.mjs +0 -1
- package/assets/templates/blocks/components/MobileNav/MobileNavEndSideMobileNav.tsx +2 -2
- package/assets/templates/blocks/components/MobileNav/MobileNavWithoutTitleMobileNav.doc.mjs +0 -1
- package/assets/templates/blocks/components/MobileNav/MobileNavWithoutTitleMobileNav.tsx +1 -1
- package/assets/templates/blocks/components/MoreMenu/MoreMenuBottomSheet.doc.mjs +0 -6
- package/assets/templates/blocks/components/MoreMenu/MoreMenuBottomSheet.tsx +15 -15
- package/assets/templates/blocks/components/MoreMenu/MoreMenuWithDividers.doc.mjs +0 -5
- package/assets/templates/blocks/components/MoreMenu/MoreMenuWithDividers.tsx +4 -8
- package/assets/templates/blocks/components/MoreMenu/MoreMenuWithSections.doc.mjs +0 -5
- package/assets/templates/blocks/components/MoreMenu/MoreMenuWithSections.tsx +4 -8
- package/assets/templates/blocks/components/MultiSelector/useMultiComboboxHookUsage.doc.mjs +0 -1
- package/assets/templates/blocks/components/MultiSelector/useMultiComboboxHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/OverflowList/OverflowListCappedToolbar.tsx +38 -2
- package/assets/templates/blocks/components/OverflowList/OverflowListCollapseFromStartList.tsx +17 -5
- package/assets/templates/blocks/components/OverflowList/OverflowListOverflowDropdownActions.tsx +46 -7
- package/assets/templates/blocks/components/OverflowList/OverflowListShowcase.tsx +45 -5
- package/assets/templates/blocks/components/Overlay/OverlayHoverReveal.tsx +14 -1
- package/assets/templates/blocks/components/Overlay/OverlayShowcase.tsx +10 -1
- package/assets/templates/blocks/components/Overlay/useOverlayHookUsage.tsx +12 -1
- package/assets/templates/blocks/components/Pagination/PaginationDotsCarousel.doc.mjs +0 -1
- package/assets/templates/blocks/components/Pagination/PaginationDotsCarousel.tsx +1 -1
- package/assets/templates/blocks/components/Popover/PopoverBottomSheetAlternative.doc.mjs +0 -1
- package/assets/templates/blocks/components/Popover/PopoverBottomSheetAlternative.tsx +1 -1
- package/assets/templates/blocks/components/Resizable/ResizableShowcase.tsx +12 -2
- package/assets/templates/blocks/components/Resizable/ResizableSidebar.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaInlineRail.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaOverscrollChaining.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaShowcase.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyGroupHeaders.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyPassthrough.tsx +1 -1
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaTwoAxisBoard.tsx +1 -1
- package/assets/templates/blocks/components/Section/SectionWashHighlight.doc.mjs +0 -1
- package/assets/templates/blocks/components/Section/SectionWashHighlight.tsx +10 -2
- package/assets/templates/blocks/components/Selector/SelectorOptionDescriptions.doc.mjs +0 -1
- package/assets/templates/blocks/components/Selector/SelectorOptionDescriptions.tsx +3 -3
- package/assets/templates/blocks/components/SelectorOption/SelectorOptionShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/SelectorOption/SelectorOptionShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Stack/StackAlignment.tsx +50 -6
- package/assets/templates/blocks/components/Stack/StackDirections.tsx +1 -1
- package/assets/templates/blocks/components/Stack/StackFillItem.tsx +10 -1
- package/assets/templates/blocks/components/Step/StepContent.tsx +13 -4
- package/assets/templates/blocks/components/Step/StepIndicator.tsx +3 -2
- package/assets/templates/blocks/components/Step/StepShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Step/StepStates.tsx +3 -2
- package/assets/templates/blocks/components/Stepper/StepperCustomContent.tsx +18 -14
- package/assets/templates/blocks/components/Stepper/StepperOnTrackHorizontal.tsx +1 -1
- package/assets/templates/blocks/components/Table/TableInCard.tsx +1 -1
- package/assets/templates/blocks/components/Table/TableShowcase.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaWithIcon.doc.mjs +0 -1
- package/assets/templates/blocks/components/TextArea/TextAreaWithIcon.tsx +2 -2
- package/assets/templates/blocks/components/TextInput/TextInputIcon.doc.mjs +0 -1
- package/assets/templates/blocks/components/TextInput/TextInputIcon.tsx +3 -7
- package/assets/templates/blocks/components/TextInput/TextInputSearch.doc.mjs +0 -1
- package/assets/templates/blocks/components/TextInput/TextInputSearch.tsx +3 -3
- package/assets/templates/blocks/components/Theme/ThemeApply.tsx +8 -1
- package/assets/templates/blocks/components/Theme/ThemeNested.tsx +11 -1
- package/assets/templates/blocks/components/Theme/ThemeShowcase.tsx +26 -3
- package/assets/templates/blocks/components/Theme/ThemeSwitcher.tsx +8 -1
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonColor.doc.mjs +0 -11
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonColor.tsx +5 -5
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonGroup.doc.mjs +0 -9
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonGroup.tsx +5 -9
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonIconSwap.doc.mjs +0 -6
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonIconSwap.tsx +6 -6
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonLabel.doc.mjs +0 -6
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonLabel.tsx +3 -3
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonShowcase.doc.mjs +0 -6
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonShowcase.tsx +6 -6
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonStates.doc.mjs +0 -1
- package/assets/templates/blocks/components/ToggleButton/ToggleButtonStates.tsx +2 -2
- package/assets/templates/blocks/components/Token/TokenIcon.doc.mjs +0 -6
- package/assets/templates/blocks/components/Token/TokenIcon.tsx +3 -3
- package/assets/templates/blocks/components/Token/TokenShowcase.doc.mjs +0 -1
- package/assets/templates/blocks/components/Token/TokenShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +14 -1
- package/assets/templates/blocks/components/Tokenizer/TokenizerIcon.doc.mjs +0 -1
- package/assets/templates/blocks/components/Tokenizer/TokenizerIcon.tsx +2 -2
- package/assets/templates/blocks/components/Toolbar/ToolbarBulkActions.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarBulkActions.tsx +36 -3
- package/assets/templates/blocks/components/Toolbar/ToolbarCardHeader.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +4 -3
- package/assets/templates/blocks/components/Toolbar/ToolbarSizes.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarSizes.tsx +3 -3
- package/assets/templates/blocks/components/Toolbar/ToolbarTableFilter.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarTableFilter.tsx +8 -3
- package/assets/templates/blocks/components/Toolbar/ToolbarThreeSlot.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +6 -2
- package/assets/templates/blocks/components/Toolbar/ToolbarWithTabs.doc.mjs +0 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarWithTabs.tsx +11 -2
- package/assets/templates/blocks/components/Tooltip/TooltipActionBarTooltips.tsx +33 -3
- package/assets/templates/blocks/components/TopNav/TopNavCenteredNavigation.doc.mjs +0 -1
- package/assets/templates/blocks/components/TopNav/TopNavCenteredNavigation.tsx +2 -2
- package/assets/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.doc.mjs +0 -6
- package/assets/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.tsx +7 -7
- package/assets/templates/blocks/components/TopNav/TopNavHoverMenu.doc.mjs +0 -8
- package/assets/templates/blocks/components/TopNav/TopNavHoverMenu.tsx +14 -9
- package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.doc.mjs +0 -8
- package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.tsx +11 -11
- package/assets/templates/blocks/components/TopNav/TopNavMultipleDropdowns.doc.mjs +0 -5
- package/assets/templates/blocks/components/TopNav/TopNavMultipleDropdowns.tsx +4 -8
- package/assets/templates/blocks/components/TopNav/TopNavShowcase.doc.mjs +0 -5
- package/assets/templates/blocks/components/TopNav/TopNavShowcase.tsx +8 -4
- package/assets/templates/blocks/components/TopNav/TopNavWithLogo.doc.mjs +0 -1
- package/assets/templates/blocks/components/TopNav/TopNavWithLogo.tsx +7 -2
- package/assets/templates/blocks/components/TopNavItem/TopNavItemShowcase.tsx +1 -1
- package/assets/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.doc.mjs +0 -1
- package/assets/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuBasic.tsx +4 -4
- package/assets/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuShowcase.doc.mjs +0 -7
- package/assets/templates/blocks/components/TopNavMegaMenu/TopNavMegaMenuShowcase.tsx +12 -12
- package/assets/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.doc.mjs +0 -1
- package/assets/templates/blocks/components/TopNavMegaMenuItem/TopNavMegaMenuItemBasic.tsx +2 -2
- package/assets/templates/blocks/components/TopNavMenu/TopNavMenuBasic.doc.mjs +0 -1
- package/assets/templates/blocks/components/TopNavMenu/TopNavMenuBasic.tsx +4 -4
- package/assets/templates/blocks/components/TopNavMenu/TopNavMenuShowcase.doc.mjs +0 -6
- package/assets/templates/blocks/components/TopNavMenu/TopNavMenuShowcase.tsx +11 -8
- package/assets/templates/blocks/components/TreeList/TreeListFileTreeWithIcons.doc.mjs +0 -1
- package/assets/templates/blocks/components/TreeList/TreeListFileTreeWithIcons.tsx +4 -4
- package/assets/templates/blocks/components/TreeList/TreeListInteractiveSettings.doc.mjs +0 -1
- package/assets/templates/blocks/components/TreeList/TreeListInteractiveSettings.tsx +6 -3
- package/assets/templates/blocks/components/Typeahead/TypeaheadSearchField.doc.mjs +0 -1
- package/assets/templates/blocks/components/Typeahead/TypeaheadSearchField.tsx +2 -2
- package/assets/templates/blocks/components/VisuallyHidden/VisuallyHiddenShowcase.doc.mjs +0 -6
- package/assets/templates/blocks/components/VisuallyHidden/VisuallyHiddenShowcase.tsx +30 -7
- package/assets/templates/blocks/components/VisuallyHidden/VisuallyHiddenSupplementaryContext.doc.mjs +0 -1
- package/assets/templates/blocks/components/VisuallyHidden/VisuallyHiddenSupplementaryContext.tsx +4 -1
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat/page.tsx +19 -15
- package/assets/templates/pages/ai-chat/template.doc.mjs +0 -9
- package/assets/templates/pages/ai-chat-landing/page.tsx +16 -16
- package/assets/templates/pages/ai-chat-landing/template.doc.mjs +0 -11
- package/assets/templates/pages/blank/page.tsx +4 -2
- package/assets/templates/pages/canvas-editor/page.tsx +200 -110
- package/assets/templates/pages/canvas-editor/template.doc.mjs +0 -46
- package/assets/templates/pages/centered-hero/page.tsx +2 -2
- package/assets/templates/pages/centered-hero/template.doc.mjs +0 -1
- package/assets/templates/pages/checkout-wizard/page.tsx +31 -18
- package/assets/templates/pages/checkout-wizard/template.doc.mjs +0 -7
- package/assets/templates/pages/classic-gallery/page.tsx +1 -1
- package/assets/templates/pages/contact-form/page.tsx +15 -10
- package/assets/templates/pages/contact-form/template.doc.mjs +0 -5
- package/assets/templates/pages/course-detail/page.tsx +10 -10
- package/assets/templates/pages/course-detail/template.doc.mjs +0 -11
- package/assets/templates/pages/dashboard/page.tsx +37 -19
- package/assets/templates/pages/dashboard/template.doc.mjs +0 -6
- package/assets/templates/pages/dashboard-alert-rail/page.tsx +16 -14
- package/assets/templates/pages/dashboard-alert-rail/template.doc.mjs +0 -8
- package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +14 -16
- package/assets/templates/pages/dashboard-cohort-funnel/template.doc.mjs +0 -7
- package/assets/templates/pages/dashboard-comparison/page.tsx +17 -12
- package/assets/templates/pages/dashboard-comparison/template.doc.mjs +0 -8
- package/assets/templates/pages/dashboard-composition/page.tsx +40 -23
- package/assets/templates/pages/dashboard-composition/template.doc.mjs +0 -1
- package/assets/templates/pages/dashboard-progress/page.tsx +105 -109
- package/assets/templates/pages/dashboard-progress/template.doc.mjs +0 -7
- package/assets/templates/pages/dashboard-scorecard/page.tsx +74 -37
- package/assets/templates/pages/dashboard-scorecard/template.doc.mjs +0 -7
- package/assets/templates/pages/detail-page/page.tsx +28 -11
- package/assets/templates/pages/detail-page/template.doc.mjs +0 -10
- package/assets/templates/pages/documentation/page.tsx +11 -4
- package/assets/templates/pages/documentation-design/page.tsx +39 -12
- package/assets/templates/pages/documentation-design/template.doc.mjs +0 -5
- package/assets/templates/pages/documentation-technical/page.tsx +8 -6
- package/assets/templates/pages/documentation-technical/template.doc.mjs +0 -5
- package/assets/templates/pages/editor/page.tsx +70 -48
- package/assets/templates/pages/editor/template.doc.mjs +0 -26
- package/assets/templates/pages/file-explorer/page.tsx +19 -19
- package/assets/templates/pages/file-explorer/template.doc.mjs +0 -15
- package/assets/templates/pages/form-two-column/page.tsx +1 -1
- package/assets/templates/pages/form-wizard/page.tsx +12 -5
- package/assets/templates/pages/form-wizard-dialog/page.tsx +6 -2
- package/assets/templates/pages/form-wizard-inline/page.tsx +16 -12
- package/assets/templates/pages/form-wizard-inline/template.doc.mjs +0 -6
- package/assets/templates/pages/form-wizard-vertical/page.tsx +21 -24
- package/assets/templates/pages/form-wizard-vertical/template.doc.mjs +0 -13
- package/assets/templates/pages/gallery-hero/page.tsx +2 -2
- package/assets/templates/pages/gallery-hero/template.doc.mjs +0 -1
- package/assets/templates/pages/ide/page.tsx +12 -7
- package/assets/templates/pages/ide/template.doc.mjs +0 -5
- package/assets/templates/pages/incident-console/page.tsx +4 -4
- package/assets/templates/pages/incident-console/template.doc.mjs +0 -1
- package/assets/templates/pages/kanban-board/page.tsx +128 -47
- package/assets/templates/pages/kanban-board/template.doc.mjs +0 -11
- package/assets/templates/pages/library/page.tsx +34 -64
- package/assets/templates/pages/library/template.doc.mjs +0 -1
- package/assets/templates/pages/login/page.tsx +6 -4
- package/assets/templates/pages/login/template.doc.mjs +0 -1
- package/assets/templates/pages/login-card/page.tsx +6 -4
- package/assets/templates/pages/login-card/template.doc.mjs +0 -1
- package/assets/templates/pages/login-split/page.tsx +6 -5
- package/assets/templates/pages/login-split/template.doc.mjs +0 -1
- package/assets/templates/pages/login-sso/page.tsx +6 -6
- package/assets/templates/pages/login-sso/template.doc.mjs +0 -1
- package/assets/templates/pages/messaging-shell/page.tsx +14 -14
- package/assets/templates/pages/messaging-shell/template.doc.mjs +0 -9
- package/assets/templates/pages/mixed-gallery/page.tsx +1 -1
- package/assets/templates/pages/payment-form/page.tsx +50 -29
- package/assets/templates/pages/payment-form/template.doc.mjs +0 -6
- package/assets/templates/pages/product-detail/page.tsx +21 -9
- package/assets/templates/pages/product-detail/template.doc.mjs +0 -1
- package/assets/templates/pages/product-gallery/page.tsx +3 -3
- package/assets/templates/pages/product-gallery/template.doc.mjs +0 -1
- package/assets/templates/pages/settings/page.tsx +35 -14
- package/assets/templates/pages/settings/template.doc.mjs +0 -1
- package/assets/templates/pages/settings-dialog/page.tsx +96 -93
- package/assets/templates/pages/settings-dialog/template.doc.mjs +0 -53
- package/assets/templates/pages/settings-sidebar/page.tsx +74 -36
- package/assets/templates/pages/settings-sidebar/template.doc.mjs +0 -16
- package/assets/templates/pages/shell-nav/page.tsx +32 -20
- package/assets/templates/pages/shell-nav/template.doc.mjs +0 -6
- package/assets/templates/pages/shell-side-nav/page.tsx +23 -22
- package/assets/templates/pages/shell-side-nav/template.doc.mjs +0 -11
- package/assets/templates/pages/shell-top-nav/page.tsx +13 -13
- package/assets/templates/pages/shell-top-nav/template.doc.mjs +0 -19
- package/assets/templates/pages/side-gallery/page.tsx +5 -2
- package/assets/templates/pages/table/page.tsx +21 -21
- package/assets/templates/pages/table/template.doc.mjs +0 -10
- package/assets/templates/pages/table-collapsible/page.tsx +8 -8
- package/assets/templates/pages/table-collapsible/template.doc.mjs +0 -6
- package/assets/templates/pages/table-comparison/page.tsx +23 -23
- package/assets/templates/pages/table-comparison/template.doc.mjs +0 -14
- package/assets/templates/pages/table-filter/page.tsx +75 -47
- package/assets/templates/pages/table-filter/template.doc.mjs +0 -19
- package/assets/templates/pages/table-grouped/page.tsx +39 -17
- package/assets/templates/pages/table-grouped/template.doc.mjs +0 -11
- package/assets/templates/pages/table-inbox/page.tsx +147 -65
- package/assets/templates/pages/table-inbox/template.doc.mjs +0 -17
- package/assets/templates/pages/table-page/page.tsx +3 -6
- package/assets/templates/pages/table-page/template.doc.mjs +0 -1
- package/assets/templates/pages/table-tree/page.tsx +35 -35
- package/assets/templates/pages/table-tree/template.doc.mjs +0 -15
- package/assets/templates/pages/theme-showcase/page.tsx +48 -43
- package/assets/templates/pages/theme-showcase/template.doc.mjs +0 -19
- package/assets/templates/pages/work-item-detail/page.tsx +60 -33
- package/assets/templates/pages/work-item-detail/template.doc.mjs +0 -12
- package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +12 -12
- package/assets/templates/themes/butter/butterTheme.ts +244 -10
- package/assets/templates/themes/chocolate/chocolateTheme.ts +81 -10
- package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +3 -3
- package/assets/templates/themes/gothic/gothicTheme.ts +126 -4
- package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +8 -8
- package/assets/templates/themes/matcha/matchaTheme.ts +58 -14
- package/assets/templates/themes/neutral/neutralTheme.ts +45 -0
- package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +3 -3
- package/assets/templates/themes/stone/stoneTheme.ts +101 -10
- package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +9 -9
- package/assets/templates/themes/y2k/y2kTheme.ts +257 -14
- package/assets/theme.template.ts +17 -7
- package/authoring/config/config.doc.mjs +8 -1
- package/authoring/config/parse.mjs +15 -0
- package/authoring/config/skill-places.d.mts +23 -0
- package/authoring/config/skill-places.mjs +35 -0
- package/authoring/config/type.ts +20 -3
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/debug/type.ts +4 -0
- package/authoring/discover/parse.d.mts +4 -3
- package/authoring/discover/parse.mjs +76 -41
- package/authoring/discover/type.ts +9 -1
- package/authoring/doctypes/_schema.d.mts +36 -16
- package/authoring/doctypes/_schema.mjs +29 -0
- package/authoring/doctypes/base/type.ts +19 -0
- package/authoring/doctypes/command/command.doc.mjs +6 -0
- package/authoring/doctypes/command/type.ts +7 -0
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/icon-definition/icon-definition.doc.mjs +17 -1
- package/authoring/doctypes/icon-definition/parse.mjs +12 -0
- package/authoring/doctypes/icon-definition/type.ts +18 -0
- package/authoring/doctypes/reference/reference.doc.mjs +13 -0
- package/authoring/doctypes/reference/skill.d.mts +29 -0
- package/authoring/doctypes/reference/skill.mjs +56 -0
- package/authoring/doctypes/reference/type.ts +19 -0
- package/authoring/gap-report/parse.d.mts +1 -1
- package/authoring/integration/integration.doc.mjs +8 -0
- package/authoring/integration/schema.d.mts +21 -3
- package/authoring/integration/schema.mjs +25 -5
- package/authoring/integration/type.ts +14 -0
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/build.doc.mjs +1 -1
- package/clients/cli/commands/build.mjs +20 -14
- package/clients/cli/commands/component.doc.mjs +3 -1
- package/clients/cli/commands/component.mjs +21 -6
- package/clients/cli/commands/discover.doc.mjs +2 -2
- package/clients/cli/commands/discover.mjs +112 -9
- package/clients/cli/commands/docs.doc.mjs +17 -10
- package/clients/cli/commands/docs.mjs +112 -191
- package/clients/cli/commands/doctor-integration-validate.doc.mjs +4 -2
- package/clients/cli/commands/doctor.doc.mjs +3 -1
- package/clients/cli/commands/doctor.mjs +16 -3
- package/clients/cli/commands/experimental/export.mjs +64 -0
- package/clients/cli/commands/experimental/icon.mjs +387 -229
- package/clients/cli/commands/experimental/import.mjs +70 -0
- package/clients/cli/commands/experimental/index.mjs +152 -13
- package/clients/cli/commands/experimental/render-output.mjs +242 -0
- package/clients/cli/commands/experimental/theme.mjs +69 -23
- package/clients/cli/commands/experimental-export.doc.mjs +73 -0
- package/clients/cli/commands/experimental-icon-add.doc.mjs +1 -1
- package/clients/cli/commands/experimental-icon-map.doc.mjs +4 -1
- package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +4 -1
- package/clients/cli/commands/experimental-icon-new-set.doc.mjs +4 -1
- package/clients/cli/commands/experimental-icon-use.doc.mjs +1 -1
- package/clients/cli/commands/experimental-icon.doc.mjs +1 -1
- package/clients/cli/commands/experimental-import.doc.mjs +53 -0
- package/clients/cli/commands/experimental-theme-add.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +7 -2
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme.doc.mjs +1 -1
- package/clients/cli/commands/experimental.doc.mjs +4 -4
- package/clients/cli/commands/init.doc.mjs +63 -31
- package/clients/cli/commands/integration-check.doc.mjs +1 -1
- package/clients/cli/commands/mcp.doc.mjs +57 -0
- package/clients/cli/commands/mcp.mjs +51 -0
- package/clients/cli/commands/search.mjs +78 -9
- package/clients/cli/commands/template.doc.mjs +14 -5
- package/clients/cli/commands/template.mjs +21 -2
- package/clients/cli/commands/theme-add.doc.mjs +6 -2
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/clients/cli/commands/theme-remove.doc.mjs +1 -1
- package/clients/cli/commands/theme-targets.doc.mjs +1 -1
- package/clients/cli/commands/theme.mjs +86 -5
- package/clients/cli/commands/upgrade.doc.mjs +2 -1
- package/clients/cli/commands.generated.json +1 -1
- package/clients/cli/formatters/index.mjs +52 -6
- package/clients/cli/index.mjs +44 -37
- package/clients/cli/lib/cli-error.mjs +20 -10
- package/clients/cli/lib/component-format.mjs +167 -74
- package/clients/cli/lib/define-command.mjs +92 -4
- package/clients/cli/lib/hook-format.mjs +28 -24
- package/clients/cli/lib/json-shim.mjs +61 -4
- package/clients/cli/lib/manifest.mjs +9 -1
- package/clients/cli/lib/mcp-server.mjs +286 -0
- package/clients/cli/lib/mcp-tools.mjs +405 -0
- package/clients/cli/lib/other-cli-words.mjs +99 -0
- package/clients/cli/lib/renamed-commands.mjs +21 -0
- package/clients/cli/lib/root-args.mjs +10 -3
- package/clients/cli/lib/stray-option.mjs +79 -1
- package/clients/cli/lib/unknown-command.mjs +406 -13
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +27 -0
- package/foundation/agent-docs/agent-doc-state.d.mts +20 -2
- package/foundation/agent-docs/agent-doc-state.mjs +71 -4
- package/foundation/agent-docs/agent-docs.d.mts +79 -5
- package/foundation/agent-docs/agent-docs.mjs +137 -10
- package/foundation/agent-docs/computer-agent-text.d.mts +28 -14
- package/foundation/agent-docs/computer-agent-text.mjs +85 -172
- package/foundation/agent-docs/folder-scope.d.mts +51 -0
- package/foundation/agent-docs/folder-scope.mjs +86 -0
- package/foundation/agent-docs/managed-skill-file.d.mts +115 -0
- package/foundation/agent-docs/managed-skill-file.mjs +224 -0
- package/foundation/agent-docs/skill-place-files.d.mts +119 -0
- package/foundation/agent-docs/skill-place-files.mjs +374 -0
- package/foundation/agent-docs/skill-places.d.mts +139 -0
- package/foundation/agent-docs/skill-places.mjs +321 -0
- package/foundation/color/css-color.d.mts +150 -0
- package/foundation/color/css-color.mjs +960 -0
- package/foundation/config/config-path.d.mts +2 -2
- package/foundation/config/config-path.mjs +5 -6
- package/foundation/config/config-writer.d.mts +5 -1
- package/foundation/config/config-writer.mjs +20 -4
- package/foundation/config/project.d.mts +8 -5
- package/foundation/config/project.mjs +35 -17
- package/foundation/config/theme-state.d.mts +13 -0
- package/foundation/config/theme-state.mjs +28 -0
- package/foundation/debug/event.d.mts +2 -1
- package/foundation/debug/event.mjs +2 -1
- package/foundation/discovery/button-actions.d.mts +220 -0
- package/foundation/discovery/button-actions.mjs +1527 -0
- package/foundation/discovery/cli-self-docs.d.mts +7 -0
- package/foundation/discovery/cli-self-docs.mjs +67 -6
- package/foundation/discovery/color-modes.d.mts +14 -0
- package/foundation/discovery/color-modes.mjs +53 -0
- package/foundation/discovery/command-pointers.d.mts +21 -4
- package/foundation/discovery/command-pointers.mjs +25 -4
- package/foundation/discovery/component-discovery.d.mts +10 -0
- package/foundation/discovery/component-discovery.mjs +99 -43
- package/foundation/discovery/component-replacement.d.mts +8 -0
- package/foundation/discovery/component-replacement.mjs +13 -0
- package/foundation/discovery/core-augmentation-points.d.mts +90 -0
- package/foundation/discovery/core-augmentation-points.mjs +1030 -0
- package/foundation/discovery/core-component-views.d.mts +15 -0
- package/foundation/discovery/core-component-views.mjs +176 -0
- package/foundation/discovery/core-elements.d.mts +29 -0
- package/foundation/discovery/core-elements.mjs +57 -0
- package/foundation/discovery/core-prop-types.d.mts +65 -0
- package/foundation/discovery/core-prop-types.mjs +221 -0
- package/foundation/discovery/core-props.d.mts +33 -0
- package/foundation/discovery/core-props.mjs +64 -0
- package/foundation/discovery/doc-types.d.mts +10 -42
- package/foundation/discovery/doc-types.mjs +26 -7
- package/foundation/discovery/docs-discovery.d.mts +33 -2
- package/foundation/discovery/docs-discovery.mjs +149 -72
- package/foundation/discovery/docs-section-key.d.mts +21 -1
- package/foundation/discovery/docs-section-key.mjs +57 -19
- package/foundation/discovery/hook-discovery.d.mts +2 -0
- package/foundation/discovery/hook-discovery.mjs +6 -5
- package/foundation/discovery/icon-definition-discovery.d.mts +155 -3
- package/foundation/discovery/icon-definition-discovery.mjs +197 -5
- package/foundation/discovery/icon-imports.d.mts +66 -0
- package/foundation/discovery/icon-imports.mjs +225 -0
- package/foundation/discovery/icon-ranking.d.mts +118 -4
- package/foundation/discovery/icon-ranking.mjs +453 -59
- package/foundation/discovery/icon-set-checks.d.mts +2 -0
- package/foundation/discovery/icon-set-checks.mjs +16 -2
- package/foundation/discovery/icon-set-discovery.d.mts +68 -2
- package/foundation/discovery/icon-set-discovery.mjs +124 -23
- package/foundation/discovery/icon-set-writer.d.mts +9 -13
- package/foundation/discovery/icon-set-writer.mjs +89 -36
- package/foundation/discovery/integration-skills.d.mts +62 -0
- package/foundation/discovery/integration-skills.mjs +116 -0
- package/foundation/discovery/module-exports.d.mts +8 -0
- package/foundation/discovery/module-exports.mjs +20 -21
- package/foundation/discovery/name-roots.d.mts +5 -0
- package/foundation/discovery/name-roots.mjs +11 -0
- package/foundation/discovery/package-exports.d.mts +22 -0
- package/foundation/discovery/package-exports.mjs +44 -3
- package/foundation/discovery/project-typescript.d.mts +5 -1
- package/foundation/discovery/project-typescript.mjs +8 -2
- package/foundation/discovery/prop-drift.d.mts +16 -0
- package/foundation/discovery/prop-drift.mjs +154 -3
- package/foundation/discovery/replacement-aliases.d.mts +51 -0
- package/foundation/discovery/replacement-aliases.mjs +95 -0
- package/foundation/discovery/runner-allowlist.d.mts +2 -1
- package/foundation/discovery/runner-allowlist.mjs +3 -1
- package/foundation/discovery/runner-commands.mjs +1 -0
- package/foundation/discovery/stored-component-list.mjs +34 -2
- package/foundation/discovery/template-adapter.d.mts +27 -1
- package/foundation/discovery/template-adapter.mjs +221 -10
- package/foundation/discovery/template-destination.d.mts +14 -6
- package/foundation/discovery/template-destination.mjs +42 -8
- package/foundation/discovery/template-icon-meanings.d.mts +7 -2
- package/foundation/discovery/template-icon-meanings.mjs +52 -12
- package/foundation/discovery/template-icons.d.mts +46 -3
- package/foundation/discovery/template-icons.mjs +72 -109
- package/foundation/discovery/template-needs.d.mts +34 -5
- package/foundation/discovery/template-needs.mjs +164 -22
- package/foundation/discovery/template-placeholders.d.mts +149 -0
- package/foundation/discovery/template-placeholders.mjs +463 -0
- package/foundation/discovery/template-source-tree.d.mts +6 -3
- package/foundation/discovery/template-source-tree.mjs +8 -5
- package/foundation/discovery/theme-discovery.d.mts +8 -0
- package/foundation/discovery/theme-discovery.mjs +23 -6
- package/foundation/discovery/theme-imports.d.mts +1 -3
- package/foundation/discovery/theme-imports.mjs +5 -30
- package/foundation/doc-compiler/compile.mjs +6 -8
- package/foundation/doc-compiler/doc-syntax.d.mts +25 -1
- package/foundation/doc-compiler/doc-syntax.mjs +85 -10
- package/foundation/doc-compiler/doc-text.d.mts +52 -0
- package/foundation/doc-compiler/doc-text.mjs +176 -0
- package/foundation/doc-compiler/links.d.mts +8 -2
- package/foundation/doc-compiler/links.mjs +27 -6
- package/foundation/doc-compiler/read.d.mts +1 -1
- package/foundation/doc-compiler/stored-docs.d.mts +14 -3
- package/foundation/doc-compiler/stored-docs.mjs +12 -6
- package/foundation/env/cli-command.d.mts +68 -10
- package/foundation/env/cli-command.mjs +116 -22
- package/foundation/env/package-manager.d.mts +33 -2
- package/foundation/env/package-manager.mjs +68 -6
- package/foundation/env/project-scope.d.mts +9 -0
- package/foundation/env/project-scope.mjs +28 -2
- package/foundation/env/user-dirs.d.mts +14 -0
- package/foundation/env/user-dirs.mjs +34 -1
- package/foundation/env/user-settings.d.mts +15 -0
- package/foundation/env/user-settings.mjs +56 -2
- package/foundation/fonts/font-stylesheet.d.mts +11 -0
- package/foundation/fonts/font-stylesheet.mjs +62 -7
- package/foundation/fs/cache-eviction.d.mts +7 -5
- package/foundation/fs/cache-eviction.mjs +20 -13
- package/foundation/fs/empty-folder.d.mts +12 -0
- package/foundation/fs/empty-folder.mjs +30 -0
- package/foundation/fs/file-protection.d.mts +11 -0
- package/foundation/fs/file-protection.mjs +49 -3
- package/foundation/fs/gather-cache.d.mts +14 -7
- package/foundation/fs/gather-cache.mjs +163 -67
- package/foundation/fs/import-url.d.mts +7 -5
- package/foundation/fs/import-url.mjs +7 -5
- package/foundation/fs/jiti-cache.d.mts +47 -26
- package/foundation/fs/jiti-cache.mjs +222 -130
- package/foundation/fs/loaded-files.d.mts +15 -1
- package/foundation/fs/loaded-files.mjs +40 -3
- package/foundation/fs/module-loader.d.mts +3 -1
- package/foundation/fs/module-loader.mjs +85 -5
- package/foundation/fs/path-safety.d.mts +1 -0
- package/foundation/fs/path-safety.mjs +2 -0
- package/foundation/fs/read-record.mjs +9 -5
- package/foundation/fs/relative-specifier.d.mts +10 -0
- package/foundation/fs/relative-specifier.mjs +28 -0
- package/foundation/integrations/computer-integrations.mjs +11 -10
- package/foundation/integrations/icon-features.d.mts +63 -0
- package/foundation/integrations/icon-features.mjs +54 -0
- package/foundation/integrations/integration-warnings.d.mts +10 -0
- package/foundation/integrations/integration-warnings.mjs +12 -3
- package/foundation/integrations/integrations.d.mts +16 -2
- package/foundation/integrations/integrations.mjs +50 -8
- package/foundation/integrations/may-have-integrations.mjs +7 -6
- package/foundation/integrations/provider-resolution.mjs +19 -2
- package/foundation/integrations/validate-contributions.d.mts +13 -3
- package/foundation/integrations/validate-contributions.mjs +64 -13
- package/foundation/release/agent-text-worker.mjs +33 -1
- package/foundation/release/cache.d.mts +48 -3
- package/foundation/release/cache.mjs +196 -20
- package/foundation/release/choose.d.mts +5 -2
- package/foundation/release/choose.mjs +54 -4
- package/foundation/release/global-state.mjs +10 -2
- package/foundation/release/handoff.mjs +7 -1
- package/foundation/release/notices.d.mts +97 -9
- package/foundation/release/notices.mjs +421 -59
- package/foundation/release/project.d.mts +21 -4
- package/foundation/release/project.mjs +74 -42
- package/foundation/release/run-context.d.mts +6 -0
- package/foundation/release/run-context.mjs +9 -0
- package/foundation/render/assets.d.mts +7 -0
- package/foundation/render/assets.mjs +30 -17
- package/foundation/render/charts.d.mts +11 -10
- package/foundation/render/charts.mjs +112 -1
- package/foundation/render/class-alias.d.mts +23 -0
- package/foundation/render/class-alias.mjs +333 -0
- package/foundation/render/client-bundle.d.mts +183 -0
- package/foundation/render/client-bundle.mjs +1026 -0
- package/foundation/render/component-map.mjs +1 -1
- package/foundation/render/css-cut.d.mts +26 -0
- package/foundation/render/css-cut.mjs +344 -2
- package/foundation/render/cut-short.d.mts +7 -1
- package/foundation/render/cut-short.mjs +46 -6
- package/foundation/render/dropped-text.d.mts +43 -0
- package/foundation/render/dropped-text.mjs +90 -0
- package/foundation/render/embedded-files.d.mts +24 -1
- package/foundation/render/embedded-files.mjs +41 -4
- package/foundation/render/embedded-imports.d.mts +72 -12
- package/foundation/render/embedded-imports.mjs +206 -70
- package/foundation/render/esbuild-dependency.d.mts +14 -0
- package/foundation/render/esbuild-dependency.mjs +41 -0
- package/foundation/render/file-header.d.mts +7 -2
- package/foundation/render/file-header.mjs +19 -10
- package/foundation/render/html-reader.d.mts +36 -17
- package/foundation/render/html-reader.mjs +239 -32
- package/foundation/render/image-attributes.d.mts +25 -0
- package/foundation/render/image-attributes.mjs +33 -0
- package/foundation/render/markup-edits.mjs +1 -1
- package/foundation/render/package-resolve-hooks.d.mts +54 -0
- package/foundation/render/package-resolve-hooks.mjs +144 -0
- package/foundation/render/page-host.mjs +1 -1
- package/foundation/render/page-worker.mjs +1307 -107
- package/foundation/render/picture-chrome.mjs +54 -29
- package/foundation/render/picture-playwright.mjs +78 -42
- package/foundation/render/picture-window.d.mts +44 -5
- package/foundation/render/picture-window.mjs +265 -19
- package/foundation/render/rebuild.mjs +2 -2
- package/foundation/render/remote-images.d.mts +83 -0
- package/foundation/render/remote-images.mjs +384 -0
- package/foundation/render/render-page.d.mts +219 -8
- package/foundation/render/render-page.mjs +1702 -165
- package/foundation/render/restore-folder.d.mts +13 -0
- package/foundation/render/restore-folder.mjs +30 -0
- package/foundation/render/served-packages.d.mts +14 -1
- package/foundation/render/served-packages.mjs +50 -6
- package/foundation/render/share-checks.d.mts +35 -0
- package/foundation/render/share-checks.mjs +95 -0
- package/foundation/render/source-block.d.mts +14 -3
- package/foundation/render/source-block.mjs +44 -9
- package/foundation/render/srcset.d.mts +32 -0
- package/foundation/render/srcset.mjs +64 -0
- package/foundation/render/ts-paths.d.mts +52 -1
- package/foundation/render/ts-paths.mjs +114 -4
- package/foundation/render/value-uses.d.mts +43 -0
- package/foundation/render/value-uses.mjs +110 -0
- package/foundation/response/error-codes.d.mts +2 -1
- package/foundation/response/error-codes.doc.mjs +16 -10
- package/foundation/response/error-codes.mjs +19 -8
- package/foundation/response/json.d.mts +0 -15
- package/foundation/response/json.mjs +1 -51
- package/foundation/response/response-types.doc.mjs +28 -17
- package/foundation/runtime/css-tree.d.mts +16 -0
- package/foundation/runtime/css-tree.mjs +46 -3
- package/foundation/runtime/lazy-dependencies.d.mts +7 -0
- package/foundation/runtime/lazy-dependencies.mjs +25 -3
- package/foundation/runtime/locked-versions.d.mts +4 -2
- package/foundation/runtime/locked-versions.mjs +18 -10
- package/foundation/runtime/package-root.d.mts +25 -0
- package/foundation/runtime/package-root.mjs +48 -0
- package/foundation/runtime/word-table.d.mts +18 -0
- package/foundation/runtime/word-table.mjs +33 -0
- package/foundation/suggest/other-command.d.mts +23 -0
- package/foundation/suggest/other-command.mjs +49 -5
- package/foundation/text/default-variant.d.mts +20 -0
- package/foundation/text/default-variant.mjs +24 -0
- package/foundation/text/definition-coverage.d.mts +21 -0
- package/foundation/text/definition-coverage.mjs +20 -0
- package/foundation/text/icon-id.d.mts +20 -0
- package/foundation/text/icon-id.mjs +40 -0
- package/foundation/text/icon-set-next.d.mts +26 -0
- package/foundation/text/icon-set-next.mjs +37 -0
- package/foundation/text/string-utils.mjs +14 -41
- package/foundation/text/suggest-order.d.mts +10 -4
- package/foundation/text/suggest-order.mjs +20 -13
- package/package.json +8 -6
- package/assets/codemods/transforms/next/migrate-item-swipe-actions-to-swipe.mjs +0 -394
- package/assets/docs/tree/render-pages.doc.mjs +0 -135
- package/clients/cli/commands/experimental/render.mjs +0 -154
- package/clients/cli/commands/experimental-render.doc.mjs +0 -73
package/api/doctor/doctor.mjs
CHANGED
|
@@ -27,6 +27,11 @@
|
|
|
27
27
|
import * as fs from 'node:fs';
|
|
28
28
|
import * as path from 'node:path';
|
|
29
29
|
import {gatherCacheSummary} from '../../foundation/fs/gather-cache.mjs';
|
|
30
|
+
import {
|
|
31
|
+
oldTranspileCacheDir,
|
|
32
|
+
transpiledCacheDir,
|
|
33
|
+
} from '../../foundation/env/user-dirs.mjs';
|
|
34
|
+
import {SUBFOLDERS} from '../../foundation/fs/jiti-cache.mjs';
|
|
30
35
|
|
|
31
36
|
import {
|
|
32
37
|
MIN_NODE_VERSION,
|
|
@@ -52,10 +57,13 @@ import {
|
|
|
52
57
|
formatCliCommand,
|
|
53
58
|
getCliInvocation,
|
|
54
59
|
guessCliInvocation,
|
|
60
|
+
quoteCommandArgument,
|
|
55
61
|
} from '../../foundation/env/package-manager.mjs';
|
|
56
62
|
import {
|
|
57
63
|
chooseDeclaredCliCommand,
|
|
64
|
+
chooseDeclaredValue,
|
|
58
65
|
declaredCliCommandsOf,
|
|
66
|
+
declaredValuesOf,
|
|
59
67
|
} from '../../foundation/env/cli-command.mjs';
|
|
60
68
|
import {
|
|
61
69
|
findConfigPath,
|
|
@@ -76,6 +84,7 @@ import {
|
|
|
76
84
|
guideEntry,
|
|
77
85
|
overlayLanguages,
|
|
78
86
|
projectTree,
|
|
87
|
+
templateLinkProblems,
|
|
79
88
|
} from '../docs/_adapter.mjs';
|
|
80
89
|
import {typedEdges} from '../docs/node/node.mjs';
|
|
81
90
|
import {detailView} from '../../foundation/doc-compiler/lenses.mjs';
|
|
@@ -88,6 +97,8 @@ import {
|
|
|
88
97
|
import {
|
|
89
98
|
checkAppThemes,
|
|
90
99
|
checkThemes,
|
|
100
|
+
moduleSpecifiers,
|
|
101
|
+
stringValues,
|
|
91
102
|
themeImportWiring,
|
|
92
103
|
withProviderWiring,
|
|
93
104
|
} from './theme-checks.mjs';
|
|
@@ -103,16 +114,24 @@ import {
|
|
|
103
114
|
import {
|
|
104
115
|
keptFileCheck,
|
|
105
116
|
THEME_WIRING_CODEC,
|
|
117
|
+
CORE_PROPS_CODEC,
|
|
118
|
+
BUTTON_ACTIONS_CODEC,
|
|
106
119
|
alignCommand,
|
|
107
120
|
addCliCommandFor,
|
|
108
121
|
dependencyInstallFor,
|
|
109
122
|
computerAgentTextState,
|
|
110
123
|
installCommandFor,
|
|
111
124
|
insideProjectElsewhere,
|
|
125
|
+
packageInstallCommand,
|
|
126
|
+
packageInstallStep,
|
|
112
127
|
projectCoreVersion,
|
|
113
128
|
projectHasOwnCli,
|
|
114
129
|
computerIntegrationsOutside,
|
|
130
|
+
findIconImports,
|
|
115
131
|
findIconPlaceholders,
|
|
132
|
+
findButtonsWithoutAction,
|
|
133
|
+
findUnknownCoreProps,
|
|
134
|
+
iconFeatureGate,
|
|
116
135
|
iconUseCommand,
|
|
117
136
|
placeholderFixes,
|
|
118
137
|
unlistedIconSets,
|
|
@@ -126,8 +145,14 @@ import {
|
|
|
126
145
|
isLocalThemeOwner,
|
|
127
146
|
readThemeState,
|
|
128
147
|
builtTargetOf,
|
|
148
|
+
listProjectSourceFiles,
|
|
149
|
+
readTextFile,
|
|
150
|
+
doctorStylesheetImports,
|
|
151
|
+
doctorStylesheetAtRules,
|
|
152
|
+
builtProjectRoot,
|
|
153
|
+
readSkillPlaces,
|
|
129
154
|
} from './_adapter.mjs';
|
|
130
|
-
import {checkBuilt} from './built-checks.mjs';
|
|
155
|
+
import {checkBuilt, linksCoreStylesheet} from './built-checks.mjs';
|
|
131
156
|
import {coreOnlyDocNames} from '../../foundation/bases/core-docs.mjs';
|
|
132
157
|
import {coreBase} from '../../foundation/bases/core.mjs';
|
|
133
158
|
import {
|
|
@@ -143,6 +168,9 @@ import {
|
|
|
143
168
|
* @property {string} label - Human-readable check name.
|
|
144
169
|
* @property {DoctorStatus} status
|
|
145
170
|
* @property {string} message - One-line result summary.
|
|
171
|
+
* @property {string} [brief] - A short form of a long message, which text
|
|
172
|
+
* output prints in its place. It names the command that prints the whole
|
|
173
|
+
* message.
|
|
146
174
|
* @property {string} [fix] - Actionable remediation, present when not 'pass'.
|
|
147
175
|
*
|
|
148
176
|
* @typedef {object} DoctorReport
|
|
@@ -162,6 +190,8 @@ import {
|
|
|
162
190
|
* @property {string|null} [projectCore] - The Core release the project names
|
|
163
191
|
* (installed, else locked, else declared), as the daily hint reads it.
|
|
164
192
|
* @property {string|null} configPath - Resolved astryx.config.mjs path, or null.
|
|
193
|
+
* @property {import('./_adapter.mjs').SkillPlacesReport|null} [skillPlaces]
|
|
194
|
+
* The project's skill places, or null when they could not be read.
|
|
165
195
|
* @property {import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]|null} [integrations]
|
|
166
196
|
* Every integration the project loaded, or null when the project could not be
|
|
167
197
|
* read at all.
|
|
@@ -181,14 +211,27 @@ import {
|
|
|
181
211
|
* Combined project-level integration issues, including cross-package template replacement warnings.
|
|
182
212
|
* @property {Error|null} [configError] - Error thrown while resolving the config
|
|
183
213
|
* path (e.g. multiple config files present), surfaced by checkConfig as a FAIL.
|
|
184
|
-
* @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]
|
|
185
|
-
* The project's icon sets (AST-084 FR17), or null when they could not be
|
|
214
|
+
* @property {{sets: Array<{name: string, package: string, replacedKeys?: Array<{key: string, definition: 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]
|
|
215
|
+
* The project's icon sets (AST-084 FR17), or null when they could not be
|
|
216
|
+
* read or the icon feature gate is off.
|
|
186
217
|
* Experimental: may change or be removed in a patch release.
|
|
218
|
+
* @property {{found: Array<{file: string, line: number, column: number, component: 'Button' | 'IconButton', label: string | null, note: string | null}>, files: number, incomplete: boolean, domListener?: string}|null} [buttonActions]
|
|
219
|
+
* The Core buttons in the project's own source that do nothing when
|
|
220
|
+
* pressed, and how many source files were read; null outside a project on
|
|
221
|
+
* Core, or when the scan could not run.
|
|
187
222
|
* @property {Array<{file: string, local: string, meanings: string[] | null, uses: number}>|null} [iconPlaceholders]
|
|
188
223
|
* Each file in the project's own source that uses the placeholder component
|
|
189
|
-
* the CLI writes for a missing icon, read only
|
|
190
|
-
*
|
|
224
|
+
* the CLI writes for a missing icon, read only where the icon feature gate
|
|
225
|
+
* is on; null otherwise.
|
|
226
|
+
* Experimental: may change or be removed in a patch release.
|
|
227
|
+
* @property {Array<{file: string, imports: Array<{line: number, module: string, export: string, why: 'unlisted'|'earlier'|'unresolved', set: string|null, definitions: string[], replacement: {set: string, module: string, export: string}|null}>}>|null} [iconImports]
|
|
228
|
+
* Each file in the project's own source with icon imports that do not
|
|
229
|
+
* match its icon sets, read only when the placeholders are; null otherwise.
|
|
191
230
|
* Experimental: may change or be removed in a patch release.
|
|
231
|
+
* @property {{found: import('./_adapter.mjs').UnknownCoreProp[], uses: number, skipped: string | null}|null} [coreProps]
|
|
232
|
+
* The props the project's own source gives Core components that they do
|
|
233
|
+
* not take, with how many props it read, or why it checked none; null when
|
|
234
|
+
* the project reads no Core or the scan failed.
|
|
192
235
|
* @property {string|null} [projectError] - Why the CLI could not load the
|
|
193
236
|
* project from its config, when it could not. Checks that need the loaded
|
|
194
237
|
* project quote it when they skip, so a skip says what was found.
|
|
@@ -328,6 +371,34 @@ export function checkNodeVersion(ctx) {
|
|
|
328
371
|
};
|
|
329
372
|
}
|
|
330
373
|
|
|
374
|
+
/**
|
|
375
|
+
* An install step as fix text: the line in backticks, then its note.
|
|
376
|
+
* @param {{line: string, note: string | null}} step
|
|
377
|
+
*/
|
|
378
|
+
function stepText({line, note}) {
|
|
379
|
+
return note ? `\`${line}\` (${note})` : `\`${line}\``;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* The fix text for peers to install: the project's integration guidance when
|
|
384
|
+
* it gives one, followed by the versions the peers need, else one install
|
|
385
|
+
* command with each range.
|
|
386
|
+
* @param {string} cwd
|
|
387
|
+
* @param {string[]} names every peer to install, by name
|
|
388
|
+
* @param {string[]} targets the same peers, each with its range when it has one
|
|
389
|
+
* @returns {string}
|
|
390
|
+
*/
|
|
391
|
+
function peerInstallText(cwd, names, targets) {
|
|
392
|
+
const {installGuidance} = packageInstallCommand(names, cwd);
|
|
393
|
+
if (installGuidance) {
|
|
394
|
+
const versioned = targets.filter(t => !names.includes(t));
|
|
395
|
+
return versioned.length
|
|
396
|
+
? `\`${installGuidance}\`, at these versions: ${versioned.join(', ')}`
|
|
397
|
+
: `\`${installGuidance}\``;
|
|
398
|
+
}
|
|
399
|
+
return stepText(packageInstallStep(targets, cwd));
|
|
400
|
+
}
|
|
401
|
+
|
|
331
402
|
/**
|
|
332
403
|
* Check 2 — @astryxdesign/core is installed and resolvable from the project.
|
|
333
404
|
* @param {DoctorContext} ctx
|
|
@@ -354,11 +425,240 @@ export function checkCoreInstalled(ctx) {
|
|
|
354
425
|
: {
|
|
355
426
|
fix: install
|
|
356
427
|
? `Install the project's dependencies: \`${install}\`.`
|
|
357
|
-
:
|
|
428
|
+
: `Install the design system: ${stepText(packageInstallStep(['@astryxdesign/core'], ctx.cwd))}.`,
|
|
358
429
|
}),
|
|
359
430
|
};
|
|
360
431
|
}
|
|
361
432
|
|
|
433
|
+
/** Core's component styles, the stylesheet an Astryx app imports once. */
|
|
434
|
+
const CORE_STYLESHEET = '@astryxdesign/core/astryx.css';
|
|
435
|
+
|
|
436
|
+
/** Config files a build that compiles Core from source names its plugin in. */
|
|
437
|
+
const SOURCE_BUILD_CONFIGS = [
|
|
438
|
+
{stem: 'next.config', plugin: 'withAstryx()'},
|
|
439
|
+
{stem: 'vite.config', plugin: 'astryxStylex()'},
|
|
440
|
+
];
|
|
441
|
+
|
|
442
|
+
/** The extensions those config files take. */
|
|
443
|
+
const CONFIG_EXTENSIONS = ['.js', '.mjs', '.cjs', '.ts', '.mts', '.cts'];
|
|
444
|
+
|
|
445
|
+
/** The PostCSS config files PostCSS reads in JSON. */
|
|
446
|
+
const POSTCSS_JSON_CONFIGS = ['.postcssrc', '.postcssrc.json'];
|
|
447
|
+
|
|
448
|
+
/** @param {string} name */
|
|
449
|
+
function namesBuildPackage(name) {
|
|
450
|
+
return (
|
|
451
|
+
name === '@astryxdesign/build' || name.startsWith('@astryxdesign/build/')
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Every string in a JSON value, object keys included.
|
|
457
|
+
* @param {unknown} value
|
|
458
|
+
* @returns {string[]}
|
|
459
|
+
*/
|
|
460
|
+
function jsonStrings(value) {
|
|
461
|
+
if (typeof value === 'string') return [value];
|
|
462
|
+
if (Array.isArray(value)) return value.flatMap(jsonStrings);
|
|
463
|
+
if (value && typeof value === 'object') {
|
|
464
|
+
return Object.entries(value).flatMap(([key, child]) => [
|
|
465
|
+
key,
|
|
466
|
+
...jsonStrings(child),
|
|
467
|
+
]);
|
|
468
|
+
}
|
|
469
|
+
return [];
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* The PostCSS config file that loads a plugin of `@astryxdesign/build`, which
|
|
474
|
+
* compiles Core's styles into the stylesheet's `@stylex;` rule, or null. A
|
|
475
|
+
* JavaScript or TypeScript config names it as a string (an import, a
|
|
476
|
+
* `require()` or a `plugins` key); a JSON config, or `package.json`'s
|
|
477
|
+
* `postcss` field, as a key or a value.
|
|
478
|
+
* @param {string} root
|
|
479
|
+
* @returns {string | null}
|
|
480
|
+
*/
|
|
481
|
+
function postcssConfigLoadingBuild(root) {
|
|
482
|
+
for (const extension of CONFIG_EXTENSIONS) {
|
|
483
|
+
const name = `postcss.config${extension}`;
|
|
484
|
+
for (const config of [name, `.postcssrc${extension}`]) {
|
|
485
|
+
let source;
|
|
486
|
+
try {
|
|
487
|
+
source = readTextFile(path.join(root, config));
|
|
488
|
+
} catch {
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
491
|
+
if (!source.includes('@astryxdesign/build')) continue;
|
|
492
|
+
try {
|
|
493
|
+
if ([...stringValues(source)].some(namesBuildPackage)) return config;
|
|
494
|
+
} catch {
|
|
495
|
+
// A config that does not parse names no plugin.
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
for (const config of [...POSTCSS_JSON_CONFIGS, 'package.json']) {
|
|
500
|
+
let value;
|
|
501
|
+
try {
|
|
502
|
+
value = JSON.parse(readTextFile(path.join(root, config)));
|
|
503
|
+
} catch {
|
|
504
|
+
continue;
|
|
505
|
+
}
|
|
506
|
+
const postcss = config === 'package.json' ? value?.postcss : value;
|
|
507
|
+
if (jsonStrings(postcss).some(namesBuildPackage)) return config;
|
|
508
|
+
}
|
|
509
|
+
return null;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* How an app compiles Core's styles from its source with
|
|
514
|
+
* `@astryxdesign/build`, so it loads no `astryx.css`: a `next.config` or
|
|
515
|
+
* `vite.config` that imports the build's plugin (`withAstryx()`,
|
|
516
|
+
* `astryxStylex()`), a stylesheet with the `@astryx;` rule the Next.js
|
|
517
|
+
* PostCSS plugin writes the compiled rules into, or one with the `@stylex;`
|
|
518
|
+
* rule while the PostCSS config loads the build's plugin. An `@stylex;` rule
|
|
519
|
+
* alone is the app's own StyleX, which still needs Core's prebuilt styles.
|
|
520
|
+
* Null when it does none of these.
|
|
521
|
+
* @param {string} root
|
|
522
|
+
* @returns {string | null}
|
|
523
|
+
*/
|
|
524
|
+
export function sourceBuildSetup(root) {
|
|
525
|
+
for (const {stem, plugin} of SOURCE_BUILD_CONFIGS) {
|
|
526
|
+
for (const extension of CONFIG_EXTENSIONS) {
|
|
527
|
+
const file = path.join(root, `${stem}${extension}`);
|
|
528
|
+
let source;
|
|
529
|
+
try {
|
|
530
|
+
source = readTextFile(file);
|
|
531
|
+
} catch {
|
|
532
|
+
continue;
|
|
533
|
+
}
|
|
534
|
+
if (!source.includes('@astryxdesign/build')) continue;
|
|
535
|
+
try {
|
|
536
|
+
if (
|
|
537
|
+
[...moduleSpecifiers(source)].some(
|
|
538
|
+
specifier =>
|
|
539
|
+
specifier === '@astryxdesign/build' ||
|
|
540
|
+
specifier.startsWith('@astryxdesign/build/'),
|
|
541
|
+
)
|
|
542
|
+
) {
|
|
543
|
+
return `${plugin} in ${stem}${extension}`;
|
|
544
|
+
}
|
|
545
|
+
} catch {
|
|
546
|
+
// A config that does not parse names no plugin.
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
for (const file of listProjectSourceFiles(root, '', {stylesheets: true})) {
|
|
551
|
+
if (!file.endsWith('.css')) continue;
|
|
552
|
+
let css;
|
|
553
|
+
try {
|
|
554
|
+
css = readTextFile(file);
|
|
555
|
+
} catch {
|
|
556
|
+
continue;
|
|
557
|
+
}
|
|
558
|
+
if (!/@(?:astryx|stylex)\s*;/iu.test(css)) continue;
|
|
559
|
+
const rules = doctorStylesheetAtRules(css);
|
|
560
|
+
const where = path.relative(root, file) || file;
|
|
561
|
+
if (rules.has('astryx')) return `the \`@astryx;\` rule in ${where}`;
|
|
562
|
+
if (rules.has('stylex')) {
|
|
563
|
+
const config = postcssConfigLoadingBuild(root);
|
|
564
|
+
if (config) {
|
|
565
|
+
return `the \`@stylex;\` rule in ${where}, with @astryxdesign/build in ${config}`;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
return null;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* {@link sourceBuildSetup} for a project folder, or null without one.
|
|
574
|
+
* @param {string | null} root
|
|
575
|
+
* @returns {string | null}
|
|
576
|
+
*/
|
|
577
|
+
function sourceBuildOf(root) {
|
|
578
|
+
return root ? sourceBuildSetup(root) : null;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* The first project file that loads Core's component styles: a stylesheet
|
|
583
|
+
* that `@import`s them, a module that imports them, or a page that links
|
|
584
|
+
* them. Each is read as a syntax tree or its tags, so comments never count.
|
|
585
|
+
* @param {string} root
|
|
586
|
+
* @returns {{file: string | null, unparsed: number}}
|
|
587
|
+
*/
|
|
588
|
+
function coreStylesheetLoad(root) {
|
|
589
|
+
let unparsed = 0;
|
|
590
|
+
for (const file of listProjectSourceFiles(root, '', {
|
|
591
|
+
stylesheets: true,
|
|
592
|
+
pages: true,
|
|
593
|
+
})) {
|
|
594
|
+
let source;
|
|
595
|
+
try {
|
|
596
|
+
source = readTextFile(file);
|
|
597
|
+
} catch {
|
|
598
|
+
continue;
|
|
599
|
+
}
|
|
600
|
+
if (!source.includes('astryx.css')) continue;
|
|
601
|
+
if (file.endsWith('.css')) {
|
|
602
|
+
if (doctorStylesheetImports(source).has(CORE_STYLESHEET)) {
|
|
603
|
+
return {file, unparsed};
|
|
604
|
+
}
|
|
605
|
+
continue;
|
|
606
|
+
}
|
|
607
|
+
if (/\.html?$/u.test(file)) {
|
|
608
|
+
if (linksCoreStylesheet(source)) return {file, unparsed};
|
|
609
|
+
continue;
|
|
610
|
+
}
|
|
611
|
+
try {
|
|
612
|
+
if (moduleSpecifiers(source).has(CORE_STYLESHEET)) {
|
|
613
|
+
return {file, unparsed};
|
|
614
|
+
}
|
|
615
|
+
} catch {
|
|
616
|
+
unparsed += 1;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
return {file: null, unparsed};
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* The app loads Core's component styles. Without them, Astryx components
|
|
624
|
+
* render unstyled, and nothing else fails: the build passes and the page
|
|
625
|
+
* loads. An app that loads none but compiles Core's styles from source is
|
|
626
|
+
* not checked. Read from the project's own source, stylesheets and pages,
|
|
627
|
+
* never run.
|
|
628
|
+
* @param {DoctorContext} ctx
|
|
629
|
+
* @returns {DoctorCheck | null}
|
|
630
|
+
*/
|
|
631
|
+
export function checkCoreStylesheets(ctx) {
|
|
632
|
+
if (!ctx.coreDir) return null;
|
|
633
|
+
const root = projectRootOf(ctx);
|
|
634
|
+
const label = "Core's component styles loaded";
|
|
635
|
+
const {file, unparsed} = coreStylesheetLoad(root);
|
|
636
|
+
if (file) {
|
|
637
|
+
return {
|
|
638
|
+
id: 'core-stylesheets',
|
|
639
|
+
label,
|
|
640
|
+
status: 'pass',
|
|
641
|
+
message: `${path.relative(root, file) || file} loads ${CORE_STYLESHEET}, Core's component styles.`,
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
const setup = sourceBuildSetup(root);
|
|
645
|
+
if (setup) {
|
|
646
|
+
return {
|
|
647
|
+
id: 'core-stylesheets',
|
|
648
|
+
label,
|
|
649
|
+
status: 'info',
|
|
650
|
+
message: `Not checked: this app compiles Core's styles from source (${setup}), so it does not need ${CORE_STYLESHEET}.`,
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
return {
|
|
654
|
+
id: 'core-stylesheets',
|
|
655
|
+
label,
|
|
656
|
+
status: 'warn',
|
|
657
|
+
message: `Found nothing in project source, stylesheets or pages that imports or links ${CORE_STYLESHEET}, Core's component styles. Without them, Astryx components render unstyled.${unparsed ? ` ${unparsed} source file(s) that name it could not be parsed.` : ''}`,
|
|
658
|
+
fix: "Import Core's stylesheets once, in the app's global stylesheet: `@import '@astryxdesign/core/reset.css';` then `@import '@astryxdesign/core/astryx.css';`. Or import both in the app's entry module, reset.css first.",
|
|
659
|
+
};
|
|
660
|
+
}
|
|
661
|
+
|
|
362
662
|
/**
|
|
363
663
|
* The active base is installed and resolvable, in a project whose base is
|
|
364
664
|
* not Core. A project on Core has {@link checkCoreInstalled} instead.
|
|
@@ -665,8 +965,8 @@ export function checkImplicitIntegrations(ctx) {
|
|
|
665
965
|
'themes',
|
|
666
966
|
'docs',
|
|
667
967
|
'codemods',
|
|
668
|
-
// An experimental root counts only
|
|
669
|
-
...(ctx.iconSets
|
|
968
|
+
// An experimental root counts only where icon features are on.
|
|
969
|
+
...(ctx.iconSets ? ['iconSets'] : []),
|
|
670
970
|
].filter(root => integration[/** @type {'components'} */ (root)]);
|
|
671
971
|
const missing = declared.filter(root => {
|
|
672
972
|
const dir = integration[/** @type {'components'} */ (root)];
|
|
@@ -868,6 +1168,21 @@ export function checkAgentDocs(ctx) {
|
|
|
868
1168
|
? `${refusal} Move the project into a folder of its own, or edit the Astryx block in its agent file by hand.`
|
|
869
1169
|
: initFix;
|
|
870
1170
|
|
|
1171
|
+
// A project that keeps its Astryx guidance as a skill (astryx.config
|
|
1172
|
+
// `skills.to` without `agents-md`): its agent files are its own text, and
|
|
1173
|
+
// the skill-places check judges its skill files.
|
|
1174
|
+
const places = ctx.skillPlaces?.places ?? ['agents-md'];
|
|
1175
|
+
if (ctx.skillPlaces && !places.includes('agents-md')) {
|
|
1176
|
+
const astryx = ctx.skillPlaces.files.filter(
|
|
1177
|
+
file => file.state === 'current' || file.state === 'differs' || file.state === 'edited',
|
|
1178
|
+
);
|
|
1179
|
+
return {
|
|
1180
|
+
id: 'agent-docs',
|
|
1181
|
+
label: 'AI agent docs',
|
|
1182
|
+
status: astryx.length > 0 ? 'pass' : 'info',
|
|
1183
|
+
message: `The project keeps its Astryx guidance as a skill (astryx.config skills.to: ${places.join(', ')})${astryx.length > 0 ? `, in ${astryx.map(file => file.path).join(', ')}` : ''}; the skill-places check reports whether each file is there and current.`,
|
|
1184
|
+
};
|
|
1185
|
+
}
|
|
871
1186
|
if (present.length === 0) {
|
|
872
1187
|
return {
|
|
873
1188
|
id: 'agent-docs',
|
|
@@ -947,6 +1262,149 @@ export function checkAgentDocs(ctx) {
|
|
|
947
1262
|
};
|
|
948
1263
|
}
|
|
949
1264
|
|
|
1265
|
+
/**
|
|
1266
|
+
* The project's skill places (astryx.config `skills.to`): each file of a
|
|
1267
|
+
* saved `skills` or folder place against this release's project skill, a
|
|
1268
|
+
* project that holds both the block and the skill (agents read Astryx twice),
|
|
1269
|
+
* and a project skill named `astryx`, the computer-level skill's name, which
|
|
1270
|
+
* an agent shows in place of one of the two. Left out of a project that keeps
|
|
1271
|
+
* only the AGENTS.md block and has no project skill.
|
|
1272
|
+
* @param {DoctorContext} ctx
|
|
1273
|
+
* @returns {DoctorCheck | null}
|
|
1274
|
+
*/
|
|
1275
|
+
export function checkSkillPlaces(ctx) {
|
|
1276
|
+
const report = ctx.skillPlaces;
|
|
1277
|
+
if (!report) return null;
|
|
1278
|
+
const blockOnly = report.places.length === 1 && report.places[0] === 'agents-md';
|
|
1279
|
+
if (
|
|
1280
|
+
blockOnly &&
|
|
1281
|
+
report.skillFiles.length === 0 &&
|
|
1282
|
+
report.plainNamed.length === 0 &&
|
|
1283
|
+
report.skillProblems.length === 0
|
|
1284
|
+
) {
|
|
1285
|
+
return null;
|
|
1286
|
+
}
|
|
1287
|
+
const base = {id: 'skill-places', label: 'Astryx skill places'};
|
|
1288
|
+
const init = (/** @type {string} */ args) => `\`${formatCliCommand(`astryx init ${args}`.trim(), ctx.cwd)}\``;
|
|
1289
|
+
const saved = report.places.join(',');
|
|
1290
|
+
if (report.renderError) {
|
|
1291
|
+
return {
|
|
1292
|
+
...base,
|
|
1293
|
+
status: 'warn',
|
|
1294
|
+
message: `The Astryx skill could not be rendered, so its files were not checked: ${firstLine(report.renderError)}`,
|
|
1295
|
+
fix: `Fix what the message names, then run ${init('')}.`,
|
|
1296
|
+
};
|
|
1297
|
+
}
|
|
1298
|
+
if (report.plainNamed.length > 0) {
|
|
1299
|
+
return {
|
|
1300
|
+
...base,
|
|
1301
|
+
status: 'warn',
|
|
1302
|
+
message: `${report.plainNamed.join(', ')} ${report.plainNamed.length === 1 ? 'is a project skill' : 'are project skills'} named \`astryx\`, the name of the computer-level skill, so an agent that has both shows only one, and Claude Code shows the computer one.`,
|
|
1303
|
+
fix: `Delete ${report.plainNamed.length === 1 ? 'it' : 'them'}; ${init('--to skills')} writes the project skill as \`astryx-project\`.`,
|
|
1304
|
+
};
|
|
1305
|
+
}
|
|
1306
|
+
const leftOutNote =
|
|
1307
|
+
report.skillProblems.length > 0
|
|
1308
|
+
? ` Skills left out: ${report.skillProblems.map(problem => `${problem.package}: ${problem.message}`).join(' ')}`
|
|
1309
|
+
: '';
|
|
1310
|
+
const savesBlock = report.places.includes('agents-md');
|
|
1311
|
+
const savesSkill = report.places.some(place => place !== 'agents-md');
|
|
1312
|
+
// Both saved is the person's choice: the note in the pass line says so.
|
|
1313
|
+
const doubled =
|
|
1314
|
+
report.blockFiles.length > 0 && report.skillFiles.length > 0 && !(savesBlock && savesSkill);
|
|
1315
|
+
if (doubled) {
|
|
1316
|
+
return {
|
|
1317
|
+
...base,
|
|
1318
|
+
status: 'warn',
|
|
1319
|
+
message: `The Astryx guidance is here twice: as the block in ${report.blockFiles.join(', ')} and as the skill in ${report.skillFiles.join(', ')}, so agents read it twice.`,
|
|
1320
|
+
fix: savesSkill
|
|
1321
|
+
? `The project saves ${saved}: remove the Astryx block from ${report.blockFiles.join(', ')} by hand, or run ${init('--to agents-md')} to keep only the block (it removes the skill copies).`
|
|
1322
|
+
: `The project saves agents-md: delete ${report.skillFiles.join(', ')}, or run ${init('--to skills')} to keep only the skill (it removes the block).`,
|
|
1323
|
+
};
|
|
1324
|
+
}
|
|
1325
|
+
// The two copies of a place are one skill: one a person's own and the other
|
|
1326
|
+
// Astryx's means agents read two different texts.
|
|
1327
|
+
// Grouped by place and skill: the project skill and each integration skill
|
|
1328
|
+
// have copies of their own.
|
|
1329
|
+
/** @param {{place: string, skill?: string}} file */
|
|
1330
|
+
const copiesOf = file => `${file.place}\0${file.skill ?? ''}`;
|
|
1331
|
+
const splitKeys = [...new Set(report.files.map(copiesOf))].filter(key => {
|
|
1332
|
+
const states = report.files.filter(file => copiesOf(file) === key).map(file => file.state);
|
|
1333
|
+
return (
|
|
1334
|
+
states.some(state => state === 'edited' || state === 'foreign') &&
|
|
1335
|
+
states.some(state => state === 'current' || state === 'differs' || state === 'absent')
|
|
1336
|
+
);
|
|
1337
|
+
});
|
|
1338
|
+
if (splitKeys.length > 0) {
|
|
1339
|
+
const files = report.files.filter(file => splitKeys.includes(copiesOf(file)));
|
|
1340
|
+
const names = splitKeys.map(key => {
|
|
1341
|
+
const [place, skill] = key.split('\0');
|
|
1342
|
+
return skill ? `${skill} in ${place}` : place;
|
|
1343
|
+
});
|
|
1344
|
+
return {
|
|
1345
|
+
...base,
|
|
1346
|
+
status: 'warn',
|
|
1347
|
+
message: `The copies of ${names.join(', ')} differ: ${files.map(file => `${file.path} (${file.state === 'edited' ? 'edited' : file.state === 'foreign' ? 'not written by Astryx' : file.state === 'absent' ? 'missing' : 'Astryx\'s'})`).join(', ')}, so agents read different texts.`,
|
|
1348
|
+
fix: 'Make the copies the same: copy your file over the other, or delete both and run ' + init('') + '.',
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
if (report.linkedOut.length > 0) {
|
|
1352
|
+
return {
|
|
1353
|
+
...base,
|
|
1354
|
+
status: 'warn',
|
|
1355
|
+
message: `Not checked: ${report.linkedOut.join(' ')}`,
|
|
1356
|
+
fix: `Make each folder a real folder inside the project, or choose another place with ${init('--to <places>')}.`,
|
|
1357
|
+
};
|
|
1358
|
+
}
|
|
1359
|
+
const missing = report.files.filter(file => file.state === 'absent');
|
|
1360
|
+
const stale = report.files.filter(file => file.state === 'differs');
|
|
1361
|
+
const kept = report.files.filter(file => file.state === 'edited' || file.state === 'foreign');
|
|
1362
|
+
const leftoverNote =
|
|
1363
|
+
report.leftovers.length > 0
|
|
1364
|
+
? ` Skills Astryx wrote for an integration this project no longer has: ${report.leftovers.join(', ')}; \`${formatCliCommand('upgrade --from <old version> --apply', ctx.cwd)}\` or ${init('')} removes them.`
|
|
1365
|
+
: '';
|
|
1366
|
+
const keptNote =
|
|
1367
|
+
kept.length > 0
|
|
1368
|
+
? ` Kept as they are (edited, or not written by Astryx): ${kept.map(file => file.path).join(', ')}.`
|
|
1369
|
+
: '';
|
|
1370
|
+
const bothNote =
|
|
1371
|
+
report.blockFiles.length > 0 && report.skillFiles.length > 0
|
|
1372
|
+
? ` The project saves both the block and the skill (${saved}), so agents that read both get it twice.`
|
|
1373
|
+
: '';
|
|
1374
|
+
const codexNote = report.computerSkill && report.skillsFolderFiles.length > 0
|
|
1375
|
+
? ' This computer also has the computer-level `astryx` skill, so Codex lists both skills.'
|
|
1376
|
+
: '';
|
|
1377
|
+
if (missing.length > 0 || stale.length > 0 || report.leftovers.length > 0) {
|
|
1378
|
+
const missingNote =
|
|
1379
|
+
missing.length > 0 ? ` An Astryx skill is missing from ${missing.map(file => file.path).join(', ')}.` : '';
|
|
1380
|
+
const staleNote =
|
|
1381
|
+
stale.length > 0 ? ` The Astryx skill is from another release in ${stale.map(file => file.path).join(', ')}.` : '';
|
|
1382
|
+
return {
|
|
1383
|
+
...base,
|
|
1384
|
+
status: 'warn',
|
|
1385
|
+
message: `${(missingNote + staleNote).trim()}${keptNote}${leftoverNote}${codexNote}${leftOutNote}`,
|
|
1386
|
+
fix: `Run ${init('')}: it writes every saved place again, and is the refresh after an integration changes (\`${formatCliCommand('upgrade --from <old version> --apply', ctx.cwd)}\` also refreshes them after an Astryx update).${leftOutNote ? ' For a skill left out, its package fixes the `skill` its note names.' : ''}`,
|
|
1387
|
+
};
|
|
1388
|
+
}
|
|
1389
|
+
const current = report.files.filter(file => file.state === 'current');
|
|
1390
|
+
if (leftOutNote) {
|
|
1391
|
+
return {
|
|
1392
|
+
...base,
|
|
1393
|
+
status: 'warn',
|
|
1394
|
+
message: `${leftOutNote.trim()}${keptNote}${codexNote}`,
|
|
1395
|
+
fix: 'Its package fixes the `skill` each note names; until then agents get no line or skill for it.',
|
|
1396
|
+
};
|
|
1397
|
+
}
|
|
1398
|
+
return {
|
|
1399
|
+
...base,
|
|
1400
|
+
status: kept.length > 0 && current.length === 0 ? 'info' : 'pass',
|
|
1401
|
+
message:
|
|
1402
|
+
current.length > 0
|
|
1403
|
+
? `The Astryx skill matches this release in ${current.map(file => file.path).join(', ')}.${keptNote}${leftoverNote}${bothNote}${codexNote}`
|
|
1404
|
+
: `Saved places: ${report.places.join(', ')}.${keptNote}${bothNote}${codexNote}`,
|
|
1405
|
+
};
|
|
1406
|
+
}
|
|
1407
|
+
|
|
950
1408
|
/**
|
|
951
1409
|
* Check 8 — @astryxdesign/core peer dependencies are satisfied by installed packages.
|
|
952
1410
|
* @param {DoctorContext} ctx
|
|
@@ -1018,7 +1476,14 @@ export function checkPeerDeps(ctx) {
|
|
|
1018
1476
|
label: '@astryxdesign/core peer dependencies',
|
|
1019
1477
|
status: 'warn',
|
|
1020
1478
|
message: `Peer dependency issues — ${problems.join('; ')}.`,
|
|
1021
|
-
fix: `Install compatible peers:
|
|
1479
|
+
fix: `Install compatible peers: ${peerInstallText(
|
|
1480
|
+
ctx.cwd,
|
|
1481
|
+
[
|
|
1482
|
+
...missing.map(spec => spec.replace(/^(@?[^@]+)@.*$/, '$1')),
|
|
1483
|
+
...mismatched.map(m => m.name),
|
|
1484
|
+
],
|
|
1485
|
+
targets,
|
|
1486
|
+
)}.`,
|
|
1022
1487
|
};
|
|
1023
1488
|
}
|
|
1024
1489
|
|
|
@@ -1152,9 +1617,10 @@ export function checkIntegrationCoreRange(ctx) {
|
|
|
1152
1617
|
* names a set, main or backup, that is not installed, that is installed but
|
|
1153
1618
|
* withdrawn (with why), or that two packages ship under one name; and when
|
|
1154
1619
|
* more than one set is installed and the list leaves one out. Warns for each
|
|
1155
|
-
* other installed set that was withdrawn, with why
|
|
1156
|
-
*
|
|
1157
|
-
*
|
|
1620
|
+
* other installed set that was withdrawn, with why, and for each `map` key
|
|
1621
|
+
* of an installed set that names a replaced definition.
|
|
1622
|
+
* Icon sets are experimental (spec:AST-017 FR27): only a project where the
|
|
1623
|
+
* icon feature gate is on gets the check, so every other report is unchanged.
|
|
1158
1624
|
* @param {DoctorContext} ctx
|
|
1159
1625
|
* @returns {DoctorCheck | null}
|
|
1160
1626
|
*/
|
|
@@ -1164,12 +1630,16 @@ export function checkIconSets(ctx) {
|
|
|
1164
1630
|
const label = 'Icon sets';
|
|
1165
1631
|
if (state == null) return null;
|
|
1166
1632
|
const {sets, withdrawn, choice} = state;
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1633
|
+
const list = choice.configured
|
|
1634
|
+
? [
|
|
1635
|
+
{
|
|
1636
|
+
selector: choice.configured,
|
|
1637
|
+
status: choice.status,
|
|
1638
|
+
reason: choice.reason,
|
|
1639
|
+
},
|
|
1640
|
+
...(choice.backups ?? []),
|
|
1641
|
+
]
|
|
1642
|
+
: [];
|
|
1173
1643
|
const installFix =
|
|
1174
1644
|
'Install the package that ships the set, or remove it from experimental.iconSet in astryx.config (`astryx experimental icon --list` names the installed sets).';
|
|
1175
1645
|
const missing = list.filter(each => each.status === 'missing');
|
|
@@ -1211,8 +1681,8 @@ export function checkIconSets(ctx) {
|
|
|
1211
1681
|
status: 'fail',
|
|
1212
1682
|
message:
|
|
1213
1683
|
declared.length === 0
|
|
1214
|
-
? `experimental.iconVariant names "${choice.variant}", but the main set ${choice.configured} declares no variants: it draws one look.`
|
|
1215
|
-
: `experimental.iconVariant names "${choice.variant}", but the main set ${choice.configured} declares no such variant. Its variants: ${declared.join(', ')}.`,
|
|
1684
|
+
? `experimental.iconVariant names "${choice.variant}", but the main set ${choice.configured ?? choice.set.name} declares no variants: it draws one look.`
|
|
1685
|
+
: `experimental.iconVariant names "${choice.variant}", but the main set ${choice.configured ?? choice.set.name} declares no such variant. Its variants: ${declared.join(', ')}.`,
|
|
1216
1686
|
fix:
|
|
1217
1687
|
declared.length === 0
|
|
1218
1688
|
? `Remove experimental.iconVariant: run \`${iconUseCommandOf(choice)}\`.`
|
|
@@ -1247,6 +1717,23 @@ export function checkIconSets(ctx) {
|
|
|
1247
1717
|
fix: 'Run `astryx integration check` in the package that ships the set, or install its module.',
|
|
1248
1718
|
};
|
|
1249
1719
|
}
|
|
1720
|
+
// A `map` key that names a replaced definition still maps its successor,
|
|
1721
|
+
// so nothing breaks; the set's own package renames the key.
|
|
1722
|
+
const renamed = sets.flatMap(set =>
|
|
1723
|
+
(set.replacedKeys ?? []).map(
|
|
1724
|
+
each =>
|
|
1725
|
+
`${set.package}/${set.name} maps "${each.key}", which "${each.definition}" replaced`,
|
|
1726
|
+
),
|
|
1727
|
+
);
|
|
1728
|
+
if (renamed.length > 0) {
|
|
1729
|
+
return {
|
|
1730
|
+
id,
|
|
1731
|
+
label,
|
|
1732
|
+
status: 'warn',
|
|
1733
|
+
message: `${renamed.join(' | ')}. Each entry maps the definition that replaced it.`,
|
|
1734
|
+
fix: 'In the package that ships the set, rename each map key to the definition that replaced it (any `astryx experimental icon map` run there writes it), or install a release of the package that has.',
|
|
1735
|
+
};
|
|
1736
|
+
}
|
|
1250
1737
|
return {
|
|
1251
1738
|
id,
|
|
1252
1739
|
label,
|
|
@@ -1263,22 +1750,36 @@ export function checkIconSets(ctx) {
|
|
|
1263
1750
|
*/
|
|
1264
1751
|
function iconUseCommandOf(choice, variant) {
|
|
1265
1752
|
return iconUseCommand(
|
|
1266
|
-
/** @type {string} */ (choice.configured),
|
|
1753
|
+
/** @type {string} */ (choice.configured ?? choice.set?.name),
|
|
1267
1754
|
(choice.backups ?? []).map(each => each.selector),
|
|
1268
1755
|
variant,
|
|
1269
1756
|
);
|
|
1270
1757
|
}
|
|
1271
1758
|
|
|
1759
|
+
/**
|
|
1760
|
+
* The main set the placeholder fixes name: the one `experimental.iconSet`
|
|
1761
|
+
* names, else the only installed set; null when no main set is decided or
|
|
1762
|
+
* icon features are off. The placeholder check, and the source scan it
|
|
1763
|
+
* reads, run only when there is one.
|
|
1764
|
+
* @param {DoctorContext['iconSets']} iconSets
|
|
1765
|
+
* @returns {string | null}
|
|
1766
|
+
*/
|
|
1767
|
+
export function placeholderMainSet(iconSets) {
|
|
1768
|
+
return iconSets?.choice.configured ?? iconSets?.choice.set?.name ?? null;
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1272
1771
|
/**
|
|
1273
1772
|
* The placeholder component for a missing icon, still in the project's own
|
|
1274
1773
|
* source (AST-084): each file and the meanings it stands for, with the commands that give each a
|
|
1275
|
-
* real icon. Only a project
|
|
1774
|
+
* real icon. Only a project where the icon feature gate is on, and whose
|
|
1775
|
+
* main set is decided, gets the check.
|
|
1276
1776
|
* @param {DoctorContext} ctx
|
|
1277
1777
|
* @returns {DoctorCheck | null}
|
|
1278
1778
|
*/
|
|
1279
1779
|
export function checkIconPlaceholders(ctx) {
|
|
1280
1780
|
const choice = ctx.iconSets?.choice;
|
|
1281
|
-
|
|
1781
|
+
const main = placeholderMainSet(ctx.iconSets);
|
|
1782
|
+
if (!choice || !main || ctx.iconPlaceholders == null) return null;
|
|
1282
1783
|
const id = 'icon-placeholders';
|
|
1283
1784
|
const label = 'Placeholder icons';
|
|
1284
1785
|
const found = ctx.iconPlaceholders;
|
|
@@ -1290,7 +1791,6 @@ export function checkIconPlaceholders(ctx) {
|
|
|
1290
1791
|
message: 'No copied code uses the placeholder for a missing icon.',
|
|
1291
1792
|
};
|
|
1292
1793
|
}
|
|
1293
|
-
const main = choice.configured;
|
|
1294
1794
|
const meanings = [
|
|
1295
1795
|
...new Set(found.flatMap(each => each.meanings ?? [])),
|
|
1296
1796
|
].sort();
|
|
@@ -1316,6 +1816,218 @@ export function checkIconPlaceholders(ctx) {
|
|
|
1316
1816
|
};
|
|
1317
1817
|
}
|
|
1318
1818
|
|
|
1819
|
+
/** How many props the warning names before it counts the rest. */
|
|
1820
|
+
const PROPS_NAMED = 8;
|
|
1821
|
+
|
|
1822
|
+
/**
|
|
1823
|
+
* The props the project's own source gives Core components that the
|
|
1824
|
+
* component does not take (see `findUnknownCoreProps`): each with its file,
|
|
1825
|
+
* line and component, and a documented prop with the same words when there
|
|
1826
|
+
* is one. A prop a component does not take does nothing, and unless the build
|
|
1827
|
+
* type-checks, no build step reports it.
|
|
1828
|
+
* When the project has no TypeScript to read Core's types with, the check
|
|
1829
|
+
* says it did not run.
|
|
1830
|
+
* @param {DoctorContext} ctx
|
|
1831
|
+
* @returns {DoctorCheck | null}
|
|
1832
|
+
*/
|
|
1833
|
+
export function checkCoreProps(ctx) {
|
|
1834
|
+
const scan = ctx.coreProps;
|
|
1835
|
+
if (scan == null) return null;
|
|
1836
|
+
const id = 'core-props';
|
|
1837
|
+
const label = 'Core props';
|
|
1838
|
+
if (scan.skipped) return {id, label, status: 'info', message: `Not checked: ${scan.skipped}`};
|
|
1839
|
+
const count = scan.found.length;
|
|
1840
|
+
if (count === 0) {
|
|
1841
|
+
return {
|
|
1842
|
+
id,
|
|
1843
|
+
label,
|
|
1844
|
+
status: 'pass',
|
|
1845
|
+
message: `No prop was found that a Core component does not take (${scan.uses} prop${scan.uses === 1 ? '' : 's'} read).`,
|
|
1846
|
+
};
|
|
1847
|
+
}
|
|
1848
|
+
const named = scan.found
|
|
1849
|
+
.slice(0, PROPS_NAMED)
|
|
1850
|
+
.map(
|
|
1851
|
+
use =>
|
|
1852
|
+
`${use.file}:${use.line} ${use.component} has no \`${use.prop}\`${use.suggestion ? ` (did you mean \`${use.suggestion}\`?)` : ''}`,
|
|
1853
|
+
);
|
|
1854
|
+
const rest = count - named.length;
|
|
1855
|
+
return {
|
|
1856
|
+
id,
|
|
1857
|
+
label,
|
|
1858
|
+
status: 'warn',
|
|
1859
|
+
message: `${count} prop${count === 1 ? '' : 's'} a Core component does not take: ${named.join(', ')}${rest > 0 ? `, and ${rest} more` : ''}.`,
|
|
1860
|
+
fix: 'Give each component a prop it takes: `astryx component <Name>` lists them. A prop the component does not take does nothing.',
|
|
1861
|
+
};
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
/** The most buttons a warning names before it counts the rest. */
|
|
1865
|
+
const BUTTONS_NAMED = 8;
|
|
1866
|
+
|
|
1867
|
+
/**
|
|
1868
|
+
* The Core buttons in the project's own source that do nothing when pressed:
|
|
1869
|
+
* a `Button` or `IconButton` from `@astryxdesign/core` with no `onClick`,
|
|
1870
|
+
* `clickAction`, `href`, or `submit` or `reset` type, or with an empty
|
|
1871
|
+
* handler or a link that goes nowhere (`#`), where nothing around it acts on
|
|
1872
|
+
* a press (see
|
|
1873
|
+
* foundation/discovery/button-actions.mjs). A warning: a person who presses
|
|
1874
|
+
* one gets nothing, and the build still works. Each is named by its file,
|
|
1875
|
+
* line and label.
|
|
1876
|
+
* @param {DoctorContext} ctx
|
|
1877
|
+
* @returns {DoctorCheck | null}
|
|
1878
|
+
*/
|
|
1879
|
+
export function checkButtonActions(ctx) {
|
|
1880
|
+
const scan = ctx.buttonActions;
|
|
1881
|
+
if (scan == null) return null;
|
|
1882
|
+
const id = 'button-actions';
|
|
1883
|
+
const label = 'Button actions';
|
|
1884
|
+
const count = scan.found.length;
|
|
1885
|
+
if (scan.incomplete) {
|
|
1886
|
+
return {
|
|
1887
|
+
id,
|
|
1888
|
+
label,
|
|
1889
|
+
status: 'info',
|
|
1890
|
+
message: `Not checked: the project has more source files than doctor reads (${scan.files} read), so it cannot tell where each component is rendered.`,
|
|
1891
|
+
};
|
|
1892
|
+
}
|
|
1893
|
+
if (scan.domListener) {
|
|
1894
|
+
return {
|
|
1895
|
+
id,
|
|
1896
|
+
label,
|
|
1897
|
+
status: 'info',
|
|
1898
|
+
message: `Not checked: \`${scan.domListener}\` may listen for a press through the DOM, so a script may act on a button in a way doctor cannot read.`,
|
|
1899
|
+
};
|
|
1900
|
+
}
|
|
1901
|
+
if (count === 0) {
|
|
1902
|
+
return {
|
|
1903
|
+
id,
|
|
1904
|
+
label,
|
|
1905
|
+
status: 'pass',
|
|
1906
|
+
message: `No Astryx button that does nothing when pressed (${scan.files} source file${scan.files === 1 ? '' : 's'} read).`,
|
|
1907
|
+
};
|
|
1908
|
+
}
|
|
1909
|
+
const named = scan.found.slice(0, BUTTONS_NAMED).map(
|
|
1910
|
+
button =>
|
|
1911
|
+
`${button.file}:${button.line} ${button.label == null ? button.component : `"${button.label}"`}${button.note ? ` (${button.note})` : ''}`,
|
|
1912
|
+
);
|
|
1913
|
+
const rest = count - named.length;
|
|
1914
|
+
return {
|
|
1915
|
+
id,
|
|
1916
|
+
label,
|
|
1917
|
+
status: 'warn',
|
|
1918
|
+
message: `${count} button${count === 1 ? '' : 's'} ${count === 1 ? 'does' : 'do'} nothing when pressed: ${named.join(', ')}${rest > 0 ? `, and ${rest} more` : ''}.`,
|
|
1919
|
+
fix: 'Give each one an action: `onClick` (or `clickAction` for async work), a real `href` in place of a placeholder, or `type="submit"` inside a form. If it has no action yet, disable it with `isDisabled` or remove it: an empty handler still does nothing.',
|
|
1920
|
+
};
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
/**
|
|
1924
|
+
* The icon imports in the project's own source that do not match its icon
|
|
1925
|
+
* sets (AST-084): each file and import, with the icon of the list that draws
|
|
1926
|
+
* the same meaning. An import from a set the list leaves out, or from a set
|
|
1927
|
+
* later in the list than one that draws the same meaning, still renders, so
|
|
1928
|
+
* the check warns, as for a placeholder. An icon-named import of a package
|
|
1929
|
+
* that does not resolve and that package.json does not declare (a set the
|
|
1930
|
+
* project uninstalled) breaks the build, so the check fails, as `icon-sets`
|
|
1931
|
+
* fails for a set the list names that is not installed. Only a project where
|
|
1932
|
+
* the icon feature gate is on, and whose main set is decided, gets the check.
|
|
1933
|
+
* @param {DoctorContext} ctx
|
|
1934
|
+
* @returns {DoctorCheck | null}
|
|
1935
|
+
*/
|
|
1936
|
+
export function checkIconImports(ctx) {
|
|
1937
|
+
const choice = ctx.iconSets?.choice;
|
|
1938
|
+
const main = choice?.configured ?? choice?.set?.name;
|
|
1939
|
+
if (!choice || !main || ctx.iconImports == null) return null;
|
|
1940
|
+
const id = 'icon-imports';
|
|
1941
|
+
const label = 'Icon imports';
|
|
1942
|
+
const found = ctx.iconImports;
|
|
1943
|
+
if (found.length === 0) {
|
|
1944
|
+
return {
|
|
1945
|
+
id,
|
|
1946
|
+
label,
|
|
1947
|
+
status: 'pass',
|
|
1948
|
+
message:
|
|
1949
|
+
'Every icon import in your code comes from the set your list picks for it.',
|
|
1950
|
+
};
|
|
1951
|
+
}
|
|
1952
|
+
const missing = found.flatMap(({file, imports}) =>
|
|
1953
|
+
imports
|
|
1954
|
+
.filter(each => each.why === 'unresolved')
|
|
1955
|
+
.map(each => ({file, ...each})),
|
|
1956
|
+
);
|
|
1957
|
+
const other = found.flatMap(({file, imports}) =>
|
|
1958
|
+
imports
|
|
1959
|
+
.filter(each => each.why !== 'unresolved')
|
|
1960
|
+
.map(each => ({file, ...each})),
|
|
1961
|
+
);
|
|
1962
|
+
/**
|
|
1963
|
+
* Each file once, its imports grouped by the module they come from and the
|
|
1964
|
+
* module that replaces them: `file (from → to: Old → New, …; from: Old
|
|
1965
|
+
* (why), …)`.
|
|
1966
|
+
* @param {typeof other} rows
|
|
1967
|
+
*/
|
|
1968
|
+
const byFile = rows => {
|
|
1969
|
+
/** @type {Map<string, Map<string, string[]>>} */
|
|
1970
|
+
const files = new Map();
|
|
1971
|
+
for (const row of rows) {
|
|
1972
|
+
const groups = files.get(row.file) ?? new Map();
|
|
1973
|
+
const group = row.replacement
|
|
1974
|
+
? `${row.module} → ${row.replacement.module}`
|
|
1975
|
+
: row.module;
|
|
1976
|
+
const names = groups.get(group) ?? [];
|
|
1977
|
+
const name = row.replacement
|
|
1978
|
+
? `${row.export} → ${row.replacement.export}`
|
|
1979
|
+
: row.why === 'unresolved'
|
|
1980
|
+
? row.export
|
|
1981
|
+
: `${row.export} (${row.definitions.length > 0 ? `no set in your list has "${row.definitions.join('", "')}"` : 'its set maps it to no Astryx meaning'})`;
|
|
1982
|
+
if (!names.includes(name)) names.push(name);
|
|
1983
|
+
groups.set(group, names);
|
|
1984
|
+
files.set(row.file, groups);
|
|
1985
|
+
}
|
|
1986
|
+
return [...files]
|
|
1987
|
+
.map(
|
|
1988
|
+
([file, groups]) =>
|
|
1989
|
+
`${file} (${[...groups]
|
|
1990
|
+
.map(([group, names]) => `${group}: ${names.join(', ')}`)
|
|
1991
|
+
.join('; ')})`,
|
|
1992
|
+
)
|
|
1993
|
+
.join(', ');
|
|
1994
|
+
};
|
|
1995
|
+
/** @param {number} n @param {string} what */
|
|
1996
|
+
const count = (n, what) => `${n} ${what}${n === 1 ? '' : 's'}`;
|
|
1997
|
+
/** @param {typeof other} rows */
|
|
1998
|
+
const fileCount = rows => new Set(rows.map(row => row.file)).size;
|
|
1999
|
+
const parts = [];
|
|
2000
|
+
if (missing.length > 0) {
|
|
2001
|
+
parts.push(
|
|
2002
|
+
`${count(missing.length, 'icon import')} in ${count(fileCount(missing), 'file')} name a package that is not installed, so the build fails: ${byFile(missing)}.`,
|
|
2003
|
+
);
|
|
2004
|
+
}
|
|
2005
|
+
if (other.length > 0) {
|
|
2006
|
+
const sets = [...new Set(other.map(row => row.set))].join(', ');
|
|
2007
|
+
parts.push(
|
|
2008
|
+
`${count(other.length, 'icon import')} in ${count(fileCount(other), 'file')} come from ${sets}, not the set your list (experimental.iconSet) picks for that meaning: ${byFile(other)}.`,
|
|
2009
|
+
);
|
|
2010
|
+
}
|
|
2011
|
+
const fixes = [];
|
|
2012
|
+
if (missing.length > 0) {
|
|
2013
|
+
fixes.push(
|
|
2014
|
+
'Replace each import of a package that is not installed with the icon `astryx experimental icon <meaning>` prints; or install that package again, and doctor names the icon of your list that draws the same meaning.',
|
|
2015
|
+
);
|
|
2016
|
+
}
|
|
2017
|
+
if (other.length > 0) {
|
|
2018
|
+
fixes.push(
|
|
2019
|
+
`Import each icon named after → from the module named after →. An icon with no → needs a set in your list that has its meaning, or your own choice of icon: \`${iconUseCommand(main, [...(choice.backups ?? []).map(each => each.selector), '<set>'], choice.variant)}\`.`,
|
|
2020
|
+
);
|
|
2021
|
+
}
|
|
2022
|
+
return {
|
|
2023
|
+
id,
|
|
2024
|
+
label,
|
|
2025
|
+
status: missing.length > 0 ? 'fail' : 'warn',
|
|
2026
|
+
message: parts.join(' '),
|
|
2027
|
+
fix: fixes.join(' '),
|
|
2028
|
+
};
|
|
2029
|
+
}
|
|
2030
|
+
|
|
1319
2031
|
/**
|
|
1320
2032
|
* Check 10 — report the detected package manager, and say so when the project's
|
|
1321
2033
|
* own declaration disagrees with what is on disk.
|
|
@@ -1373,6 +2085,35 @@ export function checkPackageManager(ctx) {
|
|
|
1373
2085
|
};
|
|
1374
2086
|
}
|
|
1375
2087
|
|
|
2088
|
+
const TWIN_PROVIDER_FIX =
|
|
2089
|
+
'Both manifests declare the same `providerId`. If they are one ' +
|
|
2090
|
+
'integration installed under two names, keep one of the two ' +
|
|
2091
|
+
'dependencies; if they are different integrations, give each its ' +
|
|
2092
|
+
'own `providerId` in astryx.integration.*.';
|
|
2093
|
+
const NAMED_PROVIDER_FIX =
|
|
2094
|
+
'Give each integration its own `providerId` in astryx.integration.*. ' +
|
|
2095
|
+
"A renamed package may keep its predecessor's ID only when the " +
|
|
2096
|
+
'predecessor is no longer installed.';
|
|
2097
|
+
|
|
2098
|
+
/**
|
|
2099
|
+
* The fix for a set of provider conflicts: the two-case advice for conflicts
|
|
2100
|
+
* where both manifests declare the ID, the rename advice for the rest, and
|
|
2101
|
+
* both, each named, when the project has some of each.
|
|
2102
|
+
* @param {ReadonlyArray<import('../../foundation/integrations/integrations.mjs').LoadedIntegration>} conflicts
|
|
2103
|
+
* @returns {string}
|
|
2104
|
+
*/
|
|
2105
|
+
function providerConflictFix(conflicts) {
|
|
2106
|
+
const twins = conflicts.filter(
|
|
2107
|
+
integration => integration.__providerConflict?.bothDeclare,
|
|
2108
|
+
).length;
|
|
2109
|
+
if (twins === conflicts.length) return TWIN_PROVIDER_FIX;
|
|
2110
|
+
if (twins === 0) return NAMED_PROVIDER_FIX;
|
|
2111
|
+
return (
|
|
2112
|
+
`Where both manifests declare the ID: ${TWIN_PROVIDER_FIX} ` +
|
|
2113
|
+
`For the other conflicts: ${NAMED_PROVIDER_FIX}`
|
|
2114
|
+
);
|
|
2115
|
+
}
|
|
2116
|
+
|
|
1376
2117
|
/**
|
|
1377
2118
|
* Check 6b — every contributing integration owns its provider identity.
|
|
1378
2119
|
*
|
|
@@ -1413,10 +2154,7 @@ export function checkProviderIdentity(ctx) {
|
|
|
1413
2154
|
message: conflicts
|
|
1414
2155
|
.map(integration => integration.__providerConflict?.message)
|
|
1415
2156
|
.join(' '),
|
|
1416
|
-
fix:
|
|
1417
|
-
'Give each integration its own `providerId` in astryx.integration.*. ' +
|
|
1418
|
-
"A renamed package may keep its predecessor's ID only when the " +
|
|
1419
|
-
'predecessor is no longer installed.',
|
|
2157
|
+
fix: providerConflictFix(conflicts),
|
|
1420
2158
|
};
|
|
1421
2159
|
}
|
|
1422
2160
|
|
|
@@ -1715,9 +2453,10 @@ export async function checkDocsTree(_ctx, options = {}) {
|
|
|
1715
2453
|
}
|
|
1716
2454
|
}
|
|
1717
2455
|
// Every link between docs names a doc that exists (spec:AST-047 FR9):
|
|
1718
|
-
// typed fields, reference and workflow blocks, and inline links
|
|
1719
|
-
//
|
|
1720
|
-
// Core leaves Core's docs out; a link
|
|
2456
|
+
// typed fields, reference and workflow blocks, and inline links, a
|
|
2457
|
+
// template description's included. A reference block also includes all
|
|
2458
|
+
// it names. A run whose base is not Core leaves Core's docs out; a link
|
|
2459
|
+
// to one of them is not a problem.
|
|
1721
2460
|
for (const node of tree.nodes.values()) {
|
|
1722
2461
|
for (const edge of typedEdges(tree, node).unresolved) {
|
|
1723
2462
|
problems.push(`${node.route}: ${edge}`);
|
|
@@ -1728,6 +2467,7 @@ export async function checkDocsTree(_ctx, options = {}) {
|
|
|
1728
2467
|
const absent = target =>
|
|
1729
2468
|
CORE_DOC_PROVIDERS.has(target.provider) && coreDocs.has(target.name);
|
|
1730
2469
|
problems.push(...(await docsLinkProblems(catalog, tree, {absent})));
|
|
2470
|
+
problems.push(...(await templateLinkProblems(catalog, {absent})));
|
|
1731
2471
|
problems.push(
|
|
1732
2472
|
...(await docsLinkProblems(catalog, tree, {references: true, absent})),
|
|
1733
2473
|
);
|
|
@@ -1888,6 +2628,46 @@ export function checkCliCommand(ctx) {
|
|
|
1888
2628
|
};
|
|
1889
2629
|
}
|
|
1890
2630
|
|
|
2631
|
+
/**
|
|
2632
|
+
* Install guidance: whether the loaded integrations agree on how this app
|
|
2633
|
+
* adds a dependency. Left out when none gives any.
|
|
2634
|
+
* @param {DoctorContext} ctx
|
|
2635
|
+
* @returns {DoctorCheck | null}
|
|
2636
|
+
*/
|
|
2637
|
+
export function checkInstallGuidance(ctx) {
|
|
2638
|
+
const id = 'install-guidance';
|
|
2639
|
+
const label = 'Install guidance';
|
|
2640
|
+
const {
|
|
2641
|
+
value: guidance,
|
|
2642
|
+
conflict,
|
|
2643
|
+
declared,
|
|
2644
|
+
} = chooseDeclaredValue(
|
|
2645
|
+
declaredValuesOf(ctx.integrations ?? [], 'installGuidance'),
|
|
2646
|
+
);
|
|
2647
|
+
if (conflict) {
|
|
2648
|
+
const claims = declared
|
|
2649
|
+
.map(entry => `${entry.package} (\`${entry.value}\`)`)
|
|
2650
|
+
.join(', ');
|
|
2651
|
+
return {
|
|
2652
|
+
id,
|
|
2653
|
+
label,
|
|
2654
|
+
status: 'warn',
|
|
2655
|
+
message: `Loaded integrations give different install guidance: ${claims}. Neither is used, so install steps use the package manager's command.`,
|
|
2656
|
+
fix: 'Remove the integration that does not belong here, or have every package give the same `installGuidance` in its astryx.integration manifest.',
|
|
2657
|
+
};
|
|
2658
|
+
}
|
|
2659
|
+
if (guidance) {
|
|
2660
|
+
const packages = declared.map(entry => entry.package).join(', ');
|
|
2661
|
+
return {
|
|
2662
|
+
id,
|
|
2663
|
+
label,
|
|
2664
|
+
status: 'pass',
|
|
2665
|
+
message: `Install steps follow the installGuidance of ${packages}: \`${guidance}\`.`,
|
|
2666
|
+
};
|
|
2667
|
+
}
|
|
2668
|
+
return null;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
1891
2671
|
/* ── outside a project: the computer ─────────────────────────────────── */
|
|
1892
2672
|
|
|
1893
2673
|
/**
|
|
@@ -1903,6 +2683,8 @@ export function checkCliCommand(ctx) {
|
|
|
1903
2683
|
* the person's choices about the computer-level agent text
|
|
1904
2684
|
* @property {string | null} [agentTextCommand] the command the skill file
|
|
1905
2685
|
* tells agents to run, or null
|
|
2686
|
+
* @property {Array<{path: string, state: import('../../foundation/agent-docs/managed-skill-file.mjs').ManagedFileState}>} [agentTextFolders]
|
|
2687
|
+
* each folder outside a project that `init --to <folder>` saved
|
|
1906
2688
|
* @property {string | null} [agentTextInstall] the install step the skill
|
|
1907
2689
|
* file records for when that command is not found, or null
|
|
1908
2690
|
* @property {string} [cwd] the folder doctor runs in, for the printed fix
|
|
@@ -1924,6 +2706,13 @@ export function checkCliCommand(ctx) {
|
|
|
1924
2706
|
* the integrations installed beside the running CLI
|
|
1925
2707
|
* @property {string[]} [loadedComputerIntegrations] the names of those that
|
|
1926
2708
|
* loaded outside a project
|
|
2709
|
+
* @property {Array<{package: string, severity: string, message: string}>} [computerIntegrationIssues]
|
|
2710
|
+
* the issues in the contributions of those that loaded
|
|
2711
|
+
* @property {((name: string) => string | null) | null} [integrationUpdate]
|
|
2712
|
+
* the command that updates one of them, beside a CLI installed for the
|
|
2713
|
+
* computer
|
|
2714
|
+
* @property {boolean} [integrationsUpdateWithTool] they sit in a tool's
|
|
2715
|
+
* package set, which updates them
|
|
1927
2716
|
* @property {string[]} [folderIntegrations] the names of the integrations the
|
|
1928
2717
|
* folder loads itself, whose copies win over the computer's
|
|
1929
2718
|
*/
|
|
@@ -2151,11 +2940,30 @@ export function checkComputerAgentText(ctx) {
|
|
|
2151
2940
|
label: 'Computer-level agent text',
|
|
2152
2941
|
status: /** @type {const} */ ('info'),
|
|
2153
2942
|
};
|
|
2943
|
+
const folders =
|
|
2944
|
+
ctx.agentTextFolders ??
|
|
2945
|
+
(state ? state.folders : []);
|
|
2946
|
+
const staleFolders = folders.filter(f => f.state === 'differs');
|
|
2947
|
+
const deletedFolders = folders.filter(f => f.state === 'absent');
|
|
2948
|
+
const keptFolders = folders.filter(f => f.state === 'edited' || f.state === 'foreign');
|
|
2949
|
+
const folderNote =
|
|
2950
|
+
(folders.length > 0
|
|
2951
|
+
? ` Also in the folders \`init --to\` saved: ${folders.map(f => f.path).join(', ')}.`
|
|
2952
|
+
: '') +
|
|
2953
|
+
(staleFolders.length > 0
|
|
2954
|
+
? ` From another release there: ${staleFolders.map(f => f.path).join(', ')}; the CLI installed for the computer refreshes them after its next upgrade, and \`${formatCliCommand('init --to <folder>', ctx.cwd)}\` writes one now.`
|
|
2955
|
+
: '') +
|
|
2956
|
+
(deletedFolders.length > 0
|
|
2957
|
+
? ` Deleted there, so not refreshed: ${deletedFolders.map(f => f.path).join(', ')}; \`${formatCliCommand('init --to <folder>', ctx.cwd)}\` writes one again.`
|
|
2958
|
+
: '') +
|
|
2959
|
+
(keptFolders.length > 0
|
|
2960
|
+
? ` Kept as they are (edited, or not written by Astryx): ${keptFolders.map(f => f.path).join(', ')}.`
|
|
2961
|
+
: '');
|
|
2154
2962
|
if (!settings.install) {
|
|
2155
2963
|
return {
|
|
2156
2964
|
...base,
|
|
2157
2965
|
message:
|
|
2158
|
-
|
|
2966
|
+
`The computer-level agent text is turned off (\`astryx init --user --remove-agents\`), so the CLI installed for the computer does not write it.${folderNote}`,
|
|
2159
2967
|
fix: `To turn it back on, run \`${formatCliCommand('astryx init --user', ctx.cwd)}\`.`,
|
|
2160
2968
|
};
|
|
2161
2969
|
}
|
|
@@ -2181,6 +2989,7 @@ export function checkComputerAgentText(ctx) {
|
|
|
2181
2989
|
.filter(l => l.state === 'absent' || l.state === 'differs')
|
|
2182
2990
|
.map(home);
|
|
2183
2991
|
const linkNote =
|
|
2992
|
+
folderNote +
|
|
2184
2993
|
(linked.length > 0 ? ` Linked into: ${linked.join(', ')}.` : '') +
|
|
2185
2994
|
(copied.length > 0 ? ` Copied into: ${copied.join(', ')}.` : '') +
|
|
2186
2995
|
(skipped.length > 0
|
|
@@ -2234,7 +3043,9 @@ export function checkComputerAgentText(ctx) {
|
|
|
2234
3043
|
/**
|
|
2235
3044
|
* The integrations installed for the computer (spec AST-081 FR12). Outside a
|
|
2236
3045
|
* project: each one that loads, and a warning for each that is skipped
|
|
2237
|
-
* because its peer ranges exclude the answering release,
|
|
3046
|
+
* because its peer ranges exclude the answering release, fails to load, or
|
|
3047
|
+
* has issues in its contributions. The everyday commands print one line for
|
|
3048
|
+
* such issues that points here.
|
|
2238
3049
|
* @param {ComputerContext} ctx
|
|
2239
3050
|
* @returns {DoctorCheck}
|
|
2240
3051
|
*/
|
|
@@ -2261,10 +3072,23 @@ export function checkComputerIntegrations(ctx) {
|
|
|
2261
3072
|
const used = rest.filter(c => !c.incompatible && loaded.has(c.name));
|
|
2262
3073
|
const skipped = rest.filter(c => c.incompatible);
|
|
2263
3074
|
const failed = rest.filter(c => !c.incompatible && !loaded.has(c.name));
|
|
3075
|
+
/** @type {Map<string, string[]>} the issue messages of each package */
|
|
3076
|
+
const issuesOf = new Map();
|
|
3077
|
+
for (const issue of ctx.computerIntegrationIssues ?? []) {
|
|
3078
|
+
issuesOf.set(issue.package, [
|
|
3079
|
+
...(issuesOf.get(issue.package) ?? []),
|
|
3080
|
+
issue.message,
|
|
3081
|
+
]);
|
|
3082
|
+
}
|
|
3083
|
+
const withIssues = used.filter(c => issuesOf.has(c.name));
|
|
2264
3084
|
const notes = [
|
|
2265
3085
|
used.length > 0
|
|
2266
3086
|
? `Used outside a project: ${used.map(label).join(', ')}.`
|
|
2267
3087
|
: '',
|
|
3088
|
+
...withIssues.map(c => {
|
|
3089
|
+
const messages = issuesOf.get(c.name) ?? [];
|
|
3090
|
+
return `${label(c)} has ${messages.length} integration issue${messages.length === 1 ? '' : 's'}: ${messages.join(' ')}`;
|
|
3091
|
+
}),
|
|
2268
3092
|
...shadowed.map(
|
|
2269
3093
|
c =>
|
|
2270
3094
|
`${label(c)} is not used here: this folder loads its own copy of ${c.name}.`,
|
|
@@ -2281,11 +3105,28 @@ export function checkComputerIntegrations(ctx) {
|
|
|
2281
3105
|
`run \`${formatCliCommand(`astryx doctor integration validate ${c.name}`, ctx.cwd)}\``,
|
|
2282
3106
|
),
|
|
2283
3107
|
];
|
|
3108
|
+
// The issues are in the package's own files: its maintainer fixes them, so
|
|
3109
|
+
// anyone else needs a newer release.
|
|
3110
|
+
const advice = withIssues.map(c => {
|
|
3111
|
+
const one = (issuesOf.get(c.name) ?? []).length === 1;
|
|
3112
|
+
const command = ctx.integrationUpdate?.(c.name) ?? null;
|
|
3113
|
+
const how = command
|
|
3114
|
+
? ` To get one, run \`${command}\`.`
|
|
3115
|
+
: ctx.integrationsUpdateWithTool
|
|
3116
|
+
? ' It updates with the tool that runs this CLI.'
|
|
3117
|
+
: '';
|
|
3118
|
+
return `If you maintain ${c.name}, the ${one ? 'fix in the issue is' : 'fixes in the issues are'} yours. Otherwise, a newer release of ${c.name} needs to fix ${one ? 'it' : 'them'}.${how}`;
|
|
3119
|
+
});
|
|
3120
|
+
const fix = [
|
|
3121
|
+
...(fixes.length > 0 ? [`To fix: ${fixes.join('; ')}.`] : []),
|
|
3122
|
+
...advice,
|
|
3123
|
+
].join(' ');
|
|
2284
3124
|
return {
|
|
2285
3125
|
...base,
|
|
2286
|
-
status:
|
|
3126
|
+
status:
|
|
3127
|
+
withIssues.length + skipped.length + failed.length > 0 ? 'warn' : 'pass',
|
|
2287
3128
|
message: notes.join(' '),
|
|
2288
|
-
...(
|
|
3129
|
+
...(fix ? {fix} : {}),
|
|
2289
3130
|
};
|
|
2290
3131
|
}
|
|
2291
3132
|
|
|
@@ -2375,21 +3216,83 @@ async function runComputerChecks(cwd) {
|
|
|
2375
3216
|
* Where `search` and `build` keep their gathered catalog between runs, how
|
|
2376
3217
|
* much it holds, and the most it and jiti's transpile cache hold; and, in a
|
|
2377
3218
|
* run under Yarn Plug'n'Play's loader, that the run keeps none
|
|
2378
|
-
* (runsUnderPnp). Left out of a checkout, which keeps none.
|
|
3219
|
+
* (runsUnderPnp). Left out of a checkout, which keeps none. The brief names
|
|
3220
|
+
* only the folder, its entries and size, the command that prints the whole
|
|
3221
|
+
* message, and the command that removes the kept folders.
|
|
3222
|
+
* @param {Pick<DoctorContext, 'cwd'>} ctx
|
|
2379
3223
|
* @returns {DoctorCheck | null}
|
|
2380
3224
|
*/
|
|
2381
|
-
export function checkGatherCache() {
|
|
3225
|
+
export function checkGatherCache(ctx) {
|
|
2382
3226
|
const summary = gatherCacheSummary();
|
|
2383
3227
|
if (summary == null) return null;
|
|
2384
3228
|
const size = `${(summary.bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
3229
|
+
const entries = `${summary.entries} ${summary.entries === 1 ? 'entry' : 'entries'}`;
|
|
3230
|
+
const kept = [summary.dir];
|
|
3231
|
+
if (isDirectory(summary.transpiledDir)) kept.push(summary.transpiledDir);
|
|
2385
3232
|
return {
|
|
2386
3233
|
id: 'gather-cache',
|
|
2387
3234
|
label: 'Kept catalog cache',
|
|
2388
3235
|
status: 'info',
|
|
2389
|
-
|
|
3236
|
+
brief: `${entries} (${size}) in ${summary.dir}. \`${formatCliCommand('doctor --json', ctx.cwd)}\` lists every kept item and the size limits. To clear the caches, run: ${removeFolderCommand(kept)}.`,
|
|
3237
|
+
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, the component list and whether the installed Core still matches the stored one, Core's and integrations' components with the doc parts the component matcher scores, Core hooks' declared keywords, integrations' theme records, what theme build checks a theme against in Core's component docs, the JavaScript theme build compiles from a theme's local TypeScript or JSX modules, what theme build finds when it checks a theme's pseudo-class keys, token names and settings the browser won't show as written, the lookup commands' not-found hint's name summaries, npm's list of the files an integration package packs, the CLI's own docs tree, what template reads from a template's source to name the components it uses, discover's record of the integrations a project loads and what each adds, and what it searches in its sources' saved copies, which search's discover line reads, doctor's docs checks and theme-wiring scan, what doctor's Core-props check finds in the project's source files, keyed by the folders it lists and the files it reads, and by the TypeScript, Core and project-config versions it used, and what doctor's Core-button check finds in the project's source files, keyed by the folders it lists and the files it reads, and by the installed packages and Node.js version it used) in ${summary.dir} (${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, the installed CLI's own files judged by its build id and folder (an upgrade, a reinstall or a copy in another folder changes them; in-place edits aren't supported), and deleting the folder clears it. A lookup command's not-found path may also create the folder, for its name index, and so may an integration package's \`integration check\` of itself, for npm's list. On Linux, when a debug handler is set, runs also keep the locale and time zone here. The folder holds at most ${summary.limitBytes / (1024 * 1024)} MB, dropping oldest entries first; the transpile cache in ${summary.transpiledDir} keeps its copies in ${SUBFOLDERS} subfolders, each holding at most 1/${SUBFOLDERS} of that, and drops the copies made longest ago first.`,
|
|
3238
|
+
};
|
|
3239
|
+
}
|
|
3240
|
+
|
|
3241
|
+
/**
|
|
3242
|
+
* The single folder where earlier CLIs left jiti's own copies of transpiled
|
|
3243
|
+
* code, which this CLI never reads, and the command that removes it. Found by
|
|
3244
|
+
* one stat, never a listing: that folder can hold so many files that reading
|
|
3245
|
+
* it takes minutes.
|
|
3246
|
+
* @param {import('../../foundation/env/user-dirs.mjs').UserDirOptions} [options]
|
|
3247
|
+
* @returns {DoctorCheck | null}
|
|
3248
|
+
*/
|
|
3249
|
+
export function checkOldTranspileCache(options) {
|
|
3250
|
+
const dir = oldTranspileCacheDir(options);
|
|
3251
|
+
try {
|
|
3252
|
+
if (!fs.lstatSync(dir).isDirectory()) return null;
|
|
3253
|
+
} catch {
|
|
3254
|
+
return null;
|
|
3255
|
+
}
|
|
3256
|
+
const remove = removeFolderCommand(dir, options?.platform);
|
|
3257
|
+
return {
|
|
3258
|
+
id: 'old-transpile-cache',
|
|
3259
|
+
label: 'Old transpile cache',
|
|
3260
|
+
status: 'info',
|
|
3261
|
+
message: `An earlier Astryx CLI left transpiled copies in ${dir}. This CLI keeps its copies in ${transpiledCacheDir(options)} and never reads the old folder.`,
|
|
3262
|
+
fix: `To remove it, run: ${remove}. An earlier CLI that still runs on this computer makes it again.`,
|
|
2390
3263
|
};
|
|
2391
3264
|
}
|
|
2392
3265
|
|
|
3266
|
+
/**
|
|
3267
|
+
* The command that removes one or more folders and all they hold:
|
|
3268
|
+
* PowerShell's on Windows, a POSIX shell's elsewhere, each path quoted as
|
|
3269
|
+
* each shell reads it.
|
|
3270
|
+
* @param {string | string[]} dirs
|
|
3271
|
+
* @param {string} [platform]
|
|
3272
|
+
* @returns {string}
|
|
3273
|
+
*/
|
|
3274
|
+
export function removeFolderCommand(dirs, platform = process.platform) {
|
|
3275
|
+
const folders = (Array.isArray(dirs) ? dirs : [dirs]).map(dir =>
|
|
3276
|
+
quoteCommandArgument(dir, platform),
|
|
3277
|
+
);
|
|
3278
|
+
return platform === 'win32'
|
|
3279
|
+
? `Remove-Item -Recurse -Force -LiteralPath ${folders.join(', ')}`
|
|
3280
|
+
: `rm -rf ${folders.join(' ')}`;
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
/**
|
|
3284
|
+
* Whether a path is a folder, by one stat.
|
|
3285
|
+
* @param {string} dir
|
|
3286
|
+
* @returns {boolean}
|
|
3287
|
+
*/
|
|
3288
|
+
function isDirectory(dir) {
|
|
3289
|
+
try {
|
|
3290
|
+
return fs.statSync(dir).isDirectory();
|
|
3291
|
+
} catch {
|
|
3292
|
+
return false;
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3295
|
+
|
|
2393
3296
|
/**
|
|
2394
3297
|
* Ordered list of synchronous check functions. Append here to add a check.
|
|
2395
3298
|
* (checkConfig is async and is awaited separately by {@link runChecks}.)
|
|
@@ -2399,6 +3302,7 @@ export function checkGatherCache() {
|
|
|
2399
3302
|
export const SYNC_CHECKS = [
|
|
2400
3303
|
checkNodeVersion,
|
|
2401
3304
|
checkCoreInstalled,
|
|
3305
|
+
checkCoreStylesheets,
|
|
2402
3306
|
checkBaseInstalled,
|
|
2403
3307
|
checkVersionAlignment,
|
|
2404
3308
|
checkImplicitIntegrations,
|
|
@@ -2408,11 +3312,17 @@ export const SYNC_CHECKS = [
|
|
|
2408
3312
|
checkIntegrationCoreRange,
|
|
2409
3313
|
checkIconSets,
|
|
2410
3314
|
checkIconPlaceholders,
|
|
3315
|
+
checkIconImports,
|
|
3316
|
+
checkButtonActions,
|
|
3317
|
+
checkCoreProps,
|
|
2411
3318
|
checkAgentDocs,
|
|
3319
|
+
checkSkillPlaces,
|
|
2412
3320
|
checkPeerDeps,
|
|
2413
3321
|
checkPackageManager,
|
|
2414
3322
|
checkCliCommand,
|
|
3323
|
+
checkInstallGuidance,
|
|
2415
3324
|
checkGatherCache,
|
|
3325
|
+
() => checkOldTranspileCache(),
|
|
2416
3326
|
];
|
|
2417
3327
|
|
|
2418
3328
|
/**
|
|
@@ -2423,6 +3333,7 @@ export const SYNC_CHECKS = [
|
|
|
2423
3333
|
*/
|
|
2424
3334
|
const CORE_CHECKS = new Set([
|
|
2425
3335
|
checkCoreInstalled,
|
|
3336
|
+
checkCoreStylesheets,
|
|
2426
3337
|
checkVersionAlignment,
|
|
2427
3338
|
checkPeerDeps,
|
|
2428
3339
|
]);
|
|
@@ -2447,6 +3358,7 @@ export async function runChecks(options = {}) {
|
|
|
2447
3358
|
...checkBuilt(built, {
|
|
2448
3359
|
cwd,
|
|
2449
3360
|
packages: builtIntegrationPackages(built, cwd),
|
|
3361
|
+
sourceBuild: sourceBuildOf(builtProjectRoot(built, cwd)),
|
|
2450
3362
|
}),
|
|
2451
3363
|
];
|
|
2452
3364
|
const summary = {pass: 0, warn: 0, fail: 0, info: 0};
|
|
@@ -2486,7 +3398,7 @@ export async function runChecks(options = {}) {
|
|
|
2486
3398
|
let configuredIntegrations = null;
|
|
2487
3399
|
/** @type {string|null} */
|
|
2488
3400
|
let projectError = null;
|
|
2489
|
-
/** @type {
|
|
3401
|
+
/** @type {Awaited<ReturnType<import('../../foundation/config/project.mjs').Project['iconSets']>> | null} */
|
|
2490
3402
|
let iconSets = null;
|
|
2491
3403
|
/** @type {import('../../foundation/config/project.mjs').Project | null} */
|
|
2492
3404
|
let project = null;
|
|
@@ -2584,7 +3496,9 @@ export async function runChecks(options = {}) {
|
|
|
2584
3496
|
docsCatalogError = err instanceof Error ? err.message : String(err);
|
|
2585
3497
|
}
|
|
2586
3498
|
try {
|
|
2587
|
-
iconSets =
|
|
3499
|
+
iconSets = iconFeatureGate(project).on
|
|
3500
|
+
? await project.iconSets()
|
|
3501
|
+
: null;
|
|
2588
3502
|
} catch {
|
|
2589
3503
|
iconSets = null;
|
|
2590
3504
|
}
|
|
@@ -2596,11 +3510,20 @@ export async function runChecks(options = {}) {
|
|
|
2596
3510
|
}
|
|
2597
3511
|
}
|
|
2598
3512
|
|
|
3513
|
+
/** @type {DoctorContext['skillPlaces']} */
|
|
3514
|
+
let skillPlaces = null;
|
|
3515
|
+
try {
|
|
3516
|
+
skillPlaces = await readSkillPlaces(cwd);
|
|
3517
|
+
} catch {
|
|
3518
|
+
// Unreadable places leave the skill-places check out.
|
|
3519
|
+
}
|
|
3520
|
+
|
|
2599
3521
|
/** @type {DoctorContext} */
|
|
2600
3522
|
const ctx = {
|
|
2601
3523
|
cwd,
|
|
2602
3524
|
nodeVersion: process.versions.node,
|
|
2603
3525
|
coreDir,
|
|
3526
|
+
skillPlaces,
|
|
2604
3527
|
ownCli: projectHasOwnCli(cwd),
|
|
2605
3528
|
projectCore: projectCoreVersion(cwd),
|
|
2606
3529
|
addedThemePackages: addedThemePackages(cwd),
|
|
@@ -2617,6 +3540,9 @@ export async function runChecks(options = {}) {
|
|
|
2617
3540
|
iconSets,
|
|
2618
3541
|
// Set after the docs checks, below.
|
|
2619
3542
|
iconPlaceholders: null,
|
|
3543
|
+
iconImports: null,
|
|
3544
|
+
buttonActions: null,
|
|
3545
|
+
coreProps: null,
|
|
2620
3546
|
base: project?.base.ok ? project.base.base : coreBase(),
|
|
2621
3547
|
};
|
|
2622
3548
|
const readsCore = ctx.base?.core !== false;
|
|
@@ -2636,16 +3562,52 @@ export async function runChecks(options = {}) {
|
|
|
2636
3562
|
checkDocsProgressiveDisclosure(ctx),
|
|
2637
3563
|
),
|
|
2638
3564
|
];
|
|
2639
|
-
// Only a project
|
|
2640
|
-
|
|
3565
|
+
// Only a project where icon features are on and a main set is decided
|
|
3566
|
+
// scans its source for placeholders: no other project gets the check.
|
|
3567
|
+
if (iconSets && placeholderMainSet(iconSets)) {
|
|
2641
3568
|
try {
|
|
2642
|
-
|
|
3569
|
+
const projectDir = findPackageRoot(cwd) ?? cwd;
|
|
3570
|
+
ctx.iconPlaceholders = findIconPlaceholders(projectDir);
|
|
3571
|
+
ctx.iconImports = findIconImports(projectDir, iconSets);
|
|
2643
3572
|
} catch {
|
|
2644
3573
|
// A scan that fails leaves the icon facts unknown.
|
|
2645
3574
|
ctx.iconSets = null;
|
|
2646
3575
|
}
|
|
2647
3576
|
}
|
|
2648
3577
|
|
|
3578
|
+
// The props scan reads the app's source, Core's docs, and Core's types
|
|
3579
|
+
// with the project's TypeScript, and runs nothing, so it is kept like the
|
|
3580
|
+
// docs checks; a scan that fails leaves the check out.
|
|
3581
|
+
if (readsCore) {
|
|
3582
|
+
try {
|
|
3583
|
+
const projectDir = findPackageRoot(cwd) ?? cwd;
|
|
3584
|
+
ctx.coreProps = await keptFileCheck(
|
|
3585
|
+
{name: 'core-props', ...where},
|
|
3586
|
+
() => findUnknownCoreProps(projectDir),
|
|
3587
|
+
CORE_PROPS_CODEC,
|
|
3588
|
+
);
|
|
3589
|
+
} catch {
|
|
3590
|
+
ctx.coreProps = null;
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
|
|
3594
|
+
// A project on Core scans its own source for buttons that do nothing. The
|
|
3595
|
+
// scan reads only files and folders and runs nothing, so it is kept like
|
|
3596
|
+
// the docs checks.
|
|
3597
|
+
if (readsCore) {
|
|
3598
|
+
try {
|
|
3599
|
+
const projectDir = findPackageRoot(cwd) ?? cwd;
|
|
3600
|
+
ctx.buttonActions = await keptFileCheck(
|
|
3601
|
+
{name: 'button-actions', ...where},
|
|
3602
|
+
async () => findButtonsWithoutAction(projectDir),
|
|
3603
|
+
BUTTON_ACTIONS_CODEC,
|
|
3604
|
+
);
|
|
3605
|
+
} catch {
|
|
3606
|
+
// A scan that fails leaves the check out.
|
|
3607
|
+
ctx.buttonActions = null;
|
|
3608
|
+
}
|
|
3609
|
+
}
|
|
3610
|
+
|
|
2649
3611
|
/** @type {DoctorCheck[]} */
|
|
2650
3612
|
const checks = [];
|
|
2651
3613
|
// Run the theme checks and config check after the environment checks. The
|