@mccustomapps/helaui 0.1.6 → 0.1.8
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/README.md +36 -4
- package/dist/index.cjs +21 -20
- package/dist/index.d.cts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +21 -20
- package/dist/rain-background.css +21 -1
- package/package.json +1 -1
- package/src/assets/rain/builtinImages.ts +7 -6
- package/dist/assets/rain/builtinImages.ts +0 -7
package/dist/rain-background.css
CHANGED
|
@@ -11,12 +11,32 @@
|
|
|
11
11
|
top: -20%;
|
|
12
12
|
left: var(--helaui-rain-x, 50%);
|
|
13
13
|
width: var(--helaui-rain-size, 48px);
|
|
14
|
-
height:
|
|
14
|
+
height: var(--helaui-rain-size, 48px);
|
|
15
15
|
opacity: var(--helaui-rain-opacity, 0.85);
|
|
16
16
|
will-change: transform;
|
|
17
17
|
animation: helaui-rain-fall var(--helaui-rain-duration, 10s) linear infinite;
|
|
18
18
|
animation-delay: var(--helaui-rain-delay, 0s);
|
|
19
19
|
transform: rotate(var(--helaui-rain-rotation, 0deg));
|
|
20
|
+
object-fit: contain;
|
|
21
|
+
background-size: contain;
|
|
22
|
+
background-repeat: no-repeat;
|
|
23
|
+
background-position: center;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.helaui-rain-background__drop--fritter {
|
|
27
|
+
background-image: url('./assets/rain/fritter.png');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.helaui-rain-background__drop--swirl {
|
|
31
|
+
background-image: url('./assets/rain/swirl.png');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.helaui-rain-background__drop--kokis {
|
|
35
|
+
background-image: url('./assets/rain/kokis.png');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.helaui-rain-background__drop--leaf {
|
|
39
|
+
background-image: url('./assets/rain/leaf.png');
|
|
20
40
|
}
|
|
21
41
|
|
|
22
42
|
@keyframes helaui-rain-fall {
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import leaf from './leaf.png';
|
|
4
|
-
import swirl from './swirl.png';
|
|
1
|
+
/** Built-in rain sprite ids. Sprites are loaded from `rain-background.css`, not JS. */
|
|
2
|
+
export const BUILTIN_RAIN_IMAGES = ['fritter', 'swirl', 'kokis', 'leaf'] as const;
|
|
5
3
|
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
export type BuiltinRainImage = (typeof BUILTIN_RAIN_IMAGES)[number];
|
|
5
|
+
|
|
6
|
+
export function isBuiltinRainImage(value: string): value is BuiltinRainImage {
|
|
7
|
+
return (BUILTIN_RAIN_IMAGES as readonly string[]).includes(value);
|
|
8
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import fritter from './fritter.png';
|
|
2
|
-
import kokis from './kokis.png';
|
|
3
|
-
import leaf from './leaf.png';
|
|
4
|
-
import swirl from './swirl.png';
|
|
5
|
-
|
|
6
|
-
/** Built-in rain sprite URLs shipped with HelaUI. */
|
|
7
|
-
export const BUILTIN_RAIN_IMAGES = [fritter, swirl, kokis, leaf] as const;
|