@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
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file Which of a module's import bindings it uses as values, read through
|
|
5
|
+
* Babel's scope.
|
|
6
|
+
*
|
|
7
|
+
* @input a module's AST (`@babel/parser`, a `File`)
|
|
8
|
+
* @output each static import's bindings with the references that resolve to
|
|
9
|
+
* them as values; the packages a TypeScript build drops
|
|
10
|
+
* @position foundation/render, used by the render worker's import checks
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import {traverse} from '@babel/core';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Whether a reference sits in a type, which a TypeScript build drops. This
|
|
17
|
+
* is the test Babel's TypeScript transform applies before it drops an import.
|
|
18
|
+
* @param {any} ref a reference's NodePath
|
|
19
|
+
*/
|
|
20
|
+
function inType(ref) {
|
|
21
|
+
switch (ref.parent.type) {
|
|
22
|
+
case 'TSTypeReference':
|
|
23
|
+
case 'TSExpressionWithTypeArguments':
|
|
24
|
+
case 'TSTypeQuery':
|
|
25
|
+
return true;
|
|
26
|
+
case 'TSQualifiedName':
|
|
27
|
+
return (
|
|
28
|
+
ref.parentPath.findParent(
|
|
29
|
+
(/** @type {any} */ up) => up.type !== 'TSQualifiedName',
|
|
30
|
+
).type !== 'TSImportEqualsDeclaration'
|
|
31
|
+
);
|
|
32
|
+
case 'ExportSpecifier':
|
|
33
|
+
return (
|
|
34
|
+
ref.parent.exportKind === 'type' ||
|
|
35
|
+
ref.parentPath.parent.exportKind === 'type'
|
|
36
|
+
);
|
|
37
|
+
default:
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* One binding a static import makes.
|
|
44
|
+
* @typedef {object} ImportUse
|
|
45
|
+
* @property {any} specifier the import specifier
|
|
46
|
+
* @property {any[]} values the NodePaths of the references that resolve to
|
|
47
|
+
* this binding and use it as a value. A parameter or a local declaration
|
|
48
|
+
* of the same name is its own binding, so its references are not here.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Each static import declaration of a module, with the bindings it makes.
|
|
53
|
+
* @param {any} ast the module's AST (`File`)
|
|
54
|
+
* @returns {Map<any, ImportUse[]>} by import declaration, in source order
|
|
55
|
+
*/
|
|
56
|
+
export function importUses(ast) {
|
|
57
|
+
/** @type {Map<any, ImportUse[]>} */
|
|
58
|
+
const uses = new Map();
|
|
59
|
+
traverse(ast, {
|
|
60
|
+
Program(program) {
|
|
61
|
+
for (const statement of program.get('body')) {
|
|
62
|
+
if (!statement.isImportDeclaration()) continue;
|
|
63
|
+
uses.set(
|
|
64
|
+
statement.node,
|
|
65
|
+
statement.node.specifiers.map((/** @type {any} */ specifier) => {
|
|
66
|
+
const binding = program.scope.getBinding(specifier.local.name);
|
|
67
|
+
return {
|
|
68
|
+
specifier,
|
|
69
|
+
values:
|
|
70
|
+
binding?.kind === 'module'
|
|
71
|
+
? binding.referencePaths.filter(ref => !inType(ref))
|
|
72
|
+
: [],
|
|
73
|
+
};
|
|
74
|
+
}),
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
program.stop();
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
return uses;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The modules a TypeScript build drops from a module's static imports: an
|
|
85
|
+
* `import type`, or an import each binding of which is a `type` binding or
|
|
86
|
+
* is used only in types or not at all. A module that another static import
|
|
87
|
+
* of the same module keeps is not dropped. Only static import declarations
|
|
88
|
+
* are read: a re-export, an `import()` or a `require()` loads its module.
|
|
89
|
+
* JavaScript keeps every import, so call this only for a TypeScript module.
|
|
90
|
+
* @param {any} ast the module's AST (`File`)
|
|
91
|
+
* @returns {Set<string>}
|
|
92
|
+
*/
|
|
93
|
+
export function droppedImports(ast) {
|
|
94
|
+
/** @type {Set<string>} */
|
|
95
|
+
const dropped = new Set();
|
|
96
|
+
/** @type {Set<string>} */
|
|
97
|
+
const kept = new Set();
|
|
98
|
+
for (const [declaration, bindings] of importUses(ast)) {
|
|
99
|
+
const elided =
|
|
100
|
+
declaration.importKind === 'type' ||
|
|
101
|
+
(bindings.length > 0 &&
|
|
102
|
+
bindings.every(
|
|
103
|
+
({specifier, values}) =>
|
|
104
|
+
specifier.importKind === 'type' || values.length === 0,
|
|
105
|
+
));
|
|
106
|
+
(elided ? dropped : kept).add(String(declaration.source.value));
|
|
107
|
+
}
|
|
108
|
+
for (const source of kept) dropped.delete(source);
|
|
109
|
+
return dropped;
|
|
110
|
+
}
|
|
@@ -116,6 +116,7 @@ export function allErrorCodes(): string[];
|
|
|
116
116
|
* | 'ERR_RENDER_NOT_ASTRYX'
|
|
117
117
|
* | 'ERR_RENDER_SOURCE_DAMAGED'
|
|
118
118
|
* | 'ERR_RENDER_NEWER_FORMAT'
|
|
119
|
+
* | 'ERR_RENDER_SCRIPT'
|
|
119
120
|
* | 'ERR_THEME_BAD_VALUE'
|
|
120
121
|
* | 'ERR_THEME_NO_MODE'
|
|
121
122
|
* | 'ERR_THEME_UNKNOWN_PART'
|
|
@@ -139,4 +140,4 @@ export const ERROR_CODES: Readonly<Record<ErrorCode, ErrorCode>>;
|
|
|
139
140
|
/**
|
|
140
141
|
* Stable error-code string union. Append-only.
|
|
141
142
|
*/
|
|
142
|
-
export type ErrorCode = ("ERR_UNKNOWN" | "ERR_UNKNOWN_COMMAND" | "ERR_UNKNOWN_SUBCOMMAND" | "ERR_INVALID_OPTION" | "ERR_INVALID_ARGUMENT" | "ERR_MISSING_ARGUMENT" | "ERR_INVALID_LANG" | "ERR_INVALID_DETAIL" | "ERR_NODE_VERSION" | "ERR_CORE_NOT_FOUND" | "ERR_CORE_INCOMPATIBLE" | "ERR_UNKNOWN_COMPONENT" | "ERR_UNKNOWN_HOOK" | "ERR_UNKNOWN_TOPIC" | "ERR_UNKNOWN_SECTION" | "ERR_UNKNOWN_CATEGORY" | "ERR_UNKNOWN_TEMPLATE" | "ERR_AMBIGUOUS_TEMPLATE" | "ERR_AMBIGUOUS_COMPONENT" | "ERR_AMBIGUOUS_THEME" | "ERR_UNKNOWN_THEME" | "ERR_INTEGRATION_ROOT_CONFLICT" | "ERR_INTEGRATION_EXPORT_CONFLICT" | "ERR_UNKNOWN_PACKAGE" | "ERR_UNKNOWN_AGENT" | "ERR_UNKNOWN_FEATURE" | "ERR_UNKNOWN_CODEMOD" | "ERR_CODEMOD_FAILED" | "ERR_CODEMOD_PROTECTED" | "ERR_CODEMOD_PROTECTION_SOURCE" | "ERR_NOT_FOUND" | "ERR_NO_DOC" | "ERR_NO_SHOWCASE" | "ERR_NO_SOURCE" | "ERR_INVALID_DOC" | "ERR_FILE_NOT_FOUND" | "ERR_FILE_EXISTS" | "ERR_PATH_TRAVERSAL" | "ERR_WRITE_FAILED" | "ERR_READ_FAILED" | "ERR_THEME_INVALID" | "ERR_THEME_LOAD" | "ERR_THEME_STALE" | "ERR_PALETTE_GENERATION" | "ERR_VERSION_DETECT" | "ERR_INVALID_VERSION" | "ERR_DEP_MISSING" | "ERR_GH_CLI" | "ERR_UNKNOWN_POST" | "ERR_FETCH_FAILED" | "ERR_LAYOUT_PARSE" | "ERR_LAYOUT_INVALID" | "ERR_UNCLASSIFIED_EXIT" | "ERR_SIGNAL_TERMINATED" | "ERR_VERSIONS_UNAVAILABLE" | "ERR_PROJECT_REQUIRED" | "ERR_BASE_CAPABILITY" | "ERR_BASE_NOT_FOUND" | "ERR_BASE_AMBIGUOUS" | "ERR_RENDER_COMPILE" | "ERR_RENDER_NO_DEFAULT_EXPORT" | "ERR_RENDER_MISSING_DEPENDENCY" | "ERR_RENDER_BROWSER_API" | "ERR_RENDER_ASSET_TOO_LARGE" | "ERR_RENDER_TIMEOUT" | "ERR_RENDER_FAILED" | "ERR_RENDER_NOT_ASTRYX" | "ERR_RENDER_SOURCE_DAMAGED" | "ERR_RENDER_NEWER_FORMAT" | "ERR_THEME_BAD_VALUE" | "ERR_THEME_NO_MODE" | "ERR_THEME_UNKNOWN_PART" | "ERR_THEME_UNKNOWN_VARIANT" | "ERR_THEME_UNKNOWN_STATE" | "ERR_THEME_PRIVATE_TOKEN" | "ERR_THEME_UNKNOWN_TOKEN" | "ERR_THEME_NO_EFFECT" | "ERR_THEME_NOT_CHECKED" | "ERR_THEME_BUSY" | "ERR_THEME_UNKNOWN_THING" | "ERR_THEME_NOT_SET" | "ERR_THEME_NOTHING_TO_UNDO");
|
|
143
|
+
export type ErrorCode = ("ERR_UNKNOWN" | "ERR_UNKNOWN_COMMAND" | "ERR_UNKNOWN_SUBCOMMAND" | "ERR_INVALID_OPTION" | "ERR_INVALID_ARGUMENT" | "ERR_MISSING_ARGUMENT" | "ERR_INVALID_LANG" | "ERR_INVALID_DETAIL" | "ERR_NODE_VERSION" | "ERR_CORE_NOT_FOUND" | "ERR_CORE_INCOMPATIBLE" | "ERR_UNKNOWN_COMPONENT" | "ERR_UNKNOWN_HOOK" | "ERR_UNKNOWN_TOPIC" | "ERR_UNKNOWN_SECTION" | "ERR_UNKNOWN_CATEGORY" | "ERR_UNKNOWN_TEMPLATE" | "ERR_AMBIGUOUS_TEMPLATE" | "ERR_AMBIGUOUS_COMPONENT" | "ERR_AMBIGUOUS_THEME" | "ERR_UNKNOWN_THEME" | "ERR_INTEGRATION_ROOT_CONFLICT" | "ERR_INTEGRATION_EXPORT_CONFLICT" | "ERR_UNKNOWN_PACKAGE" | "ERR_UNKNOWN_AGENT" | "ERR_UNKNOWN_FEATURE" | "ERR_UNKNOWN_CODEMOD" | "ERR_CODEMOD_FAILED" | "ERR_CODEMOD_PROTECTED" | "ERR_CODEMOD_PROTECTION_SOURCE" | "ERR_NOT_FOUND" | "ERR_NO_DOC" | "ERR_NO_SHOWCASE" | "ERR_NO_SOURCE" | "ERR_INVALID_DOC" | "ERR_FILE_NOT_FOUND" | "ERR_FILE_EXISTS" | "ERR_PATH_TRAVERSAL" | "ERR_WRITE_FAILED" | "ERR_READ_FAILED" | "ERR_THEME_INVALID" | "ERR_THEME_LOAD" | "ERR_THEME_STALE" | "ERR_PALETTE_GENERATION" | "ERR_VERSION_DETECT" | "ERR_INVALID_VERSION" | "ERR_DEP_MISSING" | "ERR_GH_CLI" | "ERR_UNKNOWN_POST" | "ERR_FETCH_FAILED" | "ERR_LAYOUT_PARSE" | "ERR_LAYOUT_INVALID" | "ERR_UNCLASSIFIED_EXIT" | "ERR_SIGNAL_TERMINATED" | "ERR_VERSIONS_UNAVAILABLE" | "ERR_PROJECT_REQUIRED" | "ERR_BASE_CAPABILITY" | "ERR_BASE_NOT_FOUND" | "ERR_BASE_AMBIGUOUS" | "ERR_RENDER_COMPILE" | "ERR_RENDER_NO_DEFAULT_EXPORT" | "ERR_RENDER_MISSING_DEPENDENCY" | "ERR_RENDER_BROWSER_API" | "ERR_RENDER_ASSET_TOO_LARGE" | "ERR_RENDER_TIMEOUT" | "ERR_RENDER_FAILED" | "ERR_RENDER_NOT_ASTRYX" | "ERR_RENDER_SOURCE_DAMAGED" | "ERR_RENDER_NEWER_FORMAT" | "ERR_RENDER_SCRIPT" | "ERR_THEME_BAD_VALUE" | "ERR_THEME_NO_MODE" | "ERR_THEME_UNKNOWN_PART" | "ERR_THEME_UNKNOWN_VARIANT" | "ERR_THEME_UNKNOWN_STATE" | "ERR_THEME_PRIVATE_TOKEN" | "ERR_THEME_UNKNOWN_TOKEN" | "ERR_THEME_NO_EFFECT" | "ERR_THEME_NOT_CHECKED" | "ERR_THEME_BUSY" | "ERR_THEME_UNKNOWN_THING" | "ERR_THEME_NOT_SET" | "ERR_THEME_NOTHING_TO_UNDO");
|
|
@@ -335,7 +335,7 @@ export const doc = {
|
|
|
335
335
|
value: 'ERR_RENDER_MISSING_DEPENDENCY',
|
|
336
336
|
stability: 'experimental',
|
|
337
337
|
description:
|
|
338
|
-
|
|
338
|
+
"The page imports a package that is not installed where the page is, or the esbuild the CLI depends on to build the page's script is missing from the CLI's install (install the CLI again). Nothing was written. For a package the page imports, the suggestion is the install command. Raised only by the experimental render command.",
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
value: 'ERR_RENDER_BROWSER_API',
|
|
@@ -379,6 +379,12 @@ export const doc = {
|
|
|
379
379
|
description:
|
|
380
380
|
'`render --reverse` was given a file in a newer render format than this CLI reads. Nothing was written. The message names the version of the CLI that wrote the file, which reads it. Raised only by the experimental render command.',
|
|
381
381
|
},
|
|
382
|
+
{
|
|
383
|
+
value: 'ERR_RENDER_SCRIPT',
|
|
384
|
+
stability: 'experimental',
|
|
385
|
+
description:
|
|
386
|
+
"`render` could not build the page's script for the browser: a module the page loads needs Node (such as `fs` or `path`), or cannot be found or compiled for the browser. Nothing was written. The message names the module. Raised only by the experimental render command.",
|
|
387
|
+
},
|
|
382
388
|
{
|
|
383
389
|
value: 'ERR_THEME_BAD_VALUE',
|
|
384
390
|
stability: 'experimental',
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
* | 'ERR_RENDER_NOT_ASTRYX'
|
|
106
106
|
* | 'ERR_RENDER_SOURCE_DAMAGED'
|
|
107
107
|
* | 'ERR_RENDER_NEWER_FORMAT'
|
|
108
|
+
* | 'ERR_RENDER_SCRIPT'
|
|
108
109
|
* | 'ERR_THEME_BAD_VALUE'
|
|
109
110
|
* | 'ERR_THEME_NO_MODE'
|
|
110
111
|
* | 'ERR_THEME_UNKNOWN_PART'
|
|
@@ -315,8 +316,9 @@ export const ERROR_CODES = Object.freeze({
|
|
|
315
316
|
*/
|
|
316
317
|
ERR_RENDER_NO_DEFAULT_EXPORT: 'ERR_RENDER_NO_DEFAULT_EXPORT',
|
|
317
318
|
/**
|
|
318
|
-
* The page imports a package that is not installed where the page is
|
|
319
|
-
*
|
|
319
|
+
* The page imports a package that is not installed where the page is, or
|
|
320
|
+
* the esbuild the CLI depends on to build the page's script is missing from
|
|
321
|
+
* the CLI's install. Nothing was written.
|
|
320
322
|
*/
|
|
321
323
|
ERR_RENDER_MISSING_DEPENDENCY: 'ERR_RENDER_MISSING_DEPENDENCY',
|
|
322
324
|
/**
|
|
@@ -362,6 +364,12 @@ export const ERROR_CODES = Object.freeze({
|
|
|
362
364
|
* wrote the file, which reads it.
|
|
363
365
|
*/
|
|
364
366
|
ERR_RENDER_NEWER_FORMAT: 'ERR_RENDER_NEWER_FORMAT',
|
|
367
|
+
/**
|
|
368
|
+
* `render` could not build the page's script for the browser: a module
|
|
369
|
+
* the page loads needs Node (`fs`, `path`), or cannot be found or compiled
|
|
370
|
+
* for the browser. Nothing was written. The message names the module.
|
|
371
|
+
*/
|
|
372
|
+
ERR_RENDER_SCRIPT: 'ERR_RENDER_SCRIPT',
|
|
365
373
|
/**
|
|
366
374
|
* A value does not fit what it sets: not a color for a color token, not a size for a size, a step (`more`/`less`) on something that is not a dial, or a word a dial does not take. Nothing was changed. Raised only by `experimental theme`.
|
|
367
375
|
*/
|
|
@@ -25,7 +25,7 @@ export const doc = {
|
|
|
25
25
|
{
|
|
26
26
|
value: 'init.run',
|
|
27
27
|
description:
|
|
28
|
-
'The install receipt: the `mode` (`default` | `features`), the features run, agent-doc files written, any soft `docsError`, whether theme guidance was emitted, the template outcome (`workflow` | `created` | `skipped`) plus its path, and whether the next-steps were emitted.',
|
|
28
|
+
'The install receipt: the `mode` (`default` | `features`), the features run, agent-doc files written, `agentDocsStatus` (`missing` | `stale` | `current`: the agent docs before the write; null when agent docs were not installed or the write failed), what changed in each (`docsChanges`: `{path, change, from, to}`), any soft `docsError`, whether theme guidance was emitted, the template outcome (`workflow` | `created` | `skipped`) plus its path, and whether the next-steps were emitted (false outside a project, and when `agentDocsStatus` was `current`).',
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
value: 'init.remove',
|
|
@@ -83,12 +83,12 @@ export const doc = {
|
|
|
83
83
|
{
|
|
84
84
|
value: 'docs.detail',
|
|
85
85
|
description:
|
|
86
|
-
"One topic's full ReferenceDoc (the JSON read of a topic
|
|
86
|
+
"One topic's full ReferenceDoc (the JSON read of a topic; in text, a read of a topic whose whole text is 16 KB or less, --full, or --dense), with token-ref blocks inlined and each section naming the package that wrote it, plus links ({up, previous, next}: the commands that open the level it sits in and its neighbors there). A topic or guide that took another's place carries replaces and replacedPackage, the package whose topic or guide it replaced.",
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
value: 'docs.index',
|
|
90
90
|
description:
|
|
91
|
-
"One topic's section index, the text read of a topic
|
|
91
|
+
"One topic's section index, the text read of a topic whose whole text is over 16 KB (and --index): the topic's name, title, and description, plus sections, each {id, title, package, summary} (pass the id as the section argument; package is the npm package that wrote the section; summary is the section's one-line summary), and links ({up, previous, next}: the commands that open the level it sits in and its neighbors there); replaces and replacedPackage when the topic or guide took another's place.",
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
value: 'docs.detail.section',
|
|
@@ -117,13 +117,13 @@ export const doc = {
|
|
|
117
117
|
value: 'themeEdit.new',
|
|
118
118
|
stability: 'experimental',
|
|
119
119
|
description:
|
|
120
|
-
'A theme made by `experimental theme editor new`: `theme`, `like` (the built-in theme it builds on, or null), the `files` written (settings, source, css, module), the dial `settings` it started with, font `notes`, contrast `problems`, the `preview` page, and any `pictures` (with `pictureProblem` when none could be taken), and `sheetStale` when a sheet.html left in the folder shows an older look. Experimental: may change or be removed in a patch release.',
|
|
120
|
+
'A theme made by `experimental theme editor new`: `theme`, `like` (the built-in theme it builds on, or null), the `files` written (settings, source, css, module), the dial `settings` it started with, font `notes`, contrast `problems`, what those settings did not reach as a change reports it (`missed`, `missedParts`, `missedOn`, left out when none), the `preview` page, and any `pictures` (with `pictureProblem` when none could be taken), and `sheetStale` when a sheet.html left in the folder shows an older look. Experimental: may change or be removed in a patch release.',
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
value: 'themeEdit.set',
|
|
124
124
|
stability: 'experimental',
|
|
125
125
|
description:
|
|
126
|
-
'One checked change written: the `setting`, the one it `replaced`, `was` (for base and mode), the `parts` and `group` it styles, resolved `changedTokens`, part styles written (`styled`), part settings a dial `kept`, newly `lifted` variant keys, `notes`, contrast `problems`, `newProblems` (every problem this change made, each with the command that fixes it, measured against every problem the theme had before; the text shows the first eight and counts the rest), build `warnings`, what a whole-theme change leaves out (`leftOut`, each `note` with the lines that `run` it), how many misses the changes to the theme leave (`missed`)
|
|
126
|
+
'One checked change written: the `setting`, the one it `replaced`, `was` (for base and mode), the `parts` and `group` it styles, resolved `changedTokens`, part styles written (`styled`), part settings a dial `kept`, newly `lifted` variant keys, `notes`, contrast `problems`, `newProblems` (every problem this change made, each with the command that fixes it, measured against every problem the theme had before; the text shows the first eight and counts the rest), build `warnings`, what a whole-theme change leaves out (`leftOut`, each `note` with the lines that `run` it), how many misses the changes to the theme leave (`missed`), on how many parts (`missedParts`; a part can miss two ways, its border and its shadow) and which (`missedOn`), all left out when none (`show` lists each), the `preview` page and any `pictures`, and `sheetStale` when sheet.html (made by `show`) still shows the theme as it was before. Experimental: may change or be removed in a patch release.',
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
value: 'themeEdit.show',
|
|
@@ -141,7 +141,7 @@ export const doc = {
|
|
|
141
141
|
value: 'themeEdit.previewAdd',
|
|
142
142
|
stability: 'experimental',
|
|
143
143
|
description:
|
|
144
|
-
"Pages added to the theme preview in the app: the route `folder`, the `theme` the pages wear (null for the app's own), the pages `added`, the pages that were there already and are written again (`refreshed`), every page (`pages`), each template page picked and why (`matched`), the template pages `skipped` (each with its `reason` and `
|
|
144
|
+
"Pages added to the theme preview in the app: the route `folder`, the `theme` the pages wear (null for the app's own), the pages `added`, the pages that were there already and are written again (`refreshed`), every page (`pages`), each template page picked and why (`matched`), the template pages `skipped` (each with its `reason`, `installCommand`, and `installGuidance` when a loaded integration gives one), the `files` the preview wrote, `notes`, and how to `open` it. Experimental: may change or be removed in a patch release.",
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
value: 'themeEdit.previewApp',
|
|
@@ -172,7 +172,7 @@ export const doc = {
|
|
|
172
172
|
value: 'render.page',
|
|
173
173
|
stability: 'experimental',
|
|
174
174
|
description:
|
|
175
|
-
'A page rendered to one self-contained file: `input`, `output`, `bytes`, the local files embedded (`files`: modules, stylesheets, images and JSON), the package `stylesheets` cut and inlined, `classes`, `cssBytes`, `images` inlined, and `warnings` (`{code, message}`; empty when nothing looked wrong). Experimental: may change or be removed in a patch release.',
|
|
175
|
+
'A page rendered to one self-contained file: `input`, `output`, `bytes`, the local files embedded (`files`: modules, stylesheets, images and JSON), the package `stylesheets` cut and inlined, `classes`, `cssBytes`, `images` inlined, the page\u2019s script (`scriptBytes`, and `scriptModules`: how many modules it holds), and `warnings` (`{code, message}`; empty when nothing looked wrong). Experimental: may change or be removed in a patch release.',
|
|
176
176
|
},
|
|
177
177
|
{
|
|
178
178
|
value: 'render.reverse',
|
|
@@ -305,14 +305,14 @@ export const doc = {
|
|
|
305
305
|
{
|
|
306
306
|
value: 'build.kit',
|
|
307
307
|
description:
|
|
308
|
-
"The template to start from and its kit: query, hasResults, matchCount (never a cap), directMatch, start {name, package, command, basis, reason, alternatives, ..., isReady} (the start and each alternative name the package that owns the template, and carry isReady), pages (search's closest templates that build could start from), blocks and domain as SearchResultEntry[] (each naming its package; each template with isReady), frame and foundation (Core component names), and hint {reason, commands} when thin.",
|
|
308
|
+
"The template to start from and its kit: query, hasResults, matchCount (never a cap), directMatch, start {name, package, command, basis, reason, alternatives, ..., isReady} (the start and each alternative name the package that owns the template, and carry isReady), pages (search's closest templates that build could start from), blocks and domain as SearchResultEntry[] (each naming its package; each template with isReady), frame and foundation (Core component names in a run on Core; empty in a run on another base), and hint {reason, commands} when thin.",
|
|
309
309
|
},
|
|
310
310
|
|
|
311
311
|
// swizzle
|
|
312
312
|
{
|
|
313
313
|
value: 'swizzle.list',
|
|
314
314
|
description:
|
|
315
|
-
"The names of swizzlable components discoverable from cwd's @astryxdesign/core. The envelope's package is @astryxdesign/core.",
|
|
315
|
+
"The names of swizzlable components discoverable from cwd's @astryxdesign/core; none in a run on another base. The envelope's package is the run's active base: @astryxdesign/core in a run on Core.",
|
|
316
316
|
},
|
|
317
317
|
{
|
|
318
318
|
value: 'swizzle.copy',
|
|
@@ -351,7 +351,7 @@ export const doc = {
|
|
|
351
351
|
{
|
|
352
352
|
value: 'template.copy',
|
|
353
353
|
description:
|
|
354
|
-
"A scaffold receipt: template id, output directory (relative to the project; absolute for a scratch copy in the system temp folder), written file name, file count, givenPath (optional; the absolute path as given, present only when it was inside the project), demoMediaReplaced (how many Astryx demo media references were replaced with placeholders), demoContentReplaced (how many Astryx docs-only demo content elements were replaced with a Text placeholder), notes (setup notes naming what the template needs that the project lacks — missing packages, missing StyleX compiler; empty when satisfied), missingPackages (external package names the template imports that are not in the project), and installCommand (a ready-to-run install command with the detected package manager and workspace version ranges; null when nothing is missing,
|
|
354
|
+
"A scaffold receipt: template id, output directory (relative to the project; absolute for a scratch copy in the system temp folder), written file name, file count, givenPath (optional; the absolute path as given, present only when it was inside the project), demoMediaReplaced (how many Astryx demo media references were replaced with placeholders), demoContentReplaced (how many Astryx docs-only demo content elements were replaced with a Text placeholder), notes (setup notes naming what the template needs that the project lacks — missing packages, missing StyleX compiler; empty when satisfied), missingPackages (external package names the template imports that are not in the project), and installCommand (a ready-to-run install command with the detected package manager and workspace version ranges; null when nothing is missing, when several lockfiles leave the package manager undetermined, or when no package.json holds the folder, where an install would make the folder a project), installGuidance (only when a loaded integration gives one: how this project adds the missing packages, followed in place of installCommand), and isReady. The envelope's package names the npm package that owns the template.",
|
|
355
355
|
},
|
|
356
356
|
|
|
357
357
|
{
|
|
@@ -364,7 +364,7 @@ export const doc = {
|
|
|
364
364
|
{
|
|
365
365
|
value: 'hook.list',
|
|
366
366
|
description:
|
|
367
|
-
"The hook catalog grouped by category: `detail` (the level: names | compact | full) and `components`, the grouped map of hook names, brief entries, or a full HookDoc per entry. The envelope's package is @astryxdesign/core
|
|
367
|
+
"The hook catalog grouped by category: `detail` (the level: names | compact | full) and `components`, the grouped map of hook names, brief entries, or a full HookDoc per entry. The envelope's package is the run's active base: @astryxdesign/core in a run on Core.",
|
|
368
368
|
},
|
|
369
369
|
{
|
|
370
370
|
value: 'hook.detail',
|
|
@@ -487,7 +487,7 @@ export const doc = {
|
|
|
487
487
|
{
|
|
488
488
|
value: 'integration.validate',
|
|
489
489
|
description:
|
|
490
|
-
'The validation result: validated (false when nothing was validated: with no package.json the issues list carries one no_package error so the command exits 1, and with a package.json but no integration manifest the issues list is empty and proves nothing), the package name and version (both null when validated is false) plus issues, an AstryxIntegrationIssue[] of {code, severity: warning | error, message, fix?, file?, line?} (fix: the change that resolves it; file and line: where, relative to the package), and notes when there are any: {code, message, next?} information beside the issues (text output marks a next note [next minor]); a note fails nothing by default, and one with next: true counts as a warning under integration check --next, fails integration check --strict --next, and fails --strict from the next minor release. Notes include invalid_cli_command for a malformed cliCommand and cli_peer_version when the running CLI is outside the @astryxdesign/cli peer range of the package, and the package layout findings added after the last minor release, each with its fix in the message (duplicate_component_doc, symlinked_root, unreadable_file, invalid_package_json, no_provider_id, source_without_component_doc where a doc and its source still pair), and doc_name_mismatch and unknown_block_component, until they become warnings in the next minor release. For the commands a topic writes, runner_command (written with a package runner), plain_command (written bare), package_manager_command (written for one package manager) and doc_token (a token that does not parse) notes each give the file, line and the token to write. A doc_target_not_found note names a doc whose replaces or extends names no topic and no guide of the CLI docs or the docs of the package (such as a namespace), and a doc_section_unplaced note a section whose before or after names no section of what it extends (it is added at the end), and a duplicate_guide_replacement note two docs of the package that replace one guide; they become warnings in the next minor release. When the manifest loads, docTypes checks each doc against its published authoring type: status (checked | skipped), reason, typescript, docs, findings (all warnings, each naming the field and a fix), unchecked, and fixtures (test fixture docs not checked). When the manifest loads, docNames lists the component doc names it could not judge: status (checked), findings (always empty; a doc name the module its import names provably does not export is a doc_name_mismatch note, with its fix in the message) and unchecked ({file, name, reason}: a doc whose name differs from the name it is listed under and whose source exports cannot all be read, such as a re-export from another package). When the manifest loads, blockComponents lists the component names templates give in exampleFor or componentsUsed that could not be judged: status (checked), findings (always empty; a name neither the package nor Core has, and the template does not import, is an unknown_block_component note, with its fix in the message) and unchecked ({file, name, reason}: a name the template may reach through anything other than named imports and re-exports from Core, React, StyleX, local helpers or the entry of the package itself, such as an import from another package, a default or namespace import, an alias of or member read off an imported binding, require() or a dynamic import(), or a local module that cannot be read, or any name Core would have to resolve when Core is not installed). Since 0.7.3 each import apps cannot use is also a note (its fix in the message), listed only and failing --strict from the next minor. So are the examples a package ships: component_without_example (a published component no block shows with exampleFor and isShowcase: true, or names in alsoShowcaseFor), template_category (a category written as a path, such as components/X), showcase_not_standalone (a showcase importing server-only code or reading process.env past NODE_ENV) and template_asset_not_packed (a new URL(…, import.meta.url) asset missing, or left out by npm pack --dry-run). When npm cannot list the files, an asset no files entry can reach is still a note and any other is listed in exampleAssets ({status: checked, findings: [], unchecked}, only when it lists any) as {file, asset, reason}. Since 0.7.15, package_without_logo (logo.light in the integration file, or a logo.dark that is set, names no packed PNG, JPEG, WebP or shapes-only SVG of at most 512 KB in the package; package.json marketplace.logo is read when the integration file has no logo) and package_without_example (components, other than those component_without_example exempts, but no block with isShowcase: true and exampleFor, or alsoShowcaseFor; themes-, docs- or codemods-only packages need none) say what a catalog needs to list the package, as notes without next that fail no check under any flag; a logo npm cannot be asked about is listed in exampleAssets with the file that names it. publicImports ({status: checked, findings: [], unchecked}) lists each import the check could not judge as {file, specifier, reason}; never counted or failed on. Each component example that is not kind setup but cannot run on its own, by the rule previewableExample in @astryxdesign/cli/authoring defines, is a next note with its fix in the message: example_does_not_compile, example_renders_nothing, example_undefined_name, example_server_only and example_import_unresolvable; exampleCode ({status: checked, findings: [], unchecked}, only when it lists any) lists as {file, example, reason} each example the check could not judge: its names, when the docs of Core or React cannot be read beside the package, or the example itself, when it cannot be read. For the package being authored, olderCliNotes ({file, kind: template | namespace, field, message}) lists each descriptor field a CLI before 0.7.4 refuses, such as stability on a template or namespace doc; it is present only when it has entries, and is never counted or fails a check.',
|
|
490
|
+
'The validation result: validated (false when nothing was validated: with no package.json the issues list carries one no_package error so the command exits 1, and with a package.json but no integration manifest the issues list is empty and proves nothing), the package name and version (both null when validated is false) plus issues, an AstryxIntegrationIssue[] of {code, severity: warning | error, message, fix?, file?, line?} (fix: the change that resolves it; file and line: where, relative to the package), and notes when there are any: {code, message, next?} information beside the issues (text output marks a next note [next minor]); a note fails nothing by default, and one with next: true counts as a warning under integration check --next, fails integration check --strict --next, and fails --strict from the next minor release. Notes include invalid_cli_command for a malformed cliCommand, invalid_install_guidance for a malformed installGuidance, and cli_peer_version when the running CLI is outside the @astryxdesign/cli peer range of the package, and the package layout findings added after the last minor release, each with its fix in the message (duplicate_component_doc, symlinked_root, unreadable_file, invalid_package_json, no_provider_id, source_without_component_doc where a doc and its source still pair), and doc_name_mismatch and unknown_block_component, until they become warnings in the next minor release. For the commands a topic writes, runner_command (written with a package runner), plain_command (written bare), package_manager_command (written for one package manager) and doc_token (a token that does not parse) notes each give the file, line and the token to write. A doc_target_not_found note names a doc whose replaces or extends names no topic and no guide of the CLI docs or the docs of the package (such as a namespace), and a doc_section_unplaced note a section whose before or after names no section of what it extends (it is added at the end), and a duplicate_guide_replacement note two docs of the package that replace one guide; they become warnings in the next minor release. When the manifest loads, docTypes checks each doc against its published authoring type: status (checked | skipped), reason, typescript, docs, findings (all warnings, each naming the field and a fix), unchecked, and fixtures (test fixture docs not checked). When the manifest loads, docNames lists the component doc names it could not judge: status (checked), findings (always empty; a doc name the module its import names provably does not export is a doc_name_mismatch note, with its fix in the message) and unchecked ({file, name, reason}: a doc whose name differs from the name it is listed under and whose source exports cannot all be read, such as a re-export from another package). When the manifest loads, blockComponents lists the component names templates give in exampleFor or componentsUsed that could not be judged: status (checked), findings (always empty; a name neither the package nor Core has, and the template does not import, is an unknown_block_component note, with its fix in the message) and unchecked ({file, name, reason}: a name the template may reach through anything other than named imports and re-exports from Core, React, StyleX, local helpers or the entry of the package itself, such as an import from another package, a default or namespace import, an alias of or member read off an imported binding, require() or a dynamic import(), or a local module that cannot be read, or any name Core would have to resolve when Core is not installed). Since 0.7.3 each import apps cannot use is also a note (its fix in the message), listed only and failing --strict from the next minor. So are the examples a package ships: component_without_example (a published component no block shows with exampleFor and isShowcase: true, or names in alsoShowcaseFor), template_category (a category written as a path, such as components/X), showcase_not_standalone (a showcase importing server-only code or reading process.env past NODE_ENV) and template_asset_not_packed (a new URL(…, import.meta.url) asset missing, or left out by npm pack --dry-run). When npm cannot list the files, an asset no files entry can reach is still a note and any other is listed in exampleAssets ({status: checked, findings: [], unchecked}, only when it lists any) as {file, asset, reason}. Since 0.7.15, package_without_logo (logo.light in the integration file, or a logo.dark that is set, names no packed PNG, JPEG, WebP or shapes-only SVG of at most 512 KB in the package; package.json marketplace.logo is read when the integration file has no logo) and package_without_example (components, other than those component_without_example exempts, but no block with isShowcase: true and exampleFor, or alsoShowcaseFor; themes-, docs- or codemods-only packages need none) say what a catalog needs to list the package, as notes without next that fail no check under any flag; a logo npm cannot be asked about is listed in exampleAssets with the file that names it. publicImports ({status: checked, findings: [], unchecked}) lists each import the check could not judge as {file, specifier, reason}; never counted or failed on. Each component example that is not kind setup but cannot run on its own, by the rule previewableExample in @astryxdesign/cli/authoring defines, is a next note with its fix in the message: example_does_not_compile, example_renders_nothing, example_undefined_name, example_server_only and example_import_unresolvable; exampleCode ({status: checked, findings: [], unchecked}, only when it lists any) lists as {file, example, reason} each example the check could not judge: its names, when the docs of Core or React cannot be read beside the package, or the example itself, when it cannot be read. For the package being authored, olderCliNotes ({file, kind: template | namespace, field, message}) lists each descriptor field a CLI before 0.7.4 refuses, such as stability on a template or namespace doc; it is present only when it has entries, and is never counted or fails a check.',
|
|
491
491
|
},
|
|
492
492
|
{
|
|
493
493
|
value: 'integration.template-conflicts',
|
|
@@ -51,6 +51,14 @@ export function resolvedPackages(): Array<{
|
|
|
51
51
|
version: string | null;
|
|
52
52
|
source: "project" | "package-set";
|
|
53
53
|
}>;
|
|
54
|
+
/**
|
|
55
|
+
* The packages that the root holding the copy that started the hosted run
|
|
56
|
+
* declares in its `package.json`: what its host installed there, such as an
|
|
57
|
+
* icon library its pages import. Outside a project that root serves the run
|
|
58
|
+
* (INV30). Empty with no hosted run.
|
|
59
|
+
* @returns {string[]}
|
|
60
|
+
*/
|
|
61
|
+
export function servingRootPackages(): string[];
|
|
54
62
|
/** Forget the hosted run. Tests only. */
|
|
55
63
|
export function _resetHostedRun(): void;
|
|
56
64
|
export type HostedRun = {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
import * as fs from 'node:fs';
|
|
20
|
+
import * as path from 'node:path';
|
|
20
21
|
import {relativeWithin, samePath} from '../fs/path-compare.mjs';
|
|
21
22
|
|
|
22
23
|
/**
|
|
@@ -167,6 +168,25 @@ export function resolvedPackages() {
|
|
|
167
168
|
}));
|
|
168
169
|
}
|
|
169
170
|
|
|
171
|
+
/**
|
|
172
|
+
* The packages that the root holding the copy that started the hosted run
|
|
173
|
+
* declares in its `package.json`: what its host installed there, such as an
|
|
174
|
+
* icon library its pages import. Outside a project that root serves the run
|
|
175
|
+
* (INV30). Empty with no hosted run.
|
|
176
|
+
* @returns {string[]}
|
|
177
|
+
*/
|
|
178
|
+
export function servingRootPackages() {
|
|
179
|
+
if (!active?.startingRoot) return [];
|
|
180
|
+
try {
|
|
181
|
+
const pkg = JSON.parse(
|
|
182
|
+
fs.readFileSync(path.join(active.startingRoot, 'package.json'), 'utf8'),
|
|
183
|
+
);
|
|
184
|
+
return Object.keys({...pkg?.dependencies, ...pkg?.optionalDependencies});
|
|
185
|
+
} catch {
|
|
186
|
+
return [];
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
170
190
|
/** Forget the hosted run. Tests only. */
|
|
171
191
|
export function _resetHostedRun() {
|
|
172
192
|
active = null;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
// @generated by scripts/sync-api-types.mjs from the JSDoc in foundation/**/*.mjs.
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* The hint that names `name`, an entry of `command`, for `from`, at `tier`.
|
|
6
|
+
* Without `from` (a word that is no command), the reason names the entry's
|
|
7
|
+
* kind alone.
|
|
8
|
+
* @param {LookupCommand} command
|
|
9
|
+
* @param {string} name
|
|
10
|
+
* @param {LookupCommand | undefined} from
|
|
11
|
+
* @param {number} tier
|
|
12
|
+
* @returns {Found}
|
|
13
|
+
*/
|
|
14
|
+
export function hintFor(command: LookupCommand, name: string, from: LookupCommand | undefined, tier: number): Found;
|
|
4
15
|
/**
|
|
5
16
|
* The command, other than `from`, that reads the entry `typed` names among
|
|
6
17
|
* `entries`, with the tier it matches at, or null. The entry must match by
|
|
@@ -205,7 +205,7 @@ function bestMatch(command, names, typed) {
|
|
|
205
205
|
* @param {number} tier
|
|
206
206
|
* @returns {Found}
|
|
207
207
|
*/
|
|
208
|
-
function hintFor(command, name, from, tier) {
|
|
208
|
+
export function hintFor(command, name, from, tier) {
|
|
209
209
|
return {
|
|
210
210
|
hint: {
|
|
211
211
|
name: `astryx ${command} ${name}`,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// @generated by scripts/sync-api-types.mjs from the JSDoc in foundation/**/*.mjs.
|
|
2
|
+
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @file The icon id an export name stands for. Writing an icon set names
|
|
6
|
+
* each icon by it, and the icon finder reads a query word written as an
|
|
7
|
+
* export name by it.
|
|
8
|
+
*
|
|
9
|
+
* @input an export name (`XMarkIcon`, `Bars3Icon`)
|
|
10
|
+
* @output the icon id (`x-mark`, `bars-3`)
|
|
11
|
+
* @position packages/cli/foundation/text — naming rules shared by discovery and search
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* `XMarkIcon` → `x-mark`; `Trash2` → `trash-2`; `ArrowUpDown` →
|
|
15
|
+
* `arrow-up-down`; `Squares2X2Icon` and `Grid2x2` → `squares-2x2`,
|
|
16
|
+
* `grid-2x2`: an icon id from an export name. A dimension (a digit, `x` or
|
|
17
|
+
* `X`, a digit) stays one word.
|
|
18
|
+
* @param {string} name
|
|
19
|
+
*/
|
|
20
|
+
export function iconIdOf(name: string): string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file The icon id an export name stands for. Writing an icon set names
|
|
5
|
+
* each icon by it, and the icon finder reads a query word written as an
|
|
6
|
+
* export name by it.
|
|
7
|
+
*
|
|
8
|
+
* @input an export name (`XMarkIcon`, `Bars3Icon`)
|
|
9
|
+
* @output the icon id (`x-mark`, `bars-3`)
|
|
10
|
+
* @position packages/cli/foundation/text — naming rules shared by discovery and search
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* `XMarkIcon` → `x-mark`; `Trash2` → `trash-2`; `ArrowUpDown` →
|
|
15
|
+
* `arrow-up-down`; `Squares2X2Icon` and `Grid2x2` → `squares-2x2`,
|
|
16
|
+
* `grid-2x2`: an icon id from an export name. A dimension (a digit, `x` or
|
|
17
|
+
* `X`, a digit) stays one word.
|
|
18
|
+
* @param {string} name
|
|
19
|
+
*/
|
|
20
|
+
export function iconIdOf(name) {
|
|
21
|
+
return (
|
|
22
|
+
name
|
|
23
|
+
.replace(/Icon$/u, '')
|
|
24
|
+
// `2X2` and `2x2` are one word: lower the x first.
|
|
25
|
+
.replace(/([0-9])[xX](?=[0-9])/gu, '$1x')
|
|
26
|
+
// A one-letter word before a digit ends there: `CalendarX2` is
|
|
27
|
+
// `calendar-x-2`, as its library names it.
|
|
28
|
+
.replace(/([a-z][A-Z])(?=[0-9])/gu, '$1-')
|
|
29
|
+
// A lower-case letter before a capital or a digit ends a word, except
|
|
30
|
+
// the x inside a dimension.
|
|
31
|
+
.replace(/([a-z])(?=[A-Z0-9])/gu, (match, letter, offset, whole) =>
|
|
32
|
+
letter === 'x' && /[0-9]/u.test(whole[offset - 1] ?? '')
|
|
33
|
+
? letter
|
|
34
|
+
: `${letter}-`,
|
|
35
|
+
)
|
|
36
|
+
.replace(/([0-9])([A-Z])/gu, '$1-$2')
|
|
37
|
+
.replace(/([A-Z])([A-Z][a-z])/gu, '$1-$2')
|
|
38
|
+
.toLowerCase()
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// @generated by scripts/sync-api-types.mjs from the JSDoc in foundation/**/*.mjs.
|
|
2
|
+
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What to do when no icon set is installed: no command can list sets to
|
|
6
|
+
* install, since discover reads icon sets only in a project that already
|
|
7
|
+
* chose one. The commands are bare in JSON, and in text each is printed as
|
|
8
|
+
* the CLI picks it (`format`).
|
|
9
|
+
* @param {(command: string) => string} [format]
|
|
10
|
+
* @returns {string}
|
|
11
|
+
*/
|
|
12
|
+
export function noIconSetNext(format?: (command: string) => string): string;
|
|
13
|
+
/**
|
|
14
|
+
* @file What to do when no icon set is installed (AST-084 FR6, FR7): the
|
|
15
|
+
* sentence the finder and `--list` print, and the two commands it names.
|
|
16
|
+
*
|
|
17
|
+
* @input How to print a command
|
|
18
|
+
* @output The sentence, and the commands for suggestions
|
|
19
|
+
* @position packages/cli/foundation/text — read by the `icon` leaves and the
|
|
20
|
+
* `experimental icon` command
|
|
21
|
+
*/
|
|
22
|
+
/** The command that makes an installed set the project's main set. */
|
|
23
|
+
export const ICON_USE_COMMAND: "astryx experimental icon use <set>";
|
|
24
|
+
/** The command that reads the guide to making an icon set. */
|
|
25
|
+
export const ICON_SET_GUIDE_COMMAND: "astryx docs cli/experimental/icon-sets";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file What to do when no icon set is installed (AST-084 FR6, FR7): the
|
|
5
|
+
* sentence the finder and `--list` print, and the two commands it names.
|
|
6
|
+
*
|
|
7
|
+
* @input How to print a command
|
|
8
|
+
* @output The sentence, and the commands for suggestions
|
|
9
|
+
* @position packages/cli/foundation/text — read by the `icon` leaves and the
|
|
10
|
+
* `experimental icon` command
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/** The command that makes an installed set the project's main set. */
|
|
14
|
+
export const ICON_USE_COMMAND = 'astryx experimental icon use <set>';
|
|
15
|
+
|
|
16
|
+
/** The command that reads the guide to making an icon set. */
|
|
17
|
+
export const ICON_SET_GUIDE_COMMAND = 'astryx docs cli/experimental/icon-sets';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* What to do when no icon set is installed: no command can list sets to
|
|
21
|
+
* install, since discover reads icon sets only in a project that already
|
|
22
|
+
* chose one. The commands are bare in JSON, and in text each is printed as
|
|
23
|
+
* the CLI picks it (`format`).
|
|
24
|
+
* @param {(command: string) => string} [format]
|
|
25
|
+
* @returns {string}
|
|
26
|
+
*/
|
|
27
|
+
export function noIconSetNext(format = command => command) {
|
|
28
|
+
return `Install a package that ships an icon set, then run \`${format(ICON_USE_COMMAND)}\`. To make your own set, read \`${format(ICON_SET_GUIDE_COMMAND)}\`.`;
|
|
29
|
+
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export function checkExpression(expression: string, registry: import("./xle-ast").Registry | import("./browser").SerializedRegistry | object, opts?: {
|
|
17
17
|
blocks?: import("./browser").XLEBlock[] | undefined;
|
|
18
|
-
form?: "
|
|
18
|
+
form?: "compact" | "auto" | "outline" | undefined;
|
|
19
19
|
loose?: boolean | undefined;
|
|
20
20
|
}): import("./browser").CheckResult;
|
|
21
21
|
/**
|
|
@@ -34,7 +34,7 @@ export function checkExpression(expression: string, registry: import("./xle-ast"
|
|
|
34
34
|
*/
|
|
35
35
|
export function expandExpression(expression: string, registry: import("./xle-ast").Registry | import("./browser").SerializedRegistry | object, opts?: {
|
|
36
36
|
blocks?: import("./browser").XLEBlock[] | undefined;
|
|
37
|
-
form?: "
|
|
37
|
+
form?: "compact" | "auto" | "outline" | undefined;
|
|
38
38
|
loose?: boolean | undefined;
|
|
39
39
|
name?: string | undefined;
|
|
40
40
|
blockModules?: Map<string, import("./xle-ast").BlockModule> | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.7.17-canary.
|
|
3
|
+
"version": "0.7.17-canary.g5cf5d69",
|
|
4
4
|
"displayName": "CLI",
|
|
5
5
|
"description": "The Astryx CLI: scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -117,6 +117,7 @@
|
|
|
117
117
|
"ast-types": "0.16.3",
|
|
118
118
|
"commander": "^12.1.0",
|
|
119
119
|
"css-tree": "3.2.1",
|
|
120
|
+
"esbuild": "^0.28.2",
|
|
120
121
|
"globals": "17.14.0",
|
|
121
122
|
"ignore": "^7.0.14",
|
|
122
123
|
"jiti": "^2.7.0",
|
|
@@ -129,7 +130,7 @@
|
|
|
129
130
|
"zod": "^4.6.7"
|
|
130
131
|
},
|
|
131
132
|
"peerDependencies": {
|
|
132
|
-
"@astryxdesign/core": "0.7.17-canary.
|
|
133
|
+
"@astryxdesign/core": "0.7.17-canary.g5cf5d69"
|
|
133
134
|
},
|
|
134
135
|
"peerDependenciesMeta": {
|
|
135
136
|
"@astryxdesign/core": {
|
|
@@ -137,10 +138,10 @@
|
|
|
137
138
|
}
|
|
138
139
|
},
|
|
139
140
|
"devDependencies": {
|
|
140
|
-
"@astryxdesign/charts": "0.7.17-canary.
|
|
141
|
-
"@astryxdesign/core": "0.7.17-canary.
|
|
142
|
-
"@astryxdesign/lab": "0.7.17-canary.
|
|
143
|
-
"@astryxdesign/theme-neutral": "0.7.17-canary.
|
|
141
|
+
"@astryxdesign/charts": "0.7.17-canary.g5cf5d69",
|
|
142
|
+
"@astryxdesign/core": "0.7.17-canary.g5cf5d69",
|
|
143
|
+
"@astryxdesign/lab": "0.7.17-canary.g5cf5d69",
|
|
144
|
+
"@astryxdesign/theme-neutral": "0.7.17-canary.g5cf5d69",
|
|
144
145
|
"@heroicons/react": "^2.2.0",
|
|
145
146
|
"@stylexjs/stylex": "^0.19.1",
|
|
146
147
|
"@types/babel__core": "^7.20.5",
|