@streamscloud/kit 0.0.1 → 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/dist/ui/button/cmp.button.svelte +48 -0
- package/dist/ui/button/cmp.button.svelte.d.ts +48 -0
- package/dist/ui/button/cmp.options-button.svelte +12 -0
- package/dist/ui/button/cmp.options-button.svelte.d.ts +16 -0
- package/dist/ui/card-actions/cmp.card-action.svelte +10 -0
- package/dist/ui/card-actions/cmp.card-action.svelte.d.ts +9 -0
- package/dist/ui/card-actions/cmp.card-actions.svelte +17 -0
- package/dist/ui/card-actions/cmp.card-actions.svelte.d.ts +17 -0
- package/dist/ui/dialog/cmp.dialog-button.svelte +5 -0
- package/dist/ui/dialog/cmp.dialog-button.svelte.d.ts +2 -0
- package/dist/ui/dialog/cmp.dialog-cancel-button.svelte +5 -0
- package/dist/ui/dialog/cmp.dialog-cancel-button.svelte.d.ts +1 -0
- package/dist/ui/dialog/cmp.dialog-close-button.svelte +10 -0
- package/dist/ui/dialog/cmp.dialog-close-button.svelte.d.ts +9 -0
- package/dist/ui/dialog/cmp.dialog.svelte +23 -0
- package/dist/ui/dialog/cmp.dialog.svelte.d.ts +29 -0
- package/dist/ui/dropdown/cmp.dropdown.svelte +10 -0
- package/dist/ui/dropdown/cmp.dropdown.svelte.d.ts +17 -0
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte +10 -0
- package/dist/ui/dynamic-component/cmp.dynamic-component.svelte.d.ts +8 -0
- package/dist/ui/icon/cmp.icon.svelte +20 -0
- package/dist/ui/icon/cmp.icon.svelte.d.ts +20 -0
- package/dist/ui/image/cmp.image-round.svelte +10 -0
- package/dist/ui/image/cmp.image-round.svelte.d.ts +10 -0
- package/dist/ui/image/cmp.image-rounded.svelte +20 -0
- package/dist/ui/image/cmp.image-rounded.svelte.d.ts +20 -0
- package/dist/ui/image/cmp.image-stub.svelte +10 -0
- package/dist/ui/image/cmp.image-stub.svelte.d.ts +8 -0
- package/dist/ui/image/cmp.image.svelte +13 -0
- package/dist/ui/image/cmp.image.svelte.d.ts +15 -0
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte +10 -0
- package/dist/ui/infinite-scrolling/cmp.infinite-scrolling.svelte.d.ts +12 -3
- package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte +10 -0
- package/dist/ui/line-clamp/cmp.line-clamp-auto.svelte.d.ts +9 -0
- package/dist/ui/line-clamp/cmp.line-clamp.svelte +11 -0
- package/dist/ui/line-clamp/cmp.line-clamp.svelte.d.ts +11 -0
- package/dist/ui/loading/cmp.loading.svelte +11 -0
- package/dist/ui/loading/cmp.loading.svelte.d.ts +13 -0
- package/dist/ui/player/buttons/cmp.mobile-player-buttons.svelte +10 -0
- package/dist/ui/player/buttons/cmp.mobile-player-buttons.svelte.d.ts +8 -0
- package/dist/ui/player/buttons/cmp.player-buttons.svelte +11 -0
- package/dist/ui/player/buttons/cmp.player-buttons.svelte.d.ts +12 -0
- package/dist/ui/player/buttons/cmp.responsive-player-buttons.svelte +11 -0
- package/dist/ui/player/buttons/cmp.responsive-player-buttons.svelte.d.ts +9 -0
- package/dist/ui/player/carousel/cmp.carousel.svelte +13 -0
- package/dist/ui/player/carousel/cmp.carousel.svelte.d.ts +18 -0
- package/dist/ui/player/feed-slider/cmp.feed-slider.svelte +5 -0
- package/dist/ui/player/feed-slider/cmp.feed-slider.svelte.d.ts +3 -0
- package/dist/ui/progress/cmp.progress.svelte +8 -7
- package/dist/ui/progress/cmp.progress.svelte.d.ts +1 -1
- package/dist/ui/proportional-container/cmp.proportional-container.svelte +12 -0
- package/dist/ui/proportional-container/cmp.proportional-container.svelte.d.ts +11 -0
- package/dist/ui/seek-bar/cmp.seek-bar.svelte +13 -0
- package/dist/ui/seek-bar/cmp.seek-bar.svelte.d.ts +14 -1
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte +12 -0
- package/dist/ui/swipe-indicator/cmp.swipe-indicator.svelte.d.ts +11 -0
- package/dist/ui/time-ago/cmp.time-ago.svelte +12 -0
- package/dist/ui/time-ago/cmp.time-ago.svelte.d.ts +10 -0
- package/dist/ui/video/cmp.video.svelte +13 -0
- package/dist/ui/video/cmp.video.svelte.d.ts +23 -0
- package/package.json +1 -1
|
@@ -1,11 +1,31 @@
|
|
|
1
1
|
type Props = {
|
|
2
|
+
/** Image URL to display */
|
|
2
3
|
src: string | null | undefined;
|
|
3
4
|
alt?: string;
|
|
5
|
+
/** Show a decorative gradient ring around the image */
|
|
4
6
|
ring?: boolean;
|
|
5
7
|
on?: {
|
|
6
8
|
click: () => void;
|
|
7
9
|
};
|
|
8
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* A rounded-corner image with an optional decorative double-border ring (outer gradient + inner solid).
|
|
13
|
+
*
|
|
14
|
+
* ### CSS Custom Properties
|
|
15
|
+
* | Property | Description | Default |
|
|
16
|
+
* |---|---|---|
|
|
17
|
+
* | `--sc-kit--image--rounded--size` | Shorthand for both width and height | `100%` |
|
|
18
|
+
* | `--sc-kit--image--rounded--width` | Container width | inherits `--size` |
|
|
19
|
+
* | `--sc-kit--image--rounded--height` | Container height | inherits `--size` |
|
|
20
|
+
* | `--sc-kit--image--rounded--image--border-radius` | Inner image corner radius | computed |
|
|
21
|
+
* | `--sc-kit--image--rounded--inner--border-color` | Inner border color | `white` / `dark-900` |
|
|
22
|
+
* | `--sc-kit--image--rounded--inner--border-radius` | Inner border radius | computed |
|
|
23
|
+
* | `--sc-kit--image--rounded--inner--border-width` | Inner border thickness | `4px` |
|
|
24
|
+
* | `--sc-kit--image--rounded--outer--border-color` | Outer ring gradient | `primary-500` to `primary-100` |
|
|
25
|
+
* | `--sc-kit--image--rounded--outer--border-radius` | Outer border radius | `2px` |
|
|
26
|
+
* | `--sc-kit--image--rounded--outer--border-width` | Outer ring thickness | `2px` |
|
|
27
|
+
* | `--sc-kit--image--rounded--stub--background` | Background when `src` is empty | `neutral-300` / `neutral-700` |
|
|
28
|
+
*/
|
|
9
29
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
10
30
|
type Cmp = ReturnType<typeof Cmp>;
|
|
11
31
|
export default Cmp;
|
|
@@ -6,6 +6,16 @@ import IconImage from '@fluentui/svg-icons/icons/image_20_regular.svg?raw';
|
|
|
6
6
|
<Icon src={IconImage} />
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
+
<!--
|
|
10
|
+
@component
|
|
11
|
+
A placeholder image stub showing a generic image icon, used as a fallback when no image source is available.
|
|
12
|
+
|
|
13
|
+
### CSS Custom Properties
|
|
14
|
+
| Property | Description | Default |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `--sc-kit--image-stub--color` | Icon and border color | `neutral-300` / `neutral-700` |
|
|
17
|
+
-->
|
|
18
|
+
|
|
9
19
|
<style>.image-stub {
|
|
10
20
|
--_image-stub--color: var(--sc-kit--image-stub--color, var(--sc-color--bg-images, light-dark(#d1d5db, #374151)));
|
|
11
21
|
width: 100%;
|
|
@@ -11,6 +11,14 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
11
11
|
};
|
|
12
12
|
z_$$bindings?: Bindings;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* A placeholder image stub showing a generic image icon, used as a fallback when no image source is available.
|
|
16
|
+
*
|
|
17
|
+
* ### CSS Custom Properties
|
|
18
|
+
* | Property | Description | Default |
|
|
19
|
+
* |---|---|---|
|
|
20
|
+
* | `--sc-kit--image-stub--color` | Icon and border color | `neutral-300` / `neutral-700` |
|
|
21
|
+
*/
|
|
14
22
|
declare const Cmp: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
23
|
[evt: string]: CustomEvent<any>;
|
|
16
24
|
}, {}, {}, string>;
|
|
@@ -34,6 +34,19 @@ const onLoadError = () => {
|
|
|
34
34
|
{/if}
|
|
35
35
|
</div>
|
|
36
36
|
|
|
37
|
+
<!--
|
|
38
|
+
@component
|
|
39
|
+
Displays an image with loading states: shows the image on success, an error icon on failure, or a customizable stub placeholder.
|
|
40
|
+
|
|
41
|
+
### CSS Custom Properties
|
|
42
|
+
| Property | Description | Default |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| `--sc-kit--image--background` | Container background | `transparent` |
|
|
45
|
+
| `--sc-kit--image--border-radius` | Corner rounding | `0` |
|
|
46
|
+
| `--sc-kit--image--object-fit` | Image object-fit mode | `cover` |
|
|
47
|
+
| `--sc-kit--image--stub--background` | Stub placeholder background | `neutral-300` / `neutral-700` |
|
|
48
|
+
-->
|
|
49
|
+
|
|
37
50
|
<style>.image {
|
|
38
51
|
--_image--background: var(--sc-kit--image--background, transparent);
|
|
39
52
|
--_image--border-radius: var(--sc-kit--image--border-radius, 0);
|
|
@@ -1,13 +1,28 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
type Props = {
|
|
3
|
+
/** Image URL to display */
|
|
3
4
|
src: string | null | undefined;
|
|
4
5
|
alt?: string;
|
|
6
|
+
/** Show a placeholder stub instead of an error icon when image fails to load */
|
|
5
7
|
showStubOnError?: boolean;
|
|
6
8
|
on?: {
|
|
9
|
+
/** Fires after load attempt; `true` if successful, `false` on error */
|
|
7
10
|
load?: (loadedSuccessfully: boolean) => void;
|
|
8
11
|
};
|
|
12
|
+
/** Custom stub snippet rendered while image has no source or on error with `showStubOnError` */
|
|
9
13
|
stub?: Snippet;
|
|
10
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Displays an image with loading states: shows the image on success, an error icon on failure, or a customizable stub placeholder.
|
|
17
|
+
*
|
|
18
|
+
* ### CSS Custom Properties
|
|
19
|
+
* | Property | Description | Default |
|
|
20
|
+
* |---|---|---|
|
|
21
|
+
* | `--sc-kit--image--background` | Container background | `transparent` |
|
|
22
|
+
* | `--sc-kit--image--border-radius` | Corner rounding | `0` |
|
|
23
|
+
* | `--sc-kit--image--object-fit` | Image object-fit mode | `cover` |
|
|
24
|
+
* | `--sc-kit--image--stub--background` | Stub placeholder background | `neutral-300` / `neutral-700` |
|
|
25
|
+
*/
|
|
11
26
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
12
27
|
type Cmp = ReturnType<typeof Cmp>;
|
|
13
28
|
export default Cmp;
|
|
@@ -61,6 +61,16 @@ const onLoadMore = async () => {
|
|
|
61
61
|
{/if}
|
|
62
62
|
</div>
|
|
63
63
|
|
|
64
|
+
<!--
|
|
65
|
+
@component
|
|
66
|
+
Triggers an async `loadMore` callback when a sentinel element scrolls into view, using IntersectionObserver.
|
|
67
|
+
|
|
68
|
+
### CSS Custom Properties
|
|
69
|
+
| Property | Description | Default |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| `--sc-kit--infinite-scrolling--overflow-y` | Vertical overflow behavior | `initial` |
|
|
72
|
+
-->
|
|
73
|
+
|
|
64
74
|
<style>.infinite-scrolling {
|
|
65
75
|
--_infinite-scrolling--overflow-y: var(--sc-kit--infinite-scrolling--overflow-y, initial);
|
|
66
76
|
overflow-y: var(--_infinite-scrolling--overflow-y);
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
type Props = {
|
|
3
|
+
/** Async callback invoked when the scroll trigger becomes visible */
|
|
3
4
|
loadMore: () => Promise<unknown>;
|
|
4
|
-
/**
|
|
5
|
-
* Must be passed only if viewport is less than scrolling container
|
|
6
|
-
*/
|
|
5
|
+
/** Scroll ancestor for IntersectionObserver root; required when viewport differs from scroll container */
|
|
7
6
|
container?: HTMLElement | null;
|
|
7
|
+
/** IntersectionObserver rootMargin to trigger loading before reaching the bottom */
|
|
8
8
|
actuationOffset?: string;
|
|
9
9
|
children: Snippet;
|
|
10
|
+
/** Custom loading indicator snippet; defaults to the built-in `Loading` spinner */
|
|
10
11
|
loading?: Snippet;
|
|
11
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Triggers an async `loadMore` callback when a sentinel element scrolls into view, using IntersectionObserver.
|
|
15
|
+
*
|
|
16
|
+
* ### CSS Custom Properties
|
|
17
|
+
* | Property | Description | Default |
|
|
18
|
+
* |---|---|---|
|
|
19
|
+
* | `--sc-kit--infinite-scrolling--overflow-y` | Vertical overflow behavior | `initial` |
|
|
20
|
+
*/
|
|
12
21
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
13
22
|
type Cmp = ReturnType<typeof Cmp>;
|
|
14
23
|
export default Cmp;
|
|
@@ -66,6 +66,16 @@ $effect(() => {
|
|
|
66
66
|
{/if}
|
|
67
67
|
</div>
|
|
68
68
|
|
|
69
|
+
<!--
|
|
70
|
+
@component
|
|
71
|
+
Automatically calculates the maximum number of visible lines based on parent height, then truncates with an optional "show more" toggle.
|
|
72
|
+
|
|
73
|
+
### CSS Custom Properties
|
|
74
|
+
| Property | Description | Default |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| `--sc-kit--line-clamp--white-space` | White-space mode for wrapped text | `pre-line` |
|
|
77
|
+
-->
|
|
78
|
+
|
|
69
79
|
<style>.line-clamp {
|
|
70
80
|
--_line-clamp--white-space: var(--sc-kit--line-clamp--white-space, pre-line);
|
|
71
81
|
width: 100%;
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
2
|
type Props = {
|
|
3
|
+
/** Show a "show more / show less" toggle when text is truncated */
|
|
3
4
|
enableShowMore?: boolean;
|
|
4
5
|
children: Snippet;
|
|
5
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* Automatically calculates the maximum number of visible lines based on parent height, then truncates with an optional "show more" toggle.
|
|
9
|
+
*
|
|
10
|
+
* ### CSS Custom Properties
|
|
11
|
+
* | Property | Description | Default |
|
|
12
|
+
* |---|---|---|
|
|
13
|
+
* | `--sc-kit--line-clamp--white-space` | White-space mode for wrapped text | `pre-line` |
|
|
14
|
+
*/
|
|
6
15
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
7
16
|
type Cmp = ReturnType<typeof Cmp>;
|
|
8
17
|
export default Cmp;
|
|
@@ -41,6 +41,17 @@ const trackTruncatedState = (node) => {
|
|
|
41
41
|
{/if}
|
|
42
42
|
</div>
|
|
43
43
|
|
|
44
|
+
<!--
|
|
45
|
+
@component
|
|
46
|
+
Truncates text content to a fixed number of lines with an optional "show more / show less" toggle.
|
|
47
|
+
|
|
48
|
+
### CSS Custom Properties
|
|
49
|
+
| Property | Description | Default |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `--sc-kit--line-clamp--white-space` | White-space mode for wrapped text | `pre-line` |
|
|
52
|
+
| `--sc-kit--line-clamp--line-clamp` | Number of lines before truncation | `1` |
|
|
53
|
+
-->
|
|
54
|
+
|
|
44
55
|
<style>.line-clamp {
|
|
45
56
|
--_line-clamp--white-space: var(--sc-kit--line-clamp--white-space, pre-line);
|
|
46
57
|
--_line-clamp--line-clamp: var(--sc-kit--line-clamp--line-clamp, 1);
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
2
|
type Props = {
|
|
3
|
+
/** Maximum number of visible lines before truncation. Also settable via CSS custom property. */
|
|
3
4
|
maxLines?: number;
|
|
5
|
+
/** Show a "show more / show less" toggle when text is truncated */
|
|
4
6
|
enableShowMore?: boolean;
|
|
5
7
|
children: Snippet;
|
|
6
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* Truncates text content to a fixed number of lines with an optional "show more / show less" toggle.
|
|
11
|
+
*
|
|
12
|
+
* ### CSS Custom Properties
|
|
13
|
+
* | Property | Description | Default |
|
|
14
|
+
* |---|---|---|
|
|
15
|
+
* | `--sc-kit--line-clamp--white-space` | White-space mode for wrapped text | `pre-line` |
|
|
16
|
+
* | `--sc-kit--line-clamp--line-clamp` | Number of lines before truncation | `1` |
|
|
17
|
+
*/
|
|
7
18
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
8
19
|
type Cmp = ReturnType<typeof Cmp>;
|
|
9
20
|
export default Cmp;
|
|
@@ -18,6 +18,17 @@ $effect(() => {
|
|
|
18
18
|
<div class="la-ball-clip-rotate__spin"></div>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
|
+
<!--
|
|
22
|
+
@component
|
|
23
|
+
A circular spinning loader with optional delay and blocking overlay.
|
|
24
|
+
|
|
25
|
+
### CSS Custom Properties
|
|
26
|
+
| Property | Description | Default |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `--sc-kit--loading--font-size` | Base size of the spinner | `1rem` |
|
|
29
|
+
| `--sc-kit--loading--spinner-color` | Spinner arc color | `primary-500` / `primary-400` |
|
|
30
|
+
-->
|
|
31
|
+
|
|
21
32
|
<style>.loading-ring-overlay {
|
|
22
33
|
position: absolute;
|
|
23
34
|
inset: 0;
|
|
@@ -1,9 +1,22 @@
|
|
|
1
1
|
type Props = {
|
|
2
|
+
/** Center the spinner using fixed positioning */
|
|
2
3
|
positionFixedCenter?: boolean;
|
|
4
|
+
/** Center the spinner using absolute positioning */
|
|
3
5
|
positionAbsoluteCenter?: boolean;
|
|
6
|
+
/** Show a semi-transparent overlay behind the spinner */
|
|
4
7
|
blocking?: boolean;
|
|
8
|
+
/** Delay in ms before the spinner becomes visible @default 0 */
|
|
5
9
|
timeout?: number;
|
|
6
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* A circular spinning loader with optional delay and blocking overlay.
|
|
13
|
+
*
|
|
14
|
+
* ### CSS Custom Properties
|
|
15
|
+
* | Property | Description | Default |
|
|
16
|
+
* |---|---|---|
|
|
17
|
+
* | `--sc-kit--loading--font-size` | Base size of the spinner | `1rem` |
|
|
18
|
+
* | `--sc-kit--loading--spinner-color` | Spinner arc color | `primary-500` / `primary-400` |
|
|
19
|
+
*/
|
|
7
20
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
8
21
|
type Cmp = ReturnType<typeof Cmp>;
|
|
9
22
|
export default Cmp;
|
|
@@ -12,6 +12,16 @@ let { actions } = $props();
|
|
|
12
12
|
{/each}
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
+
<!--
|
|
16
|
+
@component
|
|
17
|
+
A vertically stacked column of player action buttons optimized for mobile touch targets.
|
|
18
|
+
|
|
19
|
+
### Props
|
|
20
|
+
| Prop | Type | Description |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `actions` | `PlayerButtonDef[]` | Array of button definitions (icon, callback, disabled state) |
|
|
23
|
+
-->
|
|
24
|
+
|
|
15
25
|
<style>.mobile-player-buttons {
|
|
16
26
|
cursor: pointer;
|
|
17
27
|
display: flex;
|
|
@@ -2,6 +2,14 @@ import type { PlayerButtonDef } from './types';
|
|
|
2
2
|
type Props = {
|
|
3
3
|
actions: PlayerButtonDef[];
|
|
4
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* A vertically stacked column of player action buttons optimized for mobile touch targets.
|
|
7
|
+
*
|
|
8
|
+
* ### Props
|
|
9
|
+
* | Prop | Type | Description |
|
|
10
|
+
* |---|---|---|
|
|
11
|
+
* | `actions` | `PlayerButtonDef[]` | Array of button definitions (icon, callback, disabled state) |
|
|
12
|
+
*/
|
|
5
13
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
6
14
|
type Cmp = ReturnType<typeof Cmp>;
|
|
7
15
|
export default Cmp;
|
|
@@ -32,6 +32,17 @@ let { actions, scaleEffect = false, zoom = 1 } = $props();
|
|
|
32
32
|
</div>
|
|
33
33
|
{/if}
|
|
34
34
|
|
|
35
|
+
<!--
|
|
36
|
+
@component
|
|
37
|
+
Desktop player action buttons — renders a single circular button or a vertically stacked pill for multiple actions.
|
|
38
|
+
|
|
39
|
+
### CSS Custom Properties
|
|
40
|
+
| Property | Description | Default |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `--sc-kit--player-button--color` | Button background at full opacity | `dark-500` / `black` at 95% |
|
|
43
|
+
| `--sc-kit--player-button--color--inactive` | Button background at rest | 60% opacity of `--color` |
|
|
44
|
+
-->
|
|
45
|
+
|
|
35
46
|
<style>.player-button {
|
|
36
47
|
--_player-button--color: var(--sc-kit--player-button--color, rgb(from light-dark(#272727, #000000) r g b / 95%));
|
|
37
48
|
--_player-button--color--inactive: var(--sc-kit--player-button--color--inactive, rgb(from var(--_player-button--color) r g b / 60%));
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import type { PlayerButtonDef } from './types';
|
|
2
2
|
type Props = {
|
|
3
|
+
/** Array of button definitions (icon, callback, disabled state) */
|
|
3
4
|
actions: PlayerButtonDef[];
|
|
5
|
+
/** Scale the icon on hover */
|
|
4
6
|
scaleEffect?: boolean;
|
|
7
|
+
/** CSS zoom level applied to the button container @default 1 */
|
|
5
8
|
zoom?: number;
|
|
6
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Desktop player action buttons — renders a single circular button or a vertically stacked pill for multiple actions.
|
|
12
|
+
*
|
|
13
|
+
* ### CSS Custom Properties
|
|
14
|
+
* | Property | Description | Default |
|
|
15
|
+
* |---|---|---|
|
|
16
|
+
* | `--sc-kit--player-button--color` | Button background at full opacity | `dark-500` / `black` at 95% |
|
|
17
|
+
* | `--sc-kit--player-button--color--inactive` | Button background at rest | 60% opacity of `--color` |
|
|
18
|
+
*/
|
|
7
19
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
8
20
|
type Cmp = ReturnType<typeof Cmp>;
|
|
9
21
|
export default Cmp;
|
|
@@ -11,6 +11,17 @@ let { scaleEffect = false, actions } = $props();
|
|
|
11
11
|
<MobilePlayerButtons actions={actions} />
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
|
+
<!--
|
|
15
|
+
@component
|
|
16
|
+
Renders `PlayerButtons` on desktop and `MobilePlayerButtons` on mobile, switching via container query.
|
|
17
|
+
|
|
18
|
+
### Props
|
|
19
|
+
| Prop | Type | Default | Description |
|
|
20
|
+
|---|---|---|---|
|
|
21
|
+
| `actions` | `PlayerButtonDef[]` | — | Array of button definitions |
|
|
22
|
+
| `scaleEffect` | `boolean` | `false` | Whether icons scale on hover (desktop only) |
|
|
23
|
+
-->
|
|
24
|
+
|
|
14
25
|
<style>.desktop-controls {
|
|
15
26
|
display: contents;
|
|
16
27
|
/* Set 'container-type: inline-size;' to reference container*/
|
|
@@ -3,6 +3,15 @@ type Props = {
|
|
|
3
3
|
actions: PlayerButtonDef[];
|
|
4
4
|
scaleEffect?: boolean;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* Renders `PlayerButtons` on desktop and `MobilePlayerButtons` on mobile, switching via container query.
|
|
8
|
+
*
|
|
9
|
+
* ### Props
|
|
10
|
+
* | Prop | Type | Default | Description |
|
|
11
|
+
* |---|---|---|---|
|
|
12
|
+
* | `actions` | `PlayerButtonDef[]` | — | Array of button definitions |
|
|
13
|
+
* | `scaleEffect` | `boolean` | `false` | Whether icons scale on hover (desktop only) |
|
|
14
|
+
*/
|
|
6
15
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
7
16
|
type Cmp = ReturnType<typeof Cmp>;
|
|
8
17
|
export default Cmp;
|
|
@@ -253,6 +253,19 @@ const slidesTranslateX = $derived(swipeTransition || (items.length > 1 ? -slider
|
|
|
253
253
|
{/if}
|
|
254
254
|
</div>
|
|
255
255
|
|
|
256
|
+
<!--
|
|
257
|
+
@component
|
|
258
|
+
A horizontal slide carousel with infinite looping, touch swipe support, keyboard navigation, and multiple display modes (arrows, dots, counts).
|
|
259
|
+
|
|
260
|
+
### CSS Custom Properties
|
|
261
|
+
| Property | Description | Default |
|
|
262
|
+
|---|---|---|
|
|
263
|
+
| `--sc-kit--carousel--button-color` | Navigation arrow button background | `neutral-400` |
|
|
264
|
+
| `--sc-kit--carousel--dot-color` | Dot indicator color (fill when active, border when inactive) | `white` |
|
|
265
|
+
| `--sc-kit--carousel--dot-size` | Dot indicator diameter | `0.5rem` |
|
|
266
|
+
| `--sc-kit--carousel--text-color` | Arrow button icon and counter text color | `white` |
|
|
267
|
+
-->
|
|
268
|
+
|
|
256
269
|
<style>@charset "UTF-8";
|
|
257
270
|
.carousel {
|
|
258
271
|
/* Public API */
|
|
@@ -2,14 +2,21 @@ import type { CarouselMode } from './types';
|
|
|
2
2
|
import { type Snippet } from 'svelte';
|
|
3
3
|
declare function $$render<T>(): {
|
|
4
4
|
props: {
|
|
5
|
+
/** Array of items to cycle through */
|
|
5
6
|
items: T[];
|
|
7
|
+
/** Zero-based index of the initially visible slide */
|
|
6
8
|
initialIndex: number;
|
|
9
|
+
/** Navigation UI mode @default 'arrows-with-counts' */
|
|
7
10
|
mode?: CarouselMode;
|
|
11
|
+
/** Auto-advance interval in ms; 0 disables auto-sliding @default 0 */
|
|
8
12
|
autoSlideMs?: number;
|
|
9
13
|
on?: {
|
|
14
|
+
/** Fires after the active slide changes */
|
|
10
15
|
indexChanged: (index: number) => void;
|
|
11
16
|
};
|
|
17
|
+
/** Render snippet for each slide item */
|
|
12
18
|
children: Snippet<[T]>;
|
|
19
|
+
/** Custom dot indicator snippet; receives `{ active }` flag */
|
|
13
20
|
dot?: Snippet<[{
|
|
14
21
|
active: boolean;
|
|
15
22
|
}]>;
|
|
@@ -33,6 +40,17 @@ interface $$IsomorphicComponent {
|
|
|
33
40
|
<T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
34
41
|
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
35
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* A horizontal slide carousel with infinite looping, touch swipe support, keyboard navigation, and multiple display modes (arrows, dots, counts).
|
|
45
|
+
*
|
|
46
|
+
* ### CSS Custom Properties
|
|
47
|
+
* | Property | Description | Default |
|
|
48
|
+
* |---|---|---|
|
|
49
|
+
* | `--sc-kit--carousel--button-color` | Navigation arrow button background | `neutral-400` |
|
|
50
|
+
* | `--sc-kit--carousel--dot-color` | Dot indicator color (fill when active, border when inactive) | `white` |
|
|
51
|
+
* | `--sc-kit--carousel--dot-size` | Dot indicator diameter | `0.5rem` |
|
|
52
|
+
* | `--sc-kit--carousel--text-color` | Arrow button icon and counter text color | `white` |
|
|
53
|
+
*/
|
|
36
54
|
declare const Cmp: $$IsomorphicComponent;
|
|
37
55
|
type Cmp<T> = InstanceType<typeof Cmp<T>>;
|
|
38
56
|
export default Cmp;
|
|
@@ -172,6 +172,11 @@ const wheelCallbacks = {
|
|
|
172
172
|
</div>
|
|
173
173
|
</div>
|
|
174
174
|
|
|
175
|
+
<!--
|
|
176
|
+
@component
|
|
177
|
+
A vertical full-screen feed slider (TikTok-style) with touch swipe, mouse wheel, and keyboard navigation. Only renders the active slide and its immediate neighbors for performance.
|
|
178
|
+
-->
|
|
179
|
+
|
|
175
180
|
<style>.feed-slider {
|
|
176
181
|
position: relative;
|
|
177
182
|
overflow: clip;
|
|
@@ -4,8 +4,10 @@ declare function $$render<T extends {
|
|
|
4
4
|
id: string;
|
|
5
5
|
}>(): {
|
|
6
6
|
props: {
|
|
7
|
+
/** Buffer controller managing the loaded items, current index, and navigation */
|
|
7
8
|
buffer: FeedSliderBuffer<T>;
|
|
8
9
|
on?: FeedSliderCallbacks;
|
|
10
|
+
/** Render snippet for each slide; receives `{ item, active }` */
|
|
9
11
|
children: Snippet<[{
|
|
10
12
|
item: T;
|
|
11
13
|
active?: boolean;
|
|
@@ -36,6 +38,7 @@ interface $$IsomorphicComponent {
|
|
|
36
38
|
}>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
37
39
|
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
38
40
|
}
|
|
41
|
+
/** A vertical full-screen feed slider (TikTok-style) with touch swipe, mouse wheel, and keyboard navigation. Only renders the active slide and its immediate neighbors for performance. */
|
|
39
42
|
declare const Cmp: $$IsomorphicComponent;
|
|
40
43
|
type Cmp<T extends {
|
|
41
44
|
id: string;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
<script lang="ts">let { value } = $props();
|
|
2
|
+
const cssWidth = $derived(`${100 * (value <= 1 ? value : 1)}%`);
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div class="progress">
|
|
6
|
+
<span class="progress__value" class:progress__value--animated={value > 0.01 && value < 0.96} style:width={cssWidth}> </span>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
1
9
|
<!--
|
|
2
10
|
@component
|
|
3
11
|
A horizontal progress bar that fills from left to right based on a normalized value.
|
|
@@ -11,13 +19,6 @@ A horizontal progress bar that fills from left to right based on a normalized va
|
|
|
11
19
|
| `--sc-kit--progress--box-shadow` | Inset shadow on the track | `0 2px 3px rgba(0,0,0,0.25) inset` |
|
|
12
20
|
| `--sc-kit--progress--border-radius` | Corner radius | `0` |
|
|
13
21
|
-->
|
|
14
|
-
<script lang="ts">let { value } = $props();
|
|
15
|
-
const cssWidth = $derived(`${100 * (value <= 1 ? value : 1)}%`);
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<div class="progress">
|
|
19
|
-
<span class="progress__value" class:progress__value--animated={value > 0.01 && value < 0.96} style:width={cssWidth}> </span>
|
|
20
|
-
</div>
|
|
21
22
|
|
|
22
23
|
<style>.progress {
|
|
23
24
|
--_progress--height: var(--sc-kit--progress--height, 0.25em);
|
|
@@ -8,6 +8,18 @@ export {};
|
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
|
+
<!--
|
|
12
|
+
@component
|
|
13
|
+
A container that maintains a fixed aspect ratio, placing children in an absolutely-positioned inner element.
|
|
14
|
+
|
|
15
|
+
### CSS Custom Properties
|
|
16
|
+
| Property | Description | Default |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| `--sc-kit--proportional-container--ratio` | Aspect ratio (width / height) | `1` |
|
|
19
|
+
| `--sc-kit--proportional-container--height` | Container height | `auto` |
|
|
20
|
+
| `--sc-kit--proportional-container--width` | Container width | `100%` |
|
|
21
|
+
-->
|
|
22
|
+
|
|
11
23
|
<style>.proportional-container {
|
|
12
24
|
--_proportional-container--ratio: var(--sc-kit--proportional-container--ratio, 1);
|
|
13
25
|
--_proportional-container--height: var(--sc-kit--proportional-container--height, auto);
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
type Props = {
|
|
3
|
+
/** Width-to-height aspect ratio (e.g. 16/9). Also settable via the CSS custom property. */
|
|
3
4
|
ratio?: number | undefined;
|
|
4
5
|
children?: Snippet;
|
|
5
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* A container that maintains a fixed aspect ratio, placing children in an absolutely-positioned inner element.
|
|
9
|
+
*
|
|
10
|
+
* ### CSS Custom Properties
|
|
11
|
+
* | Property | Description | Default |
|
|
12
|
+
* |---|---|---|
|
|
13
|
+
* | `--sc-kit--proportional-container--ratio` | Aspect ratio (width / height) | `1` |
|
|
14
|
+
* | `--sc-kit--proportional-container--height` | Container height | `auto` |
|
|
15
|
+
* | `--sc-kit--proportional-container--width` | Container width | `100%` |
|
|
16
|
+
*/
|
|
6
17
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
7
18
|
type Cmp = ReturnType<typeof Cmp>;
|
|
8
19
|
export default Cmp;
|
|
@@ -107,6 +107,19 @@ $effect(() => {
|
|
|
107
107
|
</div>
|
|
108
108
|
</div>
|
|
109
109
|
|
|
110
|
+
<!--
|
|
111
|
+
@component
|
|
112
|
+
A draggable media seek bar with a track, filled portion, and scrubber handle. Supports mouse drag, click-to-seek, and keyboard navigation.
|
|
113
|
+
|
|
114
|
+
### CSS Custom Properties
|
|
115
|
+
| Property | Description | Default |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| `--sc-kit--seek-bar--container-color` | Track background color | `neutral-400` |
|
|
118
|
+
| `--sc-kit--seek-bar--value-color` | Filled portion color | `white` |
|
|
119
|
+
| `--sc-kit--seek-bar--scrubber-color` | Scrubber handle color | `white` |
|
|
120
|
+
| `--sc-kit--seek-bar--scrubber-border-color` | Scrubber handle border color | `neutral-400` |
|
|
121
|
+
-->
|
|
122
|
+
|
|
110
123
|
<style>.seek-bar {
|
|
111
124
|
cursor: pointer;
|
|
112
125
|
position: relative;
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
type Props = {
|
|
2
|
-
/** 0
|
|
2
|
+
/** Current position from 0 to 1 */
|
|
3
3
|
value: number;
|
|
4
|
+
/** Forward click events from the parent element to seek */
|
|
4
5
|
listenParentClicks?: boolean;
|
|
5
6
|
on: {
|
|
7
|
+
/** Called with the new position (0-1) when the user seeks */
|
|
6
8
|
seek: (e: number) => void;
|
|
7
9
|
dragStart?: () => void;
|
|
8
10
|
dragEnd?: () => void;
|
|
9
11
|
};
|
|
10
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* A draggable media seek bar with a track, filled portion, and scrubber handle. Supports mouse drag, click-to-seek, and keyboard navigation.
|
|
15
|
+
*
|
|
16
|
+
* ### CSS Custom Properties
|
|
17
|
+
* | Property | Description | Default |
|
|
18
|
+
* |---|---|---|
|
|
19
|
+
* | `--sc-kit--seek-bar--container-color` | Track background color | `neutral-400` |
|
|
20
|
+
* | `--sc-kit--seek-bar--value-color` | Filled portion color | `white` |
|
|
21
|
+
* | `--sc-kit--seek-bar--scrubber-color` | Scrubber handle color | `white` |
|
|
22
|
+
* | `--sc-kit--seek-bar--scrubber-border-color` | Scrubber handle border color | `neutral-400` |
|
|
23
|
+
*/
|
|
11
24
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
12
25
|
type Cmp = ReturnType<typeof Cmp>;
|
|
13
26
|
export default Cmp;
|
|
@@ -27,6 +27,18 @@ const indicatorMounted = (_) => {
|
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
|
+
<!--
|
|
31
|
+
@component
|
|
32
|
+
An animated "swipe up" hint overlay with a bouncing arrow icon that fades out after a timeout.
|
|
33
|
+
|
|
34
|
+
### CSS Custom Properties
|
|
35
|
+
| Property | Description | Default |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `--sc-kit--swipe-indicator--color` | Text and icon color | `white` |
|
|
38
|
+
| `--sc-kit--swipe-indicator--font-size` | Text font size | `1rem` |
|
|
39
|
+
| `--sc-kit--swipe-indicator--icon-size` | Icon size | inherits font-size |
|
|
40
|
+
-->
|
|
41
|
+
|
|
30
42
|
<style>.swipe-indicator {
|
|
31
43
|
--_swipe-indicator--color: var(--sc-kit--swipe-indicator--color, #ffffff);
|
|
32
44
|
--_swipe-indicator--font-size: var(--sc-kit--swipe-indicator--font-size, 1rem);
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
type Props = {
|
|
2
|
+
/** Time in ms before the indicator fades out; 0 to keep visible @default 2000 */
|
|
2
3
|
fadeTimeout?: number;
|
|
3
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* An animated "swipe up" hint overlay with a bouncing arrow icon that fades out after a timeout.
|
|
7
|
+
*
|
|
8
|
+
* ### CSS Custom Properties
|
|
9
|
+
* | Property | Description | Default |
|
|
10
|
+
* |---|---|---|
|
|
11
|
+
* | `--sc-kit--swipe-indicator--color` | Text and icon color | `white` |
|
|
12
|
+
* | `--sc-kit--swipe-indicator--font-size` | Text font size | `1rem` |
|
|
13
|
+
* | `--sc-kit--swipe-indicator--icon-size` | Icon size | inherits font-size |
|
|
14
|
+
*/
|
|
4
15
|
declare const Cmp: import("svelte").Component<Props, {}, "">;
|
|
5
16
|
type Cmp = ReturnType<typeof Cmp>;
|
|
6
17
|
export default Cmp;
|