@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,91 +1,95 @@
1
- <script lang="ts">
2
- import { cn } from '../../utils/cn.js';
3
-
4
- interface Props {
5
- /** Enable the scan animation. */
6
- active?: boolean;
7
- /** Animation axis. */
8
- axis?: 'x' | 'y';
9
- /** Thickness/width of the band. */
10
- size?: string;
11
- /** Animation duration. */
12
- duration?: string;
13
- /** Gradient used for the band. */
14
- gradient?: string;
15
- /** Additional CSS classes. */
16
- class?: string;
17
- }
18
-
19
- let {
20
- active = true,
21
- axis = 'y',
22
- size = '1px',
23
- duration = '8s',
24
- gradient = 'linear-gradient(90deg, transparent, rgba(199, 156, 87, 0.18), transparent)',
25
- class: className = '',
26
- }: Props = $props();
27
- </script>
28
-
29
- {#if active}
30
- <div
31
- class={cn('hyvui-scan-band', axis === 'x' ? 'hyvui-scan-band-x' : 'hyvui-scan-band-y', className)}
32
- style:--scan-size={size}
33
- style:--scan-duration={duration}
34
- style:--scan-gradient={gradient}
35
- aria-hidden="true"
36
- ></div>
37
- {/if}
38
-
39
- <style>
40
- .hyvui-scan-band {
41
- position: absolute;
42
- inset: 0;
43
- pointer-events: none;
44
- overflow: hidden;
45
- }
46
-
47
- .hyvui-scan-band::after {
48
- content: '';
49
- position: absolute;
50
- background: var(--scan-gradient);
51
- }
52
-
53
- .hyvui-scan-band-y::after {
54
- left: 0;
55
- right: 0;
56
- height: var(--scan-size);
57
- animation: scan-band-y var(--scan-duration) linear infinite;
58
- }
59
-
60
- .hyvui-scan-band-x::after {
61
- top: 0;
62
- bottom: 0;
63
- width: var(--scan-size);
64
- animation: scan-band-x var(--scan-duration) linear infinite;
65
- }
66
-
67
- @keyframes scan-band-y {
68
- 0% {
69
- transform: translateY(-100%);
70
- }
71
- 100% {
72
- transform: translateY(100vh);
73
- }
74
- }
75
-
76
- @keyframes scan-band-x {
77
- 0% {
78
- transform: translateX(-120%);
79
- }
80
- 100% {
81
- transform: translateX(520%);
82
- }
83
- }
84
-
85
- @media (prefers-reduced-motion: reduce) {
86
- .hyvui-scan-band::after {
87
- animation: none;
88
- display: none;
89
- }
90
- }
91
- </style>
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+
4
+ interface Props {
5
+ /** Enable the scan animation. */
6
+ active?: boolean;
7
+ /** Animation axis. */
8
+ axis?: 'x' | 'y';
9
+ /** Thickness/width of the band. */
10
+ size?: string;
11
+ /** Animation duration. */
12
+ duration?: string;
13
+ /** Gradient used for the band. */
14
+ gradient?: string;
15
+ /** Additional CSS classes. */
16
+ class?: string;
17
+ }
18
+
19
+ let {
20
+ active = true,
21
+ axis = 'y',
22
+ size = '1px',
23
+ duration = '8s',
24
+ gradient = 'linear-gradient(90deg, transparent, rgba(199, 156, 87, 0.18), transparent)',
25
+ class: className = ''
26
+ }: Props = $props();
27
+ </script>
28
+
29
+ {#if active}
30
+ <div
31
+ class={cn(
32
+ 'hyvui-scan-band',
33
+ axis === 'x' ? 'hyvui-scan-band-x' : 'hyvui-scan-band-y',
34
+ className
35
+ )}
36
+ style:--scan-size={size}
37
+ style:--scan-duration={duration}
38
+ style:--scan-gradient={gradient}
39
+ aria-hidden="true"
40
+ ></div>
41
+ {/if}
42
+
43
+ <style>
44
+ .hyvui-scan-band {
45
+ position: absolute;
46
+ inset: 0;
47
+ pointer-events: none;
48
+ overflow: hidden;
49
+ }
50
+
51
+ .hyvui-scan-band::after {
52
+ content: '';
53
+ position: absolute;
54
+ background: var(--scan-gradient);
55
+ }
56
+
57
+ .hyvui-scan-band-y::after {
58
+ left: 0;
59
+ right: 0;
60
+ height: var(--scan-size);
61
+ animation: scan-band-y var(--scan-duration) linear infinite;
62
+ }
63
+
64
+ .hyvui-scan-band-x::after {
65
+ top: 0;
66
+ bottom: 0;
67
+ width: var(--scan-size);
68
+ animation: scan-band-x var(--scan-duration) linear infinite;
69
+ }
70
+
71
+ @keyframes scan-band-y {
72
+ 0% {
73
+ transform: translateY(-100%);
74
+ }
75
+ 100% {
76
+ transform: translateY(100%);
77
+ }
78
+ }
79
+
80
+ @keyframes scan-band-x {
81
+ 0% {
82
+ transform: translateX(-120%);
83
+ }
84
+ 100% {
85
+ transform: translateX(520%);
86
+ }
87
+ }
88
+
89
+ @media (prefers-reduced-motion: reduce) {
90
+ .hyvui-scan-band::after {
91
+ animation: none;
92
+ display: none;
93
+ }
94
+ }
95
+ </style>
@@ -1,100 +1,100 @@
1
- <script lang="ts">
2
- import { cn } from '../../utils/cn.js';
3
-
4
- interface Props {
5
- /** Enable the pulsing animation. */
6
- active?: boolean;
7
- /** Ring diameter in pixels. */
8
- size?: number;
9
- /** Ring color (CSS color value). */
10
- color?: string;
11
- /** Additional CSS classes. */
12
- class?: string;
13
- }
14
-
15
- let {
16
- active = true,
17
- size = 200,
18
- color = 'var(--accent)',
19
- class: className = '',
20
- }: Props = $props();
21
- </script>
22
-
23
- <div
24
- class={cn('hyvui-signal-ring', className)}
25
- style:width="{size}px"
26
- style:height="{size}px"
27
- aria-hidden="true"
28
- >
29
- {#if active}
30
- <span class="hyvui-signal-ring-pulse hyvui-signal-ring-1" style:border-color={color}></span>
31
- <span class="hyvui-signal-ring-pulse hyvui-signal-ring-2" style:border-color={color}></span>
32
- <span class="hyvui-signal-ring-pulse hyvui-signal-ring-3" style:border-color={color}></span>
33
- {/if}
34
- <span class="hyvui-signal-ring-core" style:background-color={color}></span>
35
- </div>
36
-
37
- <style>
38
- .hyvui-signal-ring {
39
- position: relative;
40
- display: flex;
41
- align-items: center;
42
- justify-content: center;
43
- pointer-events: none;
44
- }
45
-
46
- .hyvui-signal-ring-core {
47
- width: 4px;
48
- height: 4px;
49
- border-radius: 50%;
50
- opacity: 0.6;
51
- }
52
-
53
- .hyvui-signal-ring-pulse {
54
- position: absolute;
55
- inset: 0;
56
- border-radius: 50%;
57
- border: 1px solid;
58
- opacity: 0;
59
- animation: signal-ring-expand 3.6s ease-out infinite;
60
- }
61
-
62
- .hyvui-signal-ring-1 {
63
- animation-delay: 0s;
64
- }
65
-
66
- .hyvui-signal-ring-2 {
67
- animation-delay: 1.2s;
68
- }
69
-
70
- .hyvui-signal-ring-3 {
71
- animation-delay: 2.4s;
72
- }
73
-
74
- @keyframes signal-ring-expand {
75
- 0% {
76
- transform: scale(0.1);
77
- opacity: 0.4;
78
- }
79
- 100% {
80
- transform: scale(1);
81
- opacity: 0;
82
- }
83
- }
84
-
85
- @media (prefers-reduced-motion: reduce) {
86
- .hyvui-signal-ring-pulse {
87
- animation: none;
88
- opacity: 0.08;
89
- transform: scale(0.6);
90
- }
91
-
92
- .hyvui-signal-ring-2 {
93
- transform: scale(0.8);
94
- }
95
-
96
- .hyvui-signal-ring-3 {
97
- transform: scale(1);
98
- }
99
- }
100
- </style>
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+
4
+ interface Props {
5
+ /** Enable the pulsing animation. */
6
+ active?: boolean;
7
+ /** Ring diameter in pixels. */
8
+ size?: number;
9
+ /** Ring color (CSS color value). */
10
+ color?: string;
11
+ /** Additional CSS classes. */
12
+ class?: string;
13
+ }
14
+
15
+ let {
16
+ active = true,
17
+ size = 200,
18
+ color = 'var(--accent)',
19
+ class: className = ''
20
+ }: Props = $props();
21
+ </script>
22
+
23
+ <div
24
+ class={cn('hyvui-signal-ring', className)}
25
+ style:width="{size}px"
26
+ style:height="{size}px"
27
+ aria-hidden="true"
28
+ >
29
+ {#if active}
30
+ <span class="hyvui-signal-ring-pulse hyvui-signal-ring-1" style:border-color={color}></span>
31
+ <span class="hyvui-signal-ring-pulse hyvui-signal-ring-2" style:border-color={color}></span>
32
+ <span class="hyvui-signal-ring-pulse hyvui-signal-ring-3" style:border-color={color}></span>
33
+ {/if}
34
+ <span class="hyvui-signal-ring-core" style:background-color={color}></span>
35
+ </div>
36
+
37
+ <style>
38
+ .hyvui-signal-ring {
39
+ position: relative;
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ pointer-events: none;
44
+ }
45
+
46
+ .hyvui-signal-ring-core {
47
+ width: 4px;
48
+ height: 4px;
49
+ border-radius: 50%;
50
+ opacity: 0.6;
51
+ }
52
+
53
+ .hyvui-signal-ring-pulse {
54
+ position: absolute;
55
+ inset: 0;
56
+ border-radius: 50%;
57
+ border: 1px solid;
58
+ opacity: 0;
59
+ animation: signal-ring-expand 3.6s ease-out infinite;
60
+ }
61
+
62
+ .hyvui-signal-ring-1 {
63
+ animation-delay: 0s;
64
+ }
65
+
66
+ .hyvui-signal-ring-2 {
67
+ animation-delay: 1.2s;
68
+ }
69
+
70
+ .hyvui-signal-ring-3 {
71
+ animation-delay: 2.4s;
72
+ }
73
+
74
+ @keyframes signal-ring-expand {
75
+ 0% {
76
+ transform: scale(0.1);
77
+ opacity: 0.4;
78
+ }
79
+ 100% {
80
+ transform: scale(1);
81
+ opacity: 0;
82
+ }
83
+ }
84
+
85
+ @media (prefers-reduced-motion: reduce) {
86
+ .hyvui-signal-ring-pulse {
87
+ animation: none;
88
+ opacity: 0.08;
89
+ transform: scale(0.6);
90
+ }
91
+
92
+ .hyvui-signal-ring-2 {
93
+ transform: scale(0.8);
94
+ }
95
+
96
+ .hyvui-signal-ring-3 {
97
+ transform: scale(1);
98
+ }
99
+ }
100
+ </style>
@@ -1,78 +1,71 @@
1
- <script lang="ts">
2
- import { cn } from '../../utils/cn.js';
3
-
4
- interface Props {
5
- /** Start x position (CSS value). */
6
- x1?: string;
7
- /** Start y position (CSS value). */
8
- y1?: string;
9
- /** End x position (CSS value). */
10
- x2?: string;
11
- /** End y position (CSS value). */
12
- y2?: string;
13
- /** Enable the traveling dot animation. */
14
- animated?: boolean;
15
- /** Additional CSS classes. */
16
- class?: string;
17
- }
18
-
19
- let {
20
- x1 = '0%',
21
- y1 = '0%',
22
- x2 = '100%',
23
- y2 = '100%',
24
- animated = true,
25
- class: className = '',
26
- }: Props = $props();
27
- </script>
28
-
29
- <svg
30
- class={cn('hyvui-thread-line', className)}
31
- aria-hidden="true"
32
- >
33
- <line
34
- {x1} {y1} {x2} {y2}
35
- stroke="var(--line)"
36
- stroke-width="1"
37
- />
38
- {#if animated}
39
- <circle r="2" fill="var(--accent)">
40
- <animateMotion
41
- dur="3s"
42
- repeatCount="indefinite"
43
- path="M 0,0 L 1,0"
44
- keyPoints="0;1"
45
- keyTimes="0;1"
46
- calcMode="linear"
47
- >
48
- <mpath>
49
- <line {x1} {y1} {x2} {y2} />
50
- </mpath>
51
- </animateMotion>
52
- <animate
53
- attributeName="opacity"
54
- values="0;0.8;0.8;0"
55
- keyTimes="0;0.1;0.85;1"
56
- dur="3s"
57
- repeatCount="indefinite"
58
- />
59
- </circle>
60
- {/if}
61
- </svg>
62
-
63
- <style>
64
- .hyvui-thread-line {
65
- position: absolute;
66
- inset: 0;
67
- width: 100%;
68
- height: 100%;
69
- pointer-events: none;
70
- overflow: visible;
71
- }
72
-
73
- @media (prefers-reduced-motion: reduce) {
74
- .hyvui-thread-line circle {
75
- display: none;
76
- }
77
- }
78
- </style>
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+
4
+ interface Props {
5
+ /** Start x position (CSS value). */
6
+ x1?: string;
7
+ /** Start y position (CSS value). */
8
+ y1?: string;
9
+ /** End x position (CSS value). */
10
+ x2?: string;
11
+ /** End y position (CSS value). */
12
+ y2?: string;
13
+ /** Enable the traveling dot animation. */
14
+ animated?: boolean;
15
+ /** Additional CSS classes. */
16
+ class?: string;
17
+ }
18
+
19
+ let {
20
+ x1 = '0%',
21
+ y1 = '0%',
22
+ x2 = '100%',
23
+ y2 = '100%',
24
+ animated = true,
25
+ class: className = ''
26
+ }: Props = $props();
27
+ </script>
28
+
29
+ <svg class={cn('hyvui-thread-line', className)} aria-hidden="true">
30
+ <line {x1} {y1} {x2} {y2} stroke="var(--line)" stroke-width="1" />
31
+ {#if animated}
32
+ <circle r="2" fill="var(--accent)">
33
+ <animateMotion
34
+ dur="3s"
35
+ repeatCount="indefinite"
36
+ path="M 0,0 L 1,0"
37
+ keyPoints="0;1"
38
+ keyTimes="0;1"
39
+ calcMode="linear"
40
+ >
41
+ <mpath>
42
+ <line {x1} {y1} {x2} {y2} />
43
+ </mpath>
44
+ </animateMotion>
45
+ <animate
46
+ attributeName="opacity"
47
+ values="0;0.8;0.8;0"
48
+ keyTimes="0;0.1;0.85;1"
49
+ dur="3s"
50
+ repeatCount="indefinite"
51
+ />
52
+ </circle>
53
+ {/if}
54
+ </svg>
55
+
56
+ <style>
57
+ .hyvui-thread-line {
58
+ position: absolute;
59
+ inset: 0;
60
+ width: 100%;
61
+ height: 100%;
62
+ pointer-events: none;
63
+ overflow: visible;
64
+ }
65
+
66
+ @media (prefers-reduced-motion: reduce) {
67
+ .hyvui-thread-line circle {
68
+ display: none;
69
+ }
70
+ }
71
+ </style>
@@ -1,26 +1,24 @@
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-vignette', className)} aria-hidden="true"></div>
15
-
16
- <style>
17
- .hyvui-vignette {
18
- position: fixed;
19
- inset: 0;
20
- pointer-events: none;
21
- z-index: var(--z-overlay);
22
- background:
23
- radial-gradient(ellipse at 50% 0%, transparent 60%, rgba(0, 0, 0, 0.4)),
24
- radial-gradient(ellipse at 50% 100%, transparent 60%, rgba(0, 0, 0, 0.5));
25
- }
26
- </style>
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 { class: className = '' }: Props = $props();
10
+ </script>
11
+
12
+ <div class={cn('hyvui-vignette', className)} aria-hidden="true"></div>
13
+
14
+ <style>
15
+ .hyvui-vignette {
16
+ position: fixed;
17
+ inset: 0;
18
+ pointer-events: none;
19
+ z-index: var(--z-overlay);
20
+ background:
21
+ radial-gradient(ellipse at 50% 0%, transparent 60%, rgba(0, 0, 0, 0.4)),
22
+ radial-gradient(ellipse at 50% 100%, transparent 60%, rgba(0, 0, 0, 0.5));
23
+ }
24
+ </style>
@@ -1,27 +1,22 @@
1
- <script lang="ts">
2
- import { cn } from '../../utils/cn.js';
3
- import type { DepthLevel } from '../../system/depth/depth.js';
4
- import type { Snippet } from 'svelte';
5
-
6
- interface Props {
7
- /** Z-level within a parent DepthStage. */
8
- level?: DepthLevel;
9
- /** HTML tag to render. */
10
- as?: string;
11
- /** Additional CSS classes. */
12
- class?: string;
13
- /** Layer content. */
14
- children?: Snippet;
15
- }
16
-
17
- let {
18
- level = 'ground',
19
- as = 'div',
20
- class: className = '',
21
- children,
22
- }: Props = $props();
23
- </script>
24
-
25
- <svelte:element this={as} class={cn(`depth-${level}`, className)}>
26
- {#if children}{@render children()}{/if}
27
- </svelte:element>
1
+ <script lang="ts">
2
+ import { cn } from '../../utils/cn.js';
3
+ import type { DepthLevel } from '../../system/depth/depth.js';
4
+ import type { Snippet } from 'svelte';
5
+
6
+ interface Props {
7
+ /** Z-level within a parent DepthStage. */
8
+ level?: DepthLevel;
9
+ /** HTML tag to render. */
10
+ as?: string;
11
+ /** Additional CSS classes. */
12
+ class?: string;
13
+ /** Layer content. */
14
+ children?: Snippet;
15
+ }
16
+
17
+ let { level = 'ground', as = 'div', class: className = '', children }: Props = $props();
18
+ </script>
19
+
20
+ <svelte:element this={as} class={cn(`depth-${level}`, className)}>
21
+ {#if children}{@render children()}{/if}
22
+ </svelte:element>