@lavalogic/scoria 0.40.10 → 0.40.11
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.
|
@@ -116,6 +116,10 @@
|
|
|
116
116
|
// descenders clipping the baseline on landing.
|
|
117
117
|
const word = $derived((name.trim() || 'FloWMS').toUpperCase());
|
|
118
118
|
|
|
119
|
+
// Caption text with any trailing dots/ellipsis stripped, since the pill
|
|
120
|
+
// appends its own animated "..." — avoids "moment……" style doubling.
|
|
121
|
+
const captionText = $derived(caption.replace(/[\s.…]+$/, ''));
|
|
122
|
+
|
|
119
123
|
// Per-letter render data: each letter is a stack of DEPTH layers (painted
|
|
120
124
|
// back-to-front) topped by the lit face, so it has genuine 3D thickness.
|
|
121
125
|
const geom = $derived.by(() => {
|
|
@@ -764,7 +768,7 @@
|
|
|
764
768
|
whose opacity cycles, so the pill width stays fixed as they animate. -->
|
|
765
769
|
{#if showText}
|
|
766
770
|
<div class="caption">
|
|
767
|
-
<span class="caption-label">{
|
|
771
|
+
<span class="caption-label">{captionText}</span><span
|
|
768
772
|
class="caption-dots"
|
|
769
773
|
aria-hidden="true"><span>.</span><span>.</span><span>.</span></span
|
|
770
774
|
>
|
|
@@ -786,17 +790,20 @@
|
|
|
786
790
|
--kraft-inner: #8a6b43;
|
|
787
791
|
--seam: rgba(0, 0, 0, 0.14);
|
|
788
792
|
--ink: #3c4045;
|
|
789
|
-
/*
|
|
790
|
-
--fill-1: #
|
|
791
|
-
--fill-2: #
|
|
792
|
-
--fill-3: #
|
|
793
|
-
--fill-4: #
|
|
794
|
-
--fill-5: #
|
|
793
|
+
/* subtle white confetti — shades of white/off-white */
|
|
794
|
+
--fill-1: #ffffff;
|
|
795
|
+
--fill-2: #eef1f4;
|
|
796
|
+
--fill-3: #f8fafb;
|
|
797
|
+
--fill-4: #e2e7ec;
|
|
798
|
+
--fill-5: #fbfcfd;
|
|
795
799
|
--hw: calc(var(--w) / 2);
|
|
796
800
|
--hd: calc(var(--d) / 2);
|
|
797
801
|
--hh: calc(var(--h) / 2);
|
|
798
802
|
--y-outer: calc(var(--hh) * -1 + 0.5px);
|
|
799
803
|
--y-inner: calc(var(--hh) * -1 + 1.5px);
|
|
804
|
+
/* Push the box (and its letters) down within the footprint so the caption
|
|
805
|
+
pill has clear headroom above the opened flaps. */
|
|
806
|
+
--stage-shift: 40px;
|
|
800
807
|
display: grid;
|
|
801
808
|
place-items: center;
|
|
802
809
|
position: relative;
|
|
@@ -806,6 +813,7 @@
|
|
|
806
813
|
.flowms-loader .scene {
|
|
807
814
|
width: var(--w);
|
|
808
815
|
height: var(--h);
|
|
816
|
+
translate: 0 var(--stage-shift);
|
|
809
817
|
perspective: 820px;
|
|
810
818
|
perspective-origin: 50% 40%;
|
|
811
819
|
transform-style: preserve-3d;
|
|
@@ -1021,7 +1029,7 @@
|
|
|
1021
1029
|
margin-top: -48px;
|
|
1022
1030
|
border-radius: 50%;
|
|
1023
1031
|
opacity: 0;
|
|
1024
|
-
background: radial-gradient(circle, rgba(
|
|
1032
|
+
background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 35%, rgba(255, 255, 255, 0) 70%);
|
|
1025
1033
|
}
|
|
1026
1034
|
.flowms-loader .fill {
|
|
1027
1035
|
position: absolute;
|
|
@@ -1033,6 +1041,8 @@
|
|
|
1033
1041
|
margin-top: -6.5px;
|
|
1034
1042
|
border-radius: 3px;
|
|
1035
1043
|
opacity: 0;
|
|
1044
|
+
/* faint edge so the white pieces stay visible on light backgrounds */
|
|
1045
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
|
|
1036
1046
|
}
|
|
1037
1047
|
.flowms-loader .fill:nth-child(5n+1) {
|
|
1038
1048
|
background: var(--fill-1);
|
|
@@ -1064,7 +1074,7 @@
|
|
|
1064
1074
|
.flowms-loader .letterstage {
|
|
1065
1075
|
position: absolute;
|
|
1066
1076
|
left: 50%;
|
|
1067
|
-
top: 50
|
|
1077
|
+
top: calc(50% + var(--stage-shift)); /* track the shifted box */
|
|
1068
1078
|
width: var(--w);
|
|
1069
1079
|
height: var(--h);
|
|
1070
1080
|
transform: translate(-50%, -50%);
|
|
@@ -1102,7 +1112,7 @@
|
|
|
1102
1112
|
.flowms-loader .caption {
|
|
1103
1113
|
position: absolute;
|
|
1104
1114
|
left: 50%;
|
|
1105
|
-
top:
|
|
1115
|
+
top: 10px; /* sits in the headroom above the opened flaps */
|
|
1106
1116
|
transform: translateX(-50%);
|
|
1107
1117
|
white-space: nowrap;
|
|
1108
1118
|
padding: 7px 16px;
|
|
@@ -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, name }: LoadingModalProps = $props();
|
|
7
|
+
const { showModal, message, name, caption }: LoadingModalProps = $props();
|
|
8
8
|
|
|
9
9
|
let dialog: HTMLDialogElement | undefined = $state();
|
|
10
10
|
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
{/if}
|
|
41
41
|
<LoadingAnimation
|
|
42
42
|
{name}
|
|
43
|
+
{caption}
|
|
43
44
|
showText={!message}
|
|
44
45
|
/>
|
|
45
46
|
</div>
|
|
@@ -19,4 +19,11 @@ export interface LoadingModalProps {
|
|
|
19
19
|
* erupts. When omitted the loader falls back to the product name.
|
|
20
20
|
*/
|
|
21
21
|
name?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Optional caption shown in the pill above the box (an animated `...` is
|
|
24
|
+
* appended automatically). Use this instead of {@link message} to keep the
|
|
25
|
+
* loader's own pill rather than rendering a separate message bar. Ignored
|
|
26
|
+
* when {@link message} is set. Defaults to `'Loading'`.
|
|
27
|
+
*/
|
|
28
|
+
caption?: string | undefined;
|
|
22
29
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import LoadingAnimation from './LoadingAnimation.svelte';
|
|
5
5
|
import type { LoadingOverlayProps } from './LoadingOverlayProps.js';
|
|
6
6
|
|
|
7
|
-
const { message, absolute, borderRadius, name }: LoadingOverlayProps =
|
|
7
|
+
const { message, absolute, borderRadius, name, caption }: LoadingOverlayProps =
|
|
8
8
|
$props();
|
|
9
9
|
</script>
|
|
10
10
|
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
{/if}
|
|
23
23
|
<LoadingAnimation
|
|
24
24
|
{name}
|
|
25
|
+
{caption}
|
|
25
26
|
showText={!message}
|
|
26
27
|
/>
|
|
27
28
|
</div>
|
|
@@ -13,6 +13,13 @@ export interface LoadingOverlayProps {
|
|
|
13
13
|
* erupts. When omitted the loader falls back to the product name.
|
|
14
14
|
*/
|
|
15
15
|
name?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Optional caption shown in the pill above the box (an animated `...` is
|
|
18
|
+
* appended automatically). Use this instead of {@link message} to keep the
|
|
19
|
+
* loader's own pill rather than rendering a separate message bar. Ignored
|
|
20
|
+
* when {@link message} is set. Defaults to `'Loading'`.
|
|
21
|
+
*/
|
|
22
|
+
caption?: string | undefined;
|
|
16
23
|
/**
|
|
17
24
|
* When `true` the overlay uses `position: absolute` and fills its
|
|
18
25
|
* nearest positioned ancestor instead of the viewport. Use this
|