astryx-dracula 0.5.0 → 0.6.2
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/BRAND.md +3 -3
- package/README.md +7 -4
- package/USAGE.md +49 -49
- package/astryx-dracula.d.ts +2 -2
- package/astryx-dracula.js +25 -9
- package/astryx-dracula.variants.d.ts +2 -2
- package/astryx.integration.mjs +1 -1
- package/icons.mjs +21 -17
- package/icons.tsx +69 -62
- package/package.json +125 -120
- package/shared/auth-chrome-config.ts +6 -6
- package/shared/auth-chrome.tsx +143 -144
- package/shared/auth-copy.ts +14 -14
- package/shared/chaptered-doc-config.ts +48 -51
- package/shared/chaptered-doc.tsx +267 -289
- package/shared/chart-hues.ts +25 -10
- package/shared/chart-labels.tsx +31 -30
- package/shared/chart-legend.tsx +55 -56
- package/shared/chart-panel-style.ts +3 -3
- package/shared/data-bar.tsx +97 -102
- package/shared/format-money.ts +1 -1
- package/shared/gallery-image.ts +6 -6
- package/shared/login-demo.ts +1 -1
- package/shared/metric-card.tsx +101 -105
- package/shared/metric-delta.tsx +28 -27
- package/shared/order-desk.tsx +205 -216
- package/shared/revenue-chart.tsx +145 -165
- package/shared/scene-castle.tsx +206 -291
- package/shared/scene-frame.tsx +33 -32
- package/shared/scene-hues.ts +17 -17
- package/shared/scene-tile.tsx +88 -92
- package/shared/settings-data.ts +119 -125
- package/shared/settings-rows.tsx +122 -159
- package/shared/sparkline.tsx +75 -88
- package/shared/sso-icons.tsx +10 -22
- package/shared/stars.tsx +16 -25
- package/templates/ai-chat-landing.template.mjs +5 -4
- package/templates/ai-chat-landing.tsx +473 -460
- package/templates/ai-chat.template.mjs +5 -4
- package/templates/ai-chat.tsx +543 -612
- package/templates/blank.template.mjs +5 -4
- package/templates/blank.tsx +18 -14
- package/templates/centered-hero.template.mjs +5 -4
- package/templates/centered-hero.tsx +55 -68
- package/templates/classic-gallery.template.mjs +5 -4
- package/templates/classic-gallery.tsx +97 -104
- package/templates/contact-form.template.mjs +5 -4
- package/templates/contact-form.tsx +247 -282
- package/templates/dashboard-portfolio.template.mjs +5 -4
- package/templates/dashboard-portfolio.tsx +717 -548
- package/templates/dashboard.template.mjs +5 -4
- package/templates/dashboard.tsx +596 -567
- package/templates/detail-page.template.mjs +5 -4
- package/templates/detail-page.tsx +546 -603
- package/templates/documentation-design.template.mjs +5 -4
- package/templates/documentation-design.tsx +231 -243
- package/templates/documentation-technical.template.mjs +5 -4
- package/templates/documentation-technical.tsx +236 -239
- package/templates/documentation.template.mjs +5 -4
- package/templates/documentation.tsx +267 -279
- package/templates/editor.template.mjs +5 -4
- package/templates/editor.tsx +844 -877
- package/templates/file-explorer.template.mjs +5 -4
- package/templates/file-explorer.tsx +566 -590
- package/templates/form-two-column.template.mjs +5 -4
- package/templates/form-two-column.tsx +195 -210
- package/templates/gallery-hero.template.mjs +5 -4
- package/templates/gallery-hero.tsx +93 -114
- package/templates/ide.template.mjs +5 -4
- package/templates/ide.tsx +407 -453
- package/templates/incident-console.template.mjs +5 -4
- package/templates/incident-console.tsx +593 -575
- package/templates/kanban-board.template.mjs +5 -4
- package/templates/kanban-board.tsx +665 -683
- package/templates/library.template.mjs +5 -4
- package/templates/library.tsx +409 -430
- package/templates/login-card.template.mjs +5 -4
- package/templates/login-card.tsx +63 -72
- package/templates/login-split.template.mjs +5 -4
- package/templates/login-split.tsx +192 -193
- package/templates/login-sso.template.mjs +5 -4
- package/templates/login-sso.tsx +257 -258
- package/templates/login.template.mjs +5 -4
- package/templates/login.tsx +53 -49
- package/templates/messaging-shell.template.mjs +5 -4
- package/templates/messaging-shell.tsx +556 -574
- package/templates/mixed-gallery.template.mjs +5 -4
- package/templates/mixed-gallery.tsx +60 -58
- package/templates/payment-form.template.mjs +5 -4
- package/templates/payment-form.tsx +882 -991
- package/templates/product-detail.template.mjs +5 -4
- package/templates/product-detail.tsx +261 -272
- package/templates/product-gallery.template.mjs +5 -4
- package/templates/product-gallery.tsx +126 -137
- package/templates/product-tour.template.mjs +5 -4
- package/templates/product-tour.tsx +741 -773
- package/templates/settings-dialog.template.mjs +5 -4
- package/templates/settings-dialog.tsx +688 -717
- package/templates/settings-sidebar.template.mjs +5 -4
- package/templates/settings-sidebar.tsx +762 -807
- package/templates/settings.template.mjs +5 -4
- package/templates/settings.tsx +289 -304
- package/templates/shell-nav.template.mjs +5 -4
- package/templates/shell-nav.tsx +212 -219
- package/templates/shell-side-nav.template.mjs +5 -4
- package/templates/shell-side-nav.tsx +135 -157
- package/templates/shell-top-nav.template.mjs +5 -4
- package/templates/shell-top-nav.tsx +182 -203
- package/templates/side-gallery.template.mjs +5 -4
- package/templates/side-gallery.tsx +85 -90
- package/templates/table-grouped.template.mjs +5 -4
- package/templates/table-grouped.tsx +1000 -1053
- package/templates/table-page-chart.template.mjs +5 -4
- package/templates/table-page-chart.tsx +400 -398
- package/templates/table-page-heatmap-status.template.mjs +5 -4
- package/templates/table-page-heatmap-status.tsx +483 -512
- package/templates/table-page-shoe-store-heatmap.template.mjs +5 -4
- package/templates/table-page-shoe-store-heatmap.tsx +748 -746
- package/templates/table-page.template.mjs +5 -4
- package/templates/table-page.tsx +396 -405
- package/templates/table.template.mjs +5 -4
- package/templates/table.tsx +92 -93
- package/templates/tech-report.template.mjs +5 -4
- package/templates/tech-report.tsx +1316 -1304
- package/templates/theme-showcase.template.mjs +5 -4
- package/templates/theme-showcase.tsx +871 -951
- package/theme.css +35 -77
- package/theme.css.d.ts +9 -0
- package/tokens.css +373 -380
|
@@ -1,175 +1,153 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
// XLE (canonical structure
|
|
3
|
-
//
|
|
2
|
+
// XLE (canonical structure of the tree below; the CLI had no XLE validator
|
|
3
|
+
// after `astryx layout` was removed in 0.7.0, so this is a reading aid and a
|
|
4
|
+
// human drift check — update it with the file, never alone):
|
|
5
|
+
// A[cp=0 @sideNav=(SN[collapsible header=SideNavHeading] > (SNS > SNI"New chat" + SNI"Search" + SNI"Library") + D + (SNS > SNI"Personal" > (SNI"Full-moon rite planning"! + SNI"Potion recipes for the week" + SNI"Grimoire recommendations")) + (SNS > SNI"Settings" + SNI"Sarah Chen"))] > L[h=fill] > (LC[p=6] > V[g=5] > (H > C.muted[p=0])*4) + (LF > TI"Message Night Owl…")
|
|
4
6
|
// Note: skeleton placeholders carry no Hd by design (skill skeleton-shell
|
|
5
7
|
// exemption) — routed pages supply the h1.
|
|
6
8
|
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {Divider} from
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} from
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {StatusDot} from '@astryxdesign/core/StatusDot';
|
|
20
|
-
import {Card} from '@astryxdesign/core/Card';
|
|
21
|
-
import {TextInput} from '@astryxdesign/core/TextInput';
|
|
22
|
-
import {VStack, HStack} from '@astryxdesign/core/Stack';
|
|
23
|
-
import {
|
|
24
|
-
Sparkles,
|
|
25
|
-
Plus,
|
|
26
|
-
Search,
|
|
27
|
-
BookOpen,
|
|
28
|
-
Settings,
|
|
29
|
-
CircleUserRound,
|
|
30
|
-
User,
|
|
31
|
-
} from 'lucide-react';
|
|
9
|
+
import { AppShell } from "@astryxdesign/core/AppShell";
|
|
10
|
+
import { Card } from "@astryxdesign/core/Card";
|
|
11
|
+
import { Divider } from "@astryxdesign/core/Divider";
|
|
12
|
+
import { Icon } from "@astryxdesign/core/Icon";
|
|
13
|
+
import { Layout, LayoutContent, LayoutFooter } from "@astryxdesign/core/Layout";
|
|
14
|
+
import { NavIcon } from "@astryxdesign/core/NavIcon";
|
|
15
|
+
import { SideNav, SideNavHeading, SideNavItem, SideNavSection } from "@astryxdesign/core/SideNav";
|
|
16
|
+
import { HStack, VStack } from "@astryxdesign/core/Stack";
|
|
17
|
+
import { StatusDot } from "@astryxdesign/core/StatusDot";
|
|
18
|
+
import { TextInput } from "@astryxdesign/core/TextInput";
|
|
19
|
+
import { BookOpen, CircleUserRound, Plus, Search, Settings, Sparkles, User } from "lucide-react";
|
|
20
|
+
import { useState } from "react";
|
|
32
21
|
|
|
33
22
|
const WORKSPACES = [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
23
|
+
{
|
|
24
|
+
name: "Personal",
|
|
25
|
+
icon: User,
|
|
26
|
+
chats: [
|
|
27
|
+
{
|
|
28
|
+
label: "Full-moon rite planning",
|
|
29
|
+
status: "success",
|
|
30
|
+
statusLabel: "Active",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "Potion recipes for the week",
|
|
34
|
+
status: "neutral",
|
|
35
|
+
statusLabel: "Idle",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: "Grimoire recommendations",
|
|
39
|
+
status: "warning",
|
|
40
|
+
statusLabel: "Needs review",
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
55
44
|
] as const;
|
|
56
45
|
|
|
57
|
-
const SELECTED_CHAT =
|
|
46
|
+
const SELECTED_CHAT = "Full-moon rite planning";
|
|
58
47
|
// Same-route hash: demo links stay focusable anchors without escaping the
|
|
59
48
|
// template through the hash router (bare "#" would drop back to the home page).
|
|
60
|
-
const SELF_HASH =
|
|
49
|
+
const SELF_HASH = "#/templates/shell-side-nav";
|
|
61
50
|
|
|
62
51
|
// `id` carries the React key: the bubbles are positional placeholders, and an
|
|
63
52
|
// index key would remount every row below an inserted one.
|
|
64
53
|
const MESSAGES = [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
54
|
+
{ id: "context", role: "assistant", width: "78%", height: 104 },
|
|
55
|
+
{ id: "follow-up", role: "user", width: "48%", height: 48 },
|
|
56
|
+
{ id: "answer", role: "assistant", width: "64%", height: 132 },
|
|
57
|
+
{ id: "reply", role: "user", width: "38%", height: 40 },
|
|
69
58
|
];
|
|
70
59
|
|
|
71
|
-
|
|
72
60
|
export default function ShellSideNav() {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
placeholder="Message Night Owl…"
|
|
166
|
-
value={draft}
|
|
167
|
-
onChange={setDraft}
|
|
168
|
-
width="100%"
|
|
169
|
-
/>
|
|
170
|
-
</LayoutFooter>
|
|
171
|
-
}
|
|
172
|
-
/>
|
|
173
|
-
</AppShell>
|
|
174
|
-
);
|
|
61
|
+
const [selectedChat, setSelectedChat] = useState(SELECTED_CHAT);
|
|
62
|
+
const [draft, setDraft] = useState("");
|
|
63
|
+
return (
|
|
64
|
+
<AppShell
|
|
65
|
+
contentPadding={0}
|
|
66
|
+
sideNav={
|
|
67
|
+
<SideNav
|
|
68
|
+
collapsible
|
|
69
|
+
resizable={{ defaultWidth: 300, minWidth: 220, maxWidth: 420 }}
|
|
70
|
+
header={
|
|
71
|
+
<SideNavHeading
|
|
72
|
+
heading="Night Owl"
|
|
73
|
+
icon={<NavIcon icon={<Icon icon={Sparkles} size="sm" />} />}
|
|
74
|
+
headingHref={SELF_HASH}
|
|
75
|
+
/>
|
|
76
|
+
}
|
|
77
|
+
footer={
|
|
78
|
+
<SideNavSection title="Account" isHeaderHidden>
|
|
79
|
+
<SideNavItem label="Settings" icon={Settings} href={SELF_HASH} />
|
|
80
|
+
<SideNavItem label="Sarah Chen" icon={CircleUserRound} href={SELF_HASH} />
|
|
81
|
+
</SideNavSection>
|
|
82
|
+
}
|
|
83
|
+
>
|
|
84
|
+
<SideNavSection title="Menu" isHeaderHidden>
|
|
85
|
+
<SideNavItem label="New chat" icon={Plus} href={SELF_HASH} />
|
|
86
|
+
<SideNavItem label="Search" icon={Search} href={SELF_HASH} />
|
|
87
|
+
<SideNavItem label="Library" icon={BookOpen} href={SELF_HASH} />
|
|
88
|
+
</SideNavSection>
|
|
89
|
+
<Divider />
|
|
90
|
+
<SideNavSection title="Workspaces" isHeaderHidden>
|
|
91
|
+
{WORKSPACES.map((workspace) => (
|
|
92
|
+
<SideNavItem
|
|
93
|
+
key={workspace.name}
|
|
94
|
+
label={workspace.name}
|
|
95
|
+
icon={workspace.icon}
|
|
96
|
+
collapsible={{ defaultIsCollapsed: false }}
|
|
97
|
+
>
|
|
98
|
+
{/* The nested rows are direct children, not wrapped in a
|
|
99
|
+
VStack: core 0.7.2 made nested SideNavItems span the
|
|
100
|
+
full width of the nav list with the indent inside the row,
|
|
101
|
+
and any non-SideNavItem content in between (a VStack is
|
|
102
|
+
exactly that) takes the children out of that flow. */}
|
|
103
|
+
{workspace.chats.map((chat) => (
|
|
104
|
+
// The hover-only MoreMenu was four dead actions unreachable
|
|
105
|
+
// by keyboard and touch, so it goes: the status dot stays
|
|
106
|
+
// always visible (its label doubles as the tooltip), and
|
|
107
|
+
// selecting a conversation switches selection.
|
|
108
|
+
<SideNavItem
|
|
109
|
+
key={chat.label}
|
|
110
|
+
label={chat.label}
|
|
111
|
+
href={SELF_HASH}
|
|
112
|
+
isSelected={chat.label === selectedChat}
|
|
113
|
+
onClick={() => setSelectedChat(chat.label)}
|
|
114
|
+
endContent={<StatusDot variant={chat.status} label={chat.statusLabel} />}
|
|
115
|
+
/>
|
|
116
|
+
))}
|
|
117
|
+
</SideNavItem>
|
|
118
|
+
))}
|
|
119
|
+
</SideNavSection>
|
|
120
|
+
</SideNav>
|
|
121
|
+
}
|
|
122
|
+
>
|
|
123
|
+
<Layout
|
|
124
|
+
height="fill"
|
|
125
|
+
contentWidth={768}
|
|
126
|
+
content={
|
|
127
|
+
<LayoutContent padding={6}>
|
|
128
|
+
{/* Skeleton chrome only — the routed conversation supplies the h1. */}
|
|
129
|
+
<VStack gap={5}>
|
|
130
|
+
{MESSAGES.map((message) => (
|
|
131
|
+
<HStack key={message.id} hAlign={message.role === "assistant" ? "start" : "end"}>
|
|
132
|
+
<Card variant="muted" padding={0} width={message.width} height={message.height} />
|
|
133
|
+
</HStack>
|
|
134
|
+
))}
|
|
135
|
+
</VStack>
|
|
136
|
+
</LayoutContent>
|
|
137
|
+
}
|
|
138
|
+
footer={
|
|
139
|
+
<LayoutFooter>
|
|
140
|
+
<TextInput
|
|
141
|
+
label="Message Night Owl"
|
|
142
|
+
isLabelHidden
|
|
143
|
+
placeholder="Message Night Owl…"
|
|
144
|
+
value={draft}
|
|
145
|
+
onChange={setDraft}
|
|
146
|
+
width="100%"
|
|
147
|
+
/>
|
|
148
|
+
</LayoutFooter>
|
|
149
|
+
}
|
|
150
|
+
/>
|
|
151
|
+
</AppShell>
|
|
152
|
+
);
|
|
175
153
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
type: "page",
|
|
3
|
+
name: "Storefront Shell",
|
|
4
|
+
description: "Mega-menu top nav with product grid",
|
|
5
|
+
keywords: ["shell", "top nav", "navigation", "app", "header", "layout"],
|
|
6
|
+
category: "tooling",
|
|
6
7
|
};
|