weasel-icons 0.7.0 → 0.8.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.
- package/README.md +9 -1
- package/THIRD_PARTY_NOTICES.md +2 -0
- package/dist/icons/badge-percent/badge-percent-icon.d.ts +5 -0
- package/dist/icons/badge-percent/badge-percent-icon.js +9 -0
- package/dist/icons/badge-percent/badge-percent-rig.d.ts +4 -0
- package/dist/icons/badge-percent/badge-percent-rig.js +63 -0
- package/dist/icons/blocks/blocks-icon.d.ts +5 -0
- package/dist/icons/blocks/blocks-icon.js +9 -0
- package/dist/icons/blocks/blocks-rig.d.ts +4 -0
- package/dist/icons/blocks/blocks-rig.js +34 -0
- package/dist/icons/bot/bot-icon.d.ts +5 -0
- package/dist/icons/bot/bot-icon.js +9 -0
- package/dist/icons/bot/bot-rig.d.ts +4 -0
- package/dist/icons/bot/bot-rig.js +79 -0
- package/dist/icons/brick-wall/brick-wall-icon.d.ts +5 -0
- package/dist/icons/brick-wall/brick-wall-icon.js +9 -0
- package/dist/icons/brick-wall/brick-wall-rig.d.ts +4 -0
- package/dist/icons/brick-wall/brick-wall-rig.js +55 -0
- package/dist/icons/dice/dice-icon.d.ts +5 -0
- package/dist/icons/dice/dice-icon.js +9 -0
- package/dist/icons/dice/dice-rig.d.ts +158 -0
- package/dist/icons/dice/dice-rig.js +96 -0
- package/dist/icons/dog/dog-icon.js +1 -4
- package/dist/icons/dog/dog-rig.d.ts +1 -13
- package/dist/icons/dog/dog-rig.js +39 -159
- package/dist/icons/footprints/footprints-icon.d.ts +5 -0
- package/dist/icons/footprints/footprints-icon.js +9 -0
- package/dist/icons/footprints/footprints-rig.d.ts +4 -0
- package/dist/icons/footprints/footprints-rig.js +53 -0
- package/dist/icons/fuel/fuel-icon.d.ts +5 -0
- package/dist/icons/fuel/fuel-icon.js +9 -0
- package/dist/icons/fuel/fuel-rig.d.ts +4 -0
- package/dist/icons/fuel/fuel-rig.js +55 -0
- package/dist/icons/infinity/infinity-icon.d.ts +5 -0
- package/dist/icons/infinity/infinity-icon.js +17 -0
- package/dist/icons/infinity/infinity-rig.d.ts +3 -0
- package/dist/icons/infinity/infinity-rig.js +4 -0
- package/dist/icons/target/target-icon.d.ts +5 -0
- package/dist/icons/target/target-icon.js +9 -0
- package/dist/icons/target/target-rig.d.ts +112 -0
- package/dist/icons/target/target-rig.js +81 -0
- package/dist/icons/webhook/webhook-icon.d.ts +5 -0
- package/dist/icons/webhook/webhook-icon.js +74 -0
- package/dist/icons/webhook/webhook-rig.d.ts +10 -0
- package/dist/icons/webhook/webhook-rig.js +50 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/shared/icon-colors.d.ts +10 -0
- package/package.json +51 -1
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Icons that overreact beautifully. Stateful React SVG icons with smooth transitions and optional continuous behavior.
|
|
4
4
|
|
|
5
|
-
Version `0.
|
|
5
|
+
Version `0.8.0` contains 479 icons. It adds Fuel, Brick Wall, Blocks, Dice, Target, Badge Percent, Webhook, Infinity, Footprints and Bot, with the owner-selected motion versions. Puppy keeps its existing drawing and states with subtler, cleaner gestures.
|
|
6
|
+
|
|
7
|
+
Version `0.7.0` contained 469 icons; `0.6.0` contained 265 icons.
|
|
6
8
|
|
|
7
9
|
## Install
|
|
8
10
|
|
|
@@ -51,6 +53,12 @@ The existing SVG smoothly transitions when `state` changes, including during an
|
|
|
51
53
|
|
|
52
54
|
Exports include: `DogIcon`, `MonkeyIcon`, `HeartIcon`, `ShipIcon`, `RocketIcon`, `SearchIcon`, `BellIcon`, `DownloadIcon`, `ShieldIcon`, `CursorIcon`, `ClapperboardIcon`, `PlugIcon`, `BulbIcon`, `AlertIcon`, `BadgeCheckIcon`, `ReplaceIcon`, `DeleteIcon`, `SwapIcon`, `SparklesIcon`, `SparkleIcon`, `StarIcon`, `WaveIcon`, `RefreshIcon`, `CopyIcon`, `EyeIcon`, `LinkIcon`, `CheckIcon`, and `CloseIcon`. Each icon exports its own state type and list, for example `DogState` and `dogStates`, or `BadgeCheckState` and `badgeCheckStates`. TypeScript autocompletion shows the valid states for each icon.
|
|
53
55
|
|
|
56
|
+
### Added in 0.8.0
|
|
57
|
+
|
|
58
|
+
`FuelIcon`, `BrickWallIcon`, `BlocksIcon`, `DiceIcon`, `TargetIcon`, `BadgePercentIcon`, `WebhookIcon`, `InfinityIcon`, `FootprintsIcon` and `BotIcon` are available from the main export and their individual subpaths, such as `weasel-icons/webhook`. Each exports its own state list and type. Webhook delivery follows its path from the currently visible packet position.
|
|
59
|
+
|
|
60
|
+
Puppy (`DogIcon`) retains `waiting`, `sniffing`, `happy` and `guilty`, its neutral outline, and all existing colour props. Living motion uses a restrained gesture per state; `alive={false}` and reduced motion settle to the existing expressions.
|
|
61
|
+
|
|
54
62
|
### Added in 0.6.0
|
|
55
63
|
|
|
56
64
|
- **Status & confirmation:** `CircleCheckIcon`, `CircleXIcon`, `CircleAlertIcon`, `CirclePlusIcon`, `CircleMinusIcon`, `SquareCheckIcon`, `CheckCheckIcon`, `ListChecksIcon`, `ClipboardCheckIcon`, `CalendarCheckIcon`, `ShieldCheckIcon`, `BanIcon`.
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -24,6 +24,8 @@ The 0.7.0 200-icon expansion additionally adapts these assets at the same pinned
|
|
|
24
24
|
|
|
25
25
|
The M1 motion study additionally adapts `vault`, `scale`, `lighthouse` and `mailbox` at the same pinned revision, and reworks the earlier `umbrella` canopy as two cubic curves so it can morph. The vault's dial hand and shelves, the scale's exact pan-hanging arithmetic, the lighthouse's lengthened rays and lamp, the umbrella's rain, the mailbox's letter, and all choreography are original to Weasel.
|
|
26
26
|
|
|
27
|
+
The ten-icon expansion additionally adapts `fuel`, `brick-wall`, `blocks`, `dice-5` (with the `dice-3` diagonal as its alternate face), `target`, `badge-percent`, `webhook`, `infinity`, `footprints` and `bot` at the same pinned revision. The fuel level bars, the webhook payload dot, the bot's antenna light, the brick-wall course grouping and ghost, and all choreography are original to Weasel.
|
|
28
|
+
|
|
27
29
|
The retained Lucide geometry carries the following [Lucide ISC notice](https://lucide.dev/license):
|
|
28
30
|
Star, Sparkles and Sparkle additionally adapt the current `star` and central `sparkles` contours. Sparkle is the single-contour composition; Sparkles' satellite diamonds and the single-line Wave geometry are original to Weasel. Wave follows the user's visual reference, not Lucide's stacked wave glyph.
|
|
29
31
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StatefulIconProps } from "../../shared/icon-types.js";
|
|
2
|
+
import { type BadgePercentState } from "./badge-percent-rig.js";
|
|
3
|
+
export { badgePercentStates, type BadgePercentState } from "./badge-percent-rig.js";
|
|
4
|
+
export type BadgePercentIconProps = StatefulIconProps<BadgePercentState>;
|
|
5
|
+
export declare const BadgePercentIcon: import("react").NamedExoticComponent<BadgePercentIconProps>;
|
|
@@ -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 { badgePercentArt, badgePercentStates } from "./badge-percent-rig.js";
|
|
6
|
+
export { badgePercentStates } from "./badge-percent-rig.js";
|
|
7
|
+
export const BadgePercentIcon = memo(function BadgePercentIcon(props) {
|
|
8
|
+
return _jsx(ArticulatedIcon, { art: badgePercentArt, states: badgePercentStates, ...props });
|
|
9
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Articulation } from "../../shared/articulation.js";
|
|
2
|
+
export declare const badgePercentStates: readonly ["regular", "applying", "applied"];
|
|
3
|
+
export type BadgePercentState = (typeof badgePercentStates)[number];
|
|
4
|
+
export declare const badgePercentArt: Articulation;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export const badgePercentStates = ['regular', 'applying', 'applied'];
|
|
2
|
+
// Lucide `badge-percent` outline with original motion details. Attribution and pinned source: THIRD_PARTY_NOTICES.md.
|
|
3
|
+
// Promo validation: a quiet percent mark, a slash trace with alternating dot emphasis while pending, then a finite seated stamp on confirmation.
|
|
4
|
+
// Work loops only while alive; the application determines the result.
|
|
5
|
+
const work = (duration, frames, pause = 0) => ({
|
|
6
|
+
duration,
|
|
7
|
+
repeatAfter: duration + pause,
|
|
8
|
+
loop: true,
|
|
9
|
+
frames,
|
|
10
|
+
});
|
|
11
|
+
const event = (frames) => ({
|
|
12
|
+
duration: 0.8,
|
|
13
|
+
repeatAfter: 2,
|
|
14
|
+
loop: false,
|
|
15
|
+
frames,
|
|
16
|
+
});
|
|
17
|
+
const fixed = [{}, {}, {}];
|
|
18
|
+
const p = (name, paths, poses = fixed, options = {}) => ({ name, paths, poses, ...options });
|
|
19
|
+
// Validation travels along the percent slash; approval seats the complete mark like a small stamp.
|
|
20
|
+
const stamp = event([{ at: 0, y: -0.45 }, { at: 0.35, y: 0.12 }, { at: 0.6 }, { at: 1 }]);
|
|
21
|
+
export const badgePercentArt = {
|
|
22
|
+
name: 'badge-percent',
|
|
23
|
+
parts: [
|
|
24
|
+
p('badge', [
|
|
25
|
+
'M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z',
|
|
26
|
+
]),
|
|
27
|
+
p('slash', ['m15 9-6 6'], [{ opacity: 0.3 }, { draw: 0.55, opacity: 0.8 }, {}], {
|
|
28
|
+
accent: true,
|
|
29
|
+
traceLength: Math.sqrt(72),
|
|
30
|
+
pivot: [12, 12],
|
|
31
|
+
gestures: [
|
|
32
|
+
null,
|
|
33
|
+
work(1.3, [
|
|
34
|
+
{ at: 0 },
|
|
35
|
+
{ at: 0.55, draw: 0.45 },
|
|
36
|
+
{ at: 0.7, draw: 0.45 },
|
|
37
|
+
{ at: 0.85, draw: 0.45, opacity: -0.8 },
|
|
38
|
+
{ at: 0.9, draw: -0.55, opacity: -0.8 },
|
|
39
|
+
{ at: 1 },
|
|
40
|
+
], 0.08),
|
|
41
|
+
stamp,
|
|
42
|
+
],
|
|
43
|
+
}),
|
|
44
|
+
p('dot-a', [['M9 9h.01', 'M15 15h.01'][0]], [{ opacity: 0.3 }, { opacity: 0.5 }, {}], {
|
|
45
|
+
accent: true,
|
|
46
|
+
pivot: [12, 12],
|
|
47
|
+
gestures: [
|
|
48
|
+
null,
|
|
49
|
+
work(1.3, [{ at: 0 }, { at: 0.25, opacity: 0.5 }, { at: 0.5 }, { at: 1 }], 0.08),
|
|
50
|
+
stamp,
|
|
51
|
+
],
|
|
52
|
+
}),
|
|
53
|
+
p('dot-b', [['M9 9h.01', 'M15 15h.01'][1]], [{ opacity: 0.3 }, { opacity: 0.5 }, {}], {
|
|
54
|
+
accent: true,
|
|
55
|
+
pivot: [12, 12],
|
|
56
|
+
gestures: [
|
|
57
|
+
null,
|
|
58
|
+
work(1.3, [{ at: 0 }, { at: 0.45 }, { at: 0.7, opacity: 0.5 }, { at: 1 }], 0.08),
|
|
59
|
+
stamp,
|
|
60
|
+
],
|
|
61
|
+
}),
|
|
62
|
+
],
|
|
63
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StatefulIconProps } from "../../shared/icon-types.js";
|
|
2
|
+
import { type BlocksState } from "./blocks-rig.js";
|
|
3
|
+
export { blocksStates, type BlocksState } from "./blocks-rig.js";
|
|
4
|
+
export type BlocksIconProps = StatefulIconProps<BlocksState>;
|
|
5
|
+
export declare const BlocksIcon: import("react").NamedExoticComponent<BlocksIconProps>;
|
|
@@ -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 { blocksArt, blocksStates } from "./blocks-rig.js";
|
|
6
|
+
export { blocksStates } from "./blocks-rig.js";
|
|
7
|
+
export const BlocksIcon = memo(function BlocksIcon(props) {
|
|
8
|
+
return _jsx(ArticulatedIcon, { art: blocksArt, states: blocksStates, ...props });
|
|
9
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const blocksStates = ['loose', 'attaching', 'attached'];
|
|
2
|
+
// Lucide `blocks` outline with original motion details. Attribution and pinned source: THIRD_PARTY_NOTICES.md.
|
|
3
|
+
// Plugin installation: a free block tests its angle above the notch while pending, then seats squarely in the grid only after confirmation.
|
|
4
|
+
// Work loops only while alive; the application determines the result.
|
|
5
|
+
const work = (duration, frames, pause = 0) => ({
|
|
6
|
+
duration,
|
|
7
|
+
repeatAfter: duration + pause,
|
|
8
|
+
loop: true,
|
|
9
|
+
frames,
|
|
10
|
+
});
|
|
11
|
+
const fixed = [{}, {}, {}];
|
|
12
|
+
const p = (name, paths, poses = fixed, options = {}) => ({ name, paths, poses, ...options });
|
|
13
|
+
// A separate block tests its orientation above the notch, then slides into a square seat.
|
|
14
|
+
export const blocksArt = {
|
|
15
|
+
name: 'blocks',
|
|
16
|
+
parts: [
|
|
17
|
+
p('frame', [
|
|
18
|
+
'M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2',
|
|
19
|
+
]),
|
|
20
|
+
p('block', ['M15 2h6a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z'], [{}, { x: -1.3, y: 1.3, angle: -7 }, { x: -4, y: 4 }], {
|
|
21
|
+
pivot: [18, 6],
|
|
22
|
+
gestures: [
|
|
23
|
+
null,
|
|
24
|
+
work(1.35, [
|
|
25
|
+
{ at: 0 },
|
|
26
|
+
{ at: 0.36, angle: 14, x: -0.65, y: 0.65 },
|
|
27
|
+
{ at: 0.58, angle: 14, x: -0.65, y: 0.65 },
|
|
28
|
+
{ at: 1 },
|
|
29
|
+
], 0.2),
|
|
30
|
+
null,
|
|
31
|
+
],
|
|
32
|
+
}),
|
|
33
|
+
],
|
|
34
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StatefulIconProps } from "../../shared/icon-types.js";
|
|
2
|
+
import { type BotState } from "./bot-rig.js";
|
|
3
|
+
export { botStates, type BotState } from "./bot-rig.js";
|
|
4
|
+
export type BotIconProps = StatefulIconProps<BotState>;
|
|
5
|
+
export declare const BotIcon: import("react").NamedExoticComponent<BotIconProps>;
|
|
@@ -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 { botArt, botStates } from "./bot-rig.js";
|
|
6
|
+
export { botStates } from "./bot-rig.js";
|
|
7
|
+
export const BotIcon = memo(function BotIcon(props) {
|
|
8
|
+
return _jsx(ArticulatedIcon, { art: botArt, states: botStates, ...props });
|
|
9
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export const botStates = ['idle', 'thinking', 'ready'];
|
|
2
|
+
// Lucide `bot` outline with original motion details. Attribution and pinned source: THIRD_PARTY_NOTICES.md.
|
|
3
|
+
// Assistant: a quiet head, an attached head/antenna tilt with an eye blink while thinking, then one small nod and a steady light when ready.
|
|
4
|
+
// Work loops only while alive; the application determines the result.
|
|
5
|
+
const work = (duration, frames, pause = 0) => ({
|
|
6
|
+
duration,
|
|
7
|
+
repeatAfter: duration + pause,
|
|
8
|
+
loop: true,
|
|
9
|
+
frames,
|
|
10
|
+
});
|
|
11
|
+
const event = (frames) => ({
|
|
12
|
+
duration: 0.8,
|
|
13
|
+
repeatAfter: 2,
|
|
14
|
+
loop: false,
|
|
15
|
+
frames,
|
|
16
|
+
});
|
|
17
|
+
const fixed = [{}, {}, {}];
|
|
18
|
+
const p = (name, paths, poses = fixed, options = {}) => ({ name, paths, poses, ...options });
|
|
19
|
+
// The head, antenna and light tilt as one rigid assembly. A blink deforms only the eye strokes.
|
|
20
|
+
const ponder = work(2.15, [{ at: 0 }, { at: 0.22, angle: 6 }, { at: 0.48, angle: 6 }, { at: 0.64 }, { at: 1 }], 0.15);
|
|
21
|
+
const nod = event([
|
|
22
|
+
{ at: 0 },
|
|
23
|
+
{ at: 0.25, angle: 2.4, y: 0.2 },
|
|
24
|
+
{ at: 0.5, angle: -0.8 },
|
|
25
|
+
{ at: 1 },
|
|
26
|
+
]);
|
|
27
|
+
export const botArt = {
|
|
28
|
+
name: 'bot',
|
|
29
|
+
parts: [
|
|
30
|
+
p('head', [
|
|
31
|
+
'M6 8h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2Z',
|
|
32
|
+
'M2 14h2',
|
|
33
|
+
'M20 14h2',
|
|
34
|
+
'M12 8V4H8',
|
|
35
|
+
], [{}, { angle: -3 }, {}], {
|
|
36
|
+
pivot: [12, 20],
|
|
37
|
+
gestures: [null, ponder, nod],
|
|
38
|
+
}),
|
|
39
|
+
p('eyes', ['M9 13v2', 'M15 13v2'], [{}, { angle: -3 }, {}], {
|
|
40
|
+
pivot: [12, 20],
|
|
41
|
+
pathOffsets: [
|
|
42
|
+
[0, 1, -2],
|
|
43
|
+
[0, 1, -2],
|
|
44
|
+
],
|
|
45
|
+
gestures: [
|
|
46
|
+
null,
|
|
47
|
+
{
|
|
48
|
+
...ponder,
|
|
49
|
+
frames: [
|
|
50
|
+
{ at: 0 },
|
|
51
|
+
{ at: 0.22, angle: 6, x: 0.35 },
|
|
52
|
+
{ at: 0.48, angle: 6, x: 0.35 },
|
|
53
|
+
{ at: 0.64 },
|
|
54
|
+
{ at: 0.76, flex: 1 },
|
|
55
|
+
{ at: 0.8, flex: 1 },
|
|
56
|
+
{ at: 0.85 },
|
|
57
|
+
{ at: 1 },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
nod,
|
|
61
|
+
],
|
|
62
|
+
}),
|
|
63
|
+
p('light', ['M7.1 4a.9 .9 0 1 0 1.8 0a.9 .9 0 1 0-1.8 0'], [{ opacity: 0 }, { angle: -3, opacity: 0.45 }, {}], {
|
|
64
|
+
accent: true,
|
|
65
|
+
pivot: [12, 20],
|
|
66
|
+
gestures: [
|
|
67
|
+
null,
|
|
68
|
+
{
|
|
69
|
+
...ponder,
|
|
70
|
+
frames: ponder.frames.map((f) => ({
|
|
71
|
+
...f,
|
|
72
|
+
opacity: f.at === 0.22 || f.at === 0.48 ? 0.4 : 0,
|
|
73
|
+
})),
|
|
74
|
+
},
|
|
75
|
+
nod,
|
|
76
|
+
],
|
|
77
|
+
}),
|
|
78
|
+
],
|
|
79
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StatefulIconProps } from "../../shared/icon-types.js";
|
|
2
|
+
import { type BrickWallState } from "./brick-wall-rig.js";
|
|
3
|
+
export { brickWallStates, type BrickWallState } from "./brick-wall-rig.js";
|
|
4
|
+
export type BrickWallIconProps = StatefulIconProps<BrickWallState>;
|
|
5
|
+
export declare const BrickWallIcon: import("react").NamedExoticComponent<BrickWallIconProps>;
|
|
@@ -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 { brickWallArt, brickWallStates } from "./brick-wall-rig.js";
|
|
6
|
+
export { brickWallStates } from "./brick-wall-rig.js";
|
|
7
|
+
export const BrickWallIcon = memo(function BrickWallIcon(props) {
|
|
8
|
+
return _jsx(ArticulatedIcon, { art: brickWallArt, states: brickWallStates, ...props });
|
|
9
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export const brickWallStates = ['off', 'applying', 'active'];
|
|
2
|
+
// Lucide `brick-wall` outline with original motion details. Attribution and pinned source: THIRD_PARTY_NOTICES.md.
|
|
3
|
+
// Access rules: faint mortar when off, joints trace sequentially while applying, and the complete wall holds when active. The frame remains fixed.
|
|
4
|
+
// Work loops only while alive; the application determines the result.
|
|
5
|
+
const work = (duration, frames, pause = 0) => ({
|
|
6
|
+
duration,
|
|
7
|
+
repeatAfter: duration + pause,
|
|
8
|
+
loop: true,
|
|
9
|
+
frames,
|
|
10
|
+
});
|
|
11
|
+
const event = (frames) => ({
|
|
12
|
+
duration: 0.8,
|
|
13
|
+
repeatAfter: 2,
|
|
14
|
+
loop: false,
|
|
15
|
+
frames,
|
|
16
|
+
});
|
|
17
|
+
const fixed = [{}, {}, {}];
|
|
18
|
+
const p = (name, paths, poses = fixed, options = {}) => ({ name, paths, poses, ...options });
|
|
19
|
+
// Rule application follows the wall's mortar, without deforming the surrounding frame.
|
|
20
|
+
const wallLines = [
|
|
21
|
+
['M8 21v-6', 6],
|
|
22
|
+
['M16 21v-6', 6],
|
|
23
|
+
['M3 15h18', 18],
|
|
24
|
+
['M12 15V9', 6],
|
|
25
|
+
['M3 9h18', 18],
|
|
26
|
+
['M8 9V3', 6],
|
|
27
|
+
['M16 9V3', 6],
|
|
28
|
+
];
|
|
29
|
+
export const brickWallArt = {
|
|
30
|
+
name: 'brick-wall',
|
|
31
|
+
parts: [
|
|
32
|
+
p('frame', ['M5 3H19Q21 3 21 5V19Q21 21 19 21H5Q3 21 3 19V5Q3 3 5 3Z']),
|
|
33
|
+
p('mortar-guide', wallLines.map((v) => v[0]), [{ opacity: 0.2 }, { opacity: 0.2 }, { opacity: 0 }]),
|
|
34
|
+
...wallLines.map(([d, length], i) => {
|
|
35
|
+
const start = 0.06 + i * 0.085;
|
|
36
|
+
const rest = i < 3 ? 1 : 0;
|
|
37
|
+
return p('joint-' + i, [d], [{ opacity: 0, draw: 0 }, { draw: rest }, {}], {
|
|
38
|
+
traceLength: length,
|
|
39
|
+
gestures: [
|
|
40
|
+
null,
|
|
41
|
+
work(1.65, [
|
|
42
|
+
{ at: 0 },
|
|
43
|
+
{ at: start },
|
|
44
|
+
{ at: start + 0.14, draw: 1 - rest },
|
|
45
|
+
{ at: 0.78, draw: 1 - rest },
|
|
46
|
+
{ at: 0.84, draw: 1 - rest, opacity: -1 },
|
|
47
|
+
{ at: 0.88, draw: -rest, opacity: -1 },
|
|
48
|
+
{ at: 1 },
|
|
49
|
+
], 0.03),
|
|
50
|
+
event([{ at: 0, draw: -0.35 }, { at: Math.min(0.8, 0.22 + i * 0.08) }, { at: 1 }]),
|
|
51
|
+
],
|
|
52
|
+
});
|
|
53
|
+
}),
|
|
54
|
+
],
|
|
55
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StatefulIconProps } from "../../shared/icon-types.js";
|
|
2
|
+
import { type DiceState } from "./dice-rig.js";
|
|
3
|
+
export { diceStates, type DiceState } from "./dice-rig.js";
|
|
4
|
+
export type DiceIconProps = StatefulIconProps<DiceState>;
|
|
5
|
+
export declare const DiceIcon: import("react").NamedExoticComponent<DiceIconProps>;
|
|
@@ -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 { diceArt, diceStates } from "./dice-rig.js";
|
|
6
|
+
export { diceStates } from "./dice-rig.js";
|
|
7
|
+
export const DiceIcon = memo(function DiceIcon(props) {
|
|
8
|
+
return _jsx(ArticulatedIcon, { art: diceArt, states: diceStates, ...props });
|
|
9
|
+
});
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
export declare const diceStates: readonly ["ready", "rolling", "rolled"];
|
|
2
|
+
export type DiceState = (typeof diceStates)[number];
|
|
3
|
+
export declare const diceArt: {
|
|
4
|
+
readonly name: "dice";
|
|
5
|
+
readonly parts: readonly [{
|
|
6
|
+
readonly name: "body";
|
|
7
|
+
readonly paths: readonly ["M5 3H19Q21 3 21 5V19Q21 21 19 21H5Q3 21 3 19V5Q3 3 5 3Z"];
|
|
8
|
+
readonly poses: readonly [{}, {
|
|
9
|
+
readonly angle: 9;
|
|
10
|
+
readonly y: -0.5;
|
|
11
|
+
}, {}];
|
|
12
|
+
readonly pivot: readonly [12, 12];
|
|
13
|
+
readonly gestures: readonly [null, {
|
|
14
|
+
readonly frames: readonly [{
|
|
15
|
+
readonly at: 0;
|
|
16
|
+
}, {
|
|
17
|
+
readonly at: 0.25;
|
|
18
|
+
readonly angle: -18;
|
|
19
|
+
readonly y: 0.5;
|
|
20
|
+
}, {
|
|
21
|
+
readonly at: 0.5;
|
|
22
|
+
readonly angle: -2;
|
|
23
|
+
readonly y: -0.2;
|
|
24
|
+
}, {
|
|
25
|
+
readonly at: 0.75;
|
|
26
|
+
readonly angle: -13;
|
|
27
|
+
readonly y: 0.5;
|
|
28
|
+
}, {
|
|
29
|
+
readonly at: 1;
|
|
30
|
+
}];
|
|
31
|
+
readonly duration: 1.2;
|
|
32
|
+
readonly repeatAfter: 2;
|
|
33
|
+
readonly loop: true;
|
|
34
|
+
}, {
|
|
35
|
+
readonly frames: readonly [{
|
|
36
|
+
readonly at: 0;
|
|
37
|
+
}, {
|
|
38
|
+
readonly at: 0.3;
|
|
39
|
+
readonly scaleY: -0.08;
|
|
40
|
+
readonly scaleX: 0.05;
|
|
41
|
+
}, {
|
|
42
|
+
readonly at: 0.55;
|
|
43
|
+
readonly scaleY: 0.03;
|
|
44
|
+
}, {
|
|
45
|
+
readonly at: 1;
|
|
46
|
+
}];
|
|
47
|
+
readonly duration: 0.6;
|
|
48
|
+
readonly repeatAfter: 2;
|
|
49
|
+
readonly loop: false;
|
|
50
|
+
}];
|
|
51
|
+
}, {
|
|
52
|
+
readonly name: "five";
|
|
53
|
+
readonly paths: readonly ["M16 8h.01", "M8 8h.01", "M8 16h.01", "M16 16h.01", "M12 12h.01"];
|
|
54
|
+
readonly poses: readonly [{
|
|
55
|
+
readonly opacity: 0.35;
|
|
56
|
+
}, {
|
|
57
|
+
readonly angle: 9;
|
|
58
|
+
readonly y: -0.5;
|
|
59
|
+
readonly opacity: 0;
|
|
60
|
+
}, {}];
|
|
61
|
+
readonly pivot: readonly [12, 12];
|
|
62
|
+
readonly gestures: readonly [null, {
|
|
63
|
+
readonly frames: readonly [{
|
|
64
|
+
readonly at: 0;
|
|
65
|
+
}, {
|
|
66
|
+
readonly at: 0.22;
|
|
67
|
+
readonly angle: -18;
|
|
68
|
+
readonly y: 0.5;
|
|
69
|
+
}, {
|
|
70
|
+
readonly at: 0.25;
|
|
71
|
+
readonly angle: -18;
|
|
72
|
+
readonly y: 0.5;
|
|
73
|
+
readonly opacity: 1;
|
|
74
|
+
}, {
|
|
75
|
+
readonly at: 0.5;
|
|
76
|
+
readonly angle: -2;
|
|
77
|
+
readonly y: -0.2;
|
|
78
|
+
readonly opacity: 1;
|
|
79
|
+
}, {
|
|
80
|
+
readonly at: 0.72;
|
|
81
|
+
readonly angle: -13;
|
|
82
|
+
readonly y: 0.5;
|
|
83
|
+
readonly opacity: 1;
|
|
84
|
+
}, {
|
|
85
|
+
readonly at: 0.75;
|
|
86
|
+
readonly angle: -13;
|
|
87
|
+
readonly y: 0.5;
|
|
88
|
+
}, {
|
|
89
|
+
readonly at: 1;
|
|
90
|
+
}];
|
|
91
|
+
readonly duration: 1.2;
|
|
92
|
+
readonly repeatAfter: 2;
|
|
93
|
+
readonly loop: true;
|
|
94
|
+
}, {
|
|
95
|
+
readonly frames: readonly [{
|
|
96
|
+
readonly at: 0;
|
|
97
|
+
}, {
|
|
98
|
+
readonly at: 0.3;
|
|
99
|
+
readonly scaleY: -0.08;
|
|
100
|
+
readonly scaleX: 0.05;
|
|
101
|
+
}, {
|
|
102
|
+
readonly at: 0.55;
|
|
103
|
+
readonly scaleY: 0.03;
|
|
104
|
+
readonly opacity: 0;
|
|
105
|
+
}, {
|
|
106
|
+
readonly at: 1;
|
|
107
|
+
}];
|
|
108
|
+
readonly duration: 0.6;
|
|
109
|
+
readonly repeatAfter: 2;
|
|
110
|
+
readonly loop: false;
|
|
111
|
+
}];
|
|
112
|
+
}, {
|
|
113
|
+
readonly name: "three";
|
|
114
|
+
readonly paths: readonly ["M16 8h.01", "M12 12h.01", "M8 16h.01"];
|
|
115
|
+
readonly poses: readonly [{
|
|
116
|
+
readonly opacity: 0;
|
|
117
|
+
}, {
|
|
118
|
+
readonly angle: 9;
|
|
119
|
+
readonly y: -0.5;
|
|
120
|
+
}, {
|
|
121
|
+
readonly opacity: 0;
|
|
122
|
+
}];
|
|
123
|
+
readonly pivot: readonly [12, 12];
|
|
124
|
+
readonly gestures: readonly [null, {
|
|
125
|
+
readonly frames: readonly [{
|
|
126
|
+
readonly at: 0;
|
|
127
|
+
}, {
|
|
128
|
+
readonly at: 0.22;
|
|
129
|
+
readonly angle: -18;
|
|
130
|
+
readonly y: 0.5;
|
|
131
|
+
}, {
|
|
132
|
+
readonly at: 0.25;
|
|
133
|
+
readonly angle: -18;
|
|
134
|
+
readonly y: 0.5;
|
|
135
|
+
readonly opacity: -1;
|
|
136
|
+
}, {
|
|
137
|
+
readonly at: 0.5;
|
|
138
|
+
readonly angle: -2;
|
|
139
|
+
readonly y: -0.2;
|
|
140
|
+
readonly opacity: -1;
|
|
141
|
+
}, {
|
|
142
|
+
readonly at: 0.72;
|
|
143
|
+
readonly angle: -13;
|
|
144
|
+
readonly y: 0.5;
|
|
145
|
+
readonly opacity: -1;
|
|
146
|
+
}, {
|
|
147
|
+
readonly at: 0.75;
|
|
148
|
+
readonly angle: -13;
|
|
149
|
+
readonly y: 0.5;
|
|
150
|
+
}, {
|
|
151
|
+
readonly at: 1;
|
|
152
|
+
}];
|
|
153
|
+
readonly duration: 1.2;
|
|
154
|
+
readonly repeatAfter: 2;
|
|
155
|
+
readonly loop: true;
|
|
156
|
+
}, null];
|
|
157
|
+
}];
|
|
158
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export const diceStates = ['ready', 'rolling', 'rolled'];
|
|
2
|
+
// Lucide `dice-5` body and pips, with the `dice-3` diagonal as the alternate face; attribution and pinned source: THIRD_PARTY_NOTICES.md.
|
|
3
|
+
// Host: a randomise, shuffle-pick or "surprise me" control; a chance mechanic.
|
|
4
|
+
// ready (condition): the die with its pips ghosted — nothing has been rolled.
|
|
5
|
+
// rolling (work): the die rocks about its centre (±9°) with a small hop while the face flips between
|
|
6
|
+
// five and three pips, until the host returns a result. At rest it sits tilted mid-roll on the three face.
|
|
7
|
+
// rolled (result): the die lands square with one squash and shows the five face at full strength.
|
|
8
|
+
// Nearest confusion: a spinner — the tilt stays under 10° and the pips flip, so it never reads as a wheel.
|
|
9
|
+
const roll = { duration: 1.2, repeatAfter: 2, loop: true };
|
|
10
|
+
const landing = { duration: 0.6, repeatAfter: 2, loop: false };
|
|
11
|
+
const CENTRE = [12, 12];
|
|
12
|
+
export const diceArt = {
|
|
13
|
+
name: 'dice',
|
|
14
|
+
parts: [
|
|
15
|
+
{
|
|
16
|
+
name: 'body',
|
|
17
|
+
paths: ['M5 3H19Q21 3 21 5V19Q21 21 19 21H5Q3 21 3 19V5Q3 3 5 3Z'],
|
|
18
|
+
poses: [{}, { angle: 9, y: -0.5 }, {}],
|
|
19
|
+
pivot: CENTRE,
|
|
20
|
+
gestures: [
|
|
21
|
+
null,
|
|
22
|
+
{
|
|
23
|
+
...roll,
|
|
24
|
+
frames: [
|
|
25
|
+
{ at: 0 },
|
|
26
|
+
{ at: 0.25, angle: -18, y: 0.5 },
|
|
27
|
+
{ at: 0.5, angle: -2, y: -0.2 },
|
|
28
|
+
{ at: 0.75, angle: -13, y: 0.5 },
|
|
29
|
+
{ at: 1 },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
...landing,
|
|
34
|
+
frames: [
|
|
35
|
+
{ at: 0 },
|
|
36
|
+
{ at: 0.3, scaleY: -0.08, scaleX: 0.05 },
|
|
37
|
+
{ at: 0.55, scaleY: 0.03 },
|
|
38
|
+
{ at: 1 },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'five',
|
|
45
|
+
paths: ['M16 8h.01', 'M8 8h.01', 'M8 16h.01', 'M16 16h.01', 'M12 12h.01'],
|
|
46
|
+
poses: [{ opacity: 0.35 }, { angle: 9, y: -0.5, opacity: 0 }, {}],
|
|
47
|
+
pivot: CENTRE,
|
|
48
|
+
gestures: [
|
|
49
|
+
null,
|
|
50
|
+
{
|
|
51
|
+
...roll,
|
|
52
|
+
frames: [
|
|
53
|
+
{ at: 0 },
|
|
54
|
+
{ at: 0.22, angle: -18, y: 0.5 },
|
|
55
|
+
{ at: 0.25, angle: -18, y: 0.5, opacity: 1 },
|
|
56
|
+
{ at: 0.5, angle: -2, y: -0.2, opacity: 1 },
|
|
57
|
+
{ at: 0.72, angle: -13, y: 0.5, opacity: 1 },
|
|
58
|
+
{ at: 0.75, angle: -13, y: 0.5 },
|
|
59
|
+
{ at: 1 },
|
|
60
|
+
],
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
...landing,
|
|
64
|
+
frames: [
|
|
65
|
+
{ at: 0 },
|
|
66
|
+
{ at: 0.3, scaleY: -0.08, scaleX: 0.05 },
|
|
67
|
+
{ at: 0.55, scaleY: 0.03, opacity: 0 },
|
|
68
|
+
{ at: 1 },
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'three',
|
|
75
|
+
paths: ['M16 8h.01', 'M12 12h.01', 'M8 16h.01'],
|
|
76
|
+
poses: [{ opacity: 0 }, { angle: 9, y: -0.5 }, { opacity: 0 }],
|
|
77
|
+
pivot: CENTRE,
|
|
78
|
+
gestures: [
|
|
79
|
+
null,
|
|
80
|
+
{
|
|
81
|
+
...roll,
|
|
82
|
+
frames: [
|
|
83
|
+
{ at: 0 },
|
|
84
|
+
{ at: 0.22, angle: -18, y: 0.5 },
|
|
85
|
+
{ at: 0.25, angle: -18, y: 0.5, opacity: -1 },
|
|
86
|
+
{ at: 0.5, angle: -2, y: -0.2, opacity: -1 },
|
|
87
|
+
{ at: 0.72, angle: -13, y: 0.5, opacity: -1 },
|
|
88
|
+
{ at: 0.75, angle: -13, y: 0.5 },
|
|
89
|
+
{ at: 1 },
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
null,
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
};
|