@astryxdesign/cli 0.6.3-canary.d0d49a4 → 0.6.3-canary.e9b8aa1
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 +1 -2
- package/api/build/build.type.d.mts +2 -2
- package/api/build/build.type.mjs +2 -2
- package/api/component/component.type.d.mts +6 -6
- package/api/component/component.type.mjs +19 -19
- package/api/discover/discover.type.d.mts +4 -4
- package/api/discover/discover.type.mjs +10 -10
- package/api/docs/_adapter.d.mts +24 -37
- package/api/docs/_adapter.mjs +83 -169
- package/api/docs/detail/detail.mjs +63 -14
- package/api/docs/detail/section/section.d.mts +1 -1
- package/api/docs/detail/section/section.mjs +20 -44
- package/api/docs/detail/section/section.test.mjs +0 -41
- package/api/docs/docs.d.mts +2 -7
- package/api/docs/docs.doc.mjs +10 -27
- package/api/docs/docs.mjs +9 -16
- package/api/docs/docs.test.mjs +0 -6
- package/api/docs/docs.type.d.mts +3 -40
- package/api/docs/docs.type.mjs +8 -36
- package/api/docs/integrationDocs.test.mjs +0 -106
- package/api/doctor/doctor.d.mts +0 -48
- package/api/doctor/doctor.mjs +0 -232
- package/api/doctor/doctor.test.mjs +0 -196
- 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/integration/add-contribution.mjs +3 -5
- package/api/integration/add-contribution.test.mjs +4 -4
- package/api/integration/integration-authoring.type.d.mts +1 -1
- package/api/integration/pack-check.mjs +7 -49
- package/api/integration/pack-check.test.mjs +0 -249
- package/api/search/search.d.mts +1 -1
- package/api/search/search.mjs +5 -5
- package/api/search/search.type.d.mts +2 -2
- package/api/search/search.type.mjs +1 -1
- package/api/swizzle/swizzle.type.d.mts +2 -2
- package/api/swizzle/swizzle.type.mjs +2 -2
- package/api/template/template.d.mts +1 -1
- package/api/template/template.type.d.mts +6 -6
- package/api/template/template.type.mjs +12 -12
- package/api/theme/build/build.mjs +6 -20
- package/api/theme/build/build.test.mjs +0 -127
- package/api/theme/palette/generate/generate.mjs +1 -1
- package/api/theme/palette/generate/generator.d.mts +13 -10
- package/api/theme/palette/generate/generator.mjs +3 -7
- package/api/theme/theme.type.d.mts +11 -170
- package/api/theme/theme.type.mjs +27 -94
- package/api/upgrade/_adapter.mjs +5 -71
- package/api/upgrade/upgrade.doc.mjs +3 -4
- package/api/upgrade/upgrade.type.d.mts +5 -5
- package/api/upgrade/upgrade.type.mjs +11 -11
- package/assets/codemods/integration-discovery.mjs +2 -40
- package/assets/codemods/integration-discovery.test.mjs +0 -58
- package/assets/codemods/transforms/v0.3.0/__tests__/unwrap-authoring-factories.test.mjs +5 -27
- package/assets/codemods/transforms/v0.3.0/unwrap-authoring-factories.mjs +5 -20
- package/assets/docs/README.md +0 -9
- package/assets/docs/cli-integrations.doc.mjs +15 -86
- package/assets/docs/styling-libraries.doc.mjs +1 -1
- package/assets/docs/working-with-ai.doc.mjs +1 -1
- package/authoring/_shared/contract.ts +0 -22
- package/authoring/codemod/codemod.doc.mjs +1 -6
- package/authoring/codemod/parse.d.mts +8 -8
- package/authoring/codemod/parse.mjs +6 -8
- package/authoring/config/parse.d.mts +13 -13
- package/authoring/config/parse.mjs +8 -8
- package/authoring/config/type.ts +3 -3
- package/authoring/debug/parse.d.mts +5 -5
- package/authoring/debug/parse.mjs +3 -3
- package/authoring/doctypes/_schema.d.mts +23 -788
- package/authoring/doctypes/_schema.mjs +39 -492
- package/authoring/doctypes/base/type.ts +0 -40
- package/authoring/doctypes/command/command.doc.mjs +2 -3
- package/authoring/doctypes/command/parse.d.mts +2 -2
- package/authoring/doctypes/command/parse.mjs +1 -1
- package/authoring/doctypes/command/type.ts +2 -3
- package/authoring/doctypes/component/component.doc.mjs +3 -6
- package/authoring/doctypes/component/parse.d.mts +2 -2
- package/authoring/doctypes/component/parse.mjs +1 -1
- package/authoring/doctypes/component/type.ts +3 -4
- package/authoring/doctypes/enum/parse.d.mts +2 -2
- package/authoring/doctypes/enum/parse.mjs +1 -1
- package/authoring/doctypes/enum/type.ts +1 -3
- package/authoring/doctypes/function/function.doc.mjs +0 -4
- package/authoring/doctypes/function/parse.d.mts +2 -2
- package/authoring/doctypes/function/parse.mjs +1 -1
- package/authoring/doctypes/function/type.ts +2 -6
- package/authoring/doctypes/hook/hook.doc.mjs +0 -4
- package/authoring/doctypes/hook/parse.d.mts +2 -2
- package/authoring/doctypes/hook/parse.mjs +1 -1
- package/authoring/doctypes/hook/type.ts +2 -3
- package/authoring/doctypes/legacy.d.mts +6 -8
- package/authoring/doctypes/legacy.mjs +4 -5
- package/authoring/doctypes/parse.d.mts +18 -20
- package/authoring/doctypes/parse.mjs +10 -16
- package/authoring/doctypes/parse.test.mjs +3 -77
- package/authoring/doctypes/reference/parse.d.mts +2 -2
- package/authoring/doctypes/reference/parse.mjs +5 -8
- package/authoring/doctypes/reference/reference.doc.mjs +4 -17
- package/authoring/doctypes/reference/type.ts +5 -51
- package/authoring/doctypes/schema/parse.d.mts +2 -2
- package/authoring/doctypes/schema/parse.mjs +1 -1
- package/authoring/doctypes/schema/type.ts +2 -3
- package/authoring/doctypes/template/parse.d.mts +1 -92
- package/authoring/doctypes/template/parse.mjs +2 -36
- package/authoring/doctypes/template/parse.test.mjs +2 -8
- package/authoring/doctypes/template/template.doc.mjs +0 -4
- package/authoring/doctypes/template/type.ts +2 -5
- package/authoring/doctypes/types.ts +9 -10
- package/authoring/gap-report/parse.d.mts +10 -10
- package/authoring/gap-report/parse.mjs +6 -6
- package/authoring/gap-report/type.ts +1 -1
- package/authoring/index.d.mts +0 -1
- package/authoring/index.d.ts +17 -49
- package/authoring/index.mjs +0 -1
- package/authoring/integration/integration.doc.mjs +6 -13
- package/authoring/integration/parse.d.mts +2 -2
- package/authoring/integration/parse.mjs +1 -1
- package/authoring/integration/parse.test.mjs +1 -10
- package/authoring/integration/schema.d.mts +4 -6
- package/authoring/integration/schema.mjs +3 -9
- package/authoring/integration/type.ts +6 -23
- package/authoring/shadcn/receipt.d.mts +6 -6
- package/clients/cli/commands/docs.doc.mjs +3 -13
- package/clients/cli/commands/docs.mjs +21 -121
- package/clients/cli/commands/docs.test.mjs +0 -88
- package/clients/cli/commands/integration-authoring.test.mjs +9 -13
- package/clients/cli/commands/theme-palette-generate.doc.mjs +4 -8
- package/clients/cli/commands/upgrade.doc.mjs +2 -2
- package/clients/cli/formatters/index.mjs +1 -162
- package/clients/cli/formatters/index.test.mjs +0 -91
- package/clients/cli/lib/manifest.mjs +2 -7
- package/foundation/config/project.mjs +6 -21
- package/foundation/discovery/component-discovery.d.mts +1 -1
- package/foundation/discovery/component-discovery.mjs +1 -2
- package/foundation/discovery/docs-discovery.d.mts +4 -11
- package/foundation/discovery/docs-discovery.mjs +88 -208
- package/foundation/discovery/docs-discovery.test.mjs +13 -279
- package/foundation/discovery/template-adapter.mjs +1 -2
- package/foundation/integrations/autolink.mjs +5 -12
- package/foundation/integrations/integration-warnings.mjs +0 -6
- package/foundation/integrations/integrations.d.mts +2 -46
- package/foundation/integrations/integrations.mjs +8 -167
- package/foundation/integrations/integrations.test.mjs +1 -384
- package/foundation/integrations/validate-contributions.d.mts +0 -2
- package/foundation/integrations/validate-contributions.mjs +0 -10
- package/foundation/response/json-contract.test.mjs +17 -46
- package/foundation/response/response-types.doc.mjs +1 -6
- package/package.json +11 -9
- package/api/docs/compiled-topics.test.mjs +0 -78
- package/api/docs/index/index.d.mts +0 -18
- package/api/docs/index/index.mjs +0 -32
- package/api/docs/index/index.test.mjs +0 -62
- package/api/upgrade/project-context.test.mjs +0 -272
- package/assets/docs/authoring.doc.mjs +0 -14
- package/assets/templates/blocks/components/Timer/TimerFormats.doc.mjs +0 -14
- package/assets/templates/blocks/components/Timer/TimerFormats.tsx +0 -34
- package/assets/templates/blocks/components/Timer/TimerInline.doc.mjs +0 -14
- package/assets/templates/blocks/components/Timer/TimerInline.tsx +0 -14
- package/assets/templates/blocks/components/Timer/TimerShowcase.doc.mjs +0 -13
- package/assets/templates/blocks/components/Timer/TimerShowcase.tsx +0 -47
- package/assets/templates/blocks/components/Timer/TimerTypography.doc.mjs +0 -14
- package/assets/templates/blocks/components/Timer/TimerTypography.tsx +0 -31
- package/authoring/doctypes/base/graph-fields.doc.d.mts +0 -9
- package/authoring/doctypes/base/graph-fields.doc.mjs +0 -62
- package/authoring/doctypes/load-contract.test.mjs +0 -207
- package/authoring/doctypes/namespace/namespace.doc.d.mts +0 -9
- package/authoring/doctypes/namespace/namespace.doc.mjs +0 -132
- package/authoring/doctypes/namespace/parse.d.mts +0 -12
- package/authoring/doctypes/namespace/parse.mjs +0 -25
- package/authoring/doctypes/namespace/parse.test.mjs +0 -165
- package/authoring/doctypes/namespace/type.ts +0 -71
- package/authoring/identity/identity.doc.d.mts +0 -9
- package/authoring/identity/identity.doc.mjs +0 -61
- package/authoring/identity/type.ts +0 -132
- package/foundation/discovery/authoring-self-docs.d.mts +0 -69
- package/foundation/discovery/authoring-self-docs.mjs +0 -214
- package/foundation/discovery/authoring-self-docs.test.mjs +0 -154
- package/foundation/discovery/docs-output-budget.d.mts +0 -28
- package/foundation/discovery/docs-output-budget.mjs +0 -50
- package/foundation/discovery/docs-section-key.d.mts +0 -98
- package/foundation/discovery/docs-section-key.mjs +0 -221
- package/foundation/discovery/docs-section-key.test.mjs +0 -224
- package/foundation/doc-compiler/compile.d.mts +0 -162
- package/foundation/doc-compiler/compile.mjs +0 -262
- package/foundation/doc-compiler/doc-compiler.test.mjs +0 -687
- package/foundation/doc-compiler/ir.d.mts +0 -9
- package/foundation/doc-compiler/ir.mjs +0 -287
- package/foundation/doc-compiler/lenses.d.mts +0 -33
- package/foundation/doc-compiler/lenses.mjs +0 -127
- package/foundation/identity/provider-identity.d.mts +0 -90
- package/foundation/identity/provider-identity.mjs +0 -320
- package/foundation/identity/provider-identity.test.mjs +0 -254
- package/foundation/identity/providers.d.mts +0 -7
- package/foundation/identity/providers.mjs +0 -16
- package/foundation/integrations/provider-conflicts.test.mjs +0 -125
package/README.md
CHANGED
|
@@ -403,8 +403,7 @@ Every response has a `type` discriminant. The full set is below (generated from
|
|
|
403
403
|
| `component.detail.blocks` | One component's example blocks, as {component, showcase, examples, related} of BlockEntry. |
|
|
404
404
|
| `docs.list` | All reference-doc topics as DocsListEntry[] ({topic, description}), in discovery order. |
|
|
405
405
|
| `docs.detail` | One topic's full ReferenceDoc, with token-ref blocks inlined. |
|
|
406
|
-
| `docs.
|
|
407
|
-
| `docs.detail.section` | One ReferenceSection of a topic, found by key or title, with token-ref blocks inlined. |
|
|
406
|
+
| `docs.detail.section` | A single ReferenceSection of a topic: the first whose title contains the section query. |
|
|
408
407
|
| `blog.list` | The feed URL plus every post parsed from the RSS feed, each with slug, title, description, date, type, authors, link, and plaintext URL. |
|
|
409
408
|
| `blog.detail` | One post's metadata plus the feed URL and the post's full plaintext body. |
|
|
410
409
|
| `discover.list` | The configured external packages (name, category, components, version, description); when empty it carries meta.configured to tell "nothing configured" from "nothing discovered". |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* xds --json build (no query) — the "how to build a page" playbook signal.
|
|
6
6
|
*/
|
|
7
7
|
export type BuildHelpResponse = {
|
|
8
8
|
type: "build.help";
|
|
@@ -11,7 +11,7 @@ export type BuildHelpResponse = {
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* xds --json build "<idea>" — the composition kit for what you're building.
|
|
15
15
|
*
|
|
16
16
|
* Entries are raw `SearchResultEntry` objects (no package-manager-prefixed
|
|
17
17
|
* command strings — the CLI adds those); `frame`/`foundation` are static
|
package/api/build/build.type.mjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* xds --json build (no query) — the "how to build a page" playbook signal.
|
|
11
11
|
*
|
|
12
12
|
* @typedef {object} BuildHelpResponse
|
|
13
13
|
* @property {'build.help'} type
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* xds --json build "<idea>" — the composition kit for what you're building.
|
|
20
20
|
*
|
|
21
21
|
* Entries are raw `SearchResultEntry` objects (no package-manager-prefixed
|
|
22
22
|
* command strings — the CLI adds those); `frame`/`foundation` are static
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* xds --json component [--list] [--category X] [--detail names|compact|full]
|
|
6
6
|
*
|
|
7
7
|
* The list view emits ONE `component.list` type across all three detail levels;
|
|
8
8
|
* the depth is carried in `data.detail` and `data.components` holds the grouped
|
|
@@ -55,7 +55,7 @@ export type ComponentBriefEntry = {
|
|
|
55
55
|
import: string;
|
|
56
56
|
};
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
58
|
+
* xds --json component <name>
|
|
59
59
|
*/
|
|
60
60
|
export type ComponentDetailResponse = {
|
|
61
61
|
type: "component.detail";
|
|
@@ -81,14 +81,14 @@ export type ComponentOwnership = {
|
|
|
81
81
|
sourceAvailable: boolean;
|
|
82
82
|
};
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* xds --json component <name> --props
|
|
85
85
|
*/
|
|
86
86
|
export type ComponentDetailPropsResponse = {
|
|
87
87
|
type: "component.detail.props";
|
|
88
88
|
data: import("@astryxdesign/cli/authoring").ComponentPropDoc[];
|
|
89
89
|
};
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* xds --json component <name> --source
|
|
92
92
|
*/
|
|
93
93
|
export type ComponentDetailSourceResponse = {
|
|
94
94
|
type: "component.detail.source";
|
|
@@ -98,7 +98,7 @@ export type ComponentDetailSourceResponse = {
|
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* xds --json component <name> --showcase
|
|
102
102
|
*/
|
|
103
103
|
export type ComponentDetailShowcaseResponse = {
|
|
104
104
|
type: "component.detail.showcase";
|
|
@@ -109,7 +109,7 @@ export type ComponentDetailShowcaseResponse = {
|
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
/**
|
|
112
|
-
*
|
|
112
|
+
* xds --json component <name> --blocks
|
|
113
113
|
*/
|
|
114
114
|
export type ComponentDetailBlocksResponse = {
|
|
115
115
|
type: "component.detail.blocks";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file Colocated types for the `component` command — source of truth for the
|
|
5
5
|
* component command's JSON responses. These typedefs describe the `{type, data}`
|
|
6
|
-
* envelopes emitted by `
|
|
6
|
+
* envelopes emitted by `xds --json component` and returned by the `component()`
|
|
7
7
|
* API; the `types/component.d.ts` barrel re-exports them for consumers.
|
|
8
8
|
*
|
|
9
9
|
* Detail-level contract for list views (brief < compact < full):
|
|
@@ -11,23 +11,23 @@
|
|
|
11
11
|
* --detail compact Names + 1-line description + import path.
|
|
12
12
|
* --detail full Full ComponentDoc per entry (props, theming, examples, etc.).
|
|
13
13
|
*
|
|
14
|
-
* Invocation
|
|
14
|
+
* Invocation -> type discriminator
|
|
15
15
|
* ------------------------------------------------------------------
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* (not found)
|
|
16
|
+
* xds --json component -> component.list (data.detail='names')
|
|
17
|
+
* xds --json component --list -> component.list (data.detail='names')
|
|
18
|
+
* xds --json component --category Form -> component.list (filtered)
|
|
19
|
+
* xds --json component --list --detail compact -> component.list (data.detail='compact')
|
|
20
|
+
* xds --json component --list --detail full -> component.list (data.detail='full')
|
|
21
|
+
* xds --json component Button -> component.detail
|
|
22
|
+
* xds --json component Button --props -> component.detail.props
|
|
23
|
+
* xds --json component Button --source -> component.detail.source
|
|
24
|
+
* xds --json component Button --showcase -> component.detail.showcase
|
|
25
|
+
* xds --json component Button --blocks -> component.detail.blocks
|
|
26
|
+
* (not found) -> CLIError
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* xds --json component [--list] [--category X] [--detail names|compact|full]
|
|
31
31
|
*
|
|
32
32
|
* The list view emits ONE `component.list` type across all three detail levels;
|
|
33
33
|
* the depth is carried in `data.detail` and `data.components` holds the grouped
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* xds --json component <name>
|
|
74
74
|
* @typedef {object} ComponentDetailResponse
|
|
75
75
|
* @property {'component.detail'} type
|
|
76
76
|
* @property {import('@astryxdesign/cli/authoring').ComponentDoc & ComponentOwnership} data
|
|
@@ -87,28 +87,28 @@
|
|
|
87
87
|
*/
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* xds --json component <name> --props
|
|
91
91
|
* @typedef {object} ComponentDetailPropsResponse
|
|
92
92
|
* @property {'component.detail.props'} type
|
|
93
93
|
* @property {import('@astryxdesign/cli/authoring').ComponentPropDoc[]} data
|
|
94
94
|
*/
|
|
95
95
|
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* xds --json component <name> --source
|
|
98
98
|
* @typedef {object} ComponentDetailSourceResponse
|
|
99
99
|
* @property {'component.detail.source'} type
|
|
100
100
|
* @property {{component: string; source: string}} data
|
|
101
101
|
*/
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* xds --json component <name> --showcase
|
|
105
105
|
* @typedef {object} ComponentDetailShowcaseResponse
|
|
106
106
|
* @property {'component.detail.showcase'} type
|
|
107
107
|
* @property {{component: string; aspectRatio: number; source: string}} data
|
|
108
108
|
*/
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
111
|
+
* xds --json component <name> --blocks
|
|
112
112
|
* @typedef {object} ComponentDetailBlocksResponse
|
|
113
113
|
* @property {'component.detail.blocks'} type
|
|
114
114
|
* @property {{component: string; showcase: BlockEntry | null; examples: BlockEntry[]; related: BlockEntry[]}} data
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* xds --json discover
|
|
6
6
|
*/
|
|
7
7
|
export type DiscoverListResponse = {
|
|
8
8
|
type: "discover.list";
|
|
@@ -25,21 +25,21 @@ export type DiscoverListEntry = {
|
|
|
25
25
|
displayName?: string | undefined;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* xds --json discover
|
|
29
29
|
*/
|
|
30
30
|
export type DiscoverDetailResponse = {
|
|
31
31
|
type: "discover.detail";
|
|
32
32
|
data: DiscoverListEntry;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* xds --json discover
|
|
36
36
|
*/
|
|
37
37
|
export type DiscoverDetailDocResponse = {
|
|
38
38
|
type: "discover.detail.doc";
|
|
39
39
|
data: import("@astryxdesign/cli/authoring").ComponentDoc;
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* xds --json discover <searchterm> (multiple matches)
|
|
43
43
|
*/
|
|
44
44
|
export type DiscoverSearchResponse = {
|
|
45
45
|
type: "discover.search";
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
*
|
|
7
7
|
* Invocation -> type discriminator
|
|
8
8
|
* ------------------------------------------------------------------
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* (not found)
|
|
9
|
+
* xds --json discover -> discover.list
|
|
10
|
+
* xds --json discover @scope/name -> discover.detail
|
|
11
|
+
* xds --json discover @scope/name/Component -> discover.detail.doc
|
|
12
|
+
* xds --json discover <searchterm> (1 match) -> discover.detail.doc
|
|
13
|
+
* xds --json discover <searchterm> (N matches) -> discover.search
|
|
14
|
+
* (not found) -> CLIError
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* xds --json discover
|
|
19
19
|
* @typedef {object} DiscoverListResponse
|
|
20
20
|
* @property {'discover.list'} type
|
|
21
21
|
* @property {DiscoverListEntry[]} data
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* xds --json discover @scope/name
|
|
39
39
|
* @typedef {object} DiscoverDetailResponse
|
|
40
40
|
* @property {'discover.detail'} type
|
|
41
41
|
* @property {DiscoverListEntry} data
|
|
42
42
|
*/
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* xds --json discover @scope/name/Component
|
|
46
46
|
* @typedef {object} DiscoverDetailDocResponse
|
|
47
47
|
* @property {'discover.detail.doc'} type
|
|
48
48
|
* @property {import('@astryxdesign/cli/authoring').ComponentDoc} data
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* xds --json discover <searchterm> (multiple matches)
|
|
53
53
|
* @typedef {object} DiscoverSearchResponse
|
|
54
54
|
* @property {'discover.search'} type
|
|
55
55
|
* @property {{query: string, matches: DiscoverSearchEntry[]}} data
|
package/api/docs/_adapter.d.mts
CHANGED
|
@@ -16,43 +16,34 @@
|
|
|
16
16
|
*/
|
|
17
17
|
export function loadDocsCatalog(cwd?: string): Promise<DocsCatalog>;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @param {
|
|
21
|
-
* @returns {
|
|
22
|
-
*/
|
|
23
|
-
export function overlayLanguages(entry: import("../../foundation/discovery/docs-discovery.mjs").DocsTopicEntry): string[];
|
|
24
|
-
/**
|
|
25
|
-
* One topic, lowered for `lang`: overlaid, extensions merged, keys stamped.
|
|
26
|
-
* Memoized per catalog, so a read that references a topic twice loads it once.
|
|
27
|
-
* Every read of the catalog shares the memoized node, so it is frozen; the
|
|
28
|
-
* lenses hand readers copies.
|
|
29
|
-
* @param {DocsCatalog} catalog
|
|
30
|
-
* @param {import('../../foundation/discovery/docs-discovery.mjs').DocsTopicEntry} entry
|
|
31
|
-
* @param {string | null} [lang]
|
|
32
|
-
* @returns {Promise<import('../../foundation/doc-compiler/compile.mjs').CompiledReferenceNode>}
|
|
19
|
+
* @param {string} docPath
|
|
20
|
+
* @param {{lang?: string|null}} [opts]
|
|
21
|
+
* @returns {Promise<import('./docs.type.mjs').DocsDetailResponse['data']>}
|
|
33
22
|
*/
|
|
34
|
-
export function
|
|
23
|
+
export function loadReferenceDocs(docPath: string, { lang }?: {
|
|
24
|
+
lang?: string | null;
|
|
25
|
+
}): Promise<import("./docs.type.mjs").DocsDetailResponse["data"]>;
|
|
35
26
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
* One topic, compiled for `lang`: lowered, then every token reference linked.
|
|
45
|
-
* @param {DocsCatalog} catalog
|
|
27
|
+
* Load one catalog entry: its own doc, plus any extension an integration
|
|
28
|
+
* merged onto it, in configuration order.
|
|
29
|
+
*
|
|
30
|
+
* A localization overlay applies to each file before the extensions are
|
|
31
|
+
* merged, so an extension written in the base language stays readable under
|
|
32
|
+
* `--dense`/`--zh` (it replaces its own sections and leaves the rest
|
|
33
|
+
* translated) rather than being dropped.
|
|
34
|
+
*
|
|
46
35
|
* @param {import('../../foundation/discovery/docs-discovery.mjs').DocsTopicEntry} entry
|
|
47
|
-
* @param {string
|
|
48
|
-
* @returns {Promise<import('
|
|
36
|
+
* @param {{lang?: string|null}} [opts]
|
|
37
|
+
* @returns {Promise<import('./docs.type.mjs').DocsDetailResponse['data']>}
|
|
49
38
|
*/
|
|
50
|
-
export function
|
|
39
|
+
export function loadTopicDoc(entry: import("../../foundation/discovery/docs-discovery.mjs").DocsTopicEntry, { lang }?: {
|
|
40
|
+
lang?: string | null;
|
|
41
|
+
}): Promise<import("./docs.type.mjs").DocsDetailResponse["data"]>;
|
|
51
42
|
/**
|
|
52
43
|
* Resolve `topic` against the project's catalog (throwing `ERR_UNKNOWN_TOPIC`
|
|
53
|
-
* when unmatched) and
|
|
54
|
-
* integration extension applied. Shared by the leaves so
|
|
55
|
-
* and unknown-topic handling live in exactly one place.
|
|
44
|
+
* when unmatched), and load it with any --dense/--zh overlay and any
|
|
45
|
+
* integration extension applied. Shared by the detail and section leaves so
|
|
46
|
+
* topic normalization and unknown-topic handling live in exactly one place.
|
|
56
47
|
*
|
|
57
48
|
* @param {string} topic
|
|
58
49
|
* @param {object} [options]
|
|
@@ -62,8 +53,7 @@ export function compileTopic(catalog: DocsCatalog, entry: import("../../foundati
|
|
|
62
53
|
* @param {string} [options.cwd]
|
|
63
54
|
* @returns {Promise<{
|
|
64
55
|
* catalog: DocsCatalog,
|
|
65
|
-
*
|
|
66
|
-
* lang: string | null,
|
|
56
|
+
* docsData: import('./docs.type.mjs').DocsDetailResponse['data'],
|
|
67
57
|
* }>}
|
|
68
58
|
*/
|
|
69
59
|
export function resolveTopicDocs(topic: string, options?: {
|
|
@@ -73,9 +63,6 @@ export function resolveTopicDocs(topic: string, options?: {
|
|
|
73
63
|
cwd?: string | undefined;
|
|
74
64
|
}): Promise<{
|
|
75
65
|
catalog: DocsCatalog;
|
|
76
|
-
|
|
77
|
-
lang: string | null;
|
|
66
|
+
docsData: import("./docs.type.mjs").DocsDetailResponse["data"];
|
|
78
67
|
}>;
|
|
79
|
-
/** The localized overlays a docs read can apply. */
|
|
80
|
-
export const OVERLAY_LANGUAGES: string[];
|
|
81
68
|
import { DocsCatalog } from '../../foundation/discovery/docs-discovery.mjs';
|