@astryxdesign/cli 0.6.3-canary.98a2e4e → 0.6.3-canary.9c4d44d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -79
- package/api/blog/blog.doc.mjs +1 -0
- package/api/build/_adapter.d.mts +50 -0
- package/api/build/_adapter.mjs +60 -0
- package/api/build/build.doc.mjs +16 -9
- package/api/build/build.test.mjs +197 -8
- package/api/build/build.type.d.mts +91 -2
- package/api/build/build.type.mjs +52 -8
- package/api/build/help/help.d.mts +12 -5
- package/api/build/help/help.mjs +69 -6
- package/api/build/kit/kit.d.mts +4 -1
- package/api/build/kit/kit.mjs +165 -49
- package/api/build/kit/rank.d.mts +44 -0
- package/api/build/kit/rank.mjs +432 -0
- package/api/build/kit/rank.test.mjs +196 -0
- package/api/component/_adapter.d.mts +6 -12
- package/api/component/_adapter.mjs +20 -10
- package/api/component/component.doc.mjs +13 -3
- package/api/component/component.mjs +91 -14
- package/api/component/component.test.mjs +38 -0
- package/api/component/component.type.d.mts +22 -11
- package/api/component/component.type.mjs +32 -24
- package/api/component/detail/blocks/blocks.d.mts +2 -1
- package/api/component/detail/blocks/blocks.mjs +4 -3
- package/api/component/list/list.d.mts +0 -5
- package/api/component/list/list.mjs +40 -11
- package/api/discover/_adapter.d.mts +114 -6
- package/api/discover/_adapter.mjs +372 -17
- package/api/discover/_adapter.test.mjs +215 -0
- package/api/discover/_catalog-view.d.mts +115 -0
- package/api/discover/_catalog-view.mjs +203 -0
- package/api/discover/_catalog-view.test.mjs +128 -0
- package/api/discover/detail/detail.d.mts +18 -6
- package/api/discover/detail/detail.mjs +67 -13
- package/api/discover/detail/detail.test.mjs +85 -0
- package/api/discover/detail/item/item.d.mts +26 -0
- package/api/discover/detail/item/item.mjs +78 -0
- package/api/discover/detail/item/item.test.mjs +73 -0
- package/api/discover/discover.d.mts +3 -9
- package/api/discover/discover.doc.mjs +62 -18
- package/api/discover/discover.mjs +220 -36
- package/api/discover/discover.test.mjs +11 -2
- package/api/discover/discover.type.d.mts +150 -11
- package/api/discover/discover.type.mjs +107 -17
- package/api/discover/list/list.d.mts +20 -6
- package/api/discover/list/list.mjs +45 -12
- package/api/discover/list/list.test.mjs +46 -0
- package/api/discover/search/search.d.mts +18 -16
- package/api/discover/search/search.mjs +102 -56
- package/api/discover/search/search.test.mjs +144 -10
- package/api/docs/_adapter.d.mts +268 -47
- package/api/docs/_adapter.mjs +970 -149
- package/api/docs/compiled-topics.test.mjs +78 -0
- package/api/docs/detail/detail.d.mts +0 -15
- package/api/docs/detail/detail.mjs +22 -78
- package/api/docs/detail/section/section.mjs +39 -24
- package/api/docs/detail/section/section.test.mjs +19 -9
- package/api/docs/docs.d.mts +5 -3
- package/api/docs/docs.doc.mjs +39 -17
- package/api/docs/docs.mjs +44 -8
- package/api/docs/docs.test.mjs +158 -4
- package/api/docs/docs.type.d.mts +185 -6
- package/api/docs/docs.type.mjs +127 -13
- package/api/docs/index/index.mjs +15 -6
- package/api/docs/index/index.test.mjs +1 -1
- package/api/docs/integration-tree.test.mjs +555 -0
- package/api/docs/integrationDocs.test.mjs +14 -14
- package/api/docs/list/list.mjs +28 -12
- package/api/docs/node/node.d.mts +43 -0
- package/api/docs/node/node.mjs +192 -0
- package/api/docs/reference-blocks.test.mjs +406 -0
- package/api/doctor/doctor.d.mts +54 -4
- package/api/doctor/doctor.doc.mjs +1 -0
- package/api/doctor/doctor.mjs +332 -21
- package/api/doctor/doctor.test.mjs +420 -7
- package/api/gap-report/gap-report.doc.mjs +8 -4
- package/api/hook/_adapter.mjs +19 -5
- package/api/hook/hook.doc.mjs +1 -0
- package/api/hook/hook.type.d.mts +3 -3
- package/api/hook/hook.type.mjs +11 -11
- package/api/hook/list/list.d.mts +1 -1
- package/api/hook/list/list.mjs +69 -17
- package/api/index.d.mts +1 -1
- package/api/index.mjs +1 -0
- package/api/init/init.doc.mjs +6 -1
- package/api/init/init.test.mjs +41 -1
- package/api/init/remove/remove.mjs +1 -1
- package/api/init/run/run.mjs +20 -10
- package/api/integration/add-contribution.component-names.test.mjs +120 -0
- package/api/integration/add-contribution.d.mts +2 -1
- package/api/integration/add-contribution.mjs +130 -15
- package/api/integration/add-contribution.test.mjs +258 -7
- package/api/integration/add-helpers.d.mts +5 -2
- package/api/integration/add-helpers.mjs +36 -9
- package/api/integration/add-theme.mjs +34 -64
- package/api/integration/add-theme.test.mjs +105 -21
- package/api/integration/authoring-checks.mjs +138 -28
- package/api/integration/authoring-checks.test.mjs +179 -7
- package/api/integration/authoring-checks.type.mjs +6 -1
- package/api/integration/integration-authoring.type.d.mts +2 -0
- package/api/integration/integration-authoring.type.mjs +2 -0
- package/api/integration/integration-block-exports.test.mjs +10 -6
- package/api/integration/integrationAdd.doc.mjs +14 -4
- package/api/integration/integrationAddAgentDoc.doc.mjs +1 -0
- package/api/integration/integrationAddCodemod.doc.mjs +1 -0
- package/api/integration/integrationAddComponent.doc.mjs +2 -1
- package/api/integration/integrationAddDoc.doc.mjs +8 -1
- package/api/integration/integrationAddTemplate.doc.mjs +1 -0
- package/api/integration/integrationAddTheme.doc.mjs +6 -5
- package/api/integration/integrationComponentConflicts.doc.mjs +1 -0
- package/api/integration/integrationDocConflicts.doc.mjs +2 -1
- package/api/integration/integrationPackCheck.doc.mjs +2 -1
- package/api/integration/integrationTemplateConflicts.doc.d.mts +3 -0
- package/api/integration/integrationTemplateConflicts.doc.mjs +4 -0
- package/api/integration/pack-check.mjs +83 -7
- package/api/integration/pack-check.test.mjs +387 -47
- package/api/integration/pack-check.type.d.mts +26 -2
- package/api/integration/pack-check.type.mjs +14 -1
- package/api/integration/summarizeIssues.doc.mjs +1 -0
- package/api/integration/template-conflict-compatibility.test.mjs +73 -0
- package/api/integration/validate-integration-fixes.test.mjs +1389 -0
- package/api/integration/validate-integration.mjs +52 -102
- package/api/integration/validate-integration.test.mjs +179 -26
- package/api/integration/validate-unread-theme-folders.test.mjs +110 -0
- package/api/integration/validateIntegration.doc.mjs +3 -2
- package/api/json/assertResponse.doc.mjs +1 -0
- package/api/json/envelope-types.test.mjs +76 -0
- package/api/json/index.ts +2 -0
- package/api/json/isError.doc.mjs +1 -0
- package/api/json/parseResponse.doc.mjs +3 -2
- package/api/layout/_adapter.mjs +20 -5
- package/api/layout/expand/expand.mjs +7 -5
- package/api/layout/expand/expand.path-safety.test.mjs +53 -0
- package/api/layout/grammar/grammar.mjs +2 -1
- package/api/layout/layoutCheck.doc.mjs +1 -0
- package/api/layout/layoutExpand.doc.mjs +2 -1
- package/api/layout/layoutGrammar.doc.mjs +1 -0
- package/api/search/search-return-type.test.mjs +54 -0
- package/api/search/search.d.mts +61 -10
- package/api/search/search.doc.mjs +8 -2
- package/api/search/search.mjs +471 -83
- package/api/search/search.test.mjs +124 -1
- package/api/search/search.type.d.mts +14 -2
- package/api/search/search.type.mjs +5 -2
- package/api/swizzle/copy/copy.mjs +28 -11
- package/api/swizzle/swizzle.doc.mjs +2 -1
- package/api/swizzle/swizzle.type.d.mts +2 -2
- package/api/swizzle/swizzle.type.mjs +2 -2
- package/api/template/copy/copy.mjs +17 -23
- package/api/template/copy/copy.test.mjs +17 -0
- package/api/template/list/list.mjs +1 -0
- package/api/template/table-floating-bulk-actions.test.mjs +66 -0
- package/api/template/template-integration.test.mjs +1072 -3
- package/api/template/template-suffix.test.mjs +41 -21
- package/api/template/template.doc.mjs +30 -8
- package/api/template/template.mjs +45 -8
- package/api/template/template.type.d.mts +11 -13
- package/api/template/template.type.mjs +15 -14
- package/api/theme/_adapter.d.mts +2 -3
- package/api/theme/_adapter.mjs +4 -5
- package/api/theme/add/add.binary.test.mjs +84 -0
- package/api/theme/add/add.mjs +31 -22
- package/api/theme/add/add.rollback.test.mjs +158 -0
- package/api/theme/add/add.staging.test.mjs +83 -0
- package/api/theme/add/add.test.mjs +14 -1
- package/api/theme/build/build.family.test.mjs +7 -12
- package/api/theme/build/build.mjs +140 -59
- package/api/theme/build/build.public-component-vars.test.mjs +1 -1
- package/api/theme/build/build.receipt-doc.test.mjs +111 -0
- package/api/theme/build/build.rollback.test.mjs +148 -0
- package/api/theme/build/build.test.mjs +127 -0
- package/api/theme/build/font-warning.mjs +3 -3
- package/api/theme/build/font-warning.test.mjs +5 -2
- package/api/theme/generateTonalPalette.doc.mjs +1 -0
- package/api/theme/integration-themes.test.mjs +39 -28
- package/api/theme/list/list.test.mjs +19 -20
- package/api/theme/listThemes.doc.mjs +6 -5
- package/api/theme/palette/generate/generate.mjs +8 -3
- package/api/theme/palette/generate/generate.test.mjs +96 -0
- package/api/theme/palette/generate/generator.d.mts +10 -13
- package/api/theme/palette/generate/generator.mjs +15 -4
- package/api/theme/palette/generate/generator.test.mjs +10 -0
- package/api/theme/template/template.mjs +11 -2
- package/api/theme/template/template.test.mjs +20 -0
- package/api/theme/theme.type.d.mts +170 -11
- package/api/theme/theme.type.mjs +94 -27
- package/api/theme/themeAdd.doc.mjs +4 -3
- package/api/theme/themeBuild.doc.mjs +8 -4
- package/api/theme/themeList.doc.mjs +6 -3
- package/api/theme/themeListAvailable.doc.mjs +5 -3
- package/api/theme/themePaletteGenerate.doc.mjs +1 -0
- package/api/theme/themeTargets.doc.mjs +1 -0
- package/api/theme/themeTemplate.doc.mjs +6 -2
- package/api/upgrade/_adapter.d.mts +32 -5
- package/api/upgrade/_adapter.mjs +124 -73
- package/api/upgrade/list/list.mjs +2 -1
- package/api/upgrade/list/list.test.mjs +73 -0
- package/api/upgrade/provider-agreement.test.mjs +152 -0
- package/api/upgrade/run/run.mjs +356 -59
- package/api/upgrade/status/status.mjs +2 -2
- package/api/upgrade/upgrade.doc.mjs +8 -2
- package/api/upgrade/upgrade.type.d.mts +42 -4
- package/api/upgrade/upgrade.type.mjs +26 -10
- package/assets/codemods/__tests__/runner.test.mjs +330 -8
- package/assets/codemods/integration-discovery.mjs +48 -4
- package/assets/codemods/integration-discovery.test.mjs +73 -0
- package/assets/codemods/integration-runner.mjs +56 -4
- package/assets/codemods/integration-runner.protection.test.mjs +153 -0
- package/assets/codemods/run-codemod.mjs +177 -34
- package/assets/codemods/runner.mjs +350 -102
- package/assets/codemods/term-log.mjs +32 -8
- package/assets/codemods/term-log.test.mjs +19 -1
- package/assets/codemods/transform-prop.mjs +109 -0
- package/assets/codemods/transform-prop.test.mjs +95 -0
- package/assets/codemods/transforms/next/__tests__/migrate-native-picker-to-presentation.test.mjs +63 -0
- package/assets/codemods/transforms/next/__tests__/migrate-theme-catalog-to-descriptors.test.mjs +220 -0
- package/assets/codemods/transforms/next/index.mjs +19 -1
- package/assets/codemods/transforms/next/migrate-native-picker-to-presentation.mjs +148 -0
- package/assets/codemods/transforms/next/migrate-theme-catalog-to-descriptors.mjs +141 -0
- package/assets/codemods/transforms/v0.0.14/__tests__/rename-status-variants.test.mjs +86 -165
- package/assets/codemods/transforms/v0.0.14/rename-status-variants.mjs +72 -210
- package/assets/codemods/transforms/v0.1.8/__tests__/rename-avatar-size-scale.test.mjs +83 -115
- package/assets/codemods/transforms/v0.1.8/rename-avatar-size-scale.mjs +57 -186
- package/assets/codemods/transforms/v0.3.0/__tests__/unwrap-authoring-factories.test.mjs +27 -5
- package/assets/codemods/transforms/v0.3.0/unwrap-authoring-factories.mjs +20 -5
- package/assets/codemods/transforms/v0.6.0/__tests__/next-codemods.test.mjs +47 -0
- package/assets/codemods/transforms/v0.6.0/rename-resizable-pixel-bounds.mjs +57 -10
- package/assets/docs/getting-started.doc.mjs +2 -2
- package/assets/docs/internationalization.doc.mjs +7 -5
- package/assets/docs/layout.doc.dense.mjs +2 -2
- package/assets/docs/layout.doc.mjs +1 -1
- package/assets/docs/principles.doc.mjs +6 -6
- package/assets/docs/styling-libraries.doc.mjs +4 -4
- package/assets/docs/styling.doc.mjs +4 -4
- package/assets/docs/theme.doc.mjs +5 -5
- package/assets/docs/tokens.doc.mjs +1 -1
- package/assets/docs/tree/api.doc.mjs +30 -0
- package/assets/docs/tree/cli.doc.mjs +23 -0
- package/assets/docs/tree/commands.doc.mjs +25 -0
- package/assets/docs/{cli-integrations.doc.mjs → tree/integrations.doc.mjs} +95 -39
- package/assets/docs/tree/integrations.test.mjs +62 -0
- package/assets/docs/tree/writing-docs.doc.mjs +286 -0
- package/assets/docs/working-with-ai.doc.mjs +4 -4
- package/assets/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.doc.mjs +1 -1
- package/assets/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.tsx +1 -3
- package/assets/templates/blocks/components/DateInput/DateInputDateRange.tsx +1 -1
- package/assets/templates/blocks/components/InternationalizationProvider/InternationalizationProvider01ShippedLocale.tsx +1 -1
- package/assets/templates/blocks/components/Item/ItemDocumentTabs.doc.mjs +14 -0
- package/assets/templates/blocks/components/Item/ItemDocumentTabs.tsx +100 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaInlineRail.doc.mjs +14 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaInlineRail.tsx +61 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaOverscrollChaining.doc.mjs +14 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaOverscrollChaining.tsx +126 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaShowcase.doc.mjs +15 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaShowcase.tsx +86 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyGroupHeaders.doc.mjs +14 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyGroupHeaders.tsx +99 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyPassthrough.doc.mjs +14 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaStickyPassthrough.tsx +122 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaTwoAxisBoard.doc.mjs +14 -0
- package/assets/templates/blocks/components/ScrollableArea/ScrollableAreaTwoAxisBoard.tsx +95 -0
- package/assets/templates/blocks/components/Table/TableBulkActionsTable.doc.mjs +14 -0
- package/assets/templates/blocks/components/Table/TableBulkActionsTable.tsx +71 -0
- package/assets/templates/blocks/components/Table/TableFloatingBulkActionsTable.doc.mjs +19 -0
- package/assets/templates/blocks/components/Table/TableFloatingBulkActionsTable.tsx +139 -0
- package/assets/templates/blocks/components/TimeInput/TimeInputConstrained.tsx +1 -0
- package/assets/templates/pages/table-tree/page.tsx +1704 -0
- package/assets/templates/pages/table-tree/template.doc.mjs +12 -0
- package/assets/templates/themes/butter/butterTheme.doc.mjs +11 -0
- package/assets/templates/themes/chocolate/chocolateTheme.doc.mjs +11 -0
- package/assets/templates/themes/gothic/gothicTheme.doc.mjs +11 -0
- package/assets/templates/themes/matcha/matchaTheme.doc.mjs +11 -0
- package/assets/templates/themes/neutral/neutralTheme.doc.mjs +11 -0
- package/assets/templates/themes/stone/stoneTheme.doc.mjs +11 -0
- package/assets/templates/themes/y2k/y2kTheme.doc.mjs +11 -0
- package/authoring/_shared/contract.ts +22 -0
- package/authoring/codemod/codemod.doc.mjs +7 -2
- package/authoring/codemod/parse.d.mts +8 -8
- package/authoring/codemod/parse.mjs +8 -6
- package/authoring/codemod/type.ts +12 -0
- package/authoring/config/config.doc.mjs +10 -2
- package/authoring/config/debug-composition.test.mjs +92 -0
- package/authoring/config/parse.d.mts +15 -13
- package/authoring/config/parse.mjs +27 -8
- package/authoring/config/parse.test.mjs +8 -0
- package/authoring/config/type.ts +29 -6
- package/authoring/debug/debug.doc.d.mts +11 -0
- package/authoring/debug/debug.doc.mjs +182 -0
- package/authoring/debug/parse.d.mts +7 -7
- package/authoring/debug/parse.mjs +3 -3
- package/authoring/discover/discover.doc.d.mts +13 -0
- package/authoring/discover/discover.doc.mjs +138 -0
- package/authoring/discover/parse.d.mts +24 -0
- package/authoring/discover/parse.mjs +128 -0
- package/authoring/discover/parse.test.mjs +124 -0
- package/authoring/discover/type.ts +87 -0
- package/authoring/doctypes/_schema.d.mts +240 -128
- package/authoring/doctypes/_schema.mjs +198 -16
- package/authoring/doctypes/base/graph-fields.doc.mjs +15 -6
- package/authoring/doctypes/base/type.ts +9 -4
- package/authoring/doctypes/command/command.doc.mjs +4 -3
- package/authoring/doctypes/command/parse.d.mts +2 -2
- package/authoring/doctypes/command/parse.mjs +1 -1
- package/authoring/doctypes/command/type.ts +4 -4
- package/authoring/doctypes/component/component.doc.mjs +5 -2
- package/authoring/doctypes/component/parse.d.mts +2 -2
- package/authoring/doctypes/component/parse.mjs +1 -1
- package/authoring/doctypes/component/type.ts +3 -3
- package/authoring/doctypes/doctypes-new.test.mjs +48 -6
- package/authoring/doctypes/enum/enum.doc.mjs +1 -1
- package/authoring/doctypes/enum/parse.d.mts +2 -2
- package/authoring/doctypes/enum/parse.mjs +1 -1
- package/authoring/doctypes/enum/type.ts +2 -2
- package/authoring/doctypes/function/function.doc.mjs +7 -2
- package/authoring/doctypes/function/parse.d.mts +2 -2
- package/authoring/doctypes/function/parse.mjs +1 -1
- package/authoring/doctypes/function/type.ts +4 -3
- package/authoring/doctypes/hook/hook.doc.mjs +4 -0
- package/authoring/doctypes/hook/parse.d.mts +2 -2
- package/authoring/doctypes/hook/parse.mjs +1 -1
- package/authoring/doctypes/hook/type.ts +3 -3
- package/authoring/doctypes/legacy.d.mts +6 -6
- package/authoring/doctypes/legacy.mjs +3 -3
- package/authoring/doctypes/load-contract.test.mjs +233 -0
- package/authoring/doctypes/namespace/namespace.doc.mjs +9 -9
- package/authoring/doctypes/namespace/parse.d.mts +2 -2
- package/authoring/doctypes/namespace/parse.mjs +1 -1
- package/authoring/doctypes/namespace/parse.test.mjs +23 -25
- package/authoring/doctypes/namespace/type.ts +6 -3
- package/authoring/doctypes/parse.d.mts +22 -20
- package/authoring/doctypes/parse.mjs +19 -14
- package/authoring/doctypes/reference/parse.d.mts +2 -2
- package/authoring/doctypes/reference/parse.mjs +1 -1
- package/authoring/doctypes/reference/reference.doc.mjs +39 -6
- package/authoring/doctypes/reference/type.ts +31 -14
- package/authoring/doctypes/schema/parse.d.mts +2 -2
- package/authoring/doctypes/schema/parse.mjs +1 -1
- package/authoring/doctypes/schema/schema.doc.mjs +1 -1
- package/authoring/doctypes/schema/type.ts +3 -4
- package/authoring/doctypes/template/parse.d.mts +94 -1
- package/authoring/doctypes/template/parse.mjs +37 -1
- package/authoring/doctypes/template/parse.test.mjs +18 -0
- package/authoring/doctypes/template/template.doc.mjs +13 -3
- package/authoring/doctypes/template/type.ts +12 -1
- package/authoring/doctypes/theme/parse.d.mts +35 -0
- package/authoring/doctypes/theme/parse.mjs +76 -0
- package/authoring/doctypes/theme/theme.doc.d.mts +9 -0
- package/authoring/doctypes/theme/theme.doc.mjs +79 -0
- package/authoring/doctypes/theme/type.ts +42 -0
- package/authoring/doctypes/types.ts +12 -11
- package/authoring/gap-report/gap-report.doc.d.mts +12 -0
- package/authoring/gap-report/gap-report.doc.mjs +183 -0
- package/authoring/gap-report/parse.d.mts +9 -9
- package/authoring/gap-report/parse.mjs +6 -6
- package/authoring/gap-report/type.ts +1 -1
- package/authoring/identity/identity.doc.mjs +3 -2
- package/authoring/identity/type.ts +10 -10
- package/authoring/index.d.mts +2 -0
- package/authoring/index.d.ts +32 -19
- package/authoring/index.mjs +3 -1
- package/authoring/integration/integration.doc.mjs +2 -2
- package/authoring/integration/parse.d.mts +2 -2
- package/authoring/integration/parse.mjs +1 -1
- package/authoring/integration/schema.d.mts +4 -4
- package/authoring/integration/schema.mjs +3 -3
- package/authoring/integration/type.ts +5 -11
- package/clients/cli/__tests__/cliManifest.test.ts +27 -29
- package/clients/cli/command-load-failure.test.mjs +83 -0
- package/clients/cli/commands/blog.doc.mjs +1 -1
- package/clients/cli/commands/blog.mjs +23 -8
- package/clients/cli/commands/blog.test.mjs +42 -1
- package/clients/cli/commands/build-theme.adaptations.test.mjs +100 -1
- package/clients/cli/commands/build-theme.ascii-output.test.mjs +161 -0
- package/clients/cli/commands/build-theme.flag-docs.test.mjs +110 -0
- package/clients/cli/commands/build-theme.mjs +16 -50
- package/clients/cli/commands/build-theme.path-safety.test.mjs +86 -1
- package/clients/cli/commands/build-theme.variants.test.mjs +76 -0
- package/clients/cli/commands/build.doc.mjs +16 -8
- package/clients/cli/commands/build.exit-codes-doc.test.mjs +50 -0
- package/clients/cli/commands/build.mjs +137 -114
- package/clients/cli/commands/build.playbook.test.mjs +75 -0
- package/clients/cli/commands/build.text-fields.test.mjs +81 -0
- package/clients/cli/commands/component/index.mjs +3 -8
- package/clients/cli/commands/component-ownership.test.mjs +3 -3
- package/clients/cli/commands/component-package.test.mjs +46 -0
- package/clients/cli/commands/component-resolution.test.mjs +21 -0
- package/clients/cli/commands/component.doc.mjs +1 -1
- package/clients/cli/commands/component.test.mjs +19 -0
- package/clients/cli/commands/detail-levels.test.mjs +2 -2
- package/clients/cli/commands/discover.broken-integration.test.mjs +52 -5
- package/clients/cli/commands/discover.components-flag.test.mjs +97 -0
- package/clients/cli/commands/discover.doc.mjs +55 -9
- package/clients/cli/commands/discover.mjs +393 -118
- package/clients/cli/commands/discover.sources.test.mjs +267 -0
- package/clients/cli/commands/discover.text-projection.test.mjs +103 -0
- package/clients/cli/commands/docs.doc.mjs +21 -9
- package/clients/cli/commands/docs.mjs +184 -70
- package/clients/cli/commands/docs.test.mjs +120 -16
- package/clients/cli/commands/doctor-integration-components.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration-docs.doc.mjs +3 -3
- package/clients/cli/commands/doctor-integration-templates.doc.mjs +15 -8
- package/clients/cli/commands/doctor-integration-validate.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration.doc.mjs +1 -1
- package/clients/cli/commands/doctor-integration.package-json.test.mjs +53 -0
- package/clients/cli/commands/doctor-integration.test.mjs +90 -8
- package/clients/cli/commands/doctor.doc.mjs +1 -1
- package/clients/cli/commands/doctor.mjs +59 -32
- package/clients/cli/commands/doctor.test.mjs +42 -0
- package/clients/cli/commands/gap-report.doc.mjs +17 -6
- package/clients/cli/commands/gap-report.test.mjs +72 -0
- package/clients/cli/commands/hook/index.mjs +7 -17
- package/clients/cli/commands/hook.doc.mjs +1 -1
- package/clients/cli/commands/hook.text-projection.test.mjs +45 -0
- package/clients/cli/commands/init.doc.mjs +20 -9
- package/clients/cli/commands/init.flag-help.test.mjs +153 -0
- package/clients/cli/commands/integration-add.controls.test.mjs +132 -0
- package/clients/cli/commands/integration-add.doc.mjs +32 -6
- package/clients/cli/commands/integration-authoring.test.mjs +13 -9
- package/clients/cli/commands/integration-pack.doc.mjs +1 -1
- package/clients/cli/commands/integration-real-world.test.mjs +3 -9
- package/clients/cli/commands/integration.doc.mjs +1 -1
- package/clients/cli/commands/integration.mjs +1 -0
- package/clients/cli/commands/interactive-guard.test.mjs +101 -24
- package/clients/cli/commands/json-contract.test.mjs +33 -0
- package/clients/cli/commands/layout-check.doc.mjs +15 -4
- package/clients/cli/commands/layout-expand.doc.mjs +22 -5
- package/clients/cli/commands/layout-grammar.doc.mjs +1 -1
- package/clients/cli/commands/layout.doc.mjs +3 -3
- package/clients/cli/commands/layout.mjs +21 -9
- package/clients/cli/commands/layout.path-help.test.mjs +33 -0
- package/clients/cli/commands/layout.stdin-cap.test.mjs +47 -0
- package/clients/cli/commands/layout.text-fields.test.mjs +39 -0
- package/clients/cli/commands/manifest.doc.mjs +1 -1
- package/clients/cli/commands/no-prompt-wording.test.mjs +94 -0
- package/clients/cli/commands/search.doc.mjs +7 -4
- package/clients/cli/commands/search.mjs +28 -9
- package/clients/cli/commands/search.test.mjs +75 -0
- package/clients/cli/commands/setup-nudge.test.mjs +6 -0
- package/clients/cli/commands/swizzle.doc.mjs +3 -2
- package/clients/cli/commands/swizzle.path-safety.test.mjs +42 -0
- package/clients/cli/commands/template.doc.mjs +52 -13
- package/clients/cli/commands/template.flag-help.test.mjs +117 -0
- package/clients/cli/commands/template.mjs +4 -91
- package/clients/cli/commands/template.path-help.test.mjs +40 -0
- package/clients/cli/commands/text-json-parity.test.mjs +719 -0
- package/clients/cli/commands/theme-add.doc.mjs +4 -3
- package/clients/cli/commands/theme-build.doc.mjs +8 -7
- package/clients/cli/commands/theme-list.doc.mjs +2 -2
- package/clients/cli/commands/theme-palette-generate.doc.mjs +3 -3
- package/clients/cli/commands/theme-palette-generate.test.mjs +19 -0
- package/clients/cli/commands/theme-palette.doc.mjs +1 -1
- package/clients/cli/commands/theme-targets.behavior.test.mjs +4 -3
- package/clients/cli/commands/theme-targets.doc.mjs +1 -1
- package/clients/cli/commands/theme-template.behavior.test.mjs +12 -0
- package/clients/cli/commands/theme-template.doc.mjs +2 -2
- package/clients/cli/commands/theme.doc.mjs +1 -1
- package/clients/cli/commands/upgrade.ascii-output.test.mjs +87 -0
- package/clients/cli/commands/upgrade.doc.mjs +20 -8
- package/clients/cli/commands/upgrade.file-protection.test.mjs +228 -0
- package/clients/cli/commands/upgrade.flag-help.test.mjs +188 -0
- package/clients/cli/commands/upgrade.hook-output.test.mjs +88 -0
- package/clients/cli/commands/upgrade.mjs +29 -7
- package/clients/cli/formatters/index.mjs +2 -0
- package/clients/cli/formatters/index.test.mjs +6 -0
- package/clients/cli/index.mjs +21 -30
- package/clients/cli/latest-version-env.test.mjs +50 -0
- package/clients/cli/lib/cli-error.test.mjs +7 -0
- package/clients/cli/lib/component-format.mjs +9 -9
- package/clients/cli/lib/component-format.test.mjs +1 -1
- package/clients/cli/lib/define-command.mjs +32 -6
- package/clients/cli/lib/doc-text-ascii.test.mjs +82 -0
- package/clients/cli/lib/exit-codes.test.mjs +97 -0
- package/clients/cli/lib/hook-format.mjs +19 -10
- package/clients/cli/lib/json-shim.mjs +38 -2
- package/clients/cli/lib/json-shim.test.mjs +83 -0
- package/clients/cli/lib/manifest.d.ts +2 -0
- package/clients/cli/lib/manifest.mjs +32 -2
- package/clients/cli/lib/manifest.test.mjs +17 -0
- package/foundation/agent-docs/agent-docs.d.mts +7 -2
- package/foundation/agent-docs/agent-docs.mjs +82 -12
- package/foundation/agent-docs/agent-docs.path-safety.test.mjs +266 -4
- package/foundation/agent-docs/agent-docs.test.mjs +19 -1
- package/foundation/config/integration-debug.test.mjs +28 -3
- package/foundation/config/project-themes.test.mjs +11 -19
- package/foundation/config/project.d.mts +20 -11
- package/foundation/config/project.mjs +246 -89
- package/foundation/config/project.test.mjs +270 -21
- package/foundation/discovery/authoring-self-docs.d.mts +18 -0
- package/foundation/discovery/authoring-self-docs.mjs +38 -15
- package/foundation/discovery/authoring-self-docs.test.mjs +87 -12
- package/foundation/discovery/authoring-surface.d.mts +74 -0
- package/foundation/discovery/authoring-surface.mjs +525 -0
- package/foundation/discovery/authoring-surface.test.mjs +392 -0
- package/foundation/discovery/cli-self-docs.d.mts +119 -0
- package/foundation/discovery/cli-self-docs.mjs +490 -0
- package/foundation/discovery/cli-self-docs.test.mjs +375 -0
- package/foundation/discovery/component-discovery.d.mts +38 -0
- package/foundation/discovery/component-discovery.mjs +48 -0
- package/foundation/discovery/component-loader.d.mts +35 -38
- package/foundation/discovery/component-loader.mjs +53 -222
- package/foundation/discovery/docs-discovery.d.mts +114 -9
- package/foundation/discovery/docs-discovery.mjs +239 -30
- package/foundation/discovery/docs-discovery.test.mjs +150 -35
- package/foundation/discovery/docs-output-budget.d.mts +2 -2
- package/foundation/discovery/docs-output-budget.mjs +1 -1
- package/foundation/discovery/docs-section-key.d.mts +28 -10
- package/foundation/discovery/docs-section-key.mjs +134 -33
- package/foundation/discovery/docs-section-key.test.mjs +41 -19
- package/foundation/discovery/template-adapter.d.mts +113 -11
- package/foundation/discovery/template-adapter.fixture-refs.test.mjs +248 -0
- package/foundation/discovery/template-adapter.integration-isolation.test.mjs +94 -0
- package/foundation/discovery/template-adapter.mjs +772 -82
- package/foundation/discovery/template-adapter.test.mjs +57 -0
- package/foundation/discovery/template-conflict-release.d.mts +13 -0
- package/foundation/discovery/template-conflict-release.mjs +40 -0
- package/foundation/discovery/template-conflict-release.test.mjs +40 -0
- package/foundation/discovery/theme-discovery.d.mts +67 -7
- package/foundation/discovery/theme-discovery.mjs +916 -186
- package/foundation/discovery/theme-discovery.test.mjs +613 -219
- package/foundation/discovery/theming-targets.test.mjs +4 -0
- package/foundation/doc-compiler/bundle.d.mts +47 -0
- package/foundation/doc-compiler/bundle.mjs +278 -0
- package/foundation/doc-compiler/bundle.test.mjs +266 -0
- package/foundation/doc-compiler/compile.d.mts +343 -0
- package/foundation/doc-compiler/compile.mjs +558 -0
- package/foundation/doc-compiler/diagnostics.d.mts +126 -0
- package/foundation/doc-compiler/diagnostics.mjs +305 -0
- package/foundation/doc-compiler/doc-compiler.test.mjs +714 -0
- package/foundation/doc-compiler/doc-loads.test.mjs +1642 -0
- package/foundation/doc-compiler/import.d.mts +24 -0
- package/foundation/doc-compiler/import.mjs +59 -0
- package/foundation/doc-compiler/inputs.d.mts +102 -0
- package/foundation/doc-compiler/inputs.mjs +291 -0
- package/foundation/doc-compiler/inputs.test.mjs +299 -0
- package/foundation/doc-compiler/ir.d.mts +22 -0
- package/foundation/doc-compiler/ir.mjs +471 -0
- package/foundation/doc-compiler/lenses.d.mts +36 -0
- package/foundation/doc-compiler/lenses.mjs +173 -0
- package/foundation/doc-compiler/links.d.mts +162 -0
- package/foundation/doc-compiler/links.mjs +294 -0
- package/foundation/doc-compiler/links.test.mjs +192 -0
- package/foundation/doc-compiler/lower-doc.test.mjs +495 -0
- package/foundation/doc-compiler/overlays.d.mts +37 -0
- package/foundation/doc-compiler/overlays.mjs +206 -0
- package/foundation/doc-compiler/parse-readable.d.mts +9 -0
- package/foundation/doc-compiler/parse-readable.mjs +29 -0
- package/foundation/doc-compiler/read.d.mts +127 -0
- package/foundation/doc-compiler/read.mjs +325 -0
- package/foundation/doc-compiler/read.test.mjs +313 -0
- package/foundation/doc-compiler/source.d.mts +33 -0
- package/foundation/doc-compiler/source.mjs +128 -0
- package/foundation/doc-compiler/tree.d.mts +288 -0
- package/foundation/doc-compiler/tree.mjs +876 -0
- package/foundation/doc-compiler/tree.test.mjs +598 -0
- package/foundation/fs/file-protection.d.mts +33 -0
- package/foundation/fs/file-protection.mjs +825 -0
- package/foundation/fs/file-protection.test.mjs +250 -0
- package/foundation/fs/module-loader.d.mts +1 -0
- package/foundation/fs/module-loader.mjs +50 -1
- package/foundation/fs/module-loader.stdout.test.mjs +332 -0
- package/foundation/fs/path-safety.d.mts +3 -2
- package/foundation/fs/path-safety.mjs +49 -19
- package/foundation/fs/path-safety.test.mjs +50 -0
- package/foundation/fs/publish-file-hardlink-unavailable.test.mjs +129 -94
- package/foundation/integrations/autolink.d.mts +58 -1
- package/foundation/integrations/autolink.mjs +143 -52
- package/foundation/integrations/autolink.test.mjs +1 -1
- package/foundation/integrations/cli-requirement.d.mts +45 -0
- package/foundation/integrations/cli-requirement.mjs +154 -0
- package/foundation/integrations/cli-requirement.test.mjs +84 -0
- package/foundation/integrations/contribution-fixes.d.mts +145 -0
- package/foundation/integrations/contribution-fixes.mjs +1284 -0
- package/foundation/integrations/contribution-inventory.d.mts +3 -2
- package/foundation/integrations/contribution-inventory.mjs +27 -24
- package/foundation/integrations/contribution-inventory.test.mjs +86 -27
- package/foundation/integrations/integration-warnings.d.mts +9 -2
- package/foundation/integrations/integration-warnings.mjs +51 -26
- package/foundation/integrations/integration-warnings.test.mjs +74 -1
- package/foundation/integrations/integrations.d.mts +17 -1
- package/foundation/integrations/integrations.mjs +52 -98
- package/foundation/integrations/integrations.test.mjs +31 -0
- package/foundation/integrations/provider-ledger.test.mjs +275 -0
- package/foundation/integrations/provider-resolution.d.mts +152 -0
- package/foundation/integrations/provider-resolution.mjs +576 -0
- package/foundation/integrations/provider-resolution.test.mjs +369 -0
- package/foundation/integrations/theme-descriptor.d.mts +8 -0
- package/foundation/integrations/theme-descriptor.mjs +44 -0
- package/foundation/integrations/validate-contributions.mjs +121 -29
- package/foundation/response/base.d.ts +8 -4
- package/foundation/response/error-codes.d.mts +3 -1
- package/foundation/response/error-codes.d.ts +2 -0
- package/foundation/response/error-codes.doc.mjs +13 -4
- package/foundation/response/error-codes.mjs +8 -2
- package/foundation/response/error-codes.test.mjs +137 -10
- package/foundation/response/json-contract.test.mjs +11 -0
- package/foundation/response/json.d.mts +4 -2
- package/foundation/response/json.mjs +8 -10
- package/foundation/response/response-types.doc.d.mts +5 -1
- package/foundation/response/response-types.doc.mjs +37 -22
- package/foundation/response/response-types.doc.test.mjs +158 -0
- package/foundation/response/response.doc.mjs +1 -1
- package/foundation/text/string-utils.d.mts +8 -0
- package/foundation/text/string-utils.mjs +40 -10
- package/foundation/xle/expand.d.mts +2 -0
- package/foundation/xle/expand.mjs +4 -3
- package/foundation/xle/expand.test.mjs +54 -0
- package/foundation/xle/xle.test.mjs +13 -0
- package/package.json +10 -11
- package/assets/templates/themes/manifest.json +0 -95
- package/clients/cli/lib/update-check.mjs +0 -83
- package/clients/cli/lib/update-check.test.mjs +0 -137
- package/clients/cli/update-hint-commands.test.mjs +0 -54
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public type surface for discover sources.
|
|
5
|
+
*
|
|
6
|
+
* A discover source tells `astryx discover` which integrations exist beyond the
|
|
7
|
+
* ones a project already has. A project sets one as `discover` in
|
|
8
|
+
* `astryx.config`; an integration exports one as a `discover` NAMED export from
|
|
9
|
+
* its manifest. Discover calls every source, checks each answer, keeps a saved
|
|
10
|
+
* copy of the last good one, and never installs, enables, or runs anything a
|
|
11
|
+
* catalog names.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
/** Kinds of item a package can add. */
|
|
15
|
+
export type DiscoverKind =
|
|
16
|
+
'component' | 'template' | 'doc' | 'theme' | 'codemod' | 'agent-doc';
|
|
17
|
+
|
|
18
|
+
/** One item a package version adds. */
|
|
19
|
+
export interface DiscoverContribution {
|
|
20
|
+
kind: DiscoverKind;
|
|
21
|
+
/**
|
|
22
|
+
* The name the CLI uses for it: a component name, template id, doc topic,
|
|
23
|
+
* theme slug, or codemod id.
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
title?: string;
|
|
27
|
+
summary?: string;
|
|
28
|
+
keywords?: string[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** One published version of a package. */
|
|
32
|
+
export interface DiscoverVersion {
|
|
33
|
+
version: string;
|
|
34
|
+
/** ISO 8601 publish time, or null when the source does not know it. */
|
|
35
|
+
publishedAt: string | null;
|
|
36
|
+
prerelease: boolean;
|
|
37
|
+
/** `ok`, or why the source could not read this version. */
|
|
38
|
+
status: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** One npm package a source knows about. */
|
|
42
|
+
export interface DiscoverPackage {
|
|
43
|
+
package: string;
|
|
44
|
+
/** Shared by every npm name that publishes the same integration. */
|
|
45
|
+
integration: string;
|
|
46
|
+
/** The integration's other npm names. Discover never offers one the project has. */
|
|
47
|
+
aliases: string[];
|
|
48
|
+
description?: string;
|
|
49
|
+
/** The latest release, or null when the package has only prereleases. */
|
|
50
|
+
latest: string | null;
|
|
51
|
+
/** Every version, newest first. */
|
|
52
|
+
versions: DiscoverVersion[];
|
|
53
|
+
/** What the requested version adds, or the latest when none was requested. */
|
|
54
|
+
contributions: DiscoverContribution[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** What a discover source returns. */
|
|
58
|
+
export interface DiscoverCatalog {
|
|
59
|
+
schemaVersion: 1;
|
|
60
|
+
source: {
|
|
61
|
+
/** Shown to people, for example "Acme catalog". */
|
|
62
|
+
name: string;
|
|
63
|
+
/** ISO 8601 time the source's data was produced. */
|
|
64
|
+
generatedAt: string;
|
|
65
|
+
/** False when the source knows its list is partial. */
|
|
66
|
+
complete: boolean;
|
|
67
|
+
};
|
|
68
|
+
packages: DiscoverPackage[];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/** One call to a discover source. */
|
|
72
|
+
export interface DiscoverSourceContext {
|
|
73
|
+
/** Aborted when the source exceeds its 30-second budget. */
|
|
74
|
+
readonly signal: AbortSignal;
|
|
75
|
+
/** Asks for one package: every version, and `version`'s contributions. */
|
|
76
|
+
readonly package?: string;
|
|
77
|
+
/** With `package`: the version whose contributions to return. Defaults to the latest. */
|
|
78
|
+
readonly version?: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* A discover source: an async function, like `debug`. Set it as `discover` in
|
|
83
|
+
* astryx.config, or export it as `discover` from an integration manifest.
|
|
84
|
+
*/
|
|
85
|
+
export type DiscoverSource = (
|
|
86
|
+
context: DiscoverSourceContext,
|
|
87
|
+
) => Promise<DiscoverCatalog>;
|
|
@@ -25,7 +25,7 @@ export namespace AuthoredDocGraphFields {
|
|
|
25
25
|
internal: "internal";
|
|
26
26
|
}>>;
|
|
27
27
|
}
|
|
28
|
-
/** Runtime schema for
|
|
28
|
+
/** Runtime schema for the stable content-block union published in 0.6.x. */
|
|
29
29
|
export const ReferenceContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
30
30
|
type: z.ZodLiteral<"prose">;
|
|
31
31
|
text: z.ZodString;
|
|
@@ -55,6 +55,120 @@ export const ReferenceContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
55
55
|
type: z.ZodLiteral<"token-ref">;
|
|
56
56
|
topic: z.ZodString;
|
|
57
57
|
section: z.ZodString;
|
|
58
|
+
}, z.core.$strict>], "type">;
|
|
59
|
+
/** Runtime schema for graph-only blocks used by NamespaceDoc. */
|
|
60
|
+
export const GraphContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61
|
+
type: z.ZodLiteral<"workflow">;
|
|
62
|
+
title: z.ZodOptional<z.ZodString>;
|
|
63
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
64
|
+
title: z.ZodString;
|
|
65
|
+
description: z.ZodOptional<z.ZodString>;
|
|
66
|
+
references: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
67
|
+
}, z.core.$strict>>;
|
|
68
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
69
|
+
type: z.ZodLiteral<"collection">;
|
|
70
|
+
title: z.ZodOptional<z.ZodString>;
|
|
71
|
+
source: z.ZodObject<{
|
|
72
|
+
slot: z.ZodString;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
presentation: z.ZodOptional<z.ZodEnum<{
|
|
75
|
+
list: "list";
|
|
76
|
+
cards: "cards";
|
|
77
|
+
compact: "compact";
|
|
78
|
+
}>>;
|
|
79
|
+
whenEmpty: z.ZodOptional<z.ZodEnum<{
|
|
80
|
+
show: "show";
|
|
81
|
+
omit: "omit";
|
|
82
|
+
}>>;
|
|
83
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
84
|
+
type: z.ZodLiteral<"reference">;
|
|
85
|
+
target: z.ZodString;
|
|
86
|
+
projection: z.ZodOptional<z.ZodObject<{
|
|
87
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
+
sections: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
89
|
+
}, z.core.$strict>>;
|
|
90
|
+
presentation: z.ZodOptional<z.ZodEnum<{
|
|
91
|
+
compact: "compact";
|
|
92
|
+
summary: "summary";
|
|
93
|
+
full: "full";
|
|
94
|
+
}>>;
|
|
95
|
+
}, z.core.$strict>], "type">;
|
|
96
|
+
/**
|
|
97
|
+
* A topic section's blocks: the stable union, plus a reference block, which a
|
|
98
|
+
* read inlines as the doc it includes.
|
|
99
|
+
*/
|
|
100
|
+
export const SectionContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
101
|
+
type: z.ZodLiteral<"prose">;
|
|
102
|
+
text: z.ZodString;
|
|
103
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
104
|
+
type: z.ZodLiteral<"heading">;
|
|
105
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>;
|
|
106
|
+
text: z.ZodString;
|
|
107
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
108
|
+
type: z.ZodLiteral<"code">;
|
|
109
|
+
lang: z.ZodString;
|
|
110
|
+
code: z.ZodString;
|
|
111
|
+
label: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
113
|
+
type: z.ZodLiteral<"table">;
|
|
114
|
+
headers: z.ZodArray<z.ZodString>;
|
|
115
|
+
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
116
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
117
|
+
type: z.ZodLiteral<"list">;
|
|
118
|
+
style: z.ZodEnum<{
|
|
119
|
+
ordered: "ordered";
|
|
120
|
+
unordered: "unordered";
|
|
121
|
+
do: "do";
|
|
122
|
+
dont: "dont";
|
|
123
|
+
}>;
|
|
124
|
+
items: z.ZodArray<z.ZodString>;
|
|
125
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
126
|
+
type: z.ZodLiteral<"token-ref">;
|
|
127
|
+
topic: z.ZodString;
|
|
128
|
+
section: z.ZodString;
|
|
129
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
130
|
+
type: z.ZodLiteral<"reference">;
|
|
131
|
+
target: z.ZodString;
|
|
132
|
+
projection: z.ZodOptional<z.ZodObject<{
|
|
133
|
+
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
134
|
+
sections: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
135
|
+
}, z.core.$strict>>;
|
|
136
|
+
presentation: z.ZodOptional<z.ZodEnum<{
|
|
137
|
+
compact: "compact";
|
|
138
|
+
summary: "summary";
|
|
139
|
+
full: "full";
|
|
140
|
+
}>>;
|
|
141
|
+
}, z.core.$strict>], "type">;
|
|
142
|
+
/** Namespace content accepts both stable reference blocks and graph-only blocks. */
|
|
143
|
+
export const NamespaceContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"prose">;
|
|
145
|
+
text: z.ZodString;
|
|
146
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
147
|
+
type: z.ZodLiteral<"heading">;
|
|
148
|
+
level: z.ZodUnion<readonly [z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>]>;
|
|
149
|
+
text: z.ZodString;
|
|
150
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
151
|
+
type: z.ZodLiteral<"code">;
|
|
152
|
+
lang: z.ZodString;
|
|
153
|
+
code: z.ZodString;
|
|
154
|
+
label: z.ZodOptional<z.ZodString>;
|
|
155
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
156
|
+
type: z.ZodLiteral<"table">;
|
|
157
|
+
headers: z.ZodArray<z.ZodString>;
|
|
158
|
+
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
159
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
160
|
+
type: z.ZodLiteral<"list">;
|
|
161
|
+
style: z.ZodEnum<{
|
|
162
|
+
ordered: "ordered";
|
|
163
|
+
unordered: "unordered";
|
|
164
|
+
do: "do";
|
|
165
|
+
dont: "dont";
|
|
166
|
+
}>;
|
|
167
|
+
items: z.ZodArray<z.ZodString>;
|
|
168
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
169
|
+
type: z.ZodLiteral<"token-ref">;
|
|
170
|
+
topic: z.ZodString;
|
|
171
|
+
section: z.ZodString;
|
|
58
172
|
}, z.core.$strict>, z.ZodObject<{
|
|
59
173
|
type: z.ZodLiteral<"workflow">;
|
|
60
174
|
title: z.ZodOptional<z.ZodString>;
|
|
@@ -91,7 +205,12 @@ export const ReferenceContentBlockSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
91
205
|
full: "full";
|
|
92
206
|
}>>;
|
|
93
207
|
}, z.core.$strict>], "type">;
|
|
94
|
-
/**
|
|
208
|
+
/**
|
|
209
|
+
* New-format stamped component doc (`type: 'component'`): one component's
|
|
210
|
+
* `props`, or the `components` a group doc documents together. These are the
|
|
211
|
+
* shapes the published ComponentDoc type allows, and the ones an unstamped doc
|
|
212
|
+
* may already take.
|
|
213
|
+
*/
|
|
95
214
|
export const ComponentDocKindSchema: z.ZodObject<{
|
|
96
215
|
type: z.ZodLiteral<"component">;
|
|
97
216
|
theming: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -119,13 +238,16 @@ export const ComponentDocKindSchema: z.ZodObject<{
|
|
|
119
238
|
public: "public";
|
|
120
239
|
internal: "internal";
|
|
121
240
|
}>>;
|
|
122
|
-
props: z.ZodArray<z.ZodObject<{
|
|
241
|
+
props: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
123
242
|
name: z.ZodString;
|
|
124
243
|
type: z.ZodString;
|
|
125
244
|
description: z.ZodString;
|
|
126
245
|
default: z.ZodOptional<z.ZodString>;
|
|
127
246
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
128
|
-
}, z.core.$loose
|
|
247
|
+
}, z.core.$loose>>>;
|
|
248
|
+
components: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
249
|
+
name: z.ZodString;
|
|
250
|
+
}, z.core.$loose>>>;
|
|
129
251
|
}, z.core.$loose>;
|
|
130
252
|
/** New-format stamped function doc (`type: 'function'`). */
|
|
131
253
|
export const FunctionDocKindSchema: z.ZodObject<{
|
|
@@ -165,6 +287,26 @@ export const FunctionDocKindSchema: z.ZodObject<{
|
|
|
165
287
|
internal: "internal";
|
|
166
288
|
}>>;
|
|
167
289
|
}, z.core.$loose>;
|
|
290
|
+
/**
|
|
291
|
+
* A stamped function doc as it loads: as with components, `displayName` may be
|
|
292
|
+
* missing and `usage` passes through unchecked.
|
|
293
|
+
*
|
|
294
|
+
* @typedef {Omit<FunctionDoc, 'type' | 'displayName' | 'usage'>
|
|
295
|
+
* & {type: 'function', displayName?: string, usage?: unknown}} LoadedFunctionDoc
|
|
296
|
+
*/
|
|
297
|
+
/**
|
|
298
|
+
* @typedef {import('../_shared/contract.js').Expect<
|
|
299
|
+
* import('../_shared/contract.js').MutuallyAssignable<
|
|
300
|
+
* import('../_shared/contract.js').NamedFields<z.infer<typeof FunctionDocKindSchema>>,
|
|
301
|
+
* import('../_shared/contract.js').NamedFields<LoadedFunctionDoc>
|
|
302
|
+
* >
|
|
303
|
+
* >} _FunctionDocDriftLock
|
|
304
|
+
*/
|
|
305
|
+
/**
|
|
306
|
+
* Every HookDoc is a FunctionDoc, so the one function schema covers both.
|
|
307
|
+
*
|
|
308
|
+
* @typedef {import('../_shared/contract.js').Expect<[HookDoc] extends [FunctionDoc] ? true : false>} _HookDocIsFunctionDocLock
|
|
309
|
+
*/
|
|
168
310
|
/**
|
|
169
311
|
* Stamped generic reference/topic doc (`type: 'generic'`). `title` and
|
|
170
312
|
* `sections` stay optional at this parser boundary for docs produced by the
|
|
@@ -207,29 +349,6 @@ export const GenericDocKindSchema: z.ZodObject<{
|
|
|
207
349
|
type: z.ZodLiteral<"token-ref">;
|
|
208
350
|
topic: z.ZodString;
|
|
209
351
|
section: z.ZodString;
|
|
210
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
211
|
-
type: z.ZodLiteral<"workflow">;
|
|
212
|
-
title: z.ZodOptional<z.ZodString>;
|
|
213
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
214
|
-
title: z.ZodString;
|
|
215
|
-
description: z.ZodOptional<z.ZodString>;
|
|
216
|
-
references: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
217
|
-
}, z.core.$strict>>;
|
|
218
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
219
|
-
type: z.ZodLiteral<"collection">;
|
|
220
|
-
title: z.ZodOptional<z.ZodString>;
|
|
221
|
-
source: z.ZodObject<{
|
|
222
|
-
slot: z.ZodString;
|
|
223
|
-
}, z.core.$strict>;
|
|
224
|
-
presentation: z.ZodOptional<z.ZodEnum<{
|
|
225
|
-
list: "list";
|
|
226
|
-
cards: "cards";
|
|
227
|
-
compact: "compact";
|
|
228
|
-
}>>;
|
|
229
|
-
whenEmpty: z.ZodOptional<z.ZodEnum<{
|
|
230
|
-
show: "show";
|
|
231
|
-
omit: "omit";
|
|
232
|
-
}>>;
|
|
233
352
|
}, z.core.$strict>, z.ZodObject<{
|
|
234
353
|
type: z.ZodLiteral<"reference">;
|
|
235
354
|
target: z.ZodString;
|
|
@@ -289,7 +408,7 @@ export const SchemaDocKindSchema: z.ZodObject<{
|
|
|
289
408
|
description: z.ZodString;
|
|
290
409
|
namespace: z.ZodOptional<z.ZodString>;
|
|
291
410
|
appliesTo: z.ZodOptional<z.ZodString>;
|
|
292
|
-
fields: z.ZodArray<z.ZodType<import("./schema/type").SchemaFieldDoc, any, z.core.$ZodTypeInternals<import("./schema/type").SchemaFieldDoc, any>>>;
|
|
411
|
+
fields: z.ZodArray<z.ZodType<import("./schema/type.js").SchemaFieldDoc, any, z.core.$ZodTypeInternals<import("./schema/type.js").SchemaFieldDoc, any>>>;
|
|
293
412
|
examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
294
413
|
label: z.ZodOptional<z.ZodString>;
|
|
295
414
|
code: z.ZodString;
|
|
@@ -323,41 +442,6 @@ export const SchemaDocKindSchema: z.ZodObject<{
|
|
|
323
442
|
type: z.ZodLiteral<"token-ref">;
|
|
324
443
|
topic: z.ZodString;
|
|
325
444
|
section: z.ZodString;
|
|
326
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
327
|
-
type: z.ZodLiteral<"workflow">;
|
|
328
|
-
title: z.ZodOptional<z.ZodString>;
|
|
329
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
330
|
-
title: z.ZodString;
|
|
331
|
-
description: z.ZodOptional<z.ZodString>;
|
|
332
|
-
references: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
333
|
-
}, z.core.$strict>>;
|
|
334
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
335
|
-
type: z.ZodLiteral<"collection">;
|
|
336
|
-
title: z.ZodOptional<z.ZodString>;
|
|
337
|
-
source: z.ZodObject<{
|
|
338
|
-
slot: z.ZodString;
|
|
339
|
-
}, z.core.$strict>;
|
|
340
|
-
presentation: z.ZodOptional<z.ZodEnum<{
|
|
341
|
-
list: "list";
|
|
342
|
-
cards: "cards";
|
|
343
|
-
compact: "compact";
|
|
344
|
-
}>>;
|
|
345
|
-
whenEmpty: z.ZodOptional<z.ZodEnum<{
|
|
346
|
-
show: "show";
|
|
347
|
-
omit: "omit";
|
|
348
|
-
}>>;
|
|
349
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
350
|
-
type: z.ZodLiteral<"reference">;
|
|
351
|
-
target: z.ZodString;
|
|
352
|
-
projection: z.ZodOptional<z.ZodObject<{
|
|
353
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
354
|
-
sections: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
355
|
-
}, z.core.$strict>>;
|
|
356
|
-
presentation: z.ZodOptional<z.ZodEnum<{
|
|
357
|
-
compact: "compact";
|
|
358
|
-
summary: "summary";
|
|
359
|
-
full: "full";
|
|
360
|
-
}>>;
|
|
361
445
|
}, z.core.$strict>], "type">>>;
|
|
362
446
|
placement: z.ZodOptional<z.ZodObject<{
|
|
363
447
|
parent: z.ZodString;
|
|
@@ -370,6 +454,14 @@ export const SchemaDocKindSchema: z.ZodObject<{
|
|
|
370
454
|
internal: "internal";
|
|
371
455
|
}>>;
|
|
372
456
|
}, z.core.$loose>;
|
|
457
|
+
/**
|
|
458
|
+
* @typedef {import('../_shared/contract.js').Expect<
|
|
459
|
+
* import('../_shared/contract.js').MutuallyAssignable<
|
|
460
|
+
* import('../_shared/contract.js').NamedFields<z.infer<typeof SchemaDocKindSchema>>,
|
|
461
|
+
* import('../_shared/contract.js').NamedFields<SchemaDoc & {type: 'schema'}>
|
|
462
|
+
* >
|
|
463
|
+
* >} _SchemaDocDriftLock
|
|
464
|
+
*/
|
|
373
465
|
/** New stamped command doc (`type: 'command'`). */
|
|
374
466
|
export const CommandDocKindSchema: z.ZodObject<{
|
|
375
467
|
type: z.ZodLiteral<"command">;
|
|
@@ -434,41 +526,6 @@ export const CommandDocKindSchema: z.ZodObject<{
|
|
|
434
526
|
type: z.ZodLiteral<"token-ref">;
|
|
435
527
|
topic: z.ZodString;
|
|
436
528
|
section: z.ZodString;
|
|
437
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
438
|
-
type: z.ZodLiteral<"workflow">;
|
|
439
|
-
title: z.ZodOptional<z.ZodString>;
|
|
440
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
441
|
-
title: z.ZodString;
|
|
442
|
-
description: z.ZodOptional<z.ZodString>;
|
|
443
|
-
references: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
444
|
-
}, z.core.$strict>>;
|
|
445
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
446
|
-
type: z.ZodLiteral<"collection">;
|
|
447
|
-
title: z.ZodOptional<z.ZodString>;
|
|
448
|
-
source: z.ZodObject<{
|
|
449
|
-
slot: z.ZodString;
|
|
450
|
-
}, z.core.$strict>;
|
|
451
|
-
presentation: z.ZodOptional<z.ZodEnum<{
|
|
452
|
-
list: "list";
|
|
453
|
-
cards: "cards";
|
|
454
|
-
compact: "compact";
|
|
455
|
-
}>>;
|
|
456
|
-
whenEmpty: z.ZodOptional<z.ZodEnum<{
|
|
457
|
-
show: "show";
|
|
458
|
-
omit: "omit";
|
|
459
|
-
}>>;
|
|
460
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
461
|
-
type: z.ZodLiteral<"reference">;
|
|
462
|
-
target: z.ZodString;
|
|
463
|
-
projection: z.ZodOptional<z.ZodObject<{
|
|
464
|
-
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
465
|
-
sections: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
466
|
-
}, z.core.$strict>>;
|
|
467
|
-
presentation: z.ZodOptional<z.ZodEnum<{
|
|
468
|
-
compact: "compact";
|
|
469
|
-
summary: "summary";
|
|
470
|
-
full: "full";
|
|
471
|
-
}>>;
|
|
472
529
|
}, z.core.$strict>], "type">>>;
|
|
473
530
|
placement: z.ZodOptional<z.ZodObject<{
|
|
474
531
|
parent: z.ZodString;
|
|
@@ -481,6 +538,14 @@ export const CommandDocKindSchema: z.ZodObject<{
|
|
|
481
538
|
internal: "internal";
|
|
482
539
|
}>>;
|
|
483
540
|
}, z.core.$loose>;
|
|
541
|
+
/**
|
|
542
|
+
* @typedef {import('../_shared/contract.js').Expect<
|
|
543
|
+
* import('../_shared/contract.js').MutuallyAssignable<
|
|
544
|
+
* import('../_shared/contract.js').NamedFields<z.infer<typeof CommandDocKindSchema>>,
|
|
545
|
+
* import('../_shared/contract.js').NamedFields<CommandDoc & {type: 'command'}>
|
|
546
|
+
* >
|
|
547
|
+
* >} _CommandDocDriftLock
|
|
548
|
+
*/
|
|
484
549
|
/** New stamped enum doc (`type: 'enum'`). */
|
|
485
550
|
export const EnumDocKindSchema: z.ZodObject<{
|
|
486
551
|
type: z.ZodLiteral<"enum">;
|
|
@@ -833,29 +898,6 @@ export const LegacyDocSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
833
898
|
type: z.ZodLiteral<"token-ref">;
|
|
834
899
|
topic: z.ZodString;
|
|
835
900
|
section: z.ZodString;
|
|
836
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
837
|
-
type: z.ZodLiteral<"workflow">;
|
|
838
|
-
title: z.ZodOptional<z.ZodString>;
|
|
839
|
-
steps: z.ZodArray<z.ZodObject<{
|
|
840
|
-
title: z.ZodString;
|
|
841
|
-
description: z.ZodOptional<z.ZodString>;
|
|
842
|
-
references: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
843
|
-
}, z.core.$strict>>;
|
|
844
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
845
|
-
type: z.ZodLiteral<"collection">;
|
|
846
|
-
title: z.ZodOptional<z.ZodString>;
|
|
847
|
-
source: z.ZodObject<{
|
|
848
|
-
slot: z.ZodString;
|
|
849
|
-
}, z.core.$strict>;
|
|
850
|
-
presentation: z.ZodOptional<z.ZodEnum<{
|
|
851
|
-
list: "list";
|
|
852
|
-
cards: "cards";
|
|
853
|
-
compact: "compact";
|
|
854
|
-
}>>;
|
|
855
|
-
whenEmpty: z.ZodOptional<z.ZodEnum<{
|
|
856
|
-
show: "show";
|
|
857
|
-
omit: "omit";
|
|
858
|
-
}>>;
|
|
859
901
|
}, z.core.$strict>, z.ZodObject<{
|
|
860
902
|
type: z.ZodLiteral<"reference">;
|
|
861
903
|
target: z.ZodString;
|
|
@@ -885,13 +927,83 @@ export const LegacyDocSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
885
927
|
extends: z.ZodOptional<z.ZodString>;
|
|
886
928
|
tokenCategory: z.ZodOptional<z.ZodString>;
|
|
887
929
|
}, z.core.$loose>]>;
|
|
888
|
-
export type AuthoredDocGraphFieldsType = import("./base/type").AuthoredDocGraphFields;
|
|
889
|
-
export type AuthoredDocKind = import("./base/type").AuthoredDocKind;
|
|
890
|
-
export type NamespaceDoc = import("./namespace/type").NamespaceDoc;
|
|
891
|
-
export type ReferenceContentBlock = import("./reference/type").ReferenceContentBlock;
|
|
892
|
-
export type
|
|
893
|
-
export type
|
|
894
|
-
export type
|
|
930
|
+
export type AuthoredDocGraphFieldsType = import("./base/type.js").AuthoredDocGraphFields;
|
|
931
|
+
export type AuthoredDocKind = import("./base/type.js").AuthoredDocKind;
|
|
932
|
+
export type NamespaceDoc = import("./namespace/type.js").NamespaceDoc;
|
|
933
|
+
export type ReferenceContentBlock = import("./reference/type.js").ReferenceContentBlock;
|
|
934
|
+
export type GraphContentBlock = import("./reference/type.js").GraphContentBlock;
|
|
935
|
+
export type ReferenceSection = import("./reference/type.js").ReferenceSection;
|
|
936
|
+
export type ReferenceDoc = import("./reference/type.js").ReferenceDoc;
|
|
937
|
+
export type SingleComponentDoc = import("./component/type.js").SingleComponentDoc;
|
|
938
|
+
export type ComponentPropDoc = import("./base/type.js").ComponentPropDoc;
|
|
939
|
+
export type HookDoc = import("./hook/type.js").HookDoc;
|
|
940
|
+
export type FunctionDoc = import("./function/type.js").FunctionDoc;
|
|
941
|
+
export type SchemaDoc = import("./schema/type.js").SchemaDoc;
|
|
942
|
+
export type CommandDoc = import("./command/type.js").CommandDoc;
|
|
943
|
+
export type EnumDoc = import("./enum/type.js").EnumDoc;
|
|
944
|
+
export type _AuthoredDocKindDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof AuthoredDocKindSchema>, AuthoredDocKind>>;
|
|
945
|
+
export type _AuthoredDocGraphDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<z.infer<typeof _AuthoredDocGraphSchema>, AuthoredDocGraphFieldsType>>;
|
|
946
|
+
export type _ReferenceContentBlockDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof ReferenceContentBlockSchema>, ReferenceContentBlock>>;
|
|
947
|
+
export type _GraphContentBlockDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof GraphContentBlockSchema>, GraphContentBlock>>;
|
|
948
|
+
export type _SectionContentBlockDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof SectionContentBlockSchema>, ReferenceSection["content"][number]>>;
|
|
949
|
+
/**
|
|
950
|
+
* A stamped component doc as it loads. The loader accepts what the unstamped
|
|
951
|
+
* format always accepted, so stamping an existing doc never breaks it:
|
|
952
|
+
* `displayName` may be missing, `category` is any string, `usage`, `theming`,
|
|
953
|
+
* `playground` and `examples` pass through unchecked, and a doc has `props`,
|
|
954
|
+
* `components`, or both; each `components` entry needs only a `name`. Every
|
|
955
|
+
* other field matches the published type.
|
|
956
|
+
*/
|
|
957
|
+
export type LoadedComponentDoc = Omit<SingleComponentDoc, "type" | "displayName" | "category" | "usage" | "theming" | "examples" | "playground" | "props"> & {
|
|
958
|
+
type: "component";
|
|
959
|
+
displayName?: string;
|
|
960
|
+
category?: string;
|
|
961
|
+
usage?: unknown;
|
|
962
|
+
theming?: unknown;
|
|
963
|
+
examples?: unknown[];
|
|
964
|
+
playground?: unknown;
|
|
965
|
+
props?: ComponentPropDoc[];
|
|
966
|
+
components?: Array<{
|
|
967
|
+
name: string;
|
|
968
|
+
}>;
|
|
969
|
+
};
|
|
970
|
+
export type _ComponentDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof ComponentDocKindSchema>>, import("../_shared/contract.js").NamedFields<LoadedComponentDoc>>>;
|
|
971
|
+
/**
|
|
972
|
+
* A stamped function doc as it loads: as with components, `displayName` may be
|
|
973
|
+
* missing and `usage` passes through unchecked.
|
|
974
|
+
*/
|
|
975
|
+
export type LoadedFunctionDoc = Omit<FunctionDoc, "type" | "displayName" | "usage"> & {
|
|
976
|
+
type: "function";
|
|
977
|
+
displayName?: string;
|
|
978
|
+
usage?: unknown;
|
|
979
|
+
};
|
|
980
|
+
export type _FunctionDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof FunctionDocKindSchema>>, import("../_shared/contract.js").NamedFields<LoadedFunctionDoc>>>;
|
|
981
|
+
/**
|
|
982
|
+
* Every HookDoc is a FunctionDoc, so the one function schema covers both.
|
|
983
|
+
*/
|
|
984
|
+
export type _HookDocIsFunctionDocLock = import("../_shared/contract.js").Expect<[HookDoc] extends [FunctionDoc] ? true : false>;
|
|
985
|
+
/**
|
|
986
|
+
* A stamped generic doc as the load check accepts it. `title`, `description`
|
|
987
|
+
* and `sections` may be missing, as in docs the v0.3.0 factory-removal codemod
|
|
988
|
+
* produced; `parseReference` then fills them (title from `displayName` or
|
|
989
|
+
* `name`, an empty description, no sections), so its result is a full
|
|
990
|
+
* ReferenceDoc. Only a doc with a description and sections is a usable topic
|
|
991
|
+
* (see `problemsInTopic`).
|
|
992
|
+
*/
|
|
993
|
+
export type LoadedReferenceDoc = Omit<ReferenceDoc, "type" | "title" | "description" | "sections"> & {
|
|
994
|
+
type: "generic";
|
|
995
|
+
} & Partial<Pick<ReferenceDoc, "title" | "description" | "sections">>;
|
|
996
|
+
export type _ReferenceDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof GenericDocKindSchema>>, import("../_shared/contract.js").NamedFields<LoadedReferenceDoc>>>;
|
|
997
|
+
export type _SchemaDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof SchemaDocKindSchema>>, import("../_shared/contract.js").NamedFields<SchemaDoc & {
|
|
998
|
+
type: "schema";
|
|
999
|
+
}>>>;
|
|
1000
|
+
export type _CommandDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof CommandDocKindSchema>>, import("../_shared/contract.js").NamedFields<CommandDoc & {
|
|
1001
|
+
type: "command";
|
|
1002
|
+
}>>>;
|
|
1003
|
+
export type _EnumDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").MutuallyAssignable<import("../_shared/contract.js").NamedFields<z.infer<typeof EnumDocKindSchema>>, import("../_shared/contract.js").NamedFields<EnumDoc & {
|
|
1004
|
+
type: "enum";
|
|
1005
|
+
}>>>;
|
|
1006
|
+
export type _NamespaceDocDriftLock = import("../_shared/contract.js").Expect<import("../_shared/contract.js").Equal<z.infer<typeof NamespaceDocKindSchema>, NamespaceDoc>>;
|
|
895
1007
|
import { z } from 'zod';
|
|
896
1008
|
declare const _AuthoredDocGraphSchema: z.ZodObject<{
|
|
897
1009
|
placement: z.ZodOptional<z.ZodObject<{
|