@cuemath/leap 3.1.1 → 3.1.2-beta-0.1

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,20 +1,19 @@
1
1
  var u = Object.defineProperty;
2
- var g = (c, t, e) => t in c ? u(c, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : c[t] = e;
3
- var s = (c, t, e) => g(c, typeof t != "symbol" ? t + "" : t, e);
4
- import { captureMessage as v } from "@sentry/browser";
5
- import f from "../../node_modules/lodash.debounce/index.js";
6
- import { removeTileButton as y, removeMask as C, checkTextOrEquationTool as m, getReverseMap as T, getToolAndSubtool as w } from "./cue-canvas-helpers.js";
7
- class E {
2
+ var g = (l, t, e) => t in l ? u(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
+ var s = (l, t, e) => g(l, typeof t != "symbol" ? t + "" : t, e);
4
+ import v from "../../node_modules/lodash.debounce/index.js";
5
+ import { removeTileButton as f, removeMask as y, checkTextOrEquationTool as C, getReverseMap as m, getToolAndSubtool as T } from "./cue-canvas-helpers.js";
6
+ class k {
8
7
  constructor({
9
8
  onPublish: t,
10
9
  onSubscribe: e,
11
10
  onUpdateActiveTool: a,
12
- onUpdateHeight: i,
13
- uploadImageToS3: o,
11
+ onUpdateHeight: o,
12
+ uploadImageToS3: i,
14
13
  height: n,
15
14
  userId: h,
16
15
  canvasId: r,
17
- userType: l,
16
+ userType: c,
18
17
  renderAs: p,
19
18
  updateCanvasConfig: d
20
19
  }) {
@@ -45,7 +44,7 @@ class E {
45
44
  });
46
45
  s(this, "onChange", (t) => {
47
46
  const a = Object.fromEntries(t.entries());
48
- m(a) && this.onUpdateActiveTool("move"), this.publishToChannel(a);
47
+ C(a) && this.onUpdateActiveTool("move"), this.publishToChannel(a);
49
48
  });
50
49
  s(this, "undo", () => {
51
50
  if (!this.polycanvas)
@@ -53,7 +52,7 @@ class E {
53
52
  const t = this.polycanvas.undo();
54
53
  if (!t)
55
54
  return;
56
- const e = T(t);
55
+ const e = m(t);
57
56
  this.onChange(e);
58
57
  });
59
58
  s(this, "redo", () => {
@@ -97,40 +96,36 @@ class E {
97
96
  x: e.x + 24,
98
97
  y: e.y + 24,
99
98
  width: 500
100
- }, i = this.polycanvas.add({
99
+ }, o = this.polycanvas.add({
101
100
  ...a
102
101
  });
103
102
  this.publishToChannel({
104
- [i]: [void 0, { ...a, status: "locked" }]
103
+ [o]: [void 0, { ...a, status: "locked" }]
105
104
  });
106
105
  });
107
106
  s(this, "onSelectImage", async (t) => {
108
- var o;
109
- const e = t.target, a = (o = e.files) == null ? void 0 : o[0];
107
+ var i;
108
+ const e = t.target, a = (i = e.files) == null ? void 0 : i[0];
110
109
  if (!a || !this.polycanvas || !this.uploadImageToS3) return;
111
- const i = await this.uploadImageToS3(a);
112
- i !== "error" && (this.addImageToCanvas(i), e.value = "");
110
+ const o = await this.uploadImageToS3(a);
111
+ o !== "error" && (this.addImageToCanvas(o), e.value = "");
113
112
  });
114
113
  s(this, "updateCanvas", ({ data: t, userId: e }) => {
115
114
  const a = this.userType === "TEACHER" || e === this.userId;
116
- try {
117
- Object.entries(t).forEach(([i, o]) => {
118
- var n, h, r;
119
- !o[0] && o[1] ? ("name" in o[1] && o[1].name === "image" && (o[1].status = this.userType === "STUDENT" ? "locked" : void 0), (n = this.polycanvas) == null || n.add({ ...o[1], cannotEdit: !a }, i)) : o[0] && !o[1] ? (h = this.polycanvas) == null || h.delete(i) : o[0] && o[1] && ((r = this.polycanvas) == null || r.update(i, { ...o[1] }));
120
- });
121
- } catch {
122
- v("Error Updating Canvas", t);
123
- }
115
+ Object.entries(t).forEach(([o, i]) => {
116
+ var n, h, r;
117
+ !i[0] && i[1] ? ("name" in i[1] && i[1].name === "image" && (i[1].status = this.userType === "STUDENT" ? "locked" : void 0), (n = this.polycanvas) == null || n.add({ ...i[1], cannotEdit: !a }, o)) : i[0] && !i[1] ? (h = this.polycanvas) == null || h.delete(o) : i[0] && i[1] && ((r = this.polycanvas) == null || r.update(o, { ...i[1] }));
118
+ });
124
119
  });
125
120
  s(this, "toggleTiles", (t) => {
126
121
  var e;
127
122
  (e = this.polycanvas) == null || e.toggleSidebar(t);
128
123
  });
129
124
  s(this, "setViewPort", ({ x: t, y: e, zoom: a }) => {
130
- var i;
125
+ var o;
131
126
  if (this.polycanvas) {
132
- const o = (i = this.polycanvas) == null ? void 0 : i.getViewport();
133
- if (o.x === t && o.y === e && o.zoom === a)
127
+ const i = (o = this.polycanvas) == null ? void 0 : o.getViewport();
128
+ if (i.x === t && i.y === e && i.zoom === a)
134
129
  return;
135
130
  this.polycanvas.setViewport(t, e, a);
136
131
  }
@@ -144,42 +139,42 @@ class E {
144
139
  }), this.gridName = t, this.updateCanvasConfigChange && this.updateCanvasConfigChange({ gridName: t }));
145
140
  });
146
141
  s(this, "lockSelectedTiles", () => {
147
- var a, i;
148
- const { tiles: t } = ((a = this.polycanvas) == null ? void 0 : a.serialize()) || {}, e = ((i = this.polycanvas) == null ? void 0 : i.getSelection()) || [];
142
+ var a, o;
143
+ const { tiles: t } = ((a = this.polycanvas) == null ? void 0 : a.serialize()) || {}, e = ((o = this.polycanvas) == null ? void 0 : o.getSelection()) || [];
149
144
  if (e.length > 0 && t) {
150
- const o = {};
145
+ const i = {};
151
146
  e.forEach((n) => {
152
- var r, l, p;
147
+ var r, c, p;
153
148
  if (!((r = t[n]) != null && r.name)) return;
154
149
  const h = { ...t[n], status: "locked" };
155
- (l = this.polycanvas) == null || l.update(n, h), (p = t[n]) != null && p.name && (o[n] = [t[n], h]);
156
- }), this.publishToChannel(o);
150
+ (c = this.polycanvas) == null || c.update(n, h), (p = t[n]) != null && p.name && (i[n] = [t[n], h]);
151
+ }), this.publishToChannel(i);
157
152
  }
158
153
  });
159
154
  s(this, "unlockAllTiles", () => {
160
155
  if (!this.polycanvas) return;
161
156
  const { tiles: t } = this.polycanvas.serialize(), e = {};
162
- t && Object.entries(t).length > 0 && (Object.entries(t).forEach(([a, i]) => {
157
+ t && Object.entries(t).length > 0 && (Object.entries(t).forEach(([a, o]) => {
163
158
  var n;
164
- if (i.status !== "locked") return;
165
- const o = { ...i, status: void 0 };
166
- (n = this.polycanvas) == null || n.update(a, o), e[a] = [i, o];
159
+ if (o.status !== "locked") return;
160
+ const i = { ...o, status: void 0 };
161
+ (n = this.polycanvas) == null || n.update(a, i), e[a] = [o, i];
167
162
  }), this.publishToChannel(e));
168
163
  });
169
164
  s(this, "replaceCanvas", (t) => {
170
165
  if (!this.polycanvas) return;
171
166
  const { data: e, gridName: a } = t;
172
- this.polycanvas.clear(), a && this.changeGrid(a), Object.entries(e).forEach(([i, o]) => {
167
+ this.polycanvas.clear(), a && this.changeGrid(a), Object.entries(e).forEach(([o, i]) => {
173
168
  var n;
174
- if (!o[0] && o[1]) {
175
- (n = this.polycanvas) == null || n.add({ ...o[1] }, i);
169
+ if (!i[0] && i[1]) {
170
+ (n = this.polycanvas) == null || n.add({ ...i[1] }, o);
176
171
  return;
177
172
  }
178
173
  }), this.publishToChannel(e);
179
174
  });
180
175
  s(this, "setTool", (t) => {
181
176
  if (this.polycanvas) {
182
- const [e, a] = w(t);
177
+ const [e, a] = T(t);
183
178
  switch (e) {
184
179
  case "clearAll":
185
180
  this.clearCanvas();
@@ -232,8 +227,8 @@ class E {
232
227
  */
233
228
  s(this, "update", (t) => {
234
229
  if (Array.isArray(t)) {
235
- const e = t.map((i) => i.height).filter(Boolean), a = Math.max(...e);
236
- a > this.height && this.updateHeight(a), t.forEach((i) => this.updateCanvas(i));
230
+ const e = t.map((o) => o.height).filter(Boolean), a = Math.max(...e);
231
+ a > this.height && this.updateHeight(a), t.forEach((o) => this.updateCanvas(o));
237
232
  } else
238
233
  t.height > this.height && this.updateHeight(t.height), this.updateCanvas(t);
239
234
  });
@@ -247,9 +242,9 @@ class E {
247
242
  s(this, "destroy", () => {
248
243
  this.polycanvas && (this.polycanvas.off("change", this.onChange), this.polycanvas.destroy(), this.debouncedViewportChange.cancel(), this.renderAs === "whiteboard" && this.userType === "TEACHER" && this.polycanvas.off("viewport", this.debouncedViewportChange), this.polycanvas = void 0, this.fileInput && this.fileInput.parentNode && (this.fileInput.parentNode.removeChild(this.fileInput), this.fileInput = null));
249
244
  });
250
- this.onUpdateHeight = i, this.onUpdateActiveTool = a, this.height = n, this.uploadImageToS3 = o, this.userId = h, this.canvasId = r, this.publish = t, this.userType = l, this.renderAs = p, this.debouncedViewportChange = f(this.onViewPortChange, 300), this.updateCanvasConfigChange = d, e == null || e(this.canvasId, this.update);
245
+ this.onUpdateHeight = o, this.onUpdateActiveTool = a, this.height = n, this.uploadImageToS3 = i, this.userId = h, this.canvasId = r, this.publish = t, this.userType = c, this.renderAs = p, this.debouncedViewportChange = v(this.onViewPortChange, 300), this.updateCanvasConfigChange = d, e == null || e(this.canvasId, this.update);
251
246
  }
252
- async create({ canvasElementRef: t, canvasConfig: e, canvasSetting: a, initialData: i }) {
247
+ async create({ canvasElementRef: t, canvasConfig: e, canvasSetting: a, initialData: o }) {
253
248
  if (!t.current)
254
249
  throw new Error("PolyCanvas: Div Element Not found for canvas");
255
250
  this.polycanvas = await window.Polypad.create(t.current, {
@@ -258,10 +253,10 @@ class E {
258
253
  },
259
254
  ...a,
260
255
  imageUpload: this.renderAs === "whiteboard" && this.userType === "TEACHER" && this.uploadImageToS3 ? this.uploadImageToS3 : void 0
261
- }), this.renderAs === "whiteboard" && this.userType === "TEACHER" && (this.polycanvas.toggleSidebar(!1), this.polycanvas.bindKeyboardEvents({}), y(t), this.polycanvas.on("viewport", this.debouncedViewportChange)), C(t), this.polycanvas.on("change", this.onChange), i && this.update(i);
256
+ }), this.renderAs === "whiteboard" && this.userType === "TEACHER" && (this.polycanvas.toggleSidebar(!1), this.polycanvas.bindKeyboardEvents({}), f(t), this.polycanvas.on("viewport", this.debouncedViewportChange)), y(t), this.polycanvas.on("change", this.onChange), o && this.update(o);
262
257
  }
263
258
  }
264
259
  export {
265
- E as CueCanvasCore
260
+ k as CueCanvasCore
266
261
  };
267
262
  //# sourceMappingURL=cue-canvas-core.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cue-canvas-core.js","sources":["../../../src/features/cue-canvas/cue-canvas-core.ts"],"sourcesContent":["import type { TUserTypes } from '../ui/types';\nimport type {\n IActionData,\n IViewport,\n TCueCanvasChangeData,\n TCueCanvasGridName,\n TCueCanvasTool,\n TPublish,\n TRenderAs,\n TCueCanvasChangeDataObject,\n IReplaceCanvas,\n ICueCanvasCoreProps,\n TUpdateCanvasConfig,\n} from './types/cue-canvas';\nimport type { ICreateOptions } from './types/cue-canvas';\nimport type { IPolypad, IPolyPadInstance } from './types/polypad';\n\nimport { captureMessage } from '@sentry/browser';\nimport debounce from 'lodash.debounce';\n\nimport {\n checkTextOrEquationTool,\n getReverseMap,\n getToolAndSubtool,\n removeMask,\n removeTileButton,\n} from './cue-canvas-helpers';\n\ndeclare global {\n interface Window {\n Polypad: IPolypad;\n }\n}\n\n/**\n * The CueCanvasCore class manages the canvas state and tool synchronization.\n * When text or equations are added, Polypad automatically switches to 'move' tool.\n * onUpdateActiveTool ensures the UI reflects this automatic tool change.\n */\n\nexport class CueCanvasCore {\n private polycanvas: IPolyPadInstance | undefined;\n private publish?: TPublish;\n private height: number;\n private onUpdateActiveTool: (tool: TCueCanvasTool) => void;\n private onUpdateHeight?: (height: number) => void;\n private userId: string;\n private canvasId: string;\n private userType: TUserTypes;\n private renderAs: TRenderAs;\n private fileInput: HTMLInputElement | null = null;\n private debouncedViewportChange: ReturnType<typeof debounce>;\n private uploadImageToS3?: (file: File) => Promise<string>;\n private updateCanvasConfigChange?: TUpdateCanvasConfig;\n private gridName?: TCueCanvasGridName;\n\n constructor({\n onPublish,\n onSubscribe,\n onUpdateActiveTool,\n onUpdateHeight,\n uploadImageToS3,\n height,\n userId,\n canvasId,\n userType,\n renderAs,\n updateCanvasConfig,\n }: ICueCanvasCoreProps) {\n this.onUpdateHeight = onUpdateHeight;\n this.onUpdateActiveTool = onUpdateActiveTool;\n this.height = height;\n this.uploadImageToS3 = uploadImageToS3;\n this.userId = userId;\n this.canvasId = canvasId;\n this.publish = onPublish;\n this.userType = userType;\n this.renderAs = renderAs;\n this.debouncedViewportChange = debounce(this.onViewPortChange, 300);\n this.updateCanvasConfigChange = updateCanvasConfig;\n onSubscribe?.(this.canvasId, this.update);\n }\n\n async create({ canvasElementRef, canvasConfig, canvasSetting, initialData }: ICreateOptions) {\n if (!canvasElementRef.current) {\n throw new Error('PolyCanvas: Div Element Not found for canvas');\n }\n this.polycanvas = await window.Polypad.create(canvasElementRef.current, {\n initial: {\n options: canvasConfig,\n },\n ...canvasSetting,\n imageUpload:\n this.renderAs === 'whiteboard' && this.userType === 'TEACHER' && this.uploadImageToS3\n ? this.uploadImageToS3\n : undefined,\n });\n\n if (this.renderAs === 'whiteboard' && this.userType === 'TEACHER') {\n this.polycanvas.toggleSidebar(false);\n this.polycanvas.bindKeyboardEvents({});\n\n removeTileButton(canvasElementRef);\n this.polycanvas.on('viewport', this.debouncedViewportChange);\n }\n\n removeMask(canvasElementRef);\n this.polycanvas.on('change', this.onChange);\n if (initialData) {\n this.update(initialData);\n }\n }\n\n private publishToChannel = (payload: TCueCanvasChangeDataObject) => {\n if (!this.publish) return;\n\n this.publish({\n eventName: 'cue_canvas_changed',\n eventPayload: {\n data: payload,\n height: this.height,\n userId: this.userId,\n responseId: this.canvasId,\n },\n });\n };\n\n private onChange = (e: unknown) => {\n const data = e as TCueCanvasChangeData;\n const payload = Object.fromEntries(data.entries());\n\n if (checkTextOrEquationTool(payload)) {\n this.onUpdateActiveTool('move');\n }\n\n this.publishToChannel(payload);\n };\n\n private undo = () => {\n if (!this.polycanvas) {\n return;\n }\n\n const data = this.polycanvas.undo() as TCueCanvasChangeData;\n\n if (!data) {\n return;\n }\n\n const undoData = getReverseMap(data);\n\n this.onChange(undoData);\n };\n\n private redo = () => {\n if (!this.polycanvas) {\n return;\n }\n\n const data = this.polycanvas.redo() as TCueCanvasChangeData;\n\n if (!data) {\n return;\n }\n\n this.onChange(data);\n };\n\n clearCanvas = () => {\n if (this.polycanvas) {\n this.polycanvas.clear();\n }\n };\n\n private zoomIn = () => {\n if (!this.polycanvas) return;\n\n const viewPort = this.polycanvas.getViewport();\n\n this.polycanvas.setViewport(viewPort.x, viewPort.y, viewPort.zoom * 1.1);\n };\n\n private zoomOut = () => {\n if (!this.polycanvas) return;\n\n const viewPort = this.polycanvas.getViewport();\n\n this.polycanvas.setViewport(viewPort.x, viewPort.y, viewPort.zoom * 0.9);\n };\n\n getCanvasAsImage = async () => {\n if (!this.polycanvas) return;\n\n const image = await this.polycanvas.image(3000, 3000, 'png');\n\n return image;\n };\n\n private downloadCanvasAsImage = async () => {\n if (!this.polycanvas) return;\n\n const image = await this.polycanvas.image(3000, 3000, 'png');\n\n if (!image) return;\n\n const downloadLink = document.createElement('a');\n\n downloadLink.href = image;\n downloadLink.download = `canvas-drawing-${Date.now()}.png`;\n downloadLink.click();\n };\n\n private onViewPortChange = (e: IViewport): void => {\n if (!this.updateCanvasConfigChange) return;\n\n this.updateCanvasConfigChange({ dimesion: e });\n };\n\n private openFileUpload = (): void => {\n if (!this.fileInput) {\n this.fileInput = document.createElement('input');\n this.fileInput.type = 'file';\n this.fileInput.accept = 'image/*';\n this.fileInput.style.display = 'none';\n this.fileInput.onchange = this.onSelectImage;\n document.body.appendChild(this.fileInput);\n }\n\n this.fileInput.click();\n };\n\n addImageToCanvas = (imageUrl: string): void => {\n if (!this.polycanvas) return;\n\n const viewPort = this.polycanvas.getViewport();\n const imgJson = {\n name: 'image',\n href: imageUrl,\n x: viewPort.x + 24,\n y: viewPort.y + 24,\n width: 500,\n };\n\n const key = this.polycanvas.add({\n ...imgJson,\n });\n\n this.publishToChannel({\n [key]: [undefined, { ...imgJson, status: 'locked' }],\n });\n };\n\n private onSelectImage = async (event: Event): Promise<void> => {\n const target = event.target as HTMLInputElement;\n const file = target.files?.[0];\n\n if (!file || !this.polycanvas || !this.uploadImageToS3) return;\n\n const imageUrl = await this.uploadImageToS3(file);\n\n if (imageUrl === 'error') {\n return;\n }\n\n this.addImageToCanvas(imageUrl);\n\n target.value = '';\n };\n\n private updateCanvas = ({ data, userId }: IActionData) => {\n const canEditStroke = this.userType === 'TEACHER' || userId === this.userId;\n\n try {\n Object.entries(data).forEach(([key, value]) => {\n if (!value[0] && value[1]) {\n if ('name' in value[1] && value[1].name === 'image') {\n value[1].status = this.userType === 'STUDENT' ? 'locked' : undefined; // Lock only images for students\n }\n this.polycanvas?.add({ ...value[1], cannotEdit: !canEditStroke }, key);\n } else if (value[0] && !value[1]) {\n this.polycanvas?.delete(key);\n } else if (value[0] && value[1]) {\n this.polycanvas?.update(key, { ...value[1] });\n }\n });\n } catch (error) {\n captureMessage('Error Updating Canvas', data);\n }\n };\n\n toggleTiles = (val: boolean) => {\n this.polycanvas?.toggleSidebar(val);\n };\n\n setViewPort = ({ x, y, zoom }: IViewport) => {\n if (this.polycanvas) {\n const cv = this.polycanvas?.getViewport();\n\n if (cv.x === x && cv.y === y && cv.zoom === zoom) {\n return; // No change needed\n }\n\n this.polycanvas.setViewport(x, y, zoom);\n }\n };\n\n resetViewPort = () => {\n if (this.polycanvas) {\n this.polycanvas.resetViewport();\n }\n };\n\n changeGrid = (gridName: TCueCanvasGridName) => {\n if (!this.polycanvas || this.gridName === gridName) return;\n\n this.polycanvas.setOptions({\n grid: gridName,\n });\n this.gridName = gridName;\n if (this.updateCanvasConfigChange) {\n this.updateCanvasConfigChange({ gridName: gridName });\n }\n };\n\n lockSelectedTiles = () => {\n const { tiles: allTiles } = this.polycanvas?.serialize() || {};\n const selectedItems = this.polycanvas?.getSelection() || [];\n\n if (selectedItems.length > 0 && allTiles) {\n const lockedTiles: TCueCanvasChangeDataObject = {};\n\n selectedItems.forEach(key => {\n if (!allTiles[key]?.name) return;\n\n const updatedJson = { ...allTiles[key], status: 'locked' as const };\n\n this.polycanvas?.update(key, updatedJson);\n if (allTiles[key]?.name) lockedTiles[key] = [allTiles[key], updatedJson];\n });\n\n this.publishToChannel(lockedTiles);\n }\n };\n\n unlockAllTiles = () => {\n if (!this.polycanvas) return;\n\n const { tiles: allTiles } = this.polycanvas.serialize();\n const unlockedTiles: TCueCanvasChangeDataObject = {};\n\n if (allTiles && Object.entries(allTiles).length > 0) {\n Object.entries(allTiles).forEach(([key, item]) => {\n if (item.status !== 'locked') return;\n\n const updatedJson = { ...item, status: undefined };\n\n this.polycanvas?.update(key, updatedJson);\n unlockedTiles[key] = [item, updatedJson];\n });\n\n this.publishToChannel(unlockedTiles);\n }\n };\n\n replaceCanvas = (data: IReplaceCanvas) => {\n if (!this.polycanvas) return;\n\n const { data: canvasData, gridName } = data;\n\n this.polycanvas.clear();\n if (gridName) {\n this.changeGrid(gridName);\n }\n\n Object.entries(canvasData).forEach(([key, value]) => {\n if (!value[0] && value[1]) {\n this.polycanvas?.add({ ...value[1] }, key);\n\n return;\n }\n });\n\n this.publishToChannel(canvasData);\n };\n\n setTool = (tool: TCueCanvasTool) => {\n if (this.polycanvas) {\n const [currTool, currSubTool] = getToolAndSubtool(tool);\n\n switch (currTool) {\n case 'clearAll':\n this.clearCanvas();\n break;\n case 'home':\n this.resetViewPort();\n break;\n case 'undo':\n this.undo();\n break;\n case 'redo':\n this.redo();\n break;\n case 'lock':\n this.lockSelectedTiles();\n break;\n case 'unlock':\n this.unlockAllTiles();\n break;\n case 'zoomIn':\n this.zoomIn();\n break;\n case 'zoomOut':\n this.zoomOut();\n break;\n case 'upload':\n this.openFileUpload();\n break;\n case 'download':\n this.downloadCanvasAsImage();\n break;\n case 'grid':\n break;\n default:\n this.polycanvas.setTool(currTool, currSubTool);\n }\n }\n };\n\n /**\n * The `update` method is called in two cases:\n * 1. When receiving initial data to update the canvas content.\n * 2. When receiving strokes from other peers to update the canvas content.\n * Each item can contain multiple actions, which are applied to the canvas.\n *\n * The method checks if the payload is an array or a single object.\n * If it's an array, it iterates over each item and updates the canvas accordingly.\n * If it's a single object, it directly updates the canvas.\n *\n * Additionally, if the payload contains a height greater than the current height of the canvas, the `updateHeight` method is called to update the canvas height.\n */\n update = (payload: IActionData | IActionData[]) => {\n if (Array.isArray(payload)) {\n const heights = payload.map(data => data.height).filter(Boolean);\n const maxHeight = Math.max(...heights);\n\n if (maxHeight > this.height) {\n this.updateHeight(maxHeight);\n }\n payload.forEach(item => this.updateCanvas(item));\n } else {\n if (payload.height > this.height) {\n this.updateHeight(payload.height);\n }\n this.updateCanvas(payload);\n }\n };\n\n setColor = (color: string) => {\n if (this.polycanvas) {\n this.polycanvas.setColor(color);\n }\n };\n\n updateHeight = (height: number) => {\n this.height = height;\n this.onUpdateHeight?.(height);\n };\n\n destroy = () => {\n if (this.polycanvas) {\n this.polycanvas.off('change', this.onChange);\n this.polycanvas.destroy();\n this.debouncedViewportChange.cancel();\n\n if (this.renderAs === 'whiteboard' && this.userType === 'TEACHER') {\n this.polycanvas.off('viewport', this.debouncedViewportChange);\n }\n this.polycanvas = undefined;\n\n if (this.fileInput && this.fileInput.parentNode) {\n this.fileInput.parentNode.removeChild(this.fileInput);\n this.fileInput = null;\n }\n }\n };\n}\n"],"names":["CueCanvasCore","onPublish","onSubscribe","onUpdateActiveTool","onUpdateHeight","uploadImageToS3","height","userId","canvasId","userType","renderAs","updateCanvasConfig","__publicField","payload","e","checkTextOrEquationTool","data","undoData","getReverseMap","viewPort","image","downloadLink","imageUrl","imgJson","key","event","target","file","_a","canEditStroke","value","_b","_c","captureMessage","val","x","y","zoom","cv","gridName","allTiles","selectedItems","lockedTiles","updatedJson","unlockedTiles","item","canvasData","tool","currTool","currSubTool","getToolAndSubtool","heights","maxHeight","color","debounce","canvasElementRef","canvasConfig","canvasSetting","initialData","removeTileButton","removeMask"],"mappings":";;;;;;AAwCO,MAAMA,EAAc;AAAA,EAgBzB,YAAY;AAAA,IACV,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QA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AAA,CACP,GAEG,KAAK,aAAa,gBAAgB,KAAK,aAAa,cACjD,KAAA,WAAW,cAAc,EAAK,GAC9B,KAAA,WAAW,mBAAmB,CAAA,CAAE,GAErCE,EAAiBJ,CAAgB,GACjC,KAAK,WAAW,GAAG,YAAY,KAAK,uBAAuB,IAG7DK,EAAWL,CAAgB,GAC3B,KAAK,WAAW,GAAG,UAAU,KAAK,QAAQ,GACtCG,KACF,KAAK,OAAOA,CAAW;AAAA,EAE3B;AAsXF;"}
1
+ {"version":3,"file":"cue-canvas-core.js","sources":["../../../src/features/cue-canvas/cue-canvas-core.ts"],"sourcesContent":["import type { TUserTypes } from '../ui/types';\nimport type {\n IActionData,\n IViewport,\n TCueCanvasChangeData,\n TCueCanvasGridName,\n TCueCanvasTool,\n TPublish,\n TRenderAs,\n TCueCanvasChangeDataObject,\n IReplaceCanvas,\n ICueCanvasCoreProps,\n TUpdateCanvasConfig,\n} from './types/cue-canvas';\nimport type { ICreateOptions } from './types/cue-canvas';\nimport type { IPolypad, IPolyPadInstance } from './types/polypad';\n\nimport debounce from 'lodash.debounce';\n\nimport {\n checkTextOrEquationTool,\n getReverseMap,\n getToolAndSubtool,\n removeMask,\n removeTileButton,\n} from './cue-canvas-helpers';\n\ndeclare global {\n interface Window {\n Polypad: IPolypad;\n }\n}\n\n/**\n * The CueCanvasCore class manages the canvas state and tool synchronization.\n * When text or equations are added, Polypad automatically switches to 'move' tool.\n * onUpdateActiveTool ensures the UI reflects this automatic tool change.\n */\n\nexport class CueCanvasCore {\n private polycanvas: IPolyPadInstance | undefined;\n private publish?: TPublish;\n private height: number;\n private onUpdateActiveTool: (tool: TCueCanvasTool) => void;\n private onUpdateHeight?: (height: number) => void;\n private userId: string;\n private canvasId: string;\n private userType: TUserTypes;\n private renderAs: TRenderAs;\n private fileInput: HTMLInputElement | null = null;\n private debouncedViewportChange: ReturnType<typeof debounce>;\n private uploadImageToS3?: (file: File) => Promise<string>;\n private updateCanvasConfigChange?: TUpdateCanvasConfig;\n private gridName?: TCueCanvasGridName;\n\n constructor({\n onPublish,\n onSubscribe,\n onUpdateActiveTool,\n onUpdateHeight,\n uploadImageToS3,\n height,\n userId,\n canvasId,\n userType,\n renderAs,\n updateCanvasConfig,\n }: ICueCanvasCoreProps) {\n this.onUpdateHeight = onUpdateHeight;\n this.onUpdateActiveTool = onUpdateActiveTool;\n this.height = height;\n this.uploadImageToS3 = uploadImageToS3;\n this.userId = userId;\n this.canvasId = canvasId;\n this.publish = onPublish;\n this.userType = userType;\n this.renderAs = renderAs;\n this.debouncedViewportChange = debounce(this.onViewPortChange, 300);\n this.updateCanvasConfigChange = updateCanvasConfig;\n onSubscribe?.(this.canvasId, this.update);\n }\n\n async create({ canvasElementRef, canvasConfig, canvasSetting, initialData }: ICreateOptions) {\n if (!canvasElementRef.current) {\n throw new Error('PolyCanvas: Div Element Not found for canvas');\n }\n this.polycanvas = await window.Polypad.create(canvasElementRef.current, {\n initial: {\n options: canvasConfig,\n },\n ...canvasSetting,\n imageUpload:\n this.renderAs === 'whiteboard' && this.userType === 'TEACHER' && this.uploadImageToS3\n ? this.uploadImageToS3\n : undefined,\n });\n\n if (this.renderAs === 'whiteboard' && this.userType === 'TEACHER') {\n this.polycanvas.toggleSidebar(false);\n this.polycanvas.bindKeyboardEvents({});\n\n removeTileButton(canvasElementRef);\n this.polycanvas.on('viewport', this.debouncedViewportChange);\n }\n\n removeMask(canvasElementRef);\n this.polycanvas.on('change', this.onChange);\n if (initialData) {\n this.update(initialData);\n }\n }\n\n private publishToChannel = (payload: TCueCanvasChangeDataObject) => {\n if (!this.publish) return;\n\n this.publish({\n eventName: 'cue_canvas_changed',\n eventPayload: {\n data: payload,\n height: this.height,\n userId: this.userId,\n responseId: this.canvasId,\n },\n });\n };\n\n private onChange = (e: unknown) => {\n const data = e as TCueCanvasChangeData;\n const payload = Object.fromEntries(data.entries());\n\n if (checkTextOrEquationTool(payload)) {\n this.onUpdateActiveTool('move');\n }\n\n this.publishToChannel(payload);\n };\n\n private undo = () => {\n if (!this.polycanvas) {\n return;\n }\n\n const data = this.polycanvas.undo() as TCueCanvasChangeData;\n\n if (!data) {\n return;\n }\n\n const undoData = getReverseMap(data);\n\n this.onChange(undoData);\n };\n\n private redo = () => {\n if (!this.polycanvas) {\n return;\n }\n\n const data = this.polycanvas.redo() as TCueCanvasChangeData;\n\n if (!data) {\n return;\n }\n\n this.onChange(data);\n };\n\n clearCanvas = () => {\n if (this.polycanvas) {\n this.polycanvas.clear();\n }\n };\n\n private zoomIn = () => {\n if (!this.polycanvas) return;\n\n const viewPort = this.polycanvas.getViewport();\n\n this.polycanvas.setViewport(viewPort.x, viewPort.y, viewPort.zoom * 1.1);\n };\n\n private zoomOut = () => {\n if (!this.polycanvas) return;\n\n const viewPort = this.polycanvas.getViewport();\n\n this.polycanvas.setViewport(viewPort.x, viewPort.y, viewPort.zoom * 0.9);\n };\n\n getCanvasAsImage = async () => {\n if (!this.polycanvas) return;\n\n const image = await this.polycanvas.image(3000, 3000, 'png');\n\n return image;\n };\n\n private downloadCanvasAsImage = async () => {\n if (!this.polycanvas) return;\n\n const image = await this.polycanvas.image(3000, 3000, 'png');\n\n if (!image) return;\n\n const downloadLink = document.createElement('a');\n\n downloadLink.href = image;\n downloadLink.download = `canvas-drawing-${Date.now()}.png`;\n downloadLink.click();\n };\n\n private onViewPortChange = (e: IViewport): void => {\n if (!this.updateCanvasConfigChange) return;\n\n this.updateCanvasConfigChange({ dimesion: e });\n };\n\n private openFileUpload = (): void => {\n if (!this.fileInput) {\n this.fileInput = document.createElement('input');\n this.fileInput.type = 'file';\n this.fileInput.accept = 'image/*';\n this.fileInput.style.display = 'none';\n this.fileInput.onchange = this.onSelectImage;\n document.body.appendChild(this.fileInput);\n }\n\n this.fileInput.click();\n };\n\n addImageToCanvas = (imageUrl: string): void => {\n if (!this.polycanvas) return;\n\n const viewPort = this.polycanvas.getViewport();\n const imgJson = {\n name: 'image',\n href: imageUrl,\n x: viewPort.x + 24,\n y: viewPort.y + 24,\n width: 500,\n };\n\n const key = this.polycanvas.add({\n ...imgJson,\n });\n\n this.publishToChannel({\n [key]: [undefined, { ...imgJson, status: 'locked' }],\n });\n };\n\n private onSelectImage = async (event: Event): Promise<void> => {\n const target = event.target as HTMLInputElement;\n const file = target.files?.[0];\n\n if (!file || !this.polycanvas || !this.uploadImageToS3) return;\n\n const imageUrl = await this.uploadImageToS3(file);\n\n if (imageUrl === 'error') {\n return;\n }\n\n this.addImageToCanvas(imageUrl);\n\n target.value = '';\n };\n\n private updateCanvas = ({ data, userId }: IActionData) => {\n const canEditStroke = this.userType === 'TEACHER' || userId === this.userId;\n\n Object.entries(data).forEach(([key, value]) => {\n if (!value[0] && value[1]) {\n if ('name' in value[1] && value[1].name === 'image') {\n value[1].status = this.userType === 'STUDENT' ? 'locked' : undefined; // Lock only images for students\n }\n this.polycanvas?.add({ ...value[1], cannotEdit: !canEditStroke }, key);\n } else if (value[0] && !value[1]) {\n this.polycanvas?.delete(key);\n } else if (value[0] && value[1]) {\n this.polycanvas?.update(key, { ...value[1] });\n }\n });\n };\n\n toggleTiles = (val: boolean) => {\n this.polycanvas?.toggleSidebar(val);\n };\n\n setViewPort = ({ x, y, zoom }: IViewport) => {\n if (this.polycanvas) {\n const cv = this.polycanvas?.getViewport();\n\n if (cv.x === x && cv.y === y && cv.zoom === zoom) {\n return; // No change needed\n }\n\n this.polycanvas.setViewport(x, y, zoom);\n }\n };\n\n resetViewPort = () => {\n if (this.polycanvas) {\n this.polycanvas.resetViewport();\n }\n };\n\n changeGrid = (gridName: TCueCanvasGridName) => {\n if (!this.polycanvas || this.gridName === gridName) return;\n\n this.polycanvas.setOptions({\n grid: gridName,\n });\n this.gridName = gridName;\n if (this.updateCanvasConfigChange) {\n this.updateCanvasConfigChange({ gridName: gridName });\n }\n };\n\n lockSelectedTiles = () => {\n const { tiles: allTiles } = this.polycanvas?.serialize() || {};\n const selectedItems = this.polycanvas?.getSelection() || [];\n\n if (selectedItems.length > 0 && allTiles) {\n const lockedTiles: TCueCanvasChangeDataObject = {};\n\n selectedItems.forEach(key => {\n if (!allTiles[key]?.name) return;\n\n const updatedJson = { ...allTiles[key], status: 'locked' as const };\n\n this.polycanvas?.update(key, updatedJson);\n if (allTiles[key]?.name) lockedTiles[key] = [allTiles[key], updatedJson];\n });\n\n this.publishToChannel(lockedTiles);\n }\n };\n\n unlockAllTiles = () => {\n if (!this.polycanvas) return;\n\n const { tiles: allTiles } = this.polycanvas.serialize();\n const unlockedTiles: TCueCanvasChangeDataObject = {};\n\n if (allTiles && Object.entries(allTiles).length > 0) {\n Object.entries(allTiles).forEach(([key, item]) => {\n if (item.status !== 'locked') return;\n\n const updatedJson = { ...item, status: undefined };\n\n this.polycanvas?.update(key, updatedJson);\n unlockedTiles[key] = [item, updatedJson];\n });\n\n this.publishToChannel(unlockedTiles);\n }\n };\n\n replaceCanvas = (data: IReplaceCanvas) => {\n if (!this.polycanvas) return;\n\n const { data: canvasData, gridName } = data;\n\n this.polycanvas.clear();\n if (gridName) {\n this.changeGrid(gridName);\n }\n\n Object.entries(canvasData).forEach(([key, value]) => {\n if (!value[0] && value[1]) {\n this.polycanvas?.add({ ...value[1] }, key);\n\n return;\n }\n });\n\n this.publishToChannel(canvasData);\n };\n\n setTool = (tool: TCueCanvasTool) => {\n if (this.polycanvas) {\n const [currTool, currSubTool] = getToolAndSubtool(tool);\n\n switch (currTool) {\n case 'clearAll':\n this.clearCanvas();\n break;\n case 'home':\n this.resetViewPort();\n break;\n case 'undo':\n this.undo();\n break;\n case 'redo':\n this.redo();\n break;\n case 'lock':\n this.lockSelectedTiles();\n break;\n case 'unlock':\n this.unlockAllTiles();\n break;\n case 'zoomIn':\n this.zoomIn();\n break;\n case 'zoomOut':\n this.zoomOut();\n break;\n case 'upload':\n this.openFileUpload();\n break;\n case 'download':\n this.downloadCanvasAsImage();\n break;\n case 'grid':\n break;\n default:\n this.polycanvas.setTool(currTool, currSubTool);\n }\n }\n };\n\n /**\n * The `update` method is called in two cases:\n * 1. When receiving initial data to update the canvas content.\n * 2. When receiving strokes from other peers to update the canvas content.\n * Each item can contain multiple actions, which are applied to the canvas.\n *\n * The method checks if the payload is an array or a single object.\n * If it's an array, it iterates over each item and updates the canvas accordingly.\n * If it's a single object, it directly updates the canvas.\n *\n * Additionally, if the payload contains a height greater than the current height of the canvas, the `updateHeight` method is called to update the canvas height.\n */\n update = (payload: IActionData | IActionData[]) => {\n if (Array.isArray(payload)) {\n const heights = payload.map(data => data.height).filter(Boolean);\n const maxHeight = Math.max(...heights);\n\n if (maxHeight > this.height) {\n this.updateHeight(maxHeight);\n }\n payload.forEach(item => this.updateCanvas(item));\n } else {\n if (payload.height > this.height) {\n this.updateHeight(payload.height);\n }\n this.updateCanvas(payload);\n }\n };\n\n setColor = (color: string) => {\n if (this.polycanvas) {\n this.polycanvas.setColor(color);\n }\n };\n\n updateHeight = (height: number) => {\n this.height = height;\n this.onUpdateHeight?.(height);\n };\n\n destroy = () => {\n if (this.polycanvas) {\n this.polycanvas.off('change', this.onChange);\n this.polycanvas.destroy();\n this.debouncedViewportChange.cancel();\n\n if (this.renderAs === 'whiteboard' && this.userType === 'TEACHER') {\n this.polycanvas.off('viewport', this.debouncedViewportChange);\n }\n this.polycanvas = undefined;\n\n if (this.fileInput && this.fileInput.parentNode) {\n this.fileInput.parentNode.removeChild(this.fileInput);\n this.fileInput = null;\n }\n }\n };\n}\n"],"names":["CueCanvasCore","onPublish","onSubscribe","onUpdateActiveTool","onUpdateHeight","uploadImageToS3","height","userId","canvasId","userType","renderAs","updateCanvasConfig","__publicField","payload","e","checkTextOrEquationTool","data","undoData","getReverseMap","viewPort","image","downloadLink","imageUrl","imgJson","key","event","target","file","_a","canEditStroke","value","_b","_c","val","x","y","zoom","cv","gridName","allTiles","selectedItems","lockedTiles","updatedJson","unlockedTiles","item","canvasData","tool","currTool","currSubTool","getToolAndSubtool","heights","maxHeight","color","debounce","canvasElementRef","canvasConfig","canvasSetting","initialData","removeTileButton","removeMask"],"mappings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AAGC;AAAA,MACH,aACE,KAAK,aAAa,gBAAgB,KAAK,aAAa,aAAa,KAAK,kBAClE,KAAK,kBACL;AAAA,IAAA,CACP,GAEG,KAAK,aAAa,gBAAgB,KAAK,aAAa,cACjD,KAAA,WAAW,cAAc,EAAK,GAC9B,KAAA,WAAW,mBAAmB,CAAA,CAAE,GAErCE,EAAiBJ,CAAgB,GACjC,KAAK,WAAW,GAAG,YAAY,KAAK,uBAAuB,IAG7DK,EAAWL,CAAgB,GAC3B,KAAK,WAAW,GAAG,UAAU,KAAK,QAAQ,GACtCG,KACF,KAAK,OAAOA,CAAW;AAAA,EAE3B;AAkXF;"}
@@ -0,0 +1,13 @@
1
+ import { createGetAllAPI as r } from "@cuemath/rest-api";
2
+ import { BASE_URL_V3_1 as n } from "../../../../constants/api.js";
3
+ const { useGetAll: a, invalidate: l } = r({
4
+ getURL: (e) => {
5
+ const { milestone_state_group: t, student_id: s, course_stream: o } = e;
6
+ return `${n}/user-milestones/users/${s}/course-streams/${o}/${t}/count`;
7
+ }
8
+ });
9
+ export {
10
+ l as invalidatePastMilestoneCount,
11
+ a as useGetPastMilestoneCount
12
+ };
13
+ //# sourceMappingURL=get-past-milestone-count.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-past-milestone-count.js","sources":["../../../../../src/features/milestone/milestone-list-container/api/get-past-milestone-count.ts"],"sourcesContent":["import type { TCourseStream } from '../../create/milestone-create-types';\nimport type { IMilestoneData } from '../milestone-list/milestone-list-types';\n\nimport { createGetAllAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3_1 } from '../../../../constants/api';\n\ntype TQuery = {\n milestone_state_group: 'ALL' | 'DRAFT' | 'STUDENT_ALL' | 'LIVE' | 'STUDENT_LIVE' | 'INACTIVE';\n student_id: string;\n course_stream: TCourseStream;\n};\n\nconst { useGetAll: useGetPastMilestoneCount, invalidate: invalidatePastMilestoneCount } =\n createGetAllAPI<IMilestoneData, TQuery>({\n getURL: query => {\n const { milestone_state_group, student_id, course_stream } = query;\n\n return `${BASE_URL_V3_1}/user-milestones/users/${student_id}/course-streams/${course_stream}/${milestone_state_group}/count`;\n },\n });\n\nexport { useGetPastMilestoneCount, invalidatePastMilestoneCount };\n"],"names":["useGetPastMilestoneCount","invalidatePastMilestoneCount","createGetAllAPI","query","milestone_state_group","student_id","course_stream","BASE_URL_V3_1"],"mappings":";;AAaA,MAAM,EAAE,WAAWA,GAA0B,YAAYC,EAAA,IACvDC,EAAwC;AAAA,EACtC,QAAQ,CAASC,MAAA;AACf,UAAM,EAAE,uBAAAC,GAAuB,YAAAC,GAAY,eAAAC,EAAA,IAAkBH;AAE7D,WAAO,GAAGI,CAAa,0BAA0BF,CAAU,mBAAmBC,CAAa,IAAIF,CAAqB;AAAA,EACtH;AACF,CAAC;"}
package/dist/index.d.ts CHANGED
@@ -2477,6 +2477,8 @@ export declare const invalidateMilestoneResources: (id: string, query?: void | u
2477
2477
 
2478
2478
  export declare const invalidateMilestonesData: (query?: TQuery | undefined) => void;
2479
2479
 
2480
+ export declare const invalidatePastMilestoneCount: (query?: TQuery_2 | undefined) => void;
2481
+
2480
2482
  export declare const invalidateTestHelpData: (id: string, query?: void | undefined, allIdsInvalid?: boolean) => void;
2481
2483
 
2482
2484
  declare interface IOnChapterExitWarningProps {
@@ -5388,6 +5390,12 @@ declare type TQuery = {
5388
5390
  course_stream: TCourseStream;
5389
5391
  };
5390
5392
 
5393
+ declare type TQuery_2 = {
5394
+ milestone_state_group: 'ALL' | 'DRAFT' | 'STUDENT_ALL' | 'LIVE' | 'STUDENT_LIVE' | 'INACTIVE';
5395
+ student_id: string;
5396
+ course_stream: TCourseStream;
5397
+ };
5398
+
5391
5399
  declare type TQuestionByQuestionOverviewList = {
5392
5400
  section: string;
5393
5401
  question_no: number;
@@ -5766,6 +5774,20 @@ export declare const useGetMilestoneResources: (initialId?: string, initialQuery
5766
5774
  } & Record<string, unknown>) | undefined;
5767
5775
  };
5768
5776
 
5777
+ export declare const useGetPastMilestoneCount: (initialQuery?: TQuery_2 | undefined) => {
5778
+ getAll: (query: TQuery_2, meta: void) => Promise<void>;
5779
+ resource: ResourceModel<IMilestoneData[]> | undefined;
5780
+ data: IMilestoneData[] | undefined;
5781
+ permissions: Record<string, unknown> | undefined;
5782
+ isProcessing: boolean;
5783
+ isProcessed: boolean;
5784
+ isProcessingFailed: boolean;
5785
+ isStale: boolean;
5786
+ error: ({
5787
+ message?: string | undefined;
5788
+ } & Record<string, unknown>) | undefined;
5789
+ };
5790
+
5769
5791
  export declare const useGetTestHelpData: (initialId?: string, initialQuery?: void | undefined) => {
5770
5792
  get: (id: string, query: void, meta: {
5771
5793
  studentId: string;
package/dist/index.js CHANGED
@@ -2,17 +2,17 @@ import { default as r } from "./features/ui/grade-selector/grade-selector.js";
2
2
  import { default as a } from "./features/ui/stepper/stepper.js";
3
3
  import { ILLUSTRATIONS as s } from "./assets/illustrations/illustrations.js";
4
4
  import { IMAGES as p } from "./assets/images/images.js";
5
- import { LOTTIE as u } from "./assets/lottie/lottie.js";
5
+ import { LOTTIE as m } from "./assets/lottie/lottie.js";
6
6
  import { default as x } from "./assets/line-icons/icons/alert.js";
7
7
  import { default as c } from "./assets/line-icons/icons/back.js";
8
- import { default as i } from "./assets/line-icons/icons/bin.js";
8
+ import { default as I } from "./assets/line-icons/icons/bin.js";
9
9
  import { default as S } from "./assets/line-icons/icons/bin2.js";
10
10
  import { default as C } from "./assets/line-icons/icons/book-closed.js";
11
- import { default as _ } from "./assets/line-icons/icons/book.js";
11
+ import { default as P } from "./assets/line-icons/icons/book.js";
12
12
  import { default as h } from "./assets/line-icons/icons/book2.js";
13
13
  import { default as R } from "./assets/line-icons/icons/bookmark.js";
14
14
  import { default as N } from "./assets/line-icons/icons/bulb.js";
15
- import { default as M } from "./assets/line-icons/icons/bulb2.js";
15
+ import { default as O } from "./assets/line-icons/icons/bulb2.js";
16
16
  import { default as D } from "./assets/line-icons/icons/calendar.js";
17
17
  import { default as g } from "./assets/line-icons/icons/check.js";
18
18
  import { default as U } from "./assets/line-icons/icons/check2.js";
@@ -29,17 +29,17 @@ import { default as re } from "./assets/line-icons/icons/draft.js";
29
29
  import { default as ae } from "./assets/line-icons/icons/drag.js";
30
30
  import { default as se } from "./assets/line-icons/icons/edit.js";
31
31
  import { default as pe } from "./assets/line-icons/icons/edit2.js";
32
- import { default as ue } from "./assets/line-icons/icons/edit-star.js";
32
+ import { default as me } from "./assets/line-icons/icons/edit-star.js";
33
33
  import { default as xe } from "./assets/line-icons/icons/eraser.js";
34
34
  import { default as ce } from "./assets/line-icons/icons/eye.js";
35
- import { default as ie } from "./assets/line-icons/icons/eye2.js";
35
+ import { default as Ie } from "./assets/line-icons/icons/eye2.js";
36
36
  import { default as Se } from "./assets/line-icons/icons/exclamation.js";
37
37
  import { default as Ce } from "./assets/line-icons/icons/hand.js";
38
- import { default as _e } from "./assets/line-icons/icons/help.js";
38
+ import { default as Pe } from "./assets/line-icons/icons/help.js";
39
39
  import { default as he } from "./assets/line-icons/icons/highlighter.js";
40
40
  import { default as Re } from "./assets/line-icons/icons/home.js";
41
41
  import { default as Ne } from "./assets/line-icons/icons/image.js";
42
- import { default as Me } from "./assets/line-icons/icons/info.js";
42
+ import { default as Oe } from "./assets/line-icons/icons/info.js";
43
43
  import { default as De } from "./assets/line-icons/icons/info2.js";
44
44
  import { default as ge } from "./assets/line-icons/icons/left.js";
45
45
  import { default as Ue } from "./assets/line-icons/icons/lock.js";
@@ -56,16 +56,16 @@ import { default as ro } from "./assets/line-icons/icons/pointer.js";
56
56
  import { default as ao } from "./assets/line-icons/icons/play.js";
57
57
  import { default as so } from "./assets/line-icons/icons/play2.js";
58
58
  import { default as po } from "./assets/line-icons/icons/plus.js";
59
- import { default as uo } from "./assets/line-icons/icons/plus2.js";
59
+ import { default as mo } from "./assets/line-icons/icons/plus2.js";
60
60
  import { default as no } from "./assets/line-icons/icons/practice.js";
61
- import { default as Io } from "./assets/line-icons/icons/progress.js";
61
+ import { default as io } from "./assets/line-icons/icons/progress.js";
62
62
  import { default as To } from "./assets/line-icons/icons/question.js";
63
63
  import { default as Eo } from "./assets/line-icons/icons/question-letter.js";
64
64
  import { default as Ao } from "./assets/line-icons/icons/redo.js";
65
- import { default as Po } from "./assets/line-icons/icons/right.js";
65
+ import { default as _o } from "./assets/line-icons/icons/right.js";
66
66
  import { default as Lo } from "./assets/line-icons/icons/ruler.js";
67
67
  import { default as ko } from "./assets/line-icons/icons/search.js";
68
- import { default as Oo } from "./assets/line-icons/icons/sheet.js";
68
+ import { default as Mo } from "./assets/line-icons/icons/sheet.js";
69
69
  import { default as Ho } from "./assets/line-icons/icons/star.js";
70
70
  import { default as Go } from "./assets/line-icons/icons/skip-colored.js";
71
71
  import { default as yo } from "./assets/line-icons/icons/skip.js";
@@ -82,17 +82,17 @@ import { default as or } from "./assets/line-icons/icons/unlock2.js";
82
82
  import { default as tr } from "./assets/line-icons/icons/up.js";
83
83
  import { default as fr } from "./assets/line-icons/icons/user.js";
84
84
  import { default as lr } from "./assets/line-icons/icons/user2.js";
85
- import { default as mr, default as ur } from "./assets/line-icons/icons/sketch.js";
85
+ import { default as ur, default as mr } from "./assets/line-icons/icons/sketch.js";
86
86
  import { default as xr } from "./assets/line-icons/icons/back2.js";
87
87
  import { default as cr } from "./assets/line-icons/icons/chevron-right.js";
88
- import { default as ir } from "./assets/line-icons/icons/chevron-left.js";
88
+ import { default as Ir } from "./assets/line-icons/icons/chevron-left.js";
89
89
  import { default as Sr } from "./assets/line-icons/icons/chevron-down.js";
90
90
  import { default as Cr } from "./assets/line-icons/icons/game.js";
91
- import { default as _r } from "./assets/line-icons/icons/tutoring.js";
91
+ import { default as Pr } from "./assets/line-icons/icons/tutoring.js";
92
92
  import { default as hr } from "./assets/line-icons/icons/chat.js";
93
93
  import { default as Rr } from "./assets/line-icons/icons/cuemath-logo.js";
94
94
  import { default as Nr } from "./assets/line-icons/icons/next2.js";
95
- import { AutoPlayPermissionProvider as Mr } from "./features/hooks/use-auto-play-permission/use-auto-play-permission-context-provider.js";
95
+ import { AutoPlayPermissionProvider as Or } from "./features/hooks/use-auto-play-permission/use-auto-play-permission-context-provider.js";
96
96
  import { default as Dr } from "./features/hooks/use-zoom-disable.js";
97
97
  import { default as gr } from "./features/hooks/use-force-reload.js";
98
98
  import { default as Ur } from "./features/ui/accordion-section/accordion-section.js";
@@ -109,17 +109,17 @@ import { default as rt } from "./features/ui/error/error.js";
109
109
  import { default as at } from "./features/ui/inputs/checkbox-input/checkbox-input.js";
110
110
  import { default as st } from "./features/ui/inputs/checkbox-input-list/checkbox-input-list.js";
111
111
  import { default as pt } from "./features/ui/inputs/radio-input/radio-input.js";
112
- import { default as ut } from "./features/ui/inputs/select-input/select-input.js";
112
+ import { default as mt } from "./features/ui/inputs/select-input/select-input.js";
113
113
  import { default as xt } from "./features/ui/inputs/searchable-select-input/searchable-select-input.js";
114
114
  import { default as ct } from "./features/ui/inputs/google-places-search-input/google-places-search-input.js";
115
- import { default as it } from "./features/ui/inputs/text-input/text-input.js";
115
+ import { default as It } from "./features/ui/inputs/text-input/text-input.js";
116
116
  import { default as St } from "./features/ui/inputs/cascading-select-input/cascading-select-input.js";
117
117
  import { default as Ct } from "./features/ui/inputs/num-range-input/num-range-input.js";
118
- import { default as _t } from "./features/ui/inputs/percentile-input/percentile-input.js";
118
+ import { default as Pt } from "./features/ui/inputs/percentile-input/percentile-input.js";
119
119
  import { default as ht } from "./features/ui/selection-cards/selection-cards.js";
120
120
  import { default as Rt } from "./features/ui/layout/flex-view.js";
121
121
  import { default as Nt } from "./features/ui/loader/app-loader/app-loader.js";
122
- import { CircularLoader as Mt } from "./features/ui/loader/circular-loader/circular-loader.js";
122
+ import { CircularLoader as Ot } from "./features/ui/loader/circular-loader/circular-loader.js";
123
123
  import { default as Dt } from "./features/ui/radio-cards/radio-cards.js";
124
124
  import { default as gt } from "./features/ui/section-list/section-list.js";
125
125
  import { default as Ut } from "./features/ui/text/text.js";
@@ -135,17 +135,17 @@ import { default as oa } from "./features/ui/tab/tab.js";
135
135
  import { default as ta } from "./features/ui/streak-icon/streak-icon.js";
136
136
  import { default as fa } from "./features/ui/separator/separator.js";
137
137
  import { default as la } from "./features/ui/video/index.js";
138
- import { default as ma } from "./features/ui/perfect-hits/perfect-hits.js";
138
+ import { default as ua } from "./features/ui/perfect-hits/perfect-hits.js";
139
139
  import { default as da } from "./features/ui/image/image.js";
140
140
  import { default as na } from "./features/ui/animated-arc/animated-arc.js";
141
- import { default as Ia } from "./features/auth/comps/auth-static-panel/auth-static-panel.js";
141
+ import { default as ia } from "./features/auth/comps/auth-static-panel/auth-static-panel.js";
142
142
  import { default as Ta } from "./features/auth/comps/auth-page-layout/auth-page-layout.js";
143
143
  import { default as Ea } from "./features/auth/comps/overlay-loader/overlay-loader.js";
144
144
  import { default as Aa } from "./features/auth/comps/tabs/tabs.js";
145
- import { default as Pa } from "./features/auth/comps/input-status-icon/input-status-icon.js";
145
+ import { default as _a } from "./features/auth/comps/input-status-icon/input-status-icon.js";
146
146
  import { default as La } from "./features/auth/comps/resend-otp/resend-otp.js";
147
147
  import { default as ka } from "./features/auth/signup/user-type-selector/user-type-selector.js";
148
- import { default as Oa } from "./features/auth/signup/claim-user-account/claim-user-account.js";
148
+ import { default as Ma } from "./features/auth/signup/claim-user-account/claim-user-account.js";
149
149
  import { default as Ha } from "./features/auth/signup/custom-input-field/grade-input/grade-input.js";
150
150
  import { default as Ga } from "./features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js";
151
151
  import { default as ya } from "./features/auth/signup/custom-input-field/custom-input-field.js";
@@ -162,17 +162,17 @@ import { default as of } from "./features/auth/forgot-password/user-identifier-f
162
162
  import { AUTH_TABS as tf } from "./features/auth/login/login-constants.js";
163
163
  import { AuthApiErrorCode as ff } from "./features/auth/signup/signup-constants.js";
164
164
  import { PLATFORM_EVENTS_STUDENT as lf } from "./features/analytics-events/platform-events-student.js";
165
- import { PLATFORM_EVENTS_TEACHER as mf } from "./features/analytics-events/platform-events-teacher.js";
165
+ import { PLATFORM_EVENTS_TEACHER as uf } from "./features/analytics-events/platform-events-teacher.js";
166
166
  import { WHITELIST_EVENTS as df } from "./features/analytics-events/whitelist-events.js";
167
167
  import { default as nf } from "./features/blockers/multi-tab-blocker/use-is-tab-blocked.js";
168
168
  import { default as If } from "./features/blockers/multi-tab-blocker/multi-tab-blocker.js";
169
169
  import { default as Sf } from "./features/chapters/chapter/chapter.js";
170
170
  import { default as Cf } from "./features/chapters/chapters-list/chapters-list.js";
171
- import { default as _f } from "./features/chapters/lpar-chapter/lpar-chapter.js";
171
+ import { default as Pf } from "./features/chapters/lpar-chapter/lpar-chapter.js";
172
172
  import { default as hf } from "./features/chapters/lpar-milestone-chapter/lpar-milestone-chapter.js";
173
173
  import { default as Rf } from "./features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/sat-sheet-summary.js";
174
174
  import { checkIfPPTNodeType as Nf } from "./features/chapters/lpar-chapter/utils/index.js";
175
- import { default as Mf } from "./features/chapters-v2/chapter-details/chapter-details.js";
175
+ import { default as Of } from "./features/chapters-v2/chapter-details/chapter-details.js";
176
176
  import { invalidateGetChapterDetails as Df } from "./features/chapters-v2/api/chapter.js";
177
177
  import { GAME_LAUNCHER_ASSET_PADDING as gf } from "./features/circle-games/game-launcher/comps/segmented-game-card/constants.js";
178
178
  import { GAME_LAUNCHER_SIZE as Uf } from "./features/circle-games/game-launcher/comps/card-container/constants.js";
@@ -189,16 +189,16 @@ import { ProjectType as rs } from "./features/circle-games/games/web-view/enums/
189
189
  import { PlayerType as as } from "./features/circle-games/games/web-view/enums/player-type-enum.js";
190
190
  import { IStatsToAwardErrorCode as ss } from "./features/circle-games/games/web-view/web-view-types.js";
191
191
  import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as ps } from "./features/circle-games/enum/circle-onboarding-steps.js";
192
- import { CIRCLE_ACTION_IDS as us } from "./features/circle-games/enum/circle-action-ids.js";
192
+ import { CIRCLE_ACTION_IDS as ms } from "./features/circle-games/enum/circle-action-ids.js";
193
193
  import { GameLauncher as xs } from "./features/circle-games/game-launcher/game-launcher.js";
194
194
  import { useGetCircleHomeDetailsDal as cs } from "./features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js";
195
- import { Leaderboard as is } from "./features/circle-games/leaderboard/leaderboard.js";
195
+ import { Leaderboard as Is } from "./features/circle-games/leaderboard/leaderboard.js";
196
196
  import { BackgroundImage as Ss, CircularSteps as Es } from "./features/circle-games/sign-up/comp/circular-steps/circular-steps.js";
197
197
  import { SplashScreen as As } from "./features/circle-games/sign-up/comp/splash-screen/splash-screen.js";
198
- import { SignUp as Ps } from "./features/circle-games/sign-up/sign-up.js";
198
+ import { SignUp as _s } from "./features/circle-games/sign-up/sign-up.js";
199
199
  import { default as Ls } from "./features/cue-canvas/cue-canvas-provider.js";
200
200
  import { default as ks } from "./features/cue-canvas/toolbar/toolbar.js";
201
- import { default as Os } from "./features/cue-canvas/cue-canvas.js";
201
+ import { default as Ms } from "./features/cue-canvas/cue-canvas.js";
202
202
  import { default as Hs } from "./features/cue-canvas/hooks/use-canvas-sync-broker.js";
203
203
  import { default as Gs } from "./features/cue-canvas/sidebar/sidebar.js";
204
204
  import { default as ys } from "./features/cue-canvas/bottombar/homework-controls.js";
@@ -215,17 +215,17 @@ import { default as rl } from "./features/homework/hw-card-list/hw-card-list.js"
215
215
  import { invalidateHomeworks as al } from "./features/homework/hw-card-list/api/get-homeworks.js";
216
216
  import { useAutoPlayPermission as sl } from "./features/hooks/use-auto-play-permission/use-auto-play-permission.js";
217
217
  import { JOURNEY_ID_STUDENT as pl } from "./features/journey/journey-id/journey-id-student.js";
218
- import { JOURNEY_ID_TEACHER as ul } from "./features/journey/journey-id/journey-id-teacher.js";
218
+ import { JOURNEY_ID_TEACHER as ml } from "./features/journey/journey-id/journey-id-teacher.js";
219
219
  import { useJourney as xl } from "./features/journey/use-journey/use-journey.js";
220
220
  import { useGetEligibleJourneysViaRoute as cl } from "./features/journey/hooks/use-get-eligible-journeys-via-route.js";
221
- import { JourneyProvider as il } from "./features/journey/use-journey/journey-context-provider.js";
221
+ import { JourneyProvider as Il } from "./features/journey/use-journey/journey-context-provider.js";
222
222
  import { IndicatorType as Sl } from "./features/journey/use-journey/constants.js";
223
223
  import { Coachmark as Cl } from "./features/journey/comps/coachmark/coachmark.js";
224
- import { useHomePageJourney as _l } from "./features/journey/hooks/use-home-page-journey/use-home-page-journey.js";
224
+ import { useHomePageJourney as Pl } from "./features/journey/hooks/use-home-page-journey/use-home-page-journey.js";
225
225
  import { useChapterPageJourney as hl } from "./features/journey/hooks/use-chapter-journey.js";
226
226
  import { default as Rl } from "./features/maintenance/maintenance.js";
227
227
  import { default as Nl } from "./features/milestone/create/submit-modal/submit-modal.js";
228
- import { default as Ml } from "./features/milestone/create/comps/confirmation-modals/goal-creation-confirmation.js";
228
+ import { default as Ol } from "./features/milestone/create/comps/confirmation-modals/goal-creation-confirmation.js";
229
229
  import { default as Dl } from "./features/milestone/create/comps/confirmation-modals/chapter-clearance-confirmation.js";
230
230
  import { default as gl } from "./features/milestone/create/milestone-create-container.js";
231
231
  import { default as Ul } from "./features/milestone/edit/goal-drafts/goal-draft-edit-container.js";
@@ -241,33 +241,34 @@ import { default as ep } from "./features/milestone/start/milestone-start.js";
241
241
  import { default as rp } from "./features/milestone/milestone-tests/tests-creation/tests-creation.js";
242
242
  import { default as ap } from "./features/milestone/milestone-resources/resources-assign/resources-assign.js";
243
243
  import { ACHIEVEMENT_ACTIONS as sp, STAGES as lp } from "./features/milestone/outcome/milestone-outcome-constants.js";
244
- import { invalidateMilestonesData as mp, useGetAllMilestonesdata as up } from "./features/milestone/milestone-list-container/api/get-milestones.js";
245
- import { invalidateTestHelpData as xp, useGetTestHelpData as np } from "./features/milestone/milestone-list-container/api/get-tests-list.js";
246
- import { invalidateMilestoneResources as Ip, useGetMilestoneResources as ip } from "./features/milestone/milestone-list-container/api/get-milestone-resources.js";
247
- import { default as Sp } from "./features/pointer-sync/pointer.js";
248
- import { default as Cp } from "./features/pointer-sync/hooks/use-pointer-sync.js";
249
- import { DigitalMeter as _p } from "./features/post-game-stats/digital-meter/digital-meter.js";
250
- import { EPostGameStat as hp } from "./features/post-game-stats/enums/post-game-stats-enum.js";
251
- import { PostGameStats as Rp } from "./features/post-game-stats/post-game-stats.js";
252
- import { default as Np } from "./features/recent-chapters/recent-chapters.js";
253
- import { SENTRY_DENIED_URLS as Mp, SENTRY_IGNORED_ERRORS as Hp } from "./features/sentry/constants/ignored.js";
254
- import { default as Gp } from "./features/sheet-tools/desmos-calculator/desmos-calculator.js";
255
- import { default as yp } from "./features/sheet-tools/tool-header/tool-header.js";
256
- import { default as Bp } from "./features/sheets/sheets-list/sheets-list.js";
257
- import { default as bp } from "./features/sheets/reference-sheet/reference-sheet.js";
258
- import { WORKSHEET_V3_NODE_TYPES as Wp } from "./features/sheets/utils/is-v3-worksheet.js";
259
- import { COMPLETED_SHEET_STATE as Fp, NODE_LABELS as Yp, NODE_SUB_GROUP as Jp, NODE_TYPE as Qp, PYTHON_NODE_TYPES as Kp, REWARDS_LIST as jp, SHEET_ACTIONS as Zp, SHEET_ATTEMPT_LOCATION as qp, SHEET_ATTEMPT_LOCATION_MAP as zp, SHEET_ATTEMPT_STATE as Xp, SHEET_DATA_TYPE as $p, SHEET_STATE as em } from "./features/sheets/constants/sheet.js";
260
- import { default as rm } from "./features/student-details/student-details.js";
261
- import { default as am } from "./features/utils/load-script.js";
262
- import { ACTION_BAR_HEIGHT as sm, QUESTIONS_GAP as lm, QUESTION_WIDTH as pm, TOP_NAVIGATION_HEIGHT as mm } from "./features/worksheet/worksheet/constants.js";
263
- import { isOkayTypeQuestion as dm } from "./features/worksheet/worksheet/worksheet-helpers.js";
264
- import { default as nm } from "./features/worksheet/worksheet/worksheet-container.js";
265
- import { default as Im } from "./features/worksheet/worksheet-preview/worksheet-preview.js";
266
- import { default as Tm } from "./features/worksheet/worksheet/worksheet-permissions/sheet-locked.js";
267
- import { default as Em } from "./features/worksheet/worksheet/worksheet-permissions/error.js";
268
- import { default as Am } from "./features/worksheet/learnosity-preloader/learnosity-preloader.js";
269
- import { default as Pm } from "./features/worksheet/learnosity-preloader/use-is-learnosity-loaded.js";
270
- import { default as Lm } from "./features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js";
244
+ import { invalidateMilestonesData as up, useGetAllMilestonesdata as mp } from "./features/milestone/milestone-list-container/api/get-milestones.js";
245
+ import { invalidatePastMilestoneCount as xp, useGetPastMilestoneCount as np } from "./features/milestone/milestone-list-container/api/get-past-milestone-count.js";
246
+ import { invalidateTestHelpData as ip, useGetTestHelpData as Ip } from "./features/milestone/milestone-list-container/api/get-tests-list.js";
247
+ import { invalidateMilestoneResources as Sp, useGetMilestoneResources as Ep } from "./features/milestone/milestone-list-container/api/get-milestone-resources.js";
248
+ import { default as Ap } from "./features/pointer-sync/pointer.js";
249
+ import { default as _p } from "./features/pointer-sync/hooks/use-pointer-sync.js";
250
+ import { DigitalMeter as Lp } from "./features/post-game-stats/digital-meter/digital-meter.js";
251
+ import { EPostGameStat as kp } from "./features/post-game-stats/enums/post-game-stats-enum.js";
252
+ import { PostGameStats as Mp } from "./features/post-game-stats/post-game-stats.js";
253
+ import { default as Hp } from "./features/recent-chapters/recent-chapters.js";
254
+ import { SENTRY_DENIED_URLS as Gp, SENTRY_IGNORED_ERRORS as gp } from "./features/sentry/constants/ignored.js";
255
+ import { default as Up } from "./features/sheet-tools/desmos-calculator/desmos-calculator.js";
256
+ import { default as vp } from "./features/sheet-tools/tool-header/tool-header.js";
257
+ import { default as wp } from "./features/sheets/sheets-list/sheets-list.js";
258
+ import { default as Vp } from "./features/sheets/reference-sheet/reference-sheet.js";
259
+ import { WORKSHEET_V3_NODE_TYPES as Yp } from "./features/sheets/utils/is-v3-worksheet.js";
260
+ import { COMPLETED_SHEET_STATE as Qp, NODE_LABELS as Kp, NODE_SUB_GROUP as jp, NODE_TYPE as Zp, PYTHON_NODE_TYPES as qp, REWARDS_LIST as zp, SHEET_ACTIONS as Xp, SHEET_ATTEMPT_LOCATION as $p, SHEET_ATTEMPT_LOCATION_MAP as eu, SHEET_ATTEMPT_STATE as ou, SHEET_DATA_TYPE as ru, SHEET_STATE as tu } from "./features/sheets/constants/sheet.js";
261
+ import { default as fu } from "./features/student-details/student-details.js";
262
+ import { default as lu } from "./features/utils/load-script.js";
263
+ import { ACTION_BAR_HEIGHT as uu, QUESTIONS_GAP as mu, QUESTION_WIDTH as du, TOP_NAVIGATION_HEIGHT as xu } from "./features/worksheet/worksheet/constants.js";
264
+ import { isOkayTypeQuestion as cu } from "./features/worksheet/worksheet/worksheet-helpers.js";
265
+ import { default as Iu } from "./features/worksheet/worksheet/worksheet-container.js";
266
+ import { default as Su } from "./features/worksheet/worksheet-preview/worksheet-preview.js";
267
+ import { default as Cu } from "./features/worksheet/worksheet/worksheet-permissions/sheet-locked.js";
268
+ import { default as Pu } from "./features/worksheet/worksheet/worksheet-permissions/error.js";
269
+ import { default as hu } from "./features/worksheet/learnosity-preloader/learnosity-preloader.js";
270
+ import { default as Ru } from "./features/worksheet/learnosity-preloader/use-is-learnosity-loaded.js";
271
+ import { default as Nu } from "./features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js";
271
272
  export {
272
273
  sp as ACHIEVEMENT_ACTIONS,
273
274
  tf as AUTH_TABS,
@@ -282,30 +283,30 @@ export {
282
283
  vr as ArrowTooltip,
283
284
  ff as AuthApiErrorCode,
284
285
  Ta as AuthPageLayout,
285
- Ia as AuthStaticPanel,
286
- Mr as AutoPlayPermissionProvider,
286
+ ia as AuthStaticPanel,
287
+ Or as AutoPlayPermissionProvider,
287
288
  zt as Avatar,
288
289
  xr as Back2Icon,
289
290
  c as BackIcon,
290
291
  Ss as BackgroundImage,
291
292
  S as Bin2Icon,
292
- i as BinIcon,
293
+ I as BinIcon,
293
294
  h as Book2Icon,
294
295
  C as BookClosedIcon,
295
- _ as BookIcon,
296
+ P as BookIcon,
296
297
  R as BookmarkIcon,
297
- M as Bulb2Icon,
298
+ O as Bulb2Icon,
298
299
  N as BulbIcon,
299
300
  Qr as Button,
300
- us as CIRCLE_ACTION_IDS,
301
+ ms as CIRCLE_ACTION_IDS,
301
302
  ps as CIRCLE_ONBOARDING_ANALYTICS_STEPS,
302
- Fp as COMPLETED_SHEET_STATE,
303
+ Qp as COMPLETED_SHEET_STATE,
303
304
  D as CalendarIcon,
304
305
  wt as Callout,
305
306
  St as CascadingSelectInput,
306
307
  Sf as Chapter,
307
308
  Dl as ChapterClearanceConfirmationModal,
308
- Mf as ChapterDetails,
309
+ Of as ChapterDetails,
309
310
  Cf as ChaptersList,
310
311
  hr as ChatIcon,
311
312
  U as Check2Icon,
@@ -313,13 +314,13 @@ export {
313
314
  at as CheckboxInput,
314
315
  st as CheckboxInputList,
315
316
  Sr as ChevronDownIcon,
316
- ir as ChevronLeftIcon,
317
+ Ir as ChevronLeftIcon,
317
318
  cr as ChevronRightIcon,
318
319
  wf as CircleSoundKey,
319
- Mt as CircularLoader,
320
+ Ot as CircularLoader,
320
321
  Ba as CircularStepWrapper,
321
322
  Es as CircularSteps,
322
- Oa as ClaimUserAccount,
323
+ Ma as ClaimUserAccount,
323
324
  jr as Clickable,
324
325
  v as ClipboardIcon,
325
326
  V as Clock2Icon,
@@ -330,7 +331,7 @@ export {
330
331
  Q as CopyIcon,
331
332
  Vr as CountdownTimer,
332
333
  j as CrossIcon,
333
- Os as CueCanvas,
334
+ Ms as CueCanvas,
334
335
  ks as CueCanvasController,
335
336
  ys as CueCanvasHomeworkController,
336
337
  Ls as CueCanvasProvider,
@@ -340,40 +341,40 @@ export {
340
341
  ya as CustomInputField,
341
342
  X as DashArrowIcon,
342
343
  Ga as DatePickerInput,
343
- Gp as DesmosCalculator,
344
- _p as DigitalMeter,
344
+ Up as DesmosCalculator,
345
+ Lp as DigitalMeter,
345
346
  ee as DownIcon,
346
347
  re as DraftIcon,
347
348
  ae as DragIcon,
348
349
  js as EClassTimeAlertLevel,
349
350
  Yf as ELeaderboardType,
350
351
  ap as EPResourceAssign,
351
- hp as EPostGameStat,
352
+ kp as EPostGameStat,
352
353
  Ws as EVENTS,
353
354
  pe as Edit2Icon,
354
355
  se as EditIcon,
355
356
  Yl as EditMilestoneModal,
356
- ue as EditStarIcon,
357
+ me as EditStarIcon,
357
358
  xe as EraserIcon,
358
359
  rt as Error,
359
360
  Se as ExclamationIcon,
360
- yp as ExpandableHeader,
361
+ vp as ExpandableHeader,
361
362
  el as ExtraPractice,
362
- ie as Eye2Icon,
363
+ Ie as Eye2Icon,
363
364
  ce as EyeIcon,
364
365
  Rt as FlexView,
365
366
  gf as GAME_LAUNCHER_ASSET_PADDING,
366
367
  Uf as GAME_LAUNCHER_SIZE,
367
368
  Cr as GameIcon,
368
369
  xs as GameLauncher,
369
- Ml as GoalCreationConfirmationModal,
370
+ Ol as GoalCreationConfirmationModal,
370
371
  Ul as GoalDraftEdit,
371
372
  Ql as GoalEdit,
372
373
  ct as GooglePlacesSearchInput,
373
374
  Ha as GradeInput,
374
375
  r as GradeSelector,
375
376
  Ce as HandIcon,
376
- _e as HelpIcon,
377
+ Pe as HelpIcon,
377
378
  he as HighlighterIcon,
378
379
  Re as HomeIcon,
379
380
  rl as HomeworkCardList,
@@ -386,16 +387,16 @@ export {
386
387
  Ne as ImageIcon,
387
388
  Sl as IndicatorType,
388
389
  De as Info2Icon,
389
- Me as InfoIcon,
390
- Pa as InputStatusIcon,
390
+ Oe as InfoIcon,
391
+ _a as InputStatusIcon,
391
392
  pl as JOURNEY_ID_STUDENT,
392
- ul as JOURNEY_ID_TEACHER,
393
- il as JourneyProvider,
394
- u as LOTTIE,
395
- _f as LPARChapter,
393
+ ml as JOURNEY_ID_TEACHER,
394
+ Il as JourneyProvider,
395
+ m as LOTTIE,
396
+ Pf as LPARChapter,
396
397
  hf as LPARMilestoneChapter,
397
- is as Leaderboard,
398
- Am as LearnosityPreloader,
398
+ Is as Leaderboard,
399
+ hu as LearnosityPreloader,
399
400
  ge as LeftIcon,
400
401
  ve as Lock2Icon,
401
402
  we as Lock3Icon,
@@ -413,9 +414,9 @@ export {
413
414
  je as Mobile,
414
415
  qe as MoreVerticalIcon,
415
416
  If as MultiTabBlocker,
416
- Yp as NODE_LABELS,
417
- Jp as NODE_SUB_GROUP,
418
- Qp as NODE_TYPE,
417
+ Kp as NODE_LABELS,
418
+ jp as NODE_SUB_GROUP,
419
+ Zp as NODE_TYPE,
419
420
  Nr as Next2Icon,
420
421
  Xe as NextIcon,
421
422
  Yr as Nudge,
@@ -423,60 +424,60 @@ export {
423
424
  za as OTPForm,
424
425
  Ea as OverlayLoader,
425
426
  lf as PLATFORM_EVENTS_STUDENT,
426
- mf as PLATFORM_EVENTS_TEACHER,
427
- Kp as PYTHON_NODE_TYPES,
427
+ uf as PLATFORM_EVENTS_TEACHER,
428
+ qp as PYTHON_NODE_TYPES,
428
429
  eo as PencilIcon,
429
- _t as PercentileInput,
430
- ma as PerfectHits,
430
+ Pt as PercentileInput,
431
+ ua as PerfectHits,
431
432
  so as Play2Icon,
432
433
  ao as PlayIcon,
433
434
  as as PlayerType,
434
- uo as Plus2Icon,
435
+ mo as Plus2Icon,
435
436
  po as PlusIcon,
436
437
  ro as PointerIcon,
437
- Rp as PostGameStats,
438
+ Mp as PostGameStats,
438
439
  no as PracticeIcon,
439
- Im as PreviewWorksheet,
440
- Io as ProgressIcon,
440
+ Su as PreviewWorksheet,
441
+ io as ProgressIcon,
441
442
  Xf as ProjectOutcome,
442
443
  rs as ProjectType,
443
444
  To as QuestionIcon,
444
445
  Eo as QuestionLetterIcon,
445
- jp as REWARDS_LIST,
446
+ zp as REWARDS_LIST,
446
447
  Dt as RadioCard,
447
448
  pt as RadioInput,
448
- Np as RecentChapters,
449
+ Hp as RecentChapters,
449
450
  Ao as RedoIcon,
450
- bp as ReferenceSheet,
451
- Sp as RemotePeerPointer,
451
+ Vp as ReferenceSheet,
452
+ Ap as RemotePeerPointer,
452
453
  La as ResendOTP,
453
454
  $a as ResetPasswordForm,
454
- Po as RightIcon,
455
+ _o as RightIcon,
455
456
  Lo as RulerIcon,
456
457
  Rf as SATSheetSummary,
457
- Mp as SENTRY_DENIED_URLS,
458
- Hp as SENTRY_IGNORED_ERRORS,
459
- Zp as SHEET_ACTIONS,
460
- qp as SHEET_ATTEMPT_LOCATION,
461
- zp as SHEET_ATTEMPT_LOCATION_MAP,
462
- Xp as SHEET_ATTEMPT_STATE,
463
- $p as SHEET_DATA_TYPE,
464
- em as SHEET_STATE,
458
+ Gp as SENTRY_DENIED_URLS,
459
+ gp as SENTRY_IGNORED_ERRORS,
460
+ Xp as SHEET_ACTIONS,
461
+ $p as SHEET_ATTEMPT_LOCATION,
462
+ eu as SHEET_ATTEMPT_LOCATION_MAP,
463
+ ou as SHEET_ATTEMPT_STATE,
464
+ ru as SHEET_DATA_TYPE,
465
+ tu as SHEET_STATE,
465
466
  lp as STAGES,
466
- mr as ScribbleIcon,
467
+ ur as ScribbleIcon,
467
468
  ko as SearchIcon,
468
469
  xt as SearchableSelectInput,
469
470
  gt as SectionList,
470
- ut as SelectInput,
471
+ mt as SelectInput,
471
472
  ht as SelectionCards,
472
473
  fa as Separator,
473
- Em as SheetError,
474
- Oo as SheetIcon,
475
- Bp as SheetList,
476
- Tm as SheetLocked,
477
- Ps as SignUp,
474
+ Pu as SheetError,
475
+ Mo as SheetIcon,
476
+ wp as SheetList,
477
+ Cu as SheetLocked,
478
+ _s as SignUp,
478
479
  ba as SignupMethods,
479
- ur as SketchIcon,
480
+ mr as SketchIcon,
480
481
  Bo as Skip2Icon,
481
482
  Go as SkipColoredIcon,
482
483
  yo as SkipIcon,
@@ -490,7 +491,7 @@ export {
490
491
  ta as StreakIcon,
491
492
  Qf as StreakReductionLocalStorageUtil,
492
493
  Fo as StrikedEyeIcon,
493
- rm as StudentDetails,
494
+ fu as StudentDetails,
494
495
  Nl as SubmitMilestoneModal,
495
496
  Jo as SwitchIcon,
496
497
  oa as TabComponent,
@@ -500,13 +501,13 @@ export {
500
501
  rp as TestsCreation,
501
502
  Ut as Text,
502
503
  Xr as TextButton,
503
- it as TextInput,
504
+ It as TextInput,
504
505
  Ko as TickIcon,
505
506
  $t as TimeLeftTimeline,
506
507
  Qs as TrialSession,
507
508
  Zo as TrophyIcon,
508
509
  jf as Tutorial,
509
- _r as TutoringIcon,
510
+ Pr as TutoringIcon,
510
511
  Vt as UIContext,
511
512
  zo as UndoIcon,
512
513
  or as Unlock2Icon,
@@ -519,23 +520,24 @@ export {
519
520
  Ka as UsernamePasswordForm,
520
521
  la as Video,
521
522
  df as WHITELIST_EVENTS,
522
- sm as WORKSHEET_ACTION_BAR_HEIGHT,
523
- lm as WORKSHEET_QUESTIONS_GAP,
524
- pm as WORKSHEET_QUESTION_WIDTH,
525
- mm as WORKSHEET_TOP_NAVIGATION_HEIGHT,
526
- Wp as WORKSHEET_V3_NODE_TYPES,
523
+ uu as WORKSHEET_ACTION_BAR_HEIGHT,
524
+ mu as WORKSHEET_QUESTIONS_GAP,
525
+ du as WORKSHEET_QUESTION_WIDTH,
526
+ xu as WORKSHEET_TOP_NAVIGATION_HEIGHT,
527
+ Yp as WORKSHEET_V3_NODE_TYPES,
527
528
  qf as WebView,
528
529
  es as WebViewEvent,
529
- nm as Worksheet,
530
+ Iu as Worksheet,
530
531
  Nf as checkIfPPTNodeType,
531
532
  Zt as getTheme,
532
533
  Df as invalidateGetChapterDetails,
533
534
  al as invalidateHomeworks,
534
- Ip as invalidateMilestoneResources,
535
- mp as invalidateMilestonesData,
536
- xp as invalidateTestHelpData,
537
- dm as isOkayTypeQuestion,
538
- am as loadScript,
535
+ Sp as invalidateMilestoneResources,
536
+ up as invalidateMilestonesData,
537
+ xp as invalidatePastMilestoneCount,
538
+ ip as invalidateTestHelpData,
539
+ cu as isOkayTypeQuestion,
540
+ lu as loadScript,
539
541
  sl as useAutoPlayPermission,
540
542
  Hs as useCanvasSyncBroker,
541
543
  hl as useChapterPageJourney,
@@ -543,24 +545,25 @@ export {
543
545
  qs as useClassTimeAlerts,
544
546
  Kt as useContextMenuClickHandler,
545
547
  gr as useForceReload,
546
- up as useGetAllMilestonesdata,
548
+ mp as useGetAllMilestonesdata,
547
549
  cs as useGetCircleHomeDetailsDal,
548
550
  cl as useGetEligibleJourneysViaRoute,
549
551
  Vf as useGetLeaderboardDal,
550
- ip as useGetMilestoneResources,
551
- np as useGetTestHelpData,
552
- _l as useHomePageJourney,
552
+ Ep as useGetMilestoneResources,
553
+ np as useGetPastMilestoneCount,
554
+ Ip as useGetTestHelpData,
555
+ Pl as useHomePageJourney,
553
556
  Fs as useInClassActionDispatcher,
554
557
  Ys as useInClassActionListener,
555
558
  Bs as useInClassMessageBroker,
556
- Pm as useIsLearnosityLoaded,
559
+ Ru as useIsLearnosityLoaded,
557
560
  nf as useIsTabBlocked,
558
561
  xl as useJourney,
559
- Cp as usePointerSync,
562
+ _p as usePointerSync,
560
563
  Jt as useTrackingContext,
561
564
  bs as useTrialSessionMessageBroker,
562
565
  Ft as useUIContext,
563
- Lm as useWorksheetLayout,
566
+ Nu as useWorksheetLayout,
564
567
  Dr as useZoomDisable
565
568
  };
566
569
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.1.1",
3
+ "version": "3.1.2-beta-0.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"