@epam/ai-dial-celebrations 1.3.0-dev.234 → 1.3.0-dev.241

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 (37) hide show
  1. package/halloween.js +3158 -3333
  2. package/index.css +1 -1
  3. package/models/lottie-scene.d.ts +7 -0
  4. package/models/lottie-scene.d.ts.map +1 -1
  5. package/new-year/components/NewYear/NewYearSceneOverlay.d.ts.map +1 -1
  6. package/new-year/components/NewYearSnowmanDelivery/NewYearSnowmanDelivery.d.ts +5 -0
  7. package/new-year/components/NewYearSnowmanDelivery/NewYearSnowmanDelivery.d.ts.map +1 -0
  8. package/new-year/components/NewYearSnowmanDelivery/SnowmanDeliveryStill.d.ts +4 -0
  9. package/new-year/components/NewYearSnowmanDelivery/SnowmanDeliveryStill.d.ts.map +1 -0
  10. package/new-year/constants/labels.d.ts +1 -0
  11. package/new-year/constants/labels.d.ts.map +1 -1
  12. package/new-year/constants/new-year.d.ts +2 -2
  13. package/new-year/constants/new-year.d.ts.map +1 -1
  14. package/new-year/event.d.ts.map +1 -1
  15. package/new-year/models/labels.d.ts +2 -0
  16. package/new-year/models/labels.d.ts.map +1 -1
  17. package/new-year/types/new-year.d.ts +16 -1
  18. package/new-year/types/new-year.d.ts.map +1 -1
  19. package/new-year/utils/snowman-delivery-animation.d.ts +7 -0
  20. package/new-year/utils/snowman-delivery-animation.d.ts.map +1 -0
  21. package/new-year/utils/snowman-delivery-art.d.ts +96 -0
  22. package/new-year/utils/snowman-delivery-art.d.ts.map +1 -0
  23. package/new-year/utils/snowman-delivery-card.d.ts +12 -0
  24. package/new-year/utils/snowman-delivery-card.d.ts.map +1 -0
  25. package/new-year/utils/snowman-delivery-composition.d.ts +161 -0
  26. package/new-year/utils/snowman-delivery-composition.d.ts.map +1 -0
  27. package/new-year/utils/snowman-delivery-rig.d.ts +87 -0
  28. package/new-year/utils/snowman-delivery-rig.d.ts.map +1 -0
  29. package/new-year/utils/snowman-delivery-targets.d.ts +65 -0
  30. package/new-year/utils/snowman-delivery-targets.d.ts.map +1 -0
  31. package/new-year/utils/snowman-delivery-timeline.d.ts +47 -0
  32. package/new-year/utils/snowman-delivery-timeline.d.ts.map +1 -0
  33. package/new-year.js +2123 -586
  34. package/package.json +2 -2
  35. package/scene-targets-BgiQPucY.js +184 -0
  36. package/utils/lottie-scene-session.d.ts.map +1 -1
  37. package/useReducedMotion-BWIeAFB_.js +0 -8
