@speakableio/core 1.0.28 → 1.0.30
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 +24 -1
- package/dist/index.native.d.ts +24 -1
- package/dist/index.native.js +31 -0
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +31 -0
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +24 -1
- package/dist/index.web.js +31 -0
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.web.d.mts
CHANGED
|
@@ -617,6 +617,29 @@ declare const getLabelPage: (pageType: ActivityPageType | undefined) => {
|
|
|
617
617
|
long: string;
|
|
618
618
|
};
|
|
619
619
|
|
|
620
|
+
declare function getPageMediaData(page: PageActivityWithId): {
|
|
621
|
+
direction: "left" | "right";
|
|
622
|
+
mode: "single" | "media_area" | "none" | null;
|
|
623
|
+
singleMedia: {
|
|
624
|
+
rawObject: {
|
|
625
|
+
type: "image" | "video";
|
|
626
|
+
url: string;
|
|
627
|
+
};
|
|
628
|
+
type: "image" | "video";
|
|
629
|
+
content: string;
|
|
630
|
+
} | undefined;
|
|
631
|
+
isMediaPage: boolean;
|
|
632
|
+
hasMediaData: boolean;
|
|
633
|
+
};
|
|
634
|
+
declare function getSingleMediaPageData(page: PageActivityWithId): {
|
|
635
|
+
rawObject: {
|
|
636
|
+
type: "image" | "video";
|
|
637
|
+
url: string;
|
|
638
|
+
};
|
|
639
|
+
type: "image" | "video";
|
|
640
|
+
content: string;
|
|
641
|
+
} | undefined;
|
|
642
|
+
|
|
620
643
|
interface Assignment {
|
|
621
644
|
name: string;
|
|
622
645
|
description: string;
|
|
@@ -3369,4 +3392,4 @@ declare const createFsClientWeb: ({ db, httpsCallable, logEvent }: FsClientParam
|
|
|
3369
3392
|
};
|
|
3370
3393
|
};
|
|
3371
3394
|
|
|
3372
|
-
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 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, createFsClientWeb as createFsClient, createSetRepo, creditQueryKeys, debounce, getCardFromCache, getLabelPage, getPagePrompt, getPhraseLength, getRespondCardTool, getSetFromCache, 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 };
|
|
3395
|
+
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 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, createFsClientWeb 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.web.js
CHANGED
|
@@ -2083,6 +2083,35 @@ var getLabelPage = (pageType) => {
|
|
|
2083
2083
|
};
|
|
2084
2084
|
};
|
|
2085
2085
|
|
|
2086
|
+
// src/domains/cards/utils/get-page-media-data.ts
|
|
2087
|
+
function getPageMediaData(page) {
|
|
2088
|
+
var _a, _b;
|
|
2089
|
+
const direction = (_a = page.media_area_layout) != null ? _a : "left";
|
|
2090
|
+
const { isMediaPage } = checkTypePageActivity(page.type);
|
|
2091
|
+
const mode = (_b = page.media_mode) != null ? _b : page.media_area_id ? "media_area" : null;
|
|
2092
|
+
const singleMedia = getSingleMediaPageData(page);
|
|
2093
|
+
const hasMediaData = isMediaPage && singleMedia !== void 0;
|
|
2094
|
+
return {
|
|
2095
|
+
direction,
|
|
2096
|
+
mode,
|
|
2097
|
+
singleMedia,
|
|
2098
|
+
isMediaPage,
|
|
2099
|
+
hasMediaData
|
|
2100
|
+
};
|
|
2101
|
+
}
|
|
2102
|
+
function getSingleMediaPageData(page) {
|
|
2103
|
+
const isSingleMode = page.media_mode === "single";
|
|
2104
|
+
if (!isSingleMode || !page.media) return void 0;
|
|
2105
|
+
const media = {
|
|
2106
|
+
type: page.media.type,
|
|
2107
|
+
content: page.media.url
|
|
2108
|
+
};
|
|
2109
|
+
return {
|
|
2110
|
+
...media,
|
|
2111
|
+
rawObject: page.media
|
|
2112
|
+
};
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2086
2115
|
// src/domains/sets/set.hooks.ts
|
|
2087
2116
|
import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
2088
2117
|
|
|
@@ -3715,10 +3744,12 @@ export {
|
|
|
3715
3744
|
debounce,
|
|
3716
3745
|
getCardFromCache,
|
|
3717
3746
|
getLabelPage,
|
|
3747
|
+
getPageMediaData,
|
|
3718
3748
|
getPagePrompt,
|
|
3719
3749
|
getPhraseLength,
|
|
3720
3750
|
getRespondCardTool,
|
|
3721
3751
|
getSetFromCache,
|
|
3752
|
+
getSingleMediaPageData,
|
|
3722
3753
|
getTotalCompletedCards,
|
|
3723
3754
|
getTranscript,
|
|
3724
3755
|
getTranscriptCycle,
|