@hyvnt/hyvui 0.2.0 → 0.4.0

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 (181) hide show
  1. package/README.md +294 -253
  2. package/dist/components/ambient/ArcaneVein.svelte +151 -0
  3. package/dist/components/ambient/ArcaneVein.svelte.d.ts +31 -0
  4. package/dist/components/ambient/BrassFiligree.svelte +109 -0
  5. package/dist/components/ambient/BrassFiligree.svelte.d.ts +20 -0
  6. package/dist/components/ambient/CornerBrackets.svelte +91 -87
  7. package/dist/components/ambient/CornerBrackets.svelte.d.ts +8 -0
  8. package/dist/components/ambient/CrystalShard.svelte +151 -0
  9. package/dist/components/ambient/CrystalShard.svelte.d.ts +19 -0
  10. package/dist/components/ambient/DataStream.svelte +117 -94
  11. package/dist/components/ambient/DataStream.svelte.d.ts +6 -0
  12. package/dist/components/ambient/EnergyArc.svelte +189 -0
  13. package/dist/components/ambient/EnergyArc.svelte.d.ts +32 -0
  14. package/dist/components/ambient/GlyphMark.svelte +75 -69
  15. package/dist/components/ambient/GlyphMark.svelte.d.ts +6 -0
  16. package/dist/components/ambient/GridOverlay.svelte +34 -28
  17. package/dist/components/ambient/GridOverlay.svelte.d.ts +8 -0
  18. package/dist/components/ambient/HexGrid.svelte +119 -0
  19. package/dist/components/ambient/HexGrid.svelte.d.ts +21 -0
  20. package/dist/components/ambient/ParallaxLayer.svelte +45 -41
  21. package/dist/components/ambient/ParallaxLayer.svelte.d.ts +7 -0
  22. package/dist/components/ambient/ScanBand.svelte +103 -91
  23. package/dist/components/ambient/ScanBand.svelte.d.ts +8 -0
  24. package/dist/components/ambient/ShimmerCloud.svelte +180 -0
  25. package/dist/components/ambient/ShimmerCloud.svelte.d.ts +21 -0
  26. package/dist/components/ambient/SignalRing.svelte +106 -100
  27. package/dist/components/ambient/SignalRing.svelte.d.ts +6 -0
  28. package/dist/components/ambient/ThreadLine.svelte +78 -78
  29. package/dist/components/ambient/ThreadLine.svelte.d.ts +7 -0
  30. package/dist/components/ambient/Vignette.svelte +30 -26
  31. package/dist/components/ambient/Vignette.svelte.d.ts +6 -0
  32. package/dist/components/depth/DepthLayer.svelte +30 -27
  33. package/dist/components/depth/DepthLayer.svelte.d.ts +8 -0
  34. package/dist/components/depth/DepthStage.svelte +67 -62
  35. package/dist/components/depth/DepthStage.svelte.d.ts +8 -0
  36. package/dist/components/depth/FloatCard.svelte +129 -104
  37. package/dist/components/depth/FloatCard.svelte.d.ts +8 -0
  38. package/dist/components/depth/HorizonGrid.svelte +241 -160
  39. package/dist/components/depth/HorizonGrid.svelte.d.ts +9 -0
  40. package/dist/components/depth/Plinth.svelte +62 -57
  41. package/dist/components/depth/Plinth.svelte.d.ts +10 -0
  42. package/dist/components/display/Avatar.svelte +69 -69
  43. package/dist/components/display/Avatar.svelte.d.ts +5 -0
  44. package/dist/components/display/Badge.svelte +75 -63
  45. package/dist/components/display/Badge.svelte.d.ts +6 -0
  46. package/dist/components/display/Blockquote.svelte +35 -34
  47. package/dist/components/display/Blockquote.svelte.d.ts +4 -0
  48. package/dist/components/display/CodeBlock.svelte +76 -76
  49. package/dist/components/display/CodeBlock.svelte.d.ts +5 -0
  50. package/dist/components/display/MetricCard.svelte +100 -83
  51. package/dist/components/display/MetricCard.svelte.d.ts +6 -0
  52. package/dist/components/display/Table.svelte +106 -104
  53. package/dist/components/display/Table.svelte.d.ts +7 -0
  54. package/dist/components/feedback/Alert.svelte +95 -76
  55. package/dist/components/feedback/Alert.svelte.d.ts +6 -0
  56. package/dist/components/feedback/EmptyState.svelte +75 -68
  57. package/dist/components/feedback/EmptyState.svelte.d.ts +7 -0
  58. package/dist/components/feedback/ErrorState.svelte +78 -73
  59. package/dist/components/feedback/ErrorState.svelte.d.ts +5 -0
  60. package/dist/components/feedback/Skeleton.svelte +58 -52
  61. package/dist/components/feedback/Skeleton.svelte.d.ts +6 -0
  62. package/dist/components/feedback/StatusDot.svelte +84 -54
  63. package/dist/components/feedback/StatusDot.svelte.d.ts +6 -0
  64. package/dist/components/feedback/StatusLine.svelte +128 -122
  65. package/dist/components/feedback/StatusLine.svelte.d.ts +6 -0
  66. package/dist/components/feedback/Toast.svelte +144 -136
  67. package/dist/components/feedback/Toast.svelte.d.ts +10 -0
  68. package/dist/components/inputs/Button.svelte +310 -237
  69. package/dist/components/inputs/Button.svelte.d.ts +8 -0
  70. package/dist/components/inputs/Checkbox.svelte +109 -105
  71. package/dist/components/inputs/Checkbox.svelte.d.ts +5 -0
  72. package/dist/components/inputs/FileUpload.svelte +170 -163
  73. package/dist/components/inputs/FileUpload.svelte.d.ts +5 -0
  74. package/dist/components/inputs/Input.svelte +153 -147
  75. package/dist/components/inputs/Input.svelte.d.ts +7 -0
  76. package/dist/components/inputs/Select.svelte +164 -150
  77. package/dist/components/inputs/Select.svelte.d.ts +8 -0
  78. package/dist/components/inputs/Textarea.svelte +160 -154
  79. package/dist/components/inputs/Textarea.svelte.d.ts +6 -0
  80. package/dist/components/inputs/Toggle.svelte +125 -120
  81. package/dist/components/inputs/Toggle.svelte.d.ts +5 -0
  82. package/dist/components/layout/Card.svelte +81 -76
  83. package/dist/components/layout/Card.svelte.d.ts +11 -0
  84. package/dist/components/layout/Drawer.svelte +140 -109
  85. package/dist/components/layout/Drawer.svelte.d.ts +6 -0
  86. package/dist/components/layout/Grid.svelte +128 -43
  87. package/dist/components/layout/Grid.svelte.d.ts +18 -2
  88. package/dist/components/layout/Modal.svelte +191 -159
  89. package/dist/components/layout/Modal.svelte.d.ts +10 -0
  90. package/dist/components/layout/Panel.svelte +58 -54
  91. package/dist/components/layout/Panel.svelte.d.ts +9 -0
  92. package/dist/components/layout/Popover.svelte +188 -67
  93. package/dist/components/layout/Popover.svelte.d.ts +19 -1
  94. package/dist/components/layout/Stack.svelte +65 -53
  95. package/dist/components/layout/Stack.svelte.d.ts +12 -0
  96. package/dist/components/navigation/Breadcrumb.svelte +78 -73
  97. package/dist/components/navigation/Breadcrumb.svelte.d.ts +8 -0
  98. package/dist/components/navigation/DropdownMenu.svelte +179 -124
  99. package/dist/components/navigation/DropdownMenu.svelte.d.ts +24 -2
  100. package/dist/components/navigation/SidebarNav.svelte +96 -90
  101. package/dist/components/navigation/SidebarNav.svelte.d.ts +9 -0
  102. package/dist/components/navigation/Tabs.svelte +106 -86
  103. package/dist/components/navigation/Tabs.svelte.d.ts +8 -0
  104. package/dist/components/navigation/Topbar.svelte +94 -85
  105. package/dist/components/navigation/Topbar.svelte.d.ts +9 -0
  106. package/dist/components/patterns/ActionBar.svelte +82 -76
  107. package/dist/components/patterns/ActionBar.svelte.d.ts +10 -0
  108. package/dist/components/patterns/ChapterMark.svelte +152 -0
  109. package/dist/components/patterns/ChapterMark.svelte.d.ts +19 -0
  110. package/dist/components/patterns/ConfirmDialog.svelte +75 -64
  111. package/dist/components/patterns/ConfirmDialog.svelte.d.ts +12 -0
  112. package/dist/components/patterns/DepthPortal.svelte +123 -0
  113. package/dist/components/patterns/DepthPortal.svelte.d.ts +24 -0
  114. package/dist/components/patterns/Manifesto.svelte +171 -0
  115. package/dist/components/patterns/Manifesto.svelte.d.ts +25 -0
  116. package/dist/components/patterns/PageHeader.svelte +117 -114
  117. package/dist/components/patterns/PageHeader.svelte.d.ts +8 -0
  118. package/dist/components/patterns/PullQuote.svelte +145 -0
  119. package/dist/components/patterns/PullQuote.svelte.d.ts +23 -0
  120. package/dist/components/patterns/RegisterSwitcher.svelte +132 -0
  121. package/dist/components/patterns/RegisterSwitcher.svelte.d.ts +21 -0
  122. package/dist/components/patterns/SearchBar.svelte +59 -59
  123. package/dist/components/patterns/SearchBar.svelte.d.ts +5 -0
  124. package/dist/components/patterns/ShowcaseFrame.svelte +117 -0
  125. package/dist/components/patterns/ShowcaseFrame.svelte.d.ts +28 -0
  126. package/dist/components/patterns/TerminalBoot.svelte +118 -104
  127. package/dist/components/patterns/TerminalBoot.svelte.d.ts +12 -0
  128. package/dist/components/primitives/Divider.svelte +56 -29
  129. package/dist/components/primitives/Divider.svelte.d.ts +5 -0
  130. package/dist/components/primitives/Icon.svelte +53 -49
  131. package/dist/components/primitives/Icon.svelte.d.ts +9 -0
  132. package/dist/components/primitives/Label.svelte +45 -44
  133. package/dist/components/primitives/Label.svelte.d.ts +6 -0
  134. package/dist/components/primitives/Surface.svelte +154 -87
  135. package/dist/components/primitives/Surface.svelte.d.ts +7 -0
  136. package/dist/components/primitives/Text.svelte +130 -98
  137. package/dist/components/primitives/Text.svelte.d.ts +7 -0
  138. package/dist/components/scenes/ArchiveScene.svelte +102 -95
  139. package/dist/components/scenes/ArchiveScene.svelte.d.ts +17 -1
  140. package/dist/components/scenes/DepthScene.svelte +128 -0
  141. package/dist/components/scenes/DepthScene.svelte.d.ts +36 -0
  142. package/dist/components/scenes/LogScene.svelte +86 -77
  143. package/dist/components/scenes/LogScene.svelte.d.ts +14 -0
  144. package/dist/components/scenes/NarrativeScene.svelte +100 -92
  145. package/dist/components/scenes/NarrativeScene.svelte.d.ts +9 -0
  146. package/dist/components/scenes/ReadoutScene.svelte +131 -107
  147. package/dist/components/scenes/ReadoutScene.svelte.d.ts +14 -1
  148. package/dist/components/scenes/StageScene.svelte +111 -104
  149. package/dist/components/scenes/StageScene.svelte.d.ts +14 -0
  150. package/dist/components/system/AppShell.svelte +62 -0
  151. package/dist/components/system/AppShell.svelte.d.ts +32 -0
  152. package/dist/examples/ArcaneShard.svelte +364 -0
  153. package/dist/examples/ArcaneShard.svelte.d.ts +3 -0
  154. package/dist/examples/FieldReport.svelte +226 -223
  155. package/dist/examples/HextechForge.svelte +324 -0
  156. package/dist/examples/HextechForge.svelte.d.ts +3 -0
  157. package/dist/examples/ObservationDeck.svelte +333 -317
  158. package/dist/examples/SignalLost.svelte +191 -191
  159. package/dist/index.d.ts +15 -1
  160. package/dist/index.js +16 -1
  161. package/dist/styles.css +115 -0
  162. package/dist/system/actions/echo.js +21 -12
  163. package/dist/system/actions/resolve.js +28 -14
  164. package/dist/system/actions/reveal.js +2 -2
  165. package/dist/system/actions/surface.js +12 -2
  166. package/dist/system/depth/depth.css +49 -49
  167. package/dist/system/depth/depth.js +1 -1
  168. package/dist/system/expressions.css +80 -80
  169. package/dist/system/override-template.css +72 -72
  170. package/dist/system/register.css +74 -74
  171. package/dist/system/register.d.ts +1 -1
  172. package/dist/system/register.js +5 -1
  173. package/dist/system/scroll-lock.d.ts +6 -0
  174. package/dist/system/scroll-lock.js +23 -0
  175. package/dist/tokens/arcane.css +96 -0
  176. package/dist/tokens/hextech.css +96 -0
  177. package/dist/tokens/tokens.css +102 -86
  178. package/dist/tokens/tokens.d.ts +41 -0
  179. package/dist/tokens/tokens.js +44 -3
  180. package/dist/utils/motion.js +1 -1
  181. package/package.json +71 -60
