@streamscloud/kit 0.0.1-1770823200886 → 0.0.1-1770839905472

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.
@@ -0,0 +1,82 @@
1
+ <script lang="ts">import { onMount } from 'svelte';
2
+ let { positionFixedCenter = false, positionAbsoluteCenter = false, blocking = false, timeout = 0 } = $props();
3
+ let visible = $state(false);
4
+ onMount(() => {
5
+ setTimeout(() => (visible = true), timeout);
6
+ });
7
+ </script>
8
+
9
+ {#if visible && blocking}
10
+ <div class="loading-ring-overlay" class:loading-ring-overlay--fixed={positionFixedCenter}></div>
11
+ {/if}
12
+
13
+ <div
14
+ class="la-ball-clip-rotate"
15
+ class:la-ball-clip-rotate--absolute-center={positionAbsoluteCenter}
16
+ class:la-ball-clip-rotate--fixed-center={positionFixedCenter}
17
+ class:la-ball-clip-rotate--visible={visible}>
18
+ <div class="la-ball-clip-rotate__spin"></div>
19
+ </div>
20
+
21
+ <style>.loading-ring-overlay {
22
+ position: absolute;
23
+ inset: 0;
24
+ background-color: rgba(0, 0, 0, 0.3);
25
+ z-index: 999;
26
+ }
27
+ .loading-ring-overlay--fixed {
28
+ position: fixed;
29
+ }
30
+
31
+ .la-ball-clip-rotate {
32
+ --_loading--font-size: var(--loading--font-size, 1rem);
33
+ --_loading--spinner-color: var(--loading--spinner-color, light-dark(#144ab0, #5a8dec));
34
+ font-size: var(--_loading--font-size);
35
+ color: var(--_loading--spinner-color);
36
+ display: block;
37
+ opacity: 0;
38
+ width: 2em;
39
+ height: 2em;
40
+ z-index: 10;
41
+ }
42
+ .la-ball-clip-rotate--visible {
43
+ opacity: 1;
44
+ }
45
+ .la-ball-clip-rotate--absolute-center {
46
+ position: absolute;
47
+ top: 50%;
48
+ left: 50%;
49
+ transform: translate(-50%, -50%);
50
+ }
51
+ .la-ball-clip-rotate--fixed-center {
52
+ position: fixed;
53
+ top: 50%;
54
+ left: 50%;
55
+ transform: translate(-50%, -50%);
56
+ z-index: 1;
57
+ }
58
+ .la-ball-clip-rotate__spin {
59
+ position: relative;
60
+ box-sizing: border-box;
61
+ display: inline-block;
62
+ float: none;
63
+ border: 0.125em solid currentColor;
64
+ width: 2em;
65
+ height: 2em;
66
+ background: transparent;
67
+ border-bottom-color: transparent;
68
+ border-radius: 100%;
69
+ animation: ball-clip-rotate 0.75s linear infinite;
70
+ }
71
+
72
+ @keyframes ball-clip-rotate {
73
+ 0% {
74
+ transform: rotate(0deg);
75
+ }
76
+ 50% {
77
+ transform: rotate(180deg);
78
+ }
79
+ 100% {
80
+ transform: rotate(360deg);
81
+ }
82
+ }</style>
@@ -0,0 +1,9 @@
1
+ type Props = {
2
+ positionFixedCenter?: boolean;
3
+ positionAbsoluteCenter?: boolean;
4
+ blocking?: boolean;
5
+ timeout?: number;
6
+ };
7
+ declare const Cmp: import("svelte").Component<Props, {}, "">;
8
+ type Cmp = ReturnType<typeof Cmp>;
9
+ export default Cmp;
@@ -0,0 +1 @@
1
+ export { default as Loading } from './cmp.loading.svelte';
@@ -0,0 +1 @@
1
+ export { default as Loading } from './cmp.loading.svelte';
@@ -0,0 +1,25 @@
1
+ <script lang="ts">let { ratio, children } = $props();
2
+ export {};
3
+ </script>
4
+
5
+ <div class="proportional-container" style:--proportional-container--ratio={ratio}>
6
+ <div class="proportional-container__placer">
7
+ {@render children?.()}
8
+ </div>
9
+ </div>
10
+
11
+ <style>.proportional-container {
12
+ --_proportional-container--ratio: var(--proportional-container--ratio, 1);
13
+ --_proportional-container--height: var(--proportional-container--height, auto);
14
+ --_proportional-container--width: var(--proportional-container--width, 100%);
15
+ width: var(--_proportional-container--width);
16
+ max-width: 100%;
17
+ height: var(--_proportional-container--height);
18
+ max-height: 100%;
19
+ aspect-ratio: var(--_proportional-container--ratio);
20
+ position: relative;
21
+ }
22
+ .proportional-container__placer {
23
+ position: absolute;
24
+ inset: 0;
25
+ }</style>
@@ -0,0 +1,8 @@
1
+ import type { Snippet } from 'svelte';
2
+ type Props = {
3
+ ratio?: number | undefined;
4
+ children?: Snippet;
5
+ };
6
+ declare const Cmp: import("svelte").Component<Props, {}, "">;
7
+ type Cmp = ReturnType<typeof Cmp>;
8
+ export default Cmp;
@@ -0,0 +1 @@
1
+ export { default as ProportionalContainer } from './cmp.proportional-container.svelte';
@@ -0,0 +1 @@
1
+ export { default as ProportionalContainer } from './cmp.proportional-container.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamscloud/kit",
3
- "version": "0.0.1-1770823200886",
3
+ "version": "0.0.1-1770839905472",
4
4
  "author": "StreamsCloud",
5
5
  "repository": {
6
6
  "type": "git",
@@ -88,6 +88,14 @@
88
88
  "types": "./dist/ui/image/index.d.ts",
89
89
  "svelte": "./dist/ui/image/index.js"
90
90
  },
91
+ "./loading": {
92
+ "types": "./dist/ui/loading/index.d.ts",
93
+ "svelte": "./dist/ui/loading/index.js"
94
+ },
95
+ "./proportional-container": {
96
+ "types": "./dist/ui/proportional-container/index.d.ts",
97
+ "svelte": "./dist/ui/proportional-container/index.js"
98
+ },
91
99
  "./core/media": {
92
100
  "types": "./dist/core/media/index.d.ts",
93
101
  "svelte": "./dist/core/media/index.js"