@lavalogic/scoria 0.40.8 → 0.40.10
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/Components/LoadingAnimation.svelte +1136 -87
- package/dist/Components/LoadingAnimation.svelte.d.ts +6 -0
- package/dist/Components/LoadingAnimationProps.d.ts +40 -6
- package/dist/Components/LoadingModal.svelte +5 -2
- package/dist/Components/LoadingModalProps.d.ts +7 -2
- package/dist/Components/LoadingOverlay.svelte +6 -2
- package/dist/Components/LoadingOverlayProps.d.ts +6 -1
- package/package.json +1 -1
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warm, on-brand phrases printed inside the box's rear flap. One is chosen at
|
|
3
|
+
* random when the loader mounts and a fresh one is shown on each loop. Pass
|
|
4
|
+
* the `messages` prop to override this set.
|
|
5
|
+
*/
|
|
6
|
+
export declare const defaultLoaderMessages: string[];
|
|
1
7
|
import type { LoadingAnimationProps } from './LoadingAnimationProps.js';
|
|
2
8
|
declare const LoadingAnimation: import("svelte").Component<LoadingAnimationProps, {}, "">;
|
|
3
9
|
type LoadingAnimation = ReturnType<typeof LoadingAnimation>;
|
|
@@ -1,16 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Props for the {@link LoadingAnimation}
|
|
2
|
+
* Props for the {@link LoadingAnimation} box-eruption indicator.
|
|
3
|
+
*
|
|
4
|
+
* The loader is a 3D kraft box that unfolds, spells out a short word by
|
|
5
|
+
* throwing its letters out onto the floor in front of the box, erupts a burst
|
|
6
|
+
* of brand-blue confetti, then packs the letters away and folds shut — looping
|
|
7
|
+
* for as long as it is mounted.
|
|
3
8
|
*/
|
|
4
9
|
export interface LoadingAnimationProps {
|
|
5
10
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
11
|
+
* The word the box spells out as it erupts — typically the user's first
|
|
12
|
+
* name, passed in by the calling service. Rendered in block capitals so the
|
|
13
|
+
* letters read cleanly as they tumble. When empty or whitespace, falls back
|
|
14
|
+
* to the product name (`FloWMS`).
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the textual caption beneath the box is shown. Defaults to `true`.
|
|
19
|
+
* Set to `false` when the parent already renders its own message (as
|
|
20
|
+
* {@link LoadingModal} and {@link LoadingOverlay} do).
|
|
9
21
|
*/
|
|
10
22
|
showText?: boolean;
|
|
11
23
|
/**
|
|
12
|
-
* Optional accessible label used for the `aria-label` of the
|
|
13
|
-
*
|
|
24
|
+
* Optional accessible label used for the `aria-label` of the status region.
|
|
25
|
+
* Defaults to `'Loading'`.
|
|
14
26
|
*/
|
|
15
27
|
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Caption text shown in the pill above the box when {@link showText} is
|
|
30
|
+
* `true`. An animated `...` is appended automatically (the pill keeps a fixed
|
|
31
|
+
* width as the dots cycle). Defaults to `'Loading'`.
|
|
32
|
+
*/
|
|
33
|
+
caption?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Warm phrases printed inside the box's rear flap. One is chosen at random
|
|
36
|
+
* and a new one is shown on each loop. Defaults to a built-in set
|
|
37
|
+
* ({@link defaultLoaderMessages}).
|
|
38
|
+
*/
|
|
39
|
+
messages?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* Front-face colour of the thrown letters. Defaults to a kraft-card tone.
|
|
42
|
+
* Accepts any `#rgb`/`#rrggbb` or `r,g,b` value.
|
|
43
|
+
*/
|
|
44
|
+
letterFace?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Deepest colour at the back of each letter's extrusion, blended toward the
|
|
47
|
+
* face to shade the corrugation. Defaults to a near-black brown.
|
|
48
|
+
*/
|
|
49
|
+
letterDeep?: string;
|
|
16
50
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import LoadingAnimation from './LoadingAnimation.svelte';
|
|
5
5
|
import type { LoadingModalProps } from './LoadingModalProps.js';
|
|
6
6
|
|
|
7
|
-
const { showModal, message }: LoadingModalProps = $props();
|
|
7
|
+
const { showModal, message, name }: LoadingModalProps = $props();
|
|
8
8
|
|
|
9
9
|
let dialog: HTMLDialogElement | undefined = $state();
|
|
10
10
|
|
|
@@ -38,7 +38,10 @@
|
|
|
38
38
|
{#if message}
|
|
39
39
|
<p>{message}</p>
|
|
40
40
|
{/if}
|
|
41
|
-
<LoadingAnimation
|
|
41
|
+
<LoadingAnimation
|
|
42
|
+
{name}
|
|
43
|
+
showText={!message}
|
|
44
|
+
/>
|
|
42
45
|
</div>
|
|
43
46
|
</dialog>
|
|
44
47
|
|
|
@@ -10,8 +10,13 @@ export interface LoadingModalProps {
|
|
|
10
10
|
*/
|
|
11
11
|
showModal: boolean;
|
|
12
12
|
/**
|
|
13
|
-
* Optional message rendered above the
|
|
14
|
-
*
|
|
13
|
+
* Optional message rendered above the loader. When omitted the
|
|
14
|
+
* loader displays its built-in `Loading…` caption instead.
|
|
15
15
|
*/
|
|
16
16
|
message?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Optional first name forwarded to the loader, which spells it out as it
|
|
19
|
+
* erupts. When omitted the loader falls back to the product name.
|
|
20
|
+
*/
|
|
21
|
+
name?: string | undefined;
|
|
17
22
|
}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
import LoadingAnimation from './LoadingAnimation.svelte';
|
|
5
5
|
import type { LoadingOverlayProps } from './LoadingOverlayProps.js';
|
|
6
6
|
|
|
7
|
-
const { message, absolute, borderRadius }: LoadingOverlayProps =
|
|
7
|
+
const { message, absolute, borderRadius, name }: LoadingOverlayProps =
|
|
8
|
+
$props();
|
|
8
9
|
</script>
|
|
9
10
|
|
|
10
11
|
<div
|
|
@@ -19,7 +20,10 @@
|
|
|
19
20
|
{#if message}
|
|
20
21
|
<p>{message}</p>
|
|
21
22
|
{/if}
|
|
22
|
-
<LoadingAnimation
|
|
23
|
+
<LoadingAnimation
|
|
24
|
+
{name}
|
|
25
|
+
showText={!message}
|
|
26
|
+
/>
|
|
23
27
|
</div>
|
|
24
28
|
|
|
25
29
|
<style>.loading-overlay {
|
|
@@ -5,9 +5,14 @@ import type { CssLength } from '../Types/Internal/Misc.js';
|
|
|
5
5
|
export interface LoadingOverlayProps {
|
|
6
6
|
/**
|
|
7
7
|
* Optional message rendered above the animation. When omitted the
|
|
8
|
-
*
|
|
8
|
+
* loader renders with its built-in `Loading…` caption.
|
|
9
9
|
*/
|
|
10
10
|
message?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Optional first name forwarded to the loader, which spells it out as it
|
|
13
|
+
* erupts. When omitted the loader falls back to the product name.
|
|
14
|
+
*/
|
|
15
|
+
name?: string | undefined;
|
|
11
16
|
/**
|
|
12
17
|
* When `true` the overlay uses `position: absolute` and fills its
|
|
13
18
|
* nearest positioned ancestor instead of the viewport. Use this
|