@@ -0,0 +1,152 @@
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+
4
+ /**
5
+ * @remarks Architectural section header. Creates structural rhythm without a container.
6
+ * Use for section openers in long-form pages, portfolios, documentation.
7
+ * @example
8
+ * <ChapterMark index="01" title="signal architecture" descriptor="how the system speaks" />
9
+ */
10
+ interface Props {
11
+ /** Chapter index — a number, roman numeral, or label. */
12
+ index?: string | number;
13
+ /** Chapter title. */
14
+ title: string;
15
+ /** Optional descriptor rendered in readout style below the title. */
16
+ descriptor?: string;
17
+ /** Additional CSS classes. */
18
+ class?: string;
19
+ }
20
+
21
+ let { index, title, descriptor, class: className = '' }: Props = $props();
22
+ </script>
23
+
24
+ <header class={cn('hyvui-chapter-mark', className)}>
25
+ <div class="hyvui-chapter-mark-rule" aria-hidden="true"></div>
26
+ <div class="hyvui-chapter-mark-body">
27
+ {#if index !== undefined}
28
+ <div class="hyvui-chapter-mark-index" aria-hidden="true">
29
+ <span class="hyvui-chapter-mark-index-text">{index}</span>
30
+ <span class="hyvui-chapter-mark-index-line"></span>
31
+ </div>
32
+ {/if}
33
+ <div class="hyvui-chapter-mark-text">
34
+ <h2 class="hyvui-chapter-mark-title">{title}</h2>
35
+ {#if descriptor}
36
+ <p class="hyvui-chapter-mark-descriptor">{descriptor}</p>
37
+ {/if}
38
+ </div>
39
+ </div>
40
+ </header>
41
+
42
+ <style>
43
+ .hyvui-chapter-mark {
44
+ display: flex;
45
+ flex-direction: column;
46
+ gap: calc(1.25rem * var(--reg-spacing-scale, 1));
47
+ }
48
+
49
+ .hyvui-chapter-mark-rule {
50
+ position: relative;
51
+ overflow: hidden;
52
+ width: 100%;
53
+ height: 1px;
54
+ background: var(--line);
55
+ }
56
+
57
+ .hyvui-chapter-mark-rule::after {
58
+ content: '';
59
+ position: absolute;
60
+ inset: 0;
61
+ background: var(--bg);
62
+ transform-origin: right;
63
+ animation: chapter-rule-wipe 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
64
+ }
65
+
66
+ @keyframes chapter-rule-wipe {
67
+ from {
68
+ transform: scaleX(1);
69
+ }
70
+ to {
71
+ transform: scaleX(0);
72
+ }
73
+ }
74
+
75
+ @media (prefers-reduced-motion: reduce) {
76
+ .hyvui-chapter-mark-rule::after {
77
+ animation: none;
78
+ display: none;
79
+ }
80
+ }
81
+
82
+ .hyvui-chapter-mark-body {
83
+ display: flex;
84
+ gap: calc(1.5rem * var(--reg-spacing-scale, 1));
85
+ align-items: baseline;
86
+ }
87
+
88
+ .hyvui-chapter-mark-index {
89
+ display: flex;
90
+ align-items: center;
91
+ gap: 0.6rem;
92
+ flex-shrink: 0;
93
+ padding-top: 0.3em;
94
+ }
95
+
96
+ .hyvui-chapter-mark-index-text {
97
+ font-family: var(--font-mono);
98
+ font-size: 0.62rem;
99
+ letter-spacing: 0.22em;
100
+ text-transform: uppercase;
101
+ color: var(--muted-strong);
102
+ line-height: 1;
103
+ }
104
+
105
+ .hyvui-chapter-mark-index-line {
106
+ display: block;
107
+ width: 2.5rem;
108
+ height: 1px;
109
+ background: var(--line);
110
+ }
111
+
112
+ .hyvui-chapter-mark-text {
113
+ display: flex;
114
+ flex-direction: column;
115
+ gap: calc(0.5rem * var(--reg-spacing-scale, 1));
116
+ }
117
+
118
+ .hyvui-chapter-mark-title {
119
+ margin: 0;
120
+ font-family: var(--font-body);
121
+ font-weight: 400;
122
+ font-size: clamp(1.8rem, 4vw, 3rem);
123
+ letter-spacing: -0.03em;
124
+ line-height: 1.05;
125
+ color: var(--text);
126
+ animation: chapter-title-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
127
+ }
128
+
129
+ @keyframes chapter-title-in {
130
+ from {
131
+ opacity: 0;
132
+ }
133
+ to {
134
+ opacity: 1;
135
+ }
136
+ }
137
+
138
+ @media (prefers-reduced-motion: reduce) {
139
+ .hyvui-chapter-mark-title {
140
+ animation: none;
141
+ }
142
+ }
143
+
144
+ .hyvui-chapter-mark-descriptor {
145
+ margin: 0;
146
+ font-family: var(--font-mono);
147
+ font-size: 0.82rem;
148
+ letter-spacing: 0.06em;
149
+ color: var(--muted);
150
+ line-height: 1.6;
151
+ }
152
+ </style>
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @remarks Architectural section header. Creates structural rhythm without a container.
3
+ * Use for section openers in long-form pages, portfolios, documentation.
4
+ * @example
5
+ * <ChapterMark index="01" title="signal architecture" descriptor="how the system speaks" />
6
+ */
7
+ interface Props {
8
+ /** Chapter index — a number, roman numeral, or label. */
9
+ index?: string | number;
10
+ /** Chapter title. */
11
+ title: string;
12
+ /** Optional descriptor rendered in readout style below the title. */
13
+ descriptor?: string;
14
+ /** Additional CSS classes. */
15
+ class?: string;
16
+ }
17
+ declare const ChapterMark: import("svelte").Component<Props, {}, "">;
18
+ type ChapterMark = ReturnType<typeof ChapterMark>;
19
+ export default ChapterMark;
@@ -1,64 +1,75 @@
1
- <script lang="ts">
2
- import Modal from '../layout/Modal.svelte';
3
- import Button from '../inputs/Button.svelte';
4
- import Stack from '../layout/Stack.svelte';
5
- import type { Snippet } from 'svelte';
6
-
7
- interface Props {
8
- /** Controls dialog visibility. */
9
- open?: boolean;
10
- /** Action title. Names the action, never asks "are you sure?". */
11
- title?: string;
12
- /** Additional description. */
13
- description?: string;
14
- /** Confirm button label. */
15
- confirmLabel?: string;
16
- /** Cancel button label. */
17
- cancelLabel?: string;
18
- /** Makes the confirm button use the destructive variant. */
19
- destructive?: boolean;
20
- /** Additional CSS classes. */
21
- class?: string;
22
- /** Fires when the confirm button is clicked. */
23
- onconfirm?: () => void;
24
- /** Fires when the cancel button is clicked or dialog is dismissed. */
25
- oncancel?: () => void;
26
- }
27
-
28
- let {
29
- open = false,
30
- title = '',
31
- description = '',
32
- confirmLabel = 'confirm',
33
- cancelLabel = 'cancel',
34
- destructive = false,
35
- class: className = '',
36
- onconfirm,
37
- oncancel,
38
- }: Props = $props();
39
- </script>
40
-
41
- <Modal {open} {title} class={className} onclose={oncancel}>
42
- {#if description}
43
- <p class="hyvui-confirm-desc">{description}</p>
44
- {/if}
45
- {#snippet footer()}
46
- <Stack direction="horizontal" gap="0.75rem" justify="flex-end">
47
- <Button variant="ghost" onclick={() => oncancel?.()}>{cancelLabel}</Button>
48
- <Button
49
- variant={destructive ? 'destructive' : 'primary'}
50
- onclick={() => onconfirm?.()}
51
- >{confirmLabel}</Button>
52
- </Stack>
53
- {/snippet}
54
- </Modal>
55
-
56
- <style>
57
- .hyvui-confirm-desc {
58
- font-family: var(--font-body);
59
- font-size: 0.9rem;
60
- color: var(--text-soft);
61
- line-height: 1.6;
62
- margin: 0;
63
- }
64
- </style>
1
+ <script lang="ts">
2
+ import Modal from '../layout/Modal.svelte';
3
+ import Button from '../inputs/Button.svelte';
4
+ import Stack from '../layout/Stack.svelte';
5
+ import type { Snippet } from 'svelte';
6
+
7
+ /**
8
+ * @remarks Use instead of building Modal + Button manually for any irreversible or destructive action.
9
+ * @example
10
+ * <ConfirmDialog
11
+ * open={showConfirm}
12
+ * title="delete report"
13
+ * description="this action cannot be undone."
14
+ * destructive
15
+ * onconfirm={deleteReport}
16
+ * oncancel={() => showConfirm = false}
17
+ * />
18
+ */
19
+ interface Props {
20
+ /** Controls dialog visibility. */
21
+ open?: boolean;
22
+ /** Action title. Names the action, never asks "are you sure?". */
23
+ title?: string;
24
+ /** Additional description. */
25
+ description?: string;
26
+ /** Confirm button label. */
27
+ confirmLabel?: string;
28
+ /** Cancel button label. */
29
+ cancelLabel?: string;
30
+ /** Makes the confirm button use the destructive variant. */
31
+ destructive?: boolean;
32
+ /** Additional CSS classes. */
33
+ class?: string;
34
+ /** Fires when the confirm button is clicked. */
35
+ onconfirm?: () => void;
36
+ /** Fires when the cancel button is clicked or dialog is dismissed. */
37
+ oncancel?: () => void;
38
+ }
39
+
40
+ let {
41
+ open = false,
42
+ title = '',
43
+ description = '',
44
+ confirmLabel = 'confirm',
45
+ cancelLabel = 'cancel',
46
+ destructive = false,
47
+ class: className = '',
48
+ onconfirm,
49
+ oncancel
50
+ }: Props = $props();
51
+ </script>
52
+
53
+ <Modal {open} {title} class={className} onclose={oncancel}>
54
+ {#if description}
55
+ <p class="hyvui-confirm-desc">{description}</p>
56
+ {/if}
57
+ {#snippet footer()}
58
+ <Stack direction="horizontal" gap="0.75rem" justify="flex-end">
59
+ <Button variant="ghost" onclick={() => oncancel?.()}>{cancelLabel}</Button>
60
+ <Button variant={destructive ? 'destructive' : 'primary'} onclick={() => onconfirm?.()}
61
+ >{confirmLabel}</Button
62
+ >
63
+ </Stack>
64
+ {/snippet}
65
+ </Modal>
66
+
67
+ <style>
68
+ .hyvui-confirm-desc {
69
+ font-family: var(--font-body);
70
+ font-size: 0.9rem;
71
+ color: var(--text-soft);
72
+ line-height: 1.6;
73
+ margin: 0;
74
+ }
75
+ </style>
@@ -1,3 +1,15 @@
1
+ /**
2
+ * @remarks Use instead of building Modal + Button manually for any irreversible or destructive action.
3
+ * @example
4
+ * <ConfirmDialog
5
+ * open={showConfirm}
6
+ * title="delete report"
7
+ * description="this action cannot be undone."
8
+ * destructive
9
+ * onconfirm={deleteReport}
10
+ * oncancel={() => showConfirm = false}
11
+ * />
12
+ */
1
13
  interface Props {
2
14
  /** Controls dialog visibility. */
3
15
  open?: boolean;
@@ -0,0 +1,123 @@
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+ import CornerBrackets from '../ambient/CornerBrackets.svelte';
4
+ import ScanBand from '../ambient/ScanBand.svelte';
5
+ import DepthStage from '../depth/DepthStage.svelte';
6
+ import DepthLayer from '../depth/DepthLayer.svelte';
7
+ import HorizonGrid from '../depth/HorizonGrid.svelte';
8
+ import type { Snippet } from 'svelte';
9
+
10
+ /**
11
+ * @remarks A framed spatial window — a card alternative where content lives in depth, not on a surface.
12
+ * Use in place of Card when you want content to feel embedded in space.
13
+ * @example
14
+ * <DepthPortal label="sensor array / 004" active={scanning}>
15
+ * <Text variant="heading">deep signal</Text>
16
+ * </DepthPortal>
17
+ */
18
+ interface Props {
19
+ /** Readout label at bottom-left. */
20
+ label?: string;
21
+ /** When true, a ScanBand sweeps through to signal activity. */
22
+ active?: boolean;
23
+ /** CSS aspect-ratio value. */
24
+ aspect?: string;
25
+ /** Additional CSS classes. */
26
+ class?: string;
27
+ /** Content rendered at foreground depth level. */
28
+ children?: Snippet;
29
+ }
30
+
31
+ let {
32
+ label,
33
+ active = false,
34
+ aspect = '4/3',
35
+ class: className = '',
36
+ children
37
+ }: Props = $props();
38
+ </script>
39
+
40
+ <div class={cn('hyvui-depth-portal', className)} style:aspect-ratio={aspect}>
41
+ <HorizonGrid class="hyvui-depth-portal-grid" animated={false} vanishY={0.42} rows={10} cols={8} />
42
+
43
+ <div class="hyvui-depth-portal-brackets" aria-hidden="true" style:opacity="var(--reg-ornament-opacity)">
44
+ <CornerBrackets size={14} />
45
+ </div>
46
+
47
+ <div class="hyvui-depth-portal-scan" aria-hidden="true" class:hyvui-depth-portal-scan--active={active}>
48
+ <ScanBand axis="y" size="12%" duration="2.8s" />
49
+ </div>
50
+
51
+ <DepthStage perspective="near" class="hyvui-depth-portal-stage">
52
+ <DepthLayer level="foreground" class="hyvui-depth-portal-layer">
53
+ {#if children}{@render children()}{/if}
54
+ </DepthLayer>
55
+ </DepthStage>
56
+
57
+ {#if label}
58
+ <div class="hyvui-depth-portal-label" aria-hidden="true">{label}</div>
59
+ {/if}
60
+ </div>
61
+
62
+ <style>
63
+ .hyvui-depth-portal {
64
+ position: relative;
65
+ overflow: hidden;
66
+ border: 1px solid var(--line);
67
+ }
68
+
69
+ :global(.hyvui-depth-portal-grid) {
70
+ position: absolute;
71
+ inset: 0;
72
+ }
73
+
74
+ .hyvui-depth-portal-brackets {
75
+ position: absolute;
76
+ inset: 0.75rem;
77
+ pointer-events: none;
78
+ }
79
+
80
+ .hyvui-depth-portal-scan {
81
+ position: absolute;
82
+ inset: 0;
83
+ pointer-events: none;
84
+ opacity: 0;
85
+ transition: opacity 0.4s var(--ease-fast);
86
+ }
87
+
88
+ .hyvui-depth-portal-scan--active {
89
+ opacity: 1;
90
+ }
91
+
92
+ :global(.hyvui-depth-portal-stage) {
93
+ position: absolute;
94
+ inset: 0;
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ }
99
+
100
+ :global(.hyvui-depth-portal-layer) {
101
+ display: flex;
102
+ align-items: center;
103
+ justify-content: center;
104
+ }
105
+
106
+ .hyvui-depth-portal-label {
107
+ position: absolute;
108
+ bottom: 0.65rem;
109
+ left: 0.8rem;
110
+ font-family: var(--font-mono);
111
+ font-size: 0.82rem;
112
+ letter-spacing: 0.06em;
113
+ color: var(--muted);
114
+ line-height: 1.6;
115
+ pointer-events: none;
116
+ }
117
+
118
+ @media (prefers-reduced-motion: reduce) {
119
+ .hyvui-depth-portal-scan {
120
+ display: none;
121
+ }
122
+ }
123
+ </style>
@@ -0,0 +1,24 @@
1
+ import type { Snippet } from 'svelte';
2
+ /**
3
+ * @remarks A framed spatial window — a card alternative where content lives in depth, not on a surface.
4
+ * Use in place of Card when you want content to feel embedded in space.
5
+ * @example
6
+ * <DepthPortal label="sensor array / 004" active={scanning}>
7
+ * <Text variant="heading">deep signal</Text>
8
+ * </DepthPortal>
9
+ */
10
+ interface Props {
11
+ /** Readout label at bottom-left. */
12
+ label?: string;
13
+ /** When true, a ScanBand sweeps through to signal activity. */
14
+ active?: boolean;
15
+ /** CSS aspect-ratio value. */
16
+ aspect?: string;
17
+ /** Additional CSS classes. */
18
+ class?: string;
19
+ /** Content rendered at foreground depth level. */
20
+ children?: Snippet;
21
+ }
22
+ declare const DepthPortal: import("svelte").Component<Props, {}, "">;
23
+ type DepthPortal = ReturnType<typeof DepthPortal>;
24
+ export default DepthPortal;
@@ -0,0 +1,171 @@
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+
4
+ /**
5
+ * @remarks Full editorial statement block. Text in space, not text in a box.
6
+ * Use for philosophical statements, design principles, section intros.
7
+ * @example
8
+ * <Manifesto
9
+ * statement="quiet confidence. technical depth. no ornamental sludge."
10
+ * attribution="design posture"
11
+ * accent="gold"
12
+ * />
13
+ */
14
+ interface Props {
15
+ /** The statement text. */
16
+ statement: string;
17
+ /** Optional attribution label rendered below in readout style. */
18
+ attribution?: string;
19
+ /** Side accent rule color. */
20
+ accent?: 'gold' | 'signal' | 'none';
21
+ /** Text alignment. */
22
+ align?: 'left' | 'center';
23
+ /** Additional CSS classes. */
24
+ class?: string;
25
+ }
26
+
27
+ let {
28
+ statement,
29
+ attribution,
30
+ accent = 'none',
31
+ align = 'left',
32
+ class: className = ''
33
+ }: Props = $props();
34
+ </script>
35
+
36
+ <blockquote
37
+ class={cn('hyvui-manifesto', `hyvui-manifesto--accent-${accent}`, `hyvui-manifesto--${align}`, className)}
38
+ >
39
+ <p class="hyvui-manifesto-statement">{statement}</p>
40
+ {#if attribution}
41
+ <footer class="hyvui-manifesto-attribution">
42
+ <span class="hyvui-manifesto-rule" aria-hidden="true"></span>
43
+ <cite class="hyvui-manifesto-cite">{attribution}</cite>
44
+ </footer>
45
+ {/if}
46
+ </blockquote>
47
+
48
+ <style>
49
+ .hyvui-manifesto {
50
+ margin: 0;
51
+ padding: 0;
52
+ border: none;
53
+ display: flex;
54
+ flex-direction: column;
55
+ gap: calc(1rem * var(--reg-spacing-scale, 1));
56
+ }
57
+
58
+ /* accent rule — pseudo-element so it can animate scaleY */
59
+ .hyvui-manifesto--accent-gold,
60
+ .hyvui-manifesto--accent-signal {
61
+ position: relative;
62
+ padding-left: 1.25rem;
63
+ }
64
+
65
+ .hyvui-manifesto--accent-gold::before,
66
+ .hyvui-manifesto--accent-signal::before {
67
+ content: '';
68
+ position: absolute;
69
+ left: 0;
70
+ top: 0;
71
+ width: 2px;
72
+ height: 100%;
73
+ transform-origin: top;
74
+ animation: manifesto-rule-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
75
+ }
76
+
77
+ .hyvui-manifesto--accent-gold::before {
78
+ background: rgba(199, 156, 87, 0.5);
79
+ }
80
+
81
+ .hyvui-manifesto--accent-signal::before {
82
+ background: rgba(121, 166, 163, 0.5);
83
+ }
84
+
85
+ @keyframes manifesto-rule-in {
86
+ from {
87
+ transform: scaleY(0);
88
+ }
89
+ to {
90
+ transform: scaleY(1);
91
+ }
92
+ }
93
+
94
+ .hyvui-manifesto--center {
95
+ align-items: center;
96
+ text-align: center;
97
+ padding-left: 0;
98
+ }
99
+
100
+ .hyvui-manifesto--center::before {
101
+ display: none;
102
+ }
103
+
104
+ /* statement */
105
+ .hyvui-manifesto-statement {
106
+ margin: 0;
107
+ font-family: var(--font-body);
108
+ font-style: italic;
109
+ font-size: clamp(1.1rem, 2.5vw, 1.6rem);
110
+ line-height: 1.45;
111
+ color: var(--text-soft);
112
+ max-width: 30rem;
113
+ text-wrap: pretty;
114
+ animation: manifesto-text-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
115
+ }
116
+
117
+ @keyframes manifesto-text-in {
118
+ from {
119
+ opacity: 0;
120
+ transform: translateX(4px);
121
+ }
122
+ to {
123
+ opacity: 1;
124
+ transform: translateX(0);
125
+ }
126
+ }
127
+
128
+ @media (prefers-reduced-motion: reduce) {
129
+ .hyvui-manifesto--accent-gold::before,
130
+ .hyvui-manifesto--accent-signal::before {
131
+ animation: none;
132
+ }
133
+
134
+ .hyvui-manifesto-statement {
135
+ animation: none;
136
+ }
137
+ }
138
+
139
+ .hyvui-manifesto--center .hyvui-manifesto-statement {
140
+ text-align: center;
141
+ max-width: 36rem;
142
+ }
143
+
144
+ /* attribution */
145
+ .hyvui-manifesto-attribution {
146
+ display: flex;
147
+ align-items: center;
148
+ gap: 0.6rem;
149
+ }
150
+
151
+ .hyvui-manifesto-rule {
152
+ display: block;
153
+ width: 2rem;
154
+ height: 1px;
155
+ background: var(--line);
156
+ flex-shrink: 0;
157
+ }
158
+
159
+ .hyvui-manifesto-cite {
160
+ font-style: normal;
161
+ font-family: var(--font-mono);
162
+ font-size: 0.82rem;
163
+ letter-spacing: 0.06em;
164
+ color: var(--muted);
165
+ line-height: 1.6;
166
+ }
167
+
168
+ .hyvui-manifesto--center .hyvui-manifesto-attribution {
169
+ justify-content: center;
170
+ }
171
+ </style>
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @remarks Full editorial statement block. Text in space, not text in a box.
3
+ * Use for philosophical statements, design principles, section intros.
4
+ * @example
5
+ * <Manifesto
6
+ * statement="quiet confidence. technical depth. no ornamental sludge."
7
+ * attribution="design posture"
8
+ * accent="gold"
9
+ * />
10
+ */
11
+ interface Props {
12
+ /** The statement text. */
13
+ statement: string;
14
+ /** Optional attribution label rendered below in readout style. */
15
+ attribution?: string;
16
+ /** Side accent rule color. */
17
+ accent?: 'gold' | 'signal' | 'none';
18
+ /** Text alignment. */
19
+ align?: 'left' | 'center';
20
+ /** Additional CSS classes. */
21
+ class?: string;
22
+ }
23
+ declare const Manifesto: import("svelte").Component<Props, {}, "">;
24
+ type Manifesto = ReturnType<typeof Manifesto>;
25
+ export default Manifesto;