@cuemath/leap 3.0.8 → 3.0.9
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/dist/features/analytics-events/platform-events-student.js +2 -2
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js +4 -3
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js +42 -26
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +39 -39
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js +12 -10
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star.js +29 -28
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode-star/table-mode-star.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star.js +36 -33
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-segment-star/table-segment-star.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +29 -25
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +121 -122
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/circle-games/leaderboard/comps/banner/banner.js +6 -8
- package/dist/features/circle-games/leaderboard/comps/banner/banner.js.map +1 -1
- package/dist/features/ui/error/error.js +1 -1
- package/dist/features/ui/error/error.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +53 -54
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
@@ -1,74 +1,73 @@
|
|
1
1
|
import { jsx as E } from "react/jsx-runtime";
|
2
2
|
import g from "lottie-web";
|
3
|
-
import { memo as
|
4
|
-
import
|
5
|
-
import { fetchLottie as
|
6
|
-
const
|
3
|
+
import { memo as w, forwardRef as A, useRef as u, useImperativeHandle as b, useEffect as I } from "react";
|
4
|
+
import $ from "../layout/flex-view.js";
|
5
|
+
import { fetchLottie as x } from "./helper.js";
|
6
|
+
const O = A((v, L) => {
|
7
7
|
const {
|
8
|
-
src:
|
8
|
+
src: m,
|
9
9
|
width: h = "100%",
|
10
|
-
height:
|
11
|
-
settings:
|
12
|
-
eventListener:
|
13
|
-
onRender:
|
14
|
-
animateOnIntersect:
|
15
|
-
} = v, a =
|
16
|
-
|
17
|
-
...o,
|
18
|
-
renderer: window.ReactNativeWebView ? "svg" : (o == null ? void 0 : o.renderer) ?? "svg"
|
19
|
-
}),
|
20
|
-
[o]
|
21
|
-
);
|
22
|
-
return I(
|
10
|
+
height: y = "100%",
|
11
|
+
settings: l,
|
12
|
+
eventListener: n,
|
13
|
+
onRender: o,
|
14
|
+
animateOnIntersect: c
|
15
|
+
} = v, a = u(null), r = u(null), s = u(null);
|
16
|
+
return b(
|
23
17
|
L,
|
24
18
|
() => ({
|
25
|
-
playSegments: (t,
|
26
|
-
var
|
27
|
-
return (
|
19
|
+
playSegments: (t, i) => {
|
20
|
+
var e;
|
21
|
+
return (e = r.current) == null ? void 0 : e.playSegments(t, i);
|
28
22
|
},
|
29
|
-
addEventListener: (t,
|
30
|
-
var
|
31
|
-
return (
|
23
|
+
addEventListener: (t, i) => {
|
24
|
+
var e;
|
25
|
+
return (e = r.current) == null ? void 0 : e.addEventListener(t, i);
|
32
26
|
},
|
33
|
-
removeEventListener: (t,
|
34
|
-
var
|
35
|
-
return (
|
27
|
+
removeEventListener: (t, i) => {
|
28
|
+
var e;
|
29
|
+
return (e = r.current) == null ? void 0 : e.removeEventListener(t, i);
|
36
30
|
},
|
37
31
|
play: () => {
|
38
32
|
var t;
|
39
|
-
return (t =
|
33
|
+
return (t = r.current) == null ? void 0 : t.play();
|
40
34
|
},
|
41
35
|
stop: () => {
|
42
36
|
var t;
|
43
|
-
return (t =
|
37
|
+
return (t = r.current) == null ? void 0 : t.stop();
|
44
38
|
}
|
45
39
|
}),
|
46
40
|
[]
|
47
|
-
),
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
}),
|
41
|
+
), I(() => {
|
42
|
+
let t = !1;
|
43
|
+
return (async () => {
|
44
|
+
try {
|
45
|
+
const e = await x(m);
|
46
|
+
requestAnimationFrame(() => {
|
47
|
+
!a.current || t || (r.current = g.loadAnimation({
|
48
|
+
container: a.current,
|
49
|
+
animationData: e,
|
50
|
+
loop: !0,
|
51
|
+
autoplay: !0,
|
52
|
+
...l
|
53
|
+
}), c && (s.current = new IntersectionObserver(
|
54
|
+
([f]) => {
|
55
|
+
var d, p;
|
56
|
+
f && f.isIntersecting ? (d = r.current) == null || d.play() : (p = r.current) == null || p.pause();
|
57
|
+
},
|
58
|
+
{ threshold: 0 }
|
59
|
+
), s.current.observe(a.current)), o == null || o(), n && r.current.addEventListener(n.name, n.callback));
|
60
|
+
});
|
61
|
+
} catch (e) {
|
62
|
+
throw Error(`Error loading Lottie animation: ${e}`);
|
63
|
+
}
|
64
|
+
})(), () => {
|
65
|
+
var e;
|
66
|
+
t = !0, r.current && (n && r.current.removeEventListener(n.name, n.callback), c && ((e = s.current) == null || e.disconnect()), r.current.destroy());
|
67
|
+
};
|
68
|
+
}, [m, n, o, c, l]), /* @__PURE__ */ E($, { ref: a, $width: h, $height: y });
|
69
|
+
}), D = w(O);
|
71
70
|
export {
|
72
|
-
|
71
|
+
D as default
|
73
72
|
};
|
74
73
|
//# sourceMappingURL=lottie-animation.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationEventName, AnimationItem, AnimationSegment
|
1
|
+
{"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationEventName, AnimationItem, AnimationSegment } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment, forceFlag?: boolean) =>\n animationInstance.current?.playSegments(segments, forceFlag),\n addEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.addEventListener(eventName as AnimationEventName, callback),\n removeEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.removeEventListener(eventName as AnimationEventName, callback),\n play: () => animationInstance.current?.play(),\n stop: () => animationInstance.current?.stop(),\n }),\n [],\n );\n\n useEffect(() => {\n let destroyed = false;\n\n const loadAnimation = async () => {\n try {\n const animationData = await fetchLottie(src);\n\n // Wait for layout\n // NOTE: Do not remove this as this is needed to fix canvas rendering on first layout.\n requestAnimationFrame(() => {\n if (!container.current || destroyed) return;\n\n animationInstance.current = lottie.loadAnimation({\n container: container.current,\n animationData,\n loop: true,\n autoplay: true,\n ...settings,\n });\n\n if (animateOnIntersect) {\n intersectionObserver.current = new IntersectionObserver(\n ([entry]) => {\n if (entry && entry.isIntersecting) {\n animationInstance.current?.play();\n } else {\n animationInstance.current?.pause();\n }\n },\n { threshold: 0 },\n );\n\n intersectionObserver.current.observe(container.current);\n }\n\n onRender?.();\n if (eventListener) {\n animationInstance.current.addEventListener(eventListener.name, eventListener.callback);\n }\n });\n } catch (error) {\n throw Error(`Error loading Lottie animation: ${error}`);\n }\n };\n\n loadAnimation();\n\n return () => {\n destroyed = true;\n if (animationInstance.current) {\n if (eventListener) {\n animationInstance.current.removeEventListener(eventListener.name, eventListener.callback);\n }\n\n if (animateOnIntersect) {\n intersectionObserver.current?.disconnect();\n }\n animationInstance.current.destroy();\n }\n };\n }, [src, eventListener, onRender, animateOnIntersect, settings]);\n\n return <FlexView ref={container} $width={width} $height={height} />;\n});\n\nexport default memo(LottieAnimation);\n"],"names":["LottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListener","onRender","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","_a","eventName","callback","useEffect","destroyed","animationData","fetchLottie","lottie","entry","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,MAAMA,IAAkBC,EAAuD,CAACC,GAAOC,MAAQ;AACvF,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAR,GAEES,IAAYC,EAAuB,IAAI,GACvCC,IAAoBD,EAA6B,IAAI,GACrDE,IAAuBF,EAAoC,IAAI;AAErE,SAAAG;AAAA,IACEZ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACa,GAA4BC,MACzC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AACR,cAAA,MAAM,mCAAmCA,CAAK,EAAE;AAAA,MACxD;AAAA,IAAA,MAKK,MAAM;;AACC,MAAAN,IAAA,IACRT,EAAkB,YAChBL,KACFK,EAAkB,QAAQ,oBAAoBL,EAAc,MAAMA,EAAc,QAAQ,GAGtFE,OACFQ,IAAAJ,EAAqB,YAArB,QAAAI,EAA8B,eAEhCL,EAAkB,QAAQ;IAC5B;AAAA,EACF,GACC,CAACT,GAAKI,GAAeC,GAAUC,GAAoBH,CAAQ,CAAC,qBAEvDsB,GAAS,EAAA,KAAKlB,GAAW,QAAQN,GAAO,SAASC,EAAQ,CAAA;AACnE,CAAC,GAEcwB,IAAAC,EAAK/B,CAAe;"}
|
package/dist/index.d.ts
CHANGED
@@ -3979,6 +3979,7 @@ export declare enum PLATFORM_EVENTS_STUDENT {
|
|
3979
3979
|
PAGE_VIEWED = "page_viewed",
|
3980
3980
|
CUSTOM_TEST_SUBMITTED = "custom_test_submitted",
|
3981
3981
|
HOMEWORK_COMPLETED = "homework_completed",
|
3982
|
+
ERROR_VIA_AUTO_LOGIN_FROM_CUEMATH_APP = "error_via_auto_login_from_cuemath_app",
|
3982
3983
|
ACTIVITY_STARTED = "activity_started",
|
3983
3984
|
ACTIVITY_TUTORIAL_SEEN = "activity_tutorial_seen",
|
3984
3985
|
STREAK_ICON_CLICKED = "streak_icon_clicked",
|