@hyvnt/hyvui 0.1.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.
- package/README.md +253 -0
- package/dist/components/ambient/CornerBrackets.svelte +87 -0
- package/dist/components/ambient/CornerBrackets.svelte.d.ts +11 -0
- package/dist/components/ambient/DataStream.svelte +94 -0
- package/dist/components/ambient/DataStream.svelte.d.ts +13 -0
- package/dist/components/ambient/GlyphMark.svelte +69 -0
- package/dist/components/ambient/GlyphMark.svelte.d.ts +13 -0
- package/dist/components/ambient/GridOverlay.svelte +28 -0
- package/dist/components/ambient/GridOverlay.svelte.d.ts +7 -0
- package/dist/components/ambient/ParallaxLayer.svelte +41 -0
- package/dist/components/ambient/ParallaxLayer.svelte.d.ts +12 -0
- package/dist/components/ambient/ScanBand.svelte +91 -0
- package/dist/components/ambient/ScanBand.svelte.d.ts +17 -0
- package/dist/components/ambient/SignalRing.svelte +100 -0
- package/dist/components/ambient/SignalRing.svelte.d.ts +13 -0
- package/dist/components/ambient/ThreadLine.svelte +78 -0
- package/dist/components/ambient/ThreadLine.svelte.d.ts +17 -0
- package/dist/components/ambient/Vignette.svelte +26 -0
- package/dist/components/ambient/Vignette.svelte.d.ts +7 -0
- package/dist/components/depth/DepthLayer.svelte +27 -0
- package/dist/components/depth/DepthLayer.svelte.d.ts +15 -0
- package/dist/components/depth/DepthStage.svelte +62 -0
- package/dist/components/depth/DepthStage.svelte.d.ts +19 -0
- package/dist/components/depth/FloatCard.svelte +104 -0
- package/dist/components/depth/FloatCard.svelte.d.ts +14 -0
- package/dist/components/depth/HorizonGrid.svelte +160 -0
- package/dist/components/depth/HorizonGrid.svelte.d.ts +15 -0
- package/dist/components/depth/Plinth.svelte +57 -0
- package/dist/components/depth/Plinth.svelte.d.ts +13 -0
- package/dist/components/display/Avatar.svelte +69 -0
- package/dist/components/display/Avatar.svelte.d.ts +13 -0
- package/dist/components/display/Badge.svelte +63 -0
- package/dist/components/display/Badge.svelte.d.ts +12 -0
- package/dist/components/display/Blockquote.svelte +34 -0
- package/dist/components/display/Blockquote.svelte.d.ts +10 -0
- package/dist/components/display/CodeBlock.svelte +76 -0
- package/dist/components/display/CodeBlock.svelte.d.ts +13 -0
- package/dist/components/display/MetricCard.svelte +83 -0
- package/dist/components/display/MetricCard.svelte.d.ts +15 -0
- package/dist/components/display/Table.svelte +104 -0
- package/dist/components/display/Table.svelte.d.ts +19 -0
- package/dist/components/feedback/Alert.svelte +76 -0
- package/dist/components/feedback/Alert.svelte.d.ts +14 -0
- package/dist/components/feedback/EmptyState.svelte +68 -0
- package/dist/components/feedback/EmptyState.svelte.d.ts +14 -0
- package/dist/components/feedback/ErrorState.svelte +73 -0
- package/dist/components/feedback/ErrorState.svelte.d.ts +15 -0
- package/dist/components/feedback/Skeleton.svelte +52 -0
- package/dist/components/feedback/Skeleton.svelte.d.ts +13 -0
- package/dist/components/feedback/StatusDot.svelte +54 -0
- package/dist/components/feedback/StatusDot.svelte.d.ts +13 -0
- package/dist/components/feedback/StatusLine.svelte +122 -0
- package/dist/components/feedback/StatusLine.svelte.d.ts +17 -0
- package/dist/components/feedback/Toast.svelte +136 -0
- package/dist/components/feedback/Toast.svelte.d.ts +21 -0
- package/dist/components/inputs/Button.svelte +237 -0
- package/dist/components/inputs/Button.svelte.d.ts +30 -0
- package/dist/components/inputs/Checkbox.svelte +105 -0
- package/dist/components/inputs/Checkbox.svelte.d.ts +15 -0
- package/dist/components/inputs/FileUpload.svelte +163 -0
- package/dist/components/inputs/FileUpload.svelte.d.ts +17 -0
- package/dist/components/inputs/Input.svelte +147 -0
- package/dist/components/inputs/Input.svelte.d.ts +25 -0
- package/dist/components/inputs/Select.svelte +150 -0
- package/dist/components/inputs/Select.svelte.d.ts +23 -0
- package/dist/components/inputs/Textarea.svelte +154 -0
- package/dist/components/inputs/Textarea.svelte.d.ts +25 -0
- package/dist/components/inputs/Toggle.svelte +120 -0
- package/dist/components/inputs/Toggle.svelte.d.ts +15 -0
- package/dist/components/layout/Card.svelte +76 -0
- package/dist/components/layout/Card.svelte.d.ts +16 -0
- package/dist/components/layout/Drawer.svelte +109 -0
- package/dist/components/layout/Drawer.svelte.d.ts +18 -0
- package/dist/components/layout/Grid.svelte +43 -0
- package/dist/components/layout/Grid.svelte.d.ts +16 -0
- package/dist/components/layout/Modal.svelte +159 -0
- package/dist/components/layout/Modal.svelte.d.ts +20 -0
- package/dist/components/layout/Panel.svelte +54 -0
- package/dist/components/layout/Panel.svelte.d.ts +14 -0
- package/dist/components/layout/Popover.svelte +67 -0
- package/dist/components/layout/Popover.svelte.d.ts +14 -0
- package/dist/components/layout/Stack.svelte +53 -0
- package/dist/components/layout/Stack.svelte.d.ts +22 -0
- package/dist/components/navigation/Breadcrumb.svelte +73 -0
- package/dist/components/navigation/Breadcrumb.svelte.d.ts +13 -0
- package/dist/components/navigation/DropdownMenu.svelte +124 -0
- package/dist/components/navigation/DropdownMenu.svelte.d.ts +19 -0
- package/dist/components/navigation/SidebarNav.svelte +90 -0
- package/dist/components/navigation/SidebarNav.svelte.d.ts +16 -0
- package/dist/components/navigation/Tabs.svelte +86 -0
- package/dist/components/navigation/Tabs.svelte.d.ts +17 -0
- package/dist/components/navigation/Topbar.svelte +85 -0
- package/dist/components/navigation/Topbar.svelte.d.ts +14 -0
- package/dist/components/patterns/ActionBar.svelte +76 -0
- package/dist/components/patterns/ActionBar.svelte.d.ts +14 -0
- package/dist/components/patterns/ConfirmDialog.svelte +64 -0
- package/dist/components/patterns/ConfirmDialog.svelte.d.ts +23 -0
- package/dist/components/patterns/PageHeader.svelte +114 -0
- package/dist/components/patterns/PageHeader.svelte.d.ts +16 -0
- package/dist/components/patterns/SearchBar.svelte +59 -0
- package/dist/components/patterns/SearchBar.svelte.d.ts +15 -0
- package/dist/components/patterns/TerminalBoot.svelte +104 -0
- package/dist/components/patterns/TerminalBoot.svelte.d.ts +25 -0
- package/dist/components/primitives/Divider.svelte +29 -0
- package/dist/components/primitives/Divider.svelte.d.ts +9 -0
- package/dist/components/primitives/Icon.svelte +49 -0
- package/dist/components/primitives/Icon.svelte.d.ts +14 -0
- package/dist/components/primitives/Label.svelte +44 -0
- package/dist/components/primitives/Label.svelte.d.ts +14 -0
- package/dist/components/primitives/Surface.svelte +87 -0
- package/dist/components/primitives/Surface.svelte.d.ts +16 -0
- package/dist/components/primitives/Text.svelte +98 -0
- package/dist/components/primitives/Text.svelte.d.ts +19 -0
- package/dist/components/primitives/text.d.ts +1 -0
- package/dist/components/primitives/text.js +1 -0
- package/dist/components/scenes/ArchiveScene.svelte +95 -0
- package/dist/components/scenes/ArchiveScene.svelte.d.ts +16 -0
- package/dist/components/scenes/LogScene.svelte +77 -0
- package/dist/components/scenes/LogScene.svelte.d.ts +14 -0
- package/dist/components/scenes/NarrativeScene.svelte +92 -0
- package/dist/components/scenes/NarrativeScene.svelte.d.ts +16 -0
- package/dist/components/scenes/ReadoutScene.svelte +107 -0
- package/dist/components/scenes/ReadoutScene.svelte.d.ts +16 -0
- package/dist/components/scenes/StageScene.svelte +104 -0
- package/dist/components/scenes/StageScene.svelte.d.ts +18 -0
- package/dist/examples/FieldReport.svelte +223 -0
- package/dist/examples/FieldReport.svelte.d.ts +18 -0
- package/dist/examples/ObservationDeck.svelte +317 -0
- package/dist/examples/ObservationDeck.svelte.d.ts +3 -0
- package/dist/examples/SignalLost.svelte +191 -0
- package/dist/examples/SignalLost.svelte.d.ts +3 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +83 -0
- package/dist/system/actions/echo.d.ts +10 -0
- package/dist/system/actions/echo.js +46 -0
- package/dist/system/actions/resolve.d.ts +23 -0
- package/dist/system/actions/resolve.js +59 -0
- package/dist/system/actions/reveal.d.ts +18 -0
- package/dist/system/actions/reveal.js +54 -0
- package/dist/system/actions/surface.d.ts +14 -0
- package/dist/system/actions/surface.js +25 -0
- package/dist/system/depth/depth.css +49 -0
- package/dist/system/depth/depth.d.ts +15 -0
- package/dist/system/depth/depth.js +24 -0
- package/dist/system/expressions.css +80 -0
- package/dist/system/override-template.css +72 -0
- package/dist/system/register.css +74 -0
- package/dist/system/register.d.ts +11 -0
- package/dist/system/register.js +16 -0
- package/dist/tokens/tokens.css +86 -0
- package/dist/tokens/tokens.d.ts +25 -0
- package/dist/tokens/tokens.js +25 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/cn.js +4 -0
- package/dist/utils/motion.d.ts +17 -0
- package/dist/utils/motion.js +11 -0
- package/package.json +60 -0
package/README.md
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
<!-- =========================================================
|
|
2
|
+
hyvui // COMPONENT LIBRARY
|
|
3
|
+
Svelte 5. Dark by default. Operator-adjacent.
|
|
4
|
+
========================================================== -->
|
|
5
|
+
|
|
6
|
+
<pre align="center">
|
|
7
|
+
██╗ ██╗██╗ ██╗██╗ ██╗ ██╗ ██╗██╗
|
|
8
|
+
██║ ██║╚██╗ ██╔╝██║ ██║ ██║ ██║██║
|
|
9
|
+
███████║ ╚████╔╝ ██║ ██║ ██║ ██║██║
|
|
10
|
+
██╔══██║ ╚██╔╝ ╚██╗ ██╔╝ ██║ ██║██║
|
|
11
|
+
██║ ██║ ██║ ╚████╔╝ ╚████╔╝ ██║
|
|
12
|
+
╚═╝ ╚═╝ ╚═╝ ╚═══╝ ╚═══╝ ╚═╝
|
|
13
|
+
</pre>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<sub><code>svelte 5 · typescript · tailwind v4 · dark by default</code></sub>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<br/>
|
|
20
|
+
|
|
21
|
+
<table>
|
|
22
|
+
<tr>
|
|
23
|
+
<td width="52%" valign="top">
|
|
24
|
+
|
|
25
|
+
`01 / what it is`
|
|
26
|
+
|
|
27
|
+
<pre lang="txt">
|
|
28
|
+
[ OK ] component library for svelte 5
|
|
29
|
+
[ OK ] token-driven, no hardcoded values
|
|
30
|
+
[ OK ] operator aesthetic, not startup aesthetic
|
|
31
|
+
[WARN] opinionated about how things should feel
|
|
32
|
+
</pre>
|
|
33
|
+
|
|
34
|
+
<sub><i>built for interfaces that should feel like they are paying attention.</i></sub>
|
|
35
|
+
|
|
36
|
+
</td>
|
|
37
|
+
<td width="48%" valign="top">
|
|
38
|
+
|
|
39
|
+
`02 / what it is not`
|
|
40
|
+
|
|
41
|
+
- a general-purpose design system
|
|
42
|
+
- configurable to any aesthetic
|
|
43
|
+
- optimized for light mode
|
|
44
|
+
- trying to look like everything else
|
|
45
|
+
|
|
46
|
+
<sub>the palette is two colors and they do not negotiate.</sub>
|
|
47
|
+
|
|
48
|
+
</td>
|
|
49
|
+
</tr>
|
|
50
|
+
</table>
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
`03 / install`
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
npm install hyvui
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```svelte
|
|
61
|
+
<script>
|
|
62
|
+
import { Button, Text, FloatCard } from 'hyvui';
|
|
63
|
+
</script>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
import the styles once at the root of your app:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
// app.css or root layout
|
|
70
|
+
import 'hyvui/styles';
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
`04 / structure`
|
|
76
|
+
|
|
77
|
+
<table>
|
|
78
|
+
<tr>
|
|
79
|
+
<td valign="top" width="33%">
|
|
80
|
+
|
|
81
|
+
**primitives**
|
|
82
|
+
```
|
|
83
|
+
Text Label
|
|
84
|
+
Icon Divider
|
|
85
|
+
Surface
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**inputs**
|
|
89
|
+
```
|
|
90
|
+
Button Input
|
|
91
|
+
Textarea Select
|
|
92
|
+
Checkbox Toggle
|
|
93
|
+
FileUpload
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**feedback**
|
|
97
|
+
```
|
|
98
|
+
Alert Toast
|
|
99
|
+
StatusDot StatusLine
|
|
100
|
+
Skeleton EmptyState
|
|
101
|
+
ErrorState
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
</td>
|
|
105
|
+
<td valign="top" width="33%">
|
|
106
|
+
|
|
107
|
+
**layout**
|
|
108
|
+
```
|
|
109
|
+
Stack Grid
|
|
110
|
+
Card Panel
|
|
111
|
+
Modal Drawer
|
|
112
|
+
Popover
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**navigation**
|
|
116
|
+
```
|
|
117
|
+
Topbar SidebarNav
|
|
118
|
+
Tabs Breadcrumb
|
|
119
|
+
DropdownMenu
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**display**
|
|
123
|
+
```
|
|
124
|
+
Badge Avatar
|
|
125
|
+
Table CodeBlock
|
|
126
|
+
MetricCard Blockquote
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
</td>
|
|
130
|
+
<td valign="top" width="33%">
|
|
131
|
+
|
|
132
|
+
**ambient**
|
|
133
|
+
```
|
|
134
|
+
GridOverlay CornerBrackets
|
|
135
|
+
ScanBand Vignette
|
|
136
|
+
ParallaxLayer SignalRing
|
|
137
|
+
GlyphMark DataStream
|
|
138
|
+
ThreadLine
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**depth**
|
|
142
|
+
```
|
|
143
|
+
DepthStage DepthLayer
|
|
144
|
+
FloatCard HorizonGrid
|
|
145
|
+
Plinth
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
**scenes**
|
|
149
|
+
```
|
|
150
|
+
NarrativeScene ReadoutScene
|
|
151
|
+
StageScene ArchiveScene
|
|
152
|
+
LogScene
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
</td>
|
|
156
|
+
</tr>
|
|
157
|
+
</table>
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
`05 / layers`
|
|
162
|
+
|
|
163
|
+
the library is organized in three additive layers. each one works without the next.
|
|
164
|
+
|
|
165
|
+
<pre lang="txt">
|
|
166
|
+
[ base ] 42 components. tokens. css custom properties throughout.
|
|
167
|
+
nothing hardcoded. nothing fighting your cascade.
|
|
168
|
+
|
|
169
|
+
[ expressive ] registers shift the ambient mood of a section.
|
|
170
|
+
expressions carry semantic intent through typography.
|
|
171
|
+
four actions compose onto any element.
|
|
172
|
+
|
|
173
|
+
[ spatial ] CSS 3D depth system. perspective stages. tilt on pointer.
|
|
174
|
+
receding grids. a plinth to stand things on.
|
|
175
|
+
</pre>
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
`06 / registers`
|
|
180
|
+
|
|
181
|
+
registers are named aesthetic states. apply one and the ambient properties shift.
|
|
182
|
+
|
|
183
|
+
```svelte
|
|
184
|
+
<script>
|
|
185
|
+
import { applyRegister } from 'hyvui';
|
|
186
|
+
onMount(() => applyRegister('mission-control'));
|
|
187
|
+
</script>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
| register | character |
|
|
191
|
+
|---|---|
|
|
192
|
+
| `field-notebook` | warm, worn, analog |
|
|
193
|
+
| `mission-control` | cold, precise, dense |
|
|
194
|
+
| `archive` | flat, institutional, drained |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
`07 / expressions`
|
|
199
|
+
|
|
200
|
+
text expressions carry intent beyond variant. pass them to any `Text` component.
|
|
201
|
+
|
|
202
|
+
```svelte
|
|
203
|
+
<Text expression="title-card">the coordinates are empty now</Text>
|
|
204
|
+
<Text expression="readout">signal: –42 dbm</Text>
|
|
205
|
+
<Text expression="manifesto">something was here before we arrived.</Text>
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
`08 / depth`
|
|
211
|
+
|
|
212
|
+
```svelte
|
|
213
|
+
<DepthStage perspective="mid">
|
|
214
|
+
<DepthLayer level="ground">
|
|
215
|
+
<HorizonGrid rows={16} cols={10} vanishY={0.35} />
|
|
216
|
+
</DepthLayer>
|
|
217
|
+
<DepthLayer level="raised">
|
|
218
|
+
<FloatCard tiltMax={6}>
|
|
219
|
+
<Label color="muted">signal strength</Label>
|
|
220
|
+
<Text variant="heading" color="primary">–42 dbm</Text>
|
|
221
|
+
</FloatCard>
|
|
222
|
+
</DepthLayer>
|
|
223
|
+
</DepthStage>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
all 3D transforms are disabled under `prefers-reduced-motion`.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
`09 / tokens`
|
|
231
|
+
|
|
232
|
+
two accent colors. everything else is neutral.
|
|
233
|
+
|
|
234
|
+
```css
|
|
235
|
+
--accent /* gold — #c79c57 — warmth, action, age */
|
|
236
|
+
--signal /* teal — #79a6a3 — data, status, precision */
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
override per-section with `--reg-*` properties. documented in `override-template.css`.
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
<details>
|
|
244
|
+
<summary><code>10 / notes</code></summary>
|
|
245
|
+
<br/>
|
|
246
|
+
|
|
247
|
+
the library assumes you want the interface to have a mood.
|
|
248
|
+
<br/>
|
|
249
|
+
if you do not want that, it will still work. it will just feel a little contained.
|
|
250
|
+
<br/><br/>
|
|
251
|
+
svelte 5 only. no compatibility shims.
|
|
252
|
+
|
|
253
|
+
</details>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
/** Bracket arm length in pixels. */
|
|
6
|
+
size?: number;
|
|
7
|
+
/** Bracket color. */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Additional CSS classes. */
|
|
10
|
+
class?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
size = 32,
|
|
15
|
+
color = 'rgba(199, 156, 87, 0.24)',
|
|
16
|
+
class: className = '',
|
|
17
|
+
}: Props = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<div class={cn('hyvui-corners', className)} aria-hidden="true">
|
|
21
|
+
<span
|
|
22
|
+
class="hyvui-corner hyvui-corner-tl"
|
|
23
|
+
style:width="{size}px"
|
|
24
|
+
style:height="{size}px"
|
|
25
|
+
style:border-color={color}
|
|
26
|
+
></span>
|
|
27
|
+
<span
|
|
28
|
+
class="hyvui-corner hyvui-corner-tr"
|
|
29
|
+
style:width="{size}px"
|
|
30
|
+
style:height="{size}px"
|
|
31
|
+
style:border-color={color}
|
|
32
|
+
></span>
|
|
33
|
+
<span
|
|
34
|
+
class="hyvui-corner hyvui-corner-bl"
|
|
35
|
+
style:width="{size}px"
|
|
36
|
+
style:height="{size}px"
|
|
37
|
+
style:border-color={color}
|
|
38
|
+
></span>
|
|
39
|
+
<span
|
|
40
|
+
class="hyvui-corner hyvui-corner-br"
|
|
41
|
+
style:width="{size}px"
|
|
42
|
+
style:height="{size}px"
|
|
43
|
+
style:border-color={color}
|
|
44
|
+
></span>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<style>
|
|
48
|
+
.hyvui-corners {
|
|
49
|
+
position: absolute;
|
|
50
|
+
inset: 0;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.hyvui-corner {
|
|
55
|
+
position: absolute;
|
|
56
|
+
border-style: solid;
|
|
57
|
+
border-width: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.hyvui-corner-tl {
|
|
61
|
+
top: 0;
|
|
62
|
+
left: 0;
|
|
63
|
+
border-top-width: 1px;
|
|
64
|
+
border-left-width: 1px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.hyvui-corner-tr {
|
|
68
|
+
top: 0;
|
|
69
|
+
right: 0;
|
|
70
|
+
border-top-width: 1px;
|
|
71
|
+
border-right-width: 1px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.hyvui-corner-bl {
|
|
75
|
+
bottom: 0;
|
|
76
|
+
left: 0;
|
|
77
|
+
border-bottom-width: 1px;
|
|
78
|
+
border-left-width: 1px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.hyvui-corner-br {
|
|
82
|
+
bottom: 0;
|
|
83
|
+
right: 0;
|
|
84
|
+
border-bottom-width: 1px;
|
|
85
|
+
border-right-width: 1px;
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Bracket arm length in pixels. */
|
|
3
|
+
size?: number;
|
|
4
|
+
/** Bracket color. */
|
|
5
|
+
color?: string;
|
|
6
|
+
/** Additional CSS classes. */
|
|
7
|
+
class?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const CornerBrackets: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type CornerBrackets = ReturnType<typeof CornerBrackets>;
|
|
11
|
+
export default CornerBrackets;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import { onMount } from 'svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Enable the scrolling animation. */
|
|
7
|
+
active?: boolean;
|
|
8
|
+
/** Width of the stream column. */
|
|
9
|
+
width?: string;
|
|
10
|
+
/** Scroll speed. */
|
|
11
|
+
speed?: 'slow' | 'medium';
|
|
12
|
+
/** Additional CSS classes. */
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
active = true,
|
|
18
|
+
width = '1.2rem',
|
|
19
|
+
speed = 'slow',
|
|
20
|
+
class: className = '',
|
|
21
|
+
}: Props = $props();
|
|
22
|
+
|
|
23
|
+
const chars = '0123456789ABCDEF.:+-';
|
|
24
|
+
const lineCount = 32;
|
|
25
|
+
let lines = $state<string[]>([]);
|
|
26
|
+
let intervalId: ReturnType<typeof setInterval> | undefined;
|
|
27
|
+
|
|
28
|
+
const prefersReduced =
|
|
29
|
+
typeof window !== 'undefined'
|
|
30
|
+
? window.matchMedia('(prefers-reduced-motion: reduce)').matches
|
|
31
|
+
: false;
|
|
32
|
+
|
|
33
|
+
function randomChar(): string {
|
|
34
|
+
return chars[Math.floor(Math.random() * chars.length)];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function generateLines(): string[] {
|
|
38
|
+
return Array.from({ length: lineCount }, () => randomChar());
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
onMount(() => {
|
|
42
|
+
lines = generateLines();
|
|
43
|
+
|
|
44
|
+
if (active && !prefersReduced) {
|
|
45
|
+
const ms = speed === 'slow' ? 600 : 350;
|
|
46
|
+
intervalId = setInterval(() => {
|
|
47
|
+
lines = [randomChar(), ...lines.slice(0, lineCount - 1)];
|
|
48
|
+
}, ms);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return () => {
|
|
52
|
+
if (intervalId) clearInterval(intervalId);
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
</script>
|
|
56
|
+
|
|
57
|
+
<div
|
|
58
|
+
class={cn('hyvui-data-stream', className)}
|
|
59
|
+
style:width={width}
|
|
60
|
+
aria-hidden="true"
|
|
61
|
+
>
|
|
62
|
+
{#each lines as char, i}
|
|
63
|
+
<span
|
|
64
|
+
class="hyvui-data-stream-char"
|
|
65
|
+
style:opacity={0.18 - (i / lineCount) * 0.14}
|
|
66
|
+
>{char}</span>
|
|
67
|
+
{/each}
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<style>
|
|
71
|
+
.hyvui-data-stream {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
align-items: center;
|
|
75
|
+
font-family: var(--font-mono);
|
|
76
|
+
font-size: 0.6rem;
|
|
77
|
+
line-height: 1.4;
|
|
78
|
+
letter-spacing: 0.1em;
|
|
79
|
+
color: var(--accent);
|
|
80
|
+
pointer-events: none;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.hyvui-data-stream-char {
|
|
85
|
+
display: block;
|
|
86
|
+
transition: opacity 0.3s ease-out;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media (prefers-reduced-motion: reduce) {
|
|
90
|
+
.hyvui-data-stream-char {
|
|
91
|
+
transition: none;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Enable the scrolling animation. */
|
|
3
|
+
active?: boolean;
|
|
4
|
+
/** Width of the stream column. */
|
|
5
|
+
width?: string;
|
|
6
|
+
/** Scroll speed. */
|
|
7
|
+
speed?: 'slow' | 'medium';
|
|
8
|
+
/** Additional CSS classes. */
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const DataStream: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type DataStream = ReturnType<typeof DataStream>;
|
|
13
|
+
export default DataStream;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
/** Glyph variant. */
|
|
6
|
+
variant?: 'cross' | 'reticle' | 'coord' | 'mark';
|
|
7
|
+
/** Size in pixels. */
|
|
8
|
+
size?: number;
|
|
9
|
+
/** Glyph color. */
|
|
10
|
+
color?: string;
|
|
11
|
+
/** Additional CSS classes. */
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
variant = 'cross',
|
|
17
|
+
size = 24,
|
|
18
|
+
color = 'var(--muted-strong)',
|
|
19
|
+
class: className = '',
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<svg
|
|
24
|
+
class={cn('hyvui-glyph-mark', className)}
|
|
25
|
+
width={size}
|
|
26
|
+
height={size}
|
|
27
|
+
viewBox="0 0 24 24"
|
|
28
|
+
fill="none"
|
|
29
|
+
stroke={color}
|
|
30
|
+
stroke-width="1"
|
|
31
|
+
aria-hidden="true"
|
|
32
|
+
>
|
|
33
|
+
{#if variant === 'cross'}
|
|
34
|
+
<!-- coordinate cross -->
|
|
35
|
+
<line x1="12" y1="4" x2="12" y2="20" />
|
|
36
|
+
<line x1="4" y1="12" x2="20" y2="12" />
|
|
37
|
+
<circle cx="12" cy="12" r="1.5" fill={color} stroke="none" />
|
|
38
|
+
{:else if variant === 'reticle'}
|
|
39
|
+
<!-- targeting reticle -->
|
|
40
|
+
<circle cx="12" cy="12" r="8" />
|
|
41
|
+
<circle cx="12" cy="12" r="3" />
|
|
42
|
+
<line x1="12" y1="1" x2="12" y2="5" />
|
|
43
|
+
<line x1="12" y1="19" x2="12" y2="23" />
|
|
44
|
+
<line x1="1" y1="12" x2="5" y2="12" />
|
|
45
|
+
<line x1="19" y1="12" x2="23" y2="12" />
|
|
46
|
+
{:else if variant === 'coord'}
|
|
47
|
+
<!-- cartographic coordinate marker -->
|
|
48
|
+
<line x1="12" y1="2" x2="12" y2="8" />
|
|
49
|
+
<line x1="12" y1="16" x2="12" y2="22" />
|
|
50
|
+
<line x1="2" y1="12" x2="8" y2="12" />
|
|
51
|
+
<line x1="16" y1="12" x2="22" y2="12" />
|
|
52
|
+
<rect x="9" y="9" width="6" height="6" rx="0.5" />
|
|
53
|
+
{:else if variant === 'mark'}
|
|
54
|
+
<!-- measurement mark -->
|
|
55
|
+
<line x1="4" y1="20" x2="20" y2="4" />
|
|
56
|
+
<line x1="4" y1="20" x2="4" y2="15" />
|
|
57
|
+
<line x1="4" y1="20" x2="9" y2="20" />
|
|
58
|
+
<circle cx="12" cy="12" r="1" fill={color} stroke="none" />
|
|
59
|
+
{/if}
|
|
60
|
+
</svg>
|
|
61
|
+
|
|
62
|
+
<style>
|
|
63
|
+
.hyvui-glyph-mark {
|
|
64
|
+
display: inline-block;
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
flex-shrink: 0;
|
|
67
|
+
opacity: 0.5;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Glyph variant. */
|
|
3
|
+
variant?: 'cross' | 'reticle' | 'coord' | 'mark';
|
|
4
|
+
/** Size in pixels. */
|
|
5
|
+
size?: number;
|
|
6
|
+
/** Glyph color. */
|
|
7
|
+
color?: string;
|
|
8
|
+
/** Additional CSS classes. */
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const GlyphMark: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type GlyphMark = ReturnType<typeof GlyphMark>;
|
|
13
|
+
export default GlyphMark;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
/** Additional CSS classes. */
|
|
6
|
+
class?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let {
|
|
10
|
+
class: className = '',
|
|
11
|
+
}: Props = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div class={cn('hyvui-grid-overlay', className)} aria-hidden="true"></div>
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
|
+
.hyvui-grid-overlay {
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset: 0;
|
|
20
|
+
pointer-events: none;
|
|
21
|
+
background-image:
|
|
22
|
+
linear-gradient(to right, rgba(199, 156, 87, 0.04) 1px, transparent 1px),
|
|
23
|
+
linear-gradient(to bottom, rgba(199, 156, 87, 0.04) 1px, transparent 1px);
|
|
24
|
+
background-size: 72px 72px;
|
|
25
|
+
mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
|
|
26
|
+
-webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Motion multiplier applied to --px/--py custom properties. */
|
|
7
|
+
strength?: number;
|
|
8
|
+
/** Additional CSS classes. */
|
|
9
|
+
class?: string;
|
|
10
|
+
/** Content to apply parallax to. */
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let {
|
|
15
|
+
strength = 18,
|
|
16
|
+
class: className = '',
|
|
17
|
+
children,
|
|
18
|
+
}: Props = $props();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div
|
|
22
|
+
class={cn('hyvui-parallax', className)}
|
|
23
|
+
style:transform="translate(calc(var(--px, 0) * {strength}px), calc(var(--py, 0) * {strength}px))"
|
|
24
|
+
aria-hidden="true"
|
|
25
|
+
>
|
|
26
|
+
{#if children}{@render children()}{/if}
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<style>
|
|
30
|
+
.hyvui-parallax {
|
|
31
|
+
will-change: transform;
|
|
32
|
+
transition: transform 0.15s ease-out;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (prefers-reduced-motion: reduce) {
|
|
36
|
+
.hyvui-parallax {
|
|
37
|
+
transform: none !important;
|
|
38
|
+
transition: none;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Motion multiplier applied to --px/--py custom properties. */
|
|
4
|
+
strength?: number;
|
|
5
|
+
/** Additional CSS classes. */
|
|
6
|
+
class?: string;
|
|
7
|
+
/** Content to apply parallax to. */
|
|
8
|
+
children?: Snippet;
|
|
9
|
+
}
|
|
10
|
+
declare const ParallaxLayer: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type ParallaxLayer = ReturnType<typeof ParallaxLayer>;
|
|
12
|
+
export default ParallaxLayer;
|