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
package/shared/auth-copy.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
// Auth copy shared by the four login templates. Single-sourced so the family
|
|
2
2
|
// line cannot drift again. SSO-specific strings (Work email, Whisper your
|
|
3
3
|
// details, Continue with SSO, provider names) stay per-template in login-sso.
|
|
4
|
-
export const AUTH_HEADING =
|
|
5
|
-
export const AUTH_SUBTITLE =
|
|
6
|
-
export const AUTH_PRIMARY_CTA =
|
|
7
|
-
export const AUTH_SIGNUP_PROMPT =
|
|
8
|
-
export const AUTH_SIGNUP_LINK =
|
|
9
|
-
export const AUTH_SSO_DIVIDER =
|
|
10
|
-
export const AUTH_FORGOT_PASSWORD =
|
|
4
|
+
export const AUTH_HEADING = "Welcome back to the night";
|
|
5
|
+
export const AUTH_SUBTITLE = "Sign in to your crypt";
|
|
6
|
+
export const AUTH_PRIMARY_CTA = "Sign in";
|
|
7
|
+
export const AUTH_SIGNUP_PROMPT = "New to the castle?";
|
|
8
|
+
export const AUTH_SIGNUP_LINK = "Sign up";
|
|
9
|
+
export const AUTH_SSO_DIVIDER = "Or continue with";
|
|
10
|
+
export const AUTH_FORGOT_PASSWORD = "Forgot password?";
|
|
11
11
|
// Names the problem without apologising, and does not blame one field: a
|
|
12
12
|
// mistyped email used to be reported as a wrong password, because this string
|
|
13
13
|
// was attached to the password input only.
|
|
14
|
-
export const AUTH_ERROR_MESSAGE =
|
|
15
|
-
export const AUTH_EMAIL_PLACEHOLDER =
|
|
14
|
+
export const AUTH_ERROR_MESSAGE = "Email or password is wrong. Try again.";
|
|
15
|
+
export const AUTH_EMAIL_PLACEHOLDER = "you@castle.dracula";
|
|
16
16
|
// The placeholder is the only visible name on the credential inputs, so it has
|
|
17
17
|
// to actually name the field. "Whisper your password" named nothing.
|
|
18
|
-
export const AUTH_PASSWORD_PLACEHOLDER =
|
|
19
|
-
export const AUTH_BRAND_NAME =
|
|
20
|
-
export const AUTH_TERMS_PREFIX =
|
|
21
|
-
export const AUTH_TERMS_SERVICE =
|
|
22
|
-
export const AUTH_TERMS_PRIVACY =
|
|
18
|
+
export const AUTH_PASSWORD_PLACEHOLDER = "Your password";
|
|
19
|
+
export const AUTH_BRAND_NAME = "Castle Dracula";
|
|
20
|
+
export const AUTH_TERMS_PREFIX = "By clicking continue, you agree to our";
|
|
21
|
+
export const AUTH_TERMS_SERVICE = "Terms of service";
|
|
22
|
+
export const AUTH_TERMS_PRIVACY = "Privacy policy";
|
|
@@ -9,84 +9,81 @@
|
|
|
9
9
|
// documentation-technical, product-tour, tech-report) share lives here; the
|
|
10
10
|
// outline-building and scroll helpers that only chaptered-doc itself calls stay
|
|
11
11
|
// unexported in that file.
|
|
12
|
-
|
|
13
|
-
import type {IconType} from
|
|
14
|
-
import type {OutlineItem} from
|
|
12
|
+
|
|
13
|
+
import type { IconType } from "@astryxdesign/core/Icon";
|
|
14
|
+
import type { OutlineItem } from "@astryxdesign/core/Outline";
|
|
15
|
+
import type { CSSProperties } from "react";
|
|
15
16
|
|
|
16
17
|
// ─── Types ───────────────────────────────────────────────────────────────────
|
|
17
18
|
|
|
18
19
|
export interface DocSection {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
// Unique within the chapter; the DOM id is derived from it so the outline
|
|
21
|
+
// links and the headings can never drift apart.
|
|
22
|
+
key: string;
|
|
23
|
+
heading: string;
|
|
24
|
+
body: string;
|
|
25
|
+
bullets?: string[];
|
|
26
|
+
code?: { language: string; title: string; source: string };
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export interface DocChapter {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
id: string;
|
|
31
|
+
title: string;
|
|
32
|
+
icon: IconType;
|
|
33
|
+
intro: string;
|
|
34
|
+
hasArt?: boolean;
|
|
35
|
+
sections: DocSection[];
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
export type ChapterGroup = {title: string; chapters: DocChapter[]};
|
|
38
|
+
export type ChapterGroup = { title: string; chapters: DocChapter[] };
|
|
38
39
|
|
|
39
|
-
export const sectionId = (chapterId: string, key: string) =>
|
|
40
|
-
`${chapterId}--${key}`;
|
|
40
|
+
export const sectionId = (chapterId: string, key: string) => `${chapterId}--${key}`;
|
|
41
41
|
|
|
42
42
|
// Astryx has no image primitive: AspectRatio exposes no objectFit or radius
|
|
43
43
|
// props, so the scene fill and the corner clip live in these two styles.
|
|
44
44
|
export const sceneFill: CSSProperties = {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
width: "100%",
|
|
46
|
+
height: "100%",
|
|
47
|
+
display: "block",
|
|
48
48
|
};
|
|
49
49
|
export const sceneClip: CSSProperties = {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
borderRadius: "var(--radius-container)",
|
|
51
|
+
overflow: "clip",
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
// The outline is sticky so it tracks the chapter as the document scrolls.
|
|
55
55
|
export const outlinePanel: CSSProperties = {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
position: "sticky",
|
|
57
|
+
top: "var(--spacing-6)",
|
|
58
|
+
alignSelf: "start",
|
|
59
|
+
// No paddingBlockStart. This object is applied via `style=` to the outline
|
|
60
|
+
// LayoutPanels (chaptered-doc.tsx:316, documentation-design.tsx:592,
|
|
61
|
+
// documentation-technical.tsx:82), and an inline style prop BEATS the stylex
|
|
62
|
+
// class -- so this 8px silently overrode the panel's own 16px block padding
|
|
63
|
+
// at the top edge only, leaving every "On this page" rail in the kit
|
|
64
|
+
// asymmetric by 8px. The panel already owns its block padding.
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
// Derived once per page so the Outline receives a stable array identity
|
|
68
68
|
// and does not re-register its scroll spy on every render.
|
|
69
|
-
export function buildOutlineByChapter(
|
|
70
|
-
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
]),
|
|
81
|
-
);
|
|
69
|
+
export function buildOutlineByChapter(chapters: DocChapter[]): Record<string, OutlineItem[]> {
|
|
70
|
+
return Object.fromEntries(
|
|
71
|
+
chapters.map((chapter) => [
|
|
72
|
+
chapter.id,
|
|
73
|
+
chapter.sections.map((section) => ({
|
|
74
|
+
id: sectionId(chapter.id, section.key),
|
|
75
|
+
label: section.heading,
|
|
76
|
+
level: 2,
|
|
77
|
+
})),
|
|
78
|
+
]),
|
|
79
|
+
);
|
|
82
80
|
}
|
|
83
81
|
|
|
84
82
|
export function scrollToSection(id: string) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
const target = document.getElementById(id);
|
|
84
|
+
if (target != null) {
|
|
85
|
+
target.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
86
|
+
}
|
|
89
87
|
}
|
|
90
88
|
|
|
91
89
|
// ─── Rail ────────────────────────────────────────────────────────────────────
|
|
92
|
-
|