@astryxdesign/cli 0.4.5 → 0.4.6-canary.cea9ecd
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 +26 -0
- package/api/component/_adapter.d.mts +22 -5
- package/api/component/_adapter.mjs +51 -3
- package/api/docs/_adapter.d.mts +37 -8
- package/api/docs/_adapter.mjs +70 -41
- package/api/docs/detail/detail.d.mts +2 -0
- package/api/docs/detail/detail.mjs +12 -10
- package/api/docs/detail/section/section.d.mts +2 -0
- package/api/docs/detail/section/section.mjs +1 -0
- package/api/docs/docs.d.mts +2 -0
- package/api/docs/docs.doc.mjs +11 -2
- package/api/docs/docs.mjs +2 -1
- package/api/docs/docs.type.d.mts +15 -0
- package/api/docs/docs.type.mjs +6 -0
- package/api/docs/integrationDocs.test.mjs +208 -0
- package/api/docs/list/list.d.mts +5 -1
- package/api/docs/list/list.mjs +30 -14
- package/api/init/run/run.mjs +9 -4
- package/api/integration/validate-integration.mjs +2 -1
- package/api/integration/validate-integration.type.d.mts +1 -0
- package/api/integration/validate-integration.type.mjs +1 -0
- package/api/search/search.mjs +26 -15
- package/api/upgrade/_adapter.d.mts +2 -2
- package/api/upgrade/_adapter.mjs +7 -3
- package/api/upgrade/run/run.mjs +1 -1
- package/assets/codemods/transforms/v0.1.0/__tests__/drop-xds-prefix-imports.test.mjs +245 -0
- package/assets/codemods/transforms/v0.1.0/drop-xds-prefix-imports.mjs +139 -13
- package/assets/docs/cli-integrations.doc.mjs +41 -3
- package/assets/docs/layout.doc.dense.mjs +275 -30
- package/assets/docs/layout.doc.mjs +412 -78
- package/assets/docs/theme.doc.mjs +3 -3
- package/assets/templates/blocks/components/AvatarGroup/AvatarGroupInteractive.doc.mjs +15 -0
- package/assets/templates/blocks/components/AvatarGroup/AvatarGroupInteractive.tsx +47 -0
- package/assets/templates/blocks/components/AvatarGroup/AvatarGroupShowcase.doc.mjs +1 -1
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.tsx +18 -5
- package/assets/templates/blocks/components/Selector/SelectorOptionDescriptions.doc.mjs +14 -0
- package/assets/templates/blocks/components/Selector/SelectorOptionDescriptions.tsx +76 -0
- package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +914 -0
- package/assets/templates/pages/dashboard-cohort-funnel/template.doc.mjs +12 -0
- package/assets/templates/pages/dashboard-data/page.tsx +894 -0
- package/assets/templates/pages/dashboard-data/template.doc.mjs +13 -0
- package/assets/templates/pages/dashboard-executive-summary/page.tsx +874 -0
- package/assets/templates/pages/dashboard-executive-summary/template.doc.mjs +13 -0
- package/assets/templates/pages/dashboard-project-status/page.tsx +1139 -0
- package/assets/templates/pages/dashboard-project-status/template.doc.mjs +13 -0
- package/assets/templates/pages/dashboard-service-monitoring/page.tsx +1590 -0
- package/assets/templates/pages/dashboard-service-monitoring/template.doc.mjs +12 -0
- package/authoring/doctypes/_schema.d.mts +2 -0
- package/authoring/doctypes/_schema.mjs +5 -0
- package/authoring/doctypes/reference/reference.doc.mjs +14 -0
- package/authoring/doctypes/reference/type.ts +12 -0
- package/authoring/doctypes/template/type.ts +2 -0
- package/authoring/integration/integration.doc.mjs +10 -1
- package/authoring/integration/parse.d.mts +1 -0
- package/authoring/integration/parse.mjs +1 -0
- package/authoring/integration/parse.test.mjs +1 -0
- package/authoring/integration/type.ts +5 -0
- package/clients/cli/commands/component-ownership.test.mjs +63 -3
- package/clients/cli/commands/theme-build.doc.mjs +1 -1
- package/foundation/agent-docs/agent-docs.d.mts +19 -3
- package/foundation/agent-docs/agent-docs.mjs +30 -11
- package/foundation/agent-docs/agent-docs.test.mjs +38 -0
- package/foundation/config/project.d.mts +16 -0
- package/foundation/config/project.mjs +65 -4
- package/foundation/config/project.test.mjs +66 -0
- package/foundation/discovery/docs-discovery.d.mts +185 -0
- package/foundation/discovery/docs-discovery.mjs +544 -0
- package/foundation/discovery/docs-discovery.test.mjs +341 -0
- package/foundation/integrations/integrations.d.mts +8 -6
- package/foundation/integrations/integrations.mjs +6 -4
- package/foundation/integrations/validate-contributions.mjs +30 -2
- package/package.json +9 -9
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
import {AvatarGroup, AvatarGroupOverflow} from '@astryxdesign/core/AvatarGroup';
|
|
5
|
+
import {Avatar} from '@astryxdesign/core/Avatar';
|
|
6
|
+
import {Stack} from '@astryxdesign/core/Layout';
|
|
7
|
+
import {Text} from '@astryxdesign/core/Text';
|
|
8
|
+
|
|
9
|
+
const MEMBERS = [
|
|
10
|
+
{name: 'Alex Daniels', key: 'alex', href: '/team/alex'},
|
|
11
|
+
{name: 'Ann Smith', key: 'ann', href: '/team/ann'},
|
|
12
|
+
{name: 'Carol Davis', key: 'carol', href: '/team/carol'},
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const TOTAL_MEMBERS = 18;
|
|
16
|
+
|
|
17
|
+
export default function AvatarGroupInteractive() {
|
|
18
|
+
return (
|
|
19
|
+
<Stack direction="vertical" gap={8}>
|
|
20
|
+
<Stack direction="vertical" gap={3}>
|
|
21
|
+
<Text type="supporting" color="secondary">
|
|
22
|
+
Reviewers
|
|
23
|
+
</Text>
|
|
24
|
+
<AvatarGroup size="lg" aria-label="Reviewers">
|
|
25
|
+
{MEMBERS.map(m => (
|
|
26
|
+
<Avatar key={m.key} name={m.name} href={m.href} />
|
|
27
|
+
))}
|
|
28
|
+
<AvatarGroupOverflow
|
|
29
|
+
count={TOTAL_MEMBERS - MEMBERS.length}
|
|
30
|
+
onClick={() => {}}
|
|
31
|
+
/>
|
|
32
|
+
</AvatarGroup>
|
|
33
|
+
</Stack>
|
|
34
|
+
<Stack direction="vertical" gap={3}>
|
|
35
|
+
<Text type="supporting" color="secondary">
|
|
36
|
+
Compact, static
|
|
37
|
+
</Text>
|
|
38
|
+
<AvatarGroup size="sm" aria-label="Attendees">
|
|
39
|
+
{MEMBERS.map(m => (
|
|
40
|
+
<Avatar key={m.key} name={m.name} />
|
|
41
|
+
))}
|
|
42
|
+
<AvatarGroupOverflow count={TOTAL_MEMBERS - MEMBERS.length} />
|
|
43
|
+
</AvatarGroup>
|
|
44
|
+
</Stack>
|
|
45
|
+
</Stack>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -6,7 +6,7 @@ export const doc = {
|
|
|
6
6
|
name: 'AvatarGroup',
|
|
7
7
|
displayName: 'Avatar Group',
|
|
8
8
|
description:
|
|
9
|
-
'Overlapping avatar rows with
|
|
9
|
+
'Overlapping avatar rows with a sliced visible set and a server-side overflow count. Shows team members in a compact facepile layout.',
|
|
10
10
|
isReady: true,
|
|
11
11
|
isShowcase: true,
|
|
12
12
|
aspectRatio: 16 / 9,
|
|
@@ -2,25 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
'use client';
|
|
4
4
|
|
|
5
|
+
import * as stylex from '@stylexjs/stylex';
|
|
5
6
|
import {Breadcrumbs, BreadcrumbItem} from '@astryxdesign/core/Breadcrumbs';
|
|
6
7
|
import {Stack} from '@astryxdesign/core/Layout';
|
|
7
8
|
import {Text} from '@astryxdesign/core/Text';
|
|
9
|
+
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
8
10
|
|
|
11
|
+
// Only a glyph the bidi algorithm does not already flip needs rtlStyles.mirror.
|
|
12
|
+
// U+203A has Unicode Bidi_Mirrored=Yes, so the browser mirrors it under RTL on
|
|
13
|
+
// its own and a second flip would point it back the wrong way; U+2192 has
|
|
14
|
+
// Bidi_Mirrored=No and stays pointing left-to-right unless we mirror it.
|
|
9
15
|
const SEPARATORS = [
|
|
10
|
-
{char: '›', label: 'Chevron'},
|
|
11
|
-
{char: '→', label: 'Arrow'},
|
|
12
|
-
{char: '·', label: 'Dot'},
|
|
16
|
+
{char: '›', label: 'Chevron', needsRtlMirror: false},
|
|
17
|
+
{char: '→', label: 'Arrow', needsRtlMirror: true},
|
|
18
|
+
{char: '·', label: 'Dot', needsRtlMirror: false},
|
|
13
19
|
];
|
|
14
20
|
|
|
15
21
|
export default function BreadcrumbsCustomSeparator() {
|
|
16
22
|
return (
|
|
17
23
|
<Stack direction="vertical" gap={4}>
|
|
18
|
-
{SEPARATORS.map(({char, label}) => (
|
|
24
|
+
{SEPARATORS.map(({char, label, needsRtlMirror}) => (
|
|
19
25
|
<Stack key={label} direction="vertical" gap={1}>
|
|
20
26
|
<Text type="supporting" color="secondary">
|
|
21
27
|
{label}
|
|
22
28
|
</Text>
|
|
23
|
-
<Breadcrumbs
|
|
29
|
+
<Breadcrumbs
|
|
30
|
+
separator={
|
|
31
|
+
needsRtlMirror ? (
|
|
32
|
+
<span {...stylex.props(rtlStyles.mirror)}>{char}</span>
|
|
33
|
+
) : (
|
|
34
|
+
char
|
|
35
|
+
)
|
|
36
|
+
}>
|
|
24
37
|
<BreadcrumbItem href="/">Home</BreadcrumbItem>
|
|
25
38
|
<BreadcrumbItem href="/docs">Docs</BreadcrumbItem>
|
|
26
39
|
<BreadcrumbItem isCurrent>API Reference</BreadcrumbItem>
|
|
@@ -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: 'Selector',
|
|
7
|
+
name: 'Selector — Option descriptions',
|
|
8
|
+
displayName: 'Selector — Option descriptions',
|
|
9
|
+
description:
|
|
10
|
+
'Options carry a description, so the dropdown draws a two-line row. The closed trigger is sized by padding, so it is the size token for a one-line value and exactly one line taller for a two-line one; both on the 4px rhythm. An InputGroup pins the row, so the value folds back onto one line there.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 16 / 9,
|
|
13
|
+
componentsUsed: ['Selector', 'SelectorOption', 'InputGroup', 'Button', 'Stack'],
|
|
14
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState} from 'react';
|
|
6
|
+
import {Selector, SelectorOption} from '@astryxdesign/core/Selector';
|
|
7
|
+
import {InputGroup} from '@astryxdesign/core/InputGroup';
|
|
8
|
+
import {Button} from '@astryxdesign/core/Button';
|
|
9
|
+
import {Stack} from '@astryxdesign/core/Layout';
|
|
10
|
+
import {LockClosedIcon, GlobeAltIcon} from '@heroicons/react/24/outline';
|
|
11
|
+
|
|
12
|
+
const VISIBILITY = [
|
|
13
|
+
{
|
|
14
|
+
value: 'private',
|
|
15
|
+
label: 'Private',
|
|
16
|
+
icon: LockClosedIcon,
|
|
17
|
+
description: 'Only members can access this space and its content.',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
value: 'public',
|
|
21
|
+
label: 'Public',
|
|
22
|
+
icon: GlobeAltIcon,
|
|
23
|
+
description: 'Anyone at the company can find and join this space.',
|
|
24
|
+
},
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
export default function SelectorOptionDescriptions() {
|
|
28
|
+
const [condensed, setCondensed] = useState<string | undefined>('private');
|
|
29
|
+
const [full, setFull] = useState<string | undefined>('private');
|
|
30
|
+
const [grouped, setGrouped] = useState<string | undefined>('private');
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Stack direction="vertical" gap={6}>
|
|
34
|
+
<Selector
|
|
35
|
+
style={{width: 320}}
|
|
36
|
+
label="Visibility"
|
|
37
|
+
description="Default trigger: one line at the size token."
|
|
38
|
+
options={VISIBILITY}
|
|
39
|
+
value={condensed}
|
|
40
|
+
onChange={setCondensed}
|
|
41
|
+
/>
|
|
42
|
+
<Selector
|
|
43
|
+
style={{width: 320}}
|
|
44
|
+
label="Visibility"
|
|
45
|
+
description="A stacked SelectorOption: the description gets its own line, and the trigger grows by exactly one line."
|
|
46
|
+
options={VISIBILITY}
|
|
47
|
+
value={full}
|
|
48
|
+
onChange={setFull}
|
|
49
|
+
renderValue={option => (
|
|
50
|
+
<SelectorOption
|
|
51
|
+
icon={option.icon}
|
|
52
|
+
label={option.label ?? option.value}
|
|
53
|
+
description={option.description}
|
|
54
|
+
/>
|
|
55
|
+
)}
|
|
56
|
+
/>
|
|
57
|
+
<InputGroup label="Visibility">
|
|
58
|
+
<Selector
|
|
59
|
+
label="Visibility"
|
|
60
|
+
isLabelHidden
|
|
61
|
+
options={VISIBILITY}
|
|
62
|
+
value={grouped}
|
|
63
|
+
onChange={setGrouped}
|
|
64
|
+
renderValue={option => (
|
|
65
|
+
<SelectorOption
|
|
66
|
+
icon={option.icon}
|
|
67
|
+
label={option.label ?? option.value}
|
|
68
|
+
description={option.description}
|
|
69
|
+
/>
|
|
70
|
+
)}
|
|
71
|
+
/>
|
|
72
|
+
<Button label="Save" />
|
|
73
|
+
</InputGroup>
|
|
74
|
+
</Stack>
|
|
75
|
+
);
|
|
76
|
+
}
|