@astryxdesign/cli 0.6.5 → 0.6.6-canary.11a80dd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/README.md +91 -88
- package/api/build/_adapter.d.mts +70 -2
- package/api/build/_adapter.mjs +122 -10
- package/api/build/build.doc.mjs +3 -3
- package/api/build/build.test.mjs +111 -2
- package/api/build/build.type.d.mts +12 -0
- package/api/build/build.type.mjs +3 -0
- package/api/build/help/help.mjs +1 -1
- package/api/build/kit/kit.mjs +110 -22
- package/api/build/kit/rank.d.mts +32 -8
- package/api/build/kit/rank.mjs +291 -97
- package/api/build/kit/rank.test.mjs +231 -48
- package/api/build/kit/weights.d.mts +82 -0
- package/api/build/kit/weights.json +1 -0
- package/api/build/kit/weights.mjs +305 -0
- package/api/build/kit/weights.test.mjs +190 -0
- package/api/component/_adapter.d.mts +19 -0
- package/api/component/_adapter.mjs +33 -0
- package/api/component/component-replacement.test.mjs +603 -0
- package/api/component/component.mjs +49 -15
- package/api/component/component.test.mjs +32 -0
- package/api/component/component.type.d.mts +33 -3
- package/api/component/component.type.mjs +10 -3
- package/api/component/detail/blocks/blocks.d.mts +2 -1
- package/api/component/detail/blocks/blocks.mjs +5 -2
- package/api/component/detail/detail.mjs +5 -1
- package/api/component/detail/props/props.d.mts +2 -1
- package/api/component/detail/props/props.mjs +3 -2
- package/api/component/detail/showcase/showcase.d.mts +3 -1
- package/api/component/detail/showcase/showcase.mjs +3 -1
- package/api/component/detail/source/source.d.mts +3 -2
- package/api/component/detail/source/source.mjs +7 -3
- package/api/component/list/list.mjs +128 -10
- package/api/docs/_adapter.d.mts +11 -0
- package/api/docs/_adapter.mjs +25 -0
- package/api/docs/detail/detail.mjs +19 -3
- package/api/docs/detail/section/section.mjs +7 -1
- package/api/docs/docOverlays.test.mjs +10 -6
- package/api/docs/docs.d.mts +6 -0
- package/api/docs/docs.depth.test.mjs +134 -0
- package/api/docs/docs.doc.mjs +31 -2
- package/api/docs/docs.mjs +46 -1
- package/api/docs/docs.test.mjs +279 -0
- package/api/docs/docs.type.d.mts +81 -4
- package/api/docs/docs.type.mjs +41 -4
- package/api/docs/index/index.mjs +11 -2
- package/api/docs/index/index.test.mjs +7 -2
- package/api/docs/integration-tree.test.mjs +572 -0
- package/api/docs/integrationDocs.test.mjs +337 -0
- package/api/docs/node/node.d.mts +28 -3
- package/api/docs/node/node.mjs +149 -23
- package/api/doctor/_adapter.d.mts +50 -0
- package/api/doctor/_adapter.mjs +190 -0
- package/api/doctor/doctor.d.mts +0 -10
- package/api/doctor/doctor.doc.mjs +1 -3
- package/api/doctor/doctor.mjs +8 -123
- package/api/doctor/theme-checks.d.mts +24 -0
- package/api/doctor/theme-checks.mjs +1231 -0
- package/api/doctor/theme-checks.test.mjs +667 -0
- package/api/error.d.mts +22 -0
- package/api/error.mjs +42 -0
- package/api/gap-report/gap-report.d.mts +3 -1
- package/api/gap-report/gap-report.mjs +27 -3
- package/api/gap-report/gap-report.test.mjs +106 -0
- package/api/hook/_adapter.d.mts +1 -0
- package/api/hook/_adapter.mjs +3 -0
- package/api/hook/detail/detail.mjs +2 -2
- package/api/hook/detail/params/params.mjs +2 -2
- package/api/hook/hook.type.d.mts +12 -0
- package/api/hook/hook.type.mjs +3 -0
- package/api/hook/list/list.d.mts +1 -1
- package/api/hook/list/list.mjs +8 -8
- package/api/index.d.mts +1 -1
- package/api/index.mjs +4 -0
- package/api/init/run/run.d.mts +3 -5
- package/api/init/run/run.mjs +11 -11
- package/api/integration/__fixtures__/released-0.6.5-ocean.d.mts +14 -0
- package/api/integration/__fixtures__/released-0.6.5-ocean.mjs +15 -0
- package/api/integration/add-contribution.d.mts +2 -1
- package/api/integration/add-contribution.mjs +7 -3
- package/api/integration/add-contribution.test.mjs +3 -3
- package/api/integration/add-helpers.d.mts +26 -5
- package/api/integration/add-helpers.mjs +50 -5
- package/api/integration/add-theme.mjs +354 -28
- package/api/integration/add-theme.test.mjs +380 -16
- package/api/integration/authoring-checks.mjs +31 -8
- package/api/integration/authoring-checks.type.d.mts +8 -0
- package/api/integration/authoring-checks.type.mjs +7 -3
- package/api/integration/integration-authoring.type.d.mts +4 -1
- package/api/integration/integration-authoring.type.mjs +6 -1
- package/api/integration/integrationAdd.doc.mjs +6 -0
- package/api/integration/integrationAddTheme.doc.mjs +10 -0
- package/api/integration/integrationComponentConflicts.doc.mjs +6 -3
- package/api/integration/integrationDocConflicts.doc.mjs +1 -1
- package/api/integration/integrationTemplateConflicts.doc.mjs +1 -1
- package/api/integration/pack-check.component-replaces.test.mjs +126 -0
- package/api/integration/pack-check.d.mts +10 -0
- package/api/integration/pack-check.lifecycle-output.test.mjs +21 -2
- package/api/integration/pack-check.mjs +495 -4
- package/api/integration/pack-check.test.mjs +619 -10
- package/api/integration/validate-integration.d.mts +4 -2
- package/api/integration/validate-integration.mjs +7 -2
- package/api/integration/validate-integration.test.mjs +55 -0
- package/api/integration/validate-integration.type.d.mts +5 -0
- package/api/integration/validate-integration.type.mjs +5 -1
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/layout/check/check.d.mts +1 -0
- package/api/layout/check/check.mjs +1 -0
- package/api/layout/expand/expand.d.mts +1 -0
- package/api/layout/expand/expand.mjs +13 -7
- package/api/layout/expand/expand.receipt.test.mjs +74 -0
- package/api/layout/grammar/grammar.d.mts +1 -0
- package/api/layout/grammar/grammar.mjs +1 -0
- package/api/layout/layout.type.d.mts +1 -0
- package/api/layout/layout.type.mjs +1 -0
- package/api/layout/layoutCheck.doc.mjs +1 -1
- package/api/layout/layoutExpand.doc.mjs +2 -2
- package/api/layout/layoutGrammar.doc.mjs +1 -1
- package/api/search/search.d.mts +39 -8
- package/api/search/search.doc.mjs +4 -4
- package/api/search/search.mjs +248 -66
- package/api/search/search.test.mjs +829 -0
- package/api/search/search.type.d.mts +6 -6
- package/api/search/search.type.mjs +5 -5
- package/api/swizzle/_adapter.d.mts +10 -0
- package/api/swizzle/_adapter.mjs +23 -0
- package/api/swizzle/copy/copy.d.mts +5 -6
- package/api/swizzle/copy/copy.mjs +95 -13
- package/api/swizzle/list/list.mjs +2 -2
- package/api/swizzle/swizzle.doc.mjs +4 -0
- package/api/swizzle/swizzle.test.mjs +55 -5
- package/api/swizzle/swizzle.type.d.mts +8 -0
- package/api/swizzle/swizzle.type.mjs +2 -0
- package/api/template/copy/copy.mjs +27 -8
- package/api/template/copy/copy.receipt.test.mjs +77 -0
- package/api/template/show/show.mjs +17 -4
- package/api/template/show/show.test.mjs +76 -0
- package/api/template/skeleton/skeleton.mjs +2 -1
- package/api/template/template-integration.test.mjs +14 -0
- package/api/template/template.d.mts +1 -1
- package/api/template/template.doc.mjs +6 -2
- package/api/template/template.mjs +2 -0
- package/api/template/template.type.d.mts +17 -0
- package/api/template/template.type.mjs +8 -0
- package/api/theme/_adapter.d.mts +106 -6
- package/api/theme/_adapter.mjs +687 -18
- package/api/theme/add/add.binary.test.mjs +76 -3
- package/api/theme/add/add.d.mts +5 -9
- package/api/theme/add/add.mjs +87 -64
- package/api/theme/add/add.rollback.test.mjs +9 -9
- package/api/theme/add/add.staging.test.mjs +9 -9
- package/api/theme/add/add.test.mjs +461 -55
- package/api/theme/add/add.types.test.mjs +151 -0
- package/api/theme/build/build.d.mts +120 -2
- package/api/theme/build/build.family.test.mjs +13 -4
- package/api/theme/build/build.icon-lineage.test.mjs +117 -0
- package/api/theme/build/build.icon-preservation.test.mjs +639 -0
- package/api/theme/build/build.mjs +667 -195
- package/api/theme/build/build.project-core.test.mjs +165 -0
- package/api/theme/build/build.test.mjs +220 -1
- package/api/theme/build/font-warning.d.mts +11 -0
- package/api/theme/build/font-warning.mjs +28 -3
- package/api/theme/build/icon-imports.d.mts +47 -0
- package/api/theme/build/icon-imports.mjs +691 -0
- package/api/theme/eject/eject.binary.test.mjs +90 -0
- package/api/theme/eject/eject.d.mts +17 -0
- package/api/theme/eject/eject.mjs +65 -0
- package/api/theme/eject/eject.rollback.test.mjs +158 -0
- package/api/theme/eject/eject.staging.test.mjs +83 -0
- package/api/theme/eject/eject.test.mjs +160 -0
- package/api/theme/integration-themes.test.mjs +30 -6
- package/api/theme/list/list.d.mts +10 -0
- package/api/theme/list/list.mjs +75 -7
- package/api/theme/list/list.test.mjs +155 -4
- package/api/theme/remove/remove.d.mts +12 -0
- package/api/theme/remove/remove.mjs +15 -0
- package/api/theme/remove/remove.test.mjs +94 -0
- package/api/theme/template/template.mjs +3 -4
- package/api/theme/theme.d.mts +5 -2
- package/api/theme/theme.mjs +13 -8
- package/api/theme/theme.type.d.mts +106 -2
- package/api/theme/theme.type.mjs +54 -5
- package/api/theme/themeAdd.doc.d.mts +1 -3
- package/api/theme/themeAdd.doc.mjs +35 -22
- package/api/theme/themeBuild.doc.d.mts +4 -1
- package/api/theme/themeBuild.doc.mjs +15 -4
- package/api/theme/themeEject.doc.d.mts +8 -0
- package/api/theme/themeEject.doc.mjs +89 -0
- package/api/theme/themeListAvailable.doc.mjs +4 -4
- package/api/theme/themeListCopySources.doc.d.mts +8 -0
- package/api/theme/themeListCopySources.doc.mjs +60 -0
- package/api/theme/themeRemove.doc.d.mts +6 -0
- package/api/theme/themeRemove.doc.mjs +50 -0
- package/api/theme/themeTemplate.doc.mjs +4 -3
- package/api/theme/themeUse.doc.d.mts +6 -0
- package/api/theme/themeUse.doc.mjs +47 -0
- package/api/theme/use/use.d.mts +12 -0
- package/api/theme/use/use.mjs +15 -0
- package/api/theme/use/use.test.mjs +98 -0
- package/api/upgrade/_adapter.d.mts +1 -0
- package/api/upgrade/_adapter.mjs +3 -0
- package/api/upgrade/list/list.mjs +9 -3
- package/api/upgrade/run/run.mjs +20 -3
- package/api/upgrade/run/run.test.mjs +45 -1
- package/api/upgrade/upgrade.doc.mjs +1 -1
- package/api/upgrade/upgrade.type.d.mts +5 -0
- package/api/upgrade/upgrade.type.mjs +2 -0
- package/assets/codemods/integration-discovery.mjs +1 -1
- package/assets/codemods/integration-discovery.test.mjs +64 -0
- package/assets/codemods/transforms/next/__tests__/migrate-copied-themes-to-descriptors.test.mjs +129 -0
- package/assets/codemods/transforms/next/index.mjs +14 -1
- package/assets/codemods/transforms/next/migrate-copied-themes-to-descriptors.mjs +54 -0
- package/assets/docs/author-a-theme.doc.mjs +166 -0
- package/assets/docs/getting-started.doc.mjs +59 -15
- package/assets/docs/icons.doc.mjs +1 -0
- package/assets/docs/principles.doc.dense.mjs +2 -2
- package/assets/docs/principles.doc.mjs +2 -2
- package/assets/docs/principles.doc.zh.mjs +2 -2
- package/assets/docs/styling-libraries.doc.mjs +1 -1
- package/assets/docs/styling-overview.doc.mjs +211 -0
- package/assets/docs/styling.doc.mjs +2 -2
- package/assets/docs/theme.doc.dense.mjs +10 -198
- package/assets/docs/theme.doc.mjs +13 -770
- package/assets/docs/theme.doc.zh.mjs +31 -12
- package/assets/docs/tokens.doc.mjs +4 -4
- package/assets/docs/tree/add-a-theme.doc.mjs +6 -2
- package/assets/docs/tree/add-a-topic.doc.mjs +1 -1
- package/assets/docs/tree/check-your-docs.doc.mjs +2 -2
- package/assets/docs/tree/checks.doc.mjs +6 -5
- package/assets/docs/tree/debug-and-gap-reports.doc.mjs +1 -1
- package/assets/docs/tree/define-the-theme.doc.mjs +2 -2
- package/assets/docs/tree/document-the-theme.doc.mjs +4 -4
- package/assets/docs/tree/fonts-and-assets.doc.mjs +25 -20
- package/assets/docs/tree/headers-and-footers.doc.mjs +68 -0
- package/assets/docs/tree/layout-spacing.doc.mjs +168 -0
- package/assets/docs/tree/layout.doc.mjs +52 -0
- package/assets/docs/tree/replace-a-core-component.doc.mjs +21 -4
- package/assets/docs/tree/responsive.doc.mjs +102 -0
- package/assets/docs/tree/scaffold.doc.mjs +145 -0
- package/assets/docs/tree/sections-and-placement.doc.mjs +1 -1
- package/assets/docs/tree/side-panels.doc.mjs +82 -0
- package/assets/docs/tree/structure.doc.mjs +144 -0
- package/assets/docs/tree/template-doc-overview.doc.mjs +13 -1
- package/assets/docs/tree/themes.doc.mjs +2 -2
- package/assets/docs/tree/troubleshooting.doc.mjs +13 -5
- package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +22 -5
- package/assets/docs/tree/versioning.doc.mjs +11 -7
- package/assets/docs/use-a-theme.doc.mjs +212 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.tsx +38 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.doc.mjs +20 -0
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.tsx +48 -0
- package/assets/templates/pages/ai-chat/template.doc.mjs +16 -1
- package/assets/templates/pages/ai-chat-landing/template.doc.mjs +9 -1
- package/assets/templates/pages/blank/template.doc.mjs +3 -1
- package/assets/templates/pages/canvas-editor/template.doc.mjs +9 -1
- package/assets/templates/pages/centered-hero/template.doc.mjs +3 -1
- package/assets/templates/pages/checkout-wizard/template.doc.mjs +1 -0
- package/assets/templates/pages/classic-gallery/template.doc.mjs +3 -1
- package/assets/templates/pages/contact-form/template.doc.mjs +16 -1
- package/assets/templates/pages/dashboard/template.doc.mjs +15 -1
- package/assets/templates/pages/dashboard-alert-rail/template.doc.mjs +23 -1
- package/assets/templates/pages/dashboard-cohort-funnel/template.doc.mjs +10 -1
- package/assets/templates/pages/dashboard-comparison/template.doc.mjs +9 -1
- package/assets/templates/pages/dashboard-composition/template.doc.mjs +10 -1
- package/assets/templates/pages/dashboard-progress/template.doc.mjs +17 -1
- package/assets/templates/pages/dashboard-scorecard/template.doc.mjs +2 -1
- package/assets/templates/pages/detail-page/template.doc.mjs +8 -0
- package/assets/templates/pages/documentation/template.doc.mjs +10 -1
- package/assets/templates/pages/documentation-design/template.doc.mjs +10 -1
- package/assets/templates/pages/documentation-technical/template.doc.mjs +10 -1
- package/assets/templates/pages/editor/template.doc.mjs +9 -1
- package/assets/templates/pages/file-explorer/template.doc.mjs +3 -1
- package/assets/templates/pages/form-two-column/template.doc.mjs +17 -1
- package/assets/templates/pages/form-wizard/template.doc.mjs +14 -1
- package/assets/templates/pages/form-wizard-dialog/template.doc.mjs +1 -0
- package/assets/templates/pages/gallery-hero/template.doc.mjs +10 -1
- package/assets/templates/pages/ide/template.doc.mjs +9 -1
- package/assets/templates/pages/incident-console/page.tsx +1 -1
- package/assets/templates/pages/incident-console/template.doc.mjs +10 -1
- package/assets/templates/pages/kanban-board/template.doc.mjs +11 -1
- package/assets/templates/pages/library/template.doc.mjs +15 -1
- package/assets/templates/pages/login/template.doc.mjs +10 -1
- package/assets/templates/pages/login-card/template.doc.mjs +11 -1
- package/assets/templates/pages/login-split/template.doc.mjs +10 -1
- package/assets/templates/pages/login-sso/template.doc.mjs +10 -1
- package/assets/templates/pages/messaging-shell/template.doc.mjs +11 -1
- package/assets/templates/pages/mixed-gallery/template.doc.mjs +10 -1
- package/assets/templates/pages/payment-form/template.doc.mjs +3 -1
- package/assets/templates/pages/product-detail/template.doc.mjs +9 -1
- package/assets/templates/pages/product-gallery/template.doc.mjs +10 -1
- package/assets/templates/pages/settings/template.doc.mjs +3 -1
- package/assets/templates/pages/settings-dialog/template.doc.mjs +9 -1
- package/assets/templates/pages/settings-sidebar/template.doc.mjs +9 -1
- package/assets/templates/pages/shell-nav/template.doc.mjs +10 -1
- package/assets/templates/pages/shell-side-nav/template.doc.mjs +14 -1
- package/assets/templates/pages/shell-top-nav/template.doc.mjs +11 -1
- package/assets/templates/pages/side-gallery/template.doc.mjs +3 -1
- package/assets/templates/pages/table/template.doc.mjs +11 -1
- package/assets/templates/pages/table-collapsible/page.tsx +1474 -0
- package/assets/templates/pages/table-collapsible/template.doc.mjs +12 -0
- package/assets/templates/pages/table-comparison/page.tsx +1449 -0
- package/assets/templates/pages/table-comparison/template.doc.mjs +12 -0
- package/assets/templates/pages/table-filter/template.doc.mjs +21 -1
- package/assets/templates/pages/table-grouped/template.doc.mjs +15 -1
- package/assets/templates/pages/table-inbox/template.doc.mjs +18 -6
- package/assets/templates/pages/table-page/template.doc.mjs +20 -1
- package/assets/templates/pages/table-tree/template.doc.mjs +14 -1
- package/assets/templates/pages/theme-showcase/template.doc.mjs +10 -1
- package/assets/templates/pages/work-item-detail/template.doc.mjs +10 -0
- package/assets/templates/themes/butter/icons.tsx +2 -0
- package/assets/templates/themes/chocolate/icons.tsx +2 -0
- package/assets/templates/themes/gothic/icons.tsx +2 -0
- package/assets/templates/themes/matcha/icons.tsx +2 -0
- package/assets/templates/themes/neutral/icons.tsx +2 -0
- package/assets/templates/themes/stone/icons.tsx +2 -0
- package/assets/templates/themes/y2k/icons.tsx +2 -0
- package/authoring/doctypes/command/command.doc.mjs +5 -0
- package/authoring/doctypes/command/type.ts +2 -0
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/component/type.ts +8 -4
- package/authoring/doctypes/template/parse.d.mts +2 -0
- package/authoring/doctypes/template/parse.mjs +1 -0
- package/authoring/doctypes/template/parse.test.mjs +21 -0
- package/authoring/doctypes/template/template.doc.mjs +6 -0
- package/authoring/doctypes/template/type.ts +11 -0
- package/authoring/integration/integration.doc.mjs +1 -1
- package/clients/cli/commands/blog.mjs +3 -3
- package/clients/cli/commands/build-theme.adaptations.test.mjs +1 -1
- package/clients/cli/commands/build-theme.ascii-output.test.mjs +11 -1
- package/clients/cli/commands/build-theme.batch-report.test.mjs +335 -0
- package/clients/cli/commands/build-theme.font-warning.test.mjs +36 -7
- package/clients/cli/commands/build-theme.import-path.test.mjs +3 -3
- package/clients/cli/commands/build-theme.mjs +346 -47
- package/clients/cli/commands/build-theme.watch.test.mjs +33 -0
- package/clients/cli/commands/build.mjs +8 -6
- package/clients/cli/commands/build.text-fields.test.mjs +1 -1
- package/clients/cli/commands/component/index.mjs +88 -12
- package/clients/cli/commands/component-replacement.text.test.mjs +271 -0
- package/clients/cli/commands/component.doc.mjs +9 -2
- package/clients/cli/commands/discover.mjs +29 -1
- package/clients/cli/commands/discover.no-source.test.mjs +75 -0
- package/clients/cli/commands/docs.depth.test.mjs +219 -0
- package/clients/cli/commands/docs.doc.mjs +15 -2
- package/clients/cli/commands/docs.mjs +273 -16
- package/clients/cli/commands/docs.test.mjs +383 -0
- package/clients/cli/commands/doctor-integration-components.doc.mjs +15 -4
- package/clients/cli/commands/doctor.doc.mjs +1 -1
- package/clients/cli/commands/doctor.mjs +4 -4
- package/clients/cli/commands/doctor.test.mjs +26 -52
- package/clients/cli/commands/gap-report.doc.mjs +2 -2
- package/clients/cli/commands/gap-report.mjs +12 -0
- package/clients/cli/commands/gap-report.test.mjs +63 -0
- package/clients/cli/commands/hook/index.mjs +7 -2
- package/clients/cli/commands/import-hint-correctness.test.mjs +28 -5
- package/clients/cli/commands/init.next-steps.test.mjs +18 -23
- package/clients/cli/commands/integration-add.doc.mjs +10 -0
- package/clients/cli/commands/integration-authoring.test.mjs +12 -2
- package/clients/cli/commands/integration-real-world.test.mjs +61 -12
- package/clients/cli/commands/integration.mjs +3 -1
- package/clients/cli/commands/layout-check.doc.mjs +2 -0
- package/clients/cli/commands/layout-expand.doc.mjs +5 -1
- package/clients/cli/commands/layout-grammar.doc.mjs +2 -0
- package/clients/cli/commands/layout.deprecation-lifecycle.test.mjs +140 -0
- package/clients/cli/commands/layout.doc.mjs +2 -0
- package/clients/cli/commands/layout.expand-receipt.test.mjs +94 -0
- package/clients/cli/commands/layout.mjs +56 -4
- package/clients/cli/commands/no-prompt-wording.test.mjs +4 -4
- package/clients/cli/commands/search.doc.mjs +5 -4
- package/clients/cli/commands/search.mjs +30 -6
- package/clients/cli/commands/search.test.mjs +69 -19
- package/clients/cli/commands/swizzle.doc.mjs +12 -3
- package/clients/cli/commands/swizzle.mjs +2 -1
- package/clients/cli/commands/swizzle.routing.test.mjs +2 -1
- package/clients/cli/commands/template.copy-receipt.test.mjs +60 -0
- package/clients/cli/commands/template.mjs +71 -6
- package/clients/cli/commands/template.show-media.test.mjs +62 -0
- package/clients/cli/commands/text-json-parity.test.mjs +40 -0
- package/clients/cli/commands/theme-add-lifecycle.test.mjs +135 -0
- package/clients/cli/commands/theme-add.doc.mjs +19 -19
- package/clients/cli/commands/theme-build.doc.mjs +3 -1
- package/clients/cli/commands/theme-eject.doc.mjs +47 -0
- package/clients/cli/commands/theme-list.behavior.test.mjs +44 -0
- package/clients/cli/commands/theme-list.doc.mjs +2 -2
- package/clients/cli/commands/theme-palette-generate.doc.mjs +1 -2
- package/clients/cli/commands/theme-remove.doc.mjs +22 -0
- package/clients/cli/commands/theme-template.doc.mjs +4 -3
- package/clients/cli/commands/theme-use.doc.mjs +22 -0
- package/clients/cli/commands/theme.doc.mjs +21 -16
- package/clients/cli/commands/upgrade.ascii-output.test.mjs +14 -0
- package/clients/cli/commands/upgrade.config-ordering.test.mjs +2 -1
- package/clients/cli/commands/upgrade.mjs +1 -1
- package/clients/cli/commands/write-failure.test.mjs +175 -0
- package/clients/cli/index.mjs +5 -2
- package/clients/cli/lib/component-format.mjs +19 -2
- package/clients/cli/lib/component-format.test.mjs +1 -1
- package/clients/cli/lib/define-command.mjs +4 -0
- package/clients/cli/lib/manifest.mjs +44 -165
- package/clients/cli/lib/manifest.test.mjs +98 -7
- package/clients/cli/lib/resolve-theme.mjs +80 -78
- package/clients/cli/lib/resolve-theme.test.mjs +523 -27
- package/foundation/agent-docs/agent-docs.mjs +34 -28
- package/foundation/agent-docs/agent-docs.test.mjs +1181 -0
- package/foundation/agent-docs/app-theme-workflow.test.mjs +13 -0
- package/foundation/config/project.d.mts +20 -5
- package/foundation/config/project.mjs +43 -6
- package/foundation/config/theme-private-vars.d.mts +12 -0
- package/foundation/config/theme-private-vars.mjs +107 -0
- package/foundation/config/theme-private-vars.test.mjs +55 -0
- package/foundation/config/theme-state.d.mts +145 -0
- package/foundation/config/theme-state.mjs +417 -0
- package/foundation/config/theme-state.test.mjs +182 -0
- package/foundation/discovery/component-discovery.d.mts +5 -2
- package/foundation/discovery/component-discovery.mjs +12 -6
- package/foundation/discovery/component-replacement.d.mts +91 -0
- package/foundation/discovery/component-replacement.mjs +417 -0
- package/foundation/discovery/component-replacement.test.mjs +480 -0
- package/foundation/discovery/docs-output-budget.d.mts +6 -2
- package/foundation/discovery/docs-output-budget.mjs +2 -1
- package/foundation/discovery/docs-section-key.d.mts +4 -2
- package/foundation/discovery/docs-section-key.mjs +1 -1
- package/foundation/discovery/module-exports.d.mts +10 -0
- package/foundation/discovery/module-exports.mjs +146 -0
- package/foundation/discovery/package-exports.d.mts +29 -0
- package/foundation/discovery/package-exports.mjs +200 -0
- package/foundation/discovery/template-adapter.d.mts +14 -0
- package/foundation/discovery/template-adapter.fixture-refs.test.mjs +37 -1
- package/foundation/discovery/template-adapter.mjs +21 -1
- package/foundation/discovery/template-needs.d.mts +31 -0
- package/foundation/discovery/template-needs.mjs +156 -0
- package/foundation/discovery/template-needs.test.mjs +203 -0
- package/foundation/discovery/theme-discovery.d.mts +78 -5
- package/foundation/discovery/theme-discovery.mjs +143 -18
- package/foundation/discovery/theme-discovery.test.mjs +9 -3
- package/foundation/discovery/theme-imports.d.mts +15 -0
- package/foundation/discovery/theme-imports.mjs +217 -0
- package/foundation/discovery/theme-imports.test.mjs +173 -0
- package/foundation/doc-compiler/doc-loads.test.mjs +18 -8
- package/foundation/doc-compiler/inputs.mjs +2 -1
- package/foundation/doc-compiler/inputs.test.mjs +0 -1
- package/foundation/doc-compiler/lenses.d.mts +4 -2
- package/foundation/doc-compiler/lenses.mjs +1 -1
- package/foundation/doc-compiler/tree.test.mjs +649 -0
- package/foundation/env/package-manager.d.mts +28 -8
- package/foundation/env/package-manager.mjs +49 -10
- package/foundation/env/package-manager.test.mjs +93 -1
- package/foundation/fs/module-loader.d.mts +9 -0
- package/foundation/fs/module-loader.mjs +71 -2
- package/foundation/integrations/cli-requirement.d.mts +79 -13
- package/foundation/integrations/cli-requirement.mjs +115 -22
- package/foundation/integrations/cli-requirement.test.mjs +205 -8
- package/foundation/integrations/contribution-inventory.mjs +3 -3
- package/foundation/response/base.d.ts +9 -3
- package/foundation/response/json.d.mts +7 -4
- package/foundation/response/json.mjs +10 -6
- package/foundation/response/response-types.doc.d.mts +5 -5
- package/foundation/response/response-types.doc.mjs +52 -37
- package/foundation/response/response.doc.mjs +18 -4
- package/foundation/text/copyright-header.mjs +1 -1
- package/foundation/text/copyright-header.test.mjs +1 -1
- package/package.json +9 -9
- package/assets/docs/layout.doc.dense.mjs +0 -388
- package/assets/docs/layout.doc.mjs +0 -550
|
@@ -21,19 +21,24 @@ export const docs = {
|
|
|
21
21
|
content: [
|
|
22
22
|
{
|
|
23
23
|
type: 'prose',
|
|
24
|
-
text: '
|
|
24
|
+
text: 'Install the integration, then run `theme add --import` with its slug and package. The command records the package owner and regenerates one app theme module that imports the built theme, production CSS, and optional font CSS. Plain `theme add` still copies source while that default is deprecated.',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: 'code',
|
|
28
|
+
lang: 'bash',
|
|
29
|
+
code: 'npm install @acme/astryx-widgets\nnpx astryx theme add ocean --import --package @acme/astryx-widgets',
|
|
25
30
|
},
|
|
26
31
|
{
|
|
27
32
|
type: 'code',
|
|
28
33
|
lang: 'tsx',
|
|
29
34
|
code: `import {Theme} from '@astryxdesign/core/theme';
|
|
30
|
-
import {
|
|
35
|
+
import {themes, defaultThemeSlug} from './astryx-themes';
|
|
31
36
|
|
|
32
|
-
<Theme theme={
|
|
37
|
+
<Theme theme={themes[defaultThemeSlug]}>{/* app */}</Theme>`,
|
|
33
38
|
},
|
|
34
39
|
{
|
|
35
40
|
type: 'prose',
|
|
36
|
-
text: '
|
|
41
|
+
text: '`theme list` shows the available, added, and default themes. Use `theme use <slug>` to change the default, `theme remove <slug>` to stop importing one, and `theme eject <slug>` only when the app needs an independent source fork. Applying a theme — `mode`, SSR, and the production build — works the same for every theme; see {@link generic:use-a-theme}.',
|
|
37
42
|
},
|
|
38
43
|
],
|
|
39
44
|
},
|
|
@@ -43,7 +48,19 @@ import {oceanTheme} from '@acme/astryx-widgets/themes/ocean';
|
|
|
43
48
|
content: [
|
|
44
49
|
{
|
|
45
50
|
type: 'prose',
|
|
46
|
-
text: '
|
|
51
|
+
text: 'For ordinary customization, do not copy the package source. Import the built theme and derive a new one with `defineTheme({extends: importedTheme, ...})`, overriding only the tokens the app changes. Use `theme eject` only when the app must own an independent source fork. See {@link generic:define-the-theme}.',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: 'code',
|
|
55
|
+
lang: 'ts',
|
|
56
|
+
code: `import {defineTheme} from '@astryxdesign/core/theme';
|
|
57
|
+
import {oceanTheme} from '@acme/astryx-widgets/themes/ocean';
|
|
58
|
+
|
|
59
|
+
export const productTheme = defineTheme({
|
|
60
|
+
name: 'product',
|
|
61
|
+
extends: oceanTheme,
|
|
62
|
+
tokens: {'--color-accent': ['#0051a3', '#4aa3ff']},
|
|
63
|
+
});`,
|
|
47
64
|
},
|
|
48
65
|
],
|
|
49
66
|
},
|
|
@@ -60,7 +60,10 @@ export const docs = {
|
|
|
60
60
|
'A template id, such as `acme-dashboard`',
|
|
61
61
|
'`npx astryx template acme-dashboard`',
|
|
62
62
|
],
|
|
63
|
-
[
|
|
63
|
+
[
|
|
64
|
+
'A theme slug, such as `ocean`',
|
|
65
|
+
'`npx astryx theme add ocean --import`',
|
|
66
|
+
],
|
|
64
67
|
[
|
|
65
68
|
'A topic name or route, such as `acme/deploying`',
|
|
66
69
|
'Reads of the old name, and links to it from other docs',
|
|
@@ -106,19 +109,19 @@ export const docs = {
|
|
|
106
109
|
],
|
|
107
110
|
[
|
|
108
111
|
'`@astryxdesign/cli`',
|
|
109
|
-
'You ship a docs section, a placed guide, a template that sets `replaces`, a doc section with an `id`, or a theme',
|
|
110
|
-
'`>=0.7.0`,
|
|
112
|
+
'You ship a docs section, a placed guide, a template that sets `replaces` or `keywords`, a doc section with an `id`, or a theme',
|
|
113
|
+
'`>=0.7.0` when you ship a template that sets `replaces` or `keywords`, otherwise `>=0.6.4`. Optional in `peerDependenciesMeta`',
|
|
111
114
|
],
|
|
112
115
|
],
|
|
113
116
|
},
|
|
114
117
|
{
|
|
115
118
|
type: 'code',
|
|
116
119
|
lang: 'json',
|
|
117
|
-
code: '{\n "peerDependencies": {\n "@astryxdesign/core": "^0.6.0",\n "@astryxdesign/cli": ">=0.
|
|
120
|
+
code: '{\n "peerDependencies": {\n "@astryxdesign/core": "^0.6.0",\n "@astryxdesign/cli": ">=0.6.4"\n },\n "peerDependenciesMeta": {\n "@astryxdesign/cli": {"optional": true}\n }\n}',
|
|
118
121
|
},
|
|
119
122
|
{
|
|
120
123
|
type: 'prose',
|
|
121
|
-
text: '`integration verify` fails a package that needs the CLI peer and lacks it, or whose range admits a stable CLI
|
|
124
|
+
text: '`integration verify` fails a package that needs the CLI peer and lacks it, or whose range admits a stable CLI too old for what it ships. `integration add doc --parent` and `integration add theme` write the peer for you.',
|
|
122
125
|
},
|
|
123
126
|
],
|
|
124
127
|
},
|
|
@@ -137,13 +140,14 @@ export const docs = {
|
|
|
137
140
|
'An unknown field in `astryx.integration.mjs` is ignored with an `unknown_manifest_key` warning, and the rest of the manifest still loads.',
|
|
138
141
|
'A named export that the CLI does not know is ignored with no warning, so `debug` and `gapReport` are safe to add.',
|
|
139
142
|
'A stable CLI before 0.7.0 prints each `{@link ...}` as written.',
|
|
140
|
-
'A stable CLI before 0.7.0
|
|
143
|
+
'A stable CLI before 0.7.0 rejects a template that sets `replaces` or `keywords`, drops that template, and can hide every doc topic your package ships.',
|
|
144
|
+
'A stable CLI before 0.6.4 cannot read a docs section, a section `id`, or a theme folder that `integration add theme` writes. It can then hide every doc topic your package ships.',
|
|
141
145
|
'Stable 0.6.3 still loads your components, but 0.6.0 cannot read the component docs that `integration add component` writes: `component AcmeCarousel` fails there.',
|
|
142
146
|
],
|
|
143
147
|
},
|
|
144
148
|
{
|
|
145
149
|
type: 'prose',
|
|
146
|
-
text: '`integration verify` requires the CLI peer for a docs section, a placed guide, a template `replaces`, a doc section with an `id`, and a theme. A
|
|
150
|
+
text: '`integration verify` requires the CLI peer for a docs section, a placed guide, a template `replaces` or `keywords`, a doc section with an `id`, and a theme. A CLI too old for one of them cannot read it, and when it hides your topics, `docs` gives no warning.',
|
|
147
151
|
},
|
|
148
152
|
],
|
|
149
153
|
},
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
|
|
4
|
+
|
|
5
|
+
export const docs = {
|
|
6
|
+
name: 'use-a-theme',
|
|
7
|
+
title: 'Use a theme',
|
|
8
|
+
category: 'guide',
|
|
9
|
+
keywords: ['theme', 'Theme', 'dark mode', 'light', 'nested', 'provider', 'SSR', 'built', 'runtime', 'neutralTheme', 'available themes', 'theme add', 'import', 'astryx-themes', 'eject'],
|
|
10
|
+
description:
|
|
11
|
+
'Apply a theme to your app: install, import with the CLI, wire the generated module, switch dark mode, nest themes, and choose runtime or built for production.',
|
|
12
|
+
|
|
13
|
+
sections: [
|
|
14
|
+
{
|
|
15
|
+
id: 'quick-start',
|
|
16
|
+
title: 'Wrap your app in a theme',
|
|
17
|
+
content: [
|
|
18
|
+
{
|
|
19
|
+
type: 'code',
|
|
20
|
+
lang: 'bash',
|
|
21
|
+
label: 'Install and add a theme',
|
|
22
|
+
code: 'npm install @astryxdesign/theme-neutral\nastryx theme add neutral --import',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: 'code',
|
|
26
|
+
lang: 'tsx',
|
|
27
|
+
label: 'Wire the generated module once',
|
|
28
|
+
code: "import {Theme} from '@astryxdesign/core';\nimport {themes, defaultThemeSlug} from './astryx-themes';\n\nfunction App() {\n return (\n <Theme theme={themes[defaultThemeSlug]}>\n <YourApp />\n </Theme>\n );\n}",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: 'code',
|
|
32
|
+
lang: 'tsx',
|
|
33
|
+
label: 'Switch among added themes',
|
|
34
|
+
code: "import {useState} from 'react';\nimport {Theme} from '@astryxdesign/core';\nimport {themes, type ThemeSlug} from './astryx-themes';\n\nconst [slug, setSlug] = useState<ThemeSlug>('neutral');\nconst app = <Theme theme={themes[slug]}><YourApp /></Theme>;",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: 'prose',
|
|
38
|
+
text: '`theme add --import` records an installed package theme and regenerates `src/astryx-themes.ts` or `.js` with its built module, production CSS, and optional font CSS. In a project without `src`, the module is at the project root. The first imported theme becomes the default. `theme use <slug>` changes that default, and `theme remove <slug>` removes a non-default theme.',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'prose',
|
|
42
|
+
text: 'Customize a package theme with `defineTheme({extends: importedTheme, ...})`, then build and add that local theme. Use `theme eject` only when you want an independent source fork that no longer receives the package owner\'s updates. For the full authoring guide, see {@link generic:author-a-theme}.',
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: 'Migrating Earlier Theme Copies',
|
|
48
|
+
content: [
|
|
49
|
+
{
|
|
50
|
+
type: 'prose',
|
|
51
|
+
text: 'A theme copied by the released `theme add` stays app source. The upgrade does not move, delete, or rewrite it. It only writes the missing same-stem descriptor with `maintained: false`, so the copy becomes a local theme.',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
type: 'code',
|
|
55
|
+
lang: 'bash',
|
|
56
|
+
label: 'Add descriptors to earlier copies',
|
|
57
|
+
code: 'astryx upgrade --from 0.6.4 --path . --apply',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: 'prose',
|
|
61
|
+
text: 'Before the upgrade runs, theme commands skip a descriptor-less copy in `src/themes`. `theme list` and doctor name it as unmigrated and show the upgrade command. A script that meant to copy source now runs `theme eject` with the same arguments. A script that meant to make the app use a theme runs `theme add --import`.',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'prose',
|
|
65
|
+
text: '`ASTRYX_THEME` is no longer read. Run `theme add <slug> --import` and `theme use <slug>` to choose the default in a generated app theme module. When that module exists, component metadata reads its recorded default theme. Without the module, the released `package.json#astryx.theme` lookup keeps its meaning.',
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: 'Available Themes',
|
|
71
|
+
content: [
|
|
72
|
+
{
|
|
73
|
+
type: 'prose',
|
|
74
|
+
text: 'Install the theme package you want with `npm install @astryxdesign/theme-{name}`, then import its slug with `theme add <slug> --import`. The CLI imports the package\'s built outputs for you.',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'table',
|
|
78
|
+
headers: ['Theme', 'Add command', 'Description'],
|
|
79
|
+
rows: [
|
|
80
|
+
['Neutral', 'astryx theme add neutral --import', 'Muted, minimal aesthetic with Figtree typography. A good starting point.'],
|
|
81
|
+
['Butter', 'astryx theme add butter --import', 'Golden, buttery surfaces with blue accents; Sarina + Outfit type.'],
|
|
82
|
+
['Chocolate', 'astryx theme add chocolate --import', 'Warm brown tones and cozy beige; Fraunces + Albert Sans type.'],
|
|
83
|
+
['Gothic', 'astryx theme add gothic --import', 'Dark-only atmospheric theme; deep blue-gray surfaces, distressed display type.'],
|
|
84
|
+
['Matcha', 'astryx theme add matcha --import', 'Earthy greens; DM Sans + Playwrite US Trad type.'],
|
|
85
|
+
['Stone', 'astryx theme add stone --import', 'Warm stone and slate tones; Montserrat + Figtree type.'],
|
|
86
|
+
['Y2K', 'astryx theme add y2k --import', 'Playful Y2K pop; periwinkle body, holographic accents, Poppins + Crimson Text.'],
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
type: 'prose',
|
|
91
|
+
text: 'Every first-party package exports its built theme at `@astryxdesign/theme-{name}/built`, production CSS at `/theme.css`, and font loading CSS at `/fonts.css`. `theme add --import` writes those imports into the generated app module.',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: 'Theme Props',
|
|
97
|
+
content: [
|
|
98
|
+
{
|
|
99
|
+
type: 'prose',
|
|
100
|
+
text: "`<Theme>` takes `theme` (required), `mode` (`'system'` by default, or `'light'`/`'dark'`), and `children`. For every prop, run `astryx component Theme`.",
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 'integration-themes',
|
|
106
|
+
title: 'Using a Theme from an Integration',
|
|
107
|
+
content: [
|
|
108
|
+
{
|
|
109
|
+
type: 'prose',
|
|
110
|
+
text: 'Install the integration as a direct dependency. Astryx discovers its themes and guides without an `astryx.config` entry. A theme can be added only when the installed package exports its built module and production stylesheet.',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: 'code',
|
|
114
|
+
lang: 'bash',
|
|
115
|
+
label: 'Install, inspect, and add',
|
|
116
|
+
code: 'npm install @astryxdesign/core @acme/brand-integration\nastryx theme list --package @acme/brand-integration\nastryx docs brand-theme\nastryx theme add ocean --import --package @acme/brand-integration',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: 'prose',
|
|
120
|
+
text: '`theme add --import` keeps the owner package in the app record and imports its built module, stylesheet, and optional font stylesheet. Package updates continue to reach the app. Run `theme eject ocean --package @acme/brand-integration` only to copy the source and descriptor into `src/themes/ocean` as an independent local fork.',
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: 'light-dark-mode',
|
|
126
|
+
title: 'Dark mode',
|
|
127
|
+
content: [
|
|
128
|
+
{
|
|
129
|
+
type: 'prose',
|
|
130
|
+
text: "Use [light, dark] tuples in token values for automatic mode switching. Use mode='system' (default) on Theme to follow OS preference.",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: 'code',
|
|
134
|
+
lang: 'tsx',
|
|
135
|
+
label: 'Light/dark tuple',
|
|
136
|
+
code: "'--color-accent': ['#0064E0', '#2694FE'],\n// ^light ^dark",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
type: 'code',
|
|
140
|
+
lang: 'tsx',
|
|
141
|
+
label: 'Toggle with a button',
|
|
142
|
+
code: "const [mode, setMode] = useState<'light' | 'dark'>('light');\n\n<Theme theme={myTheme} mode={mode}>\n <Button\n label={mode === 'light' ? 'Switch to Dark' : 'Switch to Light'}\n onClick={() => setMode(m => (m === 'light' ? 'dark' : 'light'))}\n />\n</Theme>;",
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: 'prose',
|
|
146
|
+
text: 'To create a theme with custom dark mode colors, see {@link generic:author-a-theme}.',
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
id: 'nesting-themes',
|
|
152
|
+
title: 'Nested themes',
|
|
153
|
+
content: [
|
|
154
|
+
{
|
|
155
|
+
type: 'prose',
|
|
156
|
+
text: 'Wrap different sections in separate `<Theme>` providers.',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
type: 'code',
|
|
160
|
+
lang: 'tsx',
|
|
161
|
+
label: 'Dark sidebar with light content',
|
|
162
|
+
code: "<Theme theme={lightTheme} mode=\"light\">\n <Layout\n header={<LayoutHeader>...</LayoutHeader>}\n start={\n <Theme theme={darkTheme} mode=\"dark\">\n <LayoutPanel>{/* Dark sidebar */}</LayoutPanel>\n </Theme>\n }\n content={<LayoutContent>{/* Light content */}</LayoutContent>}\n />\n</Theme>",
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
title: 'Runtime vs Built Themes',
|
|
168
|
+
content: [
|
|
169
|
+
{
|
|
170
|
+
type: 'prose',
|
|
171
|
+
text: 'Themes work in two modes:',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
type: 'table',
|
|
175
|
+
headers: ['', 'Runtime (source)', 'Built'],
|
|
176
|
+
rows: [
|
|
177
|
+
['Import (published theme)', '@astryxdesign/theme-{name}', '@astryxdesign/theme-{name}/built + theme.css'],
|
|
178
|
+
['Import (custom theme)', 'defineTheme() directly', 'Built .js + .css from `astryx theme build`'],
|
|
179
|
+
['How it works', 'useInsertionEffect injects <style> at hydration', 'Pre-compiled .css file loaded with the page'],
|
|
180
|
+
['Component overrides', 'Injected client-only', 'In static CSS: present during SSR'],
|
|
181
|
+
['SSR safe', 'Tokens yes, component overrides flash on hydration', 'Fully SSR safe: no flash'],
|
|
182
|
+
['Best for', 'Authoring input for `astryx theme build`', 'App wiring, in development and production'],
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
type: 'list',
|
|
187
|
+
style: 'do',
|
|
188
|
+
items: [
|
|
189
|
+
'Use `theme add --import` for production apps; it wires the built module and CSS.',
|
|
190
|
+
'Import `themes` and `defaultThemeSlug` from the generated module once, and keep that wiring in development too.',
|
|
191
|
+
'While you edit a local theme, run `astryx theme build --watch` so its built files stay current.',
|
|
192
|
+
'Run `astryx theme build` for custom themes to get the built artifacts.',
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
type: 'list',
|
|
197
|
+
style: 'dont',
|
|
198
|
+
items: [
|
|
199
|
+
'Use runtime themes in production SSR apps; component overrides will flash on hydration.',
|
|
200
|
+
"Import /built without the CSS file; component overrides won't apply.",
|
|
201
|
+
'Import package theme source into app runtime code.',
|
|
202
|
+
'Hand-edit the generated theme module; `theme add`, `theme remove`, and `theme use` regenerate it.',
|
|
203
|
+
],
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
type: 'prose',
|
|
207
|
+
text: 'To build a custom theme for production, see the Build section of {@link generic:author-a-theme}.',
|
|
208
|
+
},
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
};
|
package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.doc.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'DropdownMenuGroup',
|
|
7
|
+
name: 'DropdownMenuGroup',
|
|
8
|
+
displayName: 'Dropdown Menu Group',
|
|
9
|
+
description:
|
|
10
|
+
'A compound-mode menu whose rows are titled in groups. Each DropdownMenuGroup renders a role="group" named by its heading; arrow keys and typeahead skip the heading.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
isShowcase: true,
|
|
13
|
+
aspectRatio: 16 / 9,
|
|
14
|
+
componentsUsed: ['DropdownMenu', 'DropdownMenuGroup', 'DropdownMenuItem'],
|
|
15
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
DropdownMenu,
|
|
7
|
+
DropdownMenuDivider,
|
|
8
|
+
DropdownMenuGroup,
|
|
9
|
+
DropdownMenuItem,
|
|
10
|
+
} from '@astryxdesign/core/DropdownMenu';
|
|
11
|
+
|
|
12
|
+
export default function DropdownMenuGroupShowcase() {
|
|
13
|
+
return (
|
|
14
|
+
<DropdownMenu button={{label: 'Version'}}>
|
|
15
|
+
<DropdownMenuGroup title="Version history">
|
|
16
|
+
<DropdownMenuItem
|
|
17
|
+
icon="arrowDown"
|
|
18
|
+
label="Restore this version"
|
|
19
|
+
onClick={() => {}}
|
|
20
|
+
/>
|
|
21
|
+
<DropdownMenuItem
|
|
22
|
+
icon="copy"
|
|
23
|
+
label="Compare with current"
|
|
24
|
+
onClick={() => {}}
|
|
25
|
+
/>
|
|
26
|
+
</DropdownMenuGroup>
|
|
27
|
+
<DropdownMenuDivider />
|
|
28
|
+
<DropdownMenuGroup title="Add to message">
|
|
29
|
+
<DropdownMenuItem
|
|
30
|
+
icon="externalLink"
|
|
31
|
+
label="As a link"
|
|
32
|
+
onClick={() => {}}
|
|
33
|
+
/>
|
|
34
|
+
<DropdownMenuItem label="As a snippet" onClick={() => {}} />
|
|
35
|
+
</DropdownMenuGroup>
|
|
36
|
+
</DropdownMenu>
|
|
37
|
+
);
|
|
38
|
+
}
|
package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.doc.mjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'DropdownMenuGroup',
|
|
7
|
+
name: 'DropdownMenuGroup — Selectable rows',
|
|
8
|
+
displayName: 'DropdownMenuGroup — Selectable rows',
|
|
9
|
+
description:
|
|
10
|
+
'Titled groups around a radio group and checkbox rows — the rows the data API cannot express, which is why the heading lives in compound mode.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 16 / 9,
|
|
13
|
+
componentsUsed: [
|
|
14
|
+
'DropdownMenu',
|
|
15
|
+
'DropdownMenuGroup',
|
|
16
|
+
'DropdownMenuRadioGroup',
|
|
17
|
+
'DropdownMenuRadioItem',
|
|
18
|
+
'DropdownMenuCheckboxItem',
|
|
19
|
+
],
|
|
20
|
+
};
|
package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupWithSelectable.tsx
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
import {
|
|
7
|
+
DropdownMenu,
|
|
8
|
+
DropdownMenuCheckboxItem,
|
|
9
|
+
DropdownMenuDivider,
|
|
10
|
+
DropdownMenuGroup,
|
|
11
|
+
DropdownMenuRadioGroup,
|
|
12
|
+
DropdownMenuRadioItem,
|
|
13
|
+
} from '@astryxdesign/core/DropdownMenu';
|
|
14
|
+
|
|
15
|
+
export default function DropdownMenuGroupWithSelectable() {
|
|
16
|
+
const [model, setModel] = useState('balanced');
|
|
17
|
+
const [notify, setNotify] = useState(true);
|
|
18
|
+
const [retry, setRetry] = useState(false);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<DropdownMenu button={{label: 'Run settings'}}>
|
|
22
|
+
<DropdownMenuGroup title="Model">
|
|
23
|
+
<DropdownMenuRadioGroup
|
|
24
|
+
label="Model"
|
|
25
|
+
value={model}
|
|
26
|
+
onChange={setModel}
|
|
27
|
+
hasCloseOnSelect={false}>
|
|
28
|
+
<DropdownMenuRadioItem value="fast" label="Fast" />
|
|
29
|
+
<DropdownMenuRadioItem value="balanced" label="Balanced" />
|
|
30
|
+
<DropdownMenuRadioItem value="thorough" label="Thorough" />
|
|
31
|
+
</DropdownMenuRadioGroup>
|
|
32
|
+
</DropdownMenuGroup>
|
|
33
|
+
<DropdownMenuDivider />
|
|
34
|
+
<DropdownMenuGroup title="On completion">
|
|
35
|
+
<DropdownMenuCheckboxItem
|
|
36
|
+
label="Notify me"
|
|
37
|
+
value={notify}
|
|
38
|
+
onChange={setNotify}
|
|
39
|
+
/>
|
|
40
|
+
<DropdownMenuCheckboxItem
|
|
41
|
+
label="Retry on failure"
|
|
42
|
+
value={retry}
|
|
43
|
+
onChange={setRetry}
|
|
44
|
+
/>
|
|
45
|
+
</DropdownMenuGroup>
|
|
46
|
+
</DropdownMenu>
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -5,7 +5,22 @@ export const doc = {
|
|
|
5
5
|
type: 'page',
|
|
6
6
|
name: 'AI Chat Conversation',
|
|
7
7
|
displayName: 'AI Chat Conversation',
|
|
8
|
-
description:
|
|
8
|
+
description:
|
|
9
|
+
'Transcript of alternating turns carrying mixed rich content inline (markdown, code blocks, collapsible tool-call output) beside a resizable artifact panel that holds generated output while the stream keeps scrolling.',
|
|
10
|
+
keywords: [
|
|
11
|
+
'chat',
|
|
12
|
+
'conversation',
|
|
13
|
+
'assistant',
|
|
14
|
+
'messages',
|
|
15
|
+
'copilot thread',
|
|
16
|
+
'agent',
|
|
17
|
+
'session',
|
|
18
|
+
'composer',
|
|
19
|
+
'questions',
|
|
20
|
+
'answers with citations',
|
|
21
|
+
'reasoning trace',
|
|
22
|
+
'prompt playground',
|
|
23
|
+
],
|
|
9
24
|
isReady: true,
|
|
10
25
|
category: 'AI Chat - Conversation',
|
|
11
26
|
};
|
|
@@ -5,7 +5,15 @@ export const doc = {
|
|
|
5
5
|
type: 'page',
|
|
6
6
|
name: 'AI Chat Landing',
|
|
7
7
|
displayName: 'AI Chat Landing',
|
|
8
|
-
description:
|
|
8
|
+
description:
|
|
9
|
+
'Zero-state entry surface centered on a single composer with suggestion chips instead of history, sized for the moment before any content exists. The empty counterpart to a transcript.',
|
|
10
|
+
keywords: [
|
|
11
|
+
'chat',
|
|
12
|
+
'conversation',
|
|
13
|
+
'assistant',
|
|
14
|
+
'prompt',
|
|
15
|
+
'messages launcher',
|
|
16
|
+
],
|
|
9
17
|
isReady: true,
|
|
10
18
|
category: 'AI Chat - Landing',
|
|
11
19
|
};
|
|
@@ -5,7 +5,9 @@ export const doc = {
|
|
|
5
5
|
type: 'page',
|
|
6
6
|
name: 'Blank',
|
|
7
7
|
displayName: 'Blank',
|
|
8
|
-
description:
|
|
8
|
+
description:
|
|
9
|
+
'Bare scaffold: one heading slot, one empty content region, no navigation and no chrome. The starting point when every other layout imposes more structure than wanted.',
|
|
10
|
+
keywords: ['blank', 'empty', 'stub', 'placeholder', 'minimal scaffold'],
|
|
9
11
|
isReady: true,
|
|
10
12
|
scaffold: true,
|
|
11
13
|
category: 'Shell - Blank',
|
|
@@ -6,7 +6,15 @@ export const doc = {
|
|
|
6
6
|
name: 'Canvas Editor',
|
|
7
7
|
displayName: 'Canvas Editor',
|
|
8
8
|
description:
|
|
9
|
-
'Layered artboard workspace: document tabs over a layer rail, a fixed-size frame you zoom on a muted backdrop, and an inspector of position, type, and filter fields that retargets to the selected layer. Objects hold a coordinate rather than reflowing, so moving one never moves another.
|
|
9
|
+
'Layered artboard workspace: document tabs over a layer rail, a fixed-size frame you zoom on a muted backdrop, and an inspector of position, type, and filter fields that retargets to the selected layer. Objects hold a coordinate rather than reflowing, so moving one never moves another.',
|
|
10
|
+
keywords: [
|
|
11
|
+
'design tool',
|
|
12
|
+
'artboard',
|
|
13
|
+
'poster',
|
|
14
|
+
'graphic',
|
|
15
|
+
'image',
|
|
16
|
+
'slide editor',
|
|
17
|
+
],
|
|
10
18
|
isReady: true,
|
|
11
19
|
category: 'Tools - Canvas Editor',
|
|
12
20
|
};
|
|
@@ -5,7 +5,9 @@ export const doc = {
|
|
|
5
5
|
type: 'page',
|
|
6
6
|
name: 'Centered Hero',
|
|
7
7
|
displayName: 'Centered Hero',
|
|
8
|
-
description:
|
|
8
|
+
description:
|
|
9
|
+
'Symmetrical centered stack (headline, short blurb, paired call-to-action buttons) resting on one wide full-bleed picture, with nothing on either flank competing.',
|
|
10
|
+
keywords: ['hero', 'banner', 'splash', 'landing image', 'marketing masthead'],
|
|
9
11
|
isReady: true,
|
|
10
12
|
category: 'Gallery - Hero',
|
|
11
13
|
};
|
|
@@ -7,6 +7,7 @@ export const doc = {
|
|
|
7
7
|
displayName: 'Checkout Wizard',
|
|
8
8
|
description:
|
|
9
9
|
'Multi-step checkout, cart, order, and payment wizard with a running summary that recalculates as answers change. It adapts to its host width, renders the summary first on narrow surfaces, validates every forward path, and completes locally without sending payment.',
|
|
10
|
+
keywords: ['checkout', 'cart', 'order', 'payment'],
|
|
10
11
|
isReady: true,
|
|
11
12
|
category: 'Form - Checkout',
|
|
12
13
|
};
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
export const doc = {
|
|
5
5
|
name: 'Classic Gallery',
|
|
6
6
|
displayName: 'Classic Gallery',
|
|
7
|
-
description:
|
|
7
|
+
description:
|
|
8
|
+
'Uniform grid of equal-ratio media tiles under a centered intro, with filter tabs that narrow the set in place. Regular rhythm, unlike the variable-height masonry variant.',
|
|
9
|
+
keywords: ['gallery', 'photos', 'images', 'pictures', 'portfolio index'],
|
|
8
10
|
type: 'page',
|
|
9
11
|
isReady: true,
|
|
10
12
|
category: 'Gallery - Basic',
|
|
@@ -5,7 +5,22 @@ export const doc = {
|
|
|
5
5
|
type: 'page',
|
|
6
6
|
name: 'Contact Form',
|
|
7
7
|
displayName: 'Contact Form',
|
|
8
|
-
description:
|
|
8
|
+
description:
|
|
9
|
+
'Flat single-column form mixing control types (text, pill toggles, dropdowns, long free-text) landing on one full-width submit. No steps, no branching, no summary rail.',
|
|
10
|
+
keywords: [
|
|
11
|
+
'contact',
|
|
12
|
+
'lead capture',
|
|
13
|
+
'enquiry',
|
|
14
|
+
'survey',
|
|
15
|
+
'intake form',
|
|
16
|
+
'questionnaire',
|
|
17
|
+
'feedback',
|
|
18
|
+
'request',
|
|
19
|
+
'submission',
|
|
20
|
+
'entry',
|
|
21
|
+
'fields',
|
|
22
|
+
'upload',
|
|
23
|
+
],
|
|
9
24
|
isReady: true,
|
|
10
25
|
category: 'Form - Basic',
|
|
11
26
|
};
|
|
@@ -6,7 +6,21 @@ export const doc = {
|
|
|
6
6
|
name: 'Analytics Dashboard',
|
|
7
7
|
displayName: 'Analytics Dashboard',
|
|
8
8
|
description:
|
|
9
|
-
'Three-band analytics: a row of headline tiles, then charts, then supporting tables, all re-reading from one global filter bar. Breadth over depth, a summary surface rather than a drill-down.
|
|
9
|
+
'Three-band analytics: a row of headline tiles, then charts, then supporting tables, all re-reading from one global filter bar. Breadth over depth, a summary surface rather than a drill-down.',
|
|
10
|
+
keywords: [
|
|
11
|
+
'dashboard',
|
|
12
|
+
'overview',
|
|
13
|
+
'metrics',
|
|
14
|
+
'stats',
|
|
15
|
+
'analytics',
|
|
16
|
+
'reporting',
|
|
17
|
+
'insights',
|
|
18
|
+
'kpi tiles',
|
|
19
|
+
'widgets',
|
|
20
|
+
'donut charts',
|
|
21
|
+
'breakdowns',
|
|
22
|
+
'forecasts',
|
|
23
|
+
],
|
|
10
24
|
isReady: true,
|
|
11
25
|
category: 'Dashboard - Analytics',
|
|
12
26
|
};
|
|
@@ -6,7 +6,29 @@ export const doc = {
|
|
|
6
6
|
name: 'Service Monitoring Dashboard',
|
|
7
7
|
displayName: 'Service Monitoring Dashboard',
|
|
8
8
|
description:
|
|
9
|
-
'Always-on analytics with a triage rail: status-colored tiles with sparklines, multi-series time charts over a switchable window, and an independently scrolling alert column that folds into the content when narrow.
|
|
9
|
+
'Always-on analytics with a triage rail: status-colored tiles with sparklines, multi-series time charts over a switchable window, and an independently scrolling alert column that folds into the content when narrow.',
|
|
10
|
+
keywords: [
|
|
11
|
+
'monitoring',
|
|
12
|
+
'uptime',
|
|
13
|
+
'health',
|
|
14
|
+
'latency',
|
|
15
|
+
'alerting',
|
|
16
|
+
'incidents',
|
|
17
|
+
'observability',
|
|
18
|
+
'operations',
|
|
19
|
+
'live status',
|
|
20
|
+
'real-time',
|
|
21
|
+
'reliability',
|
|
22
|
+
'traffic',
|
|
23
|
+
'anomalies',
|
|
24
|
+
'severity',
|
|
25
|
+
'on-call',
|
|
26
|
+
'oncall',
|
|
27
|
+
'fleet',
|
|
28
|
+
'pipelines',
|
|
29
|
+
'freshness',
|
|
30
|
+
'command center',
|
|
31
|
+
],
|
|
10
32
|
isReady: true,
|
|
11
33
|
category: 'Dashboard - Monitoring',
|
|
12
34
|
};
|
|
@@ -6,7 +6,16 @@ export const doc = {
|
|
|
6
6
|
name: 'Funnel & Cohort Dashboard',
|
|
7
7
|
displayName: 'Funnel & Cohort Dashboard',
|
|
8
8
|
description:
|
|
9
|
-
'Analytics for sequence and retention questions, pairing two shapes a plain dashboard cannot hold: a staged funnel where each step reads as drop-off against the one before, and a two-axis cohort matrix rendered as a heatmap.
|
|
9
|
+
'Analytics for sequence and retention questions, pairing two shapes a plain dashboard cannot hold: a staged funnel where each step reads as drop-off against the one before, and a two-axis cohort matrix rendered as a heatmap.',
|
|
10
|
+
keywords: [
|
|
11
|
+
'conversion',
|
|
12
|
+
'drop-off',
|
|
13
|
+
'activation',
|
|
14
|
+
'churn',
|
|
15
|
+
'retention reporting',
|
|
16
|
+
'stages',
|
|
17
|
+
'segments',
|
|
18
|
+
],
|
|
10
19
|
isReady: true,
|
|
11
20
|
category: 'Dashboard - Funnel & Cohort',
|
|
12
21
|
};
|