@cuemath/leap 3.2.21-tp-beta-0.3 → 3.2.23-mb
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/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js +53 -68
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js.map +1 -1
- package/dist/features/stickers/sticker-data.js +234 -0
- package/dist/features/stickers/sticker-data.js.map +1 -0
- package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/sticker-selector-styles.js} +21 -31
- package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js +27 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker.js +57 -0
- package/dist/features/stickers/sticker-selector/sticker.js.map +1 -0
- package/dist/features/{ui/stickers/stickers-effects.js → stickers/stickers-effects/effects.js} +6 -6
- package/dist/features/stickers/stickers-effects/effects.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js +86 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -0
- package/dist/features/{ui/stickers/stickers-styled.js → stickers/stickers-effects/stickers-effects-styled.js} +2 -2
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js +43 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
- package/dist/features/ui/lottie-animation/lottie-animation.js +36 -31
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +39 -8
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +31 -31
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/index.d.ts +38 -16
- package/dist/index.js +349 -347
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker-grid.js +0 -24
- package/dist/features/ui/sticker-grid/sticker-grid.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker.js +0 -57
- package/dist/features/ui/sticker-grid/sticker.js.map +0 -1
- package/dist/features/ui/stickers/constants.js +0 -6
- package/dist/features/ui/stickers/constants.js.map +0 -1
- package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
- package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
- package/dist/features/ui/stickers/stickers-utils.js +0 -91
- package/dist/features/ui/stickers/stickers-utils.js.map +0 -1
- package/dist/features/ui/stickers/stickers.js +0 -40
- package/dist/features/ui/stickers/stickers.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sticker.js","sources":["../../../../src/features/stickers/sticker-selector/sticker.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../ui/lottie-animation/types';\nimport type { IStickerProps } from './sticker-selector-types';\n\nimport React, { memo, useCallback, useEffect, useRef, useState } from 'react';\n\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport * as S from './sticker-selector-styles';\n\nconst Sticker: React.FC<IStickerProps> = ({\n emoji,\n lottieUrl,\n size = 48,\n onClick,\n disabled = false,\n}) => {\n const [isLoaded, setIsLoaded] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const lottieRef = useRef<ILottieAnimationRef>(null);\n\n const handleRender = useCallback(() => {\n if (!lottieRef.current) return;\n\n lottieRef.current.goToAndStop(0, true);\n setIsLoaded(true);\n\n if (isHovered) lottieRef.current.play();\n }, [isHovered]);\n\n useEffect(() => {\n if (!lottieRef.current || !isLoaded) return;\n\n if (isHovered) {\n lottieRef.current.play();\n } else {\n lottieRef.current.goToAndStop(0, true);\n }\n }, [isHovered, isLoaded]);\n\n const handleMouseEnter = useCallback(() => {\n if (!disabled) setIsHovered(true);\n }, [disabled]);\n\n const handleMouseLeave = useCallback(() => {\n if (!disabled) setIsHovered(false);\n }, [disabled]);\n\n const handleClick = useCallback(() => {\n if (!disabled && onClick) onClick();\n }, [disabled, onClick]);\n\n return (\n <S.StickerContainer\n $size={size}\n $disabled={disabled}\n onPointerEnter={handleMouseEnter}\n onPointerLeave={handleMouseLeave}\n onClick={handleClick}\n >\n {!isHovered && (\n <S.StaticEmoji $size={size} $visible={!isHovered}>\n {emoji}\n </S.StaticEmoji>\n )}\n\n <S.LottieContainer $size={size} $visible={isHovered}>\n {lottieUrl && (\n <LottieAnimation\n ref={lottieRef}\n src={lottieUrl}\n width=\"100%\"\n height=\"100%\"\n settings={{\n loop: true,\n autoplay: false,\n renderer: 'canvas',\n }}\n onRender={handleRender}\n />\n )}\n </S.LottieContainer>\n </S.StickerContainer>\n );\n};\n\nexport default memo(Sticker);\n"],"names":["Sticker","emoji","lottieUrl","size","onClick","disabled","isLoaded","setIsLoaded","useState","isHovered","setIsHovered","lottieRef","useRef","handleRender","useCallback","useEffect","handleMouseEnter","handleMouseLeave","handleClick","jsxs","S.StickerContainer","jsx","S.StaticEmoji","S.LottieContainer","LottieAnimation","Sticker$1","memo"],"mappings":";;;;AAQA,MAAMA,IAAmC,CAAC;AAAA,EACxC,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC;AAAA,EACA,UAAAC,IAAW;AACb,MAAM;AACJ,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK,GACxC,CAACC,GAAWC,CAAY,IAAIF,EAAS,EAAK,GAC1CG,IAAYC,EAA4B,IAAI,GAE5CC,IAAeC,EAAY,MAAM;AACjC,IAACH,EAAU,YAELA,EAAA,QAAQ,YAAY,GAAG,EAAI,GACrCJ,EAAY,EAAI,GAEZE,KAAqBE,EAAA,QAAQ,KAAK;AAAA,EAAA,GACrC,CAACF,CAAS,CAAC;AAEd,EAAAM,EAAU,MAAM;AACd,IAAI,CAACJ,EAAU,WAAW,CAACL,MAEvBG,IACFE,EAAU,QAAQ,SAERA,EAAA,QAAQ,YAAY,GAAG,EAAI;AAAA,EACvC,GACC,CAACF,GAAWH,CAAQ,CAAC;AAElB,QAAAU,IAAmBF,EAAY,MAAM;AACrC,IAACT,KAAUK,EAAa,EAAI;AAAA,EAAA,GAC/B,CAACL,CAAQ,CAAC,GAEPY,IAAmBH,EAAY,MAAM;AACrC,IAACT,KAAUK,EAAa,EAAK;AAAA,EAAA,GAChC,CAACL,CAAQ,CAAC,GAEPa,IAAcJ,EAAY,MAAM;AAChC,IAAA,CAACT,KAAYD,KAAiBA;EAAA,GACjC,CAACC,GAAUD,CAAO,CAAC;AAGpB,SAAA,gBAAAe;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,OAAOjB;AAAA,MACP,WAAWE;AAAA,MACX,gBAAgBW;AAAA,MAChB,gBAAgBC;AAAA,MAChB,SAASC;AAAA,MAER,UAAA;AAAA,QAAC,CAAAT,KACC,gBAAAY,EAAAC,GAAA,EAAc,OAAOnB,GAAM,UAAU,CAACM,GACpC,UACHR,EAAA,CAAA;AAAA,QAGF,gBAAAoB,EAACE,GAAA,EAAkB,OAAOpB,GAAM,UAAUM,GACvC,UACCP,KAAA,gBAAAmB;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,KAAKb;AAAA,YACL,KAAKT;AAAA,YACL,OAAM;AAAA,YACN,QAAO;AAAA,YACP,UAAU;AAAA,cACR,MAAM;AAAA,cACN,UAAU;AAAA,cACV,UAAU;AAAA,YACZ;AAAA,YACA,UAAUW;AAAA,UAAA;AAAA,QAAA,GAGhB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeY,IAAAC,EAAK1B,CAAO;"}
|
package/dist/features/{ui/stickers/stickers-effects.js → stickers/stickers-effects/effects.js}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { keyframes as r, css as t } from "styled-components";
|
2
|
-
import { randomizeDuration as o } from "./stickers-
|
2
|
+
import { randomizeDuration as o } from "./stickers-effects-helper.js";
|
3
3
|
const s = r`
|
4
4
|
0% {
|
5
5
|
transform: translateY(0vh);
|
@@ -45,20 +45,20 @@ const s = r`
|
|
45
45
|
opacity: 0;
|
46
46
|
}
|
47
47
|
`, i = {
|
48
|
-
|
48
|
+
"float-up": (a) => t`
|
49
49
|
animation: ${s} ${o(a)}ms ease-out forwards;
|
50
50
|
`,
|
51
|
-
|
51
|
+
"fall-down": (a) => t`
|
52
52
|
animation: ${n} ${o(a)}ms ease-out forwards;
|
53
53
|
`,
|
54
|
-
|
54
|
+
"burst-from-edges": (a) => t`
|
55
55
|
animation: ${e} ${o(a)}ms linear forwards;
|
56
56
|
`,
|
57
|
-
|
57
|
+
"pop-expand": (a) => t`
|
58
58
|
animation: ${m} ${a}ms cubic-bezier(0.5, 0.1, 0.7, 1) forwards;
|
59
59
|
`
|
60
60
|
};
|
61
61
|
export {
|
62
62
|
i as effectAnimations
|
63
63
|
};
|
64
|
-
//# sourceMappingURL=
|
64
|
+
//# sourceMappingURL=effects.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"effects.js","sources":["../../../../src/features/stickers/stickers-effects/effects.ts"],"sourcesContent":["import type { IStickersProps } from './stickers-effects-types';\n\nimport { keyframes, css } from 'styled-components';\n\nimport { randomizeDuration } from './stickers-effects-helper';\n\nconst floatUp = keyframes`\n 0% {\n transform: translateY(0vh);\n opacity: 1;\n }\n 100% {\n transform: translateY(-100vh);\n opacity: 0;\n }\n`;\n\nconst fallDown = keyframes`\n 0% {\n transform: translateY(0vh);\n opacity: 1;\n }\n 100% {\n transform: translateY(100vh);\n opacity: 0;\n }\n`;\n\nconst burstFromEdges = keyframes`\n 0% {\n transform: translateX(var(--from-x)) translateY(var(--from-y)) scale(1);\n opacity: 1;\n }\n 100% {\n transform: translateX(0vw) translateY(0vh) scale(1.25);\n opacity: 0;\n }\n`;\n\nconst popExpand = keyframes`\n 0% {\n transform: translateX(0) translateY(0vh);\n opacity: 1;\n }\n 35% {\n transform: translateX(0) translateY(-50vh) scale(1.25);\n opacity: 1;\n }\n 60% {\n transform: translateX(var(--from-x)) translateY(var(--from-y)) scale(1.25);\n opacity: 0.75;\n }\n 100% {\n transform: translateX(var(--from-x)) translateY(-110vh) scale(1.25);\n opacity: 0;\n }\n`;\n\nexport const effectAnimations: Record<\n IStickersProps['effect'],\n (duration: number) => ReturnType<typeof css>\n> = {\n 'float-up': (duration: number) => css`\n animation: ${floatUp} ${randomizeDuration(duration)}ms ease-out forwards;\n `,\n 'fall-down': (duration: number) => css`\n animation: ${fallDown} ${randomizeDuration(duration)}ms ease-out forwards;\n `,\n 'burst-from-edges': (duration: number) => css`\n animation: ${burstFromEdges} ${randomizeDuration(duration)}ms linear forwards;\n `,\n 'pop-expand': (duration: number) => css`\n animation: ${popExpand} ${duration}ms cubic-bezier(0.5, 0.1, 0.7, 1) forwards;\n `,\n};\n"],"names":["floatUp","keyframes","fallDown","burstFromEdges","popExpand","effectAnimations","duration","css","randomizeDuration"],"mappings":";;AAMA,MAAMA,IAAUC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWVC,IAAWD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWXE,IAAiBF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWjBG,IAAYH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAmBLI,IAGT;AAAA,EACF,YAAY,CAACC,MAAqBC;AAAA,iBACnBP,CAAO,IAAIQ,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAErD,aAAa,CAACA,MAAqBC;AAAA,iBACpBL,CAAQ,IAAIM,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAEtD,oBAAoB,CAACA,MAAqBC;AAAA,iBAC3BJ,CAAc,IAAIK,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAE5D,cAAc,CAACA,MAAqBC;AAAA,iBACrBH,CAAS,IAAIE,CAAQ;AAAA;AAEtC;"}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import { stickerData as b } from "../sticker-data.js";
|
2
|
+
const w = (o, e) => {
|
3
|
+
const t = Math.ceil(e / 4), a = Math.floor(o / t), h = o % t, p = ["top", "right", "bottom", "left"][a] ?? "left", r = (h + 0.5) / t * 100, m = (Math.random() - 0.5) * 25, s = Math.min(Math.max(r + m, 0), 100), c = 45 + Math.random() * 10, i = 45 + Math.random() * 10;
|
4
|
+
let d = 0, n = 0;
|
5
|
+
switch (p) {
|
6
|
+
case "top":
|
7
|
+
d = s - c, n = -i + m;
|
8
|
+
break;
|
9
|
+
case "right":
|
10
|
+
d = 100 - c + m, n = s - i;
|
11
|
+
break;
|
12
|
+
case "bottom":
|
13
|
+
d = s - c, n = 100 - i + m;
|
14
|
+
break;
|
15
|
+
case "left":
|
16
|
+
d = -c + m, n = s - i;
|
17
|
+
break;
|
18
|
+
}
|
19
|
+
return {
|
20
|
+
fromX: `${d}vw`,
|
21
|
+
fromY: `${n}vh`,
|
22
|
+
x: c,
|
23
|
+
y: i
|
24
|
+
};
|
25
|
+
}, v = (o, e = 10) => {
|
26
|
+
const t = [];
|
27
|
+
let a = 0;
|
28
|
+
const h = o;
|
29
|
+
for (; t.length < o && a < h; ) {
|
30
|
+
const l = Math.floor(Math.random() * (100 - 2 * e) + e);
|
31
|
+
t.every((p) => Math.abs(p - l) >= e) && t.push(l), a++;
|
32
|
+
}
|
33
|
+
for (; t.length < o; )
|
34
|
+
t.push(Math.floor(Math.random() * (100 - 2 * e) + e));
|
35
|
+
return t;
|
36
|
+
};
|
37
|
+
function P({
|
38
|
+
count: o,
|
39
|
+
effect: e,
|
40
|
+
stickers: t,
|
41
|
+
minSize: a,
|
42
|
+
maxSize: h
|
43
|
+
}) {
|
44
|
+
const l = 100 / o * 2, p = () => Math.random() * (h - a) + a, r = [], m = ["float-up", "fall-down"].includes(e) ? v(o, l) : [];
|
45
|
+
for (let s = 0; s < o; s++) {
|
46
|
+
const c = t[s % t.length] ?? "", { emoji: i = "", lottieUrl: d } = b.find(({ id: f }) => f === c) || {}, n = p(), u = m[s], M = { id: c, sticker: i, lottie: d, size: n };
|
47
|
+
switch (e) {
|
48
|
+
case "float-up":
|
49
|
+
r.push({ ...M, x: u, y: 110 + (Math.random() - 0.5) * n });
|
50
|
+
break;
|
51
|
+
case "fall-down":
|
52
|
+
r.push({ ...M, x: u, y: -10 + (Math.random() - 0.5) * n });
|
53
|
+
break;
|
54
|
+
case "burst-from-edges": {
|
55
|
+
const { x: f, y: x, fromX: g, fromY: k } = w(s, o);
|
56
|
+
r.push({ ...M, x: f, y: x, fromX: g, fromY: k, size: n });
|
57
|
+
break;
|
58
|
+
}
|
59
|
+
case "pop-expand":
|
60
|
+
r.push({
|
61
|
+
...M,
|
62
|
+
x: 50,
|
63
|
+
y: 100,
|
64
|
+
fromX: `${(Math.random() - 0.5) * 27.5}vw`,
|
65
|
+
fromY: `${-50 - Math.random() * 27.5}vh`
|
66
|
+
});
|
67
|
+
break;
|
68
|
+
default:
|
69
|
+
r.push({
|
70
|
+
...M,
|
71
|
+
x: Math.random() * 100,
|
72
|
+
y: Math.random() * 100
|
73
|
+
});
|
74
|
+
}
|
75
|
+
}
|
76
|
+
return r;
|
77
|
+
}
|
78
|
+
const X = (o, e = 0.2) => {
|
79
|
+
const t = o * e, a = o - t, h = o + t;
|
80
|
+
return Math.floor(Math.random() * (h - a + 1)) + a;
|
81
|
+
};
|
82
|
+
export {
|
83
|
+
P as generateStickerData,
|
84
|
+
X as randomizeDuration
|
85
|
+
};
|
86
|
+
//# sourceMappingURL=stickers-effects-helper.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers-effects-helper.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects-helper.ts"],"sourcesContent":["import type { TStickerData, IStickersProps } from './stickers-effects-types';\n\nimport { stickerData } from '../sticker-data';\n\nconst getBurstPosition = (\n index: number,\n total: number,\n): {\n fromX: string;\n fromY: string;\n x: number;\n y: number;\n} => {\n const countPerSide = Math.ceil(total / 4);\n const sideIndex = Math.floor(index / countPerSide);\n const pos = index % countPerSide;\n\n const sides = ['top', 'right', 'bottom', 'left'] as const;\n const side = sides[sideIndex] ?? 'left';\n\n const basePercent = ((pos + 0.5) / countPerSide) * 100;\n const jitter = (Math.random() - 0.5) * 25;\n const edgePercent = Math.min(Math.max(basePercent + jitter, 0), 100);\n\n const centerX = 45 + Math.random() * 10;\n const centerY = 45 + Math.random() * 10;\n\n let fromX = 0;\n let fromY = 0;\n\n switch (side) {\n case 'top':\n fromX = edgePercent - centerX;\n fromY = -centerY + jitter;\n break;\n case 'right':\n fromX = 100 - centerX + jitter;\n fromY = edgePercent - centerY;\n break;\n case 'bottom':\n fromX = edgePercent - centerX;\n fromY = 100 - centerY + jitter;\n break;\n case 'left':\n fromX = -centerX + jitter;\n fromY = edgePercent - centerY;\n break;\n }\n\n return {\n fromX: `${fromX}vw`,\n fromY: `${fromY}vh`,\n x: centerX,\n y: centerY,\n };\n};\n\nconst getRandomNonOverlappingPositions = (count: number, buffer = 10): number[] => {\n const used: number[] = [];\n let attempts = 0;\n const maxAttempts = count;\n\n while (used.length < count && attempts < maxAttempts) {\n const value = Math.floor(Math.random() * (100 - 2 * buffer) + buffer);\n\n if (used.every(v => Math.abs(v - value) >= buffer)) {\n used.push(value);\n }\n attempts++;\n }\n\n while (used.length < count) {\n used.push(Math.floor(Math.random() * (100 - 2 * buffer) + buffer));\n }\n\n return used;\n};\n\nexport function generateStickerData({\n count,\n effect,\n stickers,\n minSize,\n maxSize,\n}: {\n count: number;\n effect: IStickersProps['effect'];\n stickers: string[];\n minSize: number;\n maxSize: number;\n}): TStickerData[] {\n const buffer = (100 / count) * 2;\n const getSize = () => Math.random() * (maxSize - minSize) + minSize;\n const result: TStickerData[] = [];\n const xPositions = ['float-up', 'fall-down'].includes(effect)\n ? getRandomNonOverlappingPositions(count, buffer)\n : [];\n\n for (let i = 0; i < count; i++) {\n const stickerId = stickers[i % stickers.length] ?? '';\n const { emoji: sticker = '', lottieUrl: lottie } =\n stickerData.find(({ id }) => id === stickerId) || {};\n\n const size = getSize();\n const x = xPositions[i]!;\n const common = { id: stickerId, sticker, lottie, size };\n\n switch (effect) {\n case 'float-up':\n result.push({ ...common, x, y: 110 + (Math.random() - 0.5) * size });\n break;\n\n case 'fall-down':\n result.push({ ...common, x, y: -10 + (Math.random() - 0.5) * size });\n break;\n\n case 'burst-from-edges': {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const { x, y, fromX, fromY } = getBurstPosition(i, count);\n\n result.push({ ...common, x, y, fromX, fromY, size });\n break;\n }\n\n case 'pop-expand':\n result.push({\n ...common,\n x: 50,\n y: 100,\n fromX: `${(Math.random() - 0.5) * 27.5}vw`,\n fromY: `${-50 - Math.random() * 27.5}vh`,\n });\n break;\n\n default:\n result.push({\n ...common,\n x: Math.random() * 100,\n y: Math.random() * 100,\n });\n }\n }\n\n return result;\n}\n\nexport const randomizeDuration = (base: number, variancePercent = 0.2): number => {\n const delta = base * variancePercent;\n const min = base - delta;\n const max = base + delta;\n\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\n"],"names":["getBurstPosition","index","total","countPerSide","sideIndex","pos","side","basePercent","jitter","edgePercent","centerX","centerY","fromX","fromY","getRandomNonOverlappingPositions","count","buffer","used","attempts","maxAttempts","value","v","generateStickerData","effect","stickers","minSize","maxSize","getSize","result","xPositions","i","stickerId","sticker","lottie","stickerData","id","size","x","common","y","randomizeDuration","base","variancePercent","delta","min","max"],"mappings":";AAIA,MAAMA,IAAmB,CACvBC,GACAC,MAMG;AACH,QAAMC,IAAe,KAAK,KAAKD,IAAQ,CAAC,GAClCE,IAAY,KAAK,MAAMH,IAAQE,CAAY,GAC3CE,IAAMJ,IAAQE,GAGdG,IADQ,CAAC,OAAO,SAAS,UAAU,MAAM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,KAAK;AAAA,UACV,GAAGU;AAAA,UACH,GAAG;AAAA,UACH,GAAG;AAAA,UACH,OAAO,IAAI,KAAK,OAAO,IAAI,OAAO,IAAI;AAAA,UACtC,OAAO,GAAG,MAAM,KAAK,WAAW,IAAI;AAAA,QAAA,CACrC;AACD;AAAA,MAEF;AACE,QAAAV,EAAO,KAAK;AAAA,UACV,GAAGU;AAAA,UACH,GAAG,KAAK,OAAA,IAAW;AAAA,UACnB,GAAG,KAAK,OAAA,IAAW;AAAA,QAAA,CACpB;AAAA,IACL;AAAA,EACF;AAEO,SAAAV;AACT;AAEO,MAAMY,IAAoB,CAACC,GAAcC,IAAkB,QAAgB;AAChF,QAAMC,IAAQF,IAAOC,GACfE,IAAMH,IAAOE,GACbE,IAAMJ,IAAOE;AAEZ,SAAA,KAAK,MAAM,KAAK,OAAA,KAAYE,IAAMD,IAAM,EAAE,IAAIA;AACvD;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import $, { css as s } from "styled-components";
|
2
|
-
import { effectAnimations as n } from "./
|
2
|
+
import { effectAnimations as n } from "./effects.js";
|
3
3
|
const h = $.div`
|
4
4
|
position: relative;
|
5
5
|
width: 100vw;
|
@@ -26,4 +26,4 @@ export {
|
|
26
26
|
h as Container,
|
27
27
|
a as Sticker
|
28
28
|
};
|
29
|
-
//# sourceMappingURL=stickers-styled.js.map
|
29
|
+
//# sourceMappingURL=stickers-effects-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers-effects-styled.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects-styled.ts"],"sourcesContent":["import type { IStickersProps } from './stickers-effects-types';\n\nimport styled, { css } from 'styled-components';\n\nimport { effectAnimations } from './effects';\n\nexport const Container = styled.div`\n position: relative;\n width: 100vw;\n height: 100vh;\n background: transparent;\n pointer-events: none;\n`;\n\nexport const Sticker = styled.div<{\n effect: IStickersProps['effect'];\n duration: number;\n fromX?: string;\n fromY?: string;\n x: number;\n y: number;\n size: number;\n}>`\n position: absolute;\n z-index: 10;\n\n left: ${({ x }) => `${x}%`};\n top: ${({ y }) => `${y}%`};\n width: ${({ size }) => `${size}px`};\n height: ${({ size }) => `${size}px`};\n font-size: ${({ size }) => `${size}px`};\n\n ${({ effect, duration, fromX, fromY }) =>\n fromX && fromY\n ? css`\n ${effectAnimations[effect](duration)}\n --from-x: ${fromX};\n --from-y: ${fromY};\n `\n : effectAnimations[effect](duration)}\n`;\n"],"names":["Container","styled","Sticker","x","y","size","effect","duration","fromX","fromY","css","effectAnimations"],"mappings":";;AAMO,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQnBC,IAAUD,EAAO;AAAA;AAAA;AAAA;AAAA,UAYpB,CAAC,EAAE,GAAAE,EAAQ,MAAA,GAAGA,CAAC,GAAG;AAAA,SACnB,CAAC,EAAE,GAAAC,EAAQ,MAAA,GAAGA,CAAC,GAAG;AAAA,WAChB,CAAC,EAAE,MAAAC,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA,YACxB,CAAC,EAAE,MAAAA,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA,eACtB,CAAC,EAAE,MAAAA,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA;AAAA,IAEpC,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,OAAAC,GAAO,OAAAC,QAC5BD,KAASC,IACLC;AAAA,YACIC,EAAiBL,CAAM,EAAEC,CAAQ,CAAC;AAAA,sBACxBC,CAAK;AAAA,sBACLC,CAAK;AAAA,YAEnBE,EAAiBL,CAAM,EAAEC,CAAQ,CAAC;AAAA;"}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { jsx as o, Fragment as D } from "react/jsx-runtime";
|
2
|
+
import { memo as f, useState as l, useEffect as E } from "react";
|
3
|
+
import g from "../../ui/lottie-animation/lottie-animation.js";
|
4
|
+
import { generateStickerData as F } from "./stickers-effects-helper.js";
|
5
|
+
import { Container as z, Sticker as T } from "./stickers-effects-styled.js";
|
6
|
+
const $ = f(({ lottie: t, sticker: e, size: r }) => {
|
7
|
+
const [i, s] = l(!1);
|
8
|
+
return !t || i ? /* @__PURE__ */ o(D, { children: e }) : /* @__PURE__ */ o(g, { src: t, width: r, height: r, onError: () => s(!0) });
|
9
|
+
}), b = ({ stickers: t, effect: e, count: r, duration: i }) => {
|
10
|
+
const [s, a] = l([]);
|
11
|
+
return E(() => {
|
12
|
+
const c = F({
|
13
|
+
count: r,
|
14
|
+
effect: e,
|
15
|
+
stickers: t,
|
16
|
+
minSize: 32,
|
17
|
+
maxSize: 48
|
18
|
+
});
|
19
|
+
a(c);
|
20
|
+
const m = setTimeout(() => a([]), i);
|
21
|
+
return () => clearTimeout(m);
|
22
|
+
}, [t, e, r, i]), /* @__PURE__ */ o(z, { children: s.map((c, m) => {
|
23
|
+
const { id: k, sticker: u, lottie: S, x: h, y: p, size: n, fromX: d, fromY: x } = c;
|
24
|
+
return /* @__PURE__ */ o(
|
25
|
+
T,
|
26
|
+
{
|
27
|
+
effect: e,
|
28
|
+
duration: i,
|
29
|
+
fromX: d,
|
30
|
+
fromY: x,
|
31
|
+
x: h,
|
32
|
+
y: p,
|
33
|
+
size: n,
|
34
|
+
children: /* @__PURE__ */ o($, { lottie: S, sticker: u, size: n })
|
35
|
+
},
|
36
|
+
`${k}-${m}`
|
37
|
+
);
|
38
|
+
}) });
|
39
|
+
}, L = f(b);
|
40
|
+
export {
|
41
|
+
L as default
|
42
|
+
};
|
43
|
+
//# sourceMappingURL=stickers-effects.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers-effects.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects.tsx"],"sourcesContent":["import type { TStickerData, IStickersProps } from './stickers-effects-types';\n\nimport React, { memo, useEffect, useState } from 'react';\n\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport { generateStickerData } from './stickers-effects-helper';\nimport * as S from './stickers-effects-styled';\n\nconst StickerWithFallback: React.FC<{\n lottie?: string;\n sticker: string;\n size: number;\n}> = memo(({ lottie, sticker, size }) => {\n const [failed, setFailed] = useState(false);\n\n if (!lottie || failed) return <>{sticker}</>;\n\n return (\n <LottieAnimation src={lottie} width={size} height={size} onError={() => setFailed(true)} />\n );\n});\n\nconst StickersEffects: React.FC<IStickersProps> = ({ stickers, effect, count, duration }) => {\n const [stickersData, setStickersData] = useState<ReturnType<typeof generateStickerData>>([]);\n\n useEffect(() => {\n const stickerData = generateStickerData({\n count,\n effect,\n stickers,\n minSize: 32,\n maxSize: 48,\n });\n\n setStickersData(stickerData);\n\n const timeout = setTimeout(() => setStickersData([]), duration);\n\n return () => clearTimeout(timeout);\n }, [stickers, effect, count, duration]);\n\n return (\n <S.Container>\n {stickersData.map((data: TStickerData, i) => {\n const { id, sticker, lottie, x, y, size, fromX, fromY } = data;\n\n return (\n <S.Sticker\n key={`${id}-${i}`}\n effect={effect}\n duration={duration}\n fromX={fromX}\n fromY={fromY}\n x={x}\n y={y}\n size={size}\n >\n <StickerWithFallback lottie={lottie} sticker={sticker} size={size} />\n </S.Sticker>\n );\n })}\n </S.Container>\n );\n};\n\nexport default memo(StickersEffects);\n"],"names":["StickerWithFallback","memo","lottie","sticker","size","failed","setFailed","useState","jsx","LottieAnimation","StickersEffects","stickers","effect","count","duration","stickersData","setStickersData","useEffect","stickerData","generateStickerData","timeout","S.Container","data","i","id","x","y","fromX","fromY","S.Sticker","stickersEffects"],"mappings":";;;;;AAQA,MAAMA,IAIDC,EAAK,CAAC,EAAE,QAAAC,GAAQ,SAAAC,GAAS,MAAAC,QAAW;AACvC,QAAM,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK;AAE1C,SAAI,CAACL,KAAUG,2BAAkB,UAAQF,EAAA,CAAA,IAGtC,gBAAAK,EAAAC,GAAA,EAAgB,KAAKP,GAAQ,OAAOE,GAAM,QAAQA,GAAM,SAAS,MAAME,EAAU,EAAI,EAAG,CAAA;AAE7F,CAAC,GAEKI,IAA4C,CAAC,EAAE,UAAAC,GAAU,QAAAC,GAAQ,OAAAC,GAAO,UAAAC,QAAe;AAC3F,QAAM,CAACC,GAAcC,CAAe,IAAIT,EAAiD,CAAE,CAAA;AAE3F,SAAAU,EAAU,MAAM;AACd,UAAMC,IAAcC,EAAoB;AAAA,MACtC,OAAAN;AAAA,MACA,QAAAD;AAAA,MACA,UAAAD;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,IAAA,CACV;AAED,IAAAK,EAAgBE,CAAW;AAE3B,UAAME,IAAU,WAAW,MAAMJ,EAAgB,CAAE,CAAA,GAAGF,CAAQ;AAEvD,WAAA,MAAM,aAAaM,CAAO;AAAA,KAChC,CAACT,GAAUC,GAAQC,GAAOC,CAAQ,CAAC,GAGpC,gBAAAN,EAACa,GAAA,EACE,YAAa,IAAI,CAACC,GAAoBC,MAAM;AACrC,UAAA,EAAE,IAAAC,GAAI,SAAArB,GAAS,QAAAD,GAAQ,GAAAuB,GAAG,GAAAC,GAAG,MAAAtB,GAAM,OAAAuB,GAAO,OAAAC,EAAU,IAAAN;AAGxD,WAAA,gBAAAd;AAAA,MAACqB;AAAAA,MAAA;AAAA,QAEC,QAAAjB;AAAA,QACA,UAAAE;AAAA,QACA,OAAAa;AAAA,QACA,OAAAC;AAAA,QACA,GAAAH;AAAA,QACA,GAAAC;AAAA,QACA,MAAAtB;AAAA,QAEA,UAAC,gBAAAI,EAAAR,GAAA,EAAoB,QAAAE,GAAgB,SAAAC,GAAkB,MAAAC,GAAY;AAAA,MAAA;AAAA,MAT9D,GAAGoB,CAAE,IAAID,CAAC;AAAA,IAAA;AAAA,EAYpB,CAAA,EACH,CAAA;AAEJ,GAEeO,IAAA7B,EAAKS,CAAe;"}
|
@@ -1,32 +1,33 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import
|
3
|
-
import { memo as w, forwardRef as
|
1
|
+
import { jsx as A } from "react/jsx-runtime";
|
2
|
+
import E from "lottie-web";
|
3
|
+
import { memo as w, forwardRef as b, useRef as m, useImperativeHandle as I, useEffect as S } from "react";
|
4
4
|
import $ from "../layout/flex-view.js";
|
5
5
|
import { fetchLottie as x } from "./helper.js";
|
6
|
-
const O =
|
6
|
+
const O = b((L, h) => {
|
7
7
|
const {
|
8
|
-
src:
|
9
|
-
width:
|
8
|
+
src: l,
|
9
|
+
width: g = "100%",
|
10
10
|
height: y = "100%",
|
11
|
-
settings:
|
12
|
-
eventListener:
|
13
|
-
onRender:
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
settings: d,
|
12
|
+
eventListener: o,
|
13
|
+
onRender: i,
|
14
|
+
onError: a,
|
15
|
+
animateOnIntersect: s
|
16
|
+
} = L, c = m(null), r = m(null), u = m(null);
|
17
|
+
return I(
|
18
|
+
h,
|
18
19
|
() => ({
|
19
|
-
playSegments: (t,
|
20
|
+
playSegments: (t, n) => {
|
20
21
|
var e;
|
21
|
-
return (e = r.current) == null ? void 0 : e.playSegments(t,
|
22
|
+
return (e = r.current) == null ? void 0 : e.playSegments(t, n);
|
22
23
|
},
|
23
|
-
addEventListener: (t,
|
24
|
+
addEventListener: (t, n) => {
|
24
25
|
var e;
|
25
|
-
return (e = r.current) == null ? void 0 : e.addEventListener(t,
|
26
|
+
return (e = r.current) == null ? void 0 : e.addEventListener(t, n);
|
26
27
|
},
|
27
|
-
removeEventListener: (t,
|
28
|
+
removeEventListener: (t, n) => {
|
28
29
|
var e;
|
29
|
-
return (e = r.current) == null ? void 0 : e.removeEventListener(t,
|
30
|
+
return (e = r.current) == null ? void 0 : e.removeEventListener(t, n);
|
30
31
|
},
|
31
32
|
play: () => {
|
32
33
|
var t;
|
@@ -35,37 +36,41 @@ const O = A((v, L) => {
|
|
35
36
|
stop: () => {
|
36
37
|
var t;
|
37
38
|
return (t = r.current) == null ? void 0 : t.stop();
|
39
|
+
},
|
40
|
+
goToAndStop: (t, n) => {
|
41
|
+
var e;
|
42
|
+
return (e = r.current) == null ? void 0 : e.goToAndStop(t, n);
|
38
43
|
}
|
39
44
|
}),
|
40
45
|
[]
|
41
|
-
),
|
46
|
+
), S(() => {
|
42
47
|
let t = !1;
|
43
48
|
return (async () => {
|
44
49
|
try {
|
45
|
-
const e = await x(
|
50
|
+
const e = await x(l);
|
46
51
|
requestAnimationFrame(() => {
|
47
|
-
!
|
48
|
-
container:
|
52
|
+
!c.current || t || (r.current = E.loadAnimation({
|
53
|
+
container: c.current,
|
49
54
|
animationData: e,
|
50
55
|
loop: !0,
|
51
56
|
autoplay: !0,
|
52
|
-
...
|
53
|
-
}),
|
57
|
+
...d
|
58
|
+
}), s && (u.current = new IntersectionObserver(
|
54
59
|
([f]) => {
|
55
|
-
var
|
56
|
-
f && f.isIntersecting ? (
|
60
|
+
var p, v;
|
61
|
+
f && f.isIntersecting ? (p = r.current) == null || p.play() : (v = r.current) == null || v.pause();
|
57
62
|
},
|
58
63
|
{ threshold: 0 }
|
59
|
-
),
|
64
|
+
), u.current.observe(c.current)), i == null || i(), o && r.current.addEventListener(o.name, o.callback));
|
60
65
|
});
|
61
66
|
} catch (e) {
|
62
|
-
throw Error(`Error loading Lottie animation: ${e}`);
|
67
|
+
throw a == null || a(), Error(`Error loading Lottie animation: ${e}`);
|
63
68
|
}
|
64
69
|
})(), () => {
|
65
70
|
var e;
|
66
|
-
t = !0, r.current && (
|
71
|
+
t = !0, r.current && (o && r.current.removeEventListener(o.name, o.callback), s && ((e = u.current) == null || e.disconnect()), r.current.destroy());
|
67
72
|
};
|
68
|
-
}, [
|
73
|
+
}, [l, o, i, s, d, a]), /* @__PURE__ */ A($, { ref: c, $width: g, $height: y });
|
69
74
|
}), D = w(O);
|
70
75
|
export {
|
71
76
|
D as default
|
@@ -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 } 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,
|
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 onError,\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 goToAndStop: (v, f) => animationInstance.current?.goToAndStop(v, f),\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 onError?.();\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, onError]);\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","onError","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","_a","eventName","callback","v","f","useEffect","destroyed","animationData","fetchLottie","lottie","entry","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,MAAMA,IAAkBC,EAAu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AU;AAAA,YACrB,eAAAc;AAAA,YACA,MAAM;AAAA,YACN,UAAU;AAAA,YACV,GAAGnB;AAAA,UAAA,CACJ,GAEGI,MACFI,EAAqB,UAAU,IAAI;AAAA,YACjC,CAAC,CAACc,CAAK,MAAM;;AACP,cAAAA,KAASA,EAAM,kBACjBV,IAAAL,EAAkB,YAAlB,QAAAK,EAA2B,UAE3BW,IAAAhB,EAAkB,YAAlB,QAAAgB,EAA2B;AAAA,YAE/B;AAAA,YACA,EAAE,WAAW,EAAE;AAAA,UAAA,GAGIf,EAAA,QAAQ,QAAQH,EAAU,OAAO,IAG7CH,KAAA,QAAAA,KACPD,KACFM,EAAkB,QAAQ,iBAAiBN,EAAc,MAAMA,EAAc,QAAQ;AAAA,QACvF,CACD;AAAA,eACMuB,GAAO;AACJ,cAAArB,KAAA,QAAAA,KACJ,MAAM,mCAAmCqB,CAAK,EAAE;AAAA,MACxD;AAAA,IAAA,MAKK,MAAM;;AACC,MAAAN,IAAA,IACRX,EAAkB,YAChBN,KACFM,EAAkB,QAAQ,oBAAoBN,EAAc,MAAMA,EAAc,QAAQ,GAGtFG,OACFQ,IAAAJ,EAAqB,YAArB,QAAAI,EAA8B,eAEhCL,EAAkB,QAAQ;IAC5B;AAAA,EACF,GACC,CAACV,GAAKI,GAAeC,GAAUE,GAAoBJ,GAAUG,CAAO,CAAC,qBAEhEsB,GAAS,EAAA,KAAKpB,GAAW,QAAQP,GAAO,SAASC,EAAQ,CAAA;AACnE,CAAC,GAEc2B,IAAAC,EAAKlC,CAAe;"}
|
@@ -73,7 +73,7 @@ const p = a.div(
|
|
73
73
|
}
|
74
74
|
}
|
75
75
|
`
|
76
|
-
),
|
76
|
+
), d = a.div(
|
77
77
|
({ $modalWidth: t }) => `
|
78
78
|
max-height: calc(100vh - 142px);
|
79
79
|
overflow-y: auto;
|
@@ -82,7 +82,7 @@ const p = a.div(
|
|
82
82
|
max-height: 100vh;
|
83
83
|
}
|
84
84
|
}`
|
85
|
-
),
|
85
|
+
), c = a.div(
|
86
86
|
({ theme: { colors: t }, $modalWidth: o }) => `
|
87
87
|
position: absolute;
|
88
88
|
top: -56px;
|
@@ -100,7 +100,7 @@ const p = a.div(
|
|
100
100
|
color: ${t.BLACK_1};
|
101
101
|
}
|
102
102
|
`
|
103
|
-
),
|
103
|
+
), m = a.div`
|
104
104
|
display: flex;
|
105
105
|
align-items: center;
|
106
106
|
justify-content: center;
|
@@ -151,6 +151,36 @@ const p = a.div(
|
|
151
151
|
}
|
152
152
|
`
|
153
153
|
), h = a.div(
|
154
|
+
({ theme: { colors: t, zIndex: o }, $isClosing: e }) => `
|
155
|
+
position: fixed;
|
156
|
+
top: 0;
|
157
|
+
left: 0;
|
158
|
+
right: 0;
|
159
|
+
bottom: 0;
|
160
|
+
background-color: ${t.TRANSPARENT};
|
161
|
+
display: flex;
|
162
|
+
animation: ${e ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
163
|
+
z-index: ${o.MODAL};
|
164
|
+
|
165
|
+
@keyframes backdropFadeIn {
|
166
|
+
from {
|
167
|
+
opacity: 0;
|
168
|
+
}
|
169
|
+
to {
|
170
|
+
opacity: 1;
|
171
|
+
}
|
172
|
+
}
|
173
|
+
|
174
|
+
@keyframes backdropFadeOut {
|
175
|
+
from {
|
176
|
+
opacity: 1;
|
177
|
+
}
|
178
|
+
to {
|
179
|
+
opacity: 0;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
`
|
183
|
+
), x = a.div(
|
154
184
|
({ $isClosing: t }) => `
|
155
185
|
width: 100%;
|
156
186
|
height: max-content;
|
@@ -186,11 +216,12 @@ const p = a.div(
|
|
186
216
|
);
|
187
217
|
export {
|
188
218
|
l as BaseModal,
|
189
|
-
|
190
|
-
|
191
|
-
|
219
|
+
d as BaseModalContent,
|
220
|
+
x as BottomSheetModal,
|
221
|
+
c as CloseButtonContainer,
|
192
222
|
p as ModalContainer,
|
193
|
-
|
194
|
-
f as SpotlightModal
|
223
|
+
m as ModalLoaderWrapper,
|
224
|
+
f as SpotlightModal,
|
225
|
+
h as TransparentModalContainer
|
195
226
|
};
|
196
227
|
//# sourceMappingURL=modal-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\n`;\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nconst BottomSheetModal = styled.div<{ $isClosing?: boolean }>(\n ({ $isClosing }) => `\n width: 100%;\n height: max-content;\n overflow: auto;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n animation: ${$isClosing ? 'slideOut' : 'slideIn'} 0.3s forwards;\n\n @keyframes slideIn {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0%);\n opacity: 1;\n }\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0%);\n opacity: 1;\n }\n to {\n transform: translateY(100%);\n opacity: 0;\n }\n }\n `,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n BottomSheetModal,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal","BottomSheetModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKME,IAAYJ,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAE,QAAa;AAAA;AAAA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AA;AAAA;AAAA;AAAA;AAoBF,GAEME,
|
1
|
+
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\n`;\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nconst TransparentModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.TRANSPARENT};\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\nconst BottomSheetModal = styled.div<{ $isClosing?: boolean }>(\n ({ $isClosing }) => `\n width: 100%;\n height: max-content;\n overflow: auto;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n animation: ${$isClosing ? 'slideOut' : 'slideIn'} 0.3s forwards;\n\n @keyframes slideIn {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0%);\n opacity: 1;\n }\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0%);\n opacity: 1;\n }\n to {\n transform: translateY(100%);\n opacity: 0;\n }\n }\n `,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n TransparentModalContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n BottomSheetModal,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal","TransparentModalContainer","BottomSheetModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU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O,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDR,IACI;AAAA;AAAA,4BAEoBS,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF,GAEME,IAA4Bd,EAAO;AAAA,EACvC,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,WAAW;AAAA;AAAA,eAEzBE,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAEMa,IAAmBf,EAAO;AAAA,EAC9B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAQLA,IAAa,aAAa,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBpD;"}
|
@@ -1,35 +1,35 @@
|
|
1
1
|
import { jsx as r, jsxs as f } from "react/jsx-runtime";
|
2
|
-
import { captureException as
|
3
|
-
import { memo as $, useCallback as g, Suspense as
|
4
|
-
import { ErrorBoundary as
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
2
|
+
import { captureException as k } from "@sentry/browser";
|
3
|
+
import { memo as $, useCallback as g, Suspense as a } from "react";
|
4
|
+
import { ErrorBoundary as h } from "react-error-boundary";
|
5
|
+
import M from "../../../assets/line-icons/icons/cross.js";
|
6
|
+
import c from "../error/error.js";
|
7
|
+
import E from "../buttons/clickable/clickable.js";
|
8
8
|
import x from "../layout/flex-view.js";
|
9
|
-
import
|
10
|
-
import { ModalContainer as
|
11
|
-
const q = $(({ modal:
|
12
|
-
const { renderAs:
|
13
|
-
|
14
|
-
}, []),
|
15
|
-
|
9
|
+
import d from "../loader/app-loader/app-loader.js";
|
10
|
+
import { ModalContainer as s, BottomSheetModal as v, ModalLoaderWrapper as u, SpotlightModal as B, TransparentModalContainer as S, BaseModal as W, CloseButtonContainer as w, BaseModalContent as j } from "./modal-styled.js";
|
11
|
+
const q = $(({ modal: C, isClosing: o = !1, onClose: m }) => {
|
12
|
+
const { renderAs: l, element: e, modalWidth: i, isDismissable: p } = C, t = g((n) => {
|
13
|
+
k(n);
|
14
|
+
}, []), b = g((n) => {
|
15
|
+
n.stopPropagation();
|
16
16
|
}, []);
|
17
|
-
return
|
18
|
-
|
17
|
+
return l === "bottom-sheet" ? /* @__PURE__ */ r(s, { $isClosing: o, onClick: p ? m : () => null, children: /* @__PURE__ */ r(v, { $isClosing: o, onClick: b, children: /* @__PURE__ */ r(
|
18
|
+
h,
|
19
19
|
{
|
20
|
-
fallback: /* @__PURE__ */ r(x, { $gap: 24, children: /* @__PURE__ */ r(
|
21
|
-
onError:
|
22
|
-
children: /* @__PURE__ */ r(
|
20
|
+
fallback: /* @__PURE__ */ r(x, { $gap: 24, children: /* @__PURE__ */ r(c, { height: "100%" }) }),
|
21
|
+
onError: t,
|
22
|
+
children: /* @__PURE__ */ r(a, { fallback: /* @__PURE__ */ r(d, { height: "50vh" }), children: e })
|
23
23
|
}
|
24
|
-
) }) }) :
|
25
|
-
|
24
|
+
) }) }) : l === "spotlight" ? /* @__PURE__ */ r(s, { $isClosing: o, children: /* @__PURE__ */ r(
|
25
|
+
h,
|
26
26
|
{
|
27
|
-
fallback: /* @__PURE__ */ r(
|
28
|
-
onError:
|
27
|
+
fallback: /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(c, { height: "100vh" }) }),
|
28
|
+
onError: t,
|
29
29
|
children: /* @__PURE__ */ f(
|
30
|
-
|
30
|
+
a,
|
31
31
|
{
|
32
|
-
fallback: /* @__PURE__ */ r(
|
32
|
+
fallback: /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(d, { height: "100vh" }) }),
|
33
33
|
children: [
|
34
34
|
/* @__PURE__ */ r(B, { $isClosing: o }),
|
35
35
|
e
|
@@ -37,14 +37,14 @@ const q = $(({ modal: b, isClosing: o = !1, onClose: m }) => {
|
|
37
37
|
}
|
38
38
|
)
|
39
39
|
}
|
40
|
-
) }) : /* @__PURE__ */ r(
|
41
|
-
p !== !1 && /* @__PURE__ */ r(
|
42
|
-
/* @__PURE__ */ r(
|
43
|
-
|
40
|
+
) }) : l === "fullscreen-transparent" ? /* @__PURE__ */ r(S, { $isClosing: o, children: e }) : /* @__PURE__ */ r(s, { $isClosing: o, children: /* @__PURE__ */ f(W, { $isClosing: o, $width: i, children: [
|
41
|
+
p !== !1 && /* @__PURE__ */ r(w, { $modalWidth: i, children: /* @__PURE__ */ r(E, { label: "Close", onClick: m, children: /* @__PURE__ */ r(M, { width: 40, height: 40 }) }) }),
|
42
|
+
/* @__PURE__ */ r(j, { $modalWidth: i, children: /* @__PURE__ */ r(
|
43
|
+
h,
|
44
44
|
{
|
45
|
-
fallback: /* @__PURE__ */ r(
|
46
|
-
onError:
|
47
|
-
children: /* @__PURE__ */ r(
|
45
|
+
fallback: /* @__PURE__ */ r(c, { height: "50vh", size: "compact" }),
|
46
|
+
onError: t,
|
47
|
+
children: /* @__PURE__ */ r(a, { fallback: /* @__PURE__ */ r(d, { height: "50vh" }), children: e })
|
48
48
|
}
|
49
49
|
) })
|
50
50
|
] }) });
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../../../../src/features/ui/modals/modal.tsx"],"sourcesContent":["import type { IModalProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { captureException } from '@sentry/browser';\nimport { memo, Suspense, useCallback } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Error from '../../ui/error/error';\nimport Clickable from '../buttons/clickable/clickable';\nimport FlexView from '../layout/flex-view';\nimport AppLoader from '../loader/app-loader/app-loader';\nimport * as Styled from './modal-styled';\n\n/**\n * Modal component that renders modal content with close button\n * Handles animation state for entry and exit transitions\n */\nconst Modal: FC<IModalProps> = memo(({ modal, isClosing = false, onClose }) => {\n const { renderAs, element, modalWidth, isDismissable } = modal;\n\n const sentryCaptureException = useCallback((error: Error) => {\n captureException(error);\n }, []);\n\n const handleStopPropagation = useCallback((e: React.MouseEvent) => {\n e.stopPropagation();\n }, []);\n\n if (renderAs === 'bottom-sheet') {\n return (\n <Styled.ModalContainer $isClosing={isClosing} onClick={isDismissable ? onClose : () => null}>\n <Styled.BottomSheetModal $isClosing={isClosing} onClick={handleStopPropagation}>\n <ErrorBoundary\n fallback={\n <FlexView $gap={24}>\n <Error height=\"100%\" />\n </FlexView>\n }\n onError={sentryCaptureException}\n >\n <Suspense fallback={<AppLoader height=\"50vh\" />}>{element}</Suspense>\n </ErrorBoundary>\n </Styled.BottomSheetModal>\n </Styled.ModalContainer>\n );\n }\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <ErrorBoundary\n fallback={\n <Styled.ModalLoaderWrapper>\n <Error height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n onError={sentryCaptureException}\n >\n <Suspense\n fallback={\n <Styled.ModalLoaderWrapper>\n <AppLoader height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n >\n <Styled.SpotlightModal $isClosing={isClosing} />\n {element}\n </Suspense>\n </ErrorBoundary>\n </Styled.ModalContainer>\n );\n }\n\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.BaseModal $isClosing={isClosing} $width={modalWidth}>\n {isDismissable !== false && (\n <Styled.CloseButtonContainer $modalWidth={modalWidth}>\n <Clickable label=\"Close\" onClick={onClose}>\n <CrossIcon width={40} height={40} />\n </Clickable>\n </Styled.CloseButtonContainer>\n )}\n <Styled.BaseModalContent $modalWidth={modalWidth}>\n <ErrorBoundary\n fallback={<Error height=\"50vh\" size=\"compact\" />}\n onError={sentryCaptureException}\n >\n <Suspense fallback={<AppLoader height=\"50vh\" />}>{element}</Suspense>\n </ErrorBoundary>\n </Styled.BaseModalContent>\n </Styled.BaseModal>\n </Styled.ModalContainer>\n );\n});\n\nexport default Modal;\n"],"names":["Modal","memo","modal","isClosing","onClose","renderAs","element","modalWidth","isDismissable","sentryCaptureException","useCallback","error","captureException","handleStopPropagation","e","Styled.ModalContainer","Styled.BottomSheetModal","jsx","ErrorBoundary","FlexView","Error","Suspense","AppLoader","Styled.ModalLoaderWrapper","jsxs","Styled.SpotlightModal","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;;;;;;AAkBM,MAAAA,IAAyBC,EAAK,CAAC,EAAE,OAAAC,GAAO,WAAAC,IAAY,IAAO,SAAAC,QAAc;AAC7E,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,YAAAC,GAAY,eAAAC,MAAkBN,GAEnDO,IAAyBC,EAAY,CAACC,MAAiB;AAC3D,IAAAC,EAAiBD,CAAK;AAAA,EACxB,GAAG,CAAE,CAAA,GAECE,IAAwBH,EAAY,CAACI,MAAwB;AACjE,IAAAA,EAAE,gBAAgB;AAAA,EACpB,GAAG,CAAE,CAAA;AAEL,SAAIT,MAAa,mCAEZU,GAAA,EAAsB,YAAYZ,GAAW,SAASK,IAAgBJ,IAAU,MAAM,MACrF,4BAACY,GAAA,EAAwB,YAAYb,GAAW,SAASU,GACvD,UAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,4BACGC,GAAS,EAAA,MAAM,IACd,UAAC,gBAAAF,EAAAG,GAAA,EAAM,QAAO,OAAA,CAAO,EACvB,CAAA;AAAA,MAEF,SAASX;AAAA,MAET,UAAA,gBAAAQ,EAACI,KAAS,UAAU,gBAAAJ,EAACK,KAAU,QAAO,OAAO,CAAA,GAAK,UAAQhB,EAAA,CAAA;AAAA,IAAA;AAAA,EAAA,EAE9D,CAAA,EACF,CAAA,IAIAD,MAAa,cAEZ,gBAAAY,EAAAF,GAAA,EAAsB,YAAYZ,GACjC,UAAA,gBAAAc;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,4BACGK,GAAA,EACC,UAAC,gBAAAN,EAAAG,GAAA,EAAM,QAAO,QAAQ,CAAA,GACxB;AAAA,MAEF,SAASX;AAAA,MAET,UAAA,gBAAAe;AAAA,QAACH;AAAA,QAAA;AAAA,UACC,4BACGE,GAAA,EACC,UAAC,gBAAAN,EAAAK,GAAA,EAAU,QAAO,QAAQ,CAAA,GAC5B;AAAA,UAGF,UAAA;AAAA,YAAA,gBAAAL,EAACQ,GAAA,EAAsB,YAAYtB,EAAW,CAAA;AAAA,YAC7CG;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA,IAKD,gBAAAW,EAAAF,GAAA,EAAsB,YAAYZ,GACjC,UAAC,gBAAAqB,
|
1
|
+
{"version":3,"file":"modal.js","sources":["../../../../src/features/ui/modals/modal.tsx"],"sourcesContent":["import type { IModalProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { captureException } from '@sentry/browser';\nimport { memo, Suspense, useCallback } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Error from '../../ui/error/error';\nimport Clickable from '../buttons/clickable/clickable';\nimport FlexView from '../layout/flex-view';\nimport AppLoader from '../loader/app-loader/app-loader';\nimport * as Styled from './modal-styled';\n\n/**\n * Modal component that renders modal content with close button\n * Handles animation state for entry and exit transitions\n */\nconst Modal: FC<IModalProps> = memo(({ modal, isClosing = false, onClose }) => {\n const { renderAs, element, modalWidth, isDismissable } = modal;\n\n const sentryCaptureException = useCallback((error: Error) => {\n captureException(error);\n }, []);\n\n const handleStopPropagation = useCallback((e: React.MouseEvent) => {\n e.stopPropagation();\n }, []);\n\n if (renderAs === 'bottom-sheet') {\n return (\n <Styled.ModalContainer $isClosing={isClosing} onClick={isDismissable ? onClose : () => null}>\n <Styled.BottomSheetModal $isClosing={isClosing} onClick={handleStopPropagation}>\n <ErrorBoundary\n fallback={\n <FlexView $gap={24}>\n <Error height=\"100%\" />\n </FlexView>\n }\n onError={sentryCaptureException}\n >\n <Suspense fallback={<AppLoader height=\"50vh\" />}>{element}</Suspense>\n </ErrorBoundary>\n </Styled.BottomSheetModal>\n </Styled.ModalContainer>\n );\n }\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <ErrorBoundary\n fallback={\n <Styled.ModalLoaderWrapper>\n <Error height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n onError={sentryCaptureException}\n >\n <Suspense\n fallback={\n <Styled.ModalLoaderWrapper>\n <AppLoader height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n >\n <Styled.SpotlightModal $isClosing={isClosing} />\n {element}\n </Suspense>\n </ErrorBoundary>\n </Styled.ModalContainer>\n );\n }\n\n if (renderAs === 'fullscreen-transparent') {\n return (\n <Styled.TransparentModalContainer $isClosing={isClosing}>\n {element}\n </Styled.TransparentModalContainer>\n );\n }\n\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.BaseModal $isClosing={isClosing} $width={modalWidth}>\n {isDismissable !== false && (\n <Styled.CloseButtonContainer $modalWidth={modalWidth}>\n <Clickable label=\"Close\" onClick={onClose}>\n <CrossIcon width={40} height={40} />\n </Clickable>\n </Styled.CloseButtonContainer>\n )}\n <Styled.BaseModalContent $modalWidth={modalWidth}>\n <ErrorBoundary\n fallback={<Error height=\"50vh\" size=\"compact\" />}\n onError={sentryCaptureException}\n >\n <Suspense fallback={<AppLoader height=\"50vh\" />}>{element}</Suspense>\n </ErrorBoundary>\n </Styled.BaseModalContent>\n </Styled.BaseModal>\n </Styled.ModalContainer>\n );\n});\n\nexport default Modal;\n"],"names":["Modal","memo","modal","isClosing","onClose","renderAs","element","modalWidth","isDismissable","sentryCaptureException","useCallback","error","captureException","handleStopPropagation","e","Styled.ModalContainer","Styled.BottomSheetModal","jsx","ErrorBoundary","FlexView","Error","Suspense","AppLoader","Styled.ModalLoaderWrapper","jsxs","Styled.SpotlightModal","Styled.TransparentModalContainer","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;;;;;;AAkBM,MAAAA,IAAyBC,EAAK,CAAC,EAAE,OAAAC,GAAO,WAAAC,IAAY,IAAO,SAAAC,QAAc;AAC7E,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,YAAAC,GAAY,eAAAC,MAAkBN,GAEnDO,IAAyBC,EAAY,CAACC,MAAiB;AAC3D,IAAAC,EAAiBD,CAAK;AAAA,EACxB,GAAG,CAAE,CAAA,GAECE,IAAwBH,EAAY,CAACI,MAAwB;AACjE,IAAAA,EAAE,gBAAgB;AAAA,EACpB,GAAG,CAAE,CAAA;AAEL,SAAIT,MAAa,mCAEZU,GAAA,EAAsB,YAAYZ,GAAW,SAASK,IAAgBJ,IAAU,MAAM,MACrF,4BAACY,GAAA,EAAwB,YAAYb,GAAW,SAASU,GACvD,UAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,4BACGC,GAAS,EAAA,MAAM,IACd,UAAC,gBAAAF,EAAAG,GAAA,EAAM,QAAO,OAAA,CAAO,EACvB,CAAA;AAAA,MAEF,SAASX;AAAA,MAET,UAAA,gBAAAQ,EAACI,KAAS,UAAU,gBAAAJ,EAACK,KAAU,QAAO,OAAO,CAAA,GAAK,UAAQhB,EAAA,CAAA;AAAA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