@astryxdesign/cli 0.1.2-canary.f330539 → 0.1.2-canary.f57fb72

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.
Files changed (20) hide show
  1. package/package.json +7 -7
  2. package/templates/blocks/components/DropdownMenu/DropdownMenuShowcase.tsx +1 -0
  3. package/templates/blocks/components/DropdownMenuItem/DropdownMenuItemShowcase.tsx +1 -0
  4. package/templates/blocks/components/Lightbox/LightboxShowcase.tsx +3 -4
  5. package/templates/blocks/components/MoreMenu/MoreMenuShowcase.tsx +1 -0
  6. package/templates/pages/shell-side-nav/page.tsx +1 -0
  7. package/templates/blocks/components/Blockquote/BlockquoteTestimonials.doc.mjs +0 -14
  8. package/templates/blocks/components/Blockquote/BlockquoteTestimonials.tsx +0 -34
  9. package/templates/blocks/components/Blockquote/BlockquoteWithCite.doc.mjs +0 -14
  10. package/templates/blocks/components/Blockquote/BlockquoteWithCite.tsx +0 -21
  11. package/templates/blocks/components/Hooks/useKeyboardHintHookUsage.doc.mjs +0 -14
  12. package/templates/blocks/components/Hooks/useKeyboardHintHookUsage.tsx +0 -57
  13. package/templates/blocks/components/Lightbox/LightboxGallery.doc.mjs +0 -14
  14. package/templates/blocks/components/Lightbox/LightboxGallery.tsx +0 -53
  15. package/templates/blocks/components/Lightbox/LightboxVideo.doc.mjs +0 -14
  16. package/templates/blocks/components/Lightbox/LightboxVideo.tsx +0 -27
  17. package/templates/blocks/components/Lightbox/LightboxZoom.doc.mjs +0 -14
  18. package/templates/blocks/components/Lightbox/LightboxZoom.tsx +0 -33
  19. package/templates/blocks/components/ToggleButtonGroup/ToggleButtonGroupVertical.doc.mjs +0 -14
  20. package/templates/blocks/components/ToggleButtonGroup/ToggleButtonGroupVertical.tsx +0 -47
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/cli",
3
- "version": "0.1.2-canary.f330539",
3
+ "version": "0.1.2-canary.f57fb72",
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,9 +75,9 @@
75
75
  "zod": "^4.4.3"
76
76
  },
77
77
  "peerDependencies": {
78
- "@astryxdesign/core": "0.1.2-canary.f330539",
79
- "@astryxdesign/lab": "0.1.2-canary.f330539",
80
- "@astryxdesign/theme-neutral": "0.1.2-canary.f330539",
78
+ "@astryxdesign/core": "0.1.2-canary.f57fb72",
79
+ "@astryxdesign/lab": "0.1.2-canary.f57fb72",
80
+ "@astryxdesign/theme-neutral": "0.1.2-canary.f57fb72",
81
81
  "gpt-tokenizer": "^2.0.0"
82
82
  },
83
83
  "peerDependenciesMeta": {
@@ -92,9 +92,9 @@
92
92
  }
93
93
  },
94
94
  "devDependencies": {
95
- "@astryxdesign/core": "0.1.2-canary.f330539",
96
- "@astryxdesign/lab": "0.1.2-canary.f330539",
97
- "@astryxdesign/theme-neutral": "0.1.2-canary.f330539",
95
+ "@astryxdesign/core": "0.1.2-canary.f57fb72",
96
+ "@astryxdesign/lab": "0.1.2-canary.f57fb72",
97
+ "@astryxdesign/theme-neutral": "0.1.2-canary.f57fb72",
98
98
  "gpt-tokenizer": "^2.0.0"
99
99
  },
