@epam/ai-dial-celebrations 1.2.0-dev.170
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/CelebrationEnvironmentContext-BxzY78Zg.js +14 -0
- package/components/CelebrationDecor/CelebrationDecor.d.ts +3 -0
- package/components/CelebrationDecor/CelebrationDecor.d.ts.map +1 -0
- package/components/FlyingCharacters/FlyingCharacters.d.ts +8 -0
- package/components/FlyingCharacters/FlyingCharacters.d.ts.map +1 -0
- package/constants/public-class-names.d.ts +10 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/context/CelebrationContext.d.ts +7 -0
- package/context/CelebrationContext.d.ts.map +1 -0
- package/context/CelebrationEnvironmentContext.d.ts +19 -0
- package/context/CelebrationEnvironmentContext.d.ts.map +1 -0
- package/flying-characters-2UJGx5Nh.js +36 -0
- package/halloween/components/Halloween/HalloweenBat.d.ts +6 -0
- package/halloween/components/Halloween/HalloweenBat.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenBats.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenBats.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenBowling.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenBowling.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenBurstOverlay.d.ts +10 -0
- package/halloween/components/Halloween/HalloweenBurstOverlay.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenCandy.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenCandy.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenCandyArt.d.ts +13 -0
- package/halloween/components/Halloween/HalloweenCandyArt.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenCat.d.ts +3 -0
- package/halloween/components/Halloween/HalloweenCat.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenCatScene.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenCatScene.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenCornerSpider.d.ts +12 -0
- package/halloween/components/Halloween/HalloweenCornerSpider.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenDecor.d.ts +4 -0
- package/halloween/components/Halloween/HalloweenDecor.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenExtras.d.ts +4 -0
- package/halloween/components/Halloween/HalloweenExtras.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenFootprints.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenFootprints.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenGhost.d.ts +10 -0
- package/halloween/components/Halloween/HalloweenGhost.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenGhosts.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenGhosts.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenMimic.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenMimic.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenMummy.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenMummy.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenNightFlight.d.ts +3 -0
- package/halloween/components/Halloween/HalloweenNightFlight.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenPortal.d.ts +3 -0
- package/halloween/components/Halloween/HalloweenPortal.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenPumpkin.d.ts +3 -0
- package/halloween/components/Halloween/HalloweenPumpkin.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenPumpkinSilk.d.ts +8 -0
- package/halloween/components/Halloween/HalloweenPumpkinSilk.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenRaven.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenRaven.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenRavens.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenRavens.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenSecrets.d.ts +4 -0
- package/halloween/components/Halloween/HalloweenSecrets.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenSpider.d.ts +7 -0
- package/halloween/components/Halloween/HalloweenSpider.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenSpiderTheft.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenSpiderTheft.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenTrain.d.ts +9 -0
- package/halloween/components/Halloween/HalloweenTrain.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenTrainArtwork.d.ts +7 -0
- package/halloween/components/Halloween/HalloweenTrainArtwork.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenWebScene.d.ts +3 -0
- package/halloween/components/Halloween/HalloweenWebScene.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenWitch.d.ts +11 -0
- package/halloween/components/Halloween/HalloweenWitch.d.ts.map +1 -0
- package/halloween/components/Halloween/HalloweenWitches.d.ts +5 -0
- package/halloween/components/Halloween/HalloweenWitches.d.ts.map +1 -0
- package/halloween/constants/halloween.d.ts +76 -0
- package/halloween/constants/halloween.d.ts.map +1 -0
- package/halloween/constants/labels.d.ts +4 -0
- package/halloween/constants/labels.d.ts.map +1 -0
- package/halloween/event.d.ts +11 -0
- package/halloween/event.d.ts.map +1 -0
- package/halloween/index.d.ts +8 -0
- package/halloween/index.d.ts.map +1 -0
- package/halloween/models/labels.d.ts +40 -0
- package/halloween/models/labels.d.ts.map +1 -0
- package/halloween/types/halloween.d.ts +65 -0
- package/halloween/types/halloween.d.ts.map +1 -0
- package/halloween/utils/halloween-bat-animation.d.ts +10 -0
- package/halloween/utils/halloween-bat-animation.d.ts.map +1 -0
- package/halloween/utils/halloween-bat-plan.d.ts +53 -0
- package/halloween/utils/halloween-bat-plan.d.ts.map +1 -0
- package/halloween/utils/halloween-bat-targets.d.ts +13 -0
- package/halloween/utils/halloween-bat-targets.d.ts.map +1 -0
- package/halloween/utils/halloween-bowling.d.ts +24 -0
- package/halloween/utils/halloween-bowling.d.ts.map +1 -0
- package/halloween/utils/halloween-candy-animation.d.ts +4 -0
- package/halloween/utils/halloween-candy-animation.d.ts.map +1 -0
- package/halloween/utils/halloween-candy-plan.d.ts +68 -0
- package/halloween/utils/halloween-candy-plan.d.ts.map +1 -0
- package/halloween/utils/halloween-candy-targets.d.ts +12 -0
- package/halloween/utils/halloween-candy-targets.d.ts.map +1 -0
- package/halloween/utils/halloween-cat-animation.d.ts +11 -0
- package/halloween/utils/halloween-cat-animation.d.ts.map +1 -0
- package/halloween/utils/halloween-cat-plan.d.ts +69 -0
- package/halloween/utils/halloween-cat-plan.d.ts.map +1 -0
- package/halloween/utils/halloween-cat-targets.d.ts +13 -0
- package/halloween/utils/halloween-cat-targets.d.ts.map +1 -0
- package/halloween/utils/halloween-footprint-animation.d.ts +12 -0
- package/halloween/utils/halloween-footprint-animation.d.ts.map +1 -0
- package/halloween/utils/halloween-footprint-plan.d.ts +52 -0
- package/halloween/utils/halloween-footprint-plan.d.ts.map +1 -0
- package/halloween/utils/halloween-footprint-targets.d.ts +22 -0
- package/halloween/utils/halloween-footprint-targets.d.ts.map +1 -0
- package/halloween/utils/halloween-ghost-animation.d.ts +12 -0
- package/halloween/utils/halloween-ghost-animation.d.ts.map +1 -0
- package/halloween/utils/halloween-ghost-plan.d.ts +41 -0
- package/halloween/utils/halloween-ghost-plan.d.ts.map +1 -0
- package/halloween/utils/halloween-ghost-targets.d.ts +12 -0
- package/halloween/utils/halloween-ghost-targets.d.ts.map +1 -0
- package/halloween/utils/halloween-mimic.d.ts +21 -0
- package/halloween/utils/halloween-mimic.d.ts.map +1 -0
- package/halloween/utils/halloween-mummy.d.ts +17 -0
- package/halloween/utils/halloween-mummy.d.ts.map +1 -0
- package/halloween/utils/halloween-portal.d.ts +22 -0
- package/halloween/utils/halloween-portal.d.ts.map +1 -0
- package/halloween/utils/halloween-raven-animation.d.ts +19 -0
- package/halloween/utils/halloween-raven-animation.d.ts.map +1 -0
- package/halloween/utils/halloween-raven-plan.d.ts +68 -0
- package/halloween/utils/halloween-raven-plan.d.ts.map +1 -0
- package/halloween/utils/halloween-raven-targets.d.ts +24 -0
- package/halloween/utils/halloween-raven-targets.d.ts.map +1 -0
- package/halloween/utils/halloween-secret-history.d.ts +8 -0
- package/halloween/utils/halloween-secret-history.d.ts.map +1 -0
- package/halloween/utils/halloween-spider-theft.d.ts +25 -0
- package/halloween/utils/halloween-spider-theft.d.ts.map +1 -0
- package/halloween/utils/halloween-spider-wrap.d.ts +78 -0
- package/halloween/utils/halloween-spider-wrap.d.ts.map +1 -0
- package/halloween/utils/halloween-train.d.ts +29 -0
- package/halloween/utils/halloween-train.d.ts.map +1 -0
- package/halloween/utils/halloween-web-animation.d.ts +10 -0
- package/halloween/utils/halloween-web-animation.d.ts.map +1 -0
- package/halloween/utils/halloween-web-plan.d.ts +46 -0
- package/halloween/utils/halloween-web-plan.d.ts.map +1 -0
- package/halloween/utils/halloween-web-targets.d.ts +10 -0
- package/halloween/utils/halloween-web-targets.d.ts.map +1 -0
- package/halloween/utils/halloween-witch-animation.d.ts +12 -0
- package/halloween/utils/halloween-witch-animation.d.ts.map +1 -0
- package/halloween/utils/halloween-witch-plan.d.ts +69 -0
- package/halloween/utils/halloween-witch-plan.d.ts.map +1 -0
- package/halloween/utils/halloween-witch-targets.d.ts +20 -0
- package/halloween/utils/halloween-witch-targets.d.ts.map +1 -0
- package/halloween/utils/halloween.d.ts +101 -0
- package/halloween/utils/halloween.d.ts.map +1 -0
- package/halloween.js +11671 -0
- package/hooks/useReducedMotion.d.ts +3 -0
- package/hooks/useReducedMotion.d.ts.map +1 -0
- package/index.css +2 -0
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -0
- package/index.js +146 -0
- package/models/celebration.d.ts +123 -0
- package/models/celebration.d.ts.map +1 -0
- package/new-year/components/NewYear/NewYearDecor.d.ts +4 -0
- package/new-year/components/NewYear/NewYearDecor.d.ts.map +1 -0
- package/new-year/components/NewYear/NewYearParticles.d.ts +10 -0
- package/new-year/components/NewYear/NewYearParticles.d.ts.map +1 -0
- package/new-year/components/NewYear/NewYearSleigh.d.ts +3 -0
- package/new-year/components/NewYear/NewYearSleigh.d.ts.map +1 -0
- package/new-year/components/NewYear/particles.d.ts +5 -0
- package/new-year/components/NewYear/particles.d.ts.map +1 -0
- package/new-year/components/NewYear/types.d.ts +10 -0
- package/new-year/components/NewYear/types.d.ts.map +1 -0
- package/new-year/constants/labels.d.ts +4 -0
- package/new-year/constants/labels.d.ts.map +1 -0
- package/new-year/event.d.ts +4 -0
- package/new-year/event.d.ts.map +1 -0
- package/new-year/index.d.ts +7 -0
- package/new-year/index.d.ts.map +1 -0
- package/new-year/models/labels.d.ts +14 -0
- package/new-year/models/labels.d.ts.map +1 -0
- package/new-year.js +382 -0
- package/package.json +43 -0
- package/utils/celebration-history.d.ts +8 -0
- package/utils/celebration-history.d.ts.map +1 -0
- package/utils/celebration-snapshots.d.ts +21 -0
- package/utils/celebration-snapshots.d.ts.map +1 -0
- package/utils/celebration.d.ts +18 -0
- package/utils/celebration.d.ts.map +1 -0
- package/utils/flying-characters.d.ts +11 -0
- package/utils/flying-characters.d.ts.map +1 -0
- package/utils/host-anchors.d.ts +12 -0
- package/utils/host-anchors.d.ts.map +1 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { HalloweenGhostVariant } from '../types/halloween';
|
|
3
|
+
/** One abseiling spider of a `HalloweenScene.Spiders` celebration. */
|
|
4
|
+
export interface HalloweenSpiderDrop {
|
|
5
|
+
/** Custom properties consumed by `.spiderDrop` in `Halloween.module.scss`. */
|
|
6
|
+
style: CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Lays out one drop. Each spider gets its own column, thread length, size,
|
|
10
|
+
* pace, sway and start delay, so they arrive as a scatter rather than a
|
|
11
|
+
* curtain. `--spider-depth` is both the thread's length and the distance the
|
|
12
|
+
* pair travels, which is what keeps the thread anchored to the top edge for
|
|
13
|
+
* the whole descent.
|
|
14
|
+
*
|
|
15
|
+
* Called once per burst rather than per render: the layer re-renders on every
|
|
16
|
+
* ancestor state change, and re-rolling the offsets would restart each
|
|
17
|
+
* spider's descent halfway down.
|
|
18
|
+
*/
|
|
19
|
+
export declare const buildHalloweenSpiderDrop: () => HalloweenSpiderDrop[];
|
|
20
|
+
/** One ghost of a `HalloweenScene.Ghost` celebration, with its flight path. */
|
|
21
|
+
export interface HalloweenGhostFlight {
|
|
22
|
+
variant: HalloweenGhostVariant;
|
|
23
|
+
/** Custom properties consumed by `.ghost` in `Halloween.module.scss`. */
|
|
24
|
+
style: CSSProperties;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Lays out one flock. Every ghost gets its own entry edge, arc, size, tilt and
|
|
28
|
+
* pace, so the flock reads as individuals rather than a row: it enters from
|
|
29
|
+
* off-screen left or right at a random height, curves upward across the
|
|
30
|
+
* viewport, and leaves past the opposite edge.
|
|
31
|
+
*
|
|
32
|
+
* `--ghost-rest-*` is where the ghost sits when animations are suppressed for
|
|
33
|
+
* reduced motion — spread across the viewport instead of stacked at the
|
|
34
|
+
* origin, which is where an un-animated element would otherwise sit.
|
|
35
|
+
*
|
|
36
|
+
* Distances are in `vw`/`vh` so a flight crosses the viewport at any size, and
|
|
37
|
+
* the path is deliberately direction-agnostic (each ghost picks its own side),
|
|
38
|
+
* so nothing here needs to flip under RTL.
|
|
39
|
+
*/
|
|
40
|
+
export declare const buildHalloweenGhostFlight: () => HalloweenGhostFlight[];
|
|
41
|
+
/** A point in viewport pixels. */
|
|
42
|
+
interface Point {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
}
|
|
46
|
+
interface SpiderFleeInput {
|
|
47
|
+
/** Where the spider sits when undisturbed, in viewport pixels. */
|
|
48
|
+
perch: Point;
|
|
49
|
+
/** The pointer, in viewport pixels. */
|
|
50
|
+
pointer: Point;
|
|
51
|
+
/** The spider's current displacement from its perch. */
|
|
52
|
+
offset: Point;
|
|
53
|
+
/** How close the pointer gets before the spider bolts. */
|
|
54
|
+
fleeRadius: number;
|
|
55
|
+
/** How far the spider bolts per nudge. */
|
|
56
|
+
fleeStep: number;
|
|
57
|
+
/** How far the spider may stray from its perch. */
|
|
58
|
+
maxOffset: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The spider's next displacement from its perch, or `null` when the pointer
|
|
62
|
+
* is far enough away that it has no reason to move.
|
|
63
|
+
*
|
|
64
|
+
* It bolts straight along the line away from the pointer, which is what makes
|
|
65
|
+
* a chase work: the cursor pushes and the spider gives ground. Clamping the
|
|
66
|
+
* result to `maxOffset` is a circle, not a box, so a spider herded against
|
|
67
|
+
* the boundary keeps whatever part of the push runs along it and slides round
|
|
68
|
+
* instead of stopping dead. A push aimed exactly at the centre has no such
|
|
69
|
+
* component and does hold it against the leash, which is the one way to
|
|
70
|
+
* corner it.
|
|
71
|
+
*
|
|
72
|
+
* A pointer exactly on the spider has no direction to flee along, so it
|
|
73
|
+
* breaks the tie diagonally rather than dividing by zero.
|
|
74
|
+
*/
|
|
75
|
+
export declare const nextHalloweenSpiderOffset: ({ perch, pointer, offset, fleeRadius, fleeStep, maxOffset, }: SpiderFleeInput) => Point | null;
|
|
76
|
+
/** Where an idle drop has the spider: thread paid out and pendulum angle. */
|
|
77
|
+
export interface HalloweenSpiderDanglePose {
|
|
78
|
+
depth: number;
|
|
79
|
+
angle: number;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The pose `progress` (0–1) of the way through an idle drop: the spider pays
|
|
83
|
+
* out its thread, swings a little as it stops, hangs, and climbs back up.
|
|
84
|
+
* Evaluated rather than read back from the page, so an interrupted drop can
|
|
85
|
+
* reel in from exactly where it is.
|
|
86
|
+
*/
|
|
87
|
+
export declare const getHalloweenSpiderDanglePose: (depth: number, progress: number) => HalloweenSpiderDanglePose;
|
|
88
|
+
/** Pendulum transform: rotate about the anchor, then hang down the thread. */
|
|
89
|
+
export declare const getHalloweenSpiderDangleTransform: ({ depth, angle, }: HalloweenSpiderDanglePose) => string;
|
|
90
|
+
/** Keyframes for the spider and its thread, which share one timeline. */
|
|
91
|
+
export declare const buildHalloweenSpiderDangle: (depth: number) => {
|
|
92
|
+
dangle: Keyframe[];
|
|
93
|
+
thread: Keyframe[];
|
|
94
|
+
};
|
|
95
|
+
/** A random value in a `[min, max)` range tuple. */
|
|
96
|
+
export declare const pickHalloweenRange: ([min, max]: readonly [number, number]) => number;
|
|
97
|
+
export declare const buildHalloweenBatFlight: () => CSSProperties[];
|
|
98
|
+
/** Dim little lights rise from separate columns, leaving the UI readable. */
|
|
99
|
+
export declare const buildHalloweenWisps: () => CSSProperties[];
|
|
100
|
+
export {};
|
|
101
|
+
//# sourceMappingURL=halloween.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"halloween.d.ts","sourceRoot":"","sources":["../../../src/halloween/utils/halloween.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAQ3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAM3D,sEAAsE;AACtE,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,KAAK,EAAE,aAAa,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,QAAO,mBAAmB,EAiB3D,CAAC;AAIL,+EAA+E;AAC/E,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,yEAAyE;IACzE,KAAK,EAAE,aAAa,CAAC;CACtB;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,yBAAyB,QAAO,oBAAoB,EAoC7D,CAAC;AAEL,kCAAkC;AAClC,UAAU,KAAK;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,UAAU,eAAe;IACvB,kEAAkE;IAClE,KAAK,EAAE,KAAK,CAAC;IACb,uCAAuC;IACvC,OAAO,EAAE,KAAK,CAAC;IACf,wDAAwD;IACxD,MAAM,EAAE,KAAK,CAAC;IACd,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,GAAI,8DAOvC,eAAe,KAAG,KAAK,GAAG,IAoB5B,CAAC;AAEF,6EAA6E;AAC7E,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAOD;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,GACvC,OAAO,MAAM,EACb,UAAU,MAAM,KACf,yBASF,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,iCAAiC,GAAI,mBAG/C,yBAAyB,KAAG,MACqC,CAAC;AAErE,yEAAyE;AACzE,eAAO,MAAM,0BAA0B,GACrC,OAAO,MAAM,KACZ;IAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IAAC,MAAM,EAAE,QAAQ,EAAE,CAAA;CAgB1C,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,kBAAkB,GAAI,YAAY,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,WACrD,CAAC;AAEpB,eAAO,MAAM,uBAAuB,QAAO,aAAa,EAYrD,CAAC;AAEJ,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,QAAO,aAAa,EAWjD,CAAC"}
|