@hyvnt/hyvui 0.2.0 → 0.3.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 (86) hide show
  1. package/README.md +264 -253
  2. package/dist/components/ambient/CornerBrackets.svelte +83 -87
  3. package/dist/components/ambient/DataStream.svelte +111 -94
  4. package/dist/components/ambient/GlyphMark.svelte +69 -69
  5. package/dist/components/ambient/GridOverlay.svelte +26 -28
  6. package/dist/components/ambient/ParallaxLayer.svelte +37 -41
  7. package/dist/components/ambient/ScanBand.svelte +95 -91
  8. package/dist/components/ambient/SignalRing.svelte +100 -100
  9. package/dist/components/ambient/ThreadLine.svelte +71 -78
  10. package/dist/components/ambient/Vignette.svelte +24 -26
  11. package/dist/components/depth/DepthLayer.svelte +22 -27
  12. package/dist/components/depth/DepthStage.svelte +63 -62
  13. package/dist/components/depth/FloatCard.svelte +113 -104
  14. package/dist/components/depth/HorizonGrid.svelte +216 -160
  15. package/dist/components/depth/Plinth.svelte +52 -57
  16. package/dist/components/display/Avatar.svelte +64 -69
  17. package/dist/components/display/Badge.svelte +59 -63
  18. package/dist/components/display/Blockquote.svelte +31 -34
  19. package/dist/components/display/CodeBlock.svelte +71 -76
  20. package/dist/components/display/MetricCard.svelte +77 -83
  21. package/dist/components/display/Table.svelte +99 -104
  22. package/dist/components/feedback/Alert.svelte +71 -76
  23. package/dist/components/feedback/EmptyState.svelte +68 -68
  24. package/dist/components/feedback/ErrorState.svelte +73 -73
  25. package/dist/components/feedback/Skeleton.svelte +52 -52
  26. package/dist/components/feedback/StatusDot.svelte +49 -54
  27. package/dist/components/feedback/StatusLine.svelte +122 -122
  28. package/dist/components/feedback/Toast.svelte +130 -136
  29. package/dist/components/inputs/Button.svelte +240 -237
  30. package/dist/components/inputs/Checkbox.svelte +104 -105
  31. package/dist/components/inputs/FileUpload.svelte +165 -163
  32. package/dist/components/inputs/Input.svelte +145 -147
  33. package/dist/components/inputs/Select.svelte +156 -150
  34. package/dist/components/inputs/Textarea.svelte +153 -154
  35. package/dist/components/inputs/Toggle.svelte +120 -120
  36. package/dist/components/layout/Card.svelte +70 -76
  37. package/dist/components/layout/Drawer.svelte +133 -109
  38. package/dist/components/layout/Grid.svelte +118 -43
  39. package/dist/components/layout/Grid.svelte.d.ts +8 -2
  40. package/dist/components/layout/Modal.svelte +176 -159
  41. package/dist/components/layout/Panel.svelte +49 -54
  42. package/dist/components/layout/Popover.svelte +178 -67
  43. package/dist/components/layout/Popover.svelte.d.ts +10 -1
  44. package/dist/components/layout/Stack.svelte +53 -53
  45. package/dist/components/navigation/Breadcrumb.svelte +70 -73
  46. package/dist/components/navigation/DropdownMenu.svelte +167 -124
  47. package/dist/components/navigation/DropdownMenu.svelte.d.ts +12 -2
  48. package/dist/components/navigation/SidebarNav.svelte +86 -90
  49. package/dist/components/navigation/Tabs.svelte +81 -86
  50. package/dist/components/navigation/Topbar.svelte +85 -85
  51. package/dist/components/patterns/ActionBar.svelte +71 -76
  52. package/dist/components/patterns/ConfirmDialog.svelte +63 -64
  53. package/dist/components/patterns/PageHeader.svelte +109 -114
  54. package/dist/components/patterns/SearchBar.svelte +54 -59
  55. package/dist/components/patterns/TerminalBoot.svelte +104 -104
  56. package/dist/components/primitives/Divider.svelte +26 -29
  57. package/dist/components/primitives/Icon.svelte +44 -49
  58. package/dist/components/primitives/Label.svelte +39 -44
  59. package/dist/components/primitives/Surface.svelte +89 -87
  60. package/dist/components/primitives/Text.svelte +98 -98
  61. package/dist/components/scenes/ArchiveScene.svelte +92 -95
  62. package/dist/components/scenes/ArchiveScene.svelte.d.ts +7 -1
  63. package/dist/components/scenes/LogScene.svelte +72 -77
  64. package/dist/components/scenes/NarrativeScene.svelte +91 -92
  65. package/dist/components/scenes/ReadoutScene.svelte +120 -107
  66. package/dist/components/scenes/ReadoutScene.svelte.d.ts +3 -1
  67. package/dist/components/scenes/StageScene.svelte +97 -104
  68. package/dist/examples/FieldReport.svelte +226 -223
  69. package/dist/examples/ObservationDeck.svelte +333 -317
  70. package/dist/examples/SignalLost.svelte +191 -191
  71. package/dist/styles.css +113 -0
  72. package/dist/system/actions/echo.js +9 -9
  73. package/dist/system/actions/resolve.js +9 -9
  74. package/dist/system/actions/reveal.js +1 -1
  75. package/dist/system/actions/surface.js +13 -1
  76. package/dist/system/depth/depth.css +49 -49
  77. package/dist/system/depth/depth.js +1 -1
  78. package/dist/system/expressions.css +80 -80
  79. package/dist/system/override-template.css +72 -72
  80. package/dist/system/register.css +74 -74
  81. package/dist/system/scroll-lock.d.ts +6 -0
  82. package/dist/system/scroll-lock.js +23 -0
  83. package/dist/tokens/tokens.css +100 -86
  84. package/dist/tokens/tokens.js +4 -4
  85. package/dist/utils/motion.js +1 -1
  86. package/package.json +67 -60
package/README.md CHANGED
@@ -1,253 +1,264 @@
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 @hyvnt/hyvui
58
- ```
59
-
60
- ```svelte
61
- <script>
62
- import { Button, Text, FloatCard } from '@hyvnt/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 '@hyvnt/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 '@hyvnt/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>
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
+
50
+ </tr>
51
+ </table>
52
+
53
+ ---
54
+
55
+ `03 / install`
56
+
57
+ ```sh
58
+ npm install @hyvnt/hyvui
59
+ ```
60
+
61
+ ```svelte
62
+ <script>
63
+ import { Button, Text, FloatCard } from '@hyvnt/hyvui';
64
+ </script>
65
+ ```
66
+
67
+ import the styles once at the root of your app:
68
+
69
+ ```ts
70
+ // app.css or root layout
71
+ import '@hyvnt/hyvui/styles.css';
72
+ ```
73
+
74
+ ---
75
+
76
+ `04 / structure`
77
+
78
+ <table>
79
+ <tr>
80
+ <td valign="top" width="33%">
81
+
82
+ **primitives**
83
+
84
+ ```
85
+ Text Label
86
+ Icon Divider
87
+ Surface
88
+ ```
89
+
90
+ **inputs**
91
+
92
+ ```
93
+ Button Input
94
+ Textarea Select
95
+ Checkbox Toggle
96
+ FileUpload
97
+ ```
98
+
99
+ **feedback**
100
+
101
+ ```
102
+ Alert Toast
103
+ StatusDot StatusLine
104
+ Skeleton EmptyState
105
+ ErrorState
106
+ ```
107
+
108
+ </td>
109
+ <td valign="top" width="33%">
110
+
111
+ **layout**
112
+
113
+ ```
114
+ Stack Grid
115
+ Card Panel
116
+ Modal Drawer
117
+ Popover
118
+ ```
119
+
120
+ **navigation**
121
+
122
+ ```
123
+ Topbar SidebarNav
124
+ Tabs Breadcrumb
125
+ DropdownMenu
126
+ ```
127
+
128
+ **display**
129
+
130
+ ```
131
+ Badge Avatar
132
+ Table CodeBlock
133
+ MetricCard Blockquote
134
+ ```
135
+
136
+ </td>
137
+ <td valign="top" width="33%">
138
+
139
+ **ambient**
140
+
141
+ ```
142
+ GridOverlay CornerBrackets
143
+ ScanBand Vignette
144
+ ParallaxLayer SignalRing
145
+ GlyphMark DataStream
146
+ ThreadLine
147
+ ```
148
+
149
+ **depth**
150
+
151
+ ```
152
+ DepthStage DepthLayer
153
+ FloatCard HorizonGrid
154
+ Plinth
155
+ ```
156
+
157
+ **scenes**
158
+
159
+ ```
160
+ NarrativeScene ReadoutScene
161
+ StageScene ArchiveScene
162
+ LogScene
163
+ ```
164
+
165
+ </td>
166
+
167
+ </tr>
168
+ </table>
169
+
170
+ ---
171
+
172
+ `05 / layers`
173
+
174
+ the library is organized in three additive layers. each one works without the next.
175
+
176
+ <pre lang="txt">
177
+ [ base ] 42 components. tokens. css custom properties throughout.
178
+ nothing hardcoded. nothing fighting your cascade.
179
+
180
+ [ expressive ] registers shift the ambient mood of a section.
181
+ expressions carry semantic intent through typography.
182
+ four actions compose onto any element.
183
+
184
+ [ spatial ] CSS 3D depth system. perspective stages. tilt on pointer.
185
+ receding grids. a plinth to stand things on.
186
+ </pre>
187
+
188
+ ---
189
+
190
+ `06 / registers`
191
+
192
+ registers are named aesthetic states. apply one and the ambient properties shift.
193
+
194
+ ```svelte
195
+ <script>
196
+ import { applyRegister } from '@hyvnt/hyvui';
197
+ onMount(() => applyRegister('mission-control'));
198
+ </script>
199
+ ```
200
+
201
+ | register | character |
202
+ | ----------------- | ---------------------------- |
203
+ | `field-notebook` | warm, worn, analog |
204
+ | `mission-control` | cold, precise, dense |
205
+ | `archive` | flat, institutional, drained |
206
+
207
+ ---
208
+
209
+ `07 / expressions`
210
+
211
+ text expressions carry intent beyond variant. pass them to any `Text` component.
212
+
213
+ ```svelte
214
+ <Text expression="title-card">the coordinates are empty now</Text>
215
+ <Text expression="readout">signal: –42 dbm</Text>
216
+ <Text expression="manifesto">something was here before we arrived.</Text>
217
+ ```
218
+
219
+ ---
220
+
221
+ `08 / depth`
222
+
223
+ ```svelte
224
+ <DepthStage perspective="mid">
225
+ <DepthLayer level="ground">
226
+ <HorizonGrid rows={16} cols={10} vanishY={0.35} />
227
+ </DepthLayer>
228
+ <DepthLayer level="raised">
229
+ <FloatCard tiltMax={6}>
230
+ <Label color="muted">signal strength</Label>
231
+ <Text variant="heading" color="primary">–42 dbm</Text>
232
+ </FloatCard>
233
+ </DepthLayer>
234
+ </DepthStage>
235
+ ```
236
+
237
+ all 3D transforms are disabled under `prefers-reduced-motion`.
238
+
239
+ ---
240
+
241
+ `09 / tokens`
242
+
243
+ two accent colors. everything else is neutral.
244
+
245
+ ```css
246
+ --accent /* gold — #c79c57 — warmth, action, age */
247
+ --signal /* teal #79a6a3 data, status, precision */
248
+ ```
249
+
250
+ override per-section with `--reg-*` properties. documented in `override-template.css`.
251
+
252
+ ---
253
+
254
+ <details>
255
+ <summary><code>10 / notes</code></summary>
256
+ <br/>
257
+
258
+ the library assumes you want the interface to have a mood.
259
+ <br/>
260
+ if you do not want that, it will still work. it will just feel a little contained.
261
+ <br/><br/>
262
+ svelte 5 only. no compatibility shims.
263
+
264
+ </details>