@cuemath/leap 3.0.2-as1 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +68 -66
  2. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -1
  3. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +74 -72
  4. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
  5. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +107 -100
  6. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  7. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +96 -93
  8. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
  9. package/dist/features/circle-games/games/tutorial/tutorial-styled.js +1 -1
  10. package/dist/features/circle-games/games/tutorial/tutorial-styled.js.map +1 -1
  11. package/dist/features/journey/comps/coachmark/coachmark.js +20 -19
  12. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  13. package/dist/features/journey/use-journey/constants.js +2 -4
  14. package/dist/features/journey/use-journey/constants.js.map +1 -1
  15. package/dist/features/journey/use-journey/journey-styled.js +5 -6
  16. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  17. package/dist/features/ui/border-path-animation/border-path-animation-styled.js +51 -0
  18. package/dist/features/ui/border-path-animation/border-path-animation-styled.js.map +1 -0
  19. package/dist/features/ui/border-path-animation/border-path-animation.js +108 -0
  20. package/dist/features/ui/border-path-animation/border-path-animation.js.map +1 -0
  21. package/dist/features/ui/constants/z-index.js +2 -1
  22. package/dist/features/ui/constants/z-index.js.map +1 -1
  23. package/dist/features/ui/theme/device.js +5 -0
  24. package/dist/features/ui/theme/device.js.map +1 -0
  25. package/dist/features/ui/theme/get-theme.js +21 -19
  26. package/dist/features/ui/theme/get-theme.js.map +1 -1
  27. package/dist/index.d.ts +6 -0
  28. package/package.json +1 -1
