@astryxdesign/cli 0.3.0-canary.e6af10a → 0.3.0-canary.e9fc2bb
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/assets/docs/browser-support.doc.mjs +6 -6
- package/assets/docs/icons.doc.mjs +3 -3
- package/assets/docs/illustrations.doc.mjs +2 -2
- package/assets/docs/internationalization.doc.mjs +1 -1
- package/assets/docs/migration.doc.mjs +1 -1
- package/assets/docs/principles.doc.mjs +1 -1
- package/assets/docs/styling-libraries.doc.mjs +1 -1
- package/assets/docs/styling.doc.mjs +4 -4
- package/assets/docs/theme.doc.mjs +3 -3
- package/assets/docs/typography.doc.mjs +2 -2
- package/package.json +9 -9
|
@@ -15,7 +15,7 @@ export const docs = {
|
|
|
15
15
|
content: [
|
|
16
16
|
{
|
|
17
17
|
type: 'prose',
|
|
18
|
-
text: 'Astryx is built on modern web platform features: the Popover API, CSS anchor positioning, and CSS `light-dark()`. These let components stay small, accessible, and dependency-free, but they also set a floor on which browsers render everything correctly.',
|
|
18
|
+
text: 'Astryx is built on modern web platform features: the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API, CSS anchor positioning, and CSS `light-dark()`. These let components stay small, accessible, and dependency-free, but they also set a floor on which browsers render everything correctly.',
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
type: 'prose',
|
|
@@ -73,7 +73,7 @@ export const docs = {
|
|
|
73
73
|
'Baseline 2026: the tightest requirement.',
|
|
74
74
|
],
|
|
75
75
|
[
|
|
76
|
-
'Popover API',
|
|
76
|
+
'[`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API',
|
|
77
77
|
'Opens, stacks, and light-dismisses layered surfaces via the top layer.',
|
|
78
78
|
'Baseline 2025.',
|
|
79
79
|
],
|
|
@@ -86,7 +86,7 @@ export const docs = {
|
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
type: 'prose',
|
|
89
|
-
text: 'The gap that matters is between Tier 1 and Tier 2: the Popover API and `light-dark()` reached wide availability well before anchor positioning. So in Tier 2 browsers, layered surfaces open and dismiss correctly; they just are not positioned. This is the one feature most consumers will need to reason about.',
|
|
89
|
+
text: 'The gap that matters is between Tier 1 and Tier 2: the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API and `light-dark()` reached wide availability well before anchor positioning. So in Tier 2 browsers, layered surfaces open and dismiss correctly; they just are not positioned. This is the one feature most consumers will need to reason about.',
|
|
90
90
|
},
|
|
91
91
|
],
|
|
92
92
|
},
|
|
@@ -112,7 +112,7 @@ export const docs = {
|
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
type: 'prose',
|
|
115
|
-
text: 'If your product does not use any of these, it has no anchor-positioning requirement at all; it needs only `light-dark()` (Tier 2 and up) for correct theme colors.
|
|
115
|
+
text: 'If your product does not use any of these, it has no anchor-positioning requirement at all; it needs only `light-dark()` (Tier 2 and up) for correct theme colors. Page layout, typography, forms, buttons, cards, tables, and navigation all work down to Tier 2 with no special handling.',
|
|
116
116
|
},
|
|
117
117
|
],
|
|
118
118
|
},
|
|
@@ -123,7 +123,7 @@ export const docs = {
|
|
|
123
123
|
type: 'list',
|
|
124
124
|
style: 'do',
|
|
125
125
|
items: [
|
|
126
|
-
'Components never throw on missing platform APIs. Where a browser lacks the Popover API, layers fall back to plain visibility instead of crashing.',
|
|
126
|
+
'Components never throw on missing platform APIs. Where a browser lacks the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API, layers fall back to plain visibility instead of crashing.',
|
|
127
127
|
'Tier 1 and Tier 2 are officially supported and tested.',
|
|
128
128
|
'Non-layered components render correctly down to Tier 2.',
|
|
129
129
|
],
|
|
@@ -192,7 +192,7 @@ const hasLightDark = CSS.supports('color', 'light-dark(#000, #fff)');`,
|
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
type: 'prose',
|
|
195
|
-
text: 'This is not an arbitrary window: Baseline − 2 is close to where anchor positioning stops being available while the Popover API and `light-dark()` still are, so the tier boundary tracks a real capability edge, not a guessed date. The version floors above are reviewed and advanced roughly once a year as new Baseline years land. Always feature-detect rather than hardcoding version numbers, so your app adapts automatically as the platform moves.',
|
|
195
|
+
text: 'This is not an arbitrary window: Baseline − 2 is close to where anchor positioning stops being available while the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API and `light-dark()` still are, so the tier boundary tracks a real capability edge, not a guessed date. The version floors above are reviewed and advanced roughly once a year as new Baseline years land. Always feature-detect rather than hardcoding version numbers, so your app adapts automatically as the platform moves.',
|
|
196
196
|
},
|
|
197
197
|
],
|
|
198
198
|
},
|
|
@@ -114,9 +114,9 @@ export const brandTheme = defineTheme({
|
|
|
114
114
|
type: 'list',
|
|
115
115
|
style: 'ordered',
|
|
116
116
|
items: [
|
|
117
|
-
'Add the name to IconName type in packages/core/src/Icon/globalIconRegistry.tsx',
|
|
118
|
-
'Add the default SVG to packages/core/src/Icon/defaultIcons.tsx',
|
|
119
|
-
'Add a row to the Available Names table in packages/cli/docs/icons.doc.mjs',
|
|
117
|
+
'Add the name to IconName type in `packages/core/src/Icon/globalIconRegistry.tsx`',
|
|
118
|
+
'Add the default SVG to `packages/core/src/Icon/defaultIcons.tsx`',
|
|
119
|
+
'Add a row to the Available Names table in `packages/cli/assets/docs/icons.doc.mjs`',
|
|
120
120
|
],
|
|
121
121
|
},
|
|
122
122
|
],
|
|
@@ -40,7 +40,7 @@ export const docs = {
|
|
|
40
40
|
'Keep illustrations consistent in style across the product.',
|
|
41
41
|
'Use simple, flat illustrations that work in both light and dark mode.',
|
|
42
42
|
'Size illustrations proportionally to the container, typically 120\u2013240px.',
|
|
43
|
-
'
|
|
43
|
+
'Place illustrations centered with supporting text below.',
|
|
44
44
|
],
|
|
45
45
|
},
|
|
46
46
|
{
|
|
@@ -59,7 +59,7 @@ export const docs = {
|
|
|
59
59
|
content: [
|
|
60
60
|
{
|
|
61
61
|
type: 'prose',
|
|
62
|
-
text: '
|
|
62
|
+
text: 'Place illustrations inside Center with supporting text stacked below. Typical illustration sizes range from 120px for inline empty states to 240px for full-page onboarding screens. Always pair the illustration with a heading and optional body text to explain what the user should do next.',
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
type: 'code',
|
|
@@ -300,7 +300,7 @@ export default function App() {
|
|
|
300
300
|
content: [
|
|
301
301
|
{
|
|
302
302
|
type: 'prose',
|
|
303
|
-
text: 'Astryx generates a `pseudo` locale that wraps every string in `⟦…⟧` and replaces letters with accented look-alikes.
|
|
303
|
+
text: 'Astryx generates a `pseudo` locale that wraps every string in `⟦…⟧` and replaces letters with accented look-alikes. Turn it on in development to catch hardcoded astryx strings and layout issues caused by longer text.',
|
|
304
304
|
},
|
|
305
305
|
{
|
|
306
306
|
type: 'code',
|
|
@@ -350,7 +350,7 @@ if (getComputedStyle(button).paddingInline === '0px') {
|
|
|
350
350
|
'Run the app in light and dark mode and check that surfaces, borders, text, icons, hover states, focus rings, and status colors flow together.',
|
|
351
351
|
'Open the command palette from the shell, type into it, select items by keyboard, and confirm focus returns to the trigger.',
|
|
352
352
|
'Check the SideNav at collapsed, expanded, active, hover, nested, and mobile states.',
|
|
353
|
-
'Verify settings popovers and dialogs in jsdom and in a real browser because native dialog and Popover APIs may need test shims.',
|
|
353
|
+
'Verify settings popovers and dialogs in jsdom and in a real browser because the native dialog and [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) APIs may need test shims.',
|
|
354
354
|
'Search for leftover hardcoded Tailwind colors, arbitrary hex values, and one-off hover colors after each route migration.',
|
|
355
355
|
'Run component tests, build, and at least one browser screenshot pass for each migrated route.',
|
|
356
356
|
],
|
|
@@ -39,7 +39,7 @@ export const docs = {
|
|
|
39
39
|
style: 'ordered',
|
|
40
40
|
items: [
|
|
41
41
|
'Use components for everything they cover',
|
|
42
|
-
'
|
|
42
|
+
'Page layout is frame-first: pick the shell and budget regions before writing content (see \`astryx docs layout\`)',
|
|
43
43
|
'Dense data renders as rows (Table, List/Item), edge-to-edge with dividers; Card is for widgets, galleries, and settings groups',
|
|
44
44
|
'StyleX or Tailwind for custom styling; both are first-class (see \`astryx docs styling\`)',
|
|
45
45
|
'Semantic tokens, not hardcoded values (see \`astryx docs tokens\`)',
|
|
@@ -56,7 +56,7 @@ export const docs = {
|
|
|
56
56
|
'`@astryxdesign/core/tailwind-theme.css`',
|
|
57
57
|
],
|
|
58
58
|
[
|
|
59
|
-
'
|
|
59
|
+
'Design token resolver APIs',
|
|
60
60
|
'JavaScript needs token values for charts, canvas, SVG, or config objects',
|
|
61
61
|
"`resolveThemeToken(theme, '--color-data-categorical-blue', {mode})`",
|
|
62
62
|
],
|
|
@@ -22,10 +22,10 @@ export const docs = {
|
|
|
22
22
|
type: 'table',
|
|
23
23
|
headers: ['Approach', 'Use for', 'Example'],
|
|
24
24
|
rows: [
|
|
25
|
-
['StyleX', 'Component-specific overrides, reusable styles, pseudo-classes, and typed tokens', 'const styles = stylex.create(...); <Button xstyle={styles.save}
|
|
26
|
-
['Tailwind utilities', '
|
|
27
|
-
['className', 'Integrating with external CSS or Tailwind on components', 'className="my-card shadow-lg"'],
|
|
28
|
-
['Styling-library token aliases', 'Keeping Panda, Chakra, MUI, Emotion, styled-components, UnoCSS, CSS Modules, or Sass in sync with the system', "colors.surface = 'var(--color-background-surface)'"],
|
|
25
|
+
['StyleX', 'Component-specific overrides, reusable styles, pseudo-classes, and typed tokens', '`const styles = stylex.create(...); <Button xstyle={styles.save} />`'],
|
|
26
|
+
['Tailwind utilities', 'Page layout, wrappers, and utility styling', '`className="flex gap-3 p-4"`'],
|
|
27
|
+
['className', 'Integrating with external CSS or Tailwind on components', '`className="my-card shadow-lg"`'],
|
|
28
|
+
['Styling-library token aliases', 'Keeping Panda, Chakra, MUI, Emotion, styled-components, UnoCSS, CSS Modules, or Sass in sync with the system', "`colors.surface = 'var(--color-background-surface)'`"],
|
|
29
29
|
],
|
|
30
30
|
},
|
|
31
31
|
{
|
|
@@ -106,7 +106,7 @@ function App() {
|
|
|
106
106
|
[
|
|
107
107
|
'Y2K',
|
|
108
108
|
"import {y2kTheme} from '@astryxdesign/theme-y2k'",
|
|
109
|
-
'Playful Y2K pop; periwinkle body, holographic accents, Poppins + Crimson Text
|
|
109
|
+
'Playful Y2K pop; periwinkle body, holographic accents, Poppins + `Crimson Text`.',
|
|
110
110
|
],
|
|
111
111
|
],
|
|
112
112
|
},
|
|
@@ -510,7 +510,7 @@ import './themes/ocean.css';
|
|
|
510
510
|
content: [
|
|
511
511
|
{
|
|
512
512
|
type: 'prose',
|
|
513
|
-
text: 'Wrap different sections in separate
|
|
513
|
+
text: 'Wrap different sections in separate [`<Theme>`](/components/Theme) providers.',
|
|
514
514
|
},
|
|
515
515
|
{
|
|
516
516
|
type: 'code',
|
|
@@ -606,7 +606,7 @@ function ChartConfig() {
|
|
|
606
606
|
},
|
|
607
607
|
{
|
|
608
608
|
type: 'prose',
|
|
609
|
-
text: 'Prefer CSS variables, StyleX token imports, xstyle, or className for ordinary styling. To change the theme or mode, manage state at the app level and pass it to
|
|
609
|
+
text: 'Prefer CSS variables, StyleX token imports, xstyle, or className for ordinary styling. To change the theme or mode, manage state at the app level and pass it to `<Theme>`.',
|
|
610
610
|
},
|
|
611
611
|
{
|
|
612
612
|
type: 'prose',
|
|
@@ -122,7 +122,7 @@ export const docs = {
|
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
124
|
type: 'prose',
|
|
125
|
-
text: 'Display text often needs heading semantics for accessibility. Use the type prop on Heading to apply display styling while preserving the correct HTML element:
|
|
125
|
+
text: 'Display text often needs heading semantics for accessibility. Use the type prop on Heading to apply display styling while preserving the correct HTML element: `<Heading level={1} type="display-1">` gives you display-1 styling with an `<h1>` tag, so screen readers see the correct document outline.',
|
|
126
126
|
},
|
|
127
127
|
],
|
|
128
128
|
},
|
|
@@ -205,7 +205,7 @@ const denseTheme = defineTheme({
|
|
|
205
205
|
items: [
|
|
206
206
|
'Use Heading for document headings and Text for everything else; they apply the full type scale automatically.',
|
|
207
207
|
'Adjust typography holistically: change base and ratio in defineTheme to shift the entire ramp (e.g. { base: 16, ratio: 1.25 } for editorial, { base: 12, ratio: 1.125 } for dense UI).',
|
|
208
|
-
'Use display types with as="h1" (or h2/h3) when display text is a page heading; this preserves accessibility while giving you display-level sizing. Or better, use
|
|
208
|
+
'Use display types with as="h1" (or h2/h3) when display text is a page heading; this preserves accessibility while giving you display-level sizing. Or better, use `<Heading level={1} type="display-1">` which handles both semantics and styling.',
|
|
209
209
|
'Let line-height snap to the 4px grid via the type scale; expandTypeScale computes leading automatically from base and ratio.',
|
|
210
210
|
'Use the supporting type for secondary information: timestamps, helper text, metadata, captions.',
|
|
211
211
|
'Use accessibilityLevel on Heading when the visual hierarchy doesn\u0027t match the document outline (e.g. sidebar or card headings).',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.3.0-canary.
|
|
3
|
+
"version": "0.3.0-canary.e9fc2bb",
|
|
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",
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
"zod": "^4.4.3"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@astryxdesign/charts": "0.3.0-canary.
|
|
88
|
-
"@astryxdesign/core": "0.3.0-canary.
|
|
89
|
-
"@astryxdesign/lab": "0.3.0-canary.
|
|
90
|
-
"@astryxdesign/theme-neutral": "0.3.0-canary.
|
|
87
|
+
"@astryxdesign/charts": "0.3.0-canary.e9fc2bb",
|
|
88
|
+
"@astryxdesign/core": "0.3.0-canary.e9fc2bb",
|
|
89
|
+
"@astryxdesign/lab": "0.3.0-canary.e9fc2bb",
|
|
90
|
+
"@astryxdesign/theme-neutral": "0.3.0-canary.e9fc2bb",
|
|
91
91
|
"gpt-tokenizer": "^3.4.0"
|
|
92
92
|
},
|
|
93
93
|
"peerDependenciesMeta": {
|
|
@@ -105,10 +105,10 @@
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@astryxdesign/charts": "0.3.0-canary.
|
|
109
|
-
"@astryxdesign/core": "0.3.0-canary.
|
|
110
|
-
"@astryxdesign/lab": "0.3.0-canary.
|
|
111
|
-
"@astryxdesign/theme-neutral": "0.3.0-canary.
|
|
108
|
+
"@astryxdesign/charts": "0.3.0-canary.e9fc2bb",
|
|
109
|
+
"@astryxdesign/core": "0.3.0-canary.e9fc2bb",
|
|
110
|
+
"@astryxdesign/lab": "0.3.0-canary.e9fc2bb",
|
|
111
|
+
"@astryxdesign/theme-neutral": "0.3.0-canary.e9fc2bb",
|
|
112
112
|
"gpt-tokenizer": "^3.4.0"
|
|
113
113
|
},
|
|
114
114
|
"scripts": {
|