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.
Files changed (129) hide show
  1. package/BRAND.md +3 -3
  2. package/README.md +7 -4
  3. package/USAGE.md +49 -49
  4. package/astryx-dracula.d.ts +2 -2
  5. package/astryx-dracula.js +25 -9
  6. package/astryx-dracula.variants.d.ts +2 -2
  7. package/astryx.integration.mjs +1 -1
  8. package/icons.mjs +21 -17
  9. package/icons.tsx +69 -62
  10. package/package.json +125 -120
  11. package/shared/auth-chrome-config.ts +6 -6
  12. package/shared/auth-chrome.tsx +143 -144
  13. package/shared/auth-copy.ts +14 -14
  14. package/shared/chaptered-doc-config.ts +48 -51
  15. package/shared/chaptered-doc.tsx +267 -289
  16. package/shared/chart-hues.ts +25 -10
  17. package/shared/chart-labels.tsx +31 -30
  18. package/shared/chart-legend.tsx +55 -56
  19. package/shared/chart-panel-style.ts +3 -3
  20. package/shared/data-bar.tsx +97 -102
  21. package/shared/format-money.ts +1 -1
  22. package/shared/gallery-image.ts +6 -6
  23. package/shared/login-demo.ts +1 -1
  24. package/shared/metric-card.tsx +101 -105
  25. package/shared/metric-delta.tsx +28 -27
  26. package/shared/order-desk.tsx +205 -216
  27. package/shared/revenue-chart.tsx +145 -165
  28. package/shared/scene-castle.tsx +206 -291
  29. package/shared/scene-frame.tsx +33 -32
  30. package/shared/scene-hues.ts +17 -17
  31. package/shared/scene-tile.tsx +88 -92
  32. package/shared/settings-data.ts +119 -125
  33. package/shared/settings-rows.tsx +122 -159
  34. package/shared/sparkline.tsx +75 -88
  35. package/shared/sso-icons.tsx +10 -22
  36. package/shared/stars.tsx +16 -25
  37. package/templates/ai-chat-landing.template.mjs +5 -4
  38. package/templates/ai-chat-landing.tsx +473 -460
  39. package/templates/ai-chat.template.mjs +5 -4
  40. package/templates/ai-chat.tsx +543 -612
  41. package/templates/blank.template.mjs +5 -4
  42. package/templates/blank.tsx +18 -14
  43. package/templates/centered-hero.template.mjs +5 -4
  44. package/templates/centered-hero.tsx +55 -68
  45. package/templates/classic-gallery.template.mjs +5 -4
  46. package/templates/classic-gallery.tsx +97 -104
  47. package/templates/contact-form.template.mjs +5 -4
  48. package/templates/contact-form.tsx +247 -282
  49. package/templates/dashboard-portfolio.template.mjs +5 -4
  50. package/templates/dashboard-portfolio.tsx +717 -548
  51. package/templates/dashboard.template.mjs +5 -4
  52. package/templates/dashboard.tsx +596 -567
  53. package/templates/detail-page.template.mjs +5 -4
  54. package/templates/detail-page.tsx +546 -603
  55. package/templates/documentation-design.template.mjs +5 -4
  56. package/templates/documentation-design.tsx +231 -243
  57. package/templates/documentation-technical.template.mjs +5 -4
  58. package/templates/documentation-technical.tsx +236 -239
  59. package/templates/documentation.template.mjs +5 -4
  60. package/templates/documentation.tsx +267 -279
  61. package/templates/editor.template.mjs +5 -4
  62. package/templates/editor.tsx +844 -877
  63. package/templates/file-explorer.template.mjs +5 -4
  64. package/templates/file-explorer.tsx +566 -590
  65. package/templates/form-two-column.template.mjs +5 -4
  66. package/templates/form-two-column.tsx +195 -210
  67. package/templates/gallery-hero.template.mjs +5 -4
  68. package/templates/gallery-hero.tsx +93 -114
  69. package/templates/ide.template.mjs +5 -4
  70. package/templates/ide.tsx +407 -453
  71. package/templates/incident-console.template.mjs +5 -4
  72. package/templates/incident-console.tsx +593 -575
  73. package/templates/kanban-board.template.mjs +5 -4
  74. package/templates/kanban-board.tsx +665 -683
  75. package/templates/library.template.mjs +5 -4
  76. package/templates/library.tsx +409 -430
  77. package/templates/login-card.template.mjs +5 -4
  78. package/templates/login-card.tsx +63 -72
  79. package/templates/login-split.template.mjs +5 -4
  80. package/templates/login-split.tsx +192 -193
  81. package/templates/login-sso.template.mjs +5 -4
  82. package/templates/login-sso.tsx +257 -258
  83. package/templates/login.template.mjs +5 -4
  84. package/templates/login.tsx +53 -49
  85. package/templates/messaging-shell.template.mjs +5 -4
  86. package/templates/messaging-shell.tsx +556 -574
  87. package/templates/mixed-gallery.template.mjs +5 -4
  88. package/templates/mixed-gallery.tsx +60 -58
  89. package/templates/payment-form.template.mjs +5 -4
  90. package/templates/payment-form.tsx +882 -991
  91. package/templates/product-detail.template.mjs +5 -4
  92. package/templates/product-detail.tsx +261 -272
  93. package/templates/product-gallery.template.mjs +5 -4
  94. package/templates/product-gallery.tsx +126 -137
  95. package/templates/product-tour.template.mjs +5 -4
  96. package/templates/product-tour.tsx +741 -773
  97. package/templates/settings-dialog.template.mjs +5 -4
  98. package/templates/settings-dialog.tsx +688 -717
  99. package/templates/settings-sidebar.template.mjs +5 -4
  100. package/templates/settings-sidebar.tsx +762 -807
  101. package/templates/settings.template.mjs +5 -4
  102. package/templates/settings.tsx +289 -304
  103. package/templates/shell-nav.template.mjs +5 -4
  104. package/templates/shell-nav.tsx +212 -219
  105. package/templates/shell-side-nav.template.mjs +5 -4
  106. package/templates/shell-side-nav.tsx +135 -157
  107. package/templates/shell-top-nav.template.mjs +5 -4
  108. package/templates/shell-top-nav.tsx +182 -203
  109. package/templates/side-gallery.template.mjs +5 -4
  110. package/templates/side-gallery.tsx +85 -90
  111. package/templates/table-grouped.template.mjs +5 -4
  112. package/templates/table-grouped.tsx +1000 -1053
  113. package/templates/table-page-chart.template.mjs +5 -4
  114. package/templates/table-page-chart.tsx +400 -398
  115. package/templates/table-page-heatmap-status.template.mjs +5 -4
  116. package/templates/table-page-heatmap-status.tsx +483 -512
  117. package/templates/table-page-shoe-store-heatmap.template.mjs +5 -4
  118. package/templates/table-page-shoe-store-heatmap.tsx +748 -746
  119. package/templates/table-page.template.mjs +5 -4
  120. package/templates/table-page.tsx +396 -405
  121. package/templates/table.template.mjs +5 -4
  122. package/templates/table.tsx +92 -93
  123. package/templates/tech-report.template.mjs +5 -4
  124. package/templates/tech-report.tsx +1316 -1304
  125. package/templates/theme-showcase.template.mjs +5 -4
  126. package/templates/theme-showcase.tsx +871 -951
  127. package/theme.css +35 -77
  128. package/theme.css.d.ts +9 -0
  129. package/tokens.css +373 -380