@@ -0,0 +1,51 @@
1
+ import i, { css as s } from "styled-components";
2
+ const o = i.div`
3
+ position: absolute;
4
+ z-index: 1;
5
+ overflow: hidden;
6
+ `, d = i(o)(
7
+ ({ $borderWidth: t }) => `
8
+ top: 0;
9
+ left: 0;
10
+ width: 100%;
11
+ height: ${t}px;
12
+ `
13
+ ), c = i(o)(
14
+ ({ $borderWidth: t }) => `
15
+ bottom: 0;
16
+ left: 0;
17
+ width: 100%;
18
+ height: ${t}px;
19
+ `
20
+ ), l = i(o)(
21
+ ({ $borderWidth: t }) => `
22
+ top: 0;
23
+ right: 0;
24
+ width: ${t}px;
25
+ height: 100%;
26
+ `
27
+ ), $ = i(o)(
28
+ ({ $borderWidth: t }) => `
29
+ top: 0;
30
+ left: 0;
31
+ width: ${t}px;
32
+ height: 100%;
33
+ `
34
+ ), g = i.div(
35
+ ({ theme: t, $width: n, $height: e, $borderColor: h, $animationDuration: p, $keyframes: r }) => s`
36
+ position: relative;
37
+ width: ${n}px;
38
+ height: ${e}px;
39
+ background-color: ${t.colors[h]};
40
+ opacity: 0;
41
+ animation: ${r} ${p}s linear infinite;
42
+ `
43
+ );
44
+ export {
45
+ c as BottomLineContainer,
46
+ $ as LeftLineContainer,
47
+ g as Line,
48
+ l as RightLineContainer,
49
+ d as TopLineContainer
50
+ };
51
+ //# sourceMappingURL=border-path-animation-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"border-path-animation-styled.js","sources":["../../../../src/features/ui/border-path-animation/border-path-animation-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../types';\nimport type { keyframes } from 'styled-components';\n\nimport styled, { css } from 'styled-components';\n\nconst LineContainer = styled.div`\n position: absolute;\n z-index: 1;\n overflow: hidden;\n`;\n\nexport const TopLineContainer = styled(LineContainer)<{\n $borderWidth: number;\n}>(\n ({ $borderWidth }) => `\n top: 0;\n left: 0;\n width: 100%;\n height: ${$borderWidth}px;\n`,\n);\n\nexport const BottomLineContainer = styled(LineContainer)<{\n $borderWidth: number;\n}>(\n ({ $borderWidth }) => `\n bottom: 0;\n left: 0;\n width: 100%;\n height: ${$borderWidth}px;\n`,\n);\n\nexport const RightLineContainer = styled(LineContainer)<{\n $borderWidth: number;\n}>(\n ({ $borderWidth }) => `\n top: 0;\n right: 0;\n width: ${$borderWidth}px;\n height: 100%;\n`,\n);\n\nexport const LeftLineContainer = styled(LineContainer)<{\n $borderWidth: number;\n}>(\n ({ $borderWidth }) => `\n top: 0;\n left: 0;\n width: ${$borderWidth}px;\n height: 100%;\n`,\n);\n\nexport const Line = styled.div<{\n $borderColor: TColorNames;\n $animationDuration: number;\n $keyframes: ReturnType<typeof keyframes>;\n $width: number;\n $height: number;\n}>(\n ({ theme, $width, $height, $borderColor, $animationDuration, $keyframes }) => css`\n position: relative;\n width: ${$width}px;\n height: ${$height}px;\n background-color: ${theme.colors[$borderColor]};\n opacity: 0;\n animation: ${$keyframes} ${$animationDuration}s linear infinite;\n `,\n);\n"],"names":["LineContainer","styled","TopLineContainer","$borderWidth","BottomLineContainer","RightLineContainer","LeftLineContainer","Line","theme","$width","$height","$borderColor","$animationDuration","$keyframes","css"],"mappings":";AAKA,MAAMA,IAAgBC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMhBC,IAAmBD,EAAOD,CAAa;AAAA,EAGlD,CAAC,EAAE,cAAAG,EAAA,MAAmB;AAAA;AAAA;AAAA;AAAA,YAIZA,CAAY;AAAA;AAExB,GAEaC,IAAsBH,EAAOD,CAAa;AAAA,EAGrD,CAAC,EAAE,cAAAG,EAAA,MAAmB;AAAA;AAAA;AAAA;AAAA,YAIZA,CAAY;AAAA;AAExB,GAEaE,IAAqBJ,EAAOD,CAAa;AAAA,EAGpD,CAAC,EAAE,cAAAG,EAAA,MAAmB;AAAA;AAAA;AAAA,WAGbA,CAAY;AAAA;AAAA;AAGvB,GAEaG,IAAoBL,EAAOD,CAAa;AAAA,EAGnD,CAAC,EAAE,cAAAG,EAAA,MAAmB;AAAA;AAAA;AAAA,WAGbA,CAAY;AAAA;AAAA;AAGvB,GAEaI,IAAON,EAAO;AAAA,EAOzB,CAAC,EAAE,OAAAO,GAAO,QAAAC,GAAQ,SAAAC,GAAS,cAAAC,GAAc,oBAAAC,GAAoB,YAAAC,EAAiB,MAAAC;AAAA;AAAA,aAEnEL,CAAM;AAAA,cACLC,CAAO;AAAA,wBACGF,EAAM,OAAOG,CAAY,CAAC;AAAA;AAAA,iBAEjCE,CAAU,IAAID,CAAkB;AAAA;AAEjD;"}
@@ -0,0 +1,108 @@
1
+ import { jsxs as p, Fragment as g, jsx as s } from "react/jsx-runtime";
2
+ import { memo as b, useState as d, useMemo as l, useRef as u, useLayoutEffect as C } from "react";
3
+ import { keyframes as L } from "styled-components";
4
+ import { TopLineContainer as k, Line as c, RightLineContainer as W, BottomLineContainer as R, LeftLineContainer as D } from "./border-path-animation-styled.js";
5
+ const F = (i, r) => {
6
+ const t = (i + r) * 2, o = i, e = r, y = i / t, n = (i + r) / t, a = (i + r + i) / t;
7
+ return {
8
+ top: [
9
+ [0, { x: 0, y: 0, o: 1 }],
10
+ [y, { x: o, y: 0, o: 1 }],
11
+ [y + 1e-3, { x: o, y: 0, o: 0 }],
12
+ [n - 1e-3, { x: -o, y: 0, o: 0 }],
13
+ [n, { x: -o, y: 0, o: 1 }],
14
+ [a, { x: 0, y: 0, o: 1 }],
15
+ [1, { x: 0, y: 0, o: 1 }]
16
+ ],
17
+ right: [
18
+ [0, { x: 0, y: 0, o: 1 }],
19
+ [y, { x: 0, y: 0, o: 1 }],
20
+ [n, { x: 0, y: e, o: 1 }],
21
+ [n + 1e-3, { x: 0, y: e, o: 0 }],
22
+ [a - 1e-3, { x: 0, y: -e, o: 0 }],
23
+ [a, { x: 0, y: -e, o: 1 }],
24
+ [1, { x: 0, y: 0, o: 1 }]
25
+ ],
26
+ bottom: [
27
+ [0, { x: o, y: 0, o: 1 }],
28
+ [y, { x: 0, y: 0, o: 1 }],
29
+ [n, { x: 0, y: 0, o: 1 }],
30
+ [a, { x: -o, y: 0, o: 1 }],
31
+ [a + 1e-3, { x: -o, y: 0, o: 0 }],
32
+ [a + 2e-3, { x: o, y: 0, o: 0 }],
33
+ [1, { x: o, y: 0, o: 1 }]
34
+ ],
35
+ left: [
36
+ [0, { x: 0, y: e, o: 1 }],
37
+ [y, { x: 0, y: e, o: 1 }],
38
+ [n, { x: 0, y: 0, o: 1 }],
39
+ [a, { x: 0, y: 0, o: 1 }],
40
+ [1, { x: 0, y: -e, o: 1 }]
41
+ ]
42
+ };
43
+ }, $ = (i) => L`
44
+ ${i.map(
45
+ ([r, { x: t, y: o, o: e }]) => `${r * 100}% {
46
+ transform: translate(${t}px, ${o}px);
47
+ opacity: ${e};
48
+ }`
49
+ ).join(" ")}
50
+ `, K = b((i) => {
51
+ const { animationDuration: r = 6, borderWidth: t = 1, borderColor: o = "YELLOW_3" } = i, [e, y] = d(1), [n, a] = d(1), m = l(() => F(e, n), [e, n]), x = l(
52
+ () => ({
53
+ top: $(m.top),
54
+ right: $(m.right),
55
+ bottom: $(m.bottom),
56
+ left: $(m.left)
57
+ }),
58
+ [m]
59
+ ), f = u(null), h = u(null);
60
+ return C(() => {
61
+ f.current && y(f.current.getBoundingClientRect().width), h.current && a(h.current.getBoundingClientRect().height);
62
+ }, []), /* @__PURE__ */ p(g, { children: [
63
+ /* @__PURE__ */ s(k, { className: "top-line", ref: f, $borderWidth: t, children: /* @__PURE__ */ s(
64
+ c,
65
+ {
66
+ $borderColor: o,
67
+ $width: e,
68
+ $height: t,
69
+ $animationDuration: r,
70
+ $keyframes: x.top
71
+ }
72
+ ) }),
73
+ /* @__PURE__ */ s(W, { ref: h, $borderWidth: t, children: /* @__PURE__ */ s(
74
+ c,
75
+ {
76
+ $width: t,
77
+ $height: n,
78
+ $borderColor: o,
79
+ $animationDuration: r,
80
+ $keyframes: x.right
81
+ }
82
+ ) }),
83
+ /* @__PURE__ */ s(R, { $borderWidth: t, children: /* @__PURE__ */ s(
84
+ c,
85
+ {
86
+ $borderColor: o,
87
+ $width: e,
88
+ $height: t,
89
+ $animationDuration: r,
90
+ $keyframes: x.bottom
91
+ }
92
+ ) }),
93
+ /* @__PURE__ */ s(D, { $borderWidth: t, children: /* @__PURE__ */ s(
94
+ c,
95
+ {
96
+ $width: t,
97
+ $height: n,
98
+ $borderColor: o,
99
+ $animationDuration: r,
100
+ $keyframes: x.left
101
+ }
102
+ ) })
103
+ ] });
104
+ });
105
+ export {
106
+ K as default
107
+ };
108
+ //# sourceMappingURL=border-path-animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"border-path-animation.js","sources":["../../../../src/features/ui/border-path-animation/border-path-animation.tsx"],"sourcesContent":["import type {\n IBorderPathAnimationProps,\n IGetKeyFrames,\n IGetKeyFramesConfig,\n} from './border-path-animation-types';\nimport type { FC } from 'react';\n\nimport { memo, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { keyframes } from 'styled-components';\n\nimport * as Styled from './border-path-animation-styled';\n\nconst getKeyFramesConfig: IGetKeyFramesConfig = (width, height) => {\n const p = (width + height) * 2; // perimeter\n const w = width;\n const h = height;\n const bp1 = width / p;\n const bp2 = (width + height) / p;\n const bp3 = (width + height + width) / p;\n\n return {\n top: [\n [0, { x: 0, y: 0, o: 1 }],\n [bp1, { x: w, y: 0, o: 1 }],\n\n [bp1 + 0.001, { x: w, y: 0, o: 0 }],\n [bp2 - 0.001, { x: -w, y: 0, o: 0 }],\n\n [bp2, { x: -w, y: 0, o: 1 }],\n [bp3, { x: 0, y: 0, o: 1 }],\n [1, { x: 0, y: 0, o: 1 }],\n ],\n right: [\n [0, { x: 0, y: 0, o: 1 }],\n [bp1, { x: 0, y: 0, o: 1 }],\n [bp2, { x: 0, y: h, o: 1 }],\n\n [bp2 + 0.001, { x: 0, y: h, o: 0 }],\n [bp3 - 0.001, { x: 0, y: -h, o: 0 }],\n\n [bp3, { x: 0, y: -h, o: 1 }],\n [1, { x: 0, y: 0, o: 1 }],\n ],\n bottom: [\n [0, { x: w, y: 0, o: 1 }],\n [bp1, { x: 0, y: 0, o: 1 }],\n [bp2, { x: 0, y: 0, o: 1 }],\n [bp3, { x: -w, y: 0, o: 1 }],\n\n [bp3 + 0.001, { x: -w, y: 0, o: 0 }],\n [bp3 + 0.002, { x: w, y: 0, o: 0 }],\n [1, { x: w, y: 0, o: 1 }],\n ],\n left: [\n [0, { x: 0, y: h, o: 1 }],\n [bp1, { x: 0, y: h, o: 1 }],\n [bp2, { x: 0, y: 0, o: 1 }],\n [bp3, { x: 0, y: 0, o: 1 }],\n [1, { x: 0, y: -h, o: 1 }],\n ],\n };\n};\n\nconst getKeyFrames: IGetKeyFrames = config => {\n return keyframes`\n ${config\n .map(\n ([percentage, { x, y, o }]) => `${percentage * 100}% {\n transform: translate(${x}px, ${y}px);\n opacity: ${o};\n }`,\n )\n .join(' ')}\n `;\n};\n\nconst BorderPathAnimation: FC<IBorderPathAnimationProps> = memo(props => {\n const { animationDuration = 6, borderWidth = 1, borderColor = 'YELLOW_3' } = props;\n const [width, setWidth] = useState(1);\n const [height, setHeight] = useState(1);\n const keyFramesConfig = useMemo(() => getKeyFramesConfig(width, height), [width, height]);\n const keyFrames = useMemo(\n () => ({\n top: getKeyFrames(keyFramesConfig.top),\n right: getKeyFrames(keyFramesConfig.right),\n bottom: getKeyFrames(keyFramesConfig.bottom),\n left: getKeyFrames(keyFramesConfig.left),\n }),\n [keyFramesConfig],\n );\n const topRef = useRef<HTMLDivElement>(null);\n const rightRef = useRef<HTMLDivElement>(null);\n\n useLayoutEffect(() => {\n if (topRef.current) {\n setWidth(topRef.current.getBoundingClientRect().width);\n }\n\n if (rightRef.current) {\n setHeight(rightRef.current.getBoundingClientRect().height);\n }\n }, []);\n\n return (\n <>\n <Styled.TopLineContainer className=\"top-line\" ref={topRef} $borderWidth={borderWidth}>\n <Styled.Line\n $borderColor={borderColor}\n $width={width}\n $height={borderWidth}\n $animationDuration={animationDuration}\n $keyframes={keyFrames.top}\n />\n </Styled.TopLineContainer>\n <Styled.RightLineContainer ref={rightRef} $borderWidth={borderWidth}>\n <Styled.Line\n $width={borderWidth}\n $height={height}\n $borderColor={borderColor}\n $animationDuration={animationDuration}\n $keyframes={keyFrames.right}\n />\n </Styled.RightLineContainer>\n <Styled.BottomLineContainer $borderWidth={borderWidth}>\n <Styled.Line\n $borderColor={borderColor}\n $width={width}\n $height={borderWidth}\n $animationDuration={animationDuration}\n $keyframes={keyFrames.bottom}\n />\n </Styled.BottomLineContainer>\n <Styled.LeftLineContainer $borderWidth={borderWidth}>\n <Styled.Line\n $width={borderWidth}\n $height={height}\n $borderColor={borderColor}\n $animationDuration={animationDuration}\n $keyframes={keyFrames.left}\n />\n </Styled.LeftLineContainer>\n </>\n );\n});\n\nexport default BorderPathAnimation;\n"],"names":["getKeyFramesConfig","width","height","p","w","h","bp1","bp2","bp3","getKeyFrames","config","keyframes","percentage","x","y","o","BorderPathAnimation","memo","props","animationDuration","borderWidth","borderColor","setWidth","useState","setHeight","keyFramesConfig","useMemo","keyFrames","topRef","useRef","rightRef","useLayoutEffect","jsxs","Fragment","jsx","Styled.TopLineContainer","Styled.Line","Styled.RightLineContainer","Styled.BottomLineContainer","Styled.LeftLineContainer"],"mappings":";;;;AAYA,MAAMA,IAA0C,CAACC,GAAOC,MAAW;AAC3D,QAAAC,KAAKF,IAAQC,KAAU,GACvBE,IAAIH,GACJI,IAAIH,GACJI,IAAML,IAAQE,GACdI,KAAON,IAAQC,KAAUC,GACzBK,KAAOP,IAAQC,IAASD,KAASE;AAEhC,SAAA;AAAA,IACL,KAAK;AAAA,MACH,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG;AAAA,MACxB,CAACG,GAAK,EAAE,GAAGF,GAAG,GAAG,GAAG,GAAG,GAAG;AAAA,MAE1B,CAACE,IAAM,MAAO,EA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AA,QACT,cAAcmB;AAAA,QACd,oBAAoBF;AAAA,QACpB,YAAYQ,EAAU;AAAA,MAAA;AAAA,IAAA,GAE1B;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
@@ -13,7 +13,8 @@ const _ = {
13
13
  //whiteboard
14
14
  QUESTION_TIPS: -1,
15
15
  DESMOS_CALCULATOR: 2,
16
- GOAL_CHAPTER_SHEETS_MENU: 4
16
+ GOAL_CHAPTER_SHEETS_MENU: 4,
17
+ JOURNEY_OVERLAY: 1e3
17
18
  };
