@astryxdesign/cli 0.1.4-canary.ff77e1c → 0.1.5-canary.3f81427
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 +43 -0
- package/package.json +9 -9
- package/templates/blocks/components/Collapsible/CollapsibleDividedAccordion.doc.mjs +1 -1
- package/templates/blocks/components/Collapsible/CollapsibleDividedAccordion.tsx +1 -1
- package/templates/blocks/components/Table/TableGroupedRowsTable.doc.mjs +14 -0
- package/templates/blocks/components/Table/TableGroupedRowsTable.tsx +66 -0
- package/templates/blocks/components/Table/TableRowIndexTable.doc.mjs +14 -0
- package/templates/blocks/components/Table/TableRowIndexTable.tsx +47 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @xds/cli
|
|
2
2
|
|
|
3
|
+
# 0.1.5
|
|
4
|
+
|
|
5
|
+
#### New Features
|
|
6
|
+
|
|
7
|
+
- Add a v0.1.5 upgrade codemod that renames `labelSpacing="default"` to `labelSpacing="hug"` on Switch. (#2889)
|
|
8
|
+
- New `incident-console` page template: an on-call incident response console demonstrating the frame-first tracker archetype — grouped dense incident rows (StatusDot severity, Token state), PowerSearch filtering, status segmented control, and a resizable inspector panel with metadata and timeline. Adds the `Tools - Incident Console` template category.
|
|
9
|
+
- New `messaging-shell` page template: Slack-style column frame (rail | sidebar | stream | thread panel) built on the Chat component family — dense rows, zero cards. Adds the `Shell - Messaging` template category.
|
|
10
|
+
|
|
11
|
+
#### Fixes
|
|
12
|
+
|
|
13
|
+
- Fill viewport height across CLI page templates so the background covers the full page (#3762)
|
|
14
|
+
- `astryx init --features agents` now supports `--agent hermes`. The preset injects the component index into an existing `.hermes.md`/`HERMES.md` (Hermes Agent's top-priority project-context files) and otherwise creates root `AGENTS.md`, which Hermes loads from the project root — unlike the `.claude/CLAUDE.md` default. Additive only: existing `claude`/`cursor`/`codex`/`all`/auto-detect behavior is unchanged. (#2187)
|
|
15
|
+
- cli: `astryx doctor` now detects `@astryxdesign/theme-*` packages in pnpm projects. pnpm installs packages as symlinks into `node_modules/.pnpm`, and the theme scan only accepted real directories, so every symlinked theme package was skipped and doctor warned that none were installed (#3530).
|
|
16
|
+
- Make `astryx theme build`'s color-scheme declaration mode-aware, so built themes with `light-dark()` tokens no longer defeat `<Theme mode="light|dark">` forcing (#3660)
|
|
17
|
+
- `runCodemods` now returns `writtenFiles`, so `astryx upgrade`'s post-codemod hooks (prettier/eslint formatting) actually run on core-codemod changes.
|
|
18
|
+
The runner built the `writtenFiles` list internally but omitted it from its return object, so `upgrade.mjs` read `codemodResult.writtenFiles ?? []` as always-empty and the configured `hooks.postCodemod` (e.g. `prettier --write`, `eslint --fix`) received no files and silently skipped. As a result, jscodeshift's default double-quote output (`"@astryxdesign/core/Button"`) was never reformatted to the project's style, failing `prettier-format` lint on migrated apps. The sibling `integration-runner` already returned `writtenFiles` correctly, so integration-codemod changes were formatted while core-codemod changes were not.
|
|
19
|
+
- `astryx swizzle`: swizzled components ship raw StyleX source that needs a build-time StyleX compiler, and without one they render unstyled with no error. The command now prints a StyleX build-setup note after copying (including the Next.js caveat that the StyleX Babel plugin disables SWC and breaks `next/font`, so an SWC-based transform is required), and `astryx docs styling` gains a "StyleX Build Setup" section covering per-bundler setup. (#3373)
|
|
20
|
+
- `astryx theme build`: custom component variants declared in a theme (e.g. `button['variant:accentOutline']`) now generate a type augmentation against the component's real interface (`ButtonVariantMap`) instead of a non-existent `XDS`-prefixed one, so `variant="accentOutline"` type-checks. Props with no augmentation point (closed unions like Button `size` or Heading `type`) are skipped instead of emitting dead augmentations, and the generated `.variants.d.ts` is now referenced from the theme's `.d.ts` so the augmentation actually loads. (#3371)
|
|
21
|
+
|
|
22
|
+
#### Documentation
|
|
23
|
+
|
|
24
|
+
- CodeBlock: terminal-style dark block template (syntaxTheme preset)
|
|
25
|
+
- Add cascade-layer safety guidance to the migration guide (`astryx docs migration`): a Cascade Layer Safety audit checklist (unlayered styles and later layers both beat `astryx-base` regardless of specificity, classify every stylesheet into a layer deliberately, layer Tailwind preflight on both v3 and v4) and a Foundation Smoke Test section (one page with Button/TextInput/Card/Table plus a non-zero-padding assertion) so a broken layer order fails before feature work instead of after N migrated screens. The getting-started guide now points to it from the theme CSS step.
|
|
26
|
+
- NavHeadingMenu: add a playground config and showcase block so the Overview tab has a working preview (#2698)
|
|
27
|
+
- NavHeadingMenu: constrain the showcase SideNav to a shorter height so the heading no longer appears to float at the top of the Overview preview (#2698)
|
|
28
|
+
|
|
29
|
+
#### Contributors
|
|
30
|
+
|
|
31
|
+
Thanks to everyone who contributed to this release:
|
|
32
|
+
|
|
33
|
+
- @arman-luthra
|
|
34
|
+
- @cixzhang
|
|
35
|
+
- @ejhammond
|
|
36
|
+
- @harjothkhara
|
|
37
|
+
- @is-jain
|
|
38
|
+
- @jiunshinn
|
|
39
|
+
- @josephfarina
|
|
40
|
+
- @let-sunny
|
|
41
|
+
- @thedjpetersen
|
|
42
|
+
- @zeroryu
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
3
46
|
# 0.1.4
|
|
4
47
|
|
|
5
48
|
#### Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5-canary.3f81427",
|
|
4
4
|
"displayName": "CLI",
|
|
5
5
|
"description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"zod": "^4.4.3"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
|
-
"@astryxdesign/charts": "0.1.
|
|
79
|
-
"@astryxdesign/core": "0.1.
|
|
80
|
-
"@astryxdesign/lab": "0.1.
|
|
81
|
-
"@astryxdesign/theme-neutral": "0.1.
|
|
78
|
+
"@astryxdesign/charts": "0.1.5-canary.3f81427",
|
|
79
|
+
"@astryxdesign/core": "0.1.5-canary.3f81427",
|
|
80
|
+
"@astryxdesign/lab": "0.1.5-canary.3f81427",
|
|
81
|
+
"@astryxdesign/theme-neutral": "0.1.5-canary.3f81427",
|
|
82
82
|
"gpt-tokenizer": "^3.4.0"
|
|
83
83
|
},
|
|
84
84
|
"peerDependenciesMeta": {
|
|
@@ -96,10 +96,10 @@
|
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
|
-
"@astryxdesign/charts": "0.1.
|
|
100
|
-
"@astryxdesign/core": "0.1.
|
|
101
|
-
"@astryxdesign/lab": "0.1.
|
|
102
|
-
"@astryxdesign/theme-neutral": "0.1.
|
|
99
|
+
"@astryxdesign/charts": "0.1.5-canary.3f81427",
|
|
100
|
+
"@astryxdesign/core": "0.1.5-canary.3f81427",
|
|
101
|
+
"@astryxdesign/lab": "0.1.5-canary.3f81427",
|
|
102
|
+
"@astryxdesign/theme-neutral": "0.1.5-canary.3f81427",
|
|
103
103
|
"gpt-tokenizer": "^3.4.0"
|
|
104
104
|
},
|
|
105
105
|
"scripts": {
|
|
@@ -6,7 +6,7 @@ export const doc = {
|
|
|
6
6
|
exampleFor: 'Collapsible',
|
|
7
7
|
name: 'Collapsible — Divided Accordion',
|
|
8
8
|
displayName: 'Collapsible — Divided Accordion',
|
|
9
|
-
description: 'FAQ-style accordion using the
|
|
9
|
+
description: 'FAQ-style accordion using the hasDividers prop on CollapsibleGroup: built-in row hairlines and density padding with zero custom CSS. Use for FAQs, settings lists, and nav sections.',
|
|
10
10
|
isReady: true,
|
|
11
11
|
aspectRatio: 4 / 3,
|
|
12
12
|
componentsUsed: ['Collapsible', 'CollapsibleGroup', 'Text'],
|
|
@@ -8,7 +8,7 @@ import {Text} from '@astryxdesign/core/Text';
|
|
|
8
8
|
export default function CollapsibleDividedAccordion() {
|
|
9
9
|
return (
|
|
10
10
|
<div style={{width: '100%', maxWidth: 400}}>
|
|
11
|
-
<CollapsibleGroup type="single"
|
|
11
|
+
<CollapsibleGroup type="single" hasDividers defaultValue="reset">
|
|
12
12
|
<Collapsible trigger="How do I reset my password?" value="reset">
|
|
13
13
|
<Text type="body">
|
|
14
14
|
Go to Settings → Security → Change Password. You'll receive a
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'useTableGroupedRows',
|
|
7
|
+
name: 'useTableGroupedRows — Collapsible Groups',
|
|
8
|
+
displayName: 'useTableGroupedRows — Collapsible Groups',
|
|
9
|
+
description:
|
|
10
|
+
'A table grouped into collapsible sections with useTableGroupedRows. Each group gets a full-width header with a chevron, label, and member count; click to collapse/expand.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 16 / 9,
|
|
13
|
+
componentsUsed: ['Table'],
|
|
14
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {useState, useCallback} from 'react';
|
|
6
|
+
import {
|
|
7
|
+
Table,
|
|
8
|
+
useTableGroupedRows,
|
|
9
|
+
proportional,
|
|
10
|
+
pixel,
|
|
11
|
+
} from '@astryxdesign/core/Table';
|
|
12
|
+
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
13
|
+
|
|
14
|
+
interface Person extends Record<string, unknown> {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
team: string;
|
|
18
|
+
role: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const people: Person[] = [
|
|
22
|
+
{id: '1', name: 'Ava Chen', team: 'Design Systems', role: 'Staff Eng'},
|
|
23
|
+
{id: '2', name: 'Liam Park', team: 'Design Systems', role: 'Engineer'},
|
|
24
|
+
{id: '3', name: 'Zoe Vega', team: 'Design Systems', role: 'Manager'},
|
|
25
|
+
{id: '4', name: 'Max Ross', team: 'Infra', role: 'Senior Eng'},
|
|
26
|
+
{id: '5', name: 'Mia Cole', team: 'Infra', role: 'Engineer'},
|
|
27
|
+
{id: '6', name: 'Leo Nash', team: 'Growth', role: 'PM'},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
const columns: TableColumn<Person>[] = [
|
|
31
|
+
{key: 'name', header: 'Name', width: proportional(2)},
|
|
32
|
+
{key: 'role', header: 'Role', width: pixel(140)},
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
export default function TableGroupedRowsTable() {
|
|
36
|
+
const [collapsedGroups, setCollapsed] = useState<Set<string>>(new Set());
|
|
37
|
+
const onToggleGroup = useCallback((key: string) => {
|
|
38
|
+
setCollapsed(prev => {
|
|
39
|
+
const next = new Set(prev);
|
|
40
|
+
if (next.has(key)) {
|
|
41
|
+
next.delete(key);
|
|
42
|
+
} else {
|
|
43
|
+
next.add(key);
|
|
44
|
+
}
|
|
45
|
+
return next;
|
|
46
|
+
});
|
|
47
|
+
}, []);
|
|
48
|
+
|
|
49
|
+
const grouped = useTableGroupedRows<Person>({
|
|
50
|
+
data: people,
|
|
51
|
+
groupBy: p => p.team,
|
|
52
|
+
collapsedGroups,
|
|
53
|
+
onToggleGroup,
|
|
54
|
+
getRowKey: p => p.id,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<Table
|
|
59
|
+
data={grouped.data}
|
|
60
|
+
columns={columns}
|
|
61
|
+
idKey={grouped.idKey}
|
|
62
|
+
hasHover
|
|
63
|
+
plugins={{grouped: grouped.plugin}}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('../../../../../core/src/docs-types').TemplateDoc} */
|
|
4
|
+
export const doc = {
|
|
5
|
+
type: 'block',
|
|
6
|
+
exampleFor: 'useTableRowIndex',
|
|
7
|
+
name: 'useTableRowIndex — Numbered Rows',
|
|
8
|
+
displayName: 'useTableRowIndex — Numbered Rows',
|
|
9
|
+
description:
|
|
10
|
+
'A table with a prepended row-number column via useTableRowIndex. Numbering is monospaced, right-aligned, and follows the rendered data order.',
|
|
11
|
+
isReady: true,
|
|
12
|
+
aspectRatio: 16 / 9,
|
|
13
|
+
componentsUsed: ['Table'],
|
|
14
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
'use client';
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
Table,
|
|
7
|
+
useTableRowIndex,
|
|
8
|
+
proportional,
|
|
9
|
+
pixel,
|
|
10
|
+
} from '@astryxdesign/core/Table';
|
|
11
|
+
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
12
|
+
|
|
13
|
+
interface Track extends Record<string, unknown> {
|
|
14
|
+
id: string;
|
|
15
|
+
title: string;
|
|
16
|
+
artist: string;
|
|
17
|
+
plays: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const tracks: Track[] = [
|
|
21
|
+
{id: 't1', title: 'Nightfall', artist: 'Ava Chen', plays: 1820},
|
|
22
|
+
{id: 't2', title: 'Ember', artist: 'Liam Park', plays: 942},
|
|
23
|
+
{id: 't3', title: 'Tidal', artist: 'Zoe Vega', plays: 3310},
|
|
24
|
+
{id: 't4', title: 'Cinder', artist: 'Max Ross', plays: 604},
|
|
25
|
+
{id: 't5', title: 'Halcyon', artist: 'Mia Cole', plays: 2075},
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
const columns: TableColumn<Track>[] = [
|
|
29
|
+
{key: 'title', header: 'Title', width: proportional(2)},
|
|
30
|
+
{key: 'artist', header: 'Artist', width: proportional(2)},
|
|
31
|
+
{key: 'plays', header: 'Plays', width: pixel(90), align: 'end'},
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
export default function TableRowIndexTable() {
|
|
35
|
+
// Pass the rendered data array — numbering follows its order.
|
|
36
|
+
const rowIndex = useTableRowIndex<Track>({data: tracks});
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Table
|
|
40
|
+
data={tracks}
|
|
41
|
+
columns={columns}
|
|
42
|
+
idKey="id"
|
|
43
|
+
hasHover
|
|
44
|
+
plugins={{rowIndex}}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
}
|