@@ -0,0 +1,87 @@
1
+ /** A point in native snowman units or viewport pixels. */
2
+ export type Point = [number, number];
3
+ /**
4
+ * Snowman geometry in native units shared by the artwork, the composition
5
+ * and the card track. The ground is y = 0, y grows downward and the snowman
6
+ * faces +x; the scene mirrors x for travel toward −x.
7
+ */
8
+ export declare const SNOWMAN_RIG: {
9
+ readonly footBack: Point;
10
+ readonly footFront: Point;
11
+ readonly footRadius: Point;
12
+ readonly bottomBall: {
13
+ readonly center: Point;
14
+ readonly radius: 28;
15
+ };
16
+ readonly middleBall: {
17
+ readonly center: Point;
18
+ readonly radius: 20;
19
+ };
20
+ readonly neck: Point;
21
+ /** Head centre relative to the neck socket. */
22
+ readonly headOffset: Point;
23
+ readonly headRadius: 15;
24
+ /** Carrot base and tip relative to the head centre. */
25
+ readonly carrotBase: Point;
26
+ readonly carrotTip: Point;
27
+ readonly shoulderFront: Point;
28
+ readonly shoulderBack: Point;
29
+ readonly upperArm: 26;
30
+ readonly lowerArm: 24;
31
+ /** Mitten grip beyond the wrist, along the forearm. */
32
+ readonly gripReach: 5;
33
+ /** Bottom of the lower ball: rests on the seat while sitting. */
34
+ readonly seat: Point;
35
+ /** Highest mitten grip on tiptoe with both arms raised. */
36
+ readonly reach: 128;
37
+ /** Height band the standing cast needs above its floor. */
38
+ readonly castHeight: 150;
39
+ readonly baseWidth: 56;
40
+ /** Width and height of the drawn sled used when no card is borrowed. */
41
+ readonly sledSize: Point;
42
+ };
43
+ /** Scene scale of one native unit, in CSS pixels. */
44
+ export declare const SNOWMAN_SCALE: {
45
+ readonly desktop: 0.9;
46
+ readonly mobile: 0.68;
47
+ };
48
+ /** Elbow bend limits of the stick arms, in degrees. */
49
+ export declare const ELBOW_RANGE: {
50
+ readonly min: 20;
51
+ readonly max: 140;
52
+ };
53
+ /**
54
+ * Sled motion constants shared by staging and choreography: the two pushes
55
+ * cover `pushShare` of the travel, then the sled glides from a small speed
56
+ * with constant acceleration for `glideSeconds` until the snowbank stops it.
57
+ */
58
+ export declare const SNOWMAN_SLIDE: {
59
+ readonly pushShare: 0.1;
60
+ readonly glideSeconds: 2.4;
61
+ readonly startSpeedShare: 0.15;
62
+ };
63
+ /** Bounds of the detached head's flight time, in seconds. */
64
+ export declare const HEAD_FLIGHT: {
65
+ readonly min: 0.35;
66
+ readonly nominal: 0.5;
67
+ readonly max: 0.6;
68
+ };
69
+ /** Sled speed at the snowbank for a travel of `length`. */
70
+ export declare const glideEndSpeed: (length: number) => number;
71
+ /** Position of the glide at `phase` ∈ [0, 1] as a share of its length. */
72
+ export declare const glideProgress: (phase: number) => number;
73
+ /** Elbow and grip of a stick arm whose upper segment points at `upper` degrees and bends by `bend` degrees. */
74
+ export declare const armPose: (shoulder: Point, upper: number, bend: number) => {
75
+ elbow: Point;
76
+ wrist: Point;
77
+ grip: Point;
78
+ };
79
+ /**
80
+ * Upper-arm direction and elbow bend that put the grip on `target`, with
81
+ * the bend clamped to {@link ELBOW_RANGE}; `bendSign` picks the elbow side.
82
+ */
83
+ export declare const reachArm: (shoulder: Point, target: Point, bendSign?: 1 | -1) => {
84
+ upper: number;
85
+ bend: number;
86
+ };
87
+ //# sourceMappingURL=snowman-delivery-rig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snowman-delivery-rig.d.ts","sourceRoot":"","sources":["../../../src/new-year/utils/snowman-delivery-rig.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,MAAM,MAAM,KAAK,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,WAAW;uBACC,KAAK;wBACL,KAAK;yBACN,KAAK;;yBACO,KAAK;;;;yBACL,KAAK;;;mBACrB,KAAK;IACvB,+CAA+C;yBACvB,KAAK;;IAE7B,uDAAuD;yBAC/B,KAAK;wBACP,KAAK;4BACA,KAAK;2BACL,KAAK;;;IAGhC,uDAAuD;;IAEvD,iEAAiE;mBAChD,KAAK;IACtB,2DAA2D;;IAE3D,2DAA2D;;;IAG3D,wEAAwE;uBAClD,KAAK;CACnB,CAAC;AAEX,qDAAqD;AACrD,eAAO,MAAM,aAAa;;;CAA0C,CAAC;AAErE,uDAAuD;AACvD,eAAO,MAAM,WAAW;;;CAAiC,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,6DAA6D;AAC7D,eAAO,MAAM,WAAW;;;;CAAiD,CAAC;AAE1E,2DAA2D;AAC3D,eAAO,MAAM,aAAa,GAAI,QAAQ,MAAM,KAAG,MAM9C,CAAC;AAEF,0EAA0E;AAC1E,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,MAG7C,CAAC;AAKF,+GAA+G;AAC/G,eAAO,MAAM,OAAO,GAClB,UAAU,KAAK,EACf,OAAO,MAAM,EACb,MAAM,MAAM,KACX;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,KAAK,CAAA;CAiB3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,GACnB,UAAU,KAAK,EACf,QAAQ,KAAK,EACb,WAAU,CAAC,GAAG,CAAC,CAAK,KACnB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CA0B/B,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { CelebrationAnchors } from '../../models/celebration';
2
+ import { SnowmanStage } from '../types/new-year';
3
+ /** A live element and its bounds when the scene was prepared. */
4
+ export interface MeasuredElement {
5
+ element: HTMLElement;
6
+ rect: DOMRect;
7
+ }
8
+ /** A horizontal extent in viewport pixels. */
9
+ export interface Bounds {
10
+ left: number;
11
+ right: number;
12
+ }
13
+ /** Measured stage, staging mode and travel geometry of one activation, in viewport pixels. */
14
+ export interface SnowmanDeliveryTargets {
15
+ width: number;
16
+ height: number;
17
+ rtl: boolean;
18
+ mode: SnowmanStage;
19
+ /** CSS pixels per native unit. */
20
+ scale: number;
21
+ /** Viewport x direction of the slide toward the tree. */
22
+ dir: 1 | -1;
23
+ /** Viewport y of the ground the snowman stands on. */
24
+ floor: number;
25
+ /** Viewport x of the edge he enters from and leaves through. */
26
+ startEdge: number;
27
+ /** Where he stands to pick the card up and to set the sled down. */
28
+ stanceX: number;
29
+ /** Sled (card copy or drawn sled) size and its centre when placed. */
30
+ sled: {
31
+ width: number;
32
+ height: number;
33
+ startX: number;
34
+ };
35
+ /** Distance from the sled's front edge back to the seat. */
36
+ seatFromFront: number;
37
+ /** Sled travel from placement to the snowbank, including both pushes. */
38
+ slideLength: number;
39
+ /** Horizontal head flight from the neck at impact to the branch socket, and its duration. */
40
+ headFlight: {
41
+ distance: number;
42
+ seconds: number;
43
+ };
44
+ snowbankX: number;
45
+ /** Lower-branch socket the head lodges in. */
46
+ branchX: number;
47
+ treeX: number;
48
+ /** The borrowed starter card, or `null` for a drawn sled. */
49
+ card: MeasuredElement | null;
50
+ /** Horizontal extent of the welcome region; the scene is clipped to it. */
51
+ bounds: Bounds;
52
+ /** Host elements whose mutation or movement cancels the scene. */
53
+ watched: HTMLElement[];
54
+ }
55
+ /** He stands this far before the card's near edge to grip its bottom edge. */
56
+ export declare const STANCE_TO_CARD = 14;
57
+ /** The sled lands this far ahead of the stance, clear of his belly. */
58
+ export declare const STANCE_TO_SLED = 36;
59
+ /**
60
+ * Measures the host once and picks the first staging mode that fits:
61
+ * a ledge under the starter row, the composer rim with a borrowed card,
62
+ * the rim with a drawn sled, a snowy platform, or the static still.
63
+ */
64
+ export declare const getSnowmanDeliveryTargets: (anchors: CelebrationAnchors, isMobile: boolean) => SnowmanDeliveryTargets;
65
+ //# sourceMappingURL=snowman-delivery-targets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snowman-delivery-targets.d.ts","sourceRoot":"","sources":["../../../src/new-year/utils/snowman-delivery-targets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AASjD,iEAAiE;AACjE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;CACf;AAED,8CAA8C;AAC9C,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,8FAA8F;AAC9F,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,YAAY,CAAC;IACnB,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACZ,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,4DAA4D;IAC5D,aAAa,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,6FAA6F;IAC7F,UAAU,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAeD,8EAA8E;AAC9E,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,uEAAuE;AACvE,eAAO,MAAM,cAAc,KAAK,CAAC;AAoMjC;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GACpC,SAAS,kBAAkB,EAC3B,UAAU,OAAO,KAChB,sBAmNF,CAAC"}
@@ -0,0 +1,47 @@
1
+ /** A keyframed value: a scalar or a point. */
2
+ export type Vec = number[];
3
+ /** Cubic-Bézier timing control points, as in CSS `cubic-bezier()`. */
4
+ export type Bezier = readonly [number, number, number, number];
5
+ /** How a segment eases from one key to the next. */
6
+ export type Ease = 'linear' | 'hold' | Bezier;
7
+ /** Slow-in, slow-out for authored poses. */
8
+ export declare const EASE: Bezier;
9
+ /** Accelerating start, for drops and launches. */
10
+ export declare const EASE_IN: Bezier;
11
+ /** Decelerating finish, for settling. */
12
+ export declare const EASE_OUT: Bezier;
13
+ interface Key {
14
+ t: number;
15
+ v: Vec;
16
+ ease: Ease;
17
+ }
18
+ /** Returns the eased progress of a cubic-Bézier timing curve at `x` ∈ [0, 1]. */
19
+ export declare const bezierProgress: ([x1, y1, x2, y2]: Bezier, x: number) => number;
20
+ /** One keyframed channel; the ease of a key shapes the segment that follows it. */
21
+ export declare class Track {
22
+ readonly keys: Key[];
23
+ constructor(initial?: Vec);
24
+ /** Sets the value at `t`, replacing a key at the same time. */
25
+ set(t: number, v: Vec | number, ease?: Ease): this;
26
+ /** Holds the current value until `t`, then keeps going from there. */
27
+ hold(t: number, ease?: Ease): this;
28
+ /** The interpolated value at `t`. */
29
+ value(t: number): Vec;
30
+ /** Scalar value at `t`. */
31
+ at(t: number): number;
32
+ /**
33
+ * Replaces keys inside [t0, t1] with linear samples of `sample` on a grid
34
+ * of about `step`, plus every time in `kinks`, so corners stay exact.
35
+ */
36
+ sample(t0: number, t1: number, step: number, sample: (t: number) => Vec, kinks?: number[]): this;
37
+ /**
38
+ * Drops linear keys that a straight line between the kept keys of the same
39
+ * linear run reproduces within `tolerance` (Douglas–Peucker over time), so
40
+ * dense samples cost keys only where the motion bends.
41
+ */
42
+ prune(tolerance: number): this;
43
+ /** Whether any two keys differ, so the channel must be animated. */
44
+ get isAnimated(): boolean;
45
+ }
46
+ export {};
47
+ //# sourceMappingURL=snowman-delivery-timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snowman-delivery-timeline.d.ts","sourceRoot":"","sources":["../../../src/new-year/utils/snowman-delivery-timeline.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,MAAM,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;AAE3B,sEAAsE;AACtE,MAAM,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/D,oDAAoD;AACpD,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9C,4CAA4C;AAC5C,eAAO,MAAM,IAAI,EAAE,MAA2B,CAAC;AAC/C,kDAAkD;AAClD,eAAO,MAAM,OAAO,EAAE,MAAwB,CAAC;AAC/C,yCAAyC;AACzC,eAAO,MAAM,QAAQ,EAAE,MAAwB,CAAC;AAEhD,UAAU,GAAG;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,GAAG,CAAC;IACP,IAAI,EAAE,IAAI,CAAC;CACZ;AAED,iFAAiF;AACjF,eAAO,MAAM,cAAc,GAAI,kBAAkB,MAAM,EAAE,GAAG,MAAM,KAAG,MAapE,CAAC;AAEF,mFAAmF;AACnF,qBAAa,KAAK;IAChB,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,CAAM;gBAEd,OAAO,CAAC,EAAE,GAAG;IAIzB,+DAA+D;IAC/D,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,GAAG,MAAM,EAAE,IAAI,GAAE,IAAW,GAAG,IAAI;IAWxD,sEAAsE;IACtE,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,GAAE,IAAW,GAAG,IAAI;IAIxC,qCAAqC;IACrC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG;IAcrB,2BAA2B;IAC3B,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAIrB;;;OAGG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,GAAG,EAC1B,KAAK,GAAE,MAAM,EAAO,GACnB,IAAI;IAeP;;;;OAIG;IACH,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAwC9B,oEAAoE;IACpE,IAAI,UAAU,IAAI,OAAO,CAMxB;CACF"}