@@ -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 = '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?';
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 = 'Email or password is wrong. Try again.';
15
- export const AUTH_EMAIL_PLACEHOLDER = 'you@castle.dracula';
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 = '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';
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
- import type {CSSProperties} from 'react';
13
- import type {IconType} from '@astryxdesign/core/Icon';
14
- import type {OutlineItem} from '@astryxdesign/core/Outline';
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
- // Unique within the chapter; the DOM id is derived from it so the outline
20
- // links and the headings can never drift apart.
21
- key: string;
22
- heading: string;
23
- body: string;
24
- bullets?: string[];
25
- code?: {language: string; title: string; source: string};
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
- id: string;
30
- title: string;
31
- icon: IconType;
32
- intro: string;
33
- hasArt?: boolean;
34
- sections: DocSection[];
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
- width: '100%',
46
- height: '100%',
47
- display: 'block',
45
+ width: "100%",
46
+ height: "100%",
47
+ display: "block",
48
48
  };
49
49
  export const sceneClip: CSSProperties = {
50
- borderRadius: 'var(--radius-container)',
51
- overflow: 'clip',
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
- 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.
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
- chapters: DocChapter[],
71
- ): Record<string, OutlineItem[]> {
72
- return Object.fromEntries(
73
- chapters.map(chapter => [
74
- chapter.id,
75
- chapter.sections.map(section => ({
76
- id: sectionId(chapter.id, section.key),
77
- label: section.heading,
78
- level: 2,
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
- const target = document.getElementById(id);
86
- if (target != null) {
87
- target.scrollIntoView({behavior: 'smooth', block: 'start'});
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
-