@astryxdesign/cli 0.6.5-vanilla-poc.6e25cfc → 0.6.6
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 +84 -0
- package/README.md +1 -34
- package/api/build/_adapter.d.mts +14 -0
- package/api/build/_adapter.mjs +58 -1
- package/api/build/build.test.mjs +74 -1
- package/api/build/kit/kit.mjs +39 -7
- package/api/build/kit/rank.d.mts +8 -0
- package/api/build/kit/rank.mjs +14 -0
- package/api/build/kit/weights.d.mts +82 -0
- package/api/build/kit/weights.json +1 -0
- package/api/build/kit/weights.mjs +305 -0
- package/api/build/kit/weights.test.mjs +190 -0
- package/api/component/_adapter.d.mts +1 -51
- package/api/component/_adapter.mjs +3 -110
- package/api/component/component.d.mts +1 -9
- package/api/component/component.doc.mjs +7 -52
- package/api/component/component.mjs +3 -276
- package/api/component/component.type.d.mts +1 -28
- package/api/component/component.type.mjs +1 -20
- package/api/docs/docs.d.mts +6 -0
- package/api/docs/docs.depth.test.mjs +132 -0
- package/api/docs/docs.doc.mjs +31 -2
- package/api/docs/docs.mjs +44 -1
- package/api/docs/docs.type.d.mts +38 -1
- package/api/docs/docs.type.mjs +18 -1
- package/api/docs/node/node.d.mts +28 -3
- package/api/docs/node/node.mjs +146 -23
- package/api/hook/list/list.d.mts +1 -1
- package/api/index.d.mts +0 -8
- package/api/index.mjs +0 -8
- package/api/integration/add-theme.mjs +93 -3
- package/api/integration/add-theme.test.mjs +100 -0
- package/api/integration/integrationAddTheme.doc.mjs +1 -1
- package/api/search/search.d.mts +8 -1
- package/api/search/search.doc.mjs +3 -3
- package/api/search/search.mjs +58 -73
- package/api/search/search.test.mjs +122 -21
- package/api/search/search.type.d.mts +0 -10
- package/api/search/search.type.mjs +0 -1
- package/api/template/cdn/cdn.test.mjs +2 -50
- package/api/template/template.d.mts +0 -6
- package/api/template/template.doc.mjs +4 -56
- package/api/template/template.mjs +0 -82
- package/api/template/template.type.d.mts +0 -12
- package/api/template/template.type.mjs +0 -7
- package/assets/cdn.template.html +5 -19
- package/assets/docs/tokens.doc.mjs +3 -3
- package/assets/docs/tree/add-a-theme.doc.mjs +4 -0
- package/assets/docs/tree/troubleshooting.doc.mjs +4 -4
- package/clients/cli/commands/component/index.mjs +9 -66
- package/clients/cli/commands/component.doc.mjs +4 -26
- package/clients/cli/commands/docs.depth.test.mjs +219 -0
- package/clients/cli/commands/docs.doc.mjs +15 -2
- package/clients/cli/commands/docs.mjs +222 -5
- package/clients/cli/commands/integration-add.doc.mjs +1 -1
- package/clients/cli/commands/search.doc.mjs +2 -3
- package/clients/cli/commands/search.mjs +11 -8
- package/clients/cli/commands/search.test.mjs +35 -40
- package/clients/cli/commands/template.doc.mjs +3 -31
- package/clients/cli/commands/template.mjs +2 -37
- package/foundation/discovery/theme-discovery.d.mts +6 -0
- package/foundation/discovery/theme-discovery.mjs +9 -0
- package/foundation/response/response-types.doc.mjs +0 -38
- package/package.json +5 -9
- package/api/_vanilla-assets.d.mts +0 -10
- package/api/_vanilla-assets.mjs +0 -59
- package/api/component/html/html.d.mts +0 -12
- package/api/component/html/html.doc.d.mts +0 -5
- package/api/component/html/html.doc.mjs +0 -66
- package/api/component/html/html.mjs +0 -25
- package/api/component/html/html.test.mjs +0 -61
- package/api/component/html/html.type.d.mts +0 -23
- package/api/component/html/html.type.mjs +0 -27
- package/api/component/web-components/web-components.d.mts +0 -12
- package/api/component/web-components/web-components.doc.d.mts +0 -5
- package/api/component/web-components/web-components.doc.mjs +0 -70
- package/api/component/web-components/web-components.mjs +0 -32
- package/api/component/web-components/web-components.test.mjs +0 -50
- package/api/component/web-components/web-components.type.d.mts +0 -23
- package/api/component/web-components/web-components.type.mjs +0 -27
- package/api/template/_adapter.d.mts +0 -38
- package/api/template/_adapter.mjs +0 -90
- package/api/template/html/html.d.mts +0 -17
- package/api/template/html/html.doc.d.mts +0 -5
- package/api/template/html/html.doc.mjs +0 -72
- package/api/template/html/html.mjs +0 -61
- package/api/template/html/html.test.mjs +0 -71
- package/api/template/html/html.type.d.mts +0 -26
- package/api/template/html/html.type.mjs +0 -28
- package/api/template/web-components/web-components.d.mts +0 -13
- package/api/template/web-components/web-components.doc.d.mts +0 -5
- package/api/template/web-components/web-components.doc.mjs +0 -69
- package/api/template/web-components/web-components.mjs +0 -51
- package/api/template/web-components/web-components.test.mjs +0 -73
- package/api/template/web-components/web-components.type.d.mts +0 -26
- package/api/template/web-components/web-components.type.mjs +0 -28
- package/assets/generated/core-component-docs.json +0 -1
- package/assets/vanilla/elements-markup/Avatar.html +0 -27
- package/assets/vanilla/elements-markup/Badge.html +0 -16
- package/assets/vanilla/elements-markup/Banner.html +0 -32
- package/assets/vanilla/elements-markup/Breadcrumbs.html +0 -23
- package/assets/vanilla/elements-markup/Button.html +0 -37
- package/assets/vanilla/elements-markup/Card.html +0 -24
- package/assets/vanilla/elements-markup/CheckboxInput.html +0 -28
- package/assets/vanilla/elements-markup/Collapsible.html +0 -26
- package/assets/vanilla/elements-markup/DateInput.html +0 -28
- package/assets/vanilla/elements-markup/Dialog.html +0 -33
- package/assets/vanilla/elements-markup/Divider.html +0 -20
- package/assets/vanilla/elements-markup/DropdownMenu.html +0 -26
- package/assets/vanilla/elements-markup/EmptyState.html +0 -27
- package/assets/vanilla/elements-markup/Heading.html +0 -18
- package/assets/vanilla/elements-markup/HoverCard.html +0 -39
- package/assets/vanilla/elements-markup/Layout.html +0 -28
- package/assets/vanilla/elements-markup/Lightbox.html +0 -33
- package/assets/vanilla/elements-markup/Link.html +0 -23
- package/assets/vanilla/elements-markup/NumberInput.html +0 -34
- package/assets/vanilla/elements-markup/ProgressBar.html +0 -47
- package/assets/vanilla/elements-markup/RadioList.html +0 -28
- package/assets/vanilla/elements-markup/Selector.html +0 -34
- package/assets/vanilla/elements-markup/SideNav.html +0 -32
- package/assets/vanilla/elements-markup/Skeleton.html +0 -18
- package/assets/vanilla/elements-markup/Slider.html +0 -31
- package/assets/vanilla/elements-markup/Stack.html +0 -33
- package/assets/vanilla/elements-markup/StatusDot.html +0 -19
- package/assets/vanilla/elements-markup/Switch.html +0 -28
- package/assets/vanilla/elements-markup/Tab.html +0 -18
- package/assets/vanilla/elements-markup/TabList.html +0 -31
- package/assets/vanilla/elements-markup/Table.html +0 -31
- package/assets/vanilla/elements-markup/Text.html +0 -24
- package/assets/vanilla/elements-markup/TextArea.html +0 -32
- package/assets/vanilla/elements-markup/TextInput.html +0 -92
- package/assets/vanilla/elements-markup/Theme.html +0 -16
- package/assets/vanilla/elements-markup/TimeInput.html +0 -29
- package/assets/vanilla/elements-markup/Toast.html +0 -22
- package/assets/vanilla/elements-markup/Tooltip.html +0 -30
- package/assets/vanilla/elements-markup/TopNav.html +0 -85
- package/assets/vanilla/elements-markup/Typeahead.html +0 -31
- package/assets/vanilla/elements-templates/dashboard.html +0 -167
- package/assets/vanilla/elements-templates/detail-page.html +0 -145
- package/assets/vanilla/elements-templates/form-two-column.html +0 -135
- package/assets/vanilla/elements-templates/kanban-board.html +0 -141
- package/assets/vanilla/elements-templates/login.html +0 -100
- package/assets/vanilla/elements-templates/product-detail.html +0 -128
- package/assets/vanilla/elements-templates/settings.html +0 -130
- package/assets/vanilla/elements-templates/shell-side-nav.html +0 -160
- package/assets/vanilla/elements-templates/table-filter.html +0 -154
- package/assets/vanilla/markup/Avatar.html +0 -24
- package/assets/vanilla/markup/Badge.html +0 -12
- package/assets/vanilla/markup/Banner.html +0 -49
- package/assets/vanilla/markup/Breadcrumbs.html +0 -38
- package/assets/vanilla/markup/Button.html +0 -37
- package/assets/vanilla/markup/Card.html +0 -16
- package/assets/vanilla/markup/CheckboxInput.html +0 -45
- package/assets/vanilla/markup/Collapsible.html +0 -9
- package/assets/vanilla/markup/DateInput.html +0 -42
- package/assets/vanilla/markup/Dialog.html +0 -45
- package/assets/vanilla/markup/Divider.html +0 -9
- package/assets/vanilla/markup/DropdownMenu.html +0 -30
- package/assets/vanilla/markup/EmptyState.html +0 -41
- package/assets/vanilla/markup/Heading.html +0 -9
- package/assets/vanilla/markup/HoverCard.html +0 -85
- package/assets/vanilla/markup/Layout.html +0 -35
- package/assets/vanilla/markup/Lightbox.html +0 -107
- package/assets/vanilla/markup/Link.html +0 -6
- package/assets/vanilla/markup/NumberInput.html +0 -55
- package/assets/vanilla/markup/ProgressBar.html +0 -101
- package/assets/vanilla/markup/RadioList.html +0 -90
- package/assets/vanilla/markup/Selector.html +0 -92
- package/assets/vanilla/markup/SideNav.html +0 -82
- package/assets/vanilla/markup/Skeleton.html +0 -26
- package/assets/vanilla/markup/Slider.html +0 -65
- package/assets/vanilla/markup/Stack.html +0 -13
- package/assets/vanilla/markup/StatusDot.html +0 -22
- package/assets/vanilla/markup/Switch.html +0 -47
- package/assets/vanilla/markup/TabList.html +0 -56
- package/assets/vanilla/markup/Table.html +0 -75
- package/assets/vanilla/markup/Text.html +0 -9
- package/assets/vanilla/markup/TextArea.html +0 -37
- package/assets/vanilla/markup/TextInput.html +0 -80
- package/assets/vanilla/markup/Theme.html +0 -48
- package/assets/vanilla/markup/TimeInput.html +0 -43
- package/assets/vanilla/markup/Toast.html +0 -42
- package/assets/vanilla/markup/Tooltip.html +0 -18
- package/assets/vanilla/markup/TopNav.html +0 -81
- package/assets/vanilla/markup/Typeahead.html +0 -60
- package/assets/vanilla/templates/dashboard.html +0 -462
- package/assets/vanilla/templates/detail-page.html +0 -536
- package/assets/vanilla/templates/form-two-column.html +0 -438
- package/assets/vanilla/templates/kanban-board.html +0 -443
- package/assets/vanilla/templates/login.html +0 -199
- package/assets/vanilla/templates/product-detail.html +0 -335
- package/assets/vanilla/templates/settings.html +0 -374
- package/assets/vanilla/templates/shell-side-nav.html +0 -440
- package/assets/vanilla/templates/table-filter.html +0 -514
- package/clients/cli/commands/vanilla-html.test.mjs +0 -245
- package/foundation/discovery/bundled-component-docs.d.mts +0 -39
- package/foundation/discovery/bundled-component-docs.mjs +0 -92
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* @file Shared resolver for the `component` command leaves.
|
|
5
5
|
*
|
|
6
|
-
* @input a component name (+ cwd / package scope) and doc-load options
|
|
7
|
-
* vanilla HTML reads resolve checkout assets before the bundled copy
|
|
6
|
+
* @input a component name (+ cwd / package scope) and doc-load options
|
|
8
7
|
* @output resolved subjects the leaves project into their one `{type, data}`
|
|
9
8
|
* envelope — owners across core/integration, the scoped/legacy/fuzzy
|
|
10
9
|
* resolution, and the doc-loading / prop-extraction / ownership shaping
|
|
@@ -39,29 +38,10 @@ import {
|
|
|
39
38
|
} from '../../foundation/discovery/component-discovery.mjs';
|
|
40
39
|
import {Project} from '../../foundation/config/project.mjs';
|
|
41
40
|
import {loadComponentDoc as loadValidatedComponentDoc} from '../../foundation/discovery/component-loader.mjs';
|
|
42
|
-
import {
|
|
43
|
-
searchComponents,
|
|
44
|
-
levenshteinDistance,
|
|
45
|
-
} from '../../foundation/text/string-utils.mjs';
|
|
46
|
-
import {
|
|
47
|
-
getBundledCoreVersion,
|
|
48
|
-
getBundledComponentDoc,
|
|
49
|
-
getBundledComponentDocsMeta,
|
|
50
|
-
getBundledComponentGroups,
|
|
51
|
-
getBundledComponentRecords,
|
|
52
|
-
} from '../../foundation/discovery/bundled-component-docs.mjs';
|
|
41
|
+
import {searchComponents} from '../../foundation/text/string-utils.mjs';
|
|
53
42
|
import {AstryxError} from '../error.mjs';
|
|
54
|
-
import {requireVanillaAssetsDir} from '../_vanilla-assets.mjs';
|
|
55
43
|
|
|
56
|
-
export {
|
|
57
|
-
CORE_PACKAGE,
|
|
58
|
-
getBundledCoreVersion,
|
|
59
|
-
getBundledComponentDoc,
|
|
60
|
-
getBundledComponentDocsMeta,
|
|
61
|
-
getBundledComponentGroups,
|
|
62
|
-
getBundledComponentRecords,
|
|
63
|
-
levenshteinDistance,
|
|
64
|
-
};
|
|
44
|
+
export {CORE_PACKAGE};
|
|
65
45
|
|
|
66
46
|
/**
|
|
67
47
|
* A loaded component doc. The shared validated loader accepts stamped and legacy
|
|
@@ -123,16 +103,6 @@ export {
|
|
|
123
103
|
* @property {string|null} resolvedSourcePath
|
|
124
104
|
*/
|
|
125
105
|
|
|
126
|
-
/**
|
|
127
|
-
* Locate Core without failing so documentation callers can select the bundled
|
|
128
|
-
* fallback when a no-build project has no local installation.
|
|
129
|
-
* @param {string} cwd
|
|
130
|
-
* @returns {string|null}
|
|
131
|
-
*/
|
|
132
|
-
export function findOptionalCoreDir(cwd) {
|
|
133
|
-
return findCoreDir(cwd);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
106
|
/**
|
|
137
107
|
* Locate `@astryxdesign/core`, throwing the stable not-found error when absent.
|
|
138
108
|
* @param {string} cwd
|
|
@@ -150,83 +120,6 @@ export function requireCoreDir(cwd) {
|
|
|
150
120
|
return coreDir;
|
|
151
121
|
}
|
|
152
122
|
|
|
153
|
-
/**
|
|
154
|
-
* List the component markup files for a vanilla framework.
|
|
155
|
-
* @param {string} cwd
|
|
156
|
-
* @param {'html'|'web-components'} framework
|
|
157
|
-
* @returns {{name: string, file: string}[]}
|
|
158
|
-
*/
|
|
159
|
-
export function listVanillaComponentMarkup(cwd, framework) {
|
|
160
|
-
const assetDir =
|
|
161
|
-
framework === 'web-components' ? 'elements-markup' : 'markup';
|
|
162
|
-
const markupDir = path.join(requireVanillaAssetsDir(cwd), assetDir);
|
|
163
|
-
if (!fs.existsSync(markupDir)) return [];
|
|
164
|
-
return fs
|
|
165
|
-
.readdirSync(markupDir, {withFileTypes: true})
|
|
166
|
-
.filter(entry => entry.isFile() && entry.name.endsWith('.html'))
|
|
167
|
-
.map(entry => ({
|
|
168
|
-
name: entry.name.slice(0, -'.html'.length),
|
|
169
|
-
file: entry.name,
|
|
170
|
-
}))
|
|
171
|
-
.sort((a, b) => a.name.localeCompare(b.name));
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/** @param {string} cwd @returns {{name: string, file: string}[]} */
|
|
175
|
-
export function listVanillaComponentHtml(cwd) {
|
|
176
|
-
return listVanillaComponentMarkup(cwd, 'html');
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Read one exact component markup file without permitting path traversal.
|
|
181
|
-
* @param {string} name
|
|
182
|
-
* @param {string} cwd
|
|
183
|
-
* @param {'html'|'web-components'} framework
|
|
184
|
-
* @returns {{component: string, file: string, source: string}}
|
|
185
|
-
*/
|
|
186
|
-
export function readVanillaComponentMarkup(name, cwd, framework) {
|
|
187
|
-
const entries = listVanillaComponentMarkup(cwd, framework);
|
|
188
|
-
if (!/^[A-Za-z][A-Za-z0-9]*$/.test(name)) {
|
|
189
|
-
throw new AstryxError(
|
|
190
|
-
`Invalid vanilla component name "${name}"`,
|
|
191
|
-
undefined,
|
|
192
|
-
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
const match = entries.find(entry => entry.name === name);
|
|
196
|
-
const label = framework === 'web-components' ? 'web-component' : 'HTML';
|
|
197
|
-
if (!match) {
|
|
198
|
-
throw new AstryxError(
|
|
199
|
-
`No vanilla ${label} markup found for component "${name}"`,
|
|
200
|
-
entries.map(entry => ({
|
|
201
|
-
name: entry.name,
|
|
202
|
-
reason: `vanilla ${label} component`,
|
|
203
|
-
})),
|
|
204
|
-
ERROR_CODES.ERR_UNKNOWN_COMPONENT,
|
|
205
|
-
);
|
|
206
|
-
}
|
|
207
|
-
const assetDir =
|
|
208
|
-
framework === 'web-components' ? 'elements-markup' : 'markup';
|
|
209
|
-
const filePath = path.join(
|
|
210
|
-
requireVanillaAssetsDir(cwd),
|
|
211
|
-
assetDir,
|
|
212
|
-
match.file,
|
|
213
|
-
);
|
|
214
|
-
return {
|
|
215
|
-
component: name,
|
|
216
|
-
file: match.file,
|
|
217
|
-
source: fs.readFileSync(filePath, 'utf8'),
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* @param {string} name
|
|
223
|
-
* @param {string} cwd
|
|
224
|
-
* @returns {{component: string, file: string, source: string}}
|
|
225
|
-
*/
|
|
226
|
-
export function readVanillaComponentHtml(name, cwd) {
|
|
227
|
-
return readVanillaComponentMarkup(name, cwd, 'html');
|
|
228
|
-
}
|
|
229
|
-
|
|
230
123
|
/**
|
|
231
124
|
* Load the configured integrations for `cwd`, swallowing any config errors so
|
|
232
125
|
* component discovery never hard-fails on a malformed/absent integration. An
|
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
* @param {boolean} [options.source]
|
|
13
13
|
* @param {boolean} [options.showcase]
|
|
14
14
|
* @param {boolean} [options.blocks]
|
|
15
|
-
* @param {boolean} [options.html] - Deprecated alias for framework='html'.
|
|
16
|
-
* @param {'react'|'html'|'web-components'} [options.framework] - Output framework; defaults to react.
|
|
17
15
|
* @param {'full'|'compact'|'brief'} [options.detail] - Defaults to 'full' for a single component, 'brief' for list views (list/category/no name), matching the CLI.
|
|
18
16
|
* @param {string} [options.lang]
|
|
19
17
|
* @param {boolean} [options.zh]
|
|
@@ -26,10 +24,6 @@
|
|
|
26
24
|
* | import('./component.type.mjs').ComponentDetailSourceResponse
|
|
27
25
|
* | import('./component.type.mjs').ComponentDetailShowcaseResponse
|
|
28
26
|
* | import('./component.type.mjs').ComponentDetailBlocksResponse
|
|
29
|
-
* | import('./html/html.type.mjs').ComponentHtmlListResponse
|
|
30
|
-
* | import('./html/html.type.mjs').ComponentHtmlResponse
|
|
31
|
-
* | import('./web-components/web-components.type.mjs').ComponentWebComponentsListResponse
|
|
32
|
-
* | import('./web-components/web-components.type.mjs').ComponentWebComponentsResponse
|
|
33
27
|
* )>}
|
|
34
28
|
*/
|
|
35
29
|
export function component(name?: string | string[], options?: {
|
|
@@ -41,12 +35,10 @@ export function component(name?: string | string[], options?: {
|
|
|
41
35
|
source?: boolean | undefined;
|
|
42
36
|
showcase?: boolean | undefined;
|
|
43
37
|
blocks?: boolean | undefined;
|
|
44
|
-
html?: boolean | undefined;
|
|
45
|
-
framework?: "react" | "html" | "web-components" | undefined;
|
|
46
38
|
detail?: "compact" | "full" | "brief" | undefined;
|
|
47
39
|
lang?: string | undefined;
|
|
48
40
|
zh?: boolean | undefined;
|
|
49
41
|
dense?: boolean | undefined;
|
|
50
|
-
}): Promise<(import("./component.type.mjs").ComponentListResponse | import("./component.type.mjs").ComponentBatchResponse | import("./component.type.mjs").ComponentDetailResponse | import("./component.type.mjs").ComponentDetailPropsResponse | import("./component.type.mjs").ComponentDetailSourceResponse | import("./component.type.mjs").ComponentDetailShowcaseResponse | import("./component.type.mjs").ComponentDetailBlocksResponse
|
|
42
|
+
}): Promise<(import("./component.type.mjs").ComponentListResponse | import("./component.type.mjs").ComponentBatchResponse | import("./component.type.mjs").ComponentDetailResponse | import("./component.type.mjs").ComponentDetailPropsResponse | import("./component.type.mjs").ComponentDetailSourceResponse | import("./component.type.mjs").ComponentDetailShowcaseResponse | import("./component.type.mjs").ComponentDetailBlocksResponse)>;
|
|
51
43
|
/** Maximum selectors accepted before any component resolution starts. */
|
|
52
44
|
export const COMPONENT_BATCH_SELECTOR_LIMIT: 100;
|
|
@@ -15,21 +15,16 @@ export const doc = {
|
|
|
15
15
|
namespace: 'cli/api',
|
|
16
16
|
displayName: 'component()',
|
|
17
17
|
summary:
|
|
18
|
-
'Resolve components by name, list the catalog,
|
|
18
|
+
'Resolve one or several components by name, or list the catalog, with optional focused slices (props, source, showcase, blocks).',
|
|
19
19
|
description:
|
|
20
20
|
'Routes on its arguments: one string resolves that component across core and ' +
|
|
21
21
|
'integration packages; an array returns one ordered result row per selector at ' +
|
|
22
22
|
'every array length; and no name returns the catalog grouped by category. ' +
|
|
23
23
|
'Boolean flags narrow each resolved component to just its props, source, ' +
|
|
24
|
-
'showcase, or example blocks.
|
|
25
|
-
'vanilla HTML markup, or vanilla web-component markup. The html option is a ' +
|
|
26
|
-
'deprecated alias for framework=html. When Core is not installed, details, props, ' +
|
|
27
|
-
'and lists come from the version-matched Core snapshot shipped with the CLI; the ' +
|
|
28
|
-
'response meta identifies that package version. Configured integration components ' +
|
|
29
|
-
'remain available only when Core is installed.',
|
|
24
|
+
'showcase, or example blocks.',
|
|
30
25
|
importPath: '@astryxdesign/cli/api',
|
|
31
26
|
signature:
|
|
32
|
-
'component(name?: string | string[], options?: ComponentOptions): Promise<ComponentListResponse | ComponentBatchResponse | ComponentDetailResponse | ComponentDetailPropsResponse | ComponentDetailSourceResponse | ComponentDetailShowcaseResponse | ComponentDetailBlocksResponse
|
|
27
|
+
'component(name?: string | string[], options?: ComponentOptions): Promise<ComponentListResponse | ComponentBatchResponse | ComponentDetailResponse | ComponentDetailPropsResponse | ComponentDetailSourceResponse | ComponentDetailShowcaseResponse | ComponentDetailBlocksResponse>',
|
|
33
28
|
keywords: [
|
|
34
29
|
'component',
|
|
35
30
|
'components',
|
|
@@ -49,8 +44,7 @@ export const doc = {
|
|
|
49
44
|
{
|
|
50
45
|
name: 'options.cwd',
|
|
51
46
|
type: 'string',
|
|
52
|
-
description:
|
|
53
|
-
'Directory to resolve @astryxdesign/core from. Without a local installation, list, detail, and props reads use the version-matched Core snapshot bundled with the CLI.',
|
|
47
|
+
description: 'Directory to resolve @astryxdesign/core from.',
|
|
54
48
|
default: 'process.cwd()',
|
|
55
49
|
},
|
|
56
50
|
{
|
|
@@ -91,18 +85,6 @@ export const doc = {
|
|
|
91
85
|
description:
|
|
92
86
|
"Return the component's example blocks (showcase, examples, related).",
|
|
93
87
|
},
|
|
94
|
-
{
|
|
95
|
-
name: 'options.framework',
|
|
96
|
-
type: "'react' | 'html' | 'web-components'",
|
|
97
|
-
description:
|
|
98
|
-
'Choose React component docs (default), vanilla HTML markup, or vanilla web-component markup.',
|
|
99
|
-
default: "'react'",
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: 'options.html',
|
|
103
|
-
type: 'boolean',
|
|
104
|
-
description: 'Deprecated alias for options.framework=html.',
|
|
105
|
-
},
|
|
106
88
|
{
|
|
107
89
|
name: 'options.detail',
|
|
108
90
|
type: "'full' | 'compact' | 'brief'",
|
|
@@ -141,7 +123,7 @@ export const doc = {
|
|
|
141
123
|
{
|
|
142
124
|
type: 'component.detail',
|
|
143
125
|
description:
|
|
144
|
-
"One component's authored ComponentDoc plus ownership metadata (owner package, import specifier, whether source is available). When
|
|
126
|
+
"One component's authored ComponentDoc plus ownership metadata (owner package, import specifier, whether source is available). When the name is a sub-component documented in a parent's doc, the payload is scoped to it and parentDoc names that parent.",
|
|
145
127
|
},
|
|
146
128
|
{
|
|
147
129
|
type: 'component.detail.props',
|
|
@@ -161,30 +143,11 @@ export const doc = {
|
|
|
161
143
|
description:
|
|
162
144
|
"The component's example blocks, as {component, showcase, examples, related} of BlockEntry.",
|
|
163
145
|
},
|
|
164
|
-
{
|
|
165
|
-
type: 'component.html.list',
|
|
166
|
-
description: 'The sorted vanilla component markup files as {name, file}.',
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
type: 'component.html',
|
|
170
|
-
description:
|
|
171
|
-
'One vanilla markup file as {component, file, source}; source includes its docs and variant comments verbatim.',
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
type: 'component.web-components.list',
|
|
175
|
-
description:
|
|
176
|
-
'The sorted vanilla web-component markup files as {name, file}.',
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
type: 'component.web-components',
|
|
180
|
-
description:
|
|
181
|
-
'One vanilla web-component markup file as {component, file, source}.',
|
|
182
|
-
},
|
|
183
146
|
],
|
|
184
147
|
throws: [
|
|
185
148
|
{
|
|
186
149
|
code: 'ERR_INVALID_ARGUMENT',
|
|
187
|
-
when: '
|
|
150
|
+
when: 'a selector array has more than 100 entries, a package-shaped selector has no component item, or its package conflicts with options.package',
|
|
188
151
|
},
|
|
189
152
|
{
|
|
190
153
|
code: 'ERR_INVALID_DETAIL',
|
|
@@ -196,7 +159,7 @@ export const doc = {
|
|
|
196
159
|
},
|
|
197
160
|
{
|
|
198
161
|
code: 'ERR_CORE_NOT_FOUND',
|
|
199
|
-
when: '@astryxdesign/core cannot be resolved from cwd
|
|
162
|
+
when: '@astryxdesign/core cannot be resolved from cwd',
|
|
200
163
|
},
|
|
201
164
|
{
|
|
202
165
|
code: 'ERR_UNKNOWN_CATEGORY',
|
|
@@ -237,14 +200,6 @@ export const doc = {
|
|
|
237
200
|
code: "await component(['Button', 'Badge']);",
|
|
238
201
|
},
|
|
239
202
|
{label: 'Props only', code: "await component('Button', {props: true});"},
|
|
240
|
-
{
|
|
241
|
-
label: 'Vanilla HTML',
|
|
242
|
-
code: "await component('Button', {framework: 'html'});",
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
label: 'Vanilla web component',
|
|
246
|
-
code: "await component('Button', {framework: 'web-components'});",
|
|
247
|
-
},
|
|
248
203
|
{
|
|
249
204
|
label: 'Browse one group',
|
|
250
205
|
code: "await component(undefined, {category: 'Layout', detail: 'compact'});",
|
|
@@ -16,7 +16,7 @@ import {ERROR_CODES} from '../../foundation/response/error-codes.mjs';
|
|
|
16
16
|
import {AstryxError} from '../error.mjs';
|
|
17
17
|
import {
|
|
18
18
|
CORE_PACKAGE,
|
|
19
|
-
|
|
19
|
+
requireCoreDir,
|
|
20
20
|
loadIntegrationsSafely,
|
|
21
21
|
resolveOwners,
|
|
22
22
|
classifyScope,
|
|
@@ -28,12 +28,6 @@ import {
|
|
|
28
28
|
scopeSubComponent,
|
|
29
29
|
ComponentAmbiguityError,
|
|
30
30
|
installedComponentPackageVersion,
|
|
31
|
-
getBundledCoreVersion,
|
|
32
|
-
getBundledComponentDoc,
|
|
33
|
-
getBundledComponentDocsMeta,
|
|
34
|
-
getBundledComponentGroups,
|
|
35
|
-
getBundledComponentRecords,
|
|
36
|
-
levenshteinDistance,
|
|
37
31
|
} from './_adapter.mjs';
|
|
38
32
|
import {componentList} from './list/list.mjs';
|
|
39
33
|
import {componentDetail} from './detail/detail.mjs';
|
|
@@ -41,10 +35,6 @@ import {componentDetailProps} from './detail/props/props.mjs';
|
|
|
41
35
|
import {componentDetailSource} from './detail/source/source.mjs';
|
|
42
36
|
import {componentDetailShowcase} from './detail/showcase/showcase.mjs';
|
|
43
37
|
import {componentDetailBlocks} from './detail/blocks/blocks.mjs';
|
|
44
|
-
import {componentHtml} from './html/html.mjs';
|
|
45
|
-
import {componentWebComponents} from './web-components/web-components.mjs';
|
|
46
|
-
|
|
47
|
-
const FRAMEWORKS = ['react', 'html', 'web-components'];
|
|
48
38
|
|
|
49
39
|
/** Maximum selectors accepted before any component resolution starts. */
|
|
50
40
|
export const COMPONENT_BATCH_SELECTOR_LIMIT = 100;
|
|
@@ -237,180 +227,6 @@ async function componentBatch(selectors, options, coreDir) {
|
|
|
237
227
|
return {type: 'component.batch', data: {count: results.length, results}};
|
|
238
228
|
}
|
|
239
229
|
|
|
240
|
-
/** @param {{type: string, data: any}} response */
|
|
241
|
-
function fromBundledDocs(response) {
|
|
242
|
-
return {...response, meta: getBundledComponentDocsMeta()};
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Resolve component documentation from the immutable Core snapshot shipped with
|
|
247
|
-
* this CLI. The fallback intentionally serves docs only: source, showcases, and
|
|
248
|
-
* blocks still require an installed Core package.
|
|
249
|
-
* @param {string|string[]|undefined} name
|
|
250
|
-
* @param {object} options
|
|
251
|
-
* @param {boolean} options.list
|
|
252
|
-
* @param {string|undefined} options.category
|
|
253
|
-
* @param {string|undefined} options.packageScope
|
|
254
|
-
* @param {boolean} options.props
|
|
255
|
-
* @param {boolean} options.source
|
|
256
|
-
* @param {boolean} options.showcase
|
|
257
|
-
* @param {boolean} options.blocks
|
|
258
|
-
* @param {'full'|'compact'|'brief'} options.detail
|
|
259
|
-
* @param {string|null} options.lang
|
|
260
|
-
* @param {boolean} options.zh
|
|
261
|
-
* @param {boolean} options.dense
|
|
262
|
-
* @returns {Promise<any>}
|
|
263
|
-
*/
|
|
264
|
-
async function componentFromBundledDocs(name, options) {
|
|
265
|
-
const {
|
|
266
|
-
list,
|
|
267
|
-
category,
|
|
268
|
-
packageScope,
|
|
269
|
-
props,
|
|
270
|
-
source,
|
|
271
|
-
showcase,
|
|
272
|
-
blocks,
|
|
273
|
-
detail,
|
|
274
|
-
lang,
|
|
275
|
-
zh,
|
|
276
|
-
dense,
|
|
277
|
-
} = options;
|
|
278
|
-
|
|
279
|
-
if (Array.isArray(name)) {
|
|
280
|
-
const results = [];
|
|
281
|
-
for (const value of name) {
|
|
282
|
-
const selector = typeof value === 'string' ? value : String(value);
|
|
283
|
-
try {
|
|
284
|
-
results.push({
|
|
285
|
-
selector,
|
|
286
|
-
status: 'found',
|
|
287
|
-
result: await componentFromBundledDocs(selector, options),
|
|
288
|
-
});
|
|
289
|
-
} catch (error) {
|
|
290
|
-
results.push(batchFailure(selector, error));
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
return fromBundledDocs({
|
|
294
|
-
type: 'component.batch',
|
|
295
|
-
data: {count: results.length, results},
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
const noName = !name;
|
|
300
|
-
if (category || list || noName) {
|
|
301
|
-
const allGroups = getBundledComponentGroups();
|
|
302
|
-
let groups = allGroups;
|
|
303
|
-
if (category) {
|
|
304
|
-
const match = Object.entries(allGroups).find(
|
|
305
|
-
([key]) => key.toLowerCase() === category.toLowerCase(),
|
|
306
|
-
);
|
|
307
|
-
if (!match) {
|
|
308
|
-
throw new AstryxError(
|
|
309
|
-
`Unknown category "${category}"`,
|
|
310
|
-
Object.keys(allGroups).map(key => ({
|
|
311
|
-
name: key,
|
|
312
|
-
reason: 'valid category',
|
|
313
|
-
})),
|
|
314
|
-
ERROR_CODES.ERR_UNKNOWN_CATEGORY,
|
|
315
|
-
);
|
|
316
|
-
}
|
|
317
|
-
groups = {[match[0]]: match[1]};
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
/** @type {Record<string, any[]>} */
|
|
321
|
-
const components = {};
|
|
322
|
-
for (const [group, names] of Object.entries(groups)) {
|
|
323
|
-
if (detail === 'brief') {
|
|
324
|
-
components[group] = names.map(componentName => {
|
|
325
|
-
const doc = getBundledComponentDoc(componentName);
|
|
326
|
-
return {
|
|
327
|
-
name: componentName,
|
|
328
|
-
package: CORE_PACKAGE,
|
|
329
|
-
import: doc.import,
|
|
330
|
-
};
|
|
331
|
-
});
|
|
332
|
-
} else if (detail === 'compact') {
|
|
333
|
-
components[group] = names.map(componentName => {
|
|
334
|
-
const doc = getBundledComponentDoc(componentName, {lang, zh, dense});
|
|
335
|
-
return {
|
|
336
|
-
name: componentName,
|
|
337
|
-
description: doc.usage?.description || doc.description || '',
|
|
338
|
-
import: doc.import,
|
|
339
|
-
};
|
|
340
|
-
});
|
|
341
|
-
} else {
|
|
342
|
-
components[group] = names.map(componentName =>
|
|
343
|
-
getBundledComponentDoc(componentName, {lang, zh, dense}),
|
|
344
|
-
);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
return fromBundledDocs({
|
|
348
|
-
type: 'component.list',
|
|
349
|
-
data: {
|
|
350
|
-
detail: detail === 'brief' ? 'names' : detail,
|
|
351
|
-
components,
|
|
352
|
-
},
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
const target = parseComponentSelector(name, packageScope);
|
|
357
|
-
if (target.package && target.package !== CORE_PACKAGE) {
|
|
358
|
-
throw new AstryxError(
|
|
359
|
-
`External package "${target.package}" not found`,
|
|
360
|
-
undefined,
|
|
361
|
-
ERROR_CODES.ERR_UNKNOWN_PACKAGE,
|
|
362
|
-
);
|
|
363
|
-
}
|
|
364
|
-
const bundledCoreVersion = getBundledCoreVersion();
|
|
365
|
-
if (target.version && target.version !== bundledCoreVersion) {
|
|
366
|
-
throw new AstryxError(
|
|
367
|
-
`Bundled component docs describe ${CORE_PACKAGE}@${bundledCoreVersion}, not ${target.version}`,
|
|
368
|
-
undefined,
|
|
369
|
-
ERROR_CODES.ERR_UNKNOWN_PACKAGE,
|
|
370
|
-
);
|
|
371
|
-
}
|
|
372
|
-
if (source || showcase || blocks) {
|
|
373
|
-
throw new AstryxError(
|
|
374
|
-
`This view requires an installed ${CORE_PACKAGE} package; bundled docs cover component details and props only`,
|
|
375
|
-
undefined,
|
|
376
|
-
ERROR_CODES.ERR_CORE_NOT_FOUND,
|
|
377
|
-
);
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
const componentName = target.name.replace(/^XDS/, '');
|
|
381
|
-
const doc = getBundledComponentDoc(componentName, {lang, zh, dense});
|
|
382
|
-
if (!doc) {
|
|
383
|
-
const suggestions = getBundledComponentRecords()
|
|
384
|
-
.map(record => ({
|
|
385
|
-
name: record.name,
|
|
386
|
-
distance: levenshteinDistance(
|
|
387
|
-
componentName.toLowerCase(),
|
|
388
|
-
record.name.toLowerCase(),
|
|
389
|
-
),
|
|
390
|
-
}))
|
|
391
|
-
.sort((a, b) => a.distance - b.distance || a.name.localeCompare(b.name))
|
|
392
|
-
.slice(0, 5)
|
|
393
|
-
.map(record => ({name: record.name, reason: 'bundled Core component'}));
|
|
394
|
-
throw new AstryxError(
|
|
395
|
-
`No component named "${name}"`,
|
|
396
|
-
suggestions,
|
|
397
|
-
ERROR_CODES.ERR_UNKNOWN_COMPONENT,
|
|
398
|
-
);
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
if (props) {
|
|
402
|
-
return fromBundledDocs({
|
|
403
|
-
type: 'component.detail.props',
|
|
404
|
-
data:
|
|
405
|
-
doc.props ||
|
|
406
|
-
(doc.components
|
|
407
|
-
? doc.components.flatMap((/** @type {any} */ c) => c.props || [])
|
|
408
|
-
: []),
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
return fromBundledDocs({type: 'component.detail', data: doc});
|
|
412
|
-
}
|
|
413
|
-
|
|
414
230
|
/**
|
|
415
231
|
* @param {string|string[]} [name]
|
|
416
232
|
* @param {object} [options]
|
|
@@ -422,8 +238,6 @@ async function componentFromBundledDocs(name, options) {
|
|
|
422
238
|
* @param {boolean} [options.source]
|
|
423
239
|
* @param {boolean} [options.showcase]
|
|
424
240
|
* @param {boolean} [options.blocks]
|
|
425
|
-
* @param {boolean} [options.html] - Deprecated alias for framework='html'.
|
|
426
|
-
* @param {'react'|'html'|'web-components'} [options.framework] - Output framework; defaults to react.
|
|
427
241
|
* @param {'full'|'compact'|'brief'} [options.detail] - Defaults to 'full' for a single component, 'brief' for list views (list/category/no name), matching the CLI.
|
|
428
242
|
* @param {string} [options.lang]
|
|
429
243
|
* @param {boolean} [options.zh]
|
|
@@ -436,10 +250,6 @@ async function componentFromBundledDocs(name, options) {
|
|
|
436
250
|
* | import('./component.type.mjs').ComponentDetailSourceResponse
|
|
437
251
|
* | import('./component.type.mjs').ComponentDetailShowcaseResponse
|
|
438
252
|
* | import('./component.type.mjs').ComponentDetailBlocksResponse
|
|
439
|
-
* | import('./html/html.type.mjs').ComponentHtmlListResponse
|
|
440
|
-
* | import('./html/html.type.mjs').ComponentHtmlResponse
|
|
441
|
-
* | import('./web-components/web-components.type.mjs').ComponentWebComponentsListResponse
|
|
442
|
-
* | import('./web-components/web-components.type.mjs').ComponentWebComponentsResponse
|
|
443
253
|
* )>}
|
|
444
254
|
*/
|
|
445
255
|
export async function component(name, options = {}) {
|
|
@@ -452,8 +262,6 @@ export async function component(name, options = {}) {
|
|
|
452
262
|
source = false,
|
|
453
263
|
showcase = false,
|
|
454
264
|
blocks = false,
|
|
455
|
-
html = false,
|
|
456
|
-
framework,
|
|
457
265
|
detail: detailOption,
|
|
458
266
|
lang = null,
|
|
459
267
|
zh = false,
|
|
@@ -463,72 +271,6 @@ export async function component(name, options = {}) {
|
|
|
463
271
|
const selectorList = Array.isArray(name) ? name : null;
|
|
464
272
|
const noName = selectorList == null && !name;
|
|
465
273
|
|
|
466
|
-
if (framework !== undefined && !FRAMEWORKS.includes(framework)) {
|
|
467
|
-
throw new AstryxError(
|
|
468
|
-
`Unknown framework "${String(framework)}". Valid frameworks: ${FRAMEWORKS.join(', ')}`,
|
|
469
|
-
undefined,
|
|
470
|
-
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
471
|
-
);
|
|
472
|
-
}
|
|
473
|
-
if (html && framework !== undefined) {
|
|
474
|
-
throw new AstryxError(
|
|
475
|
-
'--html cannot be combined with --framework; use --framework html instead',
|
|
476
|
-
undefined,
|
|
477
|
-
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
478
|
-
);
|
|
479
|
-
}
|
|
480
|
-
const selectedFramework = html ? 'html' : (framework ?? 'react');
|
|
481
|
-
|
|
482
|
-
if (selectedFramework !== 'react') {
|
|
483
|
-
const frameworkFlag = html ? '--html' : `--framework ${selectedFramework}`;
|
|
484
|
-
const incompatible = [
|
|
485
|
-
category != null ? '--category' : null,
|
|
486
|
-
packageScope ? '--package' : null,
|
|
487
|
-
props ? '--props' : null,
|
|
488
|
-
source ? '--source' : null,
|
|
489
|
-
showcase ? '--showcase' : null,
|
|
490
|
-
blocks ? '--blocks' : null,
|
|
491
|
-
].filter(Boolean);
|
|
492
|
-
if (incompatible.length > 0) {
|
|
493
|
-
throw new AstryxError(
|
|
494
|
-
`${frameworkFlag} cannot be combined with ${incompatible.join(', ')}`,
|
|
495
|
-
undefined,
|
|
496
|
-
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
497
|
-
);
|
|
498
|
-
}
|
|
499
|
-
if (selectorList) {
|
|
500
|
-
throw new AstryxError(
|
|
501
|
-
`${frameworkFlag} accepts exactly one component name, or --list with no name`,
|
|
502
|
-
undefined,
|
|
503
|
-
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
504
|
-
);
|
|
505
|
-
}
|
|
506
|
-
if (list && name) {
|
|
507
|
-
throw new AstryxError(
|
|
508
|
-
`--list ${frameworkFlag} cannot be combined with a component name`,
|
|
509
|
-
undefined,
|
|
510
|
-
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
511
|
-
);
|
|
512
|
-
}
|
|
513
|
-
if (!list && !name) {
|
|
514
|
-
throw new AstryxError(
|
|
515
|
-
`${frameworkFlag} requires a component name or --list`,
|
|
516
|
-
undefined,
|
|
517
|
-
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
518
|
-
);
|
|
519
|
-
}
|
|
520
|
-
const vanillaOptions = {cwd, list};
|
|
521
|
-
return selectedFramework === 'html'
|
|
522
|
-
? componentHtml(
|
|
523
|
-
typeof name === 'string' ? name : undefined,
|
|
524
|
-
vanillaOptions,
|
|
525
|
-
)
|
|
526
|
-
: componentWebComponents(
|
|
527
|
-
typeof name === 'string' ? name : undefined,
|
|
528
|
-
vanillaOptions,
|
|
529
|
-
);
|
|
530
|
-
}
|
|
531
|
-
|
|
532
274
|
// Default detail level mirrors the CLI (see commands/component/index.mjs):
|
|
533
275
|
// single-component views default to 'full', list-style views (--list,
|
|
534
276
|
// --category, or no name) default to 'brief' (scannable name lists).
|
|
@@ -563,6 +305,8 @@ export async function component(name, options = {}) {
|
|
|
563
305
|
);
|
|
564
306
|
}
|
|
565
307
|
|
|
308
|
+
const coreDir = requireCoreDir(cwd);
|
|
309
|
+
|
|
566
310
|
// A public API caller could pass a non-string category; the list leaf does
|
|
567
311
|
// `category.toLowerCase()`, so guard it up front (same class as the name
|
|
568
312
|
// guard below) instead of throwing a raw TypeError with no `.code`.
|
|
@@ -574,23 +318,6 @@ export async function component(name, options = {}) {
|
|
|
574
318
|
);
|
|
575
319
|
}
|
|
576
320
|
|
|
577
|
-
const coreDir = findOptionalCoreDir(cwd);
|
|
578
|
-
if (!coreDir) {
|
|
579
|
-
return componentFromBundledDocs(name, {
|
|
580
|
-
list,
|
|
581
|
-
category,
|
|
582
|
-
packageScope,
|
|
583
|
-
props,
|
|
584
|
-
source,
|
|
585
|
-
showcase,
|
|
586
|
-
blocks,
|
|
587
|
-
detail,
|
|
588
|
-
lang,
|
|
589
|
-
zh,
|
|
590
|
-
dense,
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
|
|
594
321
|
// ── Explicit batch selector list ─────────────────────────────────
|
|
595
322
|
// Array shape owns cardinality even if a caller also supplies a list-only
|
|
596
323
|
// option. The aggregate limit above is checked before core or integrations
|