@cuemath/leap 3.3.34-m → 3.3.35-m
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.
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
4
|
-
const {
|
|
5
|
-
studentClassroomId:
|
|
6
|
-
});
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { useState as r, useCallback as c } from "react";
|
|
2
|
+
import l from "../../../communication/hooks/use-inclass-message-broker/use-inclass-message-broker.js";
|
|
3
|
+
const k = (s) => {
|
|
4
|
+
const { publish: e } = l({
|
|
5
|
+
studentClassroomId: s
|
|
6
|
+
}), [n, o] = r(null);
|
|
7
|
+
return { sendSticker: c(
|
|
8
|
+
(t, d) => {
|
|
9
|
+
const a = {
|
|
10
|
+
message: {
|
|
11
|
+
data: {
|
|
12
|
+
selectedSticker: {
|
|
13
|
+
id: t.id,
|
|
14
|
+
name: t.name
|
|
15
|
+
},
|
|
16
|
+
effectId: d
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
type: "STICKERS"
|
|
20
|
+
};
|
|
21
|
+
o(a), e == null || e({
|
|
22
|
+
eventName: "STICKERS",
|
|
23
|
+
eventPayload: a
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
[e]
|
|
27
|
+
), lastPayload: n };
|
|
25
28
|
};
|
|
26
29
|
export {
|
|
27
|
-
|
|
30
|
+
k as useHandleStickerSend
|
|
28
31
|
};
|
|
29
32
|
//# sourceMappingURL=use-handle-sticker-send.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-handle-sticker-send.js","sources":["../../../../../src/features/stickers/sticker-selector/hooks/use-handle-sticker-send.tsx"],"sourcesContent":["import type {\n IStickerData,\n TStickerAnimationEffects,\n TStickersPayload,\n} from '../../stickers-types';\n\nimport useInClassMessageBroker from '../../../communication/hooks/use-inclass-message-broker/use-inclass-message-broker';\
|
|
1
|
+
{"version":3,"file":"use-handle-sticker-send.js","sources":["../../../../../src/features/stickers/sticker-selector/hooks/use-handle-sticker-send.tsx"],"sourcesContent":["import type {\n IStickerData,\n TStickerAnimationEffects,\n TStickersPayload,\n} from '../../stickers-types';\n\nimport { useState, useCallback } from 'react';\n\nimport useInClassMessageBroker from '../../../communication/hooks/use-inclass-message-broker/use-inclass-message-broker';\n\nexport const useHandleStickerSend = (studentClassroomId: string) => {\n const { publish } = useInClassMessageBroker({\n studentClassroomId,\n });\n\n const [lastPayload, setLastPayload] = useState<TStickersPayload | null>(null);\n\n const sendSticker = useCallback(\n (sticker: IStickerData, effect: TStickerAnimationEffects) => {\n const payload: TStickersPayload = {\n message: {\n data: {\n selectedSticker: {\n id: sticker.id,\n name: sticker.name,\n },\n effectId: effect,\n },\n },\n type: 'STICKERS',\n };\n\n setLastPayload(payload);\n\n publish?.({\n eventName: 'STICKERS',\n eventPayload: payload,\n });\n },\n [publish],\n );\n\n return { sendSticker, lastPayload };\n};\n"],"names":["useHandleStickerSend","studentClassroomId","publish","useInClassMessageBroker","lastPayload","setLastPayload","useState","useCallback","sticker","effect","payload"],"mappings":";;AAUa,MAAAA,IAAuB,CAACC,MAA+B;AAC5D,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAwB;AAAA,IAC1C,oBAAAF;AAAA,EAAA,CACD,GAEK,CAACG,GAAaC,CAAc,IAAIC,EAAkC,IAAI;AA2BrE,SAAA,EAAE,aAzBWC;AAAA,IAClB,CAACC,GAAuBC,MAAqC;AAC3D,YAAMC,IAA4B;AAAA,QAChC,SAAS;AAAA,UACP,MAAM;AAAA,YACJ,iBAAiB;AAAA,cACf,IAAIF,EAAQ;AAAA,cACZ,MAAMA,EAAQ;AAAA,YAChB;AAAA,YACA,UAAUC;AAAA,UACZ;AAAA,QACF;AAAA,QACA,MAAM;AAAA,MAAA;AAGR,MAAAJ,EAAeK,CAAO,GAEZR,KAAA,QAAAA,EAAA;AAAA,QACR,WAAW;AAAA,QACX,cAAcQ;AAAA,MAAA;AAAA,IAElB;AAAA,IACA,CAACR,CAAO;AAAA,EAAA,GAGY,aAAAE;AACxB;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -7090,10 +7090,10 @@ export declare const useGetTestHelpData: (initialId?: string, initialQuery?: voi
|
|
|
7090
7090
|
} & Record<string, unknown>) | undefined;
|
|
7091
7091
|
};
|
|
7092
7092
|
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7093
|
+
export declare const useHandleStickerSend: (studentClassroomId: string) => {
|
|
7094
|
+
sendSticker: (sticker: IStickerData, effect: TStickerAnimationEffects) => void;
|
|
7095
|
+
lastPayload: TStickersPayload | null;
|
|
7096
|
+
};
|
|
7097
7097
|
|
|
7098
7098
|
export declare const useHomePageJourney: () => {
|
|
7099
7099
|
homepageRef: RefObject<HTMLDivElement>;
|