100
100
  "scripts": {
@@ -12,6 +12,7 @@ export default function DropdownMenuShowcase() {
12
12
  <DropdownMenu
13
13
  isMenuOpen={isMenuOpen}
14
14
  onOpenChange={setIsMenuOpen}
15
+ hasAutoFocus={false}
15
16
  button={{label: 'Actions'}}
16
17
  items={[
17
18
  {label: 'Edit', onClick: () => {}},
@@ -68,6 +68,7 @@ export default function DropdownMenuItemShowcase() {
68
68
  <DropdownMenu
69
69
  button={{label: 'Actions'}}
70
70
  isMenuOpen
71
+ hasAutoFocus={false}
71
72
  onOpenChange={() => {}}>
72
73
  <DropdownMenuItem
73
74
  icon={PencilIcon}
@@ -12,10 +12,9 @@ export default function LightboxShowcase() {
12
12
  isOpen={isOpen}
13
13
  onOpenChange={setIsOpen}
14
14
  media={{
15
- src: 'https://lookaside.facebook.com/assets/astryx/light-scene-horizontal-1.png',
16
- alt: 'Coastal shoreline with ocean waves',
17
- caption:
18
- 'A scenic coastline with waves rolling onto a sandy beach beneath a clear sky.',
15
+ src: 'https://picsum.photos/id/10/1200/800',
16
+ alt: 'Forest path',
17
+ caption: 'A winding path through the forest',
19
18
  }}
20
19
  />
21
20
  </>
@@ -12,6 +12,7 @@ export default function MoreMenuShowcase() {
12
12
  <MoreMenu
13
13
  isMenuOpen={isMenuOpen}
14
14
  onOpenChange={setIsMenuOpen}
15
+ hasAutoFocus={false}
15
16
  items={[
16
17
  {label: 'Edit', onClick: () => {}},
17
18
  {label: 'Duplicate', onClick: () => {}},
@@ -142,6 +142,7 @@ function ConversationItem({
142
142
  <MoreMenu
143
143
  size="sm"
144
144
  label="Conversation options"
145
+ hasAutoFocus={false}
145
146
  onOpenChange={setIsMenuOpen}
146
147
  items={[
147
148
  {label: 'Pin', onClick: () => {}},
@@ -1,14 +0,0 @@
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: 'Blockquote',
7
- name: 'Blockquote — Testimonials',
8
- displayName: 'Blockquote — Testimonials',
9
- description:
10
- 'Multiple quotes arranged in a card grid for a testimonials section. Combine with Card and Grid to create social-proof layouts.',
11
- isReady: true,
12
- aspectRatio: 4 / 3,
13
- componentsUsed: ['Blockquote', 'Card', 'Grid', 'GridSpan'],
14
- };
@@ -1,34 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {Blockquote} from '@astryxdesign/core/Blockquote';
6
- import {Grid, GridSpan} from '@astryxdesign/core/Grid';
7
- import {Card} from '@astryxdesign/core/Card';
8
-
9
- export default function BlockquoteTestimonials() {
10
- return (
11
- <Grid columns={2} gap={3} style={{maxWidth: 600}}>
12
- <Card padding={4}>
13
- <Blockquote cite="Sarah K., Lead Engineer">
14
- Shipping UI has never been this fast. Our team went from design to
15
- production in a single afternoon.
16
- </Blockquote>
17
- </Card>
18
- <Card padding={4}>
19
- <Blockquote cite="Marcus T., Product Designer">
20
- The token system means every new screen just looks right — no manual
21
- color or spacing decisions.
22
- </Blockquote>
23
- </Card>
24
- <GridSpan columns={2}>
25
- <Card padding={4}>
26
- <Blockquote cite="Priya L., Engineering Manager">
27
- Onboarding a new engineer used to take a week of design review. Now
28
- they're shipping accessible, polished components on day one.
29
- </Blockquote>
30
- </Card>
31
- </GridSpan>
32
- </Grid>
33
- );
34
- }
@@ -1,14 +0,0 @@
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: 'Blockquote',
7
- name: 'Blockquote — With Attribution',
8
- displayName: 'Blockquote — With Attribution',
9
- description:
10
- 'A plain quote and a quote with a cite attribution. Use cite to credit the original author or source.',
11
- isReady: true,
12
- aspectRatio: 4 / 3,
13
- componentsUsed: ['Blockquote', 'Layout'],
14
- };
@@ -1,21 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {Blockquote} from '@astryxdesign/core/Blockquote';
6
- import {VStack} from '@astryxdesign/core/Layout';
7
-
8
- export default function BlockquoteWithCite() {
9
- return (
10
- <VStack gap={4} style={{maxWidth: 500}}>
11
- <Blockquote>
12
- Design is not just what it looks like and feels like. Design is how it
13
- works.
14
- </Blockquote>
15
- <Blockquote cite="Steve Jobs">
16
- The people who are crazy enough to think they can change the world are
17
- the ones who do.
18
- </Blockquote>
19
- </VStack>
20
- );
21
- }
@@ -1,14 +0,0 @@
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: 'useKeyboardHint',
7
- name: 'useKeyboardHint — Arrow-key Hint',
8
- displayName: 'useKeyboardHint — Arrow-key Hint',
9
- description:
10
- 'Toolbar shows an ephemeral "← → to navigate" hint on first keyboard focus via useKeyboardHint, teaching sighted keyboard users that arrows move within the group.',
11
- isReady: true,
12
- aspectRatio: 16 / 9,
13
- componentsUsed: ['Toolbar', 'Button', 'Icon', 'Card', 'Section', 'Text', 'Layout'],
14
- };
@@ -1,57 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {Toolbar} from '@astryxdesign/core/Toolbar';
6
- import {Button} from '@astryxdesign/core/Button';
7
- import {Icon} from '@astryxdesign/core/Icon';
8
- import {Card} from '@astryxdesign/core/Card';
9
- import {Section} from '@astryxdesign/core/Section';
10
- import {Text} from '@astryxdesign/core/Text';
11
- import {VStack} from '@astryxdesign/core/Layout';
12
- import {BoldIcon, ItalicIcon, UnderlineIcon} from '@heroicons/react/24/outline';
13
-
14
- export default function UseKeyboardHintHookUsage() {
15
- return (
16
- <Card style={{width: 420}}>
17
- <Toolbar
18
- label="Text formatting"
19
- dividers={['bottom']}
20
- startContent={
21
- <>
22
- <Button
23
- label="Bold"
24
- variant="ghost"
25
- icon={<Icon icon={BoldIcon} />}
26
- isIconOnly
27
- />
28
- <Button
29
- label="Italic"
30
- variant="ghost"
31
- icon={<Icon icon={ItalicIcon} />}
32
- isIconOnly
33
- />
34
- <Button
35
- label="Underline"
36
- variant="ghost"
37
- icon={<Icon icon={UnderlineIcon} />}
38
- isIconOnly
39
- />
40
- </>
41
- }
42
- />
43
- <Section>
44
- <VStack gap={1}>
45
- <Text type="body" weight="bold">
46
- Keyboard-friendly by default
47
- </Text>
48
- <Text type="supporting" color="secondary">
49
- Tab into the toolbar with your keyboard and Toolbar shows an
50
- ephemeral "← → to navigate" hint — powered by useKeyboardHint — so
51
- sighted keyboard users learn that arrows move within the group.
52
- </Text>
53
- </VStack>
54
- </Section>
55
- </Card>
56
- );
57
- }
@@ -1,14 +0,0 @@
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: 'Lightbox',
7
- name: 'Lightbox — Gallery',
8
- displayName: 'Lightbox — Gallery',
9
- description:
10
- 'A thumbnail grid that opens a fullscreen gallery. Clicking any thumbnail opens the lightbox at that index. Prev/next navigation lets users browse all images without closing.',
11
- isReady: true,
12
- aspectRatio: 4 / 3,
13
- componentsUsed: ['Lightbox', 'Grid', 'Thumbnail'],
14
- };
@@ -1,53 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {useLightbox} from '@astryxdesign/core/Lightbox';
6
- import {Grid} from '@astryxdesign/core/Grid';
7
- import {Thumbnail} from '@astryxdesign/core/Thumbnail';
8
-
9
- const PHOTOS = [
10
- {
11
- src: 'https://lookaside.facebook.com/assets/astryx/Neutral-Backpack.png',
12
- alt: 'Backpack',
13
- caption: 'A backpack displayed on a neutral background.',
14
- },
15
- {
16
- src: 'https://lookaside.facebook.com/assets/astryx/building.png',
17
- alt: 'Modern building',
18
- caption: 'A modern building with a contemporary architectural design.',
19
- },
20
- {
21
- src: 'https://lookaside.facebook.com/assets/astryx/light-scene-horizontal-1.png',
22
- alt: 'Coastal shoreline with ocean waves',
23
- caption:
24
- 'A scenic coastline with waves rolling onto a sandy beach beneath a clear sky.',
25
- },
26
- {
27
- src: 'https://lookaside.facebook.com/assets/astryx/illustrative-vertical-1.png',
28
- alt: 'Illustrated lakeside landscape at sunset',
29
- caption:
30
- 'A stylized landscape illustration featuring pink clouds reflected over a calm lake at sunset.',
31
- },
32
- ];
33
-
34
- export default function LightboxGallery() {
35
- const lightbox = useLightbox({media: PHOTOS});
36
-
37
- return (
38
- <>
39
- <Grid columns={2} gap={2} style={{width: 136}}>
40
- {PHOTOS.map((photo, i) => (
41
- <Thumbnail
42
- key={photo.src}
43
- src={photo.src}
44
- alt={photo.alt}
45
- label={photo.alt}
46
- onClick={() => lightbox.open(i)}
47
- />
48
- ))}
49
- </Grid>
50
- {lightbox.element}
51
- </>
52
- );
53
- }
@@ -1,14 +0,0 @@
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: 'Lightbox',
7
- name: 'Lightbox — Video',
8
- displayName: 'Lightbox — Video',
9
- description:
10
- 'Opens a video in the lightbox. Native browser controls are available. Zoom and pan are disabled for video items.',
11
- isReady: true,
12
- aspectRatio: 4 / 3,
13
- componentsUsed: ['Lightbox'],
14
- };
@@ -1,27 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {useState} from 'react';
6
- import {Lightbox} from '@astryxdesign/core/Lightbox';
7
- import {Button} from '@astryxdesign/core/Button';
8
-
9
- export default function LightboxVideo() {
10
- const [isOpen, setIsOpen] = useState(false);
11
-
12
- return (
13
- <>
14
- <Button label="Play video" onClick={() => setIsOpen(true)} />
15
- <Lightbox
16
- isOpen={isOpen}
17
- onOpenChange={setIsOpen}
18
- media={{
19
- src: 'https://lookaside.facebook.com/assets/?set=astryx&name=Nature-1&density=1',
20
- alt: 'Flower blooming in time-lapse',
21
- type: 'video',
22
- caption: 'A flower blooming in time-lapse',
23
- }}
24
- />
25
- </>
26
- );
27
- }
@@ -1,14 +0,0 @@
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: 'Lightbox',
7
- name: 'Lightbox — Zoom',
8
- displayName: 'Lightbox — Zoom',
9
- description:
10
- 'A lightbox with zoom and pan enabled. Double-click the image to zoom in; drag to pan around. Double-click again or use the close button to exit.',
11
- isReady: true,
12
- aspectRatio: 4 / 3,
13
- componentsUsed: ['Lightbox', 'Thumbnail'],
14
- };
@@ -1,33 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {useState} from 'react';
6
- import {Lightbox} from '@astryxdesign/core/Lightbox';
7
- import {Thumbnail} from '@astryxdesign/core/Thumbnail';
8
-
9
- export default function LightboxZoom() {
10
- const [isOpen, setIsOpen] = useState(false);
11
-
12
- return (
13
- <>
14
- <Thumbnail
15
- src="https://lookaside.facebook.com/assets/astryx/light-scene-horizontal-1.png"
16
- alt="Coastal shoreline with ocean waves"
17
- label="Coastal shoreline with ocean waves"
18
- onClick={() => setIsOpen(true)}
19
- />
20
- <Lightbox
21
- isOpen={isOpen}
22
- onOpenChange={setIsOpen}
23
- media={{
24
- src: 'https://lookaside.facebook.com/assets/astryx/light-scene-horizontal-1.png',
25
- alt: 'Coastal shoreline with ocean waves',
26
- caption:
27
- 'A scenic coastline. Double-click to zoom in and drag to pan.',
28
- }}
29
- hasZoom
30
- />
31
- </>
32
- );
33
- }
@@ -1,14 +0,0 @@
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: 'ToggleButtonGroup',
7
- name: 'ToggleButtonGroup — Vertical',
8
- displayName: 'ToggleButtonGroup — Vertical',
9
- description:
10
- 'A vertically stacked ToggleButtonGroup using the vertical orientation, shown with both single-select and multi-select behavior — ideal for sidebar-style option lists and vertical toolbars.',
11
- isReady: true,
12
- aspectRatio: 3 / 4,
13
- componentsUsed: ['ToggleButton', 'ToggleButtonGroup', 'Layout', 'Text'],
14
- };
@@ -1,47 +0,0 @@
1
- // Copyright (c) Meta Platforms, Inc. and affiliates.
2
-
3
- 'use client';
4
-
5
- import {useState} from 'react';
6
- import {ToggleButton, ToggleButtonGroup} from '@astryxdesign/core/ToggleButton';
7
- import {VStack} from '@astryxdesign/core/Layout';
8
- import {Text} from '@astryxdesign/core/Text';
9
-
10
- export default function ToggleButtonGroupVertical() {
11
- const [view, setView] = useState<string | null>('grid');
12
- const [filters, setFilters] = useState<string[]>(['active']);
13
-
14
- return (
15
- <VStack gap={4}>
16
- <VStack gap={1}>
17
- <Text type="label" color="secondary">
18
- Single select
19
- </Text>
20
- <ToggleButtonGroup
21
- orientation="vertical"
22
- value={view}
23
- onChange={setView}
24
- label="View mode">
25
- <ToggleButton value="list" label="List" />
26
- <ToggleButton value="grid" label="Grid" />
27
- <ToggleButton value="board" label="Board" />
28
- </ToggleButtonGroup>
29
- </VStack>
30
- <VStack gap={1}>
31
- <Text type="label" color="secondary">
32
- Multi select
33
- </Text>
34
- <ToggleButtonGroup
35
- orientation="vertical"
36
- type="multiple"
37
- value={filters}
38
- onChange={setFilters}
39
- label="Status filters">
40
- <ToggleButton value="active" label="Active" />
41
- <ToggleButton value="pending" label="Pending" />
42
- <ToggleButton value="closed" label="Closed" />
43
- </ToggleButtonGroup>
44
- </VStack>
45
- </VStack>
46
- );
47
- }