weasel-icons 0.4.0 → 0.5.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.
Files changed (42) hide show
  1. package/README.md +6 -1
  2. package/THIRD_PARTY_NOTICES.md +2 -0
  3. package/dist/icons/battery/battery-icon.d.ts +5 -0
  4. package/dist/icons/battery/battery-icon.js +9 -0
  5. package/dist/icons/battery/battery-rig.d.ts +150 -0
  6. package/dist/icons/battery/battery-rig.js +106 -0
  7. package/dist/icons/bug/bug-icon.d.ts +5 -0
  8. package/dist/icons/bug/bug-icon.js +9 -0
  9. package/dist/icons/bug/bug-rig.d.ts +338 -0
  10. package/dist/icons/bug/bug-rig.js +110 -0
  11. package/dist/icons/compass/compass-icon.d.ts +5 -0
  12. package/dist/icons/compass/compass-icon.js +9 -0
  13. package/dist/icons/compass/compass-rig.d.ts +91 -0
  14. package/dist/icons/compass/compass-rig.js +69 -0
  15. package/dist/icons/hourglass/hourglass-icon.d.ts +5 -0
  16. package/dist/icons/hourglass/hourglass-icon.js +9 -0
  17. package/dist/icons/hourglass/hourglass-rig.d.ts +136 -0
  18. package/dist/icons/hourglass/hourglass-rig.js +89 -0
  19. package/dist/icons/network/network-icon.d.ts +5 -0
  20. package/dist/icons/network/network-icon.js +9 -0
  21. package/dist/icons/network/network-rig.d.ts +200 -0
  22. package/dist/icons/network/network-rig.js +133 -0
  23. package/dist/icons/signal/signal-icon.d.ts +5 -0
  24. package/dist/icons/signal/signal-icon.js +9 -0
  25. package/dist/icons/signal/signal-rig.d.ts +185 -0
  26. package/dist/icons/signal/signal-rig.js +66 -0
  27. package/dist/icons/toggle/toggle-icon.d.ts +5 -0
  28. package/dist/icons/toggle/toggle-icon.js +9 -0
  29. package/dist/icons/toggle/toggle-rig.d.ts +86 -0
  30. package/dist/icons/toggle/toggle-rig.js +55 -0
  31. package/dist/icons/trash/trash-icon.d.ts +5 -0
  32. package/dist/icons/trash/trash-icon.js +9 -0
  33. package/dist/icons/trash/trash-rig.d.ts +98 -0
  34. package/dist/icons/trash/trash-rig.js +67 -0
  35. package/dist/icons/zap/zap-icon.d.ts +6 -0
  36. package/dist/icons/zap/zap-icon.js +36 -0
  37. package/dist/icons/zap/zap-rig.d.ts +15 -0
  38. package/dist/icons/zap/zap-rig.js +60 -0
  39. package/dist/index.d.ts +9 -0
  40. package/dist/index.js +9 -0
  41. package/dist/shared/icon-colors.d.ts +9 -0
  42. package/package.json +46 -1