18
19
  export {
19
20
  _ as ZINDEX
@@ -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} 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
+ {"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 JOURNEY_OVERLAY: 1000,\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;AAAA,EAC1B,iBAAiB;AACnB;"}
@@ -0,0 +1,5 @@
1
+ const n = () => window.innerWidth <= 600 ? "mobile" : "desktop";
2
+ export {
3
+ n as getDeviceConfig
4
+ };
5
+ //# sourceMappingURL=device.js.map
@@ -0,0 +1 @@
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;"}
@@ -1,30 +1,32 @@
1
1
  import r from "./arrow-tooltip.js";
2
2
  import e from "./button.js";
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;
3
+ import i from "./checkbox.js";
4
+ import m, { hues as g } from "./clrs.js";
5
+ import { getDeviceConfig as n } from "./device.js";
6
+ import f from "./input.js";
7
+ import p from "./layout.js";
8
+ import u from "./tab.js";
9
+ import C from "./text.js";
10
+ import c from "./text-button.js";
11
+ import { getZIndexConfig as x } from "./z-index.js";
12
+ const v = () => {
13
+ const t = p(), { gutter: o } = t;
13
14
  return {
14
15
  arrowTooltip: r(),
15
16
  button: e(o),
16
- colors: g(),
17
- hues: i,
18
- input: n(o),
19
- checkbox: m(o),
17
+ colors: m(),
18
+ hues: g,
19
+ input: f(o),
20
+ checkbox: i(o),
20
21
  layout: t,
21
- tab: p(t.gutter),
22
- text: u(),
23
- textButton: x(),
24
- zIndex: C()
22
+ tab: u(t.gutter),
23
+ text: C(),
24
+ textButton: c(),
25
+ zIndex: x(),
26
+ device: n()
25
27
  };
26
28
  };
