@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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Controls dialog visibility. */
|
|
3
|
+
open?: boolean;
|
|
4
|
+
/** Action title. Names the action, never asks "are you sure?". */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Additional description. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Confirm button label. */
|
|
9
|
+
confirmLabel?: string;
|
|
10
|
+
/** Cancel button label. */
|
|
11
|
+
cancelLabel?: string;
|
|
12
|
+
/** Makes the confirm button use the destructive variant. */
|
|
13
|
+
destructive?: boolean;
|
|
14
|
+
/** Additional CSS classes. */
|
|
15
|
+
class?: string;
|
|
16
|
+
/** Fires when the confirm button is clicked. */
|
|
17
|
+
onconfirm?: () => void;
|
|
18
|
+
/** Fires when the cancel button is clicked or dialog is dismissed. */
|
|
19
|
+
oncancel?: () => void;
|
|
20
|
+
}
|
|
21
|
+
declare const ConfirmDialog: import("svelte").Component<Props, {}, "">;
|
|
22
|
+
type ConfirmDialog = ReturnType<typeof ConfirmDialog>;
|
|
23
|
+
export default ConfirmDialog;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Page title. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Page subtitle. */
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
/** Additional CSS classes. */
|
|
11
|
+
class?: string;
|
|
12
|
+
/** Breadcrumb slot. */
|
|
13
|
+
breadcrumb?: Snippet;
|
|
14
|
+
/** Actions slot (right-aligned). */
|
|
15
|
+
actions?: Snippet;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
title = '',
|
|
20
|
+
subtitle = '',
|
|
21
|
+
class: className = '',
|
|
22
|
+
breadcrumb,
|
|
23
|
+
actions,
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<div class={cn('hyvui-page-header', className)}>
|
|
28
|
+
{#if breadcrumb}
|
|
29
|
+
<div class="hyvui-page-header-breadcrumb">
|
|
30
|
+
{@render breadcrumb()}
|
|
31
|
+
</div>
|
|
32
|
+
{/if}
|
|
33
|
+
<div class="hyvui-page-header-row">
|
|
34
|
+
<div class="hyvui-page-header-text">
|
|
35
|
+
<h1 class="hyvui-page-header-title">{title}</h1>
|
|
36
|
+
{#if subtitle}
|
|
37
|
+
<p class="hyvui-page-header-subtitle">{subtitle}</p>
|
|
38
|
+
{/if}
|
|
39
|
+
</div>
|
|
40
|
+
{#if actions}
|
|
41
|
+
<div class="hyvui-page-header-actions">
|
|
42
|
+
{@render actions()}
|
|
43
|
+
</div>
|
|
44
|
+
{/if}
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<style>
|
|
49
|
+
.hyvui-page-header {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
gap: var(--space-md);
|
|
53
|
+
padding-bottom: var(--space-lg);
|
|
54
|
+
border-bottom: 1px solid var(--line);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.hyvui-page-header-breadcrumb {
|
|
58
|
+
min-width: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.hyvui-page-header-row {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: flex-start;
|
|
64
|
+
justify-content: space-between;
|
|
65
|
+
gap: var(--space-xl);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.hyvui-page-header-text {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
gap: var(--space-sm);
|
|
72
|
+
min-width: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.hyvui-page-header-title {
|
|
76
|
+
font-family: var(--font-body);
|
|
77
|
+
font-size: clamp(2rem, 4vw, 3.25rem);
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
line-height: 0.95;
|
|
80
|
+
letter-spacing: -0.05em;
|
|
81
|
+
color: var(--text);
|
|
82
|
+
margin: 0;
|
|
83
|
+
text-wrap: balance;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.hyvui-page-header-subtitle {
|
|
87
|
+
font-family: var(--font-body);
|
|
88
|
+
font-size: 1.04rem;
|
|
89
|
+
color: var(--muted);
|
|
90
|
+
line-height: 1.62;
|
|
91
|
+
margin: 0;
|
|
92
|
+
max-width: 32rem;
|
|
93
|
+
text-wrap: pretty;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.hyvui-page-header-actions {
|
|
97
|
+
display: flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
flex-wrap: wrap;
|
|
100
|
+
justify-content: flex-end;
|
|
101
|
+
gap: var(--space-sm);
|
|
102
|
+
flex-shrink: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@media (max-width: 720px) {
|
|
106
|
+
.hyvui-page-header-row {
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.hyvui-page-header-actions {
|
|
111
|
+
justify-content: flex-start;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Page title. */
|
|
4
|
+
title?: string;
|
|
5
|
+
/** Page subtitle. */
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
/** Additional CSS classes. */
|
|
8
|
+
class?: string;
|
|
9
|
+
/** Breadcrumb slot. */
|
|
10
|
+
breadcrumb?: Snippet;
|
|
11
|
+
/** Actions slot (right-aligned). */
|
|
12
|
+
actions?: Snippet;
|
|
13
|
+
}
|
|
14
|
+
declare const PageHeader: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type PageHeader = ReturnType<typeof PageHeader>;
|
|
16
|
+
export default PageHeader;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import Input from '../inputs/Input.svelte';
|
|
4
|
+
import StatusDot from '../feedback/StatusDot.svelte';
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
/** Current search value (bindable). */
|
|
8
|
+
value?: string;
|
|
9
|
+
/** Placeholder text. */
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
/** Shows a loading indicator. */
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
/** Additional CSS classes. */
|
|
14
|
+
class?: string;
|
|
15
|
+
/** Fires on input with the current value. */
|
|
16
|
+
onsearch?: (value: string) => void;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
value = $bindable(''),
|
|
21
|
+
placeholder = 'search',
|
|
22
|
+
loading = false,
|
|
23
|
+
class: className = '',
|
|
24
|
+
onsearch,
|
|
25
|
+
}: Props = $props();
|
|
26
|
+
|
|
27
|
+
function handleInput() {
|
|
28
|
+
onsearch?.(value);
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<div class={cn('hyvui-search-bar', className)}>
|
|
33
|
+
<Input
|
|
34
|
+
type="search"
|
|
35
|
+
bind:value
|
|
36
|
+
{placeholder}
|
|
37
|
+
oninput={handleInput}
|
|
38
|
+
/>
|
|
39
|
+
{#if loading}
|
|
40
|
+
<div class="hyvui-search-loading">
|
|
41
|
+
<StatusDot status="pend" size={6} />
|
|
42
|
+
</div>
|
|
43
|
+
{/if}
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<style>
|
|
47
|
+
.hyvui-search-bar {
|
|
48
|
+
position: relative;
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.hyvui-search-loading {
|
|
53
|
+
position: absolute;
|
|
54
|
+
right: 0.9rem;
|
|
55
|
+
top: 50%;
|
|
56
|
+
transform: translateY(-50%);
|
|
57
|
+
pointer-events: none;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Current search value (bindable). */
|
|
3
|
+
value?: string;
|
|
4
|
+
/** Placeholder text. */
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
/** Shows a loading indicator. */
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
/** Additional CSS classes. */
|
|
9
|
+
class?: string;
|
|
10
|
+
/** Fires on input with the current value. */
|
|
11
|
+
onsearch?: (value: string) => void;
|
|
12
|
+
}
|
|
13
|
+
declare const SearchBar: import("svelte").Component<Props, {}, "value">;
|
|
14
|
+
type SearchBar = ReturnType<typeof SearchBar>;
|
|
15
|
+
export default SearchBar;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import StatusLine from '../feedback/StatusLine.svelte';
|
|
4
|
+
import { onMount } from 'svelte';
|
|
5
|
+
|
|
6
|
+
interface BootLine {
|
|
7
|
+
status: 'ok' | 'pend' | 'warn' | 'fail';
|
|
8
|
+
message: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
/** Lines to display in sequence. */
|
|
13
|
+
lines?: BootLine[];
|
|
14
|
+
/** Initial delay before the first line appears (ms). */
|
|
15
|
+
delay?: number;
|
|
16
|
+
/** Interval between each line appearing (ms). */
|
|
17
|
+
interval?: number;
|
|
18
|
+
/** When true, shows all lines immediately. */
|
|
19
|
+
instant?: boolean;
|
|
20
|
+
/** Passes cursor visibility to visible lines. */
|
|
21
|
+
showCursor?: boolean;
|
|
22
|
+
/** Status line tone mode. */
|
|
23
|
+
tone?: 'split' | 'line';
|
|
24
|
+
/** Additional CSS classes. */
|
|
25
|
+
class?: string;
|
|
26
|
+
/** Fires when all lines have appeared. */
|
|
27
|
+
oncomplete?: () => void;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let {
|
|
31
|
+
lines = [],
|
|
32
|
+
delay = 600,
|
|
33
|
+
interval = 700,
|
|
34
|
+
instant = false,
|
|
35
|
+
showCursor = false,
|
|
36
|
+
tone = 'split',
|
|
37
|
+
class: className = '',
|
|
38
|
+
oncomplete,
|
|
39
|
+
}: Props = $props();
|
|
40
|
+
|
|
41
|
+
let visibleCount = $state(0);
|
|
42
|
+
|
|
43
|
+
onMount(() => {
|
|
44
|
+
if (lines.length === 0) {
|
|
45
|
+
oncomplete?.();
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if (instant) {
|
|
50
|
+
visibleCount = lines.length;
|
|
51
|
+
oncomplete?.();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const timers: number[] = [];
|
|
56
|
+
timers.push(
|
|
57
|
+
window.setTimeout(() => {
|
|
58
|
+
visibleCount = 1;
|
|
59
|
+
|
|
60
|
+
if (lines.length === 1) {
|
|
61
|
+
oncomplete?.();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const stepTimer = window.setInterval(() => {
|
|
66
|
+
visibleCount += 1;
|
|
67
|
+
if (visibleCount >= lines.length) {
|
|
68
|
+
window.clearInterval(stepTimer);
|
|
69
|
+
oncomplete?.();
|
|
70
|
+
}
|
|
71
|
+
}, interval);
|
|
72
|
+
|
|
73
|
+
timers.push(stepTimer);
|
|
74
|
+
}, delay)
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
return () => {
|
|
78
|
+
for (const timer of timers) {
|
|
79
|
+
window.clearTimeout(timer);
|
|
80
|
+
window.clearInterval(timer);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<div class={cn('hyvui-terminal-boot', className)}>
|
|
87
|
+
{#each lines as line, i}
|
|
88
|
+
<StatusLine
|
|
89
|
+
status={line.status}
|
|
90
|
+
message={line.message}
|
|
91
|
+
visible={i < visibleCount}
|
|
92
|
+
tone={tone}
|
|
93
|
+
cursor={showCursor && i < visibleCount}
|
|
94
|
+
/>
|
|
95
|
+
{/each}
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<style>
|
|
99
|
+
.hyvui-terminal-boot {
|
|
100
|
+
display: flex;
|
|
101
|
+
flex-direction: column;
|
|
102
|
+
gap: 0.375rem;
|
|
103
|
+
}
|
|
104
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface BootLine {
|
|
2
|
+
status: 'ok' | 'pend' | 'warn' | 'fail';
|
|
3
|
+
message: string;
|
|
4
|
+
}
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Lines to display in sequence. */
|
|
7
|
+
lines?: BootLine[];
|
|
8
|
+
/** Initial delay before the first line appears (ms). */
|
|
9
|
+
delay?: number;
|
|
10
|
+
/** Interval between each line appearing (ms). */
|
|
11
|
+
interval?: number;
|
|
12
|
+
/** When true, shows all lines immediately. */
|
|
13
|
+
instant?: boolean;
|
|
14
|
+
/** Passes cursor visibility to visible lines. */
|
|
15
|
+
showCursor?: boolean;
|
|
16
|
+
/** Status line tone mode. */
|
|
17
|
+
tone?: 'split' | 'line';
|
|
18
|
+
/** Additional CSS classes. */
|
|
19
|
+
class?: string;
|
|
20
|
+
/** Fires when all lines have appeared. */
|
|
21
|
+
oncomplete?: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare const TerminalBoot: import("svelte").Component<Props, {}, "">;
|
|
24
|
+
type TerminalBoot = ReturnType<typeof TerminalBoot>;
|
|
25
|
+
export default TerminalBoot;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
/** Line visibility strength. */
|
|
6
|
+
strength?: 'default' | 'strong';
|
|
7
|
+
/** Additional CSS classes. */
|
|
8
|
+
class?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let {
|
|
12
|
+
strength = 'default',
|
|
13
|
+
class: className = '',
|
|
14
|
+
}: Props = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<hr
|
|
18
|
+
class={cn('hyvui-divider', className)}
|
|
19
|
+
style:border-color={strength === 'strong' ? 'var(--line-strong)' : 'var(--line)'}
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
<style>
|
|
23
|
+
.hyvui-divider {
|
|
24
|
+
border: none;
|
|
25
|
+
border-top: 1px solid;
|
|
26
|
+
margin: 0;
|
|
27
|
+
width: 100%;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Line visibility strength. */
|
|
3
|
+
strength?: 'default' | 'strong';
|
|
4
|
+
/** Additional CSS classes. */
|
|
5
|
+
class?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const Divider: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type Divider = ReturnType<typeof Divider>;
|
|
9
|
+
export default Divider;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Icon size in pixels. */
|
|
7
|
+
size?: number;
|
|
8
|
+
/** CSS color value for the icon. */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Additional CSS classes. */
|
|
11
|
+
class?: string;
|
|
12
|
+
/** SVG content to render inside the icon wrapper. */
|
|
13
|
+
children?: Snippet;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
size = 16,
|
|
18
|
+
color = 'currentColor',
|
|
19
|
+
class: className = '',
|
|
20
|
+
children,
|
|
21
|
+
}: Props = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<span
|
|
25
|
+
class={cn('hyvui-icon', className)}
|
|
26
|
+
style:width="{size}px"
|
|
27
|
+
style:height="{size}px"
|
|
28
|
+
style:color={color}
|
|
29
|
+
aria-hidden="true"
|
|
30
|
+
>
|
|
31
|
+
{#if children}{@render children()}{/if}
|
|
32
|
+
</span>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
.hyvui-icon {
|
|
36
|
+
display: inline-flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
flex-shrink: 0;
|
|
40
|
+
line-height: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.hyvui-icon :global(svg) {
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
fill: none;
|
|
47
|
+
stroke: currentColor;
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Icon size in pixels. */
|
|
4
|
+
size?: number;
|
|
5
|
+
/** CSS color value for the icon. */
|
|
6
|
+
color?: string;
|
|
7
|
+
/** Additional CSS classes. */
|
|
8
|
+
class?: string;
|
|
9
|
+
/** SVG content to render inside the icon wrapper. */
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
}
|
|
12
|
+
declare const Icon: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type Icon = ReturnType<typeof Icon>;
|
|
14
|
+
export default Icon;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** HTML tag to render. */
|
|
7
|
+
as?: string;
|
|
8
|
+
/** Label color token. */
|
|
9
|
+
color?: 'muted' | 'accent' | 'signal';
|
|
10
|
+
/** Additional CSS classes. */
|
|
11
|
+
class?: string;
|
|
12
|
+
/** Label text content. */
|
|
13
|
+
children?: Snippet;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
as = 'span',
|
|
18
|
+
color = 'muted',
|
|
19
|
+
class: className = '',
|
|
20
|
+
children,
|
|
21
|
+
}: Props = $props();
|
|
22
|
+
|
|
23
|
+
const colorMap: Record<string, string> = {
|
|
24
|
+
muted: 'var(--muted-strong)',
|
|
25
|
+
accent: 'var(--accent)',
|
|
26
|
+
signal: 'var(--signal)',
|
|
27
|
+
};
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<svelte:element this={as} class={cn('hyvui-label', className)} style:color={colorMap[color]}>
|
|
31
|
+
{#if children}{@render children()}{/if}
|
|
32
|
+
</svelte:element>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
.hyvui-label {
|
|
36
|
+
font-family: var(--font-mono);
|
|
37
|
+
font-size: 0.7rem;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
letter-spacing: 0.16em;
|
|
40
|
+
text-transform: uppercase;
|
|
41
|
+
line-height: 1.2;
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** HTML tag to render. */
|
|
4
|
+
as?: string;
|
|
5
|
+
/** Label color token. */
|
|
6
|
+
color?: 'muted' | 'accent' | 'signal';
|
|
7
|
+
/** Additional CSS classes. */
|
|
8
|
+
class?: string;
|
|
9
|
+
/** Label text content. */
|
|
10
|
+
children?: Snippet;
|
|
11
|
+
}
|
|
12
|
+
declare const Label: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type Label = ReturnType<typeof Label>;
|
|
14
|
+
export default Label;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../utils/cn.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
/** Surface visual style. */
|
|
7
|
+
variant?: 'base' | 'card' | 'panel';
|
|
8
|
+
/** HTML tag to render. */
|
|
9
|
+
as?: string;
|
|
10
|
+
/** Adds a pseudoelement teal inset border on panel variant. */
|
|
11
|
+
withInset?: boolean;
|
|
12
|
+
/** Additional CSS classes. */
|
|
13
|
+
class?: string;
|
|
14
|
+
/** Surface content. */
|
|
15
|
+
children?: Snippet;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
variant = 'base',
|
|
20
|
+
as = 'div',
|
|
21
|
+
withInset = false,
|
|
22
|
+
class: className = '',
|
|
23
|
+
children,
|
|
24
|
+
}: Props = $props();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<svelte:element
|
|
28
|
+
this={as}
|
|
29
|
+
class={cn(
|
|
30
|
+
'hyvui-surface',
|
|
31
|
+
variant === 'card' && 'hyvui-surface-card',
|
|
32
|
+
variant === 'panel' && 'hyvui-surface-panel',
|
|
33
|
+
variant === 'base' && 'hyvui-surface-base',
|
|
34
|
+
withInset && 'hyvui-surface-inset',
|
|
35
|
+
className
|
|
36
|
+
)}
|
|
37
|
+
>
|
|
38
|
+
{#if children}{@render children()}{/if}
|
|
39
|
+
</svelte:element>
|
|
40
|
+
|
|
41
|
+
<style>
|
|
42
|
+
.hyvui-surface {
|
|
43
|
+
position: relative;
|
|
44
|
+
overflow: clip;
|
|
45
|
+
border-radius: var(--radius-md);
|
|
46
|
+
isolation: isolate;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.hyvui-surface::before {
|
|
50
|
+
content: '';
|
|
51
|
+
position: absolute;
|
|
52
|
+
inset: 0;
|
|
53
|
+
pointer-events: none;
|
|
54
|
+
background:
|
|
55
|
+
linear-gradient(180deg, rgba(240, 232, 218, 0.04), transparent 20%),
|
|
56
|
+
linear-gradient(90deg, rgba(121, 166, 163, 0.03), transparent 30%);
|
|
57
|
+
opacity: 0.8;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.hyvui-surface-base {
|
|
61
|
+
background: var(--surface-soft);
|
|
62
|
+
border: 1px solid var(--line);
|
|
63
|
+
box-shadow: var(--surface-stroke);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.hyvui-surface-card {
|
|
67
|
+
background: var(--surface-card);
|
|
68
|
+
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
69
|
+
box-shadow: var(--surface-stroke), var(--shadow-card);
|
|
70
|
+
backdrop-filter: blur(8px);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.hyvui-surface-panel {
|
|
74
|
+
background: var(--surface-panel);
|
|
75
|
+
border: 1px solid var(--line);
|
|
76
|
+
box-shadow: var(--surface-stroke), var(--shadow-veil);
|
|
77
|
+
backdrop-filter: blur(10px);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.hyvui-surface-inset::after {
|
|
81
|
+
content: '';
|
|
82
|
+
position: absolute;
|
|
83
|
+
inset: 0.9rem;
|
|
84
|
+
border: 1px solid rgba(121, 166, 163, 0.14);
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Surface visual style. */
|
|
4
|
+
variant?: 'base' | 'card' | 'panel';
|
|
5
|
+
/** HTML tag to render. */
|
|
6
|
+
as?: string;
|
|
7
|
+
/** Adds a pseudoelement teal inset border on panel variant. */
|
|
8
|
+
withInset?: boolean;
|
|
9
|
+
/** Additional CSS classes. */
|
|
10
|
+
class?: string;
|
|
11
|
+
/** Surface content. */
|
|
12
|
+
children?: Snippet;
|
|
13
|
+
}
|
|
14
|
+
declare const Surface: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type Surface = ReturnType<typeof Surface>;
|
|
16
|
+
export default Surface;
|