@cuemath/leap 3.3.15-j1 → 3.3.15-j5

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,10 +1,22 @@
1
- import { useContext as r } from "react";
2
- import { JourneyContext as e } from "./journey-context-provider.js";
1
+ import { useContext as o } from "react";
2
+ import { JourneyContext as r } from "./journey-context-provider.js";
3
3
  const u = () => {
4
- const o = r(e);
5
- if (!o)
6
- throw new Error("useJourney must be used within a JourneyProvider");
7
- return o;
4
+ const e = o(r);
5
+ return e || {
6
+ nextCoachmark: () => {
7
+ },
8
+ setJourney: () => {
9
+ },
10
+ addCoachmark: () => {
11
+ },
12
+ clearJourney: () => {
13
+ },
14
+ endJourney: () => {
15
+ },
16
+ coachmarks: [],
17
+ userCompletedJourneyIds: [],
18
+ isJourneyActive: !1
19
+ };
8
20
  };
9
21
  export {
10
22
  u as useJourney
@@ -1 +1 @@
1
- {"version":3,"file":"use-journey.js","sources":["../../../../src/features/journey/use-journey/use-journey.tsx"],"sourcesContent":["import { useContext } from 'react';\n\nimport { JourneyContext } from './journey-context-provider';\n\nexport const useJourney = () => {\n const context = useContext(JourneyContext);\n\n if (!context) {\n throw new Error('useJourney must be used within a JourneyProvider');\n }\n\n return context;\n};\n"],"names":["useJourney","context","useContext","JourneyContext"],"mappings":";;AAIO,MAAMA,IAAa,MAAM;AACxB,QAAAC,IAAUC,EAAWC,CAAc;AAEzC,MAAI,CAACF;AACG,UAAA,IAAI,MAAM,kDAAkD;AAG7D,SAAAA;AACT;"}
1
+ {"version":3,"file":"use-journey.js","sources":["../../../../src/features/journey/use-journey/use-journey.tsx"],"sourcesContent":["import { useContext } from 'react';\n\nimport { JourneyContext } from './journey-context-provider';\n\nexport const useJourney = () => {\n const context = useContext(JourneyContext);\n\n if (!context) {\n return {\n nextCoachmark: () => {},\n setJourney: () => {},\n addCoachmark: () => {},\n clearJourney: () => {},\n endJourney: () => {},\n coachmarks: [],\n userCompletedJourneyIds: [],\n isJourneyActive: false,\n };\n }\n\n return context;\n};\n"],"names":["useJourney","context","useContext","JourneyContext"],"mappings":";;AAIO,MAAMA,IAAa,MAAM;AACxB,QAAAC,IAAUC,EAAWC,CAAc;AAEzC,SAAKF,KACI;AAAA,IACL,eAAe,MAAM;AAAA,IAAC;AAAA,IACtB,YAAY,MAAM;AAAA,IAAC;AAAA,IACnB,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,cAAc,MAAM;AAAA,IAAC;AAAA,IACrB,YAAY,MAAM;AAAA,IAAC;AAAA,IACnB,YAAY,CAAC;AAAA,IACb,yBAAyB,CAAC;AAAA,IAC1B,iBAAiB;AAAA,EAAA;AAKvB;"}
package/dist/index.d.ts CHANGED
@@ -2540,7 +2540,7 @@ declare interface IMilestoneCardPermissions {
2540
2540
  visible_tabs: string[];
2541
2541
  }
2542
2542
 
2543
- export declare interface IMilestoneConfig {
2543
+ declare interface IMilestoneConfig {
2544
2544
  action_plan: Record<'green' | 'red' | 'yellow', {
2545
2545
  share_message_template: string;
2546
2546
  }>;
@@ -3124,7 +3124,7 @@ export declare interface IPostGameStatsRef {
3124
3124
  declare interface IPreferencesCurriculumMap {
3125
3125
  course_stream: TCourseStream;
3126
3126
  is_live: boolean;
3127
- preference_category: TLearningPreferenceCategory;
3127
+ preference_category: TPreferenceCategory;
3128
3128
  preference_code: string;
3129
3129
  preference_grades: string[];
3130
3130
  preference_name: string;
@@ -6147,8 +6147,6 @@ export declare type TJourneyId = JOURNEY_ID_STUDENT | JOURNEY_ID_TEACHER;
6147
6147
 
6148
6148
  declare type TLayerKey = 'layer-1' | 'layer-2' | 'layer-3' | 'layer-4';
6149
6149
 
6150
- export declare type TLearningPreferenceCategory = (typeof PREFERENCE_CATEGORY)[keyof typeof PREFERENCE_CATEGORY];
6151
-
6152
6150
  declare type TLearnosityPreloaderContextValue = {
6153
6151
  scriptStatus: Omit<TScriptStatus, 'loaded'>;
6154
6152
  defaultAPIURL: string;
@@ -6434,6 +6432,8 @@ declare type TPreference = {
6434
6432
  selectedTime: string;
6435
6433
  };
6436
6434
 
6435
+ declare type TPreferenceCategory = (typeof PREFERENCE_CATEGORY)[keyof typeof PREFERENCE_CATEGORY];
6436
+
6437
6437
  declare type TProfileHighlight = {
6438
6438
  illustration: string;
6439
6439
  background: TColorNames;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.3.15-j1",
3
+ "version": "3.3.15-j5",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"