@cuemath/leap 3.0.1-rj-0 → 3.0.2-as1
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/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +100 -107
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +93 -96
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial-styled.js +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial-styled.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark.js +19 -20
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/hooks/use-chapter-journey.js +52 -48
- package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -1
- package/dist/features/journey/use-journey/constants.js +4 -2
- package/dist/features/journey/use-journey/constants.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +6 -5
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/ui/constants/z-index.js +1 -2
- package/dist/features/ui/constants/z-index.js.map +1 -1
- package/dist/features/ui/theme/get-theme.js +19 -21
- package/dist/features/ui/theme/get-theme.js.map +1 -1
- package/dist/index.d.ts +0 -6
- package/package.json +1 -1
- package/dist/features/ui/theme/device.js +0 -5
- package/dist/features/ui/theme/device.js.map +0 -1
@@ -1,48 +1,52 @@
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
2
|
-
import { useRef as n, useCallback as p, useMemo as
|
3
|
-
import
|
1
|
+
import { jsxs as x, jsx as o } from "react/jsx-runtime";
|
2
|
+
import { useRef as n, useCallback as p, useMemo as R, useEffect as N } from "react";
|
3
|
+
import _ from "../../chapters-v2/chapter-details/block-sections/block-sections.js";
|
4
4
|
import L from "../../chapters-v2/chapter-details/chapter-banner/chapter-banner.js";
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import {
|
5
|
+
import I from "../../chapters-v2/chapter-details/chapter-details.js";
|
6
|
+
import k from "../../ui/layout/flex-view.js";
|
7
|
+
import P from "../../ui/separator/separator.js";
|
8
|
+
import { JOURNEY_ID_STUDENT as K } from "../journey-id/journey-id-student.js";
|
9
|
+
import { PROGRESS_STAT_MOCK as y, BLOCK_MOCKS as H } from "../mocks/chapter-page-journey-mock-data.js";
|
9
10
|
import { IndicatorType as l } from "../use-journey/constants.js";
|
10
|
-
import { useJourney as
|
11
|
+
import { useJourney as v } from "../use-journey/use-journey.js";
|
11
12
|
import a from "./use-home-page-journey/tooltip-item.js";
|
12
|
-
const
|
13
|
-
const t =
|
13
|
+
const $ = () => {
|
14
|
+
const t = K.CHAPTER_PAGE_JOURNEY, r = n(null), e = n(null), s = n(null), c = n([]), { nextCoachmark: d, setJourney: h, endJourney: C } = v(), i = p(() => {
|
14
15
|
d(t, !1, 0, !0);
|
15
16
|
}, [t, d]), g = p(() => {
|
16
17
|
document.body.style.overflow = "unset", C(t);
|
17
18
|
}, [C, t]), f = p(
|
18
|
-
({ chapterDetails:
|
19
|
-
const { name: O, image_hue:
|
20
|
-
if (!(
|
19
|
+
({ chapterDetails: m, userChapterId: B, studentId: E, userType: T }) => {
|
20
|
+
const { name: O, image_hue: u, image_url: b } = m;
|
21
|
+
if (!(r != null && r.current) || !(e != null && e.current) || !s.current)
|
21
22
|
return;
|
22
|
-
const
|
23
|
+
const S = [
|
23
24
|
{
|
24
|
-
originalElementToHighlightRef:
|
25
|
+
originalElementToHighlightRef: r,
|
25
26
|
isActive: !1,
|
26
27
|
type: l.TOOLTIP,
|
27
|
-
elementToHighlight: /* @__PURE__ */
|
28
|
-
P,
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
28
|
+
elementToHighlight: /* @__PURE__ */ x(k, { children: [
|
29
|
+
/* @__PURE__ */ o(P, { heightX: 10 }),
|
30
|
+
/* @__PURE__ */ o(
|
31
|
+
I,
|
32
|
+
{
|
33
|
+
userChapterId: B,
|
34
|
+
studentId: E,
|
35
|
+
userType: T,
|
36
|
+
onBlockSkipUnskip: () => null,
|
37
|
+
onNodeAttempt: () => null,
|
38
|
+
onNodeAttemptLocationChange: () => null,
|
39
|
+
onNodeMarkAsDone: () => null,
|
40
|
+
onNodeReattempt: () => null,
|
41
|
+
onNodeReview: () => null,
|
42
|
+
onNodeView: () => null,
|
43
|
+
onExit: () => null
|
44
|
+
}
|
45
|
+
)
|
46
|
+
] }),
|
43
47
|
indicator: {
|
44
|
-
position: "
|
45
|
-
tooltipYCoOrdinates: -
|
48
|
+
position: "top",
|
49
|
+
tooltipYCoOrdinates: -140,
|
46
50
|
backgroundColor: "BLUE_4",
|
47
51
|
borderColor: "BLACK",
|
48
52
|
arrowColor: "BLACK",
|
@@ -59,14 +63,14 @@ const F = () => {
|
|
59
63
|
}
|
60
64
|
},
|
61
65
|
{
|
62
|
-
originalElementToHighlightRef:
|
66
|
+
originalElementToHighlightRef: e,
|
63
67
|
elementToHighlight: /* @__PURE__ */ o(
|
64
68
|
L,
|
65
69
|
{
|
66
70
|
title: O,
|
67
|
-
progressStats:
|
71
|
+
progressStats: y,
|
68
72
|
imageUrl: b,
|
69
|
-
imageHue:
|
73
|
+
imageHue: u
|
70
74
|
}
|
71
75
|
),
|
72
76
|
type: l.TOOLTIP,
|
@@ -91,14 +95,14 @@ const F = () => {
|
|
91
95
|
isActive: !1
|
92
96
|
},
|
93
97
|
{
|
94
|
-
originalElementToHighlightRef:
|
98
|
+
originalElementToHighlightRef: e,
|
95
99
|
elementToHighlight: /* @__PURE__ */ o(
|
96
100
|
L,
|
97
101
|
{
|
98
102
|
title: O,
|
99
|
-
progressStats:
|
103
|
+
progressStats: y,
|
100
104
|
imageUrl: b,
|
101
|
-
imageHue:
|
105
|
+
imageHue: u
|
102
106
|
}
|
103
107
|
),
|
104
108
|
type: l.TOOLTIP,
|
@@ -124,7 +128,7 @@ const F = () => {
|
|
124
128
|
},
|
125
129
|
{
|
126
130
|
originalElementToHighlightRef: s,
|
127
|
-
elementToHighlight: /* @__PURE__ */ o(
|
131
|
+
elementToHighlight: /* @__PURE__ */ o(k, { $widthX: 50, children: /* @__PURE__ */ o(_, { userType: T, blocks: H, imageHue: u }) }),
|
128
132
|
type: l.TOOLTIP,
|
129
133
|
indicator: {
|
130
134
|
position: "top",
|
@@ -147,27 +151,27 @@ const F = () => {
|
|
147
151
|
isActive: !1
|
148
152
|
}
|
149
153
|
];
|
150
|
-
h(t,
|
154
|
+
h(t, S);
|
151
155
|
const w = setTimeout(() => {
|
152
156
|
clearTimeout(w), window.scrollTo(0, 0), document.body.style.overflow = "hidden", i();
|
153
157
|
}, 500);
|
154
158
|
c.current.push(w);
|
155
159
|
},
|
156
160
|
[i, g, h, t]
|
157
|
-
),
|
161
|
+
), A = R(
|
158
162
|
() => ({
|
159
|
-
chapterPageRef:
|
160
|
-
bannerRef:
|
163
|
+
chapterPageRef: r,
|
164
|
+
bannerRef: e,
|
161
165
|
coreBlocksRef: s,
|
162
166
|
startJourney: f
|
163
167
|
}),
|
164
168
|
[f]
|
165
169
|
);
|
166
|
-
return
|
167
|
-
c.current.forEach((
|
168
|
-
}, []),
|
170
|
+
return N(() => () => {
|
171
|
+
c.current.forEach((m) => clearTimeout(m)), c.current = [];
|
172
|
+
}, []), A;
|
169
173
|
};
|
170
174
|
export {
|
171
|
-
|
175
|
+
$ as useChapterPageJourney
|
172
176
|
};
|
173
177
|
//# sourceMappingURL=use-chapter-journey.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-chapter-journey.js","sources":["../../../../src/features/journey/hooks/use-chapter-journey.tsx"],"sourcesContent":["import type { IUserChapterData } from '../../chapters-v2/chapter-details/chapter-details-types';\nimport type { IArrowTooltipProps } from '../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { TUserTypes } from '../../ui/types';\nimport type { ICoachmarkProps } from '../use-journey/journey-context-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport BlockSections from '../../chapters-v2/chapter-details/block-sections/block-sections';\nimport ChapterBanner from '../../chapters-v2/chapter-details/chapter-banner/chapter-banner';\nimport ChapterDetails from '../../chapters-v2/chapter-details/chapter-details';\nimport FlexView from '../../ui/layout/flex-view';\nimport { JOURNEY_ID_STUDENT } from '../journey-id/journey-id-student';\nimport { BLOCK_MOCKS, PROGRESS_STAT_MOCK } from '../mocks/chapter-page-journey-mock-data';\nimport { IndicatorType } from '../use-journey/constants';\nimport { useJourney } from '../use-journey/use-journey';\nimport TooltipItem from './use-home-page-journey/tooltip-item';\n\ninterface IChapterStartJourneyProps {\n chapterDetails: IUserChapterData;\n userChapterId: string;\n studentId: string;\n userType: TUserTypes;\n}\n\nexport const useChapterPageJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.CHAPTER_PAGE_JOURNEY;\n\n const chapterPageRef = useRef<HTMLDivElement>(null);\n const bannerRef = useRef<HTMLDivElement>(null);\n const coreBlocksRef = useRef<HTMLDivElement>(null);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n\n const handleNextCoachmark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, true);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n endJourney(journeyId);\n }, [endJourney, journeyId]);\n\n const startJourney = useCallback(\n ({ chapterDetails, userChapterId, studentId, userType }: IChapterStartJourneyProps) => {\n const { name, image_hue: imageHue, image_url: imageUrl } = chapterDetails;\n\n if (!chapterPageRef?.current || !bannerRef?.current || !coreBlocksRef.current) {\n return;\n }\n\n const chapterPageRect = chapterPageRef.current.getBoundingClientRect();\n\n const chapterPageSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: chapterPageRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <ChapterDetails\n userChapterId={userChapterId}\n studentId={studentId}\n userType={userType}\n onBlockSkipUnskip={() => null}\n onNodeAttempt={() => null}\n onNodeAttemptLocationChange={() => null}\n onNodeMarkAsDone={() => null}\n onNodeReattempt={() => null}\n onNodeReview={() => null}\n onNodeView={() => null}\n onExit={() => null}\n />\n ),\n indicator: {\n position: 'left',\n tooltipYCoOrdinates: -(chapterPageRect.height / 2) + 178,\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text=\"Welcome to the all new chapter experience.\"\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: bannerRef,\n elementToHighlight: (\n <ChapterBanner\n title={name}\n progressStats={PROGRESS_STAT_MOCK}\n imageUrl={imageUrl}\n imageHue={imageHue}\n />\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'bottom',\n tooltipXCoOrdinates: -45,\n tooltipYCoOrdinates: -40,\n backgroundColor: 'ORANGE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n width: 264,\n arrowSize: 12,\n tooltipItem: (\n <TooltipItem\n text=\"A chapter is divided into *core sheets (compulsory), and supplementary sheets.\"\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: bannerRef,\n elementToHighlight: (\n <ChapterBanner\n title={name}\n progressStats={PROGRESS_STAT_MOCK}\n imageUrl={imageUrl}\n imageHue={imageHue}\n />\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'bottom',\n tooltipXCoOrdinates: -275,\n tooltipYCoOrdinates: -15,\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text=\"Easily track the progress of the core sheets.\"\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: coreBlocksRef,\n elementToHighlight: (\n <FlexView $widthX={50}>\n <BlockSections userType={userType} blocks={BLOCK_MOCKS} imageHue={imageHue} />\n </FlexView>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -150,\n tooltipYCoOrdinates: -260,\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text=\"Core sheets are marked to help you find them faster.\"\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, chapterPageSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n window.scrollTo(0, 0);\n document.body.style.overflow = 'hidden';\n handleNextCoachmark();\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n },\n [handleNextCoachmark, handleEndJourney, setJourney, journeyId],\n );\n\n const data = useMemo(\n () => ({\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n startJourney,\n }),\n [startJourney],\n );\n\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, []);\n\n return data;\n};\n"],"names":["useChapterPageJourney","journeyId","JOURNEY_ID_STUDENT","chapterPageRef","useRef","bannerRef","coreBlocksRef","timerRefs","nextCoachmark","setJourney","endJourney","useJourney","handleNextCoachmark","useCallback","handleEndJourney","startJourney","chapterDetails","userChapterId","studentId","userType","name","imageHue","imageUrl","chapterPageRect","chapterPageSteps","IndicatorType","jsx","ChapterDetails","TooltipItem","ChapterBanner","PROGRESS_STAT_MOCK","FlexView","BlockSections","BLOCK_MOCKS","delayBeforeStart","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;AAwBO,MAAMA,IAAwB,MAAM;AACzC,QAAMC,IAAYC,EAAmB,sBAE/BC,IAAiBC,EAAuB,IAAI,GAC5CC,IAAYD,EAAuB,IAAI,GACvCE,IAAgBF,EAAuB,IAAI,GAC3CG,IAAYH,EAAwC,CAAA,CAAE,GACtD,EAAE,eAAAI,GAAe,YAAAC,GAAY,YAAAC,MAAeC,EAAW,GAEvDC,IAAsBC,EAAY,MAAM;AAC9B,IAAAL,EAAAP,GAAW,IAAO,GAAG,EAAI;AAAA,EAAA,GACtC,CAACA,GAAWO,CAAa,CAAC,GAEvBM,IAAmBD,EAAY,MAAM;AAChC,aAAA,KAAK,MAAM,WAAW,SAC/BH,EAAWT,CAAS;AAAA,EAAA,GACnB,CAACS,GAAYT,CAAS,CAAC,GAEpBc,IAAeF;AAAA,IACnB,CAAC,EAAE,gBAAAG,GAAgB,eAAAC,GAAe,WAAAC,GAAW,UAAAC,QAA0C;AACrF,YAAM,EAAE,MAAAC,GAAM,WAAWC,GAAU,WAAWC,EAAa,IAAAN;AAEvD,UAAA,EAACb,KAAA,QAAAA,EAAgB,YAAW,EAACE,KAAA,QAAAA,EAAW,YAAW,CAACC,EAAc;AACpE;AAGI,YAAAiB,IAAkBpB,EAAe,QAAQ,sBAAsB,GAE/DqB,IAAsC;AAAA,QAC1C;AAAA,UACE,+BAA+BrB;AAAA,UAC/B,UAAU;AAAA,UACV,MAAMsB,EAAc;AAAA,UACpB,oBACE,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,eAAAV;AAAA,cACA,WAAAC;AAAA,cACA,UAAAC;AAAA,cACA,mBAAmB,MAAM;AAAA,cACzB,eAAe,MAAM;AAAA,cACrB,6BAA6B,MAAM;AAAA,cACnC,kBAAkB,MAAM;AAAA,cACxB,iBAAiB,MA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AAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAGf,SAAAsB,EAAU,MACD,MAAM;AACX,IAAA9B,EAAU,QAAQ,QAAQ,CAAS+B,MAAA,aAAaA,CAAK,CAAC,GACtD/B,EAAU,UAAU;EAAC,GAEtB,CAAE,CAAA,GAEE4B;AACT;"}
|
1
|
+
{"version":3,"file":"use-chapter-journey.js","sources":["../../../../src/features/journey/hooks/use-chapter-journey.tsx"],"sourcesContent":["import type { IUserChapterData } from '../../chapters-v2/chapter-details/chapter-details-types';\nimport type { IArrowTooltipProps } from '../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { TUserTypes } from '../../ui/types';\nimport type { ICoachmarkProps } from '../use-journey/journey-context-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport BlockSections from '../../chapters-v2/chapter-details/block-sections/block-sections';\nimport ChapterBanner from '../../chapters-v2/chapter-details/chapter-banner/chapter-banner';\nimport ChapterDetails from '../../chapters-v2/chapter-details/chapter-details';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport { JOURNEY_ID_STUDENT } from '../journey-id/journey-id-student';\nimport { BLOCK_MOCKS, PROGRESS_STAT_MOCK } from '../mocks/chapter-page-journey-mock-data';\nimport { IndicatorType } from '../use-journey/constants';\nimport { useJourney } from '../use-journey/use-journey';\nimport TooltipItem from './use-home-page-journey/tooltip-item';\n\ninterface IChapterStartJourneyProps {\n chapterDetails: IUserChapterData;\n userChapterId: string;\n studentId: string;\n userType: TUserTypes;\n}\n\nexport const useChapterPageJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.CHAPTER_PAGE_JOURNEY;\n\n const chapterPageRef = useRef<HTMLDivElement>(null);\n const bannerRef = useRef<HTMLDivElement>(null);\n const coreBlocksRef = useRef<HTMLDivElement>(null);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n\n const handleNextCoachmark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, true);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n endJourney(journeyId);\n }, [endJourney, journeyId]);\n\n const startJourney = useCallback(\n ({ chapterDetails, userChapterId, studentId, userType }: IChapterStartJourneyProps) => {\n const { name, image_hue: imageHue, image_url: imageUrl } = chapterDetails;\n\n if (!chapterPageRef?.current || !bannerRef?.current || !coreBlocksRef.current) {\n return;\n }\n\n const chapterPageSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: chapterPageRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <FlexView>\n <Separator heightX={10} />\n <ChapterDetails\n userChapterId={userChapterId}\n studentId={studentId}\n userType={userType}\n onBlockSkipUnskip={() => null}\n onNodeAttempt={() => null}\n onNodeAttemptLocationChange={() => null}\n onNodeMarkAsDone={() => null}\n onNodeReattempt={() => null}\n onNodeReview={() => null}\n onNodeView={() => null}\n onExit={() => null}\n />\n </FlexView>\n ),\n indicator: {\n position: 'top',\n tooltipYCoOrdinates: -140,\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text=\"Welcome to the all new chapter experience.\"\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: bannerRef,\n elementToHighlight: (\n <ChapterBanner\n title={name}\n progressStats={PROGRESS_STAT_MOCK}\n imageUrl={imageUrl}\n imageHue={imageHue}\n />\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'bottom',\n tooltipXCoOrdinates: -45,\n tooltipYCoOrdinates: -40,\n backgroundColor: 'ORANGE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n width: 264,\n arrowSize: 12,\n tooltipItem: (\n <TooltipItem\n text=\"A chapter is divided into *core sheets (compulsory), and supplementary sheets.\"\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: bannerRef,\n elementToHighlight: (\n <ChapterBanner\n title={name}\n progressStats={PROGRESS_STAT_MOCK}\n imageUrl={imageUrl}\n imageHue={imageHue}\n />\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'bottom',\n tooltipXCoOrdinates: -275,\n tooltipYCoOrdinates: -15,\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text=\"Easily track the progress of the core sheets.\"\n buttonLabel=\"Next\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: coreBlocksRef,\n elementToHighlight: (\n <FlexView $widthX={50}>\n <BlockSections userType={userType} blocks={BLOCK_MOCKS} imageHue={imageHue} />\n </FlexView>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -150,\n tooltipYCoOrdinates: -260,\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <TooltipItem\n text=\"Core sheets are marked to help you find them faster.\"\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, chapterPageSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n window.scrollTo(0, 0);\n document.body.style.overflow = 'hidden';\n handleNextCoachmark();\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n },\n [handleNextCoachmark, handleEndJourney, setJourney, journeyId],\n );\n\n const data = useMemo(\n () => ({\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n startJourney,\n }),\n [startJourney],\n );\n\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, []);\n\n return data;\n};\n"],"names":["useChapterPageJourney","journeyId","JOURNEY_ID_STUDENT","chapterPageRef","useRef","bannerRef","coreBlocksRef","timerRefs","nextCoachmark","setJourney","endJourney","useJourney","handleNextCoachmark","useCallback","handleEndJourney","startJourney","chapterDetails","userChapterId","studentId","userType","name","imageHue","imageUrl","chapterPageSteps","IndicatorType","FlexView","jsx","Separator","ChapterDetails","TooltipItem","ChapterBanner","PROGRESS_STAT_MOCK","BlockSections","BLOCK_MOCKS","delayBeforeStart","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;;AAyBO,MAAMA,IAAwB,MAAM;AACzC,QAAMC,IAAYC,EAAmB,sBAE/BC,IAAiBC,EAAuB,IAAI,GAC5CC,IAAYD,EAAuB,IAAI,GACvCE,IAAgBF,EAAuB,IAAI,GAC3CG,IAAYH,EAAwC,CAAA,CAAE,GACtD,EAAE,eAAAI,GAAe,YAAAC,GAAY,YAAAC,MAAeC,EAAW,GAEvDC,IAAsBC,EAAY,MAAM;AAC9B,IAAAL,EAAAP,GAAW,IAAO,GAAG,EAAI;AAAA,EAAA,GACtC,CAACA,GAAWO,CAAa,CAAC,GAEvBM,IAAmBD,EAAY,MAAM;AAChC,aAAA,KAAK,MAAM,WAAW,SAC/BH,EAAWT,CAAS;AAAA,EAAA,GACnB,CAACS,GAAYT,CAAS,CAAC,GAEpBc,IAAeF;AAAA,IACnB,CAAC,EAAE,gBAAAG,GAAgB,eAAAC,GAAe,WAAAC,GAAW,UAAAC,QAA0C;AACrF,YAAM,EAAE,MAAAC,GAAM,WAAWC,GAAU,WAAWC,EAAa,IAAAN;AAEvD,UAAA,EAACb,KAAA,QAAAA,EAAgB,YAAW,EAACE,KAAA,QAAAA,EAAW,YAAW,CAACC,EAAc;AACpE;AAGF,YAAMiB,IAAsC;AAAA,QAC1C;AAAA,UACE,+BAA+BpB;AAAA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EhC,YAAAW,IAAmB,WAAW,MAAM;AACxC,qBAAaA,CAAgB,GACtB,OAAA,SAAS,GAAG,CAAC,GACX,SAAA,KAAK,MAAM,WAAW,UACXtB;SACnB,GAAG;AAEI,MAAAL,EAAA,QAAQ,KAAK2B,CAAgB;AAAA,IACzC;AAAA,IACA,CAACtB,GAAqBE,GAAkBL,GAAYR,CAAS;AAAA,EAAA,GAGzDkC,IAAOC;AAAA,IACX,OAAO;AAAA,MACL,gBAAAjC;AAAA,MACA,WAAAE;AAAA,MACA,eAAAC;AAAA,MACA,cAAAS;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAGf,SAAAsB,EAAU,MACD,MAAM;AACX,IAAA9B,EAAU,QAAQ,QAAQ,CAAS+B,MAAA,aAAaA,CAAK,CAAC,GACtD/B,EAAU,UAAU;EAAC,GAEtB,CAAE,CAAA,GAEE4B;AACT;"}
|
@@ -1,5 +1,7 @@
|
|
1
|
-
var
|
1
|
+
var e = /* @__PURE__ */ ((t) => (t.TOOLTIP = "tooltip", t.NUDGE = "nudge", t))(e || {});
|
2
|
+
const o = 1e3;
|
2
3
|
export {
|
3
|
-
|
4
|
+
o as BLUR_OVERLAY_Z_INDEX,
|
5
|
+
e as IndicatorType
|
4
6
|
};
|
5
7
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/features/journey/use-journey/constants.ts"],"sourcesContent":["export enum IndicatorType {\n TOOLTIP = 'tooltip',\n NUDGE = 'nudge',\n}\n"],"names":["IndicatorType"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,QAAQ,SAFEA,IAAAA,KAAA,CAAA,CAAA;"}
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/features/journey/use-journey/constants.ts"],"sourcesContent":["export enum IndicatorType {\n TOOLTIP = 'tooltip',\n NUDGE = 'nudge',\n}\nexport const BLUR_OVERLAY_Z_INDEX = 1000;\n"],"names":["IndicatorType","BLUR_OVERLAY_Z_INDEX"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,QAAQ,SAFEA,IAAAA,KAAA,CAAA,CAAA;AAIL,MAAMC,IAAuB;"}
|
@@ -1,18 +1,19 @@
|
|
1
|
-
import t, { css as
|
2
|
-
|
1
|
+
import t, { css as i } from "styled-components";
|
2
|
+
import { BLUR_OVERLAY_Z_INDEX as e } from "./constants.js";
|
3
|
+
const b = t.div`
|
3
4
|
position: fixed;
|
4
5
|
top: 0;
|
5
6
|
right: 0;
|
6
7
|
bottom: 0;
|
7
8
|
left: 0;
|
8
|
-
z-index: ${
|
9
|
-
${({ isJourneyBlurred: o, theme: r }) => o &&
|
9
|
+
z-index: ${e};
|
10
|
+
${({ isJourneyBlurred: o, theme: r }) => o && i`
|
10
11
|
background: ${r.colors.BLACK_T_38};
|
11
12
|
backdrop-filter: blur(80px);
|
12
13
|
-webkit-backdrop-filter: blur(80px);
|
13
14
|
`}
|
14
15
|
`;
|
15
16
|
export {
|
16
|
-
|
17
|
+
b as Overlay
|
17
18
|
};
|
18
19
|
//# sourceMappingURL=journey-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { css } from 'styled-components';\n\nexport const Overlay = styled.div<{ isJourneyBlurred: boolean }>`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${
|
1
|
+
{"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { css } from 'styled-components';\n\nimport { BLUR_OVERLAY_Z_INDEX } from './constants';\n\nexport const Overlay = styled.div<{ isJourneyBlurred: boolean }>`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${BLUR_OVERLAY_Z_INDEX};\n ${({ isJourneyBlurred, theme }) =>\n isJourneyBlurred &&\n css`\n background: ${theme.colors.BLACK_T_38};\n backdrop-filter: blur(80px);\n -webkit-backdrop-filter: blur(80px);\n `}\n`;\n``;\n"],"names":["Overlay","styled","BLUR_OVERLAY_Z_INDEX","isJourneyBlurred","theme","css"],"mappings":";;AAKO,MAAMA,IAAUC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMjBC,CAAoB;AAAA,IAC7B,CAAC,EAAE,kBAAAC,GAAkB,OAAAC,EAAA,MACrBD,KACAE;AAAA,oBACgBD,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA,KAGtC;AAAA;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"z-index.js","sources":["../../../../src/features/ui/constants/z-index.ts"],"sourcesContent":["const ZINDEX = {\n CHAPTER_CROWN_ICON: 4,\n CHAPTER_PLUS_ICON: 2,\n CHAPTER_PROGRESS_SVG: 2,\n LPAR_SHEET_ITEM_BOTTOM_DASH_BOX: 1,\n LPAR_SHEET_ITEM_TOP_VERTICAL_ICON: 2,\n MODAL: 20,\n SAT_SUMMARY_SCORE: 25, //* SAT_SUMMARY_SCORE > MODAL\n CANVAS_SCRIBBLING: 26, //* CANVAS_SCRIBBLING > Learnosity\n TILE_CONTAINER: 30, //whiteboard\n QUESTION_TIPS: -1,\n DESMOS_CALCULATOR: 2,\n GOAL_CHAPTER_SHEETS_MENU: 4,\n
|
1
|
+
{"version":3,"file":"z-index.js","sources":["../../../../src/features/ui/constants/z-index.ts"],"sourcesContent":["const ZINDEX = {\n CHAPTER_CROWN_ICON: 4,\n CHAPTER_PLUS_ICON: 2,\n CHAPTER_PROGRESS_SVG: 2,\n LPAR_SHEET_ITEM_BOTTOM_DASH_BOX: 1,\n LPAR_SHEET_ITEM_TOP_VERTICAL_ICON: 2,\n MODAL: 20,\n SAT_SUMMARY_SCORE: 25, //* SAT_SUMMARY_SCORE > MODAL\n CANVAS_SCRIBBLING: 26, //* CANVAS_SCRIBBLING > Learnosity\n TILE_CONTAINER: 30, //whiteboard\n QUESTION_TIPS: -1,\n DESMOS_CALCULATOR: 2,\n GOAL_CHAPTER_SHEETS_MENU: 4,\n} as const;\n\nexport { ZINDEX };\n"],"names":["ZINDEX"],"mappings":"AAAA,MAAMA,IAAS;AAAA,EACb,oBAAoB;AAAA,EACpB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,iCAAiC;AAAA,EACjC,mCAAmC;AAAA,EACnC,OAAO;AAAA,EACP,mBAAmB;AAAA;AAAA,EACnB,mBAAmB;AAAA;AAAA,EACnB,gBAAgB;AAAA;AAAA,EAChB,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,0BAA0B;AAC5B;"}
|
@@ -1,32 +1,30 @@
|
|
1
1
|
import r from "./arrow-tooltip.js";
|
2
2
|
import e from "./button.js";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import f from "./
|
7
|
-
import p from "./
|
8
|
-
import u from "./
|
9
|
-
import
|
10
|
-
import
|
11
|
-
|
12
|
-
const
|
13
|
-
const t = p(), { gutter: o } = t;
|
3
|
+
import m from "./checkbox.js";
|
4
|
+
import g, { hues as i } from "./clrs.js";
|
5
|
+
import n from "./input.js";
|
6
|
+
import f from "./layout.js";
|
7
|
+
import p from "./tab.js";
|
8
|
+
import u from "./text.js";
|
9
|
+
import x from "./text-button.js";
|
10
|
+
import { getZIndexConfig as C } from "./z-index.js";
|
11
|
+
const d = () => {
|
12
|
+
const t = f(), { gutter: o } = t;
|
14
13
|
return {
|
15
14
|
arrowTooltip: r(),
|
16
15
|
button: e(o),
|
17
|
-
colors:
|
18
|
-
hues:
|
19
|
-
input:
|
20
|
-
checkbox:
|
16
|
+
colors: g(),
|
17
|
+
hues: i,
|
18
|
+
input: n(o),
|
19
|
+
checkbox: m(o),
|
21
20
|
layout: t,
|
22
|
-
tab:
|
23
|
-
text:
|
24
|
-
textButton:
|
25
|
-
zIndex:
|
26
|
-
device: n()
|
21
|
+
tab: p(t.gutter),
|
22
|
+
text: u(),
|
23
|
+
textButton: x(),
|
24
|
+
zIndex: C()
|
27
25
|
};
|
28
26
|
};
|
29
27
|
export {
|
30
|
-
|
28
|
+
d as getTheme
|
31
29
|
};
|
32
30
|
//# sourceMappingURL=get-theme.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-theme.js","sources":["../../../../src/features/ui/theme/get-theme.ts"],"sourcesContent":["import type { DefaultTheme } from 'styled-components';\n\nimport getArrowTooltipConfig from './arrow-tooltip';\nimport getButtonConfig from './button';\nimport getCheckboxConfig from './checkbox';\nimport getColors, { hues } from './clrs';\nimport
|
1
|
+
{"version":3,"file":"get-theme.js","sources":["../../../../src/features/ui/theme/get-theme.ts"],"sourcesContent":["import type { DefaultTheme } from 'styled-components';\n\nimport getArrowTooltipConfig from './arrow-tooltip';\nimport getButtonConfig from './button';\nimport getCheckboxConfig from './checkbox';\nimport getColors, { hues } from './clrs';\nimport getInputConfig from './input';\nimport getLayout from './layout';\nimport getTabConfig from './tab';\nimport getTextTypes from './text';\nimport getTextButtonConfig from './text-button';\nimport { getZIndexConfig } from './z-index';\n\nconst getTheme: () => DefaultTheme = () => {\n const layout = getLayout();\n const { gutter } = layout;\n\n return {\n arrowTooltip: getArrowTooltipConfig(),\n button: getButtonConfig(gutter),\n colors: getColors(),\n hues: hues,\n input: getInputConfig(gutter),\n checkbox: getCheckboxConfig(gutter),\n layout,\n tab: getTabConfig(layout.gutter),\n text: getTextTypes(),\n textButton: getTextButtonConfig(),\n zIndex: getZIndexConfig(),\n };\n};\n\nexport { getTheme };\n"],"names":["getTheme","layout","getLayout","gutter","getArrowTooltipConfig","getButtonConfig","getColors","hues","getInputConfig","getCheckboxConfig","getTabConfig","getTextTypes","getTextButtonConfig","getZIndexConfig"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAA+B,MAAM;AACzC,QAAMC,IAASC,KACT,EAAE,QAAAC,EAAW,IAAAF;AAEZ,SAAA;AAAA,IACL,cAAcG,EAAsB;AAAA,IACpC,QAAQC,EAAgBF,CAAM;AAAA,IAC9B,QAAQG,EAAU;AAAA,IAClB,MAAAC;AAAA,IACA,OAAOC,EAAeL,CAAM;AAAA,IAC5B,UAAUM,EAAkBN,CAAM;AAAA,IAClC,QAAAF;AAAA,IACA,KAAKS,EAAaT,EAAO,MAAM;AAAA,IAC/B,MAAMU,EAAa;AAAA,IACnB,YAAYC,EAAoB;AAAA,IAChC,QAAQC,EAAgB;AAAA,EAAA;AAE5B;"}
|
package/dist/index.d.ts
CHANGED
@@ -457,8 +457,6 @@ declare const getCheckboxConfig: IGetCheckboxConfig;
|
|
457
457
|
|
458
458
|
declare function getColors(): TColorsMap;
|
459
459
|
|
460
|
-
declare const getDeviceConfig: () => TSupportedDevices;
|
461
|
-
|
462
460
|
declare const getInputConfig: IGetInputConfig;
|
463
461
|
|
464
462
|
declare function getLayout(multiplier?: number): ILayout;
|
@@ -3092,7 +3090,6 @@ export declare interface ITheme {
|
|
3092
3090
|
textButton: ReturnType<typeof getTextButtonConfig>;
|
3093
3091
|
zIndex: ReturnType<typeof getZIndexConfig>;
|
3094
3092
|
checkbox: ReturnType<typeof getCheckboxConfig>;
|
3095
|
-
device: ReturnType<typeof getDeviceConfig>;
|
3096
3093
|
}
|
3097
3094
|
|
3098
3095
|
declare interface ITile {
|
@@ -5219,8 +5216,6 @@ declare type TSubscribe = (id: string, cb: (data: IActionData | IActionData[]) =
|
|
5219
5216
|
|
5220
5217
|
declare type TSubscribeMouseMove = (id: string, callback: (data: IPointerData) => void) => void;
|
5221
5218
|
|
5222
|
-
export declare type TSupportedDevices = 'mobile' | 'desktop';
|
5223
|
-
|
5224
5219
|
export declare type TTableMode = 'random' | 'sequence' | 'advance' | 'infinite';
|
5225
5220
|
|
5226
5221
|
export declare type TTabSizes = 'xsmall' | 'small' | 'regular' | 'medium';
|
@@ -5527,7 +5522,6 @@ declare const ZINDEX: {
|
|
5527
5522
|
readonly QUESTION_TIPS: -1;
|
5528
5523
|
readonly DESMOS_CALCULATOR: 2;
|
5529
5524
|
readonly GOAL_CHAPTER_SHEETS_MENU: 4;
|
5530
|
-
readonly JOURNEY_OVERLAY: 1000;
|
5531
5525
|
};
|
5532
5526
|
|
5533
5527
|
export { }
|
package/package.json
CHANGED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"device.js","sources":["../../../../src/features/ui/theme/device.ts"],"sourcesContent":["import type { TSupportedDevices } from '../types';\n\nexport const getDeviceConfig = (): TSupportedDevices => {\n const MOBILE_WIDTH = 600;\n\n return window.innerWidth <= MOBILE_WIDTH ? 'mobile' : 'desktop';\n};\n"],"names":["getDeviceConfig"],"mappings":"AAEO,MAAMA,IAAkB,MAGtB,OAAO,cAAc,MAAe,WAAW;"}
|