@astryxdesign/cli 0.6.3-canary.f839b67 → 0.6.4-canary.06c8fa3
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 +194 -0
- package/README.md +64 -66
- package/api/component/_adapter.d.mts +25 -0
- package/api/component/_adapter.mjs +59 -5
- package/api/component/component.d.mts +6 -3
- package/api/component/component.doc.mjs +23 -10
- package/api/component/component.mjs +249 -9
- package/api/component/component.type.d.mts +25 -0
- package/api/component/component.type.mjs +44 -0
- 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 +61 -18
- package/api/discover/discover.mjs +220 -36
- package/api/discover/discover.test.mjs +11 -2
- package/api/discover/discover.type.d.mts +147 -8
- package/api/discover/discover.type.mjs +102 -12
- 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 +49 -7
- package/api/docs/_adapter.mjs +284 -33
- package/api/docs/docs.doc.mjs +4 -3
- package/api/docs/docs.test.mjs +2 -0
- package/api/docs/docs.type.d.mts +21 -5
- package/api/docs/docs.type.mjs +21 -5
- package/api/docs/integration-tree.test.mjs +9 -1
- package/api/docs/reference-blocks.test.mjs +406 -0
- package/api/doctor/doctor.d.mts +8 -3
- package/api/doctor/doctor.mjs +95 -10
- package/api/doctor/doctor.test.mjs +122 -10
- package/api/index.d.mts +1 -2
- package/api/index.mjs +4 -4
- package/api/integration/add-helpers.d.mts +5 -2
- package/api/integration/add-helpers.mjs +36 -9
- package/api/integration/authoring-checks.mjs +14 -1
- package/api/integration/pack-check.lifecycle-output.test.mjs +105 -0
- package/api/integration/pack-check.mjs +28 -3
- package/api/json/index.ts +0 -1
- package/api/search/search.test.mjs +18 -0
- package/api/template/table-floating-bulk-actions.test.mjs +66 -0
- package/api/template/template-integration.test.mjs +1 -65
- package/api/template/template.mjs +1 -1
- package/api/theme/add/add.mjs +17 -25
- package/api/theme/add/add.rollback.test.mjs +158 -0
- package/api/theme/add/add.staging.test.mjs +40 -23
- package/api/theme/build/build.family.test.mjs +7 -12
- package/api/theme/build/build.mjs +8 -18
- package/api/theme/build/build.rollback.test.mjs +148 -0
- package/api/upgrade/run/files-changed.test.mjs +111 -0
- package/api/upgrade/run/run.mjs +6 -4
- package/api/upgrade/upgrade.type.mjs +2 -2
- package/assets/codemods/__tests__/registry.test.mjs +1 -0
- package/assets/codemods/__tests__/runner.test.mjs +3 -1
- package/assets/codemods/file-count.test.mjs +163 -0
- package/assets/codemods/integration-runner.mjs +3 -3
- package/assets/codemods/registry.mjs +1 -0
- package/assets/codemods/runner.mjs +5 -4
- package/assets/codemods/transforms/next/index.mjs +1 -19
- package/assets/codemods/transforms/v0.6.4/index.mjs +31 -0
- package/assets/docs/internationalization.doc.mjs +7 -5
- package/assets/docs/styling-libraries.doc.mjs +1 -1
- package/assets/docs/theme.doc.mjs +1 -1
- package/assets/docs/tree/component-lookups.doc.mjs +149 -0
- package/assets/docs/tree/integrations.doc.mjs +20 -1
- 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/InternationalizationProvider/InternationalizationProvider01ShippedLocale.tsx +1 -1
- 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/authoring/config/config.doc.mjs +9 -1
- package/authoring/config/parse.d.mts +2 -0
- package/authoring/config/parse.mjs +19 -0
- package/authoring/config/parse.test.mjs +8 -0
- package/authoring/config/type.ts +13 -2
- 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 +72 -0
- package/authoring/doctypes/_schema.mjs +25 -1
- package/authoring/doctypes/command/command.doc.mjs +1 -1
- package/authoring/doctypes/command/type.ts +1 -1
- package/authoring/doctypes/load-contract.test.mjs +25 -0
- package/authoring/doctypes/reference/reference.doc.mjs +31 -4
- package/authoring/doctypes/reference/type.ts +20 -5
- package/authoring/index.d.mts +1 -0
- package/authoring/index.d.ts +10 -0
- package/authoring/index.mjs +1 -0
- package/clients/cli/command-result-coverage.test.mjs +7 -7
- package/clients/cli/commands/component/index.mjs +152 -55
- package/clients/cli/commands/component-batch.test.mjs +341 -0
- package/clients/cli/commands/component-ownership.test.mjs +89 -0
- package/clients/cli/commands/component.doc.mjs +23 -6
- package/clients/cli/commands/debug-result-summary.test.mjs +2 -2
- package/clients/cli/commands/discover.doc.mjs +53 -9
- package/clients/cli/commands/discover.mjs +393 -118
- package/clients/cli/commands/discover.sources.test.mjs +267 -0
- package/clients/cli/commands/docs.mjs +2 -2
- package/clients/cli/commands/docs.test.mjs +29 -0
- package/clients/cli/commands/doctor-integration-docs.doc.mjs +1 -1
- package/clients/cli/commands/text-json-parity.test.mjs +0 -17
- package/clients/cli/index.mjs +0 -4
- package/clients/cli/lib/exit-codes.test.mjs +1 -8
- package/clients/cli/lib/json-shim.mjs +24 -14
- package/clients/cli/lib/json-shim.test.mjs +6 -20
- package/clients/cli/lib/manifest.mjs +3 -8
- package/clients/cli/lib/manifest.test.mjs +5 -2
- package/clients/cli/lib/parse-error-format.test.mjs +81 -0
- package/foundation/discovery/authoring-self-docs.d.mts +12 -0
- package/foundation/discovery/authoring-self-docs.mjs +21 -8
- package/foundation/discovery/authoring-self-docs.test.mjs +7 -2
- package/foundation/discovery/docs-discovery.d.mts +4 -1
- package/foundation/discovery/docs-discovery.mjs +40 -6
- package/foundation/discovery/docs-discovery.test.mjs +40 -0
- package/foundation/discovery/template-adapter.mjs +1 -1
- package/foundation/doc-compiler/doc-loads.test.mjs +0 -12
- package/foundation/doc-compiler/lenses.d.mts +5 -3
- package/foundation/doc-compiler/lenses.mjs +48 -3
- package/foundation/doc-compiler/links.d.mts +30 -3
- package/foundation/doc-compiler/links.mjs +46 -5
- package/foundation/doc-compiler/links.test.mjs +53 -0
- package/foundation/doc-compiler/tree.test.mjs +9 -1
- package/foundation/integrations/cli-requirement.test.mjs +17 -42
- package/foundation/integrations/integrations.d.mts +14 -1
- package/foundation/integrations/integrations.mjs +41 -1
- package/foundation/integrations/integrations.test.mjs +31 -0
- package/foundation/response/batch.type.d.mts +33 -0
- package/foundation/response/batch.type.mjs +34 -0
- package/foundation/response/response-types.doc.mjs +15 -21
- package/foundation/response/response-types.doc.test.mjs +23 -0
- package/foundation/xle/browser.d.mts +3 -3
- package/foundation/xle/browser.mjs +3 -3
- package/foundation/xle/expand.mjs +2 -2
- package/foundation/xle/parse.mjs +1 -1
- package/foundation/xle/print.mjs +2 -2
- package/foundation/xle/splice.mjs +1 -1
- package/package.json +9 -9
- package/api/layout/_adapter.d.mts +0 -34
- package/api/layout/_adapter.mjs +0 -148
- package/api/layout/check/check.d.mts +0 -16
- package/api/layout/check/check.mjs +0 -40
- package/api/layout/expand/expand.d.mts +0 -22
- package/api/layout/expand/expand.mjs +0 -155
- package/api/layout/expand/expand.path-safety.test.mjs +0 -53
- package/api/layout/grammar/grammar.d.mts +0 -13
- package/api/layout/grammar/grammar.mjs +0 -87
- package/api/layout/layout.d.mts +0 -6
- package/api/layout/layout.mjs +0 -17
- package/api/layout/layout.test.mjs +0 -297
- package/api/layout/layout.type.d.mts +0 -89
- package/api/layout/layout.type.mjs +0 -103
- package/api/layout/layoutCheck.doc.d.mts +0 -11
- package/api/layout/layoutCheck.doc.mjs +0 -85
- package/api/layout/layoutExpand.doc.d.mts +0 -11
- package/api/layout/layoutExpand.doc.mjs +0 -107
- package/api/layout/layoutGrammar.doc.d.mts +0 -11
- package/api/layout/layoutGrammar.doc.mjs +0 -57
- package/clients/cli/commands/layout-check.doc.mjs +0 -65
- package/clients/cli/commands/layout-expand.doc.mjs +0 -83
- package/clients/cli/commands/layout-grammar.doc.mjs +0 -30
- package/clients/cli/commands/layout.doc.mjs +0 -34
- package/clients/cli/commands/layout.error-codes.test.mjs +0 -66
- package/clients/cli/commands/layout.exit-parity.test.mjs +0 -41
- package/clients/cli/commands/layout.mjs +0 -275
- package/clients/cli/commands/layout.path-help.test.mjs +0 -33
- package/clients/cli/commands/layout.stdin-cap.test.mjs +0 -47
- package/clients/cli/commands/layout.text-fields.test.mjs +0 -39
- /package/assets/codemods/transforms/{next → v0.6.4}/__tests__/migrate-native-picker-to-presentation.test.mjs +0 -0
- /package/assets/codemods/transforms/{next → v0.6.4}/__tests__/migrate-theme-catalog-to-descriptors.test.mjs +0 -0
- /package/assets/codemods/transforms/{next → v0.6.4}/migrate-native-picker-to-presentation.mjs +0 -0
- /package/assets/codemods/transforms/{next → v0.6.4}/migrate-theme-catalog-to-descriptors.mjs +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file `astryx docs cli/component-lookups`: exact single and batch component
|
|
5
|
+
* lookup through the CLI and programmatic API.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
|
|
9
|
+
export const docs = {
|
|
10
|
+
type: 'generic',
|
|
11
|
+
name: 'component-lookups',
|
|
12
|
+
placement: {parent: 'namespace:cli', slot: 'guides', order: 5},
|
|
13
|
+
title: 'Looking up components',
|
|
14
|
+
category: 'guide',
|
|
15
|
+
description:
|
|
16
|
+
'Look up one or several exact component identities, choose a focused projection, and handle complete batch receipts.',
|
|
17
|
+
sections: [
|
|
18
|
+
{
|
|
19
|
+
id: 'several',
|
|
20
|
+
title: 'Look up several components',
|
|
21
|
+
category: 'guide',
|
|
22
|
+
content: [
|
|
23
|
+
{
|
|
24
|
+
type: 'prose',
|
|
25
|
+
text: '`astryx component` accepts exact selectors as a variadic positional argument. With no selector it browses the catalog. With one selector it keeps the normal single-component response. With two or more it prints one complete ordered batch receipt.',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: 'code',
|
|
29
|
+
lang: 'bash',
|
|
30
|
+
label: 'Several component docs',
|
|
31
|
+
code: 'astryx component Button Badge Text\nastryx --json component Button Badge Text',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'prose',
|
|
35
|
+
text: 'Every selector gets one row in input order. Duplicate selectors stay duplicate rows. A missing or ambiguous component does not hide successful neighbors or stop later selectors from resolving.',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: 'prose',
|
|
39
|
+
text: 'A batch accepts at most 100 selectors, including duplicates, in every projection mode. A larger request returns a top-level `ERR_INVALID_ARGUMENT` before any component resolves. It emits no `component.batch` receipt and no partial results.',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: 'prose',
|
|
43
|
+
text: 'Focused component controls apply to every found row. Use the same control you use for one component:',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'code',
|
|
47
|
+
lang: 'bash',
|
|
48
|
+
label: 'Focused batch lookups',
|
|
49
|
+
code: 'astryx --json component Button Card --props\nastryx component Button Card --source\nastryx component Button Card --showcase\nastryx component Button Card --blocks\nastryx component Button Card --detail compact\nastryx component Button Card --lang dense\nastryx component Button Card --package @astryxdesign/core',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: 'selectors',
|
|
55
|
+
title: 'Selector forms',
|
|
56
|
+
category: 'reference',
|
|
57
|
+
content: [
|
|
58
|
+
{
|
|
59
|
+
type: 'prose',
|
|
60
|
+
text: 'A selector is an exact component identity, not free-text search. Use one of these forms:',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
type: 'list',
|
|
64
|
+
style: 'unordered',
|
|
65
|
+
items: [
|
|
66
|
+
'`Button` for an unqualified component name.',
|
|
67
|
+
'`widgets/Button` for a component in an unscoped package.',
|
|
68
|
+
'`@acme/widgets/Button` for a component in a scoped package.',
|
|
69
|
+
'`@acme/widgets@1.2.3/Button` to require that exact installed package version.',
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: 'prose',
|
|
74
|
+
text: 'A version qualifies the package, never the component. The lookup does not fall through to another installed version. An unqualified name owned by several installed packages is `ambiguous` and lists every candidate. Use a package-qualified selector or `--package` to choose one.',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'prose',
|
|
78
|
+
text: '`astryx discover` remains free-text package discovery. Its words form one query; they are not component batch selectors.',
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'output',
|
|
84
|
+
title: 'Batch output and exit status',
|
|
85
|
+
category: 'reference',
|
|
86
|
+
content: [
|
|
87
|
+
{
|
|
88
|
+
type: 'prose',
|
|
89
|
+
text: 'JSON uses `component.batch` with `{count, results}`. Each row echoes `selector` and has one status: `found`, `not_found`, `ambiguous`, or `error`. A found row carries the normal single-component `{type, data}` under `result`. Failed rows carry `code` and `error`, plus `suggestions` or `candidates` when available.',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'code',
|
|
93
|
+
lang: 'bash',
|
|
94
|
+
label: 'Outcome and duplicate examples',
|
|
95
|
+
code: 'astryx --json component Button Badge # all found, exit 0\nastryx --json component Button MissingWidget # mixed, exit 1\nastryx --json component MissingWidget MissingPanel # all failed, exit 1\nastryx --json component Button Button # two ordered rows, exit 0',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
type: 'code',
|
|
99
|
+
lang: 'bash',
|
|
100
|
+
label: 'A complete failed JSON receipt',
|
|
101
|
+
code: 'astryx --json component MissingWidget MissingPanel',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: 'code',
|
|
105
|
+
lang: 'json',
|
|
106
|
+
code: '{\n "apiVersion": 1,\n "type": "component.batch",\n "data": {\n "count": 2,\n "results": [\n {\n "selector": "MissingWidget",\n "status": "not_found",\n "code": "ERR_UNKNOWN_COMPONENT",\n "error": "No component named \\"MissingWidget\\""\n },\n {\n "selector": "MissingPanel",\n "status": "not_found",\n "code": "ERR_UNKNOWN_COMPONENT",\n "error": "No component named \\"MissingPanel\\""\n }\n ]\n }\n}',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
type: 'code',
|
|
110
|
+
lang: 'text',
|
|
111
|
+
label: 'The same receipt in text mode',
|
|
112
|
+
code: 'Component batch\n\ncount: 2\n\nResults\n\nMissingWidget\n\nselector: MissingWidget\nstatus: not_found\ncode: ERR_UNKNOWN_COMPONENT\nerror: No component named "MissingWidget"\n\nMissingPanel\n\nselector: MissingPanel\nstatus: not_found\ncode: ERR_UNKNOWN_COMPONENT\nerror: No component named "MissingPanel"',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: 'prose',
|
|
116
|
+
text: 'The CLI emits every row first, then exits 1 when any row is not `found`. This includes mixed receipts and receipts where every row failed. JSON and text use the same exit status. A batch where every row is `found` exits 0.',
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: 'api',
|
|
122
|
+
title: 'Programmatic API',
|
|
123
|
+
category: 'reference',
|
|
124
|
+
content: [
|
|
125
|
+
{
|
|
126
|
+
type: 'prose',
|
|
127
|
+
text: 'The argument shape chooses the response shape. Omit the argument for the catalog, pass a string for the existing single-component response, and pass an array for `component.batch`. An array always means batch, including empty and one-item arrays, so filtering a selector list cannot silently change the response type. The published `ComponentBatchResponse` specializes the shared `BatchResponse` and `BatchRow` types.',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
type: 'code',
|
|
131
|
+
lang: 'javascript',
|
|
132
|
+
code: "import {component} from '@astryxdesign/cli/api';\n\nconst catalog = await component(); // component.list\nconst button = await component('Button'); // component.detail\nconst empty = await component([]); // component.batch, count 0\nconst oneRow = await component(['Button']); // component.batch, count 1\nconst batch = await component(['Button', 'Badge']); // component.batch, count 2\nawait component(Array(101).fill('Button')); // ERR_INVALID_ARGUMENT before lookup",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
type: 'code',
|
|
136
|
+
lang: 'json',
|
|
137
|
+
label: 'Exact empty-array response',
|
|
138
|
+
code: '{\n "type": "component.batch",\n "data": {\n "count": 0,\n "results": []\n }\n}',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
type: 'code',
|
|
142
|
+
lang: 'javascript',
|
|
143
|
+
label: 'Handle every row without losing partial results',
|
|
144
|
+
code: "const receipt = await component(['Button', 'MissingWidget']);\n\nfor (const row of receipt.data.results) {\n if (row.status === 'found') {\n useComponentDoc(row.selector, row.result);\n } else if (row.status === 'ambiguous') {\n choosePackage(row.selector, row.candidates);\n } else {\n reportLookupFailure(row.selector, row.code, row.error);\n }\n}",
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
};
|
|
@@ -440,6 +440,25 @@ export const docs = {
|
|
|
440
440
|
},
|
|
441
441
|
],
|
|
442
442
|
},
|
|
443
|
+
{
|
|
444
|
+
title: 'Discover source',
|
|
445
|
+
category: 'guide',
|
|
446
|
+
content: [
|
|
447
|
+
{
|
|
448
|
+
type: 'prose',
|
|
449
|
+
text: '`astryx discover` lists the integrations an app has and, through discover sources, the ones it could add, with every version and what each one adds. An integration can supply a source by exporting an async function named `discover` from its integration module. Like `debug`, it is a named export, not a manifest field, so a CLI that predates it simply does not read it.',
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
type: 'code',
|
|
453
|
+
lang: 'typescript',
|
|
454
|
+
code: "// astryx.integration.ts\nimport type {DiscoverSource} from '@astryxdesign/cli/authoring';\n\nexport const discover: DiscoverSource = async ({signal, package: name, version}) => {\n // Every package you know about, each with every version and what the\n // requested (else latest) version adds.\n return readCatalog({signal, name, version});\n};\n\nexport default {\n components: './components',\n};",
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
type: 'prose',
|
|
458
|
+
text: 'A project can set the same function as `discover` in `astryx.config`. Discover calls every source, the project one first and then each integration in load order, and one that throws, runs past 30 seconds, or returns an invalid catalog never hides the others. It keeps the last good answer from each source in the per-user cache and uses it, with its date, when the source cannot be reached. Discover only reads: it prints the command that adds a package and never runs it. `astryx docs authoring discover-source` has the catalog shape.',
|
|
459
|
+
},
|
|
460
|
+
],
|
|
461
|
+
},
|
|
443
462
|
{
|
|
444
463
|
title: 'How It Works',
|
|
445
464
|
category: 'guide',
|
|
@@ -450,7 +469,7 @@ export const docs = {
|
|
|
450
469
|
},
|
|
451
470
|
{
|
|
452
471
|
type: 'prose',
|
|
453
|
-
text: 'Runtime integration features — `debug` and `
|
|
472
|
+
text: 'Runtime integration features — `debug`, `gapReport`, and `discover` — use named exports from the integration module rather than fields in the default manifest. The CLI discovers them alongside the manifest but loads them through the composition rules in `spec:AST-031`: every configured handler runs additively, each in isolation with its own copy of the event.',
|
|
454
473
|
},
|
|
455
474
|
{
|
|
456
475
|
type: 'prose',
|
package/assets/templates/blocks/components/CheckboxList/CheckboxListSelectAllPattern.doc.mjs
CHANGED
|
@@ -10,5 +10,5 @@ export const doc = {
|
|
|
10
10
|
'A "select all" toggle at the top of a checkbox list that switches to an indeterminate dash when only some items are checked, useful for bulk actions like exporting documents or assigning permissions where users often want everything at once.',
|
|
11
11
|
isReady: true,
|
|
12
12
|
aspectRatio: 16 / 9,
|
|
13
|
-
componentsUsed: ['CheckboxList'
|
|
13
|
+
componentsUsed: ['CheckboxList'],
|
|
14
14
|
};
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
6
|
import {CheckboxList, CheckboxListItem} from '@astryxdesign/core/CheckboxList';
|
|
7
|
-
import {Divider} from '@astryxdesign/core/Divider';
|
|
8
7
|
|
|
9
8
|
const DOCUMENTS = [
|
|
10
9
|
{id: 'transactions', label: 'Transaction history'},
|
|
@@ -27,7 +26,7 @@ export default function CheckboxListSelectAllPattern() {
|
|
|
27
26
|
: ('indeterminate' as const);
|
|
28
27
|
|
|
29
28
|
return (
|
|
30
|
-
<CheckboxList label="Include in export">
|
|
29
|
+
<CheckboxList label="Include in export" hasDividers>
|
|
31
30
|
<CheckboxListItem
|
|
32
31
|
label="Select all"
|
|
33
32
|
isChecked={selectAllState}
|
|
@@ -35,7 +34,6 @@ export default function CheckboxListSelectAllPattern() {
|
|
|
35
34
|
setSelected(checked ? [...ALL_IDS] : []);
|
|
36
35
|
}}
|
|
37
36
|
/>
|
|
38
|
-
<Divider />
|
|
39
37
|
{DOCUMENTS.map(doc => (
|
|
40
38
|
<CheckboxListItem
|
|
41
39
|
key={doc.id}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {useState} from 'react';
|
|
6
6
|
import {InternationalizationProvider} from '@astryxdesign/core/i18n';
|
|
7
|
-
import frFR from '@astryxdesign/core/locales/fr-FR.
|
|
7
|
+
import frFR from '@astryxdesign/core/locales/fr-FR.generated.js';
|
|
8
8
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
9
9
|
import {
|
|
10
10
|
SegmentedControl,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'useTableSelection',
|
|
7
|
+
name: 'Table: Bulk Actions',
|
|
8
|
+
displayName: 'Table: Bulk Actions',
|
|
9
|
+
description:
|
|
10
|
+
'Controlled row selection with the reusable TableSelectionToolbar rendered in flow above the table. Product actions occupy the logical start; synchronized selection count and complete clear action occupy the logical end.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 16 / 9,
|
|
13
|
+
componentsUsed: ['Table', 'TableSelectionToolbar', 'Button'],
|
|
14
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
import {Button} from '@astryxdesign/core/Button';
|
|
7
|
+
import {
|
|
8
|
+
Table,
|
|
9
|
+
TableSelectionToolbar,
|
|
10
|
+
useTableSelection,
|
|
11
|
+
useTableSelectionState,
|
|
12
|
+
proportional,
|
|
13
|
+
} from '@astryxdesign/core/Table';
|
|
14
|
+
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
15
|
+
|
|
16
|
+
interface User extends Record<string, unknown> {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
email: string;
|
|
20
|
+
role: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const users: User[] = [
|
|
24
|
+
{id: '1', name: 'Alice', email: 'alice@example.com', role: 'Engineer'},
|
|
25
|
+
{id: '2', name: 'Bob', email: 'bob@example.com', role: 'Designer'},
|
|
26
|
+
{id: '3', name: 'Charlie', email: 'charlie@example.com', role: 'Manager'},
|
|
27
|
+
{id: '4', name: 'Diana', email: 'diana@example.com', role: 'Engineer'},
|
|
28
|
+
{id: '5', name: 'Eve', email: 'eve@example.com', role: 'Admin'},
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const columns: TableColumn<User>[] = [
|
|
32
|
+
{key: 'name', header: 'Name', width: proportional(1)},
|
|
33
|
+
{key: 'email', header: 'Email', width: proportional(2)},
|
|
34
|
+
{key: 'role', header: 'Role', width: proportional(1)},
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
export default function TableBulkActionsTable() {
|
|
38
|
+
const [selectedKeys, setSelectedKeys] = useState<Set<string>>(new Set());
|
|
39
|
+
|
|
40
|
+
const {selectionConfig, selectionState} = useTableSelectionState<User>({
|
|
41
|
+
data: users,
|
|
42
|
+
idKey: 'id',
|
|
43
|
+
selectedKeys,
|
|
44
|
+
setSelectedKeys,
|
|
45
|
+
});
|
|
46
|
+
const selectionPlugin = useTableSelection<User>(selectionConfig);
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<div>
|
|
50
|
+
<TableSelectionToolbar
|
|
51
|
+
selection={selectionState}
|
|
52
|
+
startContent={
|
|
53
|
+
<>
|
|
54
|
+
<Button label="Export" variant="ghost" onClick={() => {}} />
|
|
55
|
+
<Button
|
|
56
|
+
label="Delete"
|
|
57
|
+
variant="ghost"
|
|
58
|
+
onClick={selectionState.clearSelection}
|
|
59
|
+
/>
|
|
60
|
+
</>
|
|
61
|
+
}
|
|
62
|
+
/>
|
|
63
|
+
<Table
|
|
64
|
+
data={users}
|
|
65
|
+
columns={columns}
|
|
66
|
+
idKey="id"
|
|
67
|
+
plugins={{selection: selectionPlugin}}
|
|
68
|
+
/>
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'useTableSelection',
|
|
7
|
+
name: 'Table: Floating Bulk Actions',
|
|
8
|
+
displayName: 'Table: Floating Bulk Actions',
|
|
9
|
+
description:
|
|
10
|
+
'The reusable TableSelectionToolbar inside a capped, self-contained scroll region for a long non-sticky table below metric cards. The caller-owned sticky placement keeps actions 16px from the example scrollport without moving the table when selection changes.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 16 / 9,
|
|
13
|
+
componentsUsed: [
|
|
14
|
+
'Table',
|
|
15
|
+
'TableSelectionToolbar',
|
|
16
|
+
'Button',
|
|
17
|
+
'ScrollableArea',
|
|
18
|
+
],
|
|
19
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
import * as stylex from '@stylexjs/stylex';
|
|
7
|
+
import {Button} from '@astryxdesign/core/Button';
|
|
8
|
+
import {ScrollableArea} from '@astryxdesign/core/ScrollableArea';
|
|
9
|
+
import {
|
|
10
|
+
Table,
|
|
11
|
+
TableSelectionToolbar,
|
|
12
|
+
useTableSelection,
|
|
13
|
+
useTableSelectionState,
|
|
14
|
+
proportional,
|
|
15
|
+
} from '@astryxdesign/core/Table';
|
|
16
|
+
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
17
|
+
import {
|
|
18
|
+
colorVars,
|
|
19
|
+
radiusVars,
|
|
20
|
+
shadowVars,
|
|
21
|
+
sizeVars,
|
|
22
|
+
spacingVars,
|
|
23
|
+
} from '@astryxdesign/core/theme/tokens.stylex';
|
|
24
|
+
|
|
25
|
+
interface User extends Record<string, unknown> {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
email: string;
|
|
29
|
+
role: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const baseUsers: Array<Pick<User, 'name' | 'email' | 'role'>> = [
|
|
33
|
+
{name: 'Alice', email: 'alice@example.com', role: 'Engineer'},
|
|
34
|
+
{name: 'Bob', email: 'bob@example.com', role: 'Designer'},
|
|
35
|
+
{name: 'Charlie', email: 'charlie@example.com', role: 'Manager'},
|
|
36
|
+
{name: 'Diana', email: 'diana@example.com', role: 'Engineer'},
|
|
37
|
+
{name: 'Eve', email: 'eve@example.com', role: 'Admin'},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const users: User[] = Array.from({length: 40}, (_, index) => {
|
|
41
|
+
const user = baseUsers[index % baseUsers.length];
|
|
42
|
+
return {...user, id: String(index + 1), name: `${user.name} ${index + 1}`};
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const columns: TableColumn<User>[] = [
|
|
46
|
+
{key: 'name', header: 'Name', width: proportional(1)},
|
|
47
|
+
{key: 'email', header: 'Email', width: proportional(1)},
|
|
48
|
+
{key: 'role', header: 'Role', width: proportional(1)},
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
const styles = stylex.create({
|
|
52
|
+
page: {
|
|
53
|
+
maxBlockSize: 640,
|
|
54
|
+
isolation: 'isolate',
|
|
55
|
+
scrollbarGutter: 'stable',
|
|
56
|
+
},
|
|
57
|
+
metrics: {
|
|
58
|
+
display: 'grid',
|
|
59
|
+
gridTemplateColumns: 'repeat(3, minmax(0, 1fr))',
|
|
60
|
+
gap: spacingVars['--spacing-3'],
|
|
61
|
+
marginBlockEnd: spacingVars['--spacing-6'],
|
|
62
|
+
},
|
|
63
|
+
metricCard: {
|
|
64
|
+
padding: spacingVars['--spacing-4'],
|
|
65
|
+
borderRadius: radiusVars['--radius-container'],
|
|
66
|
+
backgroundColor: colorVars['--color-background-muted'],
|
|
67
|
+
},
|
|
68
|
+
metricLabel: {
|
|
69
|
+
display: 'block',
|
|
70
|
+
color: colorVars['--color-text-secondary'],
|
|
71
|
+
},
|
|
72
|
+
metricValue: {
|
|
73
|
+
display: 'block',
|
|
74
|
+
marginBlockStart: spacingVars['--spacing-1'],
|
|
75
|
+
color: colorVars['--color-text-primary'],
|
|
76
|
+
},
|
|
77
|
+
tableRegion: {
|
|
78
|
+
'--table-bulk-actions-space': `calc(${sizeVars['--size-element-sm']} + ${spacingVars['--spacing-2']} + ${spacingVars['--spacing-2']} + ${spacingVars['--spacing-4']})`,
|
|
79
|
+
position: 'relative',
|
|
80
|
+
paddingBlockStart: 'var(--table-bulk-actions-space)',
|
|
81
|
+
},
|
|
82
|
+
toolbar: {
|
|
83
|
+
position: 'sticky',
|
|
84
|
+
insetBlockStart: `calc(var(--table-bulk-actions-space) + ${spacingVars['--spacing-4']})`,
|
|
85
|
+
transform: 'translateY(calc(0px - var(--table-bulk-actions-space)))',
|
|
86
|
+
marginBlockEnd: `calc(${spacingVars['--spacing-4']} - var(--table-bulk-actions-space))`,
|
|
87
|
+
zIndex: 1,
|
|
88
|
+
borderRadius: radiusVars['--radius-element'],
|
|
89
|
+
boxShadow: shadowVars['--shadow-med'],
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export default function TableFloatingBulkActionsTable() {
|
|
94
|
+
const [selectedKeys, setSelectedKeys] = useState<Set<string>>(new Set());
|
|
95
|
+
|
|
96
|
+
const {selectionConfig, selectionState} = useTableSelectionState<User>({
|
|
97
|
+
data: users,
|
|
98
|
+
idKey: 'id',
|
|
99
|
+
selectedKeys,
|
|
100
|
+
setSelectedKeys,
|
|
101
|
+
});
|
|
102
|
+
const selectionPlugin = useTableSelection<User>(selectionConfig);
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<ScrollableArea
|
|
106
|
+
axis="block"
|
|
107
|
+
label="Bulk actions example"
|
|
108
|
+
overscroll="contain"
|
|
109
|
+
xstyle={styles.page}>
|
|
110
|
+
<div {...stylex.props(styles.metrics)}>
|
|
111
|
+
{[
|
|
112
|
+
['Active users', '12,840'],
|
|
113
|
+
['Selection rate', '18.4%'],
|
|
114
|
+
['Pending reviews', '247'],
|
|
115
|
+
].map(([label, value]) => (
|
|
116
|
+
<div key={label} {...stylex.props(styles.metricCard)}>
|
|
117
|
+
<span {...stylex.props(styles.metricLabel)}>{label}</span>
|
|
118
|
+
<strong {...stylex.props(styles.metricValue)}>{value}</strong>
|
|
119
|
+
</div>
|
|
120
|
+
))}
|
|
121
|
+
</div>
|
|
122
|
+
<div {...stylex.props(styles.tableRegion)}>
|
|
123
|
+
<TableSelectionToolbar
|
|
124
|
+
selection={selectionState}
|
|
125
|
+
xstyle={styles.toolbar}
|
|
126
|
+
startContent={
|
|
127
|
+
<Button label="Approve" variant="ghost" onClick={() => {}} />
|
|
128
|
+
}
|
|
129
|
+
/>
|
|
130
|
+
<Table
|
|
131
|
+
data={users}
|
|
132
|
+
columns={columns}
|
|
133
|
+
idKey="id"
|
|
134
|
+
plugins={{selection: selectionPlugin}}
|
|
135
|
+
/>
|
|
136
|
+
</div>
|
|
137
|
+
</ScrollableArea>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
@@ -60,6 +60,14 @@ export const doc = {
|
|
|
60
60
|
example:
|
|
61
61
|
"{ audience: 'internal', async handle(report, {signal}) { return sendGap(report, {signal}); } }",
|
|
62
62
|
},
|
|
63
|
+
{
|
|
64
|
+
name: 'discover',
|
|
65
|
+
type: 'DiscoverSource',
|
|
66
|
+
description:
|
|
67
|
+
'Tell `astryx discover` which integrations this project could add: an async function that returns a catalog. An integration can provide one too, as a `discover` named export from its manifest. Discover calls every source, yours first, and one that fails never hides the others. Discover only reads; your package manager installs.',
|
|
68
|
+
example:
|
|
69
|
+
"async ({signal, package: name, version}) => fetchCatalog({signal, name, version})",
|
|
70
|
+
},
|
|
63
71
|
{
|
|
64
72
|
name: 'experimental',
|
|
65
73
|
type: '{ xle?: { components?: Record<string, XleComponent> } }',
|
|
@@ -69,7 +77,7 @@ export const doc = {
|
|
|
69
77
|
name: 'experimental.xle.components',
|
|
70
78
|
type: 'Record<string, XleComponent>',
|
|
71
79
|
description:
|
|
72
|
-
'
|
|
80
|
+
'No effect. Its only reader was the removed `layout` command. The key is still accepted so existing configs keep loading; delete it.',
|
|
73
81
|
},
|
|
74
82
|
],
|
|
75
83
|
},
|
|
@@ -30,6 +30,7 @@ export type XleComponent = import("./type.js").XleComponent;
|
|
|
30
30
|
export type DebugConfig = import("./type.js").DebugConfig;
|
|
31
31
|
export type DebugEventHandler = import("../debug/type.js").DebugEventHandler;
|
|
32
32
|
export type GapReportHandler = import("../gap-report/type.js").GapReportHandler;
|
|
33
|
+
export type DiscoverSource = import("../discover/type.js").DiscoverSource;
|
|
33
34
|
import { z } from 'zod';
|
|
34
35
|
declare const configSchema: z.ZodObject<{
|
|
35
36
|
integrations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -48,6 +49,7 @@ declare const configSchema: z.ZodObject<{
|
|
|
48
49
|
}, z.core.$strict>>;
|
|
49
50
|
debug: z.ZodOptional<z.ZodType<import("../debug/type.js").DebugEventHandler, any, z.core.$ZodTypeInternals<import("../debug/type.js").DebugEventHandler, any>>>;
|
|
50
51
|
gapReport: z.ZodOptional<z.ZodType<import("../gap-report/type.js").GapReportHandler, any, z.core.$ZodTypeInternals<import("../gap-report/type.js").GapReportHandler, any>>>;
|
|
52
|
+
discover: z.ZodOptional<z.ZodType<import("../discover/type.js").DiscoverSource, any, z.core.$ZodTypeInternals<import("../discover/type.js").DiscoverSource, any>>>;
|
|
51
53
|
experimental: z.ZodOptional<z.ZodObject<{
|
|
52
54
|
xle: z.ZodOptional<z.ZodObject<{
|
|
53
55
|
components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import {z} from 'zod';
|
|
13
13
|
import {formatZodError} from '../_shared/errors.mjs';
|
|
14
14
|
import {parseGapReportHandler} from '../gap-report/parse.mjs';
|
|
15
|
+
import {parseDiscoverSource} from '../discover/parse.mjs';
|
|
15
16
|
|
|
16
17
|
/** @typedef {import('./type.js').AstryxConfig} AstryxConfig */
|
|
17
18
|
/** @typedef {import('./type.js').PostCodemodHook} PostCodemodHook */
|
|
@@ -19,6 +20,7 @@ import {parseGapReportHandler} from '../gap-report/parse.mjs';
|
|
|
19
20
|
/** @typedef {import('./type.js').DebugConfig} DebugConfig */
|
|
20
21
|
/** @typedef {import('../debug/type.js').DebugEventHandler} DebugEventHandler */
|
|
21
22
|
/** @typedef {import('../gap-report/type.js').GapReportHandler} GapReportHandler */
|
|
23
|
+
/** @typedef {import('../discover/type.js').DiscoverSource} DiscoverSource */
|
|
22
24
|
|
|
23
25
|
// Typed `z.custom` so `z.infer` reproduces the real function type (not `unknown`).
|
|
24
26
|
const buildCommand = /** @type {z.ZodType<PostCodemodHook['buildCommand']>} */ (
|
|
@@ -66,6 +68,22 @@ const gapReportHandlerSchema = /** @type {z.ZodType<GapReportHandler>} */ (
|
|
|
66
68
|
)
|
|
67
69
|
);
|
|
68
70
|
|
|
71
|
+
// The same check an integration's `discover` named export passes. Typed
|
|
72
|
+
// z.custom preserves the public function type.
|
|
73
|
+
const discoverSourceSchema = /** @type {z.ZodType<DiscoverSource>} */ (
|
|
74
|
+
z.custom(
|
|
75
|
+
value => {
|
|
76
|
+
try {
|
|
77
|
+
parseDiscoverSource(value, 'discover');
|
|
78
|
+
return true;
|
|
79
|
+
} catch {
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{message: 'Expected a discover source function'},
|
|
84
|
+
)
|
|
85
|
+
);
|
|
86
|
+
|
|
69
87
|
const configSchema = z
|
|
70
88
|
.object({
|
|
71
89
|
integrations: z.array(z.string()).optional(),
|
|
@@ -76,6 +94,7 @@ const configSchema = z
|
|
|
76
94
|
.optional(),
|
|
77
95
|
debug: debugSchema.optional(),
|
|
78
96
|
gapReport: gapReportHandlerSchema.optional(),
|
|
97
|
+
discover: discoverSourceSchema.optional(),
|
|
79
98
|
experimental: z
|
|
80
99
|
.object({
|
|
81
100
|
xle: z
|
|
@@ -63,6 +63,14 @@ describe('parseConfig (load boundary)', () => {
|
|
|
63
63
|
).toEqual({audience: 'internal', handle});
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
+
it('accepts a discover source function and refuses anything else', () => {
|
|
67
|
+
const discover = async () => ({});
|
|
68
|
+
expect(parseConfig({discover}).discover).toBe(discover);
|
|
69
|
+
expect(reason({discover: 'https://example.com/catalog.json'})).toContain(
|
|
70
|
+
'discover',
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
|
|
66
74
|
it('rejects obsolete or extended gap-report handler shapes', () => {
|
|
67
75
|
expect(reason({gapReport: {command: './report.mjs'}})).toContain(
|
|
68
76
|
'gapReport',
|
package/authoring/config/type.ts
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import type {DebugEventHandler} from '../debug/type.js';
|
|
13
13
|
import type {GapReportHandler} from '../gap-report/type.js';
|
|
14
|
+
import type {DiscoverSource} from '../discover/type.js';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* A command to run as part of a post-codemod hook. Returned by a hook's
|
|
@@ -96,6 +97,16 @@ export interface AstryxConfig {
|
|
|
96
97
|
debug?: DebugConfig;
|
|
97
98
|
/** Route gap reports through a project-owned handler. See {@link GapReportHandler}. */
|
|
98
99
|
gapReport?: GapReportHandler;
|
|
100
|
+
/**
|
|
101
|
+
* Tell `astryx discover` about integrations this project could add. See
|
|
102
|
+
* {@link DiscoverSource}.
|
|
103
|
+
*
|
|
104
|
+
* An integration can provide a source too, as a `discover` named export from
|
|
105
|
+
* its `astryx.integration.*` module. Discover calls every source: this one
|
|
106
|
+
* first, then each integration's in load order, and one that fails never
|
|
107
|
+
* hides the others.
|
|
108
|
+
*/
|
|
109
|
+
discover?: DiscoverSource;
|
|
99
110
|
/**
|
|
100
111
|
* EXPERIMENTAL — shape may change and is not part of the stable config
|
|
101
112
|
* contract. Provisional home for features still being proven out.
|
|
@@ -104,8 +115,8 @@ export interface AstryxConfig {
|
|
|
104
115
|
/** Experimental XLE (layout expression) configuration. */
|
|
105
116
|
xle?: {
|
|
106
117
|
/**
|
|
107
|
-
*
|
|
108
|
-
*
|
|
118
|
+
* No effect. Its only reader was the removed `layout` command. Still
|
|
119
|
+
* accepted so existing configs keep loading; delete it.
|
|
109
120
|
*/
|
|
110
121
|
components?: Record<string, XleComponent>;
|
|
111
122
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// @generated by scripts/sync-api-types.mjs from the JSDoc in authoring/**/*.mjs.
|
|
2
|
+
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @file SchemaDoc for DiscoverSource, the function `astryx discover` calls to
|
|
6
|
+
* learn which integrations a project could add.
|
|
7
|
+
* @input The DiscoverSource type and the catalog types beside it (`type.ts`),
|
|
8
|
+
* which `parse.mjs` validates.
|
|
9
|
+
* @output The `discover-source` section of `astryx docs authoring`.
|
|
10
|
+
* @position packages/cli/authoring/discover — schema documentation
|
|
11
|
+
*/
|
|
12
|
+
/** @type {import('@astryxdesign/cli/authoring').SchemaDoc} */
|
|
13
|
+
export const doc: import("@astryxdesign/cli/authoring").SchemaDoc;
|