27
29
  export {
28
- d as getTheme
30
+ v as getTheme
29
31
  };
30
32
  //# 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 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;"}
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 { getDeviceConfig } from './device';\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 device: getDeviceConfig(),\n };\n};\n\nexport { getTheme };\n"],"names":["getTheme","layout","getLayout","gutter","getArrowTooltipConfig","getButtonConfig","getColors","hues","getInputConfig","getCheckboxConfig","getTabConfig","getTextTypes","getTextButtonConfig","getZIndexConfig","getDeviceConfig"],"mappings":";;;;;;;;;;;AAcA,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,IACxB,QAAQC,EAAgB;AAAA,EAAA;AAE5B;"}
package/dist/index.d.ts CHANGED
@@ -457,6 +457,8 @@ declare const getCheckboxConfig: IGetCheckboxConfig;
457
457
 
458
458
  declare function getColors(): TColorsMap;
459
459
 
460
+ declare const getDeviceConfig: () => TSupportedDevices;
461
+
460
462
  declare const getInputConfig: IGetInputConfig;
461
463
 
462
464
  declare function getLayout(multiplier?: number): ILayout;
@@ -3090,6 +3092,7 @@ export declare interface ITheme {
3090
3092
  textButton: ReturnType<typeof getTextButtonConfig>;
3091
3093
  zIndex: ReturnType<typeof getZIndexConfig>;
3092
3094
  checkbox: ReturnType<typeof getCheckboxConfig>;
3095
+ device: ReturnType<typeof getDeviceConfig>;
3093
3096
  }
3094
3097
 
3095
3098
  declare interface ITile {
@@ -5216,6 +5219,8 @@ declare type TSubscribe = (id: string, cb: (data: IActionData | IActionData[]) =
5216
5219
 
5217
5220
  declare type TSubscribeMouseMove = (id: string, callback: (data: IPointerData) => void) => void;
5218
5221
 
5222
+ export declare type TSupportedDevices = 'mobile' | 'desktop';
5223
+
5219
5224
  export declare type TTableMode = 'random' | 'sequence' | 'advance' | 'infinite';
5220
5225
 
5221
5226
  export declare type TTabSizes = 'xsmall' | 'small' | 'regular' | 'medium';
@@ -5522,6 +5527,7 @@ declare const ZINDEX: {
5522
5527
  readonly QUESTION_TIPS: -1;
5523
5528
  readonly DESMOS_CALCULATOR: 2;
5524
5529
  readonly GOAL_CHAPTER_SHEETS_MENU: 4;
5530
+ readonly JOURNEY_OVERLAY: 1000;
5525
5531
  };
5526
5532
 
5527
5533
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.0.2-as1",
3
+ "version": "3.0.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"