@speakableio/core 1.0.39 → 1.0.41
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 +14 -34
- package/dist/index.native.d.ts +14 -34
- package/dist/index.native.js +13 -14
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +13 -14
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +14 -34
- package/dist/index.web.js +13 -14
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.d.mts
CHANGED
|
@@ -98,7 +98,6 @@ interface PageActivity {
|
|
|
98
98
|
completed?: boolean;
|
|
99
99
|
media_area_id?: string | null;
|
|
100
100
|
media_area_layout?: 'left' | 'right' | null;
|
|
101
|
-
media_mode?: 'single' | 'media_area' | 'none' | null;
|
|
102
101
|
media?: MediaPageActivity | null;
|
|
103
102
|
score?: number;
|
|
104
103
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -200,7 +199,6 @@ declare function useCards({ cardIds, enabled, asObject, }: {
|
|
|
200
199
|
completed?: boolean;
|
|
201
200
|
media_area_id?: string | null;
|
|
202
201
|
media_area_layout?: "left" | "right" | null;
|
|
203
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
204
202
|
media?: MediaPageActivity | null;
|
|
205
203
|
score?: number;
|
|
206
204
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -279,7 +277,6 @@ declare function useCreateCards(): {
|
|
|
279
277
|
completed?: boolean;
|
|
280
278
|
media_area_id?: string | null;
|
|
281
279
|
media_area_layout?: "left" | "right" | null;
|
|
282
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
283
280
|
media?: MediaPageActivity | null;
|
|
284
281
|
score?: number;
|
|
285
282
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -366,7 +363,6 @@ declare function useGetCard({ cardId, enabled }: {
|
|
|
366
363
|
completed?: boolean;
|
|
367
364
|
media_area_id?: string | null;
|
|
368
365
|
media_area_layout?: "left" | "right" | null;
|
|
369
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
370
366
|
media?: MediaPageActivity | null;
|
|
371
367
|
score?: number;
|
|
372
368
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -445,7 +441,6 @@ declare const createCardRepo: () => {
|
|
|
445
441
|
completed?: boolean;
|
|
446
442
|
media_area_id?: string | null;
|
|
447
443
|
media_area_layout?: "left" | "right" | null;
|
|
448
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
449
444
|
media?: MediaPageActivity | null;
|
|
450
445
|
score?: number;
|
|
451
446
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -519,7 +514,6 @@ declare const createCardRepo: () => {
|
|
|
519
514
|
completed?: boolean;
|
|
520
515
|
media_area_id?: string | null;
|
|
521
516
|
media_area_layout?: "left" | "right" | null;
|
|
522
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
523
517
|
media?: MediaPageActivity | null;
|
|
524
518
|
score?: number;
|
|
525
519
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -616,30 +610,21 @@ declare const getLabelPage: (pageType: ActivityPageType | undefined) => {
|
|
|
616
610
|
long: string;
|
|
617
611
|
};
|
|
618
612
|
|
|
619
|
-
/**
|
|
620
|
-
* Get the media data for a page
|
|
621
|
-
* @param page - The page to get the media data for
|
|
622
|
-
* @returns The media data for the page
|
|
623
|
-
|
|
624
|
-
* - direction: The direction of the media area
|
|
625
|
-
* - mode: The mode of the media area
|
|
626
|
-
* - singleMedia: The single media data for the page
|
|
627
|
-
* - isMediaPage: Whether the page is a media page
|
|
628
|
-
* - hasMediaData: Whether the page has some kind of media data
|
|
629
|
-
* - mediaAreaId: The id of the media area
|
|
630
|
-
*/
|
|
631
613
|
declare function getPageMediaData(page: PageActivityWithId): {
|
|
632
|
-
direction: "left" | "right";
|
|
633
|
-
mode: "single" | "media_area" | "none" | null;
|
|
634
|
-
singleMedia: {
|
|
635
|
-
rawObject: MediaPageActivity;
|
|
636
|
-
type: "document" | "image" | "video" | "link" | "audio" | "embed";
|
|
637
|
-
content: string;
|
|
638
|
-
} | undefined;
|
|
639
614
|
isMediaPage: boolean;
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
615
|
+
resource: {
|
|
616
|
+
id: string | undefined;
|
|
617
|
+
shouldRender: boolean;
|
|
618
|
+
};
|
|
619
|
+
promptMedia: {
|
|
620
|
+
direction: "left" | "right";
|
|
621
|
+
content: {
|
|
622
|
+
rawObject: MediaPageActivity;
|
|
623
|
+
type: "document" | "image" | "video" | "link" | "audio" | "embed";
|
|
624
|
+
content: string;
|
|
625
|
+
} | undefined;
|
|
626
|
+
shouldRender: boolean;
|
|
627
|
+
};
|
|
643
628
|
};
|
|
644
629
|
declare function getSingleMediaPageData(page: PageActivityWithId): {
|
|
645
630
|
rawObject: MediaPageActivity;
|
|
@@ -1378,7 +1363,6 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1378
1363
|
completed?: boolean;
|
|
1379
1364
|
media_area_id?: string | null;
|
|
1380
1365
|
media_area_layout?: "left" | "right" | null;
|
|
1381
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
1382
1366
|
media?: MediaPageActivity | null;
|
|
1383
1367
|
score?: number;
|
|
1384
1368
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -1452,7 +1436,6 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1452
1436
|
completed?: boolean;
|
|
1453
1437
|
media_area_id?: string | null;
|
|
1454
1438
|
media_area_layout?: "left" | "right" | null;
|
|
1455
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
1456
1439
|
media?: MediaPageActivity | null;
|
|
1457
1440
|
score?: number;
|
|
1458
1441
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -1709,7 +1692,6 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
|
|
|
1709
1692
|
completed?: boolean;
|
|
1710
1693
|
media_area_id?: string | null;
|
|
1711
1694
|
media_area_layout?: "left" | "right" | null;
|
|
1712
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
1713
1695
|
media?: MediaPageActivity | null;
|
|
1714
1696
|
score?: number;
|
|
1715
1697
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -2928,7 +2910,7 @@ declare const useBaseOpenAI: ({ onTranscriptSuccess, onTranscriptError, onComple
|
|
|
2928
2910
|
noFeedbackAvailable: boolean;
|
|
2929
2911
|
success: boolean;
|
|
2930
2912
|
reason: string;
|
|
2931
|
-
accessType: "
|
|
2913
|
+
accessType: "ai_enabled" | "teacher_preview" | "student_with_teacher_plan" | "none";
|
|
2932
2914
|
} | {
|
|
2933
2915
|
noFeedbackAvailable: boolean;
|
|
2934
2916
|
success: boolean;
|
|
@@ -3254,7 +3236,6 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3254
3236
|
completed?: boolean;
|
|
3255
3237
|
media_area_id?: string | null;
|
|
3256
3238
|
media_area_layout?: "left" | "right" | null;
|
|
3257
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
3258
3239
|
media?: MediaPageActivity | null;
|
|
3259
3240
|
score?: number;
|
|
3260
3241
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -3328,7 +3309,6 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3328
3309
|
completed?: boolean;
|
|
3329
3310
|
media_area_id?: string | null;
|
|
3330
3311
|
media_area_layout?: "left" | "right" | null;
|
|
3331
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
3332
3312
|
media?: MediaPageActivity | null;
|
|
3333
3313
|
score?: number;
|
|
3334
3314
|
verificationStatus?: VerificationCardStatus;
|
package/dist/index.native.d.ts
CHANGED
|
@@ -98,7 +98,6 @@ interface PageActivity {
|
|
|
98
98
|
completed?: boolean;
|
|
99
99
|
media_area_id?: string | null;
|
|
100
100
|
media_area_layout?: 'left' | 'right' | null;
|
|
101
|
-
media_mode?: 'single' | 'media_area' | 'none' | null;
|
|
102
101
|
media?: MediaPageActivity | null;
|
|
103
102
|
score?: number;
|
|
104
103
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -200,7 +199,6 @@ declare function useCards({ cardIds, enabled, asObject, }: {
|
|
|
200
199
|
completed?: boolean;
|
|
201
200
|
media_area_id?: string | null;
|
|
202
201
|
media_area_layout?: "left" | "right" | null;
|
|
203
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
204
202
|
media?: MediaPageActivity | null;
|
|
205
203
|
score?: number;
|
|
206
204
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -279,7 +277,6 @@ declare function useCreateCards(): {
|
|
|
279
277
|
completed?: boolean;
|
|
280
278
|
media_area_id?: string | null;
|
|
281
279
|
media_area_layout?: "left" | "right" | null;
|
|
282
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
283
280
|
media?: MediaPageActivity | null;
|
|
284
281
|
score?: number;
|
|
285
282
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -366,7 +363,6 @@ declare function useGetCard({ cardId, enabled }: {
|
|
|
366
363
|
completed?: boolean;
|
|
367
364
|
media_area_id?: string | null;
|
|
368
365
|
media_area_layout?: "left" | "right" | null;
|
|
369
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
370
366
|
media?: MediaPageActivity | null;
|
|
371
367
|
score?: number;
|
|
372
368
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -445,7 +441,6 @@ declare const createCardRepo: () => {
|
|
|
445
441
|
completed?: boolean;
|
|
446
442
|
media_area_id?: string | null;
|
|
447
443
|
media_area_layout?: "left" | "right" | null;
|
|
448
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
449
444
|
media?: MediaPageActivity | null;
|
|
450
445
|
score?: number;
|
|
451
446
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -519,7 +514,6 @@ declare const createCardRepo: () => {
|
|
|
519
514
|
completed?: boolean;
|
|
520
515
|
media_area_id?: string | null;
|
|
521
516
|
media_area_layout?: "left" | "right" | null;
|
|
522
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
523
517
|
media?: MediaPageActivity | null;
|
|
524
518
|
score?: number;
|
|
525
519
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -616,30 +610,21 @@ declare const getLabelPage: (pageType: ActivityPageType | undefined) => {
|
|
|
616
610
|
long: string;
|
|
617
611
|
};
|
|
618
612
|
|
|
619
|
-
/**
|
|
620
|
-
* Get the media data for a page
|
|
621
|
-
* @param page - The page to get the media data for
|
|
622
|
-
* @returns The media data for the page
|
|
623
|
-
|
|
624
|
-
* - direction: The direction of the media area
|
|
625
|
-
* - mode: The mode of the media area
|
|
626
|
-
* - singleMedia: The single media data for the page
|
|
627
|
-
* - isMediaPage: Whether the page is a media page
|
|
628
|
-
* - hasMediaData: Whether the page has some kind of media data
|
|
629
|
-
* - mediaAreaId: The id of the media area
|
|
630
|
-
*/
|
|
631
613
|
declare function getPageMediaData(page: PageActivityWithId): {
|
|
632
|
-
direction: "left" | "right";
|
|
633
|
-
mode: "single" | "media_area" | "none" | null;
|
|
634
|
-
singleMedia: {
|
|
635
|
-
rawObject: MediaPageActivity;
|
|
636
|
-
type: "document" | "image" | "video" | "link" | "audio" | "embed";
|
|
637
|
-
content: string;
|
|
638
|
-
} | undefined;
|
|
639
614
|
isMediaPage: boolean;
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
615
|
+
resource: {
|
|
616
|
+
id: string | undefined;
|
|
617
|
+
shouldRender: boolean;
|
|
618
|
+
};
|
|
619
|
+
promptMedia: {
|
|
620
|
+
direction: "left" | "right";
|
|
621
|
+
content: {
|
|
622
|
+
rawObject: MediaPageActivity;
|
|
623
|
+
type: "document" | "image" | "video" | "link" | "audio" | "embed";
|
|
624
|
+
content: string;
|
|
625
|
+
} | undefined;
|
|
626
|
+
shouldRender: boolean;
|
|
627
|
+
};
|
|
643
628
|
};
|
|
644
629
|
declare function getSingleMediaPageData(page: PageActivityWithId): {
|
|
645
630
|
rawObject: MediaPageActivity;
|
|
@@ -1378,7 +1363,6 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1378
1363
|
completed?: boolean;
|
|
1379
1364
|
media_area_id?: string | null;
|
|
1380
1365
|
media_area_layout?: "left" | "right" | null;
|
|
1381
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
1382
1366
|
media?: MediaPageActivity | null;
|
|
1383
1367
|
score?: number;
|
|
1384
1368
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -1452,7 +1436,6 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1452
1436
|
completed?: boolean;
|
|
1453
1437
|
media_area_id?: string | null;
|
|
1454
1438
|
media_area_layout?: "left" | "right" | null;
|
|
1455
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
1456
1439
|
media?: MediaPageActivity | null;
|
|
1457
1440
|
score?: number;
|
|
1458
1441
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -1709,7 +1692,6 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
|
|
|
1709
1692
|
completed?: boolean;
|
|
1710
1693
|
media_area_id?: string | null;
|
|
1711
1694
|
media_area_layout?: "left" | "right" | null;
|
|
1712
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
1713
1695
|
media?: MediaPageActivity | null;
|
|
1714
1696
|
score?: number;
|
|
1715
1697
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -2928,7 +2910,7 @@ declare const useBaseOpenAI: ({ onTranscriptSuccess, onTranscriptError, onComple
|
|
|
2928
2910
|
noFeedbackAvailable: boolean;
|
|
2929
2911
|
success: boolean;
|
|
2930
2912
|
reason: string;
|
|
2931
|
-
accessType: "
|
|
2913
|
+
accessType: "ai_enabled" | "teacher_preview" | "student_with_teacher_plan" | "none";
|
|
2932
2914
|
} | {
|
|
2933
2915
|
noFeedbackAvailable: boolean;
|
|
2934
2916
|
success: boolean;
|
|
@@ -3254,7 +3236,6 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3254
3236
|
completed?: boolean;
|
|
3255
3237
|
media_area_id?: string | null;
|
|
3256
3238
|
media_area_layout?: "left" | "right" | null;
|
|
3257
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
3258
3239
|
media?: MediaPageActivity | null;
|
|
3259
3240
|
score?: number;
|
|
3260
3241
|
verificationStatus?: VerificationCardStatus;
|
|
@@ -3328,7 +3309,6 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3328
3309
|
completed?: boolean;
|
|
3329
3310
|
media_area_id?: string | null;
|
|
3330
3311
|
media_area_layout?: "left" | "right" | null;
|
|
3331
|
-
media_mode?: "single" | "media_area" | "none" | null;
|
|
3332
3312
|
media?: MediaPageActivity | null;
|
|
3333
3313
|
score?: number;
|
|
3334
3314
|
verificationStatus?: VerificationCardStatus;
|
package/dist/index.native.js
CHANGED
|
@@ -1370,8 +1370,7 @@ async function handleAssessment(assignment, userId, cardIds, weights, fieldsUpda
|
|
|
1370
1370
|
if (!response.data) {
|
|
1371
1371
|
throw new Error("Score not found");
|
|
1372
1372
|
}
|
|
1373
|
-
|
|
1374
|
-
await api.updateDoc(path, { score: scoreCalculated, status: "PENDING_REVIEW" });
|
|
1373
|
+
await api.updateDoc(path, { status: "PENDING_REVIEW" });
|
|
1375
1374
|
await ((_c = (_b = (_a = api).httpsCallable) == null ? void 0 : _b.call(_a, "submitAssessment")) == null ? void 0 : _c({
|
|
1376
1375
|
assignmentId: assignment.id,
|
|
1377
1376
|
assignmentTitle: assignment.name,
|
|
@@ -2224,24 +2223,24 @@ function getPageMediaData(page) {
|
|
|
2224
2223
|
var _a, _b, _c, _d;
|
|
2225
2224
|
const direction = (_a = page.media_area_layout) != null ? _a : "left";
|
|
2226
2225
|
const { isMediaPage } = checkTypePageActivity(page.type);
|
|
2227
|
-
const mode = (_b = page.media_mode) != null ? _b : page.media_area_id ? "media_area" : null;
|
|
2228
2226
|
const singleMedia = getSingleMediaPageData(page);
|
|
2229
|
-
const
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2227
|
+
const resource = {
|
|
2228
|
+
id: (_c = (_b = page.media_area_id) != null ? _b : page.media_area_context_ref) != null ? _c : void 0,
|
|
2229
|
+
shouldRender: ((_d = page.media_area_id) != null ? _d : page.media_area_context_ref) != null ? true : false
|
|
2230
|
+
};
|
|
2231
|
+
const promptMedia = {
|
|
2233
2232
|
direction,
|
|
2234
|
-
|
|
2235
|
-
singleMedia
|
|
2233
|
+
content: singleMedia,
|
|
2234
|
+
shouldRender: singleMedia !== void 0
|
|
2235
|
+
};
|
|
2236
|
+
return {
|
|
2236
2237
|
isMediaPage,
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
shouldRenderMediaArea
|
|
2238
|
+
resource,
|
|
2239
|
+
promptMedia
|
|
2240
2240
|
};
|
|
2241
2241
|
}
|
|
2242
2242
|
function getSingleMediaPageData(page) {
|
|
2243
|
-
|
|
2244
|
-
if (!isSingleMode || !page.media) return void 0;
|
|
2243
|
+
if (!page.media) return void 0;
|
|
2245
2244
|
const media = {
|
|
2246
2245
|
type: page.media.type,
|
|
2247
2246
|
content: page.media.url
|