@speakableio/core 0.1.96 → 0.1.98

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.
@@ -440,6 +440,7 @@ interface Assignment {
440
440
  [key in ActivityPageType]?: number;
441
441
  };
442
442
  aiEnabled?: boolean;
443
+ chat_experience?: boolean;
443
444
  }
444
445
  interface AssignmentWithId extends Assignment {
445
446
  id: string;
@@ -621,6 +622,7 @@ declare const createAssignmentRepo: () => {
621
622
  language?: string;
622
623
  types?: { [key in ActivityPageType]?: number; };
623
624
  aiEnabled?: boolean;
625
+ chat_experience?: boolean;
624
626
  } | null>;
625
627
  attachScoresAssignment: (args_0: {
626
628
  assignments: AssignmentWithId[];
@@ -670,6 +672,7 @@ declare const createAssignmentRepo: () => {
670
672
  language?: string;
671
673
  types?: { [key in ActivityPageType]?: number; };
672
674
  aiEnabled?: boolean;
675
+ chat_experience?: boolean;
673
676
  }[]>;
674
677
  getAssignmentScores: (args_0: {
675
678
  assignmentId: string;
@@ -738,6 +741,7 @@ declare function useAssignment({ assignmentId, enabled, analyticType, userId, }:
738
741
  language?: string;
739
742
  types?: { [key in ActivityPageType]?: number; };
740
743
  aiEnabled?: boolean;
744
+ chat_experience?: boolean;
741
745
  } | null, Error>;
742
746
 
743
747
  declare const scoreQueryKeys: {
@@ -999,6 +1003,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
999
1003
  language?: string;
1000
1004
  types?: { [key in ActivityPageType]?: number; };
1001
1005
  aiEnabled?: boolean;
1006
+ chat_experience?: boolean;
1002
1007
  } | null>;
1003
1008
  attachScoresAssignment: (args_0: {
1004
1009
  assignments: AssignmentWithId[];
@@ -1048,6 +1053,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
1048
1053
  language?: string;
1049
1054
  types?: { [key in ActivityPageType]?: number; };
1050
1055
  aiEnabled?: boolean;
1056
+ chat_experience?: boolean;
1051
1057
  }[]>;
1052
1058
  getAssignmentScores: (args_0: {
1053
1059
  assignmentId: string;
@@ -1358,6 +1364,7 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
1358
1364
  language?: string;
1359
1365
  types?: { [key in ActivityPageType]?: number; };
1360
1366
  aiEnabled?: boolean;
1367
+ chat_experience?: boolean;
1361
1368
  } | null | undefined;
1362
1369
  query: _tanstack_react_query.UseQueryResult<AssignmentWithId | {
1363
1370
  scores: any;
@@ -1402,6 +1409,7 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
1402
1409
  language?: string;
1403
1410
  types?: { [key in ActivityPageType]?: number; };
1404
1411
  aiEnabled?: boolean;
1412
+ chat_experience?: boolean;
1405
1413
  } | null, Error>;
1406
1414
  };
1407
1415
  scores: {
@@ -2670,6 +2678,7 @@ declare const createFsClientWeb: ({ db, httpsCallable, logEvent }: FsClientParam
2670
2678
  language?: string;
2671
2679
  types?: { [key in ActivityPageType]?: number; };
2672
2680
  aiEnabled?: boolean;
2681
+ chat_experience?: boolean;
2673
2682
  } | null>;
2674
2683
  attachScoresAssignment: (args_0: {
2675
2684
  assignments: AssignmentWithId[];
@@ -2719,6 +2728,7 @@ declare const createFsClientWeb: ({ db, httpsCallable, logEvent }: FsClientParam
2719
2728
  language?: string;
2720
2729
  types?: { [key in ActivityPageType]?: number; };
2721
2730
  aiEnabled?: boolean;
2731
+ chat_experience?: boolean;
2722
2732
  }[]>;
2723
2733
  getAssignmentScores: (args_0: {
2724
2734
  assignmentId: string;
package/dist/index.web.js CHANGED
@@ -1100,7 +1100,7 @@ async function clearScore(params) {
1100
1100
  var _a, _b, _c, _d, _e;
1101
1101
  const update = {
1102
1102
  [`cards.${params.cardId}`]: {
1103
- attempts: (_a = params.cardScores.attempts) != null ? _a : 1,
1103
+ attempts: ((_a = params.cardScores.attempts) != null ? _a : 1) + 1,
1104
1104
  correct: (_b = params.cardScores.correct) != null ? _b : 0,
1105
1105
  // save old score history
1106
1106
  history: [