@astryxdesign/cli 0.7.17-canary.g5a3fd39 → 0.7.17-canary.g5cf5d69
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/README.md +64 -63
- package/api/build/_adapter.d.mts +51 -0
- package/api/build/_adapter.mjs +122 -6
- package/api/build/build.doc.mjs +1 -1
- package/api/build/build.mjs +23 -14
- package/api/build/build.type.d.mts +1 -1
- package/api/build/build.type.mjs +3 -3
- package/api/build/help/help.d.mts +15 -14
- package/api/build/help/help.mjs +62 -3
- package/api/build/kit/answer.mjs +2 -3
- package/api/build/kit/signals.d.mts +10 -0
- package/api/build/kit/signals.mjs +15 -2
- package/api/component/detail/blocks/blocks.mjs +2 -1
- package/api/discover/_adapter.d.mts +57 -6
- package/api/discover/_adapter.mjs +278 -49
- package/api/discover/_catalog-view.d.mts +7 -0
- package/api/discover/_catalog-view.mjs +10 -1
- package/api/discover/detail/detail.d.mts +3 -2
- package/api/discover/detail/detail.mjs +3 -2
- package/api/discover/detail/doc/doc.mjs +1 -1
- package/api/discover/discover.d.mts +24 -0
- package/api/discover/discover.doc.mjs +1 -1
- package/api/discover/discover.mjs +146 -25
- package/api/discover/discover.type.d.mts +6 -4
- package/api/discover/discover.type.mjs +6 -4
- package/api/discover/search/search.d.mts +22 -0
- package/api/discover/search/search.mjs +290 -70
- package/api/docs/_entry-names.mjs +4 -3
- package/api/doctor/_adapter.d.mts +43 -3
- package/api/doctor/_adapter.mjs +142 -18
- package/api/doctor/built-checks.d.mts +30 -3
- package/api/doctor/built-checks.mjs +132 -5
- package/api/doctor/doctor.d.mts +93 -6
- package/api/doctor/doctor.doc.mjs +2 -2
- package/api/doctor/doctor.mjs +524 -33
- package/api/doctor/doctor.type.d.mts +2 -1
- package/api/doctor/doctor.type.mjs +2 -1
- package/api/doctor/theme-checks.d.mts +19 -0
- package/api/doctor/theme-checks.mjs +74 -6
- package/api/hook/hook.type.d.mts +1 -1
- package/api/hook/hook.type.mjs +1 -1
- package/api/hook/list/list.mjs +11 -7
- package/api/icon/_adapter.d.mts +2 -1
- package/api/icon/_adapter.mjs +10 -15
- package/api/icon/_records.d.mts +3 -1
- package/api/icon/_records.mjs +30 -3
- package/api/icon/exportIconIndex.doc.mjs +1 -1
- package/api/icon/icon.doc.mjs +3 -3
- package/api/icon/icon.type.d.mts +32 -1
- package/api/icon/icon.type.mjs +19 -3
- package/api/icon/list/list.mjs +4 -1
- package/api/icon/rankIconIndex.doc.mjs +1 -1
- package/api/icon/search/icon-index.mjs +18 -8
- package/api/icon/search/search.d.mts +26 -3
- package/api/icon/search/search.mjs +155 -9
- package/api/init/_adapter.d.mts +14 -0
- package/api/init/_adapter.mjs +26 -4
- package/api/init/init.d.mts +1 -1
- package/api/init/init.doc.mjs +2 -2
- package/api/init/init.mjs +1 -1
- package/api/init/init.type.d.mts +29 -1
- package/api/init/init.type.mjs +14 -1
- package/api/init/run/run.d.mts +11 -1
- package/api/init/run/run.mjs +84 -5
- package/api/integration/_adapter.d.mts +5 -4
- package/api/integration/_adapter.mjs +7 -5
- package/api/integration/integrationCheck.doc.mjs +1 -1
- package/api/integration/pack-check.mjs +8 -9
- package/api/integration/validate-integration.d.mts +1 -1
- package/api/integration/validate-integration.mjs +26 -24
- package/api/integration/validate-integration.type.d.mts +5 -2
- package/api/integration/validate-integration.type.mjs +5 -2
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/render/_adapter.d.mts +4 -2
- package/api/render/_adapter.mjs +62 -21
- package/api/render/render.doc.mjs +8 -5
- package/api/render/render.mjs +1 -1
- package/api/render/render.type.d.mts +2 -0
- package/api/render/render.type.mjs +2 -0
- package/api/search/ORDERING.md +2 -2
- package/api/search/_candidate-score.d.mts +3 -0
- package/api/search/_candidate-score.mjs +36 -3
- package/api/search/_gather-docs.mjs +29 -2
- package/api/search/_gather-templates.mjs +2 -1
- package/api/search/_main-searcher.mjs +13 -0
- package/api/search/_named-keywords.d.mts +2 -1
- package/api/search/_named-keywords.mjs +48 -6
- package/api/search/_order.d.mts +36 -1
- package/api/search/_order.mjs +141 -3
- package/api/swizzle/list/list.mjs +8 -1
- package/api/swizzle/swizzle.type.d.mts +1 -1
- package/api/swizzle/swizzle.type.mjs +1 -1
- package/api/template/copy/copy.mjs +3 -4
- package/api/template/list/list.mjs +2 -1
- package/api/template/show/show.mjs +2 -1
- package/api/template/skeleton/skeleton.mjs +2 -1
- package/api/template/template.doc.mjs +1 -1
- package/api/template/template.mjs +19 -1
- package/api/template/template.type.d.mts +1 -0
- package/api/template/template.type.mjs +2 -1
- package/api/theme/_adapter.d.mts +1 -0
- package/api/theme/_adapter.mjs +3 -5
- package/api/theme/_app-provider.d.mts +42 -0
- package/api/theme/_app-provider.mjs +61 -27
- package/api/theme/build/build.d.mts +4 -10
- package/api/theme/build/build.mjs +165 -116
- package/api/theme/build/input-fields.d.mts +9 -0
- package/api/theme/build/input-fields.mjs +155 -16
- package/api/theme/build/radius-values.d.mts +18 -0
- package/api/theme/build/radius-values.mjs +76 -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/generator.mjs +24 -0
- package/api/theme/theme.type.d.mts +4 -2
- package/api/theme/theme.type.mjs +3 -2
- package/api/theme/themeBuild.doc.mjs +2 -2
- package/api/theme/themeEject.doc.mjs +1 -1
- package/api/theme-edit/_catalog.d.mts +40 -0
- package/api/theme-edit/_catalog.mjs +100 -22
- package/api/theme-edit/_check.mjs +213 -43
- package/api/theme-edit/_color.d.mts +14 -0
- package/api/theme-edit/_color.mjs +22 -0
- package/api/theme-edit/_compiler.mjs +52 -0
- package/api/theme-edit/_context.d.mts +20 -2
- package/api/theme-edit/_context.mjs +157 -29
- package/api/theme-edit/_edit.mjs +426 -58
- package/api/theme-edit/_how-question.d.mts +14 -0
- package/api/theme-edit/_how-question.mjs +1541 -127
- package/api/theme-edit/_how.mjs +43 -0
- package/api/theme-edit/_missed.mjs +107 -27
- package/api/theme-edit/_normal.d.mts +18 -4
- package/api/theme-edit/_normal.mjs +84 -3
- package/api/theme-edit/_palette.d.mts +9 -0
- package/api/theme-edit/_palette.mjs +158 -33
- package/api/theme-edit/_part-words.mjs +16 -3
- package/api/theme-edit/_parts.d.mts +8 -0
- package/api/theme-edit/_parts.mjs +120 -36
- 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 +255 -67
- package/api/theme-edit/_project.d.mts +12 -1
- package/api/theme-edit/_project.mjs +16 -1
- package/api/theme-edit/_settings.d.mts +116 -0
- package/api/theme-edit/_settings.mjs +1197 -58
- package/api/theme-edit/_tables.d.mts +16 -0
- package/api/theme-edit/_tables.mjs +34 -4
- package/api/theme-edit/theme-edit.type.d.mts +15 -2
- package/api/theme-edit/theme-edit.type.mjs +8 -6
- package/api/upgrade/_adapter.d.mts +46 -7
- package/api/upgrade/_adapter.mjs +110 -15
- package/api/upgrade/registry/registry.d.mts +6 -3
- package/api/upgrade/registry/registry.mjs +21 -6
- package/api/upgrade/run/run.mjs +23 -11
- package/api/upgrade/upgrade.doc.mjs +4 -3
- package/assets/component-list.generated.json +1 -1
- package/assets/docs/tree/agent-guidance.doc.mjs +3 -2
- package/assets/docs/tree/checks.doc.mjs +2 -2
- package/assets/docs/tree/host-entry.doc.mjs +4 -0
- package/assets/docs/tree/icon-definitions.doc.mjs +3 -3
- package/assets/docs/tree/icon-sets.doc.mjs +6 -6
- package/assets/docs/tree/problems.doc.mjs +3 -3
- package/assets/docs/tree/render-pages.doc.mjs +17 -3
- package/assets/docs/tree/share-a-page.doc.mjs +5 -5
- package/assets/docs/tree/short-and-findable.doc.mjs +3 -3
- package/assets/docs/tree/troubleshooting.doc.mjs +8 -0
- package/assets/docs/tree/updates.doc.mjs +1 -1
- package/assets/docs/tree/versioning.doc.mjs +1 -1
- package/assets/docs/working-with-ai.doc.mjs +40 -5
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/icons/installed-icon-set.doc.mjs +30 -0
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Avatar/AvatarInteractive.tsx +6 -1
- package/assets/templates/blocks/components/CodeBlock/CodeBlockTerminal.tsx +1 -1
- package/assets/templates/blocks/components/LinkProvider/LinkProviderCustomLink.tsx +3 -1
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat/page.tsx +6 -2
- package/assets/templates/pages/ai-chat-landing/page.tsx +1 -1
- package/assets/templates/pages/blank/page.tsx +4 -2
- package/assets/templates/pages/canvas-editor/page.tsx +3 -1
- package/assets/templates/pages/centered-hero/page.tsx +1 -1
- package/assets/templates/pages/checkout-wizard/page.tsx +1 -1
- package/assets/templates/pages/classic-gallery/page.tsx +1 -1
- package/assets/templates/pages/contact-form/page.tsx +2 -2
- package/assets/templates/pages/course-detail/page.tsx +1 -1
- package/assets/templates/pages/dashboard/page.tsx +24 -8
- package/assets/templates/pages/dashboard-alert-rail/page.tsx +4 -2
- package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +7 -3
- package/assets/templates/pages/dashboard-comparison/page.tsx +5 -2
- package/assets/templates/pages/dashboard-composition/page.tsx +10 -4
- package/assets/templates/pages/dashboard-progress/page.tsx +6 -3
- package/assets/templates/pages/dashboard-scorecard/page.tsx +17 -8
- package/assets/templates/pages/detail-page/page.tsx +22 -5
- package/assets/templates/pages/documentation/page.tsx +4 -2
- package/assets/templates/pages/documentation-design/page.tsx +5 -2
- package/assets/templates/pages/documentation-technical/page.tsx +4 -2
- package/assets/templates/pages/editor/page.tsx +28 -9
- package/assets/templates/pages/file-explorer/page.tsx +3 -1
- package/assets/templates/pages/form-two-column/page.tsx +1 -1
- package/assets/templates/pages/form-wizard/page.tsx +1 -1
- package/assets/templates/pages/form-wizard-dialog/page.tsx +3 -1
- package/assets/templates/pages/form-wizard-inline/page.tsx +1 -1
- package/assets/templates/pages/form-wizard-vertical/page.tsx +1 -1
- package/assets/templates/pages/gallery-hero/page.tsx +1 -1
- package/assets/templates/pages/ide/page.tsx +7 -2
- package/assets/templates/pages/kanban-board/page.tsx +10 -4
- package/assets/templates/pages/library/page.tsx +31 -61
- package/assets/templates/pages/login/page.tsx +4 -2
- package/assets/templates/pages/login-card/page.tsx +4 -2
- package/assets/templates/pages/login-split/page.tsx +3 -2
- package/assets/templates/pages/login-sso/page.tsx +4 -4
- package/assets/templates/pages/mixed-gallery/page.tsx +1 -1
- package/assets/templates/pages/payment-form/page.tsx +1 -1
- package/assets/templates/pages/product-detail/page.tsx +16 -4
- package/assets/templates/pages/product-gallery/page.tsx +1 -1
- package/assets/templates/pages/settings/page.tsx +10 -4
- package/assets/templates/pages/settings-dialog/page.tsx +5 -6
- package/assets/templates/pages/settings-sidebar/page.tsx +39 -13
- package/assets/templates/pages/side-gallery/page.tsx +1 -1
- package/assets/templates/pages/table/page.tsx +2 -2
- package/assets/templates/pages/table-filter/page.tsx +21 -6
- package/assets/templates/pages/table-grouped/page.tsx +23 -2
- package/assets/templates/pages/table-inbox/page.tsx +82 -32
- package/assets/templates/pages/theme-showcase/page.tsx +3 -2
- package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +12 -12
- package/assets/templates/themes/butter/butterTheme.ts +197 -4
- package/assets/templates/themes/chocolate/chocolateTheme.ts +72 -8
- package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +3 -3
- package/assets/templates/themes/gothic/gothicTheme.ts +114 -4
- package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +8 -8
- package/assets/templates/themes/matcha/matchaTheme.ts +48 -12
- package/assets/templates/themes/neutral/neutralTheme.ts +29 -0
- package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +2 -2
- package/assets/templates/themes/stone/stoneTheme.ts +69 -0
- package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +9 -9
- package/assets/templates/themes/y2k/y2kTheme.ts +249 -14
- package/authoring/codemod/parse.d.mts +0 -36
- package/authoring/codemod/parse.mjs +62 -41
- package/authoring/config/config.doc.mjs +1 -1
- package/authoring/config/parse.d.mts +0 -47
- package/authoring/config/parse.mjs +128 -103
- package/authoring/config/type.ts +4 -3
- package/authoring/debug/parse.d.mts +2 -2
- package/authoring/discover/parse.d.mts +2 -2
- package/authoring/discover/parse.mjs +52 -38
- package/authoring/discover/type.ts +2 -1
- package/authoring/doctypes/_schema.d.mts +834 -950
- package/authoring/doctypes/_schema.mjs +863 -825
- package/authoring/doctypes/command/parse.mjs +2 -2
- package/authoring/doctypes/component/parse.mjs +2 -2
- package/authoring/doctypes/enum/parse.mjs +2 -2
- package/authoring/doctypes/hook/parse.mjs +2 -2
- package/authoring/doctypes/icon-definition/icon-definition.doc.mjs +1 -1
- package/authoring/doctypes/icon-definition/parse.d.mts +0 -24
- package/authoring/doctypes/icon-definition/parse.mjs +59 -43
- package/authoring/doctypes/icon-set/parse.d.mts +0 -75
- package/authoring/doctypes/icon-set/parse.mjs +239 -210
- package/authoring/doctypes/legacy.mjs +3 -3
- package/authoring/doctypes/namespace/parse.mjs +2 -2
- package/authoring/doctypes/reference/parse.mjs +2 -2
- package/authoring/doctypes/schema/parse.mjs +2 -2
- package/authoring/doctypes/template/parse.d.mts +0 -101
- package/authoring/doctypes/template/parse.mjs +131 -106
- package/authoring/doctypes/theme/parse.d.mts +0 -23
- package/authoring/doctypes/theme/parse.mjs +52 -36
- package/authoring/gap-report/parse.d.mts +1 -1
- package/authoring/integration/integration.doc.mjs +8 -0
- package/authoring/integration/schema.d.mts +14 -3
- package/authoring/integration/schema.mjs +20 -2
- package/authoring/integration/type.ts +14 -0
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/build.mjs +27 -13
- package/clients/cli/commands/component.mjs +14 -3
- package/clients/cli/commands/discover.doc.mjs +2 -2
- package/clients/cli/commands/discover.mjs +20 -3
- package/clients/cli/commands/docs.doc.mjs +11 -9
- package/clients/cli/commands/docs.mjs +50 -21
- package/clients/cli/commands/experimental/icon.mjs +330 -227
- package/clients/cli/commands/experimental/render.mjs +16 -1
- package/clients/cli/commands/experimental/theme.mjs +42 -17
- 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-render.doc.mjs +3 -3
- 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 +1 -1
- 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/init.doc.mjs +36 -24
- package/clients/cli/commands/integration-check.doc.mjs +1 -1
- package/clients/cli/commands/mcp.doc.mjs +53 -0
- package/clients/cli/commands/mcp.mjs +51 -0
- package/clients/cli/commands/search.mjs +46 -9
- package/clients/cli/commands/template.mjs +3 -2
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/clients/cli/commands/theme.mjs +12 -2
- package/clients/cli/commands/upgrade.doc.mjs +3 -2
- package/clients/cli/commands.generated.json +1 -1
- package/clients/cli/formatters/index.mjs +52 -6
- package/clients/cli/index.mjs +23 -17
- package/clients/cli/lib/base-gate.mjs +37 -5
- package/clients/cli/lib/define-command.mjs +82 -4
- 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/stray-option.mjs +27 -1
- package/clients/cli/lib/unknown-command.mjs +326 -11
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +1 -1
- package/foundation/agent-docs/agent-docs.d.mts +49 -1
- package/foundation/agent-docs/agent-docs.mjs +108 -7
- package/foundation/agent-docs/computer-agent-text.mjs +1 -1
- package/foundation/bases/core.d.mts +1 -1
- package/foundation/bases/core.mjs +3 -3
- package/foundation/bases/resolve.d.mts +4 -8
- package/foundation/bases/resolve.mjs +15 -21
- package/foundation/bases/state.d.mts +15 -9
- package/foundation/bases/state.mjs +33 -6
- package/foundation/config/project.d.mts +5 -4
- package/foundation/config/project.mjs +33 -17
- package/foundation/discovery/component-discovery.mjs +15 -28
- package/foundation/discovery/icon-imports.d.mts +66 -0
- package/foundation/discovery/icon-imports.mjs +225 -0
- package/foundation/discovery/icon-ranking.d.mts +12 -2
- package/foundation/discovery/icon-ranking.mjs +197 -10
- package/foundation/discovery/icon-set-checks.mjs +2 -1
- package/foundation/discovery/icon-set-discovery.d.mts +28 -0
- package/foundation/discovery/icon-set-discovery.mjs +42 -0
- package/foundation/discovery/icon-set-writer.d.mts +2 -11
- package/foundation/discovery/icon-set-writer.mjs +3 -29
- package/foundation/discovery/module-exports.d.mts +1 -1
- package/foundation/discovery/module-exports.mjs +136 -33
- package/foundation/discovery/name-roots.d.mts +5 -0
- package/foundation/discovery/name-roots.mjs +11 -0
- package/foundation/discovery/runner-allowlist.d.mts +1 -0
- package/foundation/discovery/runner-allowlist.mjs +2 -0
- package/foundation/discovery/runner-commands.mjs +1 -0
- package/foundation/discovery/template-adapter.d.mts +1 -1
- package/foundation/discovery/template-destination.d.mts +14 -6
- package/foundation/discovery/template-destination.mjs +42 -8
- package/foundation/discovery/template-icons.d.mts +45 -2
- package/foundation/discovery/template-icons.mjs +26 -54
- package/foundation/discovery/template-needs.d.mts +28 -2
- package/foundation/discovery/template-needs.mjs +92 -11
- package/foundation/discovery/theme-discovery.d.mts +8 -0
- package/foundation/discovery/theme-discovery.mjs +23 -6
- package/foundation/discovery/theme-imports.mjs +2 -4
- package/foundation/doc-compiler/parse-readable.mjs +4 -3
- package/foundation/doc-compiler/stored-docs.d.mts +13 -0
- package/foundation/doc-compiler/stored-docs.mjs +74 -3
- package/foundation/env/cli-command.d.mts +68 -10
- package/foundation/env/cli-command.mjs +116 -22
- package/foundation/env/project-scope.d.mts +9 -0
- package/foundation/env/project-scope.mjs +28 -2
- package/foundation/fs/gather-cache.d.mts +23 -0
- package/foundation/fs/gather-cache.mjs +94 -2
- package/foundation/fs/module-loader.d.mts +3 -1
- package/foundation/fs/module-loader.mjs +85 -5
- package/foundation/fs/read-record.mjs +9 -5
- package/foundation/identity/package-names.d.mts +18 -0
- package/foundation/identity/package-names.mjs +19 -0
- package/foundation/identity/providers.mjs +3 -2
- package/foundation/integrations/icon-features.d.mts +63 -0
- package/foundation/integrations/icon-features.mjs +54 -0
- package/foundation/integrations/integrations.d.mts +13 -1
- package/foundation/integrations/integrations.mjs +47 -6
- package/foundation/integrations/pack-state.d.mts +21 -0
- package/foundation/integrations/pack-state.mjs +42 -19
- package/foundation/integrations/validate-contributions.d.mts +11 -3
- package/foundation/integrations/validate-contributions.mjs +51 -13
- package/foundation/release/cache.d.mts +13 -1
- package/foundation/release/cache.mjs +94 -14
- package/foundation/release/notices.d.mts +15 -0
- package/foundation/release/notices.mjs +111 -7
- package/foundation/release/project.d.mts +3 -4
- package/foundation/release/project.mjs +5 -6
- package/foundation/render/client-bundle.d.mts +126 -0
- package/foundation/render/client-bundle.mjs +565 -0
- package/foundation/render/cut-short.d.mts +7 -1
- package/foundation/render/cut-short.mjs +46 -6
- package/foundation/render/embedded-imports.d.mts +4 -3
- package/foundation/render/embedded-imports.mjs +13 -8
- package/foundation/render/esbuild-dependency.d.mts +14 -0
- package/foundation/render/esbuild-dependency.mjs +41 -0
- package/foundation/render/file-header.mjs +5 -4
- package/foundation/render/page-worker.mjs +562 -86
- package/foundation/render/picture-chrome.mjs +54 -29
- package/foundation/render/picture-playwright.mjs +78 -42
- package/foundation/render/picture-window.d.mts +33 -0
- package/foundation/render/picture-window.mjs +78 -0
- package/foundation/render/render-page.d.mts +55 -4
- package/foundation/render/render-page.mjs +199 -28
- package/foundation/render/restore-folder.d.mts +13 -0
- package/foundation/render/restore-folder.mjs +30 -0
- package/foundation/render/served-packages.d.mts +2 -1
- package/foundation/render/served-packages.mjs +5 -3
- package/foundation/render/ts-paths.d.mts +11 -0
- package/foundation/render/ts-paths.mjs +27 -2
- 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 +7 -1
- package/foundation/response/error-codes.mjs +10 -2
- package/foundation/response/response-types.doc.mjs +12 -12
- package/foundation/runtime/package-root.d.mts +8 -0
- package/foundation/runtime/package-root.mjs +20 -0
- package/foundation/suggest/other-command.d.mts +11 -0
- package/foundation/suggest/other-command.mjs +1 -1
- 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 +25 -0
- package/foundation/text/icon-set-next.mjs +29 -0
- package/foundation/xle/browser.d.mts +2 -2
- package/package.json +7 -6
|
@@ -6,14 +6,15 @@
|
|
|
6
6
|
*
|
|
7
7
|
* A free-text query always answers with a list, so its response type depends
|
|
8
8
|
* on the form of the query and never on what the project has:
|
|
9
|
-
* 1. any matches
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* 3. otherwise -> throw ERR_NOT_FOUND
|
|
9
|
+
* 1. any matches -> discover.search
|
|
10
|
+
* 2. fuzzy hits on installed component names (distance <= 3)
|
|
11
|
+
* -> throw ERR_NOT_FOUND with
|
|
12
|
+
* suggestions
|
|
13
|
+
* 3. otherwise -> throw ERR_NOT_FOUND
|
|
15
14
|
* Matches are installed components, the project's other installed items,
|
|
16
15
|
* packages, and every item a source lists for a package the project could add.
|
|
16
|
+
* Each item is scored with search's word scorer (api/search/_score.mjs), so a
|
|
17
|
+
* query matches word by word, typos in a one-word query included.
|
|
17
18
|
* A caller opens one item by its package path, which ../detail answers.
|
|
18
19
|
*
|
|
19
20
|
* @position api/discover/search — pure ranking over the installed component
|
|
@@ -21,6 +22,19 @@
|
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
24
|
import {levenshteinDistance} from '../../../foundation/text/string-utils.mjs';
|
|
25
|
+
import {scoreQuery} from '../../search/_score.mjs';
|
|
26
|
+
import {
|
|
27
|
+
phraseWords,
|
|
28
|
+
SEARCH_DOMAINS,
|
|
29
|
+
tokenizeQuery,
|
|
30
|
+
} from '../../search/_query.mjs';
|
|
31
|
+
import {SYNONYM_INDEX} from '../../search/_synonyms.mjs';
|
|
32
|
+
import {
|
|
33
|
+
spellIdentifiers,
|
|
34
|
+
stem,
|
|
35
|
+
wordForms,
|
|
36
|
+
wordsOf,
|
|
37
|
+
} from '../../search/_words.mjs';
|
|
24
38
|
import {AstryxError} from '../../error.mjs';
|
|
25
39
|
import {ERROR_CODES} from '../../../foundation/response/error-codes.mjs';
|
|
26
40
|
import {DISCOVER_KINDS} from '../../../authoring/discover/parse.mjs';
|
|
@@ -29,47 +43,278 @@ import {compareText} from '../../../foundation/text/compare-text.mjs';
|
|
|
29
43
|
/**
|
|
30
44
|
* @typedef {import('../_package-scanner.mjs').ScannedPackage} ScannedPackage
|
|
31
45
|
* @typedef {import('../_catalog-view.mjs').SearchItem} SearchItem
|
|
46
|
+
* @typedef {Pick<SearchItem, 'kind' | 'name' | 'title' | 'summary' | 'description' | 'keywords' | 'packageDescription'>} RankItem
|
|
47
|
+
* what the ranking reads of an item
|
|
32
48
|
*/
|
|
33
49
|
|
|
34
50
|
const KIND_ORDER = ['package', ...DISCOVER_KINDS];
|
|
35
51
|
|
|
36
52
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* @param {
|
|
42
|
-
* @
|
|
53
|
+
* The item as one of search's candidates (api/search/_score.mjs). Its title
|
|
54
|
+
* is another name. The words of its name are derived keywords, so a word
|
|
55
|
+
* inside a camelCase name counts (`chart` in `SalesChart`). Its summary,
|
|
56
|
+
* or a package's own description, is its description.
|
|
57
|
+
* @param {RankItem} item
|
|
58
|
+
* @param {string} [packageText] the description of the item's package
|
|
43
59
|
*/
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
function candidateOf(item, packageText) {
|
|
61
|
+
return {
|
|
62
|
+
domain: domainOf(item.kind),
|
|
63
|
+
name: item.name,
|
|
64
|
+
aliases: item.title ? [item.title] : [],
|
|
65
|
+
keywords: item.keywords ?? [],
|
|
66
|
+
weakKeywords: wordsOf(item.name),
|
|
67
|
+
description: item.summary ?? item.description ?? '',
|
|
68
|
+
prose: packageText ? [packageText] : [],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The search domain an item kind is scored as. A kind search has no domain
|
|
74
|
+
* for (a package, a codemod, an agent doc, an icon set) is scored as a template is: by the
|
|
75
|
+
* words of its name, with neither a doc route's rules nor a component's
|
|
76
|
+
* joined-name rule.
|
|
77
|
+
* @param {SearchItem['kind']} kind
|
|
78
|
+
* @returns {import('../../search/_lexical.mjs').Candidate['domain']}
|
|
79
|
+
*/
|
|
80
|
+
function domainOf(kind) {
|
|
81
|
+
return /** @type {readonly string[]} */ (SEARCH_DOMAINS).includes(kind)
|
|
82
|
+
? /** @type {import('../../search/_lexical.mjs').Candidate['domain']} */ (
|
|
83
|
+
kind
|
|
84
|
+
)
|
|
85
|
+
: 'template';
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* How well an item matches the query, scored the way search scores a
|
|
90
|
+
* candidate: how many query words it matches, then how strongly. The words
|
|
91
|
+
* may match across the item's name, title, keywords, summary, and its
|
|
92
|
+
* package's description. The package's description only adds words the
|
|
93
|
+
* item's own text lacks: an item must match some query word in its own text.
|
|
94
|
+
* Null for no match.
|
|
95
|
+
* @param {RankItem} item
|
|
96
|
+
* @param {{term: string, tokens: string[], words: string[]}} query
|
|
97
|
+
* @returns {{matched: number, total: number, score: number} | null}
|
|
98
|
+
*/
|
|
99
|
+
function rank(item, {term, tokens, words}) {
|
|
100
|
+
const own = scoreQuery(term, tokens, candidateOf(item), words);
|
|
101
|
+
if (own == null) return null;
|
|
102
|
+
const withPackage =
|
|
103
|
+
item.packageDescription &&
|
|
104
|
+
item.kind !== 'package' &&
|
|
105
|
+
own.matched < own.total
|
|
106
|
+
? scoreQuery(
|
|
107
|
+
term,
|
|
108
|
+
tokens,
|
|
109
|
+
candidateOf(item, item.packageDescription),
|
|
110
|
+
words,
|
|
111
|
+
)
|
|
112
|
+
: null;
|
|
113
|
+
const best =
|
|
114
|
+
withPackage != null && byMatch(withPackage, own) < 0 ? withPackage : own;
|
|
115
|
+
return {matched: best.matched, total: best.total, score: best.score};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* A query as rank() reads it. An identifier counts as the words it spells
|
|
120
|
+
* (`EmployeeTypeahead`), and still matches whole as typed.
|
|
121
|
+
* @param {string} query
|
|
122
|
+
*/
|
|
123
|
+
function queryOf(query) {
|
|
124
|
+
const spelled = spellIdentifiers(String(query).trim());
|
|
125
|
+
return {
|
|
126
|
+
term: String(query).trim().toLowerCase(),
|
|
127
|
+
tokens: tokenizeQuery(spelled),
|
|
128
|
+
words: phraseWords(spelled),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Better match first: more query words matched, then the higher score.
|
|
134
|
+
* @param {{matched: number, score: number}} a
|
|
135
|
+
* @param {{matched: number, score: number}} b
|
|
136
|
+
*/
|
|
137
|
+
const byMatch = (a, b) => b.matched - a.matched || b.score - a.score;
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* How many times each letter appears in a word.
|
|
141
|
+
* @param {string} word
|
|
142
|
+
* @returns {Map<string, number>}
|
|
143
|
+
*/
|
|
144
|
+
function letterCounts(word) {
|
|
145
|
+
/** @type {Map<string, number>} */
|
|
146
|
+
const counts = new Map();
|
|
147
|
+
for (const letter of word) counts.set(letter, (counts.get(letter) ?? 0) + 1);
|
|
148
|
+
return counts;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* How many letters of `text` a word with these letter counts also has, each
|
|
153
|
+
* letter counted as often as both have it.
|
|
154
|
+
* @param {Map<string, number>} counts
|
|
155
|
+
* @param {string} text
|
|
156
|
+
* @returns {number}
|
|
157
|
+
*/
|
|
158
|
+
function sharedLetters(counts, text) {
|
|
159
|
+
const left = new Map(counts);
|
|
160
|
+
let shared = 0;
|
|
161
|
+
for (const letter of text) {
|
|
162
|
+
const n = left.get(letter) ?? 0;
|
|
163
|
+
if (n > 0) {
|
|
164
|
+
shared++;
|
|
165
|
+
left.set(letter, n - 1);
|
|
60
166
|
}
|
|
61
167
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
168
|
+
return shared;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* A quick test that leaves out only items search's scorer cannot match, so
|
|
173
|
+
* ranking scores far fewer of them. A word of the query, or a synonym search
|
|
174
|
+
* reads for it, matches only text that holds one of its forms, less its last
|
|
175
|
+
* letter (every form search counts as the same word starts so: `spacing`
|
|
176
|
+
* holds `spac` of `space`, `entries` holds `entr` of `entry`); a word with
|
|
177
|
+
* `-` or `_` counts read joined too, as the scorer reads it (`multi-select`
|
|
178
|
+
* is the keyword `multiselect`). A typo, which search reads only in a query
|
|
179
|
+
* of one word or one identifier, needs a name or keyword within three
|
|
180
|
+
* letters in length of the query, one of its words, or a synonym search
|
|
181
|
+
* reads for one, and sharing all but three of its letters. A query of stopwords alone tests nothing.
|
|
182
|
+
* @param {ReturnType<typeof queryOf>} words
|
|
183
|
+
* @returns {(item: RankItem) => boolean}
|
|
184
|
+
*/
|
|
185
|
+
function mayMatch({term, tokens}) {
|
|
186
|
+
if (tokens.length === 0) return () => true;
|
|
187
|
+
const prefixes = new Set();
|
|
188
|
+
/** @type {string[]} */
|
|
189
|
+
const synonyms = [];
|
|
190
|
+
for (const token of tokens) {
|
|
191
|
+
const joinedToken = token.replace(/[-_]/g, '');
|
|
192
|
+
const alike = [...(SYNONYM_INDEX.get(token) ?? [])];
|
|
193
|
+
synonyms.push(...alike);
|
|
194
|
+
for (const word of new Set([token, joinedToken, ...alike])) {
|
|
195
|
+
for (const form of [word, stem(word), ...wordForms(word)]) {
|
|
196
|
+
prefixes.add(form.slice(0, Math.max(3, form.length - 1)));
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
const fuzzy = tokens.length <= 1 || !/\s/.test(term);
|
|
201
|
+
const typed = [term, ...tokens, ...synonyms]
|
|
202
|
+
.map(word => word.toLowerCase())
|
|
203
|
+
.filter(word => word.length >= 5)
|
|
204
|
+
.map(word => ({word, letters: letterCounts(word)}));
|
|
205
|
+
// Within three edits of a word means within three letters of its length
|
|
206
|
+
// and sharing all but three of its letters.
|
|
207
|
+
/** @param {string | undefined} text */
|
|
208
|
+
const nearLength = text => {
|
|
209
|
+
if (text == null || text.length < 5) return false;
|
|
210
|
+
const lower = text.toLowerCase();
|
|
211
|
+
return typed.some(
|
|
212
|
+
({word, letters}) =>
|
|
213
|
+
Math.abs(lower.length - word.length) <= 3 &&
|
|
214
|
+
sharedLetters(letters, lower) >=
|
|
215
|
+
Math.max(lower.length, word.length) - 3,
|
|
216
|
+
);
|
|
217
|
+
};
|
|
218
|
+
return item => {
|
|
219
|
+
const text = [
|
|
220
|
+
item.name,
|
|
221
|
+
item.title,
|
|
222
|
+
item.summary,
|
|
223
|
+
item.description,
|
|
224
|
+
item.packageDescription,
|
|
225
|
+
...(item.keywords ?? []),
|
|
226
|
+
]
|
|
227
|
+
.filter(Boolean)
|
|
228
|
+
.join('\n')
|
|
229
|
+
.toLowerCase();
|
|
230
|
+
for (const prefix of prefixes) if (text.includes(prefix)) return true;
|
|
231
|
+
return (
|
|
232
|
+
fuzzy &&
|
|
233
|
+
(nearLength(item.name) ||
|
|
234
|
+
nearLength(item.title) ||
|
|
235
|
+
(item.keywords ?? []).some(nearLength))
|
|
236
|
+
);
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* The items that match `words`, best first, each with its score: the ranking
|
|
242
|
+
* search() lists. When an item matches every word of the query, only such
|
|
243
|
+
* items stay (the cut search's suggestions make, orderByAffinity `closest`).
|
|
244
|
+
* @param {SearchItem[]} items
|
|
245
|
+
* @param {ReturnType<typeof queryOf>} words
|
|
246
|
+
* @param {{type?: string, only?: 'installed' | 'available'}} opts
|
|
247
|
+
* @returns {Array<{item: SearchItem, score: {matched: number, total: number, score: number}}>}
|
|
248
|
+
*/
|
|
249
|
+
function rankItems(items, words, {type, only}) {
|
|
250
|
+
const may = mayMatch(words);
|
|
251
|
+
const scored = items
|
|
252
|
+
.filter(item => (type == null ? true : item.kind === type))
|
|
253
|
+
.filter(may)
|
|
254
|
+
.filter(item =>
|
|
255
|
+
only === 'installed'
|
|
256
|
+
? item.installed
|
|
257
|
+
: only === 'available'
|
|
258
|
+
? !item.installed
|
|
259
|
+
: true,
|
|
260
|
+
)
|
|
261
|
+
.map(item => ({item, score: rank(item, words)}))
|
|
262
|
+
.filter(
|
|
263
|
+
/** @returns {m is {item: SearchItem, score: {matched: number, total: number, score: number}}} */
|
|
264
|
+
m => m.score != null,
|
|
265
|
+
)
|
|
266
|
+
.sort(
|
|
267
|
+
(a, b) =>
|
|
268
|
+
byMatch(a.score, b.score) ||
|
|
269
|
+
Number(b.item.installed) - Number(a.item.installed) ||
|
|
270
|
+
KIND_ORDER.indexOf(a.item.kind) - KIND_ORDER.indexOf(b.item.kind) ||
|
|
271
|
+
compareText(a.item.package, b.item.package) ||
|
|
272
|
+
compareText(a.item.name, b.item.name),
|
|
273
|
+
);
|
|
274
|
+
const everyWord = scored.filter(m => m.score.matched >= m.score.total);
|
|
275
|
+
return everyWord.length > 0 ? everyWord : scored;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Whether search() would list any match for `query`: the same installed
|
|
280
|
+
* components and items, ranked and cut the same way, with no rule of its
|
|
281
|
+
* own. Search's discover line reads it.
|
|
282
|
+
* @param {Array<{name: string, components: string[]}>} packages installed
|
|
283
|
+
* packages, as far as their names and components
|
|
284
|
+
* @param {string} query
|
|
285
|
+
* @param {{items?: RankItem[], type?: string}} opts
|
|
286
|
+
* the items, as far as the ranking reads them
|
|
287
|
+
* @returns {boolean}
|
|
288
|
+
*/
|
|
289
|
+
export function answersAny(packages, query, {items = [], type}) {
|
|
290
|
+
if (!String(query ?? '').trim()) return false;
|
|
291
|
+
// The cut that follows the ranking only ever keeps the items that match
|
|
292
|
+
// every word when there are some, so the list is empty exactly when no
|
|
293
|
+
// item matches: the first match settles it.
|
|
294
|
+
const words = queryOf(query);
|
|
295
|
+
const may = mayMatch(words);
|
|
296
|
+
return [...installedComponentsOf(packages), ...items].some(
|
|
297
|
+
item =>
|
|
298
|
+
(type == null || item.kind === type) &&
|
|
299
|
+
may(item) &&
|
|
300
|
+
rank(item, words) != null,
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Every installed component, as an item search ranks.
|
|
306
|
+
* @param {Array<{name: string, components: string[]}>} packages
|
|
307
|
+
* @returns {SearchItem[]}
|
|
308
|
+
*/
|
|
309
|
+
function installedComponentsOf(packages) {
|
|
310
|
+
return packages.flatMap(pkg =>
|
|
311
|
+
pkg.components.map(name => ({
|
|
312
|
+
package: pkg.name,
|
|
313
|
+
kind: /** @type {const} */ ('component'),
|
|
314
|
+
name,
|
|
315
|
+
installed: true,
|
|
316
|
+
})),
|
|
317
|
+
);
|
|
73
318
|
}
|
|
74
319
|
|
|
75
320
|
/**
|
|
@@ -102,39 +347,14 @@ export async function search(packages, query, opts) {
|
|
|
102
347
|
);
|
|
103
348
|
}
|
|
104
349
|
const lower = query.toLowerCase();
|
|
350
|
+
const words = queryOf(query);
|
|
105
351
|
|
|
106
|
-
|
|
107
|
-
const installedComponents = packages.flatMap(pkg =>
|
|
108
|
-
pkg.components.map(name => ({
|
|
109
|
-
package: pkg.name,
|
|
110
|
-
kind: /** @type {const} */ ('component'),
|
|
111
|
-
name,
|
|
112
|
-
installed: true,
|
|
113
|
-
})),
|
|
114
|
-
);
|
|
352
|
+
const installedComponents = installedComponentsOf(packages);
|
|
115
353
|
|
|
116
|
-
const ranked = [...installedComponents, ...items]
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
? item.installed
|
|
121
|
-
: only === 'available'
|
|
122
|
-
? !item.installed
|
|
123
|
-
: true,
|
|
124
|
-
)
|
|
125
|
-
.map(item => ({item, score: rank(item, lower)}))
|
|
126
|
-
.filter(
|
|
127
|
-
/** @returns {m is {item: SearchItem, score: number}} */
|
|
128
|
-
m => m.score != null,
|
|
129
|
-
)
|
|
130
|
-
.sort(
|
|
131
|
-
(a, b) =>
|
|
132
|
-
a.score - b.score ||
|
|
133
|
-
Number(b.item.installed) - Number(a.item.installed) ||
|
|
134
|
-
KIND_ORDER.indexOf(a.item.kind) - KIND_ORDER.indexOf(b.item.kind) ||
|
|
135
|
-
compareText(a.item.package, b.item.package) ||
|
|
136
|
-
compareText(a.item.name, b.item.name),
|
|
137
|
-
);
|
|
354
|
+
const ranked = rankItems([...installedComponents, ...items], words, {
|
|
355
|
+
type,
|
|
356
|
+
only,
|
|
357
|
+
});
|
|
138
358
|
|
|
139
359
|
if (ranked.length > 0) {
|
|
140
360
|
const matches = ranked.map(({item}) => ({
|
|
@@ -32,8 +32,8 @@ import {inputsUnchanged} from '../../foundation/discovery/stored-self-audit.mjs'
|
|
|
32
32
|
* @returns {Promise<string[]>}
|
|
33
33
|
*/
|
|
34
34
|
export async function docsRoutesNow(cwd, integrations) {
|
|
35
|
-
// The docs tree joins an integration's docs and,
|
|
36
|
-
// sets' definitions; without either, the project's tree is the CLI's own.
|
|
35
|
+
// The docs tree joins an integration's docs and, where icon features are
|
|
36
|
+
// on, its icon sets' definitions; without either, the project's tree is the CLI's own.
|
|
37
37
|
if (integrations.every(each => !each?.docs && !each?.iconSets)) {
|
|
38
38
|
return storedCliRoutes() ?? (await cliDocsRoutesNow());
|
|
39
39
|
}
|
|
@@ -67,7 +67,8 @@ export async function cliDocsRoutesNow() {
|
|
|
67
67
|
* The project's routes, worked out now from its docs tree. Without icon sets
|
|
68
68
|
* the tree's inputs are the CLI's own docs and the integrations' doc files,
|
|
69
69
|
* so only those are read: each doc of exported literals as data, any other
|
|
70
|
-
* imported. Icon sets join the tree only where
|
|
70
|
+
* imported. Icon sets join the tree only where icon features are on (an
|
|
71
|
+
* installed icon-set package or `experimental.iconSet`),
|
|
71
72
|
* so with one the project is loaded and its whole catalog read.
|
|
72
73
|
* @param {string} cwd
|
|
73
74
|
* @param {Array<{docs?: unknown, iconSets?: unknown, name?: string} | null | undefined>} integrations
|
|
@@ -39,10 +39,12 @@ export function readTextFileIfExists(file: string): string | null;
|
|
|
39
39
|
* links. The doctor parses the returned bytes without executing app code.
|
|
40
40
|
* @param {string} root
|
|
41
41
|
* @param {string} generatedModule
|
|
42
|
-
* @param {{stylesheets?: boolean}} [options] - also list
|
|
42
|
+
* @param {{stylesheets?: boolean, pages?: boolean}} [options] - also list
|
|
43
|
+
* `.css` files, and `.html` pages
|
|
43
44
|
*/
|
|
44
45
|
export function listProjectSourceFiles(root: string, generatedModule: string, options?: {
|
|
45
46
|
stylesheets?: boolean;
|
|
47
|
+
pages?: boolean;
|
|
46
48
|
}): string[];
|
|
47
49
|
/**
|
|
48
50
|
* Each file in the project's own source that still uses the placeholder
|
|
@@ -59,6 +61,25 @@ export function findIconPlaceholders(projectDir: string): Array<{
|
|
|
59
61
|
meanings: string[] | null;
|
|
60
62
|
uses: number;
|
|
61
63
|
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Each file in the project's own source with icon imports that do not match
|
|
66
|
+
* the project's icon sets (see `iconImportFindings`): an icon from a set that
|
|
67
|
+
* is not in the list, or from a set later in the list than one that draws the
|
|
68
|
+
* same meaning, and an icon-named import of an npm package that does not
|
|
69
|
+
* resolve, that no path alias (`compilerOptions.paths` or `baseUrl`) maps, and
|
|
70
|
+
* that the project's package.json does not declare. A file reads only as
|
|
71
|
+
* a syntax tree. Read without executing app code.
|
|
72
|
+
* @param {string} projectDir
|
|
73
|
+
* @param {{sets: import('../../foundation/discovery/icon-set-discovery.mjs').DiscoveredIconSet[], choice: import('../../foundation/discovery/icon-set-discovery.mjs').IconSetChoice}} iconSets
|
|
74
|
+
* @returns {Array<{file: string, imports: import('../../foundation/discovery/icon-imports.mjs').IconImportFinding[]}>}
|
|
75
|
+
*/
|
|
76
|
+
export function findIconImports(projectDir: string, iconSets: {
|
|
77
|
+
sets: import("../../foundation/discovery/icon-set-discovery.mjs").DiscoveredIconSet[];
|
|
78
|
+
choice: import("../../foundation/discovery/icon-set-discovery.mjs").IconSetChoice;
|
|
79
|
+
}): Array<{
|
|
80
|
+
file: string;
|
|
81
|
+
imports: import("../../foundation/discovery/icon-imports.mjs").IconImportFinding[];
|
|
82
|
+
}>;
|
|
62
83
|
/** @param {string} projectDir */
|
|
63
84
|
export function discoverDoctorThemes(projectDir: string): Promise<import("../../foundation/discovery/theme-discovery.mjs").DiscoveredTheme[]>;
|
|
64
85
|
/**
|
|
@@ -110,6 +131,22 @@ export function doctorRendersElement(file: string, element: Parameters<typeof re
|
|
|
110
131
|
* @returns {Set<string>}
|
|
111
132
|
*/
|
|
112
133
|
export function doctorStylesheetImports(css: string): Set<string>;
|
|
134
|
+
/**
|
|
135
|
+
* The names of a stylesheet's at-rules, lowercased, read with postcss so
|
|
136
|
+
* comments are ignored (`@stylex;` is `stylex`); empty for CSS that does not
|
|
137
|
+
* parse.
|
|
138
|
+
* @param {string} css
|
|
139
|
+
* @returns {Set<string>}
|
|
140
|
+
*/
|
|
141
|
+
export function doctorStylesheetAtRules(css: string): Set<string>;
|
|
142
|
+
/**
|
|
143
|
+
* The project folder of a path `doctor --built` checks: the nearest folder
|
|
144
|
+
* at or above it that holds a package.json, or null.
|
|
145
|
+
* @param {string} target
|
|
146
|
+
* @param {string} cwd
|
|
147
|
+
* @returns {string | null}
|
|
148
|
+
*/
|
|
149
|
+
export function builtProjectRoot(target: string, cwd: string): string | null;
|
|
113
150
|
/**
|
|
114
151
|
* The file a local stylesheet `@import` names, from the stylesheet that
|
|
115
152
|
* imports it: a relative path, or a package's file as Node resolves it
|
|
@@ -346,7 +383,8 @@ export function readBuiltPath(target: string, { fileLimit }?: {
|
|
|
346
383
|
export function builtIntegrationPackages(target: string, cwd: string): string[];
|
|
347
384
|
/**
|
|
348
385
|
* The install line for the font families a known package loads (an open
|
|
349
|
-
* font the editor's table names),
|
|
386
|
+
* font the editor's table names), as the project's integration install
|
|
387
|
+
* guidance gives it, else in the project's package manager, and
|
|
350
388
|
* whether it loads every family given. A family no known package loads (a
|
|
351
389
|
* self-hosted face) gets none: its package name would be a guess.
|
|
352
390
|
* @param {string} projectDir
|
|
@@ -358,7 +396,8 @@ export function fontPackagesInstallLine(projectDir: string, families: string[]):
|
|
|
358
396
|
coversAll: boolean;
|
|
359
397
|
}>;
|
|
360
398
|
export { placeholderFixes } from "../../foundation/discovery/template-icons.mjs";
|
|
361
|
-
export {
|
|
399
|
+
export { iconFeatureGate } from "../../foundation/integrations/icon-features.mjs";
|
|
400
|
+
export { addMatchingCore } from "../../foundation/release/notices.mjs";
|
|
362
401
|
export { fontServiceFamilies } from "../../foundation/fonts/font-stylesheet.mjs";
|
|
363
402
|
export { resolveRecordedTheme } from "../theme/theme.mjs";
|
|
364
403
|
export { themeIdentifier } from "../theme/_fork.mjs";
|
|
@@ -384,4 +423,5 @@ import { displayHomePath } from '../../foundation/agent-docs/computer-agent-text
|
|
|
384
423
|
export { iconUseCommand, unlistedIconSets } from "../../foundation/discovery/icon-set-discovery.mjs";
|
|
385
424
|
export { isLocalThemeOwner, planThemeAppWrite, readThemeState, resolveThemeModule } from "../../foundation/config/theme-state.mjs";
|
|
386
425
|
export { fileMark, generatedSourceCommand, isPrivateVarRefusal, missingThemePackage, themeBuild, validateThemePrivateInputs } from "../theme/build/build.mjs";
|
|
426
|
+
export { installCommandFor as packageInstallCommand, installStepFor as packageInstallStep } from "../../foundation/discovery/template-needs.mjs";
|
|
387
427
|
export { AUTHORING_AUDIT, authoringAudit, authoringAuditData } from "./_authoring-audit.mjs";
|