@speakableio/core 1.0.46 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.native.d.mts +16 -2
- package/dist/index.native.d.ts +16 -2
- package/dist/index.native.js +34 -15
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +34 -15
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +16 -2
- package/dist/index.web.js +34 -15
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.d.mts
CHANGED
|
@@ -118,6 +118,7 @@ interface PageActivity {
|
|
|
118
118
|
target_text?: string;
|
|
119
119
|
type: ActivityPageType;
|
|
120
120
|
grading_criteria?: string;
|
|
121
|
+
grading_criteria_title?: string;
|
|
121
122
|
scoring_type?: string;
|
|
122
123
|
grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based';
|
|
123
124
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -172,7 +173,8 @@ declare const enum ActivityPageType {
|
|
|
172
173
|
RESPOND_WRITE = "RESPOND_WRITE",
|
|
173
174
|
MULTIPLE_CHOICE = "MULTIPLE_CHOICE",
|
|
174
175
|
MEDIA_PAGE = "MEDIA_PAGE",
|
|
175
|
-
SHORT_ANSWER = "SHORT_ANSWER"
|
|
176
|
+
SHORT_ANSWER = "SHORT_ANSWER",
|
|
177
|
+
CONVERSATION = "CONVERSATION"
|
|
176
178
|
}
|
|
177
179
|
declare const RESPOND_PAGE_ACTIVITY_TYPES: ActivityPageType[];
|
|
178
180
|
declare const MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES: ActivityPageType[];
|
|
@@ -220,6 +222,7 @@ declare function useCards({ cardIds, enabled, asObject, }: {
|
|
|
220
222
|
default_language?: string;
|
|
221
223
|
target_text?: string;
|
|
222
224
|
grading_criteria?: string;
|
|
225
|
+
grading_criteria_title?: string;
|
|
223
226
|
scoring_type?: string;
|
|
224
227
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
225
228
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -301,6 +304,7 @@ declare function useCreateCards(): {
|
|
|
301
304
|
target_text?: string;
|
|
302
305
|
type: ActivityPageType;
|
|
303
306
|
grading_criteria?: string;
|
|
307
|
+
grading_criteria_title?: string;
|
|
304
308
|
scoring_type?: string;
|
|
305
309
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
306
310
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -388,6 +392,7 @@ declare function useGetCard({ cardId, enabled }: {
|
|
|
388
392
|
default_language?: string;
|
|
389
393
|
target_text?: string;
|
|
390
394
|
grading_criteria?: string;
|
|
395
|
+
grading_criteria_title?: string;
|
|
391
396
|
scoring_type?: string;
|
|
392
397
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
393
398
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -469,6 +474,7 @@ declare const createCardRepo: () => {
|
|
|
469
474
|
target_text?: string;
|
|
470
475
|
type: ActivityPageType;
|
|
471
476
|
grading_criteria?: string;
|
|
477
|
+
grading_criteria_title?: string;
|
|
472
478
|
scoring_type?: string;
|
|
473
479
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
474
480
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -543,6 +549,7 @@ declare const createCardRepo: () => {
|
|
|
543
549
|
default_language?: string;
|
|
544
550
|
target_text?: string;
|
|
545
551
|
grading_criteria?: string;
|
|
552
|
+
grading_criteria_title?: string;
|
|
546
553
|
scoring_type?: string;
|
|
547
554
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
548
555
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -597,6 +604,7 @@ declare function checkIsRespondWrittenPage(cardType: ActivityPageType | undefine
|
|
|
597
604
|
declare function checkIsRespondAudioPage(cardType: ActivityPageType | undefined): boolean;
|
|
598
605
|
declare const checkIsMediaPage: (cardType: ActivityPageType | undefined) => boolean;
|
|
599
606
|
declare const checkIsShortAnswerPage: (cardType: ActivityPageType | undefined) => boolean;
|
|
607
|
+
declare const checkIsConversationPage: (cardType: ActivityPageType | undefined) => boolean;
|
|
600
608
|
declare const checkTypePageActivity: (cardType: ActivityPageType | undefined) => {
|
|
601
609
|
isRespondAudio: boolean;
|
|
602
610
|
isRespondWritten: boolean;
|
|
@@ -606,6 +614,7 @@ declare const checkTypePageActivity: (cardType: ActivityPageType | undefined) =>
|
|
|
606
614
|
isMediaPage: boolean;
|
|
607
615
|
isShortAnswer: boolean;
|
|
608
616
|
hasSomeType: boolean;
|
|
617
|
+
isConversation: boolean;
|
|
609
618
|
};
|
|
610
619
|
|
|
611
620
|
declare function getPagePrompt(card: PageActivityWithId | undefined): {
|
|
@@ -1400,6 +1409,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1400
1409
|
target_text?: string;
|
|
1401
1410
|
type: ActivityPageType;
|
|
1402
1411
|
grading_criteria?: string;
|
|
1412
|
+
grading_criteria_title?: string;
|
|
1403
1413
|
scoring_type?: string;
|
|
1404
1414
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1405
1415
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -1474,6 +1484,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1474
1484
|
default_language?: string;
|
|
1475
1485
|
target_text?: string;
|
|
1476
1486
|
grading_criteria?: string;
|
|
1487
|
+
grading_criteria_title?: string;
|
|
1477
1488
|
scoring_type?: string;
|
|
1478
1489
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1479
1490
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -1732,6 +1743,7 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
|
|
|
1732
1743
|
default_language?: string;
|
|
1733
1744
|
target_text?: string;
|
|
1734
1745
|
grading_criteria?: string;
|
|
1746
|
+
grading_criteria_title?: string;
|
|
1735
1747
|
scoring_type?: string;
|
|
1736
1748
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1737
1749
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -3279,6 +3291,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3279
3291
|
target_text?: string;
|
|
3280
3292
|
type: ActivityPageType;
|
|
3281
3293
|
grading_criteria?: string;
|
|
3294
|
+
grading_criteria_title?: string;
|
|
3282
3295
|
scoring_type?: string;
|
|
3283
3296
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
3284
3297
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -3353,6 +3366,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3353
3366
|
default_language?: string;
|
|
3354
3367
|
target_text?: string;
|
|
3355
3368
|
grading_criteria?: string;
|
|
3369
|
+
grading_criteria_title?: string;
|
|
3356
3370
|
scoring_type?: string;
|
|
3357
3371
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
3358
3372
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -3401,4 +3415,4 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3401
3415
|
};
|
|
3402
3416
|
};
|
|
3403
3417
|
|
|
3404
|
-
export { ActivityPageType, type Assignment, type AssignmentAnalyticsType$1 as AssignmentAnalyticsType, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, type MediaPageActivity, type Organization, type OrganizationAccess, type PageActivity, type PageActivityWithId, type PageScore, REPEAT_PAGE_ACTIVITY_TYPES, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, RESPOND_PAGE_ACTIVITY_TYPES, RESPOND_WRITE_PAGE_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, checkIsMCPage, checkIsMediaPage, checkIsRepeatPage, checkIsRespondAudioPage, checkIsRespondPage, checkIsRespondWrittenPage, checkIsShortAnswerPage, checkTypePageActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getLabelPage, getPageMediaData, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, getSingleMediaPageData, getTotalCompletedCards, getTranscript, getTranscriptCycle, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useClearScoreV2, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSpeakableTranscript, useSpeakableTranscriptCycle, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUpdateStudentVocab, useUserCredits };
|
|
3418
|
+
export { ActivityPageType, type Assignment, type AssignmentAnalyticsType$1 as AssignmentAnalyticsType, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, type MediaPageActivity, type Organization, type OrganizationAccess, type PageActivity, type PageActivityWithId, type PageScore, REPEAT_PAGE_ACTIVITY_TYPES, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, RESPOND_PAGE_ACTIVITY_TYPES, RESPOND_WRITE_PAGE_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, checkIsConversationPage, checkIsMCPage, checkIsMediaPage, checkIsRepeatPage, checkIsRespondAudioPage, checkIsRespondPage, checkIsRespondWrittenPage, checkIsShortAnswerPage, checkTypePageActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getLabelPage, getPageMediaData, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, getSingleMediaPageData, getTotalCompletedCards, getTranscript, getTranscriptCycle, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useClearScoreV2, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSpeakableTranscript, useSpeakableTranscriptCycle, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUpdateStudentVocab, useUserCredits };
|
package/dist/index.native.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ interface PageActivity {
|
|
|
118
118
|
target_text?: string;
|
|
119
119
|
type: ActivityPageType;
|
|
120
120
|
grading_criteria?: string;
|
|
121
|
+
grading_criteria_title?: string;
|
|
121
122
|
scoring_type?: string;
|
|
122
123
|
grading_method?: 'simple' | 'rubric' | 'manual' | 'standards_based';
|
|
123
124
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -172,7 +173,8 @@ declare const enum ActivityPageType {
|
|
|
172
173
|
RESPOND_WRITE = "RESPOND_WRITE",
|
|
173
174
|
MULTIPLE_CHOICE = "MULTIPLE_CHOICE",
|
|
174
175
|
MEDIA_PAGE = "MEDIA_PAGE",
|
|
175
|
-
SHORT_ANSWER = "SHORT_ANSWER"
|
|
176
|
+
SHORT_ANSWER = "SHORT_ANSWER",
|
|
177
|
+
CONVERSATION = "CONVERSATION"
|
|
176
178
|
}
|
|
177
179
|
declare const RESPOND_PAGE_ACTIVITY_TYPES: ActivityPageType[];
|
|
178
180
|
declare const MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES: ActivityPageType[];
|
|
@@ -220,6 +222,7 @@ declare function useCards({ cardIds, enabled, asObject, }: {
|
|
|
220
222
|
default_language?: string;
|
|
221
223
|
target_text?: string;
|
|
222
224
|
grading_criteria?: string;
|
|
225
|
+
grading_criteria_title?: string;
|
|
223
226
|
scoring_type?: string;
|
|
224
227
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
225
228
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -301,6 +304,7 @@ declare function useCreateCards(): {
|
|
|
301
304
|
target_text?: string;
|
|
302
305
|
type: ActivityPageType;
|
|
303
306
|
grading_criteria?: string;
|
|
307
|
+
grading_criteria_title?: string;
|
|
304
308
|
scoring_type?: string;
|
|
305
309
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
306
310
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -388,6 +392,7 @@ declare function useGetCard({ cardId, enabled }: {
|
|
|
388
392
|
default_language?: string;
|
|
389
393
|
target_text?: string;
|
|
390
394
|
grading_criteria?: string;
|
|
395
|
+
grading_criteria_title?: string;
|
|
391
396
|
scoring_type?: string;
|
|
392
397
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
393
398
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -469,6 +474,7 @@ declare const createCardRepo: () => {
|
|
|
469
474
|
target_text?: string;
|
|
470
475
|
type: ActivityPageType;
|
|
471
476
|
grading_criteria?: string;
|
|
477
|
+
grading_criteria_title?: string;
|
|
472
478
|
scoring_type?: string;
|
|
473
479
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
474
480
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -543,6 +549,7 @@ declare const createCardRepo: () => {
|
|
|
543
549
|
default_language?: string;
|
|
544
550
|
target_text?: string;
|
|
545
551
|
grading_criteria?: string;
|
|
552
|
+
grading_criteria_title?: string;
|
|
546
553
|
scoring_type?: string;
|
|
547
554
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
548
555
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -597,6 +604,7 @@ declare function checkIsRespondWrittenPage(cardType: ActivityPageType | undefine
|
|
|
597
604
|
declare function checkIsRespondAudioPage(cardType: ActivityPageType | undefined): boolean;
|
|
598
605
|
declare const checkIsMediaPage: (cardType: ActivityPageType | undefined) => boolean;
|
|
599
606
|
declare const checkIsShortAnswerPage: (cardType: ActivityPageType | undefined) => boolean;
|
|
607
|
+
declare const checkIsConversationPage: (cardType: ActivityPageType | undefined) => boolean;
|
|
600
608
|
declare const checkTypePageActivity: (cardType: ActivityPageType | undefined) => {
|
|
601
609
|
isRespondAudio: boolean;
|
|
602
610
|
isRespondWritten: boolean;
|
|
@@ -606,6 +614,7 @@ declare const checkTypePageActivity: (cardType: ActivityPageType | undefined) =>
|
|
|
606
614
|
isMediaPage: boolean;
|
|
607
615
|
isShortAnswer: boolean;
|
|
608
616
|
hasSomeType: boolean;
|
|
617
|
+
isConversation: boolean;
|
|
609
618
|
};
|
|
610
619
|
|
|
611
620
|
declare function getPagePrompt(card: PageActivityWithId | undefined): {
|
|
@@ -1400,6 +1409,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1400
1409
|
target_text?: string;
|
|
1401
1410
|
type: ActivityPageType;
|
|
1402
1411
|
grading_criteria?: string;
|
|
1412
|
+
grading_criteria_title?: string;
|
|
1403
1413
|
scoring_type?: string;
|
|
1404
1414
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1405
1415
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -1474,6 +1484,7 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1474
1484
|
default_language?: string;
|
|
1475
1485
|
target_text?: string;
|
|
1476
1486
|
grading_criteria?: string;
|
|
1487
|
+
grading_criteria_title?: string;
|
|
1477
1488
|
scoring_type?: string;
|
|
1478
1489
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1479
1490
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -1732,6 +1743,7 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
|
|
|
1732
1743
|
default_language?: string;
|
|
1733
1744
|
target_text?: string;
|
|
1734
1745
|
grading_criteria?: string;
|
|
1746
|
+
grading_criteria_title?: string;
|
|
1735
1747
|
scoring_type?: string;
|
|
1736
1748
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
1737
1749
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -3279,6 +3291,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3279
3291
|
target_text?: string;
|
|
3280
3292
|
type: ActivityPageType;
|
|
3281
3293
|
grading_criteria?: string;
|
|
3294
|
+
grading_criteria_title?: string;
|
|
3282
3295
|
scoring_type?: string;
|
|
3283
3296
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
3284
3297
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -3353,6 +3366,7 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3353
3366
|
default_language?: string;
|
|
3354
3367
|
target_text?: string;
|
|
3355
3368
|
grading_criteria?: string;
|
|
3369
|
+
grading_criteria_title?: string;
|
|
3356
3370
|
scoring_type?: string;
|
|
3357
3371
|
grading_method?: "simple" | "rubric" | "manual" | "standards_based";
|
|
3358
3372
|
feedback_types?: FeedbackTypesCard[];
|
|
@@ -3401,4 +3415,4 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3401
3415
|
};
|
|
3402
3416
|
};
|
|
3403
3417
|
|
|
3404
|
-
export { ActivityPageType, type Assignment, type AssignmentAnalyticsType$1 as AssignmentAnalyticsType, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, type MediaPageActivity, type Organization, type OrganizationAccess, type PageActivity, type PageActivityWithId, type PageScore, REPEAT_PAGE_ACTIVITY_TYPES, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, RESPOND_PAGE_ACTIVITY_TYPES, RESPOND_WRITE_PAGE_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, checkIsMCPage, checkIsMediaPage, checkIsRepeatPage, checkIsRespondAudioPage, checkIsRespondPage, checkIsRespondWrittenPage, checkIsShortAnswerPage, checkTypePageActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getLabelPage, getPageMediaData, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, getSingleMediaPageData, getTotalCompletedCards, getTranscript, getTranscriptCycle, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useClearScoreV2, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSpeakableTranscript, useSpeakableTranscriptCycle, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUpdateStudentVocab, useUserCredits };
|
|
3418
|
+
export { ActivityPageType, type Assignment, type AssignmentAnalyticsType$1 as AssignmentAnalyticsType, type AssignmentWithId, BASE_MULTIPLE_CHOICE_FIELD_VALUES, BASE_REPEAT_FIELD_VALUES, BASE_RESPOND_FIELD_VALUES, type CreditContract, FeedbackTypesCard, FsCtx, type InstitutionSubscription, LENIENCY_OPTIONS, LeniencyCard, MULTIPLE_CHOICE_PAGE_ACTIVITY_TYPES, type MediaPageActivity, type Organization, type OrganizationAccess, type PageActivity, type PageActivityWithId, type PageScore, REPEAT_PAGE_ACTIVITY_TYPES, RESPOND_AUDIO_PAGE_ACTIVITY_TYPES, RESPOND_PAGE_ACTIVITY_TYPES, RESPOND_WRITE_PAGE_ACTIVITY_TYPES, type RefsCardsFiresotre, type RefsSetsFirestore, SPEAKABLE_NOTIFICATIONS, STUDENT_LEVELS_OPTIONS, type Score, type ScoreWithId, type Set, type SetWithId, type SpeakableNotificationType, SpeakableNotificationTypes, SpeakableProvider, VerificationCardStatus, assignmentQueryKeys, cardsQueryKeys, checkIsConversationPage, checkIsMCPage, checkIsMediaPage, checkIsRepeatPage, checkIsRespondAudioPage, checkIsRespondPage, checkIsRespondWrittenPage, checkIsShortAnswerPage, checkTypePageActivity, cleanString, createAssignmentRepo, createCardRepo, createFsClientNative as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getLabelPage, getPageMediaData, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, getSingleMediaPageData, getTotalCompletedCards, getTranscript, getTranscriptCycle, getWordHash, purify, refsCardsFiresotre, refsSetsFirestore, scoreQueryKeys, setsQueryKeys, updateCardInCache, updateSetInCache, useActivity, useActivityFeedbackAccess, useAssignment, useBaseOpenAI, useCards, useClearScore, useClearScoreV2, useCreateCard, useCreateCards, useCreateNotification, useGetCard, useOrganizationAccess, useScore, useSet, useSpeakableApi, useSpeakableTranscript, useSpeakableTranscriptCycle, useSubmitAssignmentScore, useSubmitPracticeScore, useUpdateCardScore, useUpdateScore, useUpdateStudentVocab, useUserCredits };
|
package/dist/index.native.js
CHANGED
|
@@ -50,6 +50,7 @@ __export(index_native_exports, {
|
|
|
50
50
|
VerificationCardStatus: () => VerificationCardStatus,
|
|
51
51
|
assignmentQueryKeys: () => assignmentQueryKeys,
|
|
52
52
|
cardsQueryKeys: () => cardsQueryKeys,
|
|
53
|
+
checkIsConversationPage: () => checkIsConversationPage,
|
|
53
54
|
checkIsMCPage: () => checkIsMCPage,
|
|
54
55
|
checkIsMediaPage: () => checkIsMediaPage,
|
|
55
56
|
checkIsRepeatPage: () => checkIsRepeatPage,
|
|
@@ -1716,6 +1717,7 @@ var ActivityPageType = /* @__PURE__ */ ((ActivityPageType2) => {
|
|
|
1716
1717
|
ActivityPageType2["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
|
|
1717
1718
|
ActivityPageType2["MEDIA_PAGE"] = "MEDIA_PAGE";
|
|
1718
1719
|
ActivityPageType2["SHORT_ANSWER"] = "SHORT_ANSWER";
|
|
1720
|
+
ActivityPageType2["CONVERSATION"] = "CONVERSATION";
|
|
1719
1721
|
return ActivityPageType2;
|
|
1720
1722
|
})(ActivityPageType || {});
|
|
1721
1723
|
var RESPOND_PAGE_ACTIVITY_TYPES = [
|
|
@@ -2063,6 +2065,10 @@ var checkIsShortAnswerPage = (cardType) => {
|
|
|
2063
2065
|
if (cardType === void 0) return false;
|
|
2064
2066
|
return cardType === "SHORT_ANSWER" /* SHORT_ANSWER */;
|
|
2065
2067
|
};
|
|
2068
|
+
var checkIsConversationPage = (cardType) => {
|
|
2069
|
+
if (cardType === void 0) return false;
|
|
2070
|
+
return cardType === "CONVERSATION" /* CONVERSATION */;
|
|
2071
|
+
};
|
|
2066
2072
|
var checkTypePageActivity = (cardType) => {
|
|
2067
2073
|
const isRespondAudio = checkIsRespondAudioPage(cardType);
|
|
2068
2074
|
const isRespondWritten = checkIsRespondWrittenPage(cardType);
|
|
@@ -2071,7 +2077,8 @@ var checkTypePageActivity = (cardType) => {
|
|
|
2071
2077
|
const isRepeat = checkIsRepeatPage(cardType);
|
|
2072
2078
|
const isMediaPage = checkIsMediaPage(cardType);
|
|
2073
2079
|
const isShortAnswer = checkIsShortAnswerPage(cardType);
|
|
2074
|
-
const
|
|
2080
|
+
const isConversation = checkIsConversationPage(cardType);
|
|
2081
|
+
const isNoOneOfThem = !isRespond && !isMC && !isRepeat && !isMediaPage && !isShortAnswer && !isConversation;
|
|
2075
2082
|
if (isNoOneOfThem) {
|
|
2076
2083
|
return {
|
|
2077
2084
|
isRespondAudio: false,
|
|
@@ -2081,7 +2088,8 @@ var checkTypePageActivity = (cardType) => {
|
|
|
2081
2088
|
isRepeat: true,
|
|
2082
2089
|
isMediaPage: false,
|
|
2083
2090
|
isShortAnswer: false,
|
|
2084
|
-
hasSomeType: false
|
|
2091
|
+
hasSomeType: false,
|
|
2092
|
+
isConversation: false
|
|
2085
2093
|
};
|
|
2086
2094
|
}
|
|
2087
2095
|
return {
|
|
@@ -2092,7 +2100,8 @@ var checkTypePageActivity = (cardType) => {
|
|
|
2092
2100
|
isRepeat,
|
|
2093
2101
|
isMediaPage,
|
|
2094
2102
|
isShortAnswer,
|
|
2095
|
-
hasSomeType: true
|
|
2103
|
+
hasSomeType: true,
|
|
2104
|
+
isConversation
|
|
2096
2105
|
};
|
|
2097
2106
|
};
|
|
2098
2107
|
|
|
@@ -2292,24 +2301,34 @@ var createSetRepo = () => {
|
|
|
2292
2301
|
// src/utils/ai/detect-transcript-hallucionation.ts
|
|
2293
2302
|
var HALLUCINATION_THRESHOLDS = {
|
|
2294
2303
|
// Short repeats
|
|
2295
|
-
MIN_CONSECUTIVE_REPEATS:
|
|
2296
|
-
|
|
2304
|
+
MIN_CONSECUTIVE_REPEATS: 5,
|
|
2305
|
+
// Increased from 3 to allow phrases like "pio pio pio" or "no no no no"
|
|
2306
|
+
MIN_WORDS_FOR_RATIO_CHECK: 15,
|
|
2307
|
+
// Increased from 10 to require longer text for ratio check
|
|
2297
2308
|
MAX_UNIQUE_WORDS_FOR_RATIO: 3,
|
|
2298
|
-
MIN_REPETITION_RATIO:
|
|
2309
|
+
MIN_REPETITION_RATIO: 4,
|
|
2310
|
+
// Increased from 3 to be more permissive
|
|
2299
2311
|
// Phrase repeats
|
|
2300
|
-
MIN_SENTENCE_LENGTH:
|
|
2301
|
-
|
|
2302
|
-
|
|
2312
|
+
MIN_SENTENCE_LENGTH: 15,
|
|
2313
|
+
// Increased from 10 to avoid flagging short natural sentences
|
|
2314
|
+
MIN_CONSECUTIVE_SIMILAR_SENTENCES: 3,
|
|
2315
|
+
// Increased from 2 to allow some natural repetition
|
|
2316
|
+
MIN_SENTENCES_FOR_DUPLICATE_CHECK: 4,
|
|
2317
|
+
// Increased from 3
|
|
2303
2318
|
// Cyclic patterns
|
|
2304
|
-
MIN_CYCLE_LENGTH:
|
|
2319
|
+
MIN_CYCLE_LENGTH: 30,
|
|
2320
|
+
// Increased from 20 to focus on longer patterns
|
|
2305
2321
|
MIN_CYCLE_REPEATS: 3,
|
|
2306
2322
|
// Entropy detection
|
|
2307
|
-
MIN_LENGTH_FOR_ENTROPY_CHECK:
|
|
2308
|
-
|
|
2309
|
-
|
|
2323
|
+
MIN_LENGTH_FOR_ENTROPY_CHECK: 60,
|
|
2324
|
+
// Increased from 50
|
|
2325
|
+
MAX_ENTROPY_THRESHOLD: 2.2,
|
|
2326
|
+
// Decreased from 2.5 to be more strict on entropy (lower = more repetitive needed)
|
|
2310
2327
|
// Similarity
|
|
2311
|
-
SENTENCE_SIMILARITY_THRESHOLD: 0.
|
|
2312
|
-
|
|
2328
|
+
SENTENCE_SIMILARITY_THRESHOLD: 0.85,
|
|
2329
|
+
// Increased from 0.8 to require more similarity
|
|
2330
|
+
SEGMENT_SIMILARITY_THRESHOLD: 0.9
|
|
2331
|
+
// Increased from 0.85
|
|
2313
2332
|
};
|
|
2314
2333
|
function detectTranscriptHallucinationWithDetails(transcript) {
|
|
2315
2334
|
if (!transcript || transcript.trim().length === 0) {
|