@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.
- package/README.md +264 -253
- package/dist/components/ambient/CornerBrackets.svelte +83 -87
- package/dist/components/ambient/DataStream.svelte +111 -94
- package/dist/components/ambient/GlyphMark.svelte +69 -69
- package/dist/components/ambient/GridOverlay.svelte +26 -28
- package/dist/components/ambient/ParallaxLayer.svelte +37 -41
- package/dist/components/ambient/ScanBand.svelte +95 -91
- package/dist/components/ambient/SignalRing.svelte +100 -100
- package/dist/components/ambient/ThreadLine.svelte +71 -78
- package/dist/components/ambient/Vignette.svelte +24 -26
- package/dist/components/depth/DepthLayer.svelte +22 -27
- package/dist/components/depth/DepthStage.svelte +63 -62
- package/dist/components/depth/FloatCard.svelte +113 -104
- package/dist/components/depth/HorizonGrid.svelte +216 -160
- package/dist/components/depth/Plinth.svelte +52 -57
- package/dist/components/display/Avatar.svelte +64 -69
- package/dist/components/display/Badge.svelte +59 -63
- package/dist/components/display/Blockquote.svelte +31 -34
- package/dist/components/display/CodeBlock.svelte +71 -76
- package/dist/components/display/MetricCard.svelte +77 -83
- package/dist/components/display/Table.svelte +99 -104
- package/dist/components/feedback/Alert.svelte +71 -76
- package/dist/components/feedback/EmptyState.svelte +68 -68
- package/dist/components/feedback/ErrorState.svelte +73 -73
- package/dist/components/feedback/Skeleton.svelte +52 -52
- package/dist/components/feedback/StatusDot.svelte +49 -54
- package/dist/components/feedback/StatusLine.svelte +122 -122
- package/dist/components/feedback/Toast.svelte +130 -136
- package/dist/components/inputs/Button.svelte +240 -237
- package/dist/components/inputs/Checkbox.svelte +104 -105
- package/dist/components/inputs/FileUpload.svelte +165 -163
- package/dist/components/inputs/Input.svelte +145 -147
- package/dist/components/inputs/Select.svelte +156 -150
- package/dist/components/inputs/Textarea.svelte +153 -154
- package/dist/components/inputs/Toggle.svelte +120 -120
- package/dist/components/layout/Card.svelte +70 -76
- package/dist/components/layout/Drawer.svelte +133 -109
- package/dist/components/layout/Grid.svelte +118 -43
- package/dist/components/layout/Grid.svelte.d.ts +8 -2
- package/dist/components/layout/Modal.svelte +176 -159
- package/dist/components/layout/Panel.svelte +49 -54
- package/dist/components/layout/Popover.svelte +178 -67
- package/dist/components/layout/Popover.svelte.d.ts +10 -1
- package/dist/components/layout/Stack.svelte +53 -53
- package/dist/components/navigation/Breadcrumb.svelte +70 -73
- package/dist/components/navigation/DropdownMenu.svelte +167 -124
- package/dist/components/navigation/DropdownMenu.svelte.d.ts +12 -2
- package/dist/components/navigation/SidebarNav.svelte +86 -90
- package/dist/components/navigation/Tabs.svelte +81 -86
- package/dist/components/navigation/Topbar.svelte +85 -85
- package/dist/components/patterns/ActionBar.svelte +71 -76
- package/dist/components/patterns/ConfirmDialog.svelte +63 -64
- package/dist/components/patterns/PageHeader.svelte +109 -114
- package/dist/components/patterns/SearchBar.svelte +54 -59
- package/dist/components/patterns/TerminalBoot.svelte +104 -104
- package/dist/components/primitives/Divider.svelte +26 -29
- package/dist/components/primitives/Icon.svelte +44 -49
- package/dist/components/primitives/Label.svelte +39 -44
- package/dist/components/primitives/Surface.svelte +89 -87
- package/dist/components/primitives/Text.svelte +98 -98
- package/dist/components/scenes/ArchiveScene.svelte +92 -95
- package/dist/components/scenes/ArchiveScene.svelte.d.ts +7 -1
- package/dist/components/scenes/LogScene.svelte +72 -77
- package/dist/components/scenes/NarrativeScene.svelte +91 -92
- package/dist/components/scenes/ReadoutScene.svelte +120 -107
- package/dist/components/scenes/ReadoutScene.svelte.d.ts +3 -1
- package/dist/components/scenes/StageScene.svelte +97 -104
- package/dist/examples/FieldReport.svelte +226 -223
- package/dist/examples/ObservationDeck.svelte +333 -317
- package/dist/examples/SignalLost.svelte +191 -191
- package/dist/styles.css +113 -0
- package/dist/system/actions/echo.js +9 -9
- package/dist/system/actions/resolve.js +9 -9
- package/dist/system/actions/reveal.js +1 -1
- package/dist/system/actions/surface.js +13 -1
- package/dist/system/depth/depth.css +49 -49
- package/dist/system/depth/depth.js +1 -1
- package/dist/system/expressions.css +80 -80
- package/dist/system/override-template.css +72 -72
- package/dist/system/register.css +74 -74
- package/dist/system/scroll-lock.d.ts +6 -0
- package/dist/system/scroll-lock.js +23 -0
- package/dist/tokens/tokens.css +100 -86
- package/dist/tokens/tokens.js +4 -4
- package/dist/utils/motion.js +1 -1
- package/package.json +67 -60
|
@@ -1,63 +1,59 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
border-color: currentColor;
|
|
61
|
-
opacity: 0.8;
|
|
62
|
-
}
|
|
63
|
-
</style>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Badge color variant. */
|
|
7
|
+
variant?: 'default' | 'accent' | 'signal' | 'ok' | 'warn' | 'fail';
|
|
8
|
+
/** Additional CSS classes. */
|
|
9
|
+
class?: string;
|
|
10
|
+
/** Badge text. */
|
|
11
|
+
children?: Snippet;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { variant = 'default', class: className = '', children }: Props = $props();
|
|
15
|
+
|
|
16
|
+
const colorMap: Record<string, string> = {
|
|
17
|
+
default: 'var(--muted)',
|
|
18
|
+
accent: 'var(--accent)',
|
|
19
|
+
signal: 'var(--signal)',
|
|
20
|
+
ok: 'var(--status-ok)',
|
|
21
|
+
warn: 'var(--status-warn)',
|
|
22
|
+
fail: 'var(--status-fail)'
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const bgMap: Record<string, string> = {
|
|
26
|
+
default: 'rgba(167, 157, 139, 0.08)',
|
|
27
|
+
accent: 'rgba(199, 156, 87, 0.08)',
|
|
28
|
+
signal: 'rgba(121, 166, 163, 0.08)',
|
|
29
|
+
ok: 'rgba(121, 166, 163, 0.08)',
|
|
30
|
+
warn: 'rgba(199, 156, 87, 0.08)',
|
|
31
|
+
fail: 'rgba(182, 106, 72, 0.08)'
|
|
32
|
+
};
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<span
|
|
36
|
+
class={cn('hyvui-badge', className)}
|
|
37
|
+
style:color={colorMap[variant]}
|
|
38
|
+
style:background-color={bgMap[variant]}
|
|
39
|
+
style:border-color={colorMap[variant]}
|
|
40
|
+
>
|
|
41
|
+
{#if children}{@render children()}{/if}
|
|
42
|
+
</span>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
.hyvui-badge {
|
|
46
|
+
display: inline-flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
font-family: var(--font-mono);
|
|
49
|
+
font-size: 0.62rem;
|
|
50
|
+
font-weight: 400;
|
|
51
|
+
letter-spacing: 0.12em;
|
|
52
|
+
text-transform: uppercase;
|
|
53
|
+
line-height: 1;
|
|
54
|
+
padding: 0.25rem 0.5rem;
|
|
55
|
+
border: 1px solid;
|
|
56
|
+
border-color: currentColor;
|
|
57
|
+
opacity: 0.8;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
background: linear-gradient(135deg, rgba(199, 156, 87, 0.06), transparent 60%);
|
|
33
|
-
}
|
|
34
|
-
</style>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Additional CSS classes. */
|
|
7
|
+
class?: string;
|
|
8
|
+
/** Quote content. */
|
|
9
|
+
children?: Snippet;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let { class: className = '', children }: Props = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<blockquote class={cn('hyvui-blockquote', className)}>
|
|
16
|
+
{#if children}{@render children()}{/if}
|
|
17
|
+
</blockquote>
|
|
18
|
+
|
|
19
|
+
<style>
|
|
20
|
+
.hyvui-blockquote {
|
|
21
|
+
font-family: var(--font-body);
|
|
22
|
+
font-style: italic;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
color: var(--text-soft);
|
|
25
|
+
line-height: 1.6;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 1rem 1.25rem;
|
|
28
|
+
border-left: 2px solid var(--line-strong);
|
|
29
|
+
background: linear-gradient(135deg, rgba(199, 156, 87, 0.06), transparent 60%);
|
|
30
|
+
}
|
|
31
|
+
</style>
|
|
@@ -1,76 +1,71 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
font-size: 0.82rem;
|
|
73
|
-
color: var(--text-soft);
|
|
74
|
-
line-height: 1.6;
|
|
75
|
-
}
|
|
76
|
-
</style>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import Button from '../inputs/Button.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Code string to display. */
|
|
7
|
+
code?: string;
|
|
8
|
+
/** Language label (informational only, no syntax highlighting built-in). */
|
|
9
|
+
language?: string;
|
|
10
|
+
/** Show copy-to-clipboard button. */
|
|
11
|
+
copyable?: boolean;
|
|
12
|
+
/** Additional CSS classes. */
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let { code = '', language = '', copyable = true, class: className = '' }: Props = $props();
|
|
17
|
+
|
|
18
|
+
let copied = $state(false);
|
|
19
|
+
|
|
20
|
+
async function copyCode() {
|
|
21
|
+
try {
|
|
22
|
+
await navigator.clipboard.writeText(code);
|
|
23
|
+
copied = true;
|
|
24
|
+
setTimeout(() => {
|
|
25
|
+
copied = false;
|
|
26
|
+
}, 2000);
|
|
27
|
+
} catch {
|
|
28
|
+
// clipboard access denied
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<div class={cn('hyvui-codeblock', className)}>
|
|
34
|
+
{#if copyable}
|
|
35
|
+
<div class="hyvui-codeblock-actions">
|
|
36
|
+
<Button variant="ghost" size="sm" onclick={copyCode}>
|
|
37
|
+
{copied ? 'copied' : 'copy'}
|
|
38
|
+
</Button>
|
|
39
|
+
</div>
|
|
40
|
+
{/if}
|
|
41
|
+
<pre class="hyvui-codeblock-pre"><code class="hyvui-codeblock-code">{code}</code></pre>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
.hyvui-codeblock {
|
|
46
|
+
position: relative;
|
|
47
|
+
background-color: var(--bg-elev);
|
|
48
|
+
border: 1px solid var(--line);
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.hyvui-codeblock-actions {
|
|
53
|
+
position: absolute;
|
|
54
|
+
top: 0.375rem;
|
|
55
|
+
right: 0.375rem;
|
|
56
|
+
z-index: 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.hyvui-codeblock-pre {
|
|
60
|
+
margin: 0;
|
|
61
|
+
padding: 1rem;
|
|
62
|
+
overflow-x: auto;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.hyvui-codeblock-code {
|
|
66
|
+
font-family: var(--font-mono);
|
|
67
|
+
font-size: 0.82rem;
|
|
68
|
+
color: var(--text-soft);
|
|
69
|
+
line-height: 1.6;
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -1,83 +1,77 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
font-size: 0.72rem;
|
|
79
|
-
font-weight: 400;
|
|
80
|
-
letter-spacing: 0.12em;
|
|
81
|
-
text-transform: uppercase;
|
|
82
|
-
}
|
|
83
|
-
</style>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import Surface from '../primitives/Surface.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Metric label. */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Metric value. */
|
|
9
|
+
value?: string | number;
|
|
10
|
+
/** Trend direction. */
|
|
11
|
+
trend?: 'up' | 'down' | 'neutral';
|
|
12
|
+
/** Trend value string (e.g. "+12%"). */
|
|
13
|
+
trendValue?: string;
|
|
14
|
+
/** Additional CSS classes. */
|
|
15
|
+
class?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let { label = '', value = '', trend, trendValue = '', class: className = '' }: Props = $props();
|
|
19
|
+
|
|
20
|
+
const trendArrow: Record<string, string> = {
|
|
21
|
+
up: '\u2191',
|
|
22
|
+
down: '\u2193',
|
|
23
|
+
neutral: '\u2014'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const trendColor: Record<string, string> = {
|
|
27
|
+
up: 'var(--status-ok)',
|
|
28
|
+
down: 'var(--status-fail)',
|
|
29
|
+
neutral: 'var(--muted)'
|
|
30
|
+
};
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<Surface variant="card" class={cn('hyvui-metric', className)}>
|
|
34
|
+
<span class="hyvui-metric-label">{label}</span>
|
|
35
|
+
<span class="hyvui-metric-value">{value}</span>
|
|
36
|
+
{#if trend}
|
|
37
|
+
<span class="hyvui-metric-trend" style:color={trendColor[trend]}>
|
|
38
|
+
{trendArrow[trend]}{#if trendValue}{' '}{trendValue}{/if}
|
|
39
|
+
</span>
|
|
40
|
+
{/if}
|
|
41
|
+
</Surface>
|
|
42
|
+
|
|
43
|
+
<style>
|
|
44
|
+
:global(.hyvui-metric) {
|
|
45
|
+
padding: var(--space-card);
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
gap: var(--space-sm);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.hyvui-metric-label {
|
|
52
|
+
font-family: var(--font-mono);
|
|
53
|
+
font-size: 0.68rem;
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
letter-spacing: 0.16em;
|
|
56
|
+
text-transform: uppercase;
|
|
57
|
+
color: var(--muted-strong);
|
|
58
|
+
line-height: 1.2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.hyvui-metric-value {
|
|
62
|
+
font-family: var(--font-body);
|
|
63
|
+
font-size: clamp(2rem, 5vw, 3rem);
|
|
64
|
+
font-weight: 400;
|
|
65
|
+
line-height: 0.95;
|
|
66
|
+
letter-spacing: -0.05em;
|
|
67
|
+
color: var(--text);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.hyvui-metric-trend {
|
|
71
|
+
font-family: var(--font-mono);
|
|
72
|
+
font-size: 0.72rem;
|
|
73
|
+
font-weight: 400;
|
|
74
|
+
letter-spacing: 0.12em;
|
|
75
|
+
text-transform: uppercase;
|
|
76
|
+
}
|
|
77
|
+
</style>
|