@astryxdesign/cli 0.1.2-canary.3f6481f → 0.1.2-canary.48b01af
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.1.2-canary.
|
|
3
|
+
"version": "0.1.2-canary.48b01af",
|
|
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",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"zod": "^4.4.3"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
|
-
"@astryxdesign/core": "0.1.2-canary.
|
|
67
|
-
"@astryxdesign/lab": "0.1.2-canary.
|
|
68
|
-
"@astryxdesign/theme-neutral": "0.1.2-canary.
|
|
66
|
+
"@astryxdesign/core": "0.1.2-canary.48b01af",
|
|
67
|
+
"@astryxdesign/lab": "0.1.2-canary.48b01af",
|
|
68
|
+
"@astryxdesign/theme-neutral": "0.1.2-canary.48b01af",
|
|
69
69
|
"gpt-tokenizer": "^2.0.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependenciesMeta": {
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@astryxdesign/core": "0.1.2-canary.
|
|
84
|
-
"@astryxdesign/lab": "0.1.2-canary.
|
|
85
|
-
"@astryxdesign/theme-neutral": "0.1.2-canary.
|
|
83
|
+
"@astryxdesign/core": "0.1.2-canary.48b01af",
|
|
84
|
+
"@astryxdesign/lab": "0.1.2-canary.48b01af",
|
|
85
|
+
"@astryxdesign/theme-neutral": "0.1.2-canary.48b01af",
|
|
86
86
|
"gpt-tokenizer": "^2.0.0"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
|
|
3
|
-
'use client';
|
|
4
|
-
|
|
5
|
-
import * as stylex from '@stylexjs/stylex';
|
|
6
|
-
import {AppShell} from '@astryxdesign/core/AppShell';
|
|
7
|
-
import {
|
|
8
|
-
TopNav,
|
|
9
|
-
TopNavHeading,
|
|
10
|
-
TopNavItem,
|
|
11
|
-
TopNavMegaMenu,
|
|
12
|
-
TopNavMegaMenuItem,
|
|
13
|
-
TopNavMegaMenuFeaturedCard,
|
|
14
|
-
} from '@astryxdesign/core/TopNav';
|
|
15
|
-
import {NavIcon} from '@astryxdesign/core/NavIcon';
|
|
16
|
-
import {Icon} from '@astryxdesign/core/Icon';
|
|
17
|
-
import type {IconType} from '@astryxdesign/core/Icon';
|
|
18
|
-
import {IconButton} from '@astryxdesign/core/IconButton';
|
|
19
|
-
import {Button} from '@astryxdesign/core/Button';
|
|
20
|
-
import {Badge} from '@astryxdesign/core/Badge';
|
|
21
|
-
import {Card} from '@astryxdesign/core/Card';
|
|
22
|
-
import {Grid} from '@astryxdesign/core/Grid';
|
|
23
|
-
import {Stack, VStack} from '@astryxdesign/core/Stack';
|
|
24
|
-
import {
|
|
25
|
-
ShoppingBagIcon,
|
|
26
|
-
ShoppingCartIcon,
|
|
27
|
-
MagnifyingGlassIcon,
|
|
28
|
-
SparklesIcon,
|
|
29
|
-
SwatchIcon,
|
|
30
|
-
TagIcon,
|
|
31
|
-
HomeModernIcon,
|
|
32
|
-
FaceSmileIcon,
|
|
33
|
-
ReceiptPercentIcon,
|
|
34
|
-
GiftIcon,
|
|
35
|
-
CloudIcon,
|
|
36
|
-
BoltIcon,
|
|
37
|
-
SunIcon,
|
|
38
|
-
StarIcon,
|
|
39
|
-
FireIcon,
|
|
40
|
-
GlobeAltIcon,
|
|
41
|
-
MoonIcon,
|
|
42
|
-
} from '@heroicons/react/24/outline';
|
|
43
|
-
|
|
44
|
-
const styles = stylex.create({
|
|
45
|
-
// Cap + center the page body so wide screens show whitespace gutters.
|
|
46
|
-
contentMax: {maxWidth: 1100, marginInline: 'auto'},
|
|
47
|
-
// Lock both mega-menu panels to an identical size. Without this, Shop and
|
|
48
|
-
// Brands size to their own content (different widths); since both anchor to
|
|
49
|
-
// the centered nav, switching between them resizes the panel — which reads
|
|
50
|
-
// as flashing/jumping. Fixed item + featured widths make the panels
|
|
51
|
-
// pixel-identical so the transition is seamless.
|
|
52
|
-
megaItems: {gridColumn: '1 / -1', width: 520},
|
|
53
|
-
megaFeatured: {width: 240},
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
type MegaItem = {name: string; tagline: string; icon: IconType};
|
|
57
|
-
|
|
58
|
-
// Shop and Brands each render 8 items — the mega menu's built-in 2-column grid
|
|
59
|
-
// lays them out as 2 columns × 4 rows, alongside a featured card.
|
|
60
|
-
const SHOP_ITEMS: MegaItem[] = [
|
|
61
|
-
{name: 'New Arrivals', tagline: 'The latest drops', icon: SparklesIcon},
|
|
62
|
-
{name: 'Womenswear', tagline: 'Dresses, knitwear & more', icon: SwatchIcon},
|
|
63
|
-
{name: 'Menswear', tagline: 'Shirts, tailoring & more', icon: TagIcon},
|
|
64
|
-
{name: 'Home', tagline: 'Bedding, lighting & décor', icon: HomeModernIcon},
|
|
65
|
-
{
|
|
66
|
-
name: 'Beauty',
|
|
67
|
-
tagline: 'Skincare, fragrance & makeup',
|
|
68
|
-
icon: FaceSmileIcon,
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: 'Accessories',
|
|
72
|
-
tagline: 'Bags, hats & sunglasses',
|
|
73
|
-
icon: ShoppingBagIcon,
|
|
74
|
-
},
|
|
75
|
-
{name: 'Sale', tagline: 'Up to 50% off', icon: ReceiptPercentIcon},
|
|
76
|
-
{name: 'Gift Cards', tagline: 'The perfect present', icon: GiftIcon},
|
|
77
|
-
];
|
|
78
|
-
|
|
79
|
-
const BRAND_ITEMS: MegaItem[] = [
|
|
80
|
-
{name: 'Aether', tagline: 'Performance essentials', icon: SparklesIcon},
|
|
81
|
-
{name: 'Northwind', tagline: 'Outdoor & technical', icon: CloudIcon},
|
|
82
|
-
{name: 'Loomwell', tagline: 'Everyday knitwear', icon: BoltIcon},
|
|
83
|
-
{name: 'Verdant', tagline: 'Sustainable basics', icon: SunIcon},
|
|
84
|
-
{name: 'Studio Mara', tagline: 'Modern tailoring', icon: StarIcon},
|
|
85
|
-
{name: 'Atelier Kos', tagline: 'Limited ateliers', icon: FireIcon},
|
|
86
|
-
{name: 'Rue & Co', tagline: 'City streetwear', icon: GlobeAltIcon},
|
|
87
|
-
{name: 'Halden', tagline: 'Minimal staples', icon: MoonIcon},
|
|
88
|
-
];
|
|
89
|
-
|
|
90
|
-
const CATEGORY_TILES = [
|
|
91
|
-
'New Arrivals',
|
|
92
|
-
'Womenswear',
|
|
93
|
-
'Menswear',
|
|
94
|
-
'Home & Living',
|
|
95
|
-
'Beauty',
|
|
96
|
-
'Accessories',
|
|
97
|
-
];
|
|
98
|
-
|
|
99
|
-
// Wraps the 8 items in a fixed-width 2-column grid so every mega menu's item
|
|
100
|
-
// area is exactly the same width regardless of its content.
|
|
101
|
-
function MegaItems({items}: {items: MegaItem[]}) {
|
|
102
|
-
return (
|
|
103
|
-
<Stack xstyle={styles.megaItems}>
|
|
104
|
-
<Grid columns={2} gap={2}>
|
|
105
|
-
{items.map(item => (
|
|
106
|
-
<TopNavMegaMenuItem
|
|
107
|
-
key={item.name}
|
|
108
|
-
title={item.name}
|
|
109
|
-
description={item.tagline}
|
|
110
|
-
icon={<Icon icon={item.icon} size="md" color="secondary" />}
|
|
111
|
-
href="#"
|
|
112
|
-
/>
|
|
113
|
-
))}
|
|
114
|
-
</Grid>
|
|
115
|
-
</Stack>
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// Pins the featured card to a fixed width so both panels match exactly.
|
|
120
|
-
function MegaFeatured(props: {
|
|
121
|
-
title: string;
|
|
122
|
-
description: string;
|
|
123
|
-
image: string;
|
|
124
|
-
imageAlt: string;
|
|
125
|
-
linkLabel: string;
|
|
126
|
-
linkHref: string;
|
|
127
|
-
}) {
|
|
128
|
-
return (
|
|
129
|
-
<Stack xstyle={styles.megaFeatured}>
|
|
130
|
-
<TopNavMegaMenuFeaturedCard {...props} />
|
|
131
|
-
</Stack>
|
|
132
|
-
);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export default function ShellTopNav() {
|
|
136
|
-
return (
|
|
137
|
-
<AppShell
|
|
138
|
-
variant="surface"
|
|
139
|
-
contentPadding={6}
|
|
140
|
-
topNav={
|
|
141
|
-
<TopNav
|
|
142
|
-
label="Lumen storefront navigation"
|
|
143
|
-
heading={
|
|
144
|
-
<TopNavHeading
|
|
145
|
-
heading="Lumen"
|
|
146
|
-
logo={
|
|
147
|
-
<NavIcon icon={<Icon icon={ShoppingBagIcon} size="sm" />} />
|
|
148
|
-
}
|
|
149
|
-
href="#"
|
|
150
|
-
/>
|
|
151
|
-
}
|
|
152
|
-
centerContent={
|
|
153
|
-
<>
|
|
154
|
-
<TopNavMegaMenu
|
|
155
|
-
label="Shop"
|
|
156
|
-
items={<MegaItems items={SHOP_ITEMS} />}
|
|
157
|
-
featured={
|
|
158
|
-
<MegaFeatured
|
|
159
|
-
title="The Autumn Edit"
|
|
160
|
-
description="Layering staples in warm, earthy tones."
|
|
161
|
-
image="https://lookaside.facebook.com/assets/astryx/texture-beige-horizontal-1.png"
|
|
162
|
-
imageAlt="Autumn collection lookbook"
|
|
163
|
-
linkLabel="Shop the edit"
|
|
164
|
-
linkHref="#autumn-edit"
|
|
165
|
-
/>
|
|
166
|
-
}
|
|
167
|
-
/>
|
|
168
|
-
<TopNavMegaMenu
|
|
169
|
-
label="Brands"
|
|
170
|
-
items={<MegaItems items={BRAND_ITEMS} />}
|
|
171
|
-
featured={
|
|
172
|
-
<MegaFeatured
|
|
173
|
-
title="Meet Studio Mara"
|
|
174
|
-
description="Modern tailoring, made to last."
|
|
175
|
-
image="https://lookaside.facebook.com/assets/astryx/texture-beige-horizontal-2.png"
|
|
176
|
-
imageAlt="Studio Mara lookbook"
|
|
177
|
-
linkLabel="Discover the label"
|
|
178
|
-
linkHref="#studio-mara"
|
|
179
|
-
/>
|
|
180
|
-
}
|
|
181
|
-
/>
|
|
182
|
-
<TopNavItem label="Sale" href="#" />
|
|
183
|
-
<TopNavItem label="Service" href="#" />
|
|
184
|
-
</>
|
|
185
|
-
}
|
|
186
|
-
endContent={
|
|
187
|
-
<>
|
|
188
|
-
<IconButton
|
|
189
|
-
label="Search products"
|
|
190
|
-
tooltip="Search"
|
|
191
|
-
variant="ghost"
|
|
192
|
-
icon={<Icon icon={MagnifyingGlassIcon} size="sm" />}
|
|
193
|
-
/>
|
|
194
|
-
<Button label="Sign in" variant="ghost" />
|
|
195
|
-
<Button
|
|
196
|
-
label="Checkout"
|
|
197
|
-
variant="primary"
|
|
198
|
-
icon={<Icon icon={ShoppingCartIcon} size="sm" />}
|
|
199
|
-
endContent={<Badge label={3} />}
|
|
200
|
-
/>
|
|
201
|
-
</>
|
|
202
|
-
}
|
|
203
|
-
/>
|
|
204
|
-
}>
|
|
205
|
-
<VStack gap={10} xstyle={styles.contentMax}>
|
|
206
|
-
<Card variant="muted" padding={0} width="100%" height={360} />
|
|
207
|
-
|
|
208
|
-
{[0, 1, 2].map(section => (
|
|
209
|
-
<VStack key={section} gap={4}>
|
|
210
|
-
<Card variant="muted" padding={0} width={200} height={24} />
|
|
211
|
-
<Grid minChildWidth={160} gap={4}>
|
|
212
|
-
{CATEGORY_TILES.map(tile => (
|
|
213
|
-
<VStack key={tile} gap={2}>
|
|
214
|
-
<Card variant="muted" padding={0} width="100%" height={120} />
|
|
215
|
-
<Card variant="muted" padding={0} width="60%" height={14} />
|
|
216
|
-
</VStack>
|
|
217
|
-
))}
|
|
218
|
-
</Grid>
|
|
219
|
-
</VStack>
|
|
220
|
-
))}
|
|
221
|
-
</VStack>
|
|
222
|
-
</AppShell>
|
|
223
|
-
);
|
|
224
|
-
}
|
|
@@ -1,12 +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: 'page',
|
|
6
|
-
name: 'Top Nav',
|
|
7
|
-
displayName: 'Top Nav',
|
|
8
|
-
description:
|
|
9
|
-
'A top-nav app shell with a centered TopNav — Shop and Brands mega menus (a 2x4 item grid plus a featured card each), Sale/Service links, and a Checkout button — over static grey-card hero and category sections.',
|
|
10
|
-
isReady: true,
|
|
11
|
-
category: 'Shell - Top Nav',
|
|
12
|
-
};
|