weasel-icons 0.17.0 → 0.18.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 +4 -0
- package/dist/icons/air-quality/air-quality-icon.d.ts +5 -0
- package/dist/icons/air-quality/air-quality-icon.js +9 -0
- package/dist/icons/air-quality/air-quality-rig.d.ts +37 -0
- package/dist/icons/air-quality/air-quality-rig.js +92 -0
- package/dist/icons/astrolabe/astrolabe-icon.d.ts +5 -0
- package/dist/icons/astrolabe/astrolabe-icon.js +9 -0
- package/dist/icons/astrolabe/astrolabe-rig.d.ts +140 -0
- package/dist/icons/astrolabe/astrolabe-rig.js +117 -0
- package/dist/icons/aurora/aurora-icon.d.ts +5 -0
- package/dist/icons/aurora/aurora-icon.js +9 -0
- package/dist/icons/aurora/aurora-rig.d.ts +64 -0
- package/dist/icons/aurora/aurora-rig.js +102 -0
- package/dist/icons/brain-computer-interface/brain-computer-interface-icon.d.ts +5 -0
- package/dist/icons/brain-computer-interface/brain-computer-interface-icon.js +9 -0
- package/dist/icons/brain-computer-interface/brain-computer-interface-rig.d.ts +112 -0
- package/dist/icons/brain-computer-interface/brain-computer-interface-rig.js +177 -0
- package/dist/icons/carbon-capture/carbon-capture-icon.d.ts +5 -0
- package/dist/icons/carbon-capture/carbon-capture-icon.js +9 -0
- package/dist/icons/carbon-capture/carbon-capture-rig.d.ts +165 -0
- package/dist/icons/carbon-capture/carbon-capture-rig.js +173 -0
- package/dist/icons/content-credentials/content-credentials-icon.d.ts +5 -0
- package/dist/icons/content-credentials/content-credentials-icon.js +9 -0
- package/dist/icons/content-credentials/content-credentials-rig.d.ts +106 -0
- package/dist/icons/content-credentials/content-credentials-rig.js +89 -0
- package/dist/icons/coral-reef/coral-reef-icon.d.ts +5 -0
- package/dist/icons/coral-reef/coral-reef-icon.js +9 -0
- package/dist/icons/coral-reef/coral-reef-rig.d.ts +60 -0
- package/dist/icons/coral-reef/coral-reef-rig.js +71 -0
- package/dist/icons/cultivated-meat/cultivated-meat-icon.d.ts +5 -0
- package/dist/icons/cultivated-meat/cultivated-meat-icon.js +9 -0
- package/dist/icons/cultivated-meat/cultivated-meat-rig.d.ts +68 -0
- package/dist/icons/cultivated-meat/cultivated-meat-rig.js +119 -0
- package/dist/icons/data-center/data-center-icon.d.ts +5 -0
- package/dist/icons/data-center/data-center-icon.js +9 -0
- package/dist/icons/data-center/data-center-rig.d.ts +48 -0
- package/dist/icons/data-center/data-center-rig.js +66 -0
- package/dist/icons/deepfake/deepfake-icon.d.ts +5 -0
- package/dist/icons/deepfake/deepfake-icon.js +9 -0
- package/dist/icons/deepfake/deepfake-rig.d.ts +97 -0
- package/dist/icons/deepfake/deepfake-rig.js +92 -0
- package/dist/icons/drought/drought-icon.d.ts +5 -0
- package/dist/icons/drought/drought-icon.js +9 -0
- package/dist/icons/drought/drought-rig.d.ts +86 -0
- package/dist/icons/drought/drought-rig.js +83 -0
- package/dist/icons/excavation/excavation-icon.d.ts +5 -0
- package/dist/icons/excavation/excavation-icon.js +9 -0
- package/dist/icons/excavation/excavation-rig.d.ts +121 -0
- package/dist/icons/excavation/excavation-rig.js +81 -0
- package/dist/icons/exoplanet-transit/exoplanet-transit-icon.d.ts +5 -0
- package/dist/icons/exoplanet-transit/exoplanet-transit-icon.js +9 -0
- package/dist/icons/exoplanet-transit/exoplanet-transit-rig.d.ts +271 -0
- package/dist/icons/exoplanet-transit/exoplanet-transit-rig.js +134 -0
- package/dist/icons/fusion-reactor/fusion-reactor-icon.d.ts +5 -0
- package/dist/icons/fusion-reactor/fusion-reactor-icon.js +9 -0
- package/dist/icons/fusion-reactor/fusion-reactor-rig.d.ts +149 -0
- package/dist/icons/fusion-reactor/fusion-reactor-rig.js +146 -0
- package/dist/icons/gene-editing/gene-editing-icon.d.ts +5 -0
- package/dist/icons/gene-editing/gene-editing-icon.js +9 -0
- package/dist/icons/gene-editing/gene-editing-rig.d.ts +113 -0
- package/dist/icons/gene-editing/gene-editing-rig.js +152 -0
- package/dist/icons/glacier-melt/glacier-melt-icon.d.ts +5 -0
- package/dist/icons/glacier-melt/glacier-melt-icon.js +9 -0
- package/dist/icons/glacier-melt/glacier-melt-rig.d.ts +116 -0
- package/dist/icons/glacier-melt/glacier-melt-rig.js +159 -0
- package/dist/icons/gramophone/gramophone-icon.d.ts +5 -0
- package/dist/icons/gramophone/gramophone-icon.js +9 -0
- package/dist/icons/gramophone/gramophone-rig.d.ts +66 -0
- package/dist/icons/gramophone/gramophone-rig.js +88 -0
- package/dist/icons/green-hydrogen/green-hydrogen-icon.d.ts +5 -0
- package/dist/icons/green-hydrogen/green-hydrogen-icon.js +9 -0
- package/dist/icons/green-hydrogen/green-hydrogen-rig.d.ts +48 -0
- package/dist/icons/green-hydrogen/green-hydrogen-rig.js +93 -0
- package/dist/icons/grid-battery/grid-battery-icon.d.ts +5 -0
- package/dist/icons/grid-battery/grid-battery-icon.js +9 -0
- package/dist/icons/grid-battery/grid-battery-rig.d.ts +76 -0
- package/dist/icons/grid-battery/grid-battery-rig.js +92 -0
- package/dist/icons/heat-pump/heat-pump-icon.d.ts +5 -0
- package/dist/icons/heat-pump/heat-pump-icon.js +9 -0
- package/dist/icons/heat-pump/heat-pump-rig.d.ts +57 -0
- package/dist/icons/heat-pump/heat-pump-rig.js +124 -0
- package/dist/icons/humanoid-robot/humanoid-robot-icon.d.ts +5 -0
- package/dist/icons/humanoid-robot/humanoid-robot-icon.js +9 -0
- package/dist/icons/humanoid-robot/humanoid-robot-rig.d.ts +162 -0
- package/dist/icons/humanoid-robot/humanoid-robot-rig.js +266 -0
- package/dist/icons/injection-pen/injection-pen-icon.d.ts +5 -0
- package/dist/icons/injection-pen/injection-pen-icon.js +9 -0
- package/dist/icons/injection-pen/injection-pen-rig.d.ts +159 -0
- package/dist/icons/injection-pen/injection-pen-rig.js +142 -0
- package/dist/icons/liberty-bell/liberty-bell-icon.d.ts +5 -0
- package/dist/icons/liberty-bell/liberty-bell-icon.js +9 -0
- package/dist/icons/liberty-bell/liberty-bell-rig.d.ts +153 -0
- package/dist/icons/liberty-bell/liberty-bell-rig.js +98 -0
- package/dist/icons/longship/longship-icon.d.ts +5 -0
- package/dist/icons/longship/longship-icon.js +9 -0
- package/dist/icons/longship/longship-rig.d.ts +78 -0
- package/dist/icons/longship/longship-rig.js +93 -0
- package/dist/icons/lunar-lander/lunar-lander-icon.d.ts +5 -0
- package/dist/icons/lunar-lander/lunar-lander-icon.js +9 -0
- package/dist/icons/lunar-lander/lunar-lander-rig.d.ts +160 -0
- package/dist/icons/lunar-lander/lunar-lander-rig.js +97 -0
- package/dist/icons/mars-rover/mars-rover-icon.d.ts +5 -0
- package/dist/icons/mars-rover/mars-rover-icon.js +9 -0
- package/dist/icons/mars-rover/mars-rover-rig.d.ts +138 -0
- package/dist/icons/mars-rover/mars-rover-rig.js +146 -0
- package/dist/icons/methane-leak/methane-leak-icon.d.ts +5 -0
- package/dist/icons/methane-leak/methane-leak-icon.js +9 -0
- package/dist/icons/methane-leak/methane-leak-rig.d.ts +137 -0
- package/dist/icons/methane-leak/methane-leak-rig.js +102 -0
- package/dist/icons/microplastics/microplastics-icon.d.ts +5 -0
- package/dist/icons/microplastics/microplastics-icon.js +9 -0
- package/dist/icons/microplastics/microplastics-rig.d.ts +129 -0
- package/dist/icons/microplastics/microplastics-rig.js +141 -0
- package/dist/icons/passkey/passkey-icon.d.ts +5 -0
- package/dist/icons/passkey/passkey-icon.js +9 -0
- package/dist/icons/passkey/passkey-rig.d.ts +104 -0
- package/dist/icons/passkey/passkey-rig.js +105 -0
- package/dist/icons/pollinator/pollinator-icon.d.ts +5 -0
- package/dist/icons/pollinator/pollinator-icon.js +9 -0
- package/dist/icons/pollinator/pollinator-rig.d.ts +67 -0
- package/dist/icons/pollinator/pollinator-rig.js +160 -0
- package/dist/icons/printing-press/printing-press-icon.d.ts +5 -0
- package/dist/icons/printing-press/printing-press-icon.js +9 -0
- package/dist/icons/printing-press/printing-press-rig.d.ts +157 -0
- package/dist/icons/printing-press/printing-press-rig.js +102 -0
- package/dist/icons/prompt-injection/prompt-injection-icon.d.ts +5 -0
- package/dist/icons/prompt-injection/prompt-injection-icon.js +9 -0
- package/dist/icons/prompt-injection/prompt-injection-rig.d.ts +68 -0
- package/dist/icons/prompt-injection/prompt-injection-rig.js +71 -0
- package/dist/icons/qubit/qubit-icon.d.ts +5 -0
- package/dist/icons/qubit/qubit-icon.js +9 -0
- package/dist/icons/qubit/qubit-rig.d.ts +45 -0
- package/dist/icons/qubit/qubit-rig.js +108 -0
- package/dist/icons/reforestation/reforestation-icon.d.ts +5 -0
- package/dist/icons/reforestation/reforestation-icon.js +9 -0
- package/dist/icons/reforestation/reforestation-rig.d.ts +59 -0
- package/dist/icons/reforestation/reforestation-rig.js +71 -0
- package/dist/icons/robotaxi/robotaxi-icon.d.ts +5 -0
- package/dist/icons/robotaxi/robotaxi-icon.js +9 -0
- package/dist/icons/robotaxi/robotaxi-rig.d.ts +105 -0
- package/dist/icons/robotaxi/robotaxi-rig.js +128 -0
- package/dist/icons/roman-aqueduct/roman-aqueduct-icon.d.ts +5 -0
- package/dist/icons/roman-aqueduct/roman-aqueduct-icon.js +9 -0
- package/dist/icons/roman-aqueduct/roman-aqueduct-rig.d.ts +53 -0
- package/dist/icons/roman-aqueduct/roman-aqueduct-rig.js +144 -0
- package/dist/icons/rosetta-stone/rosetta-stone-icon.d.ts +5 -0
- package/dist/icons/rosetta-stone/rosetta-stone-icon.js +9 -0
- package/dist/icons/rosetta-stone/rosetta-stone-rig.d.ts +85 -0
- package/dist/icons/rosetta-stone/rosetta-stone-rig.js +99 -0
- package/dist/icons/satellite-constellation/satellite-constellation-icon.d.ts +5 -0
- package/dist/icons/satellite-constellation/satellite-constellation-icon.js +9 -0
- package/dist/icons/satellite-constellation/satellite-constellation-rig.d.ts +140 -0
- package/dist/icons/satellite-constellation/satellite-constellation-rig.js +186 -0
- package/dist/icons/sea-level-rise/sea-level-rise-icon.d.ts +5 -0
- package/dist/icons/sea-level-rise/sea-level-rise-icon.js +9 -0
- package/dist/icons/sea-level-rise/sea-level-rise-rig.d.ts +83 -0
- package/dist/icons/sea-level-rise/sea-level-rise-rig.js +71 -0
- package/dist/icons/sextant/sextant-icon.d.ts +5 -0
- package/dist/icons/sextant/sextant-icon.js +9 -0
- package/dist/icons/sextant/sextant-rig.d.ts +113 -0
- package/dist/icons/sextant/sextant-rig.js +106 -0
- package/dist/icons/smart-glasses/smart-glasses-icon.d.ts +5 -0
- package/dist/icons/smart-glasses/smart-glasses-icon.js +9 -0
- package/dist/icons/smart-glasses/smart-glasses-rig.d.ts +42 -0
- package/dist/icons/smart-glasses/smart-glasses-rig.js +55 -0
- package/dist/icons/space-debris/space-debris-icon.d.ts +5 -0
- package/dist/icons/space-debris/space-debris-icon.js +9 -0
- package/dist/icons/space-debris/space-debris-rig.d.ts +146 -0
- package/dist/icons/space-debris/space-debris-rig.js +160 -0
- package/dist/icons/space-telescope/space-telescope-icon.d.ts +5 -0
- package/dist/icons/space-telescope/space-telescope-icon.js +9 -0
- package/dist/icons/space-telescope/space-telescope-rig.d.ts +103 -0
- package/dist/icons/space-telescope/space-telescope-rig.js +99 -0
- package/dist/icons/sundial/sundial-icon.d.ts +5 -0
- package/dist/icons/sundial/sundial-icon.js +9 -0
- package/dist/icons/sundial/sundial-rig.d.ts +57 -0
- package/dist/icons/sundial/sundial-rig.js +73 -0
- package/dist/icons/telegraph/telegraph-icon.d.ts +5 -0
- package/dist/icons/telegraph/telegraph-icon.js +9 -0
- package/dist/icons/telegraph/telegraph-rig.d.ts +61 -0
- package/dist/icons/telegraph/telegraph-rig.js +145 -0
- package/dist/icons/time-capsule/time-capsule-icon.d.ts +5 -0
- package/dist/icons/time-capsule/time-capsule-icon.js +9 -0
- package/dist/icons/time-capsule/time-capsule-rig.d.ts +139 -0
- package/dist/icons/time-capsule/time-capsule-rig.js +161 -0
- package/dist/icons/trebuchet/trebuchet-icon.d.ts +5 -0
- package/dist/icons/trebuchet/trebuchet-icon.js +9 -0
- package/dist/icons/trebuchet/trebuchet-rig.d.ts +119 -0
- package/dist/icons/trebuchet/trebuchet-rig.js +106 -0
- package/dist/icons/vertical-farm/vertical-farm-icon.d.ts +5 -0
- package/dist/icons/vertical-farm/vertical-farm-icon.js +9 -0
- package/dist/icons/vertical-farm/vertical-farm-rig.d.ts +73 -0
- package/dist/icons/vertical-farm/vertical-farm-rig.js +83 -0
- package/dist/icons/wildfire/wildfire-icon.d.ts +5 -0
- package/dist/icons/wildfire/wildfire-icon.js +9 -0
- package/dist/icons/wildfire/wildfire-rig.d.ts +139 -0
- package/dist/icons/wildfire/wildfire-rig.js +119 -0
- package/dist/icons/wind-turbine/wind-turbine-icon.d.ts +5 -0
- package/dist/icons/wind-turbine/wind-turbine-icon.js +9 -0
- package/dist/icons/wind-turbine/wind-turbine-rig.d.ts +78 -0
- package/dist/icons/wind-turbine/wind-turbine-rig.js +84 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +50 -0
- package/dist/shared/icon-colors.d.ts +50 -0
- package/dist/source.json +1 -1
- package/package.json +251 -1
package/README.md
CHANGED
|
@@ -8,6 +8,10 @@ Version `0.10.0` contains 874 icons, adding 200 across documents, collaboration,
|
|
|
8
8
|
|
|
9
9
|
Version `0.7.0` contained 469 icons; `0.6.0` contained 265 icons.
|
|
10
10
|
|
|
11
|
+
## Version 0.18.0
|
|
12
|
+
|
|
13
|
+
Adds 50 icons across technology and security, climate and energy, life sciences, history, and space exploration. The collection now contains 1,136 icons. Each addition includes three typed states, optional ongoing motion, matching editable CLI source and related search terms. Existing icon artwork, public states, shared runtime and the customization skill are unchanged.
|
|
14
|
+
|
|
11
15
|
## Version 0.17.0
|
|
12
16
|
|
|
13
17
|
Adds 32 icons for agent workflows, tool calls, approvals, retrieval, knowledge graphs, attention, transformer computation and token sampling. The collection now contains 1,086 icons. All new icons include three typed states, optional ongoing motion, accent colours, matching editable CLI source and related search terms. Existing icon artwork, public states, shared runtime and the customization skill are unchanged.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StatefulIconProps } from "../../shared/icon-types.js";
|
|
2
|
+
import { type AirQualityState } from "./air-quality-rig.js";
|
|
3
|
+
export { airQualityStates, type AirQualityState } from "./air-quality-rig.js";
|
|
4
|
+
export type AirQualityIconProps = StatefulIconProps<AirQualityState>;
|
|
5
|
+
export declare const AirQualityIcon: import("react").NamedExoticComponent<AirQualityIconProps>;
|
|
@@ -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 { airQualityArt, airQualityStates } from "./air-quality-rig.js";
|
|
6
|
+
export { airQualityStates } from "./air-quality-rig.js";
|
|
7
|
+
export const AirQualityIcon = memo(function AirQualityIcon(props) {
|
|
8
|
+
return _jsx(ArticulatedIcon, { art: airQualityArt, states: airQualityStates, ...props });
|
|
9
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { PartGesture } from "../../shared/articulation.js";
|
|
2
|
+
/**
|
|
3
|
+
* Air over a city skyline, with an index column beside it. Fine particles (PM2.5) drift in as
|
|
4
|
+
* pollution builds: one in good air, three at moderate, six when unhealthy. The index column
|
|
5
|
+
* fills in step with the particle count, so the reading and the cause are shown together.
|
|
6
|
+
*/
|
|
7
|
+
export declare const airQualityStates: readonly ["good", "moderate", "unhealthy"];
|
|
8
|
+
export type AirQualityState = (typeof airQualityStates)[number];
|
|
9
|
+
export declare const airQualityArt: {
|
|
10
|
+
name: string;
|
|
11
|
+
parts: ({
|
|
12
|
+
name: string;
|
|
13
|
+
paths: string[];
|
|
14
|
+
fillOnly: "ink";
|
|
15
|
+
pivot: readonly [8 | 4.2 | 4.4 | 13.6 | 12.8 | 9.2, 4.2 | 4.4 | 10.6 | 9.4 | 12.6 | 7.4];
|
|
16
|
+
poses: {}[];
|
|
17
|
+
gestures: (PartGesture | null)[];
|
|
18
|
+
} | {
|
|
19
|
+
name: string;
|
|
20
|
+
paths: string[];
|
|
21
|
+
poses: {}[];
|
|
22
|
+
pathOffsets?: undefined;
|
|
23
|
+
fillOnly?: undefined;
|
|
24
|
+
accent?: undefined;
|
|
25
|
+
gestures?: undefined;
|
|
26
|
+
} | {
|
|
27
|
+
name: string;
|
|
28
|
+
paths: string[];
|
|
29
|
+
pathOffsets: number[][];
|
|
30
|
+
fillOnly: "ink";
|
|
31
|
+
accent: true;
|
|
32
|
+
poses: {
|
|
33
|
+
flex: number;
|
|
34
|
+
}[];
|
|
35
|
+
gestures: (PartGesture | null)[];
|
|
36
|
+
})[];
|
|
37
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Air over a city skyline, with an index column beside it. Fine particles (PM2.5) drift in as
|
|
3
|
+
* pollution builds: one in good air, three at moderate, six when unhealthy. The index column
|
|
4
|
+
* fills in step with the particle count, so the reading and the cause are shown together.
|
|
5
|
+
*/
|
|
6
|
+
export const airQualityStates = ['good', 'moderate', 'unhealthy'];
|
|
7
|
+
const circle = (cx, cy, r) => `M${cx - r} ${cy}a${r} ${r} 0 1 0 ${2 * r} 0a${r} ${r} 0 1 0 ${-2 * r} 0Z`;
|
|
8
|
+
/** Particle positions, all at least ~4.4 apart; the order is the order they arrive in. */
|
|
9
|
+
const particles = [
|
|
10
|
+
[9.2, 4.2],
|
|
11
|
+
[4.4, 7.4],
|
|
12
|
+
[12.8, 9.4],
|
|
13
|
+
[13.6, 4.4],
|
|
14
|
+
[8, 10.6],
|
|
15
|
+
[4.2, 12.6],
|
|
16
|
+
];
|
|
17
|
+
/** The state in which each particle first appears. */
|
|
18
|
+
const arrives = [0, 1, 1, 2, 2, 2];
|
|
19
|
+
const levelTop = [17.4, 12.4, 5.6];
|
|
20
|
+
const level = (top) => `M18.4 ${top}H20.2V20.4H18.4Z`;
|
|
21
|
+
const STEP = levelTop[1] - levelTop[2];
|
|
22
|
+
const ease = (flex) => ({
|
|
23
|
+
duration: 1.6,
|
|
24
|
+
repeatAfter: 1.6,
|
|
25
|
+
loop: false,
|
|
26
|
+
frames: [{ at: 0, flex }, { at: 0.2, flex }, { at: 1 }],
|
|
27
|
+
});
|
|
28
|
+
/** Particles hang in the air and wander slowly; each has its own phase and path. */
|
|
29
|
+
const drift = (i) => {
|
|
30
|
+
const dx = i % 2 ? 0.6 : -0.6;
|
|
31
|
+
const dy = i % 3 ? -0.5 : 0.5;
|
|
32
|
+
const shift = (i * 0.11) % 0.3;
|
|
33
|
+
return {
|
|
34
|
+
duration: 3.6,
|
|
35
|
+
repeatAfter: 3.6,
|
|
36
|
+
interpolation: 'continuous',
|
|
37
|
+
frames: [
|
|
38
|
+
{ at: 0 },
|
|
39
|
+
{ at: 0.25 + shift * 0.5, x: dx, y: dy * 0.4 },
|
|
40
|
+
{ at: 0.6 + shift * 0.5, x: dx * 0.3, y: dy },
|
|
41
|
+
{ at: 1 },
|
|
42
|
+
],
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
/** Blown in from the left on arrival. */
|
|
46
|
+
const blowIn = {
|
|
47
|
+
duration: 1.4,
|
|
48
|
+
repeatAfter: 1.4,
|
|
49
|
+
loop: false,
|
|
50
|
+
frames: [{ at: 0, x: -3, opacity: -1 }, { at: 0.2, x: -3, opacity: -1 }, { at: 1 }],
|
|
51
|
+
};
|
|
52
|
+
const particle = (i) => {
|
|
53
|
+
const [cx, cy] = particles[i];
|
|
54
|
+
const hidden = { scaleX: 0, scaleY: 0, opacity: 0 };
|
|
55
|
+
return {
|
|
56
|
+
name: `particle-${i + 1}`,
|
|
57
|
+
paths: [circle(cx, cy, 1.3)],
|
|
58
|
+
fillOnly: 'ink',
|
|
59
|
+
pivot: [cx, cy],
|
|
60
|
+
poses: airQualityStates.map((_, s) => (s >= arrives[i] ? {} : hidden)),
|
|
61
|
+
gestures: airQualityStates.map((_, s) => s < arrives[i] || s === 0 ? null : s === arrives[i] ? blowIn : drift(i)),
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export const airQualityArt = {
|
|
65
|
+
name: 'air-quality',
|
|
66
|
+
parts: [
|
|
67
|
+
{
|
|
68
|
+
name: 'skyline',
|
|
69
|
+
paths: ['M2.6 21.2H14.6V15H11.6V17.4H9V13.6H5.8V16.6H2.6Z'],
|
|
70
|
+
poses: [{}, {}, {}],
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
// The index reading: fills with the concentration. flex = distance below full.
|
|
74
|
+
name: 'index-level',
|
|
75
|
+
paths: [level(levelTop[2])],
|
|
76
|
+
pathOffsets: [[0, 1, 0, 0, 0]],
|
|
77
|
+
fillOnly: 'ink',
|
|
78
|
+
accent: true,
|
|
79
|
+
poses: levelTop.map((top) => ({ flex: +(top - levelTop[2]).toFixed(2) })),
|
|
80
|
+
// Offsets point the same way from either neighbour, so the level never reverses.
|
|
81
|
+
gestures: [ease(-STEP), null, ease(STEP)],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: 'index-column',
|
|
85
|
+
paths: [
|
|
86
|
+
'M19.3 3A1.7 1.7 0 0 1 21 4.7V19.5A1.7 1.7 0 0 1 17.6 19.5V4.7A1.7 1.7 0 0 1 19.3 3Z',
|
|
87
|
+
],
|
|
88
|
+
poses: [{}, {}, {}],
|
|
89
|
+
},
|
|
90
|
+
...particles.map((_, i) => particle(i)),
|
|
91
|
+
],
|
|
92
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StatefulIconProps } from "../../shared/icon-types.js";
|
|
2
|
+
import { type AstrolabeState } from "./astrolabe-rig.js";
|
|
3
|
+
export { astrolabeStates, type AstrolabeState } from "./astrolabe-rig.js";
|
|
4
|
+
export type AstrolabeIconProps = StatefulIconProps<AstrolabeState>;
|
|
5
|
+
export declare const AstrolabeIcon: import("react").NamedExoticComponent<AstrolabeIconProps>;
|
|
@@ -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 { astrolabeArt, astrolabeStates } from "./astrolabe-rig.js";
|
|
6
|
+
export { astrolabeStates } from "./astrolabe-rig.js";
|
|
7
|
+
export const AstrolabeIcon = memo(function AstrolabeIcon(props) {
|
|
8
|
+
return _jsx(ArticulatedIcon, { art: astrolabeArt, states: astrolabeStates, ...props });
|
|
9
|
+
});
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A planispheric astrolabe hung from its suspension ring and throne. The rete (the pierced
|
|
3
|
+
* star map: an off-centre ecliptic ring with flame-shaped star pointers) lies over the plate;
|
|
4
|
+
* the alidade, a pointed full-diameter sighting rule, turns on the central pin. Sighting,
|
|
5
|
+
* the alidade is turned onto a star in the sky; reckoning, the rete is turned until that
|
|
6
|
+
* star's pointer lies under the alidade, which sets the sky model and reads the time.
|
|
7
|
+
*/
|
|
8
|
+
export declare const astrolabeStates: readonly ["hanging", "sighting", "reckoned"];
|
|
9
|
+
export type AstrolabeState = (typeof astrolabeStates)[number];
|
|
10
|
+
export declare const astrolabeArt: {
|
|
11
|
+
name: string;
|
|
12
|
+
parts: ({
|
|
13
|
+
name: string;
|
|
14
|
+
paths: string[];
|
|
15
|
+
poses: {}[];
|
|
16
|
+
fillOnly?: undefined;
|
|
17
|
+
detail?: undefined;
|
|
18
|
+
pivot?: undefined;
|
|
19
|
+
gestures?: undefined;
|
|
20
|
+
accent?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
name: string;
|
|
23
|
+
paths: string[];
|
|
24
|
+
fillOnly: "ink";
|
|
25
|
+
poses: {}[];
|
|
26
|
+
detail?: undefined;
|
|
27
|
+
pivot?: undefined;
|
|
28
|
+
gestures?: undefined;
|
|
29
|
+
accent?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
name: string;
|
|
32
|
+
paths: string[];
|
|
33
|
+
detail: true;
|
|
34
|
+
pivot: readonly [number, number];
|
|
35
|
+
poses: ({
|
|
36
|
+
angle?: undefined;
|
|
37
|
+
} | {
|
|
38
|
+
angle: number;
|
|
39
|
+
})[];
|
|
40
|
+
gestures: ({
|
|
41
|
+
duration: number;
|
|
42
|
+
repeatAfter: number;
|
|
43
|
+
loop: boolean;
|
|
44
|
+
frames: ({
|
|
45
|
+
at: number;
|
|
46
|
+
angle: number;
|
|
47
|
+
} | {
|
|
48
|
+
at: number;
|
|
49
|
+
angle?: undefined;
|
|
50
|
+
})[];
|
|
51
|
+
} | null)[];
|
|
52
|
+
fillOnly?: undefined;
|
|
53
|
+
accent?: undefined;
|
|
54
|
+
} | {
|
|
55
|
+
name: string;
|
|
56
|
+
paths: string[];
|
|
57
|
+
fillOnly: "ink";
|
|
58
|
+
pivot: readonly [number, number];
|
|
59
|
+
poses: ({
|
|
60
|
+
angle?: undefined;
|
|
61
|
+
} | {
|
|
62
|
+
angle: number;
|
|
63
|
+
})[];
|
|
64
|
+
gestures: ({
|
|
65
|
+
duration: number;
|
|
66
|
+
repeatAfter: number;
|
|
67
|
+
loop: boolean;
|
|
68
|
+
frames: ({
|
|
69
|
+
at: number;
|
|
70
|
+
angle: number;
|
|
71
|
+
} | {
|
|
72
|
+
at: number;
|
|
73
|
+
angle?: undefined;
|
|
74
|
+
})[];
|
|
75
|
+
} | null)[];
|
|
76
|
+
detail?: undefined;
|
|
77
|
+
accent?: undefined;
|
|
78
|
+
} | {
|
|
79
|
+
name: string;
|
|
80
|
+
paths: string[];
|
|
81
|
+
fillOnly: "ink";
|
|
82
|
+
accent: true;
|
|
83
|
+
pivot: readonly [number, number];
|
|
84
|
+
poses: ({
|
|
85
|
+
angle?: undefined;
|
|
86
|
+
} | {
|
|
87
|
+
angle: number;
|
|
88
|
+
})[];
|
|
89
|
+
gestures: ({
|
|
90
|
+
duration: number;
|
|
91
|
+
repeatAfter: number;
|
|
92
|
+
loop: boolean;
|
|
93
|
+
frames: ({
|
|
94
|
+
at: number;
|
|
95
|
+
angle: number;
|
|
96
|
+
} | {
|
|
97
|
+
at: number;
|
|
98
|
+
angle?: undefined;
|
|
99
|
+
})[];
|
|
100
|
+
} | null)[];
|
|
101
|
+
detail?: undefined;
|
|
102
|
+
} | {
|
|
103
|
+
name: string;
|
|
104
|
+
paths: string[];
|
|
105
|
+
fillOnly: "ink";
|
|
106
|
+
pivot: readonly [number, number];
|
|
107
|
+
poses: ({
|
|
108
|
+
angle?: undefined;
|
|
109
|
+
} | {
|
|
110
|
+
angle: number;
|
|
111
|
+
})[];
|
|
112
|
+
detail?: undefined;
|
|
113
|
+
gestures?: undefined;
|
|
114
|
+
accent?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
name: string;
|
|
117
|
+
paths: string[];
|
|
118
|
+
fillOnly: "surface";
|
|
119
|
+
poses: {}[];
|
|
120
|
+
detail?: undefined;
|
|
121
|
+
pivot?: undefined;
|
|
122
|
+
gestures?: undefined;
|
|
123
|
+
accent?: undefined;
|
|
124
|
+
} | {
|
|
125
|
+
name: string;
|
|
126
|
+
paths: string[];
|
|
127
|
+
fillOnly: "ink";
|
|
128
|
+
accent: true;
|
|
129
|
+
pivot: [number, number];
|
|
130
|
+
poses: ({
|
|
131
|
+
scaleX: number;
|
|
132
|
+
scaleY: number;
|
|
133
|
+
} | {
|
|
134
|
+
scaleX?: undefined;
|
|
135
|
+
scaleY?: undefined;
|
|
136
|
+
})[];
|
|
137
|
+
detail?: undefined;
|
|
138
|
+
gestures?: undefined;
|
|
139
|
+
})[];
|
|
140
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A planispheric astrolabe hung from its suspension ring and throne. The rete (the pierced
|
|
3
|
+
* star map: an off-centre ecliptic ring with flame-shaped star pointers) lies over the plate;
|
|
4
|
+
* the alidade, a pointed full-diameter sighting rule, turns on the central pin. Sighting,
|
|
5
|
+
* the alidade is turned onto a star in the sky; reckoning, the rete is turned until that
|
|
6
|
+
* star's pointer lies under the alidade, which sets the sky model and reads the time.
|
|
7
|
+
*/
|
|
8
|
+
export const astrolabeStates = ['hanging', 'sighting', 'reckoned'];
|
|
9
|
+
const C = [12, 14];
|
|
10
|
+
const R = 7.2;
|
|
11
|
+
const SIGHT = 38; // the star at (19.4, 3.9) lies on this bearing from the pin
|
|
12
|
+
const STAR_AT = -60; // the sighted star's pointer, before the rete is turned
|
|
13
|
+
const TURN = SIGHT - STAR_AT;
|
|
14
|
+
const ECL_DIR = 0; // direction of the ecliptic ring's centre from the pin
|
|
15
|
+
const ECL_D = 1.4;
|
|
16
|
+
const ECL_R = 3.3;
|
|
17
|
+
const n = (v) => +v.toFixed(2);
|
|
18
|
+
const polar = (deg, r) => {
|
|
19
|
+
const a = (deg * Math.PI) / 180;
|
|
20
|
+
return `${n(C[0] + r * Math.sin(a))} ${n(C[1] - r * Math.cos(a))}`;
|
|
21
|
+
};
|
|
22
|
+
const circle = (cx, cy, r) => `M${n(cx - r)} ${n(cy)}A${r} ${r} 0 1 1 ${n(cx + r)} ${n(cy)}A${r} ${r} 0 1 1 ${n(cx - r)} ${n(cy)}Z`;
|
|
23
|
+
/** A star pointer: a flame rising from the ecliptic ring toward the rim. */
|
|
24
|
+
const flame = (deg, tip, half) => {
|
|
25
|
+
const a = ((deg - ECL_DIR) * Math.PI) / 180;
|
|
26
|
+
const along = Math.cos(a) * ECL_D;
|
|
27
|
+
const base = along + Math.sqrt(ECL_R * ECL_R - (Math.sin(a) * ECL_D) ** 2) - 0.3;
|
|
28
|
+
const spread = (half / base) * (180 / Math.PI);
|
|
29
|
+
return `M${polar(deg - spread, base)}Q${polar(deg - spread * 0.4, (base + tip) / 2)} ${polar(deg, tip)}Q${polar(deg + spread * 0.4, (base + tip) / 2)} ${polar(deg + spread, base)}Z`;
|
|
30
|
+
};
|
|
31
|
+
const a = (ECL_DIR * Math.PI) / 180;
|
|
32
|
+
const ECL_C = [C[0] + ECL_D * Math.sin(a), C[1] - ECL_D * Math.cos(a)];
|
|
33
|
+
/** The alidade drawn upright: a bar with a sighting vane across each end. */
|
|
34
|
+
const alidade = [`M${polar(0, 6.6)}L${polar(90, 1.05)}L${polar(180, 6.6)}L${polar(-90, 1.05)}Z`];
|
|
35
|
+
const turnIn = {
|
|
36
|
+
duration: 1.8,
|
|
37
|
+
repeatAfter: 1.8,
|
|
38
|
+
loop: false,
|
|
39
|
+
frames: [{ at: 0, angle: -TURN }, { at: 0.12, angle: -TURN }, { at: 1 }],
|
|
40
|
+
};
|
|
41
|
+
const rete = [{}, {}, { angle: TURN }];
|
|
42
|
+
export const astrolabeArt = {
|
|
43
|
+
name: 'astrolabe',
|
|
44
|
+
parts: [
|
|
45
|
+
{
|
|
46
|
+
// Suspension ring, hung from the shackle at the top of the throne.
|
|
47
|
+
name: 'ring',
|
|
48
|
+
paths: [circle(12, 2.35, 1.25)],
|
|
49
|
+
poses: [{}, {}, {}],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
// The throne: the solid lug rising from the rim.
|
|
53
|
+
name: 'throne',
|
|
54
|
+
paths: [
|
|
55
|
+
'M6.6 9.2C7.4 7.4 9.2 6.4 10.2 5C10.5 4.6 10.6 4.1 10.6 3.6H13.4C13.4 4.1 13.5 4.6 13.8 5C14.8 6.4 16.6 7.4 17.4 9.2Q12 4.4 6.6 9.2Z',
|
|
56
|
+
],
|
|
57
|
+
fillOnly: 'ink',
|
|
58
|
+
poses: [{}, {}, {}],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
// The mater: the raised rim holding the plate.
|
|
62
|
+
name: 'mater',
|
|
63
|
+
paths: [circle(C[0], C[1], R)],
|
|
64
|
+
poses: [{}, {}, {}],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
// The rete's ecliptic ring, off-centre on the pin.
|
|
68
|
+
name: 'ecliptic',
|
|
69
|
+
paths: [circle(ECL_C[0], ECL_C[1], ECL_R)],
|
|
70
|
+
detail: true,
|
|
71
|
+
pivot: C,
|
|
72
|
+
poses: rete,
|
|
73
|
+
gestures: [null, null, turnIn],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'pointers',
|
|
77
|
+
paths: [flame(180, 5.8, 1.05)],
|
|
78
|
+
fillOnly: 'ink',
|
|
79
|
+
pivot: C,
|
|
80
|
+
poses: rete,
|
|
81
|
+
gestures: [null, null, turnIn],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
// The sighted star's pointer on the rete (accent); it comes to lie under the alidade.
|
|
85
|
+
name: 'star-pointer',
|
|
86
|
+
paths: [flame(STAR_AT, 5.8, 1.3)],
|
|
87
|
+
fillOnly: 'ink',
|
|
88
|
+
accent: true,
|
|
89
|
+
pivot: C,
|
|
90
|
+
poses: rete,
|
|
91
|
+
gestures: [null, null, turnIn],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
// The alidade: the sighting rule across the face, turning on the pin.
|
|
95
|
+
name: 'alidade',
|
|
96
|
+
paths: alidade,
|
|
97
|
+
fillOnly: 'ink',
|
|
98
|
+
pivot: C,
|
|
99
|
+
poses: [{}, { angle: SIGHT }, { angle: SIGHT }],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'pin',
|
|
103
|
+
paths: [circle(C[0], C[1], 0.5)],
|
|
104
|
+
fillOnly: 'surface',
|
|
105
|
+
poses: [{}, {}, {}],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
// The star in the sky, on the alidade's line of sight.
|
|
109
|
+
name: 'star',
|
|
110
|
+
paths: ['M19.4 1.6Q19.8 3.5 21.7 3.9Q19.8 4.3 19.4 6.2Q19 4.3 17.1 3.9Q19 3.5 19.4 1.6Z'],
|
|
111
|
+
fillOnly: 'ink',
|
|
112
|
+
accent: true,
|
|
113
|
+
pivot: [19.4, 3.9],
|
|
114
|
+
poses: [{ scaleX: 0, scaleY: 0 }, {}, {}],
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StatefulIconProps } from "../../shared/icon-types.js";
|
|
2
|
+
import { type AuroraState } from "./aurora-rig.js";
|
|
3
|
+
export { auroraStates, type AuroraState } from "./aurora-rig.js";
|
|
4
|
+
export type AuroraIconProps = StatefulIconProps<AuroraState>;
|
|
5
|
+
export declare const AuroraIcon: import("react").NamedExoticComponent<AuroraIconProps>;
|
|
@@ -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 { auroraArt, auroraStates } from "./aurora-rig.js";
|
|
6
|
+
export { auroraStates } from "./aurora-rig.js";
|
|
7
|
+
export const AuroraIcon = memo(function AuroraIcon(props) {
|
|
8
|
+
return _jsx(ArticulatedIcon, { art: auroraArt, states: auroraStates, ...props });
|
|
9
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An auroral curtain above the curve of the Earth. Solar-wind electrons funnelled down the
|
|
3
|
+
* magnetic field lines strike the upper atmosphere and make it glow: the curtain has a sharp,
|
|
4
|
+
* folded lower border and rays that rise along the near-vertical field lines. A quiet arc is a
|
|
5
|
+
* low, smooth band; as geomagnetic activity rises the border folds and the rays lengthen; in a
|
|
6
|
+
* storm the curtain towers and pushes further toward the equator (lower in the sky here).
|
|
7
|
+
*/
|
|
8
|
+
export declare const auroraStates: readonly ["quiet", "active", "storm"];
|
|
9
|
+
export type AuroraState = (typeof auroraStates)[number];
|
|
10
|
+
export declare const auroraArt: {
|
|
11
|
+
name: string;
|
|
12
|
+
parts: ({
|
|
13
|
+
name: string;
|
|
14
|
+
paths: string[];
|
|
15
|
+
poses: {}[];
|
|
16
|
+
pathStates?: undefined;
|
|
17
|
+
pathOffsets?: undefined;
|
|
18
|
+
fillOnly?: undefined;
|
|
19
|
+
accent?: undefined;
|
|
20
|
+
gestures?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
name: string;
|
|
23
|
+
paths: string[];
|
|
24
|
+
pathStates: string[][];
|
|
25
|
+
pathOffsets: number[][];
|
|
26
|
+
fillOnly: "ink";
|
|
27
|
+
accent: true;
|
|
28
|
+
poses: {
|
|
29
|
+
opacity: number;
|
|
30
|
+
}[];
|
|
31
|
+
gestures: ({
|
|
32
|
+
duration: number;
|
|
33
|
+
repeatAfter: number;
|
|
34
|
+
interpolation: "continuous";
|
|
35
|
+
frames: ({
|
|
36
|
+
at: number;
|
|
37
|
+
flex?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
at: number;
|
|
40
|
+
flex: number;
|
|
41
|
+
})[];
|
|
42
|
+
} | null)[];
|
|
43
|
+
} | {
|
|
44
|
+
name: string;
|
|
45
|
+
paths: string[];
|
|
46
|
+
pathStates: string[][];
|
|
47
|
+
pathOffsets: number[][];
|
|
48
|
+
accent: true;
|
|
49
|
+
poses: {}[];
|
|
50
|
+
gestures: ({
|
|
51
|
+
duration: number;
|
|
52
|
+
repeatAfter: number;
|
|
53
|
+
interpolation: "continuous";
|
|
54
|
+
frames: ({
|
|
55
|
+
at: number;
|
|
56
|
+
flex?: undefined;
|
|
57
|
+
} | {
|
|
58
|
+
at: number;
|
|
59
|
+
flex: number;
|
|
60
|
+
})[];
|
|
61
|
+
} | null)[];
|
|
62
|
+
fillOnly?: undefined;
|
|
63
|
+
})[];
|
|
64
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An auroral curtain above the curve of the Earth. Solar-wind electrons funnelled down the
|
|
3
|
+
* magnetic field lines strike the upper atmosphere and make it glow: the curtain has a sharp,
|
|
4
|
+
* folded lower border and rays that rise along the near-vertical field lines. A quiet arc is a
|
|
5
|
+
* low, smooth band; as geomagnetic activity rises the border folds and the rays lengthen; in a
|
|
6
|
+
* storm the curtain towers and pushes further toward the equator (lower in the sky here).
|
|
7
|
+
*/
|
|
8
|
+
export const auroraStates = ['quiet', 'active', 'storm'];
|
|
9
|
+
const n = (v) => +v.toFixed(3);
|
|
10
|
+
// Border anchors; the five rays stand on the inner anchors.
|
|
11
|
+
const XS = [2.6, 4.4, 8.2, 12, 15.8, 19.6, 21.4];
|
|
12
|
+
/** Catmull-Rom segment i of the border, as a cubic Bézier tail (control, control, end). */
|
|
13
|
+
function segment(ys, i) {
|
|
14
|
+
const p = XS.map((x, k) => [x, ys[k]]);
|
|
15
|
+
const a = p[Math.max(0, i - 1)], b = p[i], c = p[i + 1], e = p[Math.min(p.length - 1, i + 2)];
|
|
16
|
+
return (`C${n(b[0] + (c[0] - a[0]) / 6)} ${n(b[1] + (c[1] - a[1]) / 6)} ` +
|
|
17
|
+
`${n(c[0] - (e[0] - b[0]) / 6)} ${n(c[1] - (e[1] - b[1]) / 6)} ${n(c[0])} ${n(c[1])}`);
|
|
18
|
+
}
|
|
19
|
+
/** Smooth lower border through the anchors, plus the vertical rays standing on it. */
|
|
20
|
+
function curtain(ys, lengths) {
|
|
21
|
+
let d = `M${n(XS[0])} ${n(ys[0])}`;
|
|
22
|
+
for (let i = 0; i < XS.length - 1; i++)
|
|
23
|
+
d += segment(ys, i);
|
|
24
|
+
const rays = lengths.map((length, i) => {
|
|
25
|
+
const x = XS[i + 1], y = ys[i + 1];
|
|
26
|
+
return `M${n(x)} ${n(y)}L${n(x)} ${n(y - length)}`;
|
|
27
|
+
});
|
|
28
|
+
return [d, ...rays];
|
|
29
|
+
}
|
|
30
|
+
/** The glowing sheet between the border and the ray tops, from the first ray to the last. */
|
|
31
|
+
function sheet(ys, lengths) {
|
|
32
|
+
let d = `M${n(XS[1])} ${n(ys[1])}`;
|
|
33
|
+
for (let i = 1; i < XS.length - 2; i++)
|
|
34
|
+
d += segment(ys, i);
|
|
35
|
+
for (let i = lengths.length - 1; i >= 0; i--)
|
|
36
|
+
d += `L${n(XS[i + 1])} ${n(ys[i + 1] - lengths[i])}`;
|
|
37
|
+
return [d + 'Z'];
|
|
38
|
+
}
|
|
39
|
+
const NUMBER = /[-+]?(?:\d*\.\d+|\d+\.?\d*)/g;
|
|
40
|
+
const values = (d) => (d.match(NUMBER) ?? []).map(Number);
|
|
41
|
+
/** Flex offsets: the difference between a displaced drawing and the accepted one. */
|
|
42
|
+
const offsets = (base, moved) => base.map((d, i) => values(moved[i]).map((v, k) => n(v - values(d)[k])));
|
|
43
|
+
/** The lower border is a fold wave whose period does not match the ray spacing. */
|
|
44
|
+
// The border's free ends lift slightly toward the sheet, so they never hook downward.
|
|
45
|
+
const wave = (base, amp) => {
|
|
46
|
+
const ys = XS.map((x) => n(base + amp * Math.sin(((x - 2.6) / 9.4) * 2 * Math.PI)));
|
|
47
|
+
ys[0] = n(ys[1] - 0.7);
|
|
48
|
+
ys[ys.length - 1] = n(ys[ys.length - 2] - 0.7);
|
|
49
|
+
return ys;
|
|
50
|
+
};
|
|
51
|
+
const QUIET_Y = wave(15, 0.35);
|
|
52
|
+
const QUIET_L = [2.2, 3, 3.6, 3, 2.4];
|
|
53
|
+
const ACTIVE_Y = wave(15, 1.5);
|
|
54
|
+
const ACTIVE_L = [5, 7.2, 8.6, 7.6, 5.6];
|
|
55
|
+
const STORM_Y = wave(16, 2);
|
|
56
|
+
const STORM_L = [8.8, 11.4, 12.6, 11.6, 9.4];
|
|
57
|
+
// The folds travel sideways: a quarter-period phase component, added and removed.
|
|
58
|
+
const SWAY = XS.map((x, i) => i === 0 || i === XS.length - 1 ? 0 : n(1.1 * Math.cos(((x - 2.6) / 9.4) * 2 * Math.PI)));
|
|
59
|
+
const shifted = (ys) => ys.map((y, i) => y + SWAY[i]);
|
|
60
|
+
const quietSheet = sheet(QUIET_Y, QUIET_L);
|
|
61
|
+
const activeSheet = sheet(ACTIVE_Y, ACTIVE_L);
|
|
62
|
+
const stormSheet = sheet(STORM_Y, STORM_L);
|
|
63
|
+
const quiet = curtain(QUIET_Y, QUIET_L);
|
|
64
|
+
const active = curtain(ACTIVE_Y, ACTIVE_L);
|
|
65
|
+
const storm = curtain(STORM_Y, STORM_L);
|
|
66
|
+
const ripple = (duration) => ({
|
|
67
|
+
duration,
|
|
68
|
+
repeatAfter: duration + 0.8,
|
|
69
|
+
interpolation: 'continuous',
|
|
70
|
+
frames: [{ at: 0 }, { at: 0.25, flex: 1 }, { at: 0.75, flex: -1 }, { at: 1 }],
|
|
71
|
+
});
|
|
72
|
+
export const auroraArt = {
|
|
73
|
+
name: 'aurora',
|
|
74
|
+
parts: [
|
|
75
|
+
{
|
|
76
|
+
// The Earth's curved limb under the polar sky.
|
|
77
|
+
name: 'limb',
|
|
78
|
+
paths: ['M2.6 21.6C8 19.9 16 19.9 21.4 21.6'],
|
|
79
|
+
poses: [{}, {}, {}],
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
// Translucent glow of the curtain: excited oxygen fills the sheet between the rays.
|
|
83
|
+
name: 'glow',
|
|
84
|
+
paths: quietSheet,
|
|
85
|
+
pathStates: [quietSheet, activeSheet, stormSheet],
|
|
86
|
+
pathOffsets: offsets(activeSheet, sheet(shifted(ACTIVE_Y), ACTIVE_L)),
|
|
87
|
+
fillOnly: 'ink',
|
|
88
|
+
accent: true,
|
|
89
|
+
poses: [{ opacity: 0.28 }, { opacity: 0.28 }, { opacity: 0.28 }],
|
|
90
|
+
gestures: [null, ripple(3.2), ripple(2.6)],
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'curtain',
|
|
94
|
+
paths: quiet,
|
|
95
|
+
pathStates: [quiet, active, storm],
|
|
96
|
+
pathOffsets: offsets(active, curtain(shifted(ACTIVE_Y), ACTIVE_L)),
|
|
97
|
+
accent: true,
|
|
98
|
+
poses: [{}, {}, {}],
|
|
99
|
+
gestures: [null, ripple(3.2), ripple(2.6)],
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { StatefulIconProps } from "../../shared/icon-types.js";
|
|
2
|
+
import { type BrainComputerInterfaceState } from "./brain-computer-interface-rig.js";
|
|
3
|
+
export { brainComputerInterfaceStates, type BrainComputerInterfaceState, } from "./brain-computer-interface-rig.js";
|
|
4
|
+
export type BrainComputerInterfaceIconProps = StatefulIconProps<BrainComputerInterfaceState>;
|
|
5
|
+
export declare const BrainComputerInterfaceIcon: import("react").NamedExoticComponent<BrainComputerInterfaceIconProps>;
|
|
@@ -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 { brainComputerInterfaceArt, brainComputerInterfaceStates, } from "./brain-computer-interface-rig.js";
|
|
6
|
+
export { brainComputerInterfaceStates, } from "./brain-computer-interface-rig.js";
|
|
7
|
+
export const BrainComputerInterfaceIcon = memo(function BrainComputerInterfaceIcon(props) {
|
|
8
|
+
return (_jsx(ArticulatedIcon, { art: brainComputerInterfaceArt, states: brainComputerInterfaceStates, ...props }));
|
|
9
|
+
});
|