@@ -0,0 +1,86 @@
1
+ export declare const toggleStates: readonly ["off", "switching", "on"];
2
+ export type ToggleState = (typeof toggleStates)[number];
3
+ export declare const toggleArt: {
4
+ readonly name: "toggle";
5
+ readonly parts: readonly [{
6
+ readonly name: "track";
7
+ readonly paths: readonly ["M9 5H15A7 7 0 0 1 15 19H9A7 7 0 0 1 9 5Z"];
8
+ readonly poses: readonly [{}, {}, {}];
9
+ readonly pivot: readonly [12, 12];
10
+ readonly gestures: readonly [null, null, {
11
+ readonly duration: 0.6;
12
+ readonly repeatAfter: 2;
13
+ readonly loop: false;
14
+ readonly frames: readonly [{
15
+ readonly at: 0;
16
+ }, {
17
+ readonly at: 0.4;
18
+ readonly scaleX: 0.04;
19
+ readonly scaleY: 0.04;
20
+ }, {
21
+ readonly at: 1;
22
+ }];
23
+ }];
24
+ }, {
25
+ readonly name: "knob";
26
+ readonly paths: readonly ["M6 12a3 3 0 1 0 6 0a3 3 0 1 0-6 0"];
27
+ readonly poses: readonly [{}, {
28
+ readonly x: 3;
29
+ readonly scaleX: 0.9;
30
+ readonly scaleY: 0.9;
31
+ }, {
32
+ readonly x: 6;
33
+ readonly scaleX: 1.08;
34
+ readonly scaleY: 1.08;
35
+ }];
36
+ readonly pivot: readonly [9, 12];
37
+ readonly gestures: readonly [{
38
+ readonly duration: 0.6;
39
+ readonly repeatAfter: 2;
40
+ readonly loop: false;
41
+ readonly frames: readonly [{
42
+ readonly at: 0;
43
+ }, {
44
+ readonly at: 0.4;
45
+ readonly x: -0.8;
46
+ readonly scaleX: 0.18;
47
+ readonly scaleY: -0.14;
48
+ }, {
49
+ readonly at: 1;
50
+ }];
51
+ }, {
52
+ readonly duration: 1.2;
53
+ readonly repeatAfter: 2;
54
+ readonly loop: true;
55
+ readonly frames: readonly [{
56
+ readonly at: 0;
57
+ }, {
58
+ readonly at: 0.25;
59
+ readonly x: -1.2;
60
+ readonly scaleX: 0.16;
61
+ readonly scaleY: -0.12;
62
+ }, {
63
+ readonly at: 0.6;
64
+ readonly x: 1.2;
65
+ readonly scaleX: 0.16;
66
+ readonly scaleY: -0.12;
67
+ }, {
68
+ readonly at: 1;
69
+ }];
70
+ }, {
71
+ readonly duration: 0.65;
72
+ readonly repeatAfter: 2;
73
+ readonly loop: false;
74
+ readonly frames: readonly [{
75
+ readonly at: 0;
76
+ }, {
77
+ readonly at: 0.35;
78
+ readonly x: 0.9;
79
+ readonly scaleX: 0.2;
80
+ readonly scaleY: -0.14;
81
+ }, {
82
+ readonly at: 1;
83
+ }];
84
+ }];
85
+ }];
86
+ };
@@ -0,0 +1,55 @@
1
+ export const toggleStates = ['off', 'switching', 'on'];
2
+ // Lucide-derived outline (toggle-left, toggle-right); attribution and pinned source: THIRD_PARTY_NOTICES.md.
3
+ // The knob travels the track and squashes along its direction of travel; switching parks it mid-track with a pending shimmy, on lands with an overshoot and a settled larger knob.
4
+ export const toggleArt = {
5
+ name: 'toggle',
6
+ parts: [
7
+ {
8
+ name: 'track',
9
+ paths: ['M9 5H15A7 7 0 0 1 15 19H9A7 7 0 0 1 9 5Z'],
10
+ poses: [{}, {}, {}],
11
+ pivot: [12, 12],
12
+ gestures: [
13
+ null,
14
+ null,
15
+ {
16
+ duration: 0.6,
17
+ repeatAfter: 2,
18
+ loop: false,
19
+ frames: [{ at: 0 }, { at: 0.4, scaleX: 0.04, scaleY: 0.04 }, { at: 1 }],
20
+ },
21
+ ],
22
+ },
23
+ {
24
+ name: 'knob',
25
+ paths: ['M6 12a3 3 0 1 0 6 0a3 3 0 1 0-6 0'],
26
+ poses: [{}, { x: 3, scaleX: 0.9, scaleY: 0.9 }, { x: 6, scaleX: 1.08, scaleY: 1.08 }],
27
+ pivot: [9, 12],
28
+ gestures: [
29
+ {
30
+ duration: 0.6,
31
+ repeatAfter: 2,
32
+ loop: false,
33
+ frames: [{ at: 0 }, { at: 0.4, x: -0.8, scaleX: 0.18, scaleY: -0.14 }, { at: 1 }],
34
+ },
35
+ {
36
+ duration: 1.2,
37
+ repeatAfter: 2,
38
+ loop: true,
39
+ frames: [
40
+ { at: 0 },
41
+ { at: 0.25, x: -1.2, scaleX: 0.16, scaleY: -0.12 },
42
+ { at: 0.6, x: 1.2, scaleX: 0.16, scaleY: -0.12 },
43
+ { at: 1 },
44
+ ],
45
+ },
46
+ {
47
+ duration: 0.65,
48
+ repeatAfter: 2,
49
+ loop: false,
50
+ frames: [{ at: 0 }, { at: 0.35, x: 0.9, scaleX: 0.2, scaleY: -0.14 }, { at: 1 }],
51
+ },
52
+ ],
53
+ },
54
+ ],
55
+ };
@@ -0,0 +1,5 @@
1
+ import type { StatefulIconProps } from "../../shared/icon-types.js";
2
+ import { type TrashState } from "./trash-rig.js";
3
+ export { trashStates, type TrashState } from "./trash-rig.js";
4
+ export type TrashIconProps = StatefulIconProps<TrashState>;
5
+ export declare const TrashIcon: import("react").NamedExoticComponent<TrashIconProps>;
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { memo } from 'react';
4
+ import { ArticulatedIcon } from "../../shared/articulated-icon.js";
5
+ import { trashArt, trashStates } from "./trash-rig.js";
6
+ export { trashStates } from "./trash-rig.js";
7
+ export const TrashIcon = memo(function TrashIcon(props) {
8
+ return _jsx(ArticulatedIcon, { art: trashArt, states: trashStates, ...props });
9
+ });
@@ -0,0 +1,98 @@
1
+ export declare const trashStates: readonly ["idle", "emptying", "emptied"];
2
+ export type TrashState = (typeof trashStates)[number];
3
+ export declare const trashArt: {
4
+ readonly name: "trash";
5
+ readonly parts: readonly [{
6
+ readonly name: "can";
7
+ readonly paths: readonly ["M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"];
8
+ readonly poses: readonly [{}, {}, {}];
9
+ readonly pivot: readonly [12, 22];
10
+ readonly gestures: readonly [null, null, {
11
+ readonly duration: 0.6;
12
+ readonly repeatAfter: 2;
13
+ readonly loop: false;
14
+ readonly frames: readonly [{
15
+ readonly at: 0;
16
+ }, {
17
+ readonly at: 0.35;
18
+ readonly scaleY: -0.08;
19
+ readonly scaleX: 0.05;
20
+ }, {
21
+ readonly at: 1;
22
+ }];
23
+ }];
24
+ }, {
25
+ readonly name: "contents";
26
+ readonly detail: true;
27
+ readonly paths: readonly ["M10 11v6", "M14 11v6"];
28
+ readonly poses: readonly [{}, {
29
+ readonly y: 0.6;
30
+ }, {
31
+ readonly opacity: 0;
32
+ readonly y: 4;
33
+ readonly scaleY: 0.2;
34
+ }];
35
+ readonly pivot: readonly [12, 17];
36
+ readonly gestures: readonly [null, {
37
+ readonly duration: 1.1;
38
+ readonly repeatAfter: 2.2;
39
+ readonly loop: true;
40
+ readonly frames: readonly [{
41
+ readonly at: 0;
42
+ }, {
43
+ readonly at: 0.2;
44
+ readonly y: -1.2;
45
+ }, {
46
+ readonly at: 0.6;
47
+ readonly y: 3;
48
+ readonly scaleY: -0.8;
49
+ readonly opacity: -1;
50
+ }, {
51
+ readonly at: 0.75;
52
+ readonly y: -0.6;
53
+ readonly scaleY: -0.8;
54
+ readonly opacity: -1;
55
+ }, {
56
+ readonly at: 1;
57
+ }];
58
+ }];
59
+ }, {
60
+ readonly name: "lid";
61
+ readonly paths: readonly ["M3 6h18", "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"];
62
+ readonly poses: readonly [{}, {
63
+ readonly angle: -9;
64
+ }, {}];
65
+ readonly pivot: readonly [3, 6];
66
+ readonly gestures: readonly [null, {
67
+ readonly duration: 1.1;
68
+ readonly repeatAfter: 2.2;
69
+ readonly loop: true;
70
+ readonly frames: readonly [{
71
+ readonly at: 0;
72
+ }, {
73
+ readonly at: 0.2;
74
+ readonly angle: -4;
75
+ }, {
76
+ readonly at: 0.6;
77
+ readonly angle: 3;
78
+ }, {
79
+ readonly at: 1;
80
+ }];
81
+ }, {
82
+ readonly duration: 0.6;
83
+ readonly repeatAfter: 2;
84
+ readonly loop: false;
85
+ readonly frames: readonly [{
86
+ readonly at: 0;
87
+ }, {
88
+ readonly at: 0.35;
89
+ readonly y: -0.6;
90
+ }, {
91
+ readonly at: 0.7;
92
+ readonly y: 0.25;
93
+ }, {
94
+ readonly at: 1;
95
+ }];
96
+ }];
97
+ }];
98
+ };
@@ -0,0 +1,67 @@
1
+ export const trashStates = ['idle', 'emptying', 'emptied'];
2
+ // Lucide-derived outline; attribution and pinned source: THIRD_PARTY_NOTICES.md.
3
+ // The lid hinges open at its left end while the contents drop out of the can; emptied closes the lid over an empty, settled can.
4
+ export const trashArt = {
5
+ name: 'trash',
6
+ parts: [
7
+ {
8
+ name: 'can',
9
+ paths: ['M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6'],
10
+ poses: [{}, {}, {}],
11
+ pivot: [12, 22],
12
+ gestures: [
13
+ null,
14
+ null,
15
+ {
16
+ duration: 0.6,
17
+ repeatAfter: 2,
18
+ loop: false,
19
+ frames: [{ at: 0 }, { at: 0.35, scaleY: -0.08, scaleX: 0.05 }, { at: 1 }],
20
+ },
21
+ ],
22
+ },
23
+ {
24
+ name: 'contents',
25
+ detail: true,
26
+ paths: ['M10 11v6', 'M14 11v6'],
27
+ poses: [{}, { y: 0.6 }, { opacity: 0, y: 4, scaleY: 0.2 }],
28
+ pivot: [12, 17],
29
+ gestures: [
30
+ null,
31
+ {
32
+ duration: 1.1,
33
+ repeatAfter: 2.2,
34
+ loop: true,
35
+ frames: [
36
+ { at: 0 },
37
+ { at: 0.2, y: -1.2 },
38
+ { at: 0.6, y: 3, scaleY: -0.8, opacity: -1 },
39
+ { at: 0.75, y: -0.6, scaleY: -0.8, opacity: -1 },
40
+ { at: 1 },
41
+ ],
42
+ },
43
+ ],
44
+ },
45
+ {
46
+ name: 'lid',
47
+ paths: ['M3 6h18', 'M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'],
48
+ poses: [{}, { angle: -9 }, {}],
49
+ pivot: [3, 6],
50
+ gestures: [
51
+ null,
52
+ {
53
+ duration: 1.1,
54
+ repeatAfter: 2.2,
55
+ loop: true,
56
+ frames: [{ at: 0 }, { at: 0.2, angle: -4 }, { at: 0.6, angle: 3 }, { at: 1 }],
57
+ },
58
+ {
59
+ duration: 0.6,
60
+ repeatAfter: 2,
61
+ loop: false,
62
+ frames: [{ at: 0 }, { at: 0.35, y: -0.6 }, { at: 0.7, y: 0.25 }, { at: 1 }],
63
+ },
64
+ ],
65
+ },
66
+ ],
67
+ };
@@ -0,0 +1,6 @@
1
+ import type { StatefulIconProps } from "../../shared/icon-types.js";
2
+ import { type ZapState } from "./zap-rig.js";
3
+ export { zapStates, type ZapState } from "./zap-rig.js";
4
+ export type ZapIconProps = StatefulIconProps<ZapState>;
5
+ /** Custom renderer: the energy level is a clipped fill, which the articulated runtime cannot draw. */
6
+ export declare const ZapIcon: import("react").NamedExoticComponent<ZapIconProps>;
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { memo, useCallback, useId, useRef } from 'react';
4
+ import { motion, useTransform } from 'motion/react';
5
+ import { useActionProgress, useBehaviorClock, usePoseWeight } from "../../shared/use-icon-motion.js";
6
+ import { useMotionPreference } from "../../shared/use-motion-preference.js";
7
+ import { sampleZap, zapStates, ZAP_PATH, ZAP_STREAKS, ZAP_STREAK_LENGTH, } from "./zap-rig.js";
8
+ export { zapStates } from "./zap-rig.js";
9
+ const SVG_ORIGIN = { originX: 0, originY: 0, transformBox: 'view-box' };
10
+ /** Custom renderer: the energy level is a clipped fill, which the articulated runtime cannot draw. */
11
+ export const ZapIcon = memo(function ZapIcon({ state = 'idle', size = 24, color = 'currentColor', accentColor = 'currentColor', strokeWidth = 1.65, speed = 1, alive = false, className, }) {
12
+ const reduced = useMotionPreference();
13
+ const element = useRef(null);
14
+ const id = useId().replace(/:/g, '');
15
+ const pace = Number.isFinite(speed) ? Math.min(4, Math.max(0.1, speed)) : 1;
16
+ const idle = usePoseWeight(state === zapStates[0], pace, reduced);
17
+ const boosting = usePoseWeight(state === zapStates[1], pace, reduced);
18
+ const boosted = usePoseWeight(state === zapStates[2], pace, reduced);
19
+ const canFill = useCallback(() => boosting.get() < 0.001, [boosting]);
20
+ const canBurst = useCallback(() => boosted.get() < 0.001, [boosted]);
21
+ const fillEntry = useActionProgress(state === 'boosting', pace, reduced, 1.6, canFill);
22
+ const burstEntry = useActionProgress(state === 'boosted', pace, reduced, 0.9, canBurst);
23
+ // Only the loading state keeps performing; the burst is a one-shot acknowledgement.
24
+ const performs = alive && !reduced && state === 'boosting';
25
+ const life = usePoseWeight(performs, pace, reduced);
26
+ const time = useBehaviorClock(element, performs, pace, life);
27
+ const rig = useTransform(() => sampleZap([idle.get(), boosting.get(), boosted.get()], time.get(), life.get(), fillEntry.get(), burstEntry.get()));
28
+ const bolt = useTransform(rig, (r) => r.bolt);
29
+ const surface = useTransform(rig, (r) => r.surface);
30
+ const fillOpacity = useTransform(rig, (r) => r.fillOpacity);
31
+ const streaks = useTransform(rig, (r) => r.streaks);
32
+ const streakOpacity = useTransform(rig, (r) => r.streakOpacity);
33
+ const streakOffset = useTransform(rig, (r) => r.streakOffset);
34
+ const detailWidth = Math.min(strokeWidth * 0.8, 1.5);
35
+ return (_jsxs("svg", { ref: element, className: className, width: size, height: size, viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: color, strokeWidth: strokeWidth, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", pointerEvents: "none", "data-state": state, style: { display: 'block' }, children: [_jsx("defs", { children: _jsx("clipPath", { id: `${id}-bolt`, children: _jsx("path", { d: ZAP_PATH }) }) }), _jsxs("g", { "data-layer": "zap-body", transform: "translate(12 12) scale(.84) translate(-12 -12)", children: [_jsx(motion.g, { "data-layer": "zap-streaks", "data-part": "streaks", style: SVG_ORIGIN, transform: streaks, opacity: streakOpacity, strokeWidth: detailWidth, strokeDasharray: ZAP_STREAK_LENGTH, strokeDashoffset: streakOffset, children: ZAP_STREAKS.map((d) => (_jsx("path", { d: d }, d))) }), _jsxs(motion.g, { "data-layer": "zap-bolt", "data-part": "bolt", style: SVG_ORIGIN, transform: bolt, children: [_jsx("g", { clipPath: `url(#${id}-bolt)`, children: _jsx(motion.rect, { "data-part": "energy", x: 0, y: surface, width: 24, height: 24, fill: accentColor, fillOpacity: fillOpacity, stroke: "none" }) }), _jsx("path", { d: ZAP_PATH })] })] })] }));
36
+ });
@@ -0,0 +1,15 @@
1
+ export declare const zapStates: readonly ["idle", "boosting", "boosted"];
2
+ export type ZapState = (typeof zapStates)[number];
3
+ export type ZapWeights = readonly [number, number, number];
4
+ export declare const ZAP_PATH = "M15.914 4a1.5 1.5 0 0 0-2.474-1.561l-9 9A1.5 1.5 0 0 0 5.5 14h4.002a.5.5 0 0 1 .471.666L8.086 20a1.5 1.5 0 0 0 2.475 1.56l9-9A1.5 1.5 0 0 0 18.5 10h-3.997a.5.5 0 0 1-.472-.667z";
5
+ /** Streaks trail off the back of the bolt; each is drawn from its bolt end outward. */
6
+ export declare const ZAP_STREAKS: readonly ["M7.5 7.5H3", "M6 11.6H1.5", "M7.5 15.7H3"];
7
+ export declare const ZAP_STREAK_LENGTH = 4.5;
8
+ export declare function sampleZap(weights: ZapWeights, time?: number, alive?: number, boostingEntry?: number, boostedEntry?: number): {
9
+ surface: number;
10
+ fillOpacity: number;
11
+ bolt: string;
12
+ streakOpacity: number;
13
+ streakOffset: number;
14
+ streaks: string;
15
+ };
@@ -0,0 +1,60 @@
1
+ import { behaviorBeat } from "../../shared/behavior-curves.js";
2
+ export const zapStates = ['idle', 'boosting', 'boosted'];
3
+ // Lucide-derived outline; attribution and pinned source: THIRD_PARTY_NOTICES.md.
4
+ // Boosting fills the bolt from the bottom like a tank of energy (level rises, surface sloshes, alive
5
+ // refills in a loop); boosted holds a full bolt and fires one speed burst: wind-up, dash forward,
6
+ // three streak lines whipping off its back.
7
+ export const ZAP_PATH = 'M15.914 4a1.5 1.5 0 0 0-2.474-1.561l-9 9A1.5 1.5 0 0 0 5.5 14h4.002a.5.5 0 0 1 .471.666L8.086 20a1.5 1.5 0 0 0 2.475 1.56l9-9A1.5 1.5 0 0 0 18.5 10h-3.997a.5.5 0 0 1-.472-.667z';
8
+ /** Streaks trail off the back of the bolt; each is drawn from its bolt end outward. */
9
+ export const ZAP_STREAKS = ['M7.5 7.5H3', 'M6 11.6H1.5', 'M7.5 15.7H3'];
10
+ export const ZAP_STREAK_LENGTH = 4.5;
11
+ const BOLT_TOP = 2.2, BOLT_BOTTOM = 21.8;
12
+ const unit = (v) => Math.max(0, Math.min(1, Number.isFinite(v) ? v : 0));
13
+ const smooth = (value) => {
14
+ const t = unit(value);
15
+ return t * t * t * (t * (t * 6 - 15) + 10);
16
+ };
17
+ const FILL_LOOP = 2.6;
18
+ const n = (v) => Number(v.toFixed(4));
19
+ export function sampleZap(weights, time = 0, alive = 0, boostingEntry = 1, boostedEntry = 1) {
20
+ const positive = weights.map(unit);
21
+ const sum = positive.reduce((a, b) => a + b, 0) || 1;
22
+ const [idle, boosting, boosted] = positive.map((w) => w / sum);
23
+ const life = unit(alive);
24
+ const clock = Math.max(0, Number.isFinite(time) ? time : 0);
25
+ // Entry: the tank fills to two thirds with a small slosh past the mark.
26
+ const e1 = unit(boostingEntry);
27
+ const entryLevel = 0.68 * smooth(e1 / 0.8) + 0.08 * Math.sin(Math.PI * unit((e1 - 0.55) / 0.45));
28
+ // Alive: a loader cycle, fill to the brim, hold, drain quickly, refill.
29
+ const local = clock % FILL_LOOP;
30
+ const loopLevel = local < 1.6
31
+ ? 0.15 + 0.85 * smooth(local / 1.6)
32
+ : local < 2.0
33
+ ? 1
34
+ : 0.15 + 0.85 * (1 - smooth((local - 2.0) / 0.45));
35
+ const slosh = life * boosting * 0.035 * Math.sin(clock * 9);
36
+ const level = unit(boosting * ((1 - life) * entryLevel + life * loopLevel) + boosted + slosh);
37
+ const surface = BOLT_BOTTOM - level * (BOLT_BOTTOM - BOLT_TOP);
38
+ // Speed burst: crouch back, dash forward, settle larger.
39
+ const e2 = unit(boostedEntry);
40
+ const crouch = behaviorBeat(e2, 0, 0.14, 0.02, 0.14);
41
+ const dash = behaviorBeat(e2, 0.22, 0.12, 0.06, 0.42);
42
+ const bx = boosted * (-1.3 * crouch + 1.6 * dash);
43
+ const by = boosted * (0.4 * crouch - 0.3 * dash);
44
+ const tilt = boosted * (6 * crouch - 7 * dash) + boosting * (-4 + slosh * 40);
45
+ const scale = 1 + boosted * (0.08 - 0.08 * crouch + 0.1 * dash) + boosting * 0.03 * smooth(e1);
46
+ // Streaks whip off the back during the dash, then fade.
47
+ const streakDraw = unit((e2 - 0.3) / 0.22);
48
+ const streakFade = 1 - smooth((e2 - 0.62) / 0.3);
49
+ const streakOpacity = boosted * (e2 < 1 ? streakDraw * streakFade : 0);
50
+ const streakOffset = ZAP_STREAK_LENGTH * (1 - streakDraw);
51
+ const streakX = -1.6 * smooth((e2 - 0.45) / 0.45);
52
+ return {
53
+ surface: n(surface),
54
+ fillOpacity: n(Math.min(1, level * 4) * (1 - idle)),
55
+ bolt: `translate(${n(bx)}px, ${n(by)}px) translate(12px, 12px) rotate(${n(tilt)}deg) scale(${n(scale)}, ${n(scale)}) translate(-12px, -12px)`,
56
+ streakOpacity: n(streakOpacity),
57
+ streakOffset: n(streakOffset),
58
+ streaks: `translate(${n(streakX)}px, 0px)`,
59
+ };
60
+ }
package/dist/index.d.ts CHANGED
@@ -156,3 +156,12 @@ export { ReceiptIcon, receiptStates, type ReceiptState, type ReceiptIconProps, }
156
156
  export { TagIcon, tagStates, type TagState, type TagIconProps } from "./icons/tag/tag-icon.js";
157
157
  export { GiftIcon, giftStates, type GiftState, type GiftIconProps } from "./icons/gift/gift-icon.js";
158
158
  export { TicketIcon, ticketStates, type TicketState, type TicketIconProps, } from "./icons/ticket/ticket-icon.js";
159
+ export { NetworkIcon, networkStates, type NetworkState, type NetworkIconProps, } from "./icons/network/network-icon.js";
160
+ export { SignalIcon, signalStates, type SignalState, type SignalIconProps, } from "./icons/signal/signal-icon.js";
161
+ export { TrashIcon, trashStates, type TrashState, type TrashIconProps, } from "./icons/trash/trash-icon.js";
162
+ export { BatteryIcon, batteryStates, type BatteryState, type BatteryIconProps, } from "./icons/battery/battery-icon.js";
163
+ export { ToggleIcon, toggleStates, type ToggleState, type ToggleIconProps, } from "./icons/toggle/toggle-icon.js";
164
+ export { HourglassIcon, hourglassStates, type HourglassState, type HourglassIconProps, } from "./icons/hourglass/hourglass-icon.js";
165
+ export { ZapIcon, zapStates, type ZapState, type ZapIconProps } from "./icons/zap/zap-icon.js";
166
+ export { CompassIcon, compassStates, type CompassState, type CompassIconProps, } from "./icons/compass/compass-icon.js";
167
+ export { BugIcon, bugStates, type BugState, type BugIconProps } from "./icons/bug/bug-icon.js";
package/dist/index.js CHANGED
@@ -155,3 +155,12 @@ export { ReceiptIcon, receiptStates, } from "./icons/receipt/receipt-icon.js";
155
155
  export { TagIcon, tagStates } from "./icons/tag/tag-icon.js";
156
156
  export { GiftIcon, giftStates } from "./icons/gift/gift-icon.js";
157
157
  export { TicketIcon, ticketStates, } from "./icons/ticket/ticket-icon.js";
158
+ export { NetworkIcon, networkStates, } from "./icons/network/network-icon.js";
159
+ export { SignalIcon, signalStates, } from "./icons/signal/signal-icon.js";
160
+ export { TrashIcon, trashStates, } from "./icons/trash/trash-icon.js";
161
+ export { BatteryIcon, batteryStates, } from "./icons/battery/battery-icon.js";
162
+ export { ToggleIcon, toggleStates, } from "./icons/toggle/toggle-icon.js";
163
+ export { HourglassIcon, hourglassStates, } from "./icons/hourglass/hourglass-icon.js";
164
+ export { ZapIcon, zapStates } from "./icons/zap/zap-icon.js";
165
+ export { CompassIcon, compassStates, } from "./icons/compass/compass-icon.js";
166
+ export { BugIcon, bugStates } from "./icons/bug/bug-icon.js";
@@ -78,6 +78,15 @@ export interface IconColors {
78
78
  tag: never;
79
79
  gift: never;
80
80
  ticket: never;
81
+ network: never;
82
+ signal: never;
83
+ trash: never;
84
+ battery: never;
85
+ toggle: never;
86
+ hourglass: never;
87
+ zap: never;
88
+ compass: never;
89
+ bug: never;
81
90
  bookmark: never;
82
91
  'book-open': never;
83
92
  image: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "weasel-icons",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Stateful animated React SVG icons. Icons that overreact beautifully.",
5
5
  "license": "MIT",
6
6
  "author": "Vinod Murugan",
@@ -794,6 +794,51 @@
794
794
  "types": "./dist/icons/ticket/ticket-icon.d.ts",
795
795
  "import": "./dist/icons/ticket/ticket-icon.js",
796
796
  "default": "./dist/icons/ticket/ticket-icon.js"
797
+ },
798
+ "./network": {
799
+ "types": "./dist/icons/network/network-icon.d.ts",
800
+ "import": "./dist/icons/network/network-icon.js",
801
+ "default": "./dist/icons/network/network-icon.js"
802
+ },
803
+ "./signal": {
804
+ "types": "./dist/icons/signal/signal-icon.d.ts",
805
+ "import": "./dist/icons/signal/signal-icon.js",
806
+ "default": "./dist/icons/signal/signal-icon.js"
807
+ },
808
+ "./trash": {
809
+ "types": "./dist/icons/trash/trash-icon.d.ts",
810
+ "import": "./dist/icons/trash/trash-icon.js",
811
+ "default": "./dist/icons/trash/trash-icon.js"
812
+ },
813
+ "./battery": {
814
+ "types": "./dist/icons/battery/battery-icon.d.ts",
815
+ "import": "./dist/icons/battery/battery-icon.js",
816
+ "default": "./dist/icons/battery/battery-icon.js"
817
+ },
818
+ "./toggle": {
819
+ "types": "./dist/icons/toggle/toggle-icon.d.ts",
820
+ "import": "./dist/icons/toggle/toggle-icon.js",
821
+ "default": "./dist/icons/toggle/toggle-icon.js"
822
+ },
823
+ "./hourglass": {
824
+ "types": "./dist/icons/hourglass/hourglass-icon.d.ts",
825
+ "import": "./dist/icons/hourglass/hourglass-icon.js",
826
+ "default": "./dist/icons/hourglass/hourglass-icon.js"
827
+ },
828
+ "./zap": {
829
+ "types": "./dist/icons/zap/zap-icon.d.ts",
830
+ "import": "./dist/icons/zap/zap-icon.js",
831
+ "default": "./dist/icons/zap/zap-icon.js"
832
+ },
833
+ "./compass": {
834
+ "types": "./dist/icons/compass/compass-icon.d.ts",
835
+ "import": "./dist/icons/compass/compass-icon.js",
836
+ "default": "./dist/icons/compass/compass-icon.js"
837
+ },
838
+ "./bug": {
839
+ "types": "./dist/icons/bug/bug-icon.d.ts",
840
+ "import": "./dist/icons/bug/bug-icon.js",
841
+ "default": "./dist/icons/bug/bug-icon.js"
797
842
  }
798
843
  },
799
844
  "files": [