@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
@@ -1,223 +1,226 @@
1
- <!--
2
- EXAMPLE: Field Report
3
- REGISTER: field-notebook
4
- CONCEPT: a case study page that reads like a recovered classified document
5
- DEMONSTRATES: NarrativeScene, FloatCard, Plinth, MetricCard, Table, Blockquote, CodeBlock, Badge, Text expressions, DepthStage, DepthLayer, GlyphMark, surface action
6
- INSPIRED BY: a handwritten field notebook digitized and presented across a table
7
- -->
8
- <script lang="ts">
9
- import {
10
- Text,
11
- Label,
12
- Badge,
13
- Divider,
14
- Stack,
15
- Grid,
16
- MetricCard,
17
- Table,
18
- Blockquote,
19
- CodeBlock,
20
- NarrativeScene,
21
- FloatCard,
22
- Plinth,
23
- DepthStage,
24
- DepthLayer,
25
- GlyphMark,
26
- CornerBrackets,
27
- surface,
28
- applyRegister,
29
- } from '../index.js';
30
- import { onMount } from 'svelte';
31
-
32
- const metrics = [
33
- { label: 'first paint', value: '0.8s', trend: 'down' as const, trendValue: '-34%' },
34
- { label: 'bundle weight', value: '12kb', trend: 'down' as const, trendValue: '-61%' },
35
- { label: 'field duration', value: '9 weeks', trend: 'neutral' as const, trendValue: '' },
36
- ];
37
-
38
- const phases = [
39
- { phase: '01', designation: 'survey', date: '2025.09.12', status: 'complete' },
40
- { phase: '02', designation: 'excavation', date: '2025.09.28', status: 'complete' },
41
- { phase: '03', designation: 'assembly', date: '2025.10.14', status: 'complete' },
42
- { phase: '04', designation: 'calibration', date: '2025.10.30', status: 'complete' },
43
- { phase: '05', designation: 'field test', date: '2025.11.08', status: 'complete' },
44
- { phase: '06', designation: 'deployment', date: '2025.11.15', status: 'active' },
45
- ];
46
-
47
- const phaseColumns = [
48
- { key: 'phase', label: 'phase' },
49
- { key: 'designation', label: 'designation' },
50
- { key: 'date', label: 'date' },
51
- { key: 'status', label: 'status' },
52
- ];
53
-
54
- const codeSnippet = `const signal = await listen({
55
- frequency: 47.2,
56
- threshold: 0.003,
57
- timeout: Infinity,
58
- });
59
-
60
- if (signal.strength > baseline) {
61
- log('contact', signal.origin);
62
- }`;
63
-
64
- const technologies = ['svelte', 'typescript', 'css custom properties', 'canvas 2d', 'webgl'];
65
-
66
- onMount(() => {
67
- applyRegister('field-notebook');
68
- return () => {
69
- document.body.removeAttribute('data-register');
70
- };
71
- });
72
- </script>
73
-
74
- <NarrativeScene chapter="field report 03 — signal architecture">
75
- {#snippet heading()}
76
- <DepthStage perspective="far">
77
- <DepthLayer level="foreground">
78
- <Text variant="heading" expression="title-card" as="h1" color="primary">
79
- building the listening station
80
- </Text>
81
- </DepthLayer>
82
- </DepthStage>
83
- {/snippet}
84
-
85
- {#snippet copy()}
86
- <div class="field-report-copy">
87
- <div use:surface={{ delay: 200 }}>
88
- <Text variant="body">
89
- the project started as a question. not the kind you find in a brief.
90
- the kind that stays after the meeting ends. what does it feel like
91
- when a system is paying attention.
92
- </Text>
93
- </div>
94
-
95
- <div use:surface={{ delay: 350 }}>
96
- <Text variant="body">
97
- we built the component library first. not because it was the most
98
- important part, but because naming things forces clarity. every
99
- token, every variant, every slot had to earn its name.
100
- </Text>
101
- </div>
102
-
103
- <div use:surface={{ delay: 500 }}>
104
- <Blockquote>
105
- the real constraint was not technical. it was tonal. how do you
106
- build an interface that feels serious without feeling cold. that
107
- feels precise without feeling sterile.
108
- </Blockquote>
109
- </div>
110
-
111
- <div class="field-report-metrics" use:surface={{ delay: 650 }}>
112
- <DepthStage perspective="far">
113
- <DepthLayer level="raised">
114
- <Grid cols={3} gap="0.75rem">
115
- {#each metrics as m}
116
- <FloatCard tiltMax={5}>
117
- <div class="field-report-metric-inner">
118
- <Label color="muted">{m.label}</Label>
119
- <Text variant="heading" as="span" color="primary">{m.value}</Text>
120
- {#if m.trendValue}
121
- <Text variant="caption" as="span" color={m.trend === 'down' ? 'signal' : 'muted'}>
122
- {m.trend === 'down' ? '\u2193' : '\u2014'} {m.trendValue}
123
- </Text>
124
- {/if}
125
- </div>
126
- </FloatCard>
127
- {/each}
128
- </Grid>
129
- </DepthLayer>
130
- </DepthStage>
131
- <Plinth width="90%" depth="24px" />
132
- </div>
133
-
134
- <div use:surface={{ delay: 800 }}>
135
- <Text expression="chapter" as="span">mission log</Text>
136
- </div>
137
-
138
- <div use:surface={{ delay: 900 }}>
139
- <Table columns={phaseColumns} rows={phases} />
140
- </div>
141
-
142
- <div use:surface={{ delay: 1000 }}>
143
- <Text expression="chapter" as="span">from the field notebook</Text>
144
- </div>
145
-
146
- <div use:surface={{ delay: 1100 }}>
147
- <CodeBlock code={codeSnippet} />
148
- </div>
149
-
150
- <div class="field-report-tags" use:surface={{ delay: 1200 }}>
151
- {#each technologies as tech}
152
- <Badge variant="default">{tech}</Badge>
153
- {/each}
154
- </div>
155
- </div>
156
- {/snippet}
157
-
158
- {#snippet canvas()}
159
- <div class="field-report-canvas" use:surface={{ delay: 400 }}>
160
- <div class="field-report-canvas-inner" style:position="relative">
161
- <CornerBrackets size={40} color="rgba(199, 156, 87, 0.12)" />
162
- <div class="field-report-canvas-marks">
163
- <GlyphMark variant="reticle" size={48} color="var(--muted-strong)" />
164
- <div class="field-report-canvas-label">
165
- <Label color="muted">artifact scan</Label>
166
- <Label color="accent">47.2 mhz</Label>
167
- </div>
168
- </div>
169
- </div>
170
- </div>
171
- {/snippet}
172
- </NarrativeScene>
173
-
174
- <style>
175
- .field-report-copy {
176
- display: flex;
177
- flex-direction: column;
178
- gap: 1.75rem;
179
- }
180
-
181
- .field-report-metrics {
182
- display: flex;
183
- flex-direction: column;
184
- gap: 0.5rem;
185
- }
186
-
187
- .field-report-metric-inner {
188
- display: flex;
189
- flex-direction: column;
190
- gap: 0.25rem;
191
- }
192
-
193
- .field-report-tags {
194
- display: flex;
195
- flex-wrap: wrap;
196
- gap: 0.375rem;
197
- }
198
-
199
- .field-report-canvas {
200
- display: flex;
201
- align-items: center;
202
- justify-content: center;
203
- min-height: 50vh;
204
- }
205
-
206
- .field-report-canvas-inner {
207
- padding: 3rem;
208
- }
209
-
210
- .field-report-canvas-marks {
211
- display: flex;
212
- flex-direction: column;
213
- align-items: center;
214
- gap: 1.5rem;
215
- }
216
-
217
- .field-report-canvas-label {
218
- display: flex;
219
- flex-direction: column;
220
- align-items: center;
221
- gap: 0.25rem;
222
- }
223
- </style>
1
+ <!--
2
+ EXAMPLE: Field Report
3
+ REGISTER: field-notebook
4
+ CONCEPT: a case study page that reads like a recovered classified document
5
+ DEMONSTRATES: NarrativeScene, FloatCard, Plinth, MetricCard, Table, Blockquote, CodeBlock, Badge, Text expressions, DepthStage, DepthLayer, GlyphMark, surface action
6
+ INSPIRED BY: a handwritten field notebook digitized and presented across a table
7
+ -->
8
+ <script lang="ts">
9
+ import {
10
+ Text,
11
+ Label,
12
+ Badge,
13
+ Divider,
14
+ Stack,
15
+ Grid,
16
+ MetricCard,
17
+ Table,
18
+ Blockquote,
19
+ CodeBlock,
20
+ NarrativeScene,
21
+ FloatCard,
22
+ Plinth,
23
+ DepthStage,
24
+ DepthLayer,
25
+ GlyphMark,
26
+ CornerBrackets,
27
+ surface,
28
+ applyRegister
29
+ } from '../index.js';
30
+ import { onMount } from 'svelte';
31
+
32
+ const metrics = [
33
+ { label: 'first paint', value: '0.8s', trend: 'down' as const, trendValue: '-34%' },
34
+ { label: 'bundle weight', value: '12kb', trend: 'down' as const, trendValue: '-61%' },
35
+ { label: 'field duration', value: '9 weeks', trend: 'neutral' as const, trendValue: '' }
36
+ ];
37
+
38
+ const phases = [
39
+ { phase: '01', designation: 'survey', date: '2025.09.12', status: 'complete' },
40
+ { phase: '02', designation: 'excavation', date: '2025.09.28', status: 'complete' },
41
+ { phase: '03', designation: 'assembly', date: '2025.10.14', status: 'complete' },
42
+ { phase: '04', designation: 'calibration', date: '2025.10.30', status: 'complete' },
43
+ { phase: '05', designation: 'field test', date: '2025.11.08', status: 'complete' },
44
+ { phase: '06', designation: 'deployment', date: '2025.11.15', status: 'active' }
45
+ ];
46
+
47
+ const phaseColumns = [
48
+ { key: 'phase', label: 'phase' },
49
+ { key: 'designation', label: 'designation' },
50
+ { key: 'date', label: 'date' },
51
+ { key: 'status', label: 'status' }
52
+ ];
53
+
54
+ const codeSnippet = `const signal = await listen({
55
+ frequency: 47.2,
56
+ threshold: 0.003,
57
+ timeout: Infinity,
58
+ });
59
+
60
+ if (signal.strength > baseline) {
61
+ log('contact', signal.origin);
62
+ }`;
63
+
64
+ const technologies = ['svelte', 'typescript', 'css custom properties', 'canvas 2d', 'webgl'];
65
+
66
+ onMount(() => {
67
+ applyRegister('field-notebook');
68
+ return () => {
69
+ document.body.removeAttribute('data-register');
70
+ };
71
+ });
72
+ </script>
73
+
74
+ <NarrativeScene chapter="field report 03 — signal architecture">
75
+ {#snippet heading()}
76
+ <DepthStage perspective="far">
77
+ <DepthLayer level="foreground">
78
+ <Text variant="heading" expression="title-card" as="h1" color="primary">
79
+ building the listening station
80
+ </Text>
81
+ </DepthLayer>
82
+ </DepthStage>
83
+ {/snippet}
84
+
85
+ {#snippet copy()}
86
+ <div class="field-report-copy">
87
+ <div use:surface={{ delay: 200 }}>
88
+ <Text variant="body">
89
+ the project started as a question. not the kind you find in a brief. the kind that stays
90
+ after the meeting ends. what does it feel like when a system is paying attention.
91
+ </Text>
92
+ </div>
93
+
94
+ <div use:surface={{ delay: 350 }}>
95
+ <Text variant="body">
96
+ we built the component library first. not because it was the most important part, but
97
+ because naming things forces clarity. every token, every variant, every slot had to earn
98
+ its name.
99
+ </Text>
100
+ </div>
101
+
102
+ <div use:surface={{ delay: 500 }}>
103
+ <Blockquote>
104
+ the real constraint was not technical. it was tonal. how do you build an interface that
105
+ feels serious without feeling cold. that feels precise without feeling sterile.
106
+ </Blockquote>
107
+ </div>
108
+
109
+ <div class="field-report-metrics" use:surface={{ delay: 650 }}>
110
+ <DepthStage perspective="far">
111
+ <DepthLayer level="raised">
112
+ <Grid cols={3} gap="0.75rem">
113
+ {#each metrics as m}
114
+ <FloatCard tiltMax={5}>
115
+ <div class="field-report-metric-inner">
116
+ <Label color="muted">{m.label}</Label>
117
+ <Text variant="heading" as="span" color="primary">{m.value}</Text>
118
+ {#if m.trendValue}
119
+ <Text
120
+ variant="caption"
121
+ as="span"
122
+ color={m.trend === 'down' ? 'signal' : 'muted'}
123
+ >
124
+ {m.trend === 'down' ? '\u2193' : '\u2014'}
125
+ {m.trendValue}
126
+ </Text>
127
+ {/if}
128
+ </div>
129
+ </FloatCard>
130
+ {/each}
131
+ </Grid>
132
+ </DepthLayer>
133
+ </DepthStage>
134
+ <Plinth width="90%" depth="24px" />
135
+ </div>
136
+
137
+ <div use:surface={{ delay: 800 }}>
138
+ <Text expression="chapter" as="span">mission log</Text>
139
+ </div>
140
+
141
+ <div use:surface={{ delay: 900 }}>
142
+ <Table columns={phaseColumns} rows={phases} />
143
+ </div>
144
+
145
+ <div use:surface={{ delay: 1000 }}>
146
+ <Text expression="chapter" as="span">from the field notebook</Text>
147
+ </div>
148
+
149
+ <div use:surface={{ delay: 1100 }}>
150
+ <CodeBlock code={codeSnippet} />
151
+ </div>
152
+
153
+ <div class="field-report-tags" use:surface={{ delay: 1200 }}>
154
+ {#each technologies as tech}
155
+ <Badge variant="default">{tech}</Badge>
156
+ {/each}
157
+ </div>
158
+ </div>
159
+ {/snippet}
160
+
161
+ {#snippet canvas()}
162
+ <div class="field-report-canvas" use:surface={{ delay: 400 }}>
163
+ <div class="field-report-canvas-inner" style:position="relative">
164
+ <CornerBrackets size={40} color="rgba(199, 156, 87, 0.12)" />
165
+ <div class="field-report-canvas-marks">
166
+ <GlyphMark variant="reticle" size={48} color="var(--muted-strong)" />
167
+ <div class="field-report-canvas-label">
168
+ <Label color="muted">artifact scan</Label>
169
+ <Label color="accent">47.2 mhz</Label>
170
+ </div>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ {/snippet}
175
+ </NarrativeScene>
176
+
177
+ <style>
178
+ .field-report-copy {
179
+ display: flex;
180
+ flex-direction: column;
181
+ gap: 1.75rem;
182
+ }
183
+
184
+ .field-report-metrics {
185
+ display: flex;
186
+ flex-direction: column;
187
+ gap: 0.5rem;
188
+ }
189
+
190
+ .field-report-metric-inner {
191
+ display: flex;
192
+ flex-direction: column;
193
+ gap: 0.25rem;
194
+ }
195
+
196
+ .field-report-tags {
197
+ display: flex;
198
+ flex-wrap: wrap;
199
+ gap: 0.375rem;
200
+ }
201
+
202
+ .field-report-canvas {
203
+ display: flex;
204
+ align-items: center;
205
+ justify-content: center;
206
+ min-height: 50vh;
207
+ }
208
+
209
+ .field-report-canvas-inner {
210
+ padding: 3rem;
211
+ }
212
+
213
+ .field-report-canvas-marks {
214
+ display: flex;
215
+ flex-direction: column;
216
+ align-items: center;
217
+ gap: 1.5rem;
218
+ }
219
+
220
+ .field-report-canvas-label {
221
+ display: flex;
222
+ flex-direction: column;
223
+ align-items: center;
224
+ gap: 0.25rem;
225
+ }
226
+ </style>