@astryxdesign/cli 0.6.5 → 0.6.6-canary.dc3a939
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 +58 -55
- package/api/build/_adapter.d.mts +55 -2
- package/api/build/_adapter.mjs +100 -10
- package/api/build/build.doc.mjs +2 -2
- package/api/build/build.test.mjs +111 -2
- package/api/build/build.type.d.mts +8 -0
- package/api/build/build.type.mjs +2 -0
- package/api/build/kit/kit.mjs +99 -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 +43 -0
- package/api/doctor/_adapter.mjs +142 -0
- package/api/doctor/doctor.d.mts +0 -10
- package/api/doctor/doctor.doc.mjs +1 -3
- package/api/doctor/doctor.mjs +6 -123
- package/api/doctor/theme-checks.d.mts +12 -0
- package/api/doctor/theme-checks.mjs +1117 -0
- package/api/doctor/theme-checks.test.mjs +526 -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 +10 -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/expand/expand.mjs +12 -7
- package/api/layout/expand/expand.receipt.test.mjs +74 -0
- package/api/layout/layout.type.d.mts +1 -0
- package/api/layout/layout.type.mjs +1 -0
- package/api/layout/layoutExpand.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 +15 -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 +14 -0
- package/api/template/template.type.mjs +5 -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 +50 -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 +463 -155
- package/api/theme/build/build.project-core.test.mjs +165 -0
- package/api/theme/build/build.test.mjs +220 -1
- 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 +161 -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.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 +32 -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 +97 -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/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 +10 -0
- package/authoring/integration/integration.doc.mjs +1 -1
- package/clients/cli/commands/build-theme.mjs +279 -30
- package/clients/cli/commands/build.mjs +7 -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 +382 -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 +9 -51
- 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 +5 -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 +1 -0
- package/clients/cli/commands/layout-expand.doc.mjs +4 -1
- package/clients/cli/commands/layout-grammar.doc.mjs +1 -0
- package/clients/cli/commands/layout.doc.mjs +1 -0
- package/clients/cli/commands/layout.expand-receipt.test.mjs +94 -0
- package/clients/cli/commands/layout.mjs +61 -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 +63 -17
- package/clients/cli/commands/swizzle.doc.mjs +12 -3
- package/clients/cli/commands/swizzle.mjs +2 -1
- package/clients/cli/commands/template.copy-receipt.test.mjs +60 -0
- package/clients/cli/commands/template.mjs +70 -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 +132 -0
- package/clients/cli/commands/theme-add.doc.mjs +19 -19
- 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.mjs +1 -1
- package/clients/cli/commands/write-failure.test.mjs +175 -0
- package/clients/cli/index.mjs +4 -1
- package/clients/cli/lib/component-format.mjs +19 -2
- 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 +31 -28
- package/foundation/agent-docs/agent-docs.test.mjs +1163 -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/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/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 +50 -35
- 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
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* @file docs command — Print Astryx reference docs
|
|
5
5
|
*
|
|
6
6
|
* In text, every read is one level: a topic lists its sections, so a reader can
|
|
7
|
-
* open one section by its key, and `--full` prints the whole topic. `--
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* open one section by its key, and `--full` prints the whole topic. `--depth`
|
|
8
|
+
* reads a docs-tree namespace as many levels down as asked, each doc below it
|
|
9
|
+
* at --detail (brief by default: one line each). `--json` keeps the docs()
|
|
10
|
+
* contract: a topic returns its whole doc, and `--index` its sections.
|
|
10
11
|
* Supports --detail (full|compact|brief) and --lang (en|zh|dense). A code
|
|
11
12
|
* block's label prints above its fence, and table cells escape their pipes.
|
|
12
13
|
*
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
* astryx docs <topic> --full Print the whole topic
|
|
19
20
|
* astryx docs <route> Open a node of the docs tree, such as
|
|
20
21
|
* cli, cli/api, or cli/api/functions/search
|
|
22
|
+
* astryx docs <route> --depth <n|all> Read that many levels below it
|
|
21
23
|
*/
|
|
22
24
|
|
|
23
25
|
import {
|
|
@@ -32,6 +34,7 @@ import {
|
|
|
32
34
|
text,
|
|
33
35
|
code,
|
|
34
36
|
wrapText,
|
|
37
|
+
record,
|
|
35
38
|
} from '../formatters/index.mjs';
|
|
36
39
|
import {cliError} from '../lib/cli-error.mjs';
|
|
37
40
|
import {ERROR_CODES} from '../../../foundation/response/error-codes.mjs';
|
|
@@ -181,6 +184,214 @@ function formatReferenceFull(docs, detail) {
|
|
|
181
184
|
return `${header}\n\n${sections.join(sep)}`;
|
|
182
185
|
}
|
|
183
186
|
|
|
187
|
+
/**
|
|
188
|
+
* @param {string} title
|
|
189
|
+
* @param {number} level
|
|
190
|
+
* @returns {string}
|
|
191
|
+
*/
|
|
192
|
+
function treeHeading(title, level) {
|
|
193
|
+
return `${'#'.repeat(Math.max(1, Math.min(6, level)))} ${title}`;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A doc's blocks at one depth: its headings move down with it.
|
|
198
|
+
* @param {import('@astryxdesign/cli/authoring').ReferenceContentBlock[]} blocks
|
|
199
|
+
* @param {'full' | 'compact' | 'brief'} detail
|
|
200
|
+
* @param {number} headingOffset
|
|
201
|
+
* @returns {string[]}
|
|
202
|
+
*/
|
|
203
|
+
function formatTreeBlocks(blocks, detail, headingOffset) {
|
|
204
|
+
/** @type {string[]} */
|
|
205
|
+
const formatted = [];
|
|
206
|
+
for (const block of blocks) {
|
|
207
|
+
const value =
|
|
208
|
+
block.type === 'heading'
|
|
209
|
+
? treeHeading(block.text, (block.level || 3) + headingOffset)
|
|
210
|
+
: formatBlock(block, detail);
|
|
211
|
+
if (value) formatted.push(value);
|
|
212
|
+
}
|
|
213
|
+
return formatted;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @param {import('../../../api/docs/docs.type.mjs').DocsReadSection} docSection
|
|
218
|
+
* @param {'full' | 'compact' | 'brief'} detail
|
|
219
|
+
* @param {number} headingLevel
|
|
220
|
+
* @returns {string}
|
|
221
|
+
*/
|
|
222
|
+
function formatTreeSection(docSection, detail, headingLevel) {
|
|
223
|
+
const heading = treeHeading(docSection.title, headingLevel);
|
|
224
|
+
const blocks = formatTreeBlocks(docSection.content, detail, headingLevel - 2);
|
|
225
|
+
return blocks.length > 0 ? `${heading}\n\n${blocks.join('\n\n')}` : heading;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Where a route sits below the namespace a read names.
|
|
230
|
+
* @param {string} route
|
|
231
|
+
* @param {string} root
|
|
232
|
+
* @returns {string}
|
|
233
|
+
*/
|
|
234
|
+
function belowRoot(route, root) {
|
|
235
|
+
return route.startsWith(`${root}/`) ? route.slice(root.length + 1) : route;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* @param {number} count
|
|
240
|
+
* @returns {string}
|
|
241
|
+
*/
|
|
242
|
+
function docsBelow(count) {
|
|
243
|
+
return `${count} ${count === 1 ? 'doc' : 'docs'} below`;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Every child of a depth read, one row each in reading order, named by where
|
|
248
|
+
* it sits below the read's namespace.
|
|
249
|
+
* @param {import('../../../api/docs/docs.type.mjs').DocsNodeChild[]} children
|
|
250
|
+
* @param {string} root
|
|
251
|
+
* @param {string} owner the package that owns the read's namespace
|
|
252
|
+
* @returns {{name: string, summary: string}[]}
|
|
253
|
+
*/
|
|
254
|
+
function treeRows(children, root, owner) {
|
|
255
|
+
return children.flatMap(child => [
|
|
256
|
+
{
|
|
257
|
+
// A child another package owns says which one.
|
|
258
|
+
name:
|
|
259
|
+
child.package === owner
|
|
260
|
+
? belowRoot(child.route, root)
|
|
261
|
+
: `${belowRoot(child.route, root)} (${child.package})`,
|
|
262
|
+
summary: child.childCount
|
|
263
|
+
? `${childRow(child, owner).summary} (${docsBelow(child.childCount)})`
|
|
264
|
+
: childRow(child, owner).summary,
|
|
265
|
+
},
|
|
266
|
+
...(child.slots ?? []).flatMap(slot => treeRows(slot.children, root, owner)),
|
|
267
|
+
]);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* One child of a depth read with its text, under a heading for its level, and
|
|
272
|
+
* its own children below it.
|
|
273
|
+
* @param {import('../../../api/docs/docs.type.mjs').DocsNodeChild} child
|
|
274
|
+
* @param {'full' | 'compact'} detail
|
|
275
|
+
* @param {number} level
|
|
276
|
+
* @param {string} root
|
|
277
|
+
* @param {string} run
|
|
278
|
+
* @param {string} owner the package that owns the read's namespace
|
|
279
|
+
* @returns {string}
|
|
280
|
+
*/
|
|
281
|
+
function formatTreeChild(child, detail, level, root, run, owner) {
|
|
282
|
+
// A child another package owns says which one.
|
|
283
|
+
const place =
|
|
284
|
+
child.package === owner
|
|
285
|
+
? belowRoot(child.route, root)
|
|
286
|
+
: `${belowRoot(child.route, root)}, ${child.package}`;
|
|
287
|
+
const parts = [`${treeHeading(child.title, level)} (${place})`];
|
|
288
|
+
if (
|
|
289
|
+
child.summary &&
|
|
290
|
+
(child.kind === 'namespace' || child.kind === 'generic')
|
|
291
|
+
) {
|
|
292
|
+
parts.push(child.summary);
|
|
293
|
+
}
|
|
294
|
+
const content = formatTreeBlocks(child.content ?? [], detail, level - 2);
|
|
295
|
+
if (content.length > 0) parts.push(content.join('\n\n'));
|
|
296
|
+
parts.push(
|
|
297
|
+
...(child.sections ?? []).map(docSection =>
|
|
298
|
+
formatTreeSection(docSection, detail, level + 1),
|
|
299
|
+
),
|
|
300
|
+
);
|
|
301
|
+
if (child.childCount) {
|
|
302
|
+
parts.push(
|
|
303
|
+
`${docsBelow(child.childCount)}: ${run} docs ${child.route} --depth 1`,
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
for (const slot of child.slots ?? []) {
|
|
307
|
+
parts.push(
|
|
308
|
+
...slot.children.map(each =>
|
|
309
|
+
formatTreeChild(each, detail, level + 1, root, run, owner),
|
|
310
|
+
),
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
return parts.join('\n\n');
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* A depth read of a namespace: its intro, then each slot's docs as deep as
|
|
318
|
+
* asked, one line each (brief) or with their text (compact, full). A typed doc
|
|
319
|
+
* has nothing below it, so it reads as it always does.
|
|
320
|
+
* @param {import('../../../api/docs/docs.type.mjs').DocsNode} node
|
|
321
|
+
* @param {'full' | 'compact' | 'brief'} detail how the named node reads
|
|
322
|
+
* @param {'full' | 'compact' | 'brief'} childDetail how each doc below reads
|
|
323
|
+
* @param {string} run
|
|
324
|
+
*/
|
|
325
|
+
function emitTree(node, detail, childDetail, run) {
|
|
326
|
+
if (node.kind !== 'namespace') {
|
|
327
|
+
emitNode(node, detail, run);
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* @param {import('../../../api/docs/docs.type.mjs').DocsNodeChild[]} children
|
|
332
|
+
* @returns {string[]}
|
|
333
|
+
*/
|
|
334
|
+
const routes = children =>
|
|
335
|
+
children.flatMap(child => [
|
|
336
|
+
child.route,
|
|
337
|
+
...(child.slots ?? []).flatMap(slot => routes(slot.children)),
|
|
338
|
+
]);
|
|
339
|
+
const allBelow = node.slots
|
|
340
|
+
.flatMap(slot => routes(slot.children))
|
|
341
|
+
.every(route => route.startsWith(`${node.route}/`));
|
|
342
|
+
const root = allBelow ? node.route : '';
|
|
343
|
+
emit(
|
|
344
|
+
section(node.title, wrapText(node.summary)),
|
|
345
|
+
record({package: node.package}),
|
|
346
|
+
...(node.content?.length
|
|
347
|
+
? [
|
|
348
|
+
text(
|
|
349
|
+
node.content
|
|
350
|
+
.map(b => formatBlock(b, detail))
|
|
351
|
+
.filter(Boolean)
|
|
352
|
+
.join('\n\n'),
|
|
353
|
+
),
|
|
354
|
+
]
|
|
355
|
+
: []),
|
|
356
|
+
...(node.childCount
|
|
357
|
+
? [
|
|
358
|
+
text(
|
|
359
|
+
`${docsBelow(node.childCount)}. Read them: ${run} docs ${node.route} --depth 1`,
|
|
360
|
+
),
|
|
361
|
+
]
|
|
362
|
+
: []),
|
|
363
|
+
...node.slots.flatMap(slot => [
|
|
364
|
+
...(node.slots.length === 1 && slot.title === node.title
|
|
365
|
+
? []
|
|
366
|
+
: [section(slot.title)]),
|
|
367
|
+
childDetail === 'brief'
|
|
368
|
+
? records(treeRows(slot.children, root, node.package), {
|
|
369
|
+
fields: ['name', 'summary'],
|
|
370
|
+
layout: 'inline',
|
|
371
|
+
})
|
|
372
|
+
: code(
|
|
373
|
+
slot.children
|
|
374
|
+
.map(child =>
|
|
375
|
+
formatTreeChild(child, childDetail, 2, root, run, node.package),
|
|
376
|
+
)
|
|
377
|
+
.join('\n\n'),
|
|
378
|
+
),
|
|
379
|
+
]),
|
|
380
|
+
text(
|
|
381
|
+
[
|
|
382
|
+
...(node.slots.length > 0
|
|
383
|
+
? [
|
|
384
|
+
allBelow
|
|
385
|
+
? `Open one: ${run} docs ${node.route}/<name>`
|
|
386
|
+
: `Open one: ${run} docs <name>`,
|
|
387
|
+
]
|
|
388
|
+
: []),
|
|
389
|
+
...linkLines(node.links),
|
|
390
|
+
].join('\n'),
|
|
391
|
+
),
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
|
|
184
395
|
/**
|
|
185
396
|
* The moves a read offers (spec:AST-047), one runnable command per line: up to
|
|
186
397
|
* the level it sits in, the item before and after it, and the docs it names.
|
|
@@ -203,20 +414,27 @@ function linkLines(links) {
|
|
|
203
414
|
* A topic's section index: what the topic is, one line per section with the
|
|
204
415
|
* key to read it by, and how to read further.
|
|
205
416
|
* @param {import('../../../api/docs/docs.type.mjs').DocsIndex} index
|
|
417
|
+
* @param {string} owner the package that owns the topic
|
|
206
418
|
* @param {string} run
|
|
207
419
|
*/
|
|
208
|
-
function emitIndex(index, run) {
|
|
420
|
+
function emitIndex(index, owner, run) {
|
|
209
421
|
emit(
|
|
210
422
|
section(
|
|
211
423
|
index.title,
|
|
212
424
|
index.description ? wrapText(index.description) : undefined,
|
|
213
425
|
),
|
|
426
|
+
record({package: owner}),
|
|
214
427
|
// Summaries wrap rather than being cut: the summary is how a reader picks
|
|
215
|
-
// the one section to open.
|
|
216
|
-
records(
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
428
|
+
// the one section to open. A section another package wrote says which one.
|
|
429
|
+
records(
|
|
430
|
+
index.sections.map(s =>
|
|
431
|
+
s.package === owner ? s : {...s, title: `${s.title} (${s.package})`},
|
|
432
|
+
),
|
|
433
|
+
{
|
|
434
|
+
fields: ['id', 'title', 'summary'],
|
|
435
|
+
layout: 'inline',
|
|
436
|
+
},
|
|
437
|
+
),
|
|
220
438
|
text(
|
|
221
439
|
[
|
|
222
440
|
`Read one section: ${run} docs ${index.name} <section>`,
|
|
@@ -233,15 +451,17 @@ function emitIndex(index, run) {
|
|
|
233
451
|
* template`). Typed docs keep a distinct title when it carries the real symbol
|
|
234
452
|
* name (`assert-response assertResponse()`).
|
|
235
453
|
* @param {import('../../../api/docs/docs.type.mjs').DocsNodeChild} child
|
|
454
|
+
* @param {string} owner the package that owns the namespace
|
|
236
455
|
* @returns {{name: string, summary: string}}
|
|
237
456
|
*/
|
|
238
|
-
function childRow(child) {
|
|
457
|
+
function childRow(child, owner) {
|
|
239
458
|
const titleAddsIdentity =
|
|
240
459
|
child.kind !== 'namespace' &&
|
|
241
460
|
child.kind !== 'generic' &&
|
|
242
461
|
child.title !== child.name;
|
|
243
462
|
return {
|
|
244
|
-
|
|
463
|
+
// A child another package owns says which one.
|
|
464
|
+
name: child.package === owner ? child.name : `${child.name} (${child.package})`,
|
|
245
465
|
summary: titleAddsIdentity
|
|
246
466
|
? `${child.title}: ${child.summary}`
|
|
247
467
|
: child.summary,
|
|
@@ -260,6 +480,7 @@ function emitNode(node, detail, run) {
|
|
|
260
480
|
if (node.kind === 'namespace') {
|
|
261
481
|
emit(
|
|
262
482
|
section(node.title, wrapText(node.summary)),
|
|
483
|
+
record({package: node.package}),
|
|
263
484
|
// A namespace may author intro `blocks`; they render above its children.
|
|
264
485
|
...(node.content?.length
|
|
265
486
|
? [
|
|
@@ -276,7 +497,7 @@ function emitNode(node, detail, run) {
|
|
|
276
497
|
...(node.slots.length === 1 && slot.title === node.title
|
|
277
498
|
? []
|
|
278
499
|
: [section(slot.title)]),
|
|
279
|
-
records(slot.children.map(childRow), {
|
|
500
|
+
records(slot.children.map(child => childRow(child, node.package)), {
|
|
280
501
|
fields: ['name', 'summary'],
|
|
281
502
|
layout: 'inline',
|
|
282
503
|
}),
|
|
@@ -297,6 +518,7 @@ function emitNode(node, detail, run) {
|
|
|
297
518
|
return;
|
|
298
519
|
}
|
|
299
520
|
emit(
|
|
521
|
+
record({package: node.package}),
|
|
300
522
|
code(formatSection({title: node.title, content: node.content}, detail)),
|
|
301
523
|
text(linkLines(node.links).join('\n')),
|
|
302
524
|
);
|
|
@@ -331,7 +553,7 @@ export function registerDocs(program) {
|
|
|
331
553
|
action: async (
|
|
332
554
|
/** @type {string | undefined} */ topic,
|
|
333
555
|
/** @type {string | undefined} */ sectionName,
|
|
334
|
-
/** @type {{index?: boolean, full?: boolean}} */ options = {},
|
|
556
|
+
/** @type {{index?: boolean, full?: boolean, depth?: string}} */ options = {},
|
|
335
557
|
) => {
|
|
336
558
|
const run = getCliInvocation();
|
|
337
559
|
const lang = program.opts().lang || null;
|
|
@@ -346,6 +568,22 @@ export function registerDocs(program) {
|
|
|
346
568
|
{code: ERROR_CODES.ERR_INVALID_ARGUMENT},
|
|
347
569
|
);
|
|
348
570
|
}
|
|
571
|
+
/** @type {number | 'all' | undefined} */
|
|
572
|
+
let depth;
|
|
573
|
+
if (options.depth != null) {
|
|
574
|
+
if (options.depth === 'all') depth = 'all';
|
|
575
|
+
else if (/^\d+$/.test(options.depth)) depth = Number(options.depth);
|
|
576
|
+
else {
|
|
577
|
+
return cliError(
|
|
578
|
+
`--depth takes a number of levels (0, 1, 2, ...) or all, not "${options.depth}".`,
|
|
579
|
+
{code: ERROR_CODES.ERR_INVALID_ARGUMENT},
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
// With --depth, --detail is how much of each doc below shows; left at
|
|
584
|
+
// its default, each is one line.
|
|
585
|
+
const childDetail =
|
|
586
|
+
program.getOptionValueSource('detail') === 'default' ? 'brief' : detail;
|
|
349
587
|
// Text reads one level: a topic lists its sections (one with a single
|
|
350
588
|
// section prints whole). JSON keeps docs(): the whole topic unless
|
|
351
589
|
// --index. The dense variant is written to be read whole.
|
|
@@ -363,6 +601,7 @@ export function registerDocs(program) {
|
|
|
363
601
|
zh,
|
|
364
602
|
dense,
|
|
365
603
|
index: listSections,
|
|
604
|
+
...(depth != null ? {depth, detail: childDetail} : {}),
|
|
366
605
|
});
|
|
367
606
|
if (
|
|
368
607
|
!options.index &&
|
|
@@ -417,6 +656,7 @@ export function registerDocs(program) {
|
|
|
417
656
|
` ${run} docs <topic> <section> read one section`,
|
|
418
657
|
` ${run} docs <topic> --full read the whole topic`,
|
|
419
658
|
` ${run} docs cli/api go down the docs tree one level at a time`,
|
|
659
|
+
` ${run} docs cli --depth all every doc below cli, one line each`,
|
|
420
660
|
`With --json, a topic returns its whole doc; add --index for its section list.`,
|
|
421
661
|
].join('\n'),
|
|
422
662
|
),
|
|
@@ -439,13 +679,28 @@ export function registerDocs(program) {
|
|
|
439
679
|
}
|
|
440
680
|
|
|
441
681
|
case 'docs.index': {
|
|
442
|
-
emitIndex(result.data, run);
|
|
682
|
+
emitIndex(result.data, result.package, run);
|
|
443
683
|
break;
|
|
444
684
|
}
|
|
445
685
|
|
|
446
686
|
case 'docs.detail': {
|
|
687
|
+
const owner = result.package;
|
|
447
688
|
emit(
|
|
448
|
-
|
|
689
|
+
record({package: owner}),
|
|
690
|
+
code(
|
|
691
|
+
formatReferenceFull(
|
|
692
|
+
{
|
|
693
|
+
...result.data,
|
|
694
|
+
// A section another package wrote says which one.
|
|
695
|
+
sections: result.data.sections.map(s =>
|
|
696
|
+
s.package === owner
|
|
697
|
+
? s
|
|
698
|
+
: {...s, title: `${s.title} (${s.package})`},
|
|
699
|
+
),
|
|
700
|
+
},
|
|
701
|
+
detail,
|
|
702
|
+
),
|
|
703
|
+
),
|
|
449
704
|
text(linkLines(result.data.links).join('\n')),
|
|
450
705
|
);
|
|
451
706
|
break;
|
|
@@ -455,6 +710,7 @@ export function registerDocs(program) {
|
|
|
455
710
|
// One section ends with its moves: up to its topic's index, and to
|
|
456
711
|
// the sections before and after it.
|
|
457
712
|
emit(
|
|
713
|
+
record({package: result.package}),
|
|
458
714
|
code(formatSection(result.data, detail)),
|
|
459
715
|
text(linkLines(result.data.links).join('\n')),
|
|
460
716
|
);
|
|
@@ -462,7 +718,8 @@ export function registerDocs(program) {
|
|
|
462
718
|
}
|
|
463
719
|
|
|
464
720
|
case 'docs.node': {
|
|
465
|
-
|
|
721
|
+
if (depth != null) emitTree(result.data, detail, childDetail, run);
|
|
722
|
+
else emitNode(result.data, detail, run);
|
|
466
723
|
break;
|
|
467
724
|
}
|
|
468
725
|
}
|