@speakableio/core 1.0.35 → 1.0.36
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 +37 -1
- package/dist/index.native.d.ts +37 -1
- package/dist/index.native.js +7 -3
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +7 -3
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +37 -1
- package/dist/index.web.js +7 -3
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.native.d.mts
CHANGED
|
@@ -157,6 +157,8 @@ interface PageActivity {
|
|
|
157
157
|
limit_attempts?: boolean;
|
|
158
158
|
max_attempts?: number;
|
|
159
159
|
rich_text?: string;
|
|
160
|
+
feedbackOff?: boolean;
|
|
161
|
+
correct_answer_exact_match?: boolean;
|
|
160
162
|
}
|
|
161
163
|
declare const enum ActivityPageType {
|
|
162
164
|
READ_REPEAT = "READ_REPEAT",
|
|
@@ -259,6 +261,8 @@ declare function useCards({ cardIds, enabled, asObject, }: {
|
|
|
259
261
|
limit_attempts?: boolean;
|
|
260
262
|
max_attempts?: number;
|
|
261
263
|
rich_text?: string;
|
|
264
|
+
feedbackOff?: boolean;
|
|
265
|
+
correct_answer_exact_match?: boolean;
|
|
262
266
|
} | null, Error>[];
|
|
263
267
|
};
|
|
264
268
|
declare function useCreateCard(): {
|
|
@@ -340,6 +344,8 @@ declare function useCreateCards(): {
|
|
|
340
344
|
limit_attempts?: boolean;
|
|
341
345
|
max_attempts?: number;
|
|
342
346
|
rich_text?: string;
|
|
347
|
+
feedbackOff?: boolean;
|
|
348
|
+
correct_answer_exact_match?: boolean;
|
|
343
349
|
}[], Error, {
|
|
344
350
|
cards: PageActivity[];
|
|
345
351
|
}, unknown>;
|
|
@@ -427,6 +433,8 @@ declare function useGetCard({ cardId, enabled }: {
|
|
|
427
433
|
limit_attempts?: boolean;
|
|
428
434
|
max_attempts?: number;
|
|
429
435
|
rich_text?: string;
|
|
436
|
+
feedbackOff?: boolean;
|
|
437
|
+
correct_answer_exact_match?: boolean;
|
|
430
438
|
} | null, Error>;
|
|
431
439
|
|
|
432
440
|
declare const createCardRepo: () => {
|
|
@@ -508,6 +516,8 @@ declare const createCardRepo: () => {
|
|
|
508
516
|
limit_attempts?: boolean;
|
|
509
517
|
max_attempts?: number;
|
|
510
518
|
rich_text?: string;
|
|
519
|
+
feedbackOff?: boolean;
|
|
520
|
+
correct_answer_exact_match?: boolean;
|
|
511
521
|
}[]>;
|
|
512
522
|
getCard: (params: {
|
|
513
523
|
cardId: string;
|
|
@@ -582,6 +592,8 @@ declare const createCardRepo: () => {
|
|
|
582
592
|
limit_attempts?: boolean;
|
|
583
593
|
max_attempts?: number;
|
|
584
594
|
rich_text?: string;
|
|
595
|
+
feedbackOff?: boolean;
|
|
596
|
+
correct_answer_exact_match?: boolean;
|
|
585
597
|
} | null>;
|
|
586
598
|
};
|
|
587
599
|
|
|
@@ -617,6 +629,18 @@ declare const getLabelPage: (pageType: ActivityPageType | undefined) => {
|
|
|
617
629
|
long: string;
|
|
618
630
|
};
|
|
619
631
|
|
|
632
|
+
/**
|
|
633
|
+
* Get the media data for a page
|
|
634
|
+
* @param page - The page to get the media data for
|
|
635
|
+
* @returns The media data for the page
|
|
636
|
+
|
|
637
|
+
* - direction: The direction of the media area
|
|
638
|
+
* - mode: The mode of the media area
|
|
639
|
+
* - singleMedia: The single media data for the page
|
|
640
|
+
* - isMediaPage: Whether the page is a media page
|
|
641
|
+
* - hasMediaData: Whether the page has some kind of media data
|
|
642
|
+
* - mediaAreaId: The id of the media area
|
|
643
|
+
*/
|
|
620
644
|
declare function getPageMediaData(page: PageActivityWithId): {
|
|
621
645
|
direction: "left" | "right";
|
|
622
646
|
mode: "single" | "media_area" | "none" | null;
|
|
@@ -629,7 +653,9 @@ declare function getPageMediaData(page: PageActivityWithId): {
|
|
|
629
653
|
content: string;
|
|
630
654
|
} | undefined;
|
|
631
655
|
isMediaPage: boolean;
|
|
632
|
-
hasMediaData:
|
|
656
|
+
hasMediaData: boolean;
|
|
657
|
+
mediaAreaId: string | undefined;
|
|
658
|
+
shouldRenderMediaArea: boolean;
|
|
633
659
|
};
|
|
634
660
|
declare function getSingleMediaPageData(page: PageActivityWithId): {
|
|
635
661
|
rawObject: {
|
|
@@ -1435,6 +1461,8 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1435
1461
|
limit_attempts?: boolean;
|
|
1436
1462
|
max_attempts?: number;
|
|
1437
1463
|
rich_text?: string;
|
|
1464
|
+
feedbackOff?: boolean;
|
|
1465
|
+
correct_answer_exact_match?: boolean;
|
|
1438
1466
|
}[]>;
|
|
1439
1467
|
getCard: (params: {
|
|
1440
1468
|
cardId: string;
|
|
@@ -1509,6 +1537,8 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1509
1537
|
limit_attempts?: boolean;
|
|
1510
1538
|
max_attempts?: number;
|
|
1511
1539
|
rich_text?: string;
|
|
1540
|
+
feedbackOff?: boolean;
|
|
1541
|
+
correct_answer_exact_match?: boolean;
|
|
1512
1542
|
} | null>;
|
|
1513
1543
|
};
|
|
1514
1544
|
};
|
|
@@ -1767,6 +1797,8 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
|
|
|
1767
1797
|
limit_attempts?: boolean;
|
|
1768
1798
|
max_attempts?: number;
|
|
1769
1799
|
rich_text?: string;
|
|
1800
|
+
feedbackOff?: boolean;
|
|
1801
|
+
correct_answer_exact_match?: boolean;
|
|
1770
1802
|
} | null, Error>[];
|
|
1771
1803
|
cardsArray: PageActivityWithId[];
|
|
1772
1804
|
};
|
|
@@ -3314,6 +3346,8 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3314
3346
|
limit_attempts?: boolean;
|
|
3315
3347
|
max_attempts?: number;
|
|
3316
3348
|
rich_text?: string;
|
|
3349
|
+
feedbackOff?: boolean;
|
|
3350
|
+
correct_answer_exact_match?: boolean;
|
|
3317
3351
|
}[]>;
|
|
3318
3352
|
getCard: (params: {
|
|
3319
3353
|
cardId: string;
|
|
@@ -3388,6 +3422,8 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3388
3422
|
limit_attempts?: boolean;
|
|
3389
3423
|
max_attempts?: number;
|
|
3390
3424
|
rich_text?: string;
|
|
3425
|
+
feedbackOff?: boolean;
|
|
3426
|
+
correct_answer_exact_match?: boolean;
|
|
3391
3427
|
} | null>;
|
|
3392
3428
|
};
|
|
3393
3429
|
};
|
package/dist/index.native.d.ts
CHANGED
|
@@ -157,6 +157,8 @@ interface PageActivity {
|
|
|
157
157
|
limit_attempts?: boolean;
|
|
158
158
|
max_attempts?: number;
|
|
159
159
|
rich_text?: string;
|
|
160
|
+
feedbackOff?: boolean;
|
|
161
|
+
correct_answer_exact_match?: boolean;
|
|
160
162
|
}
|
|
161
163
|
declare const enum ActivityPageType {
|
|
162
164
|
READ_REPEAT = "READ_REPEAT",
|
|
@@ -259,6 +261,8 @@ declare function useCards({ cardIds, enabled, asObject, }: {
|
|
|
259
261
|
limit_attempts?: boolean;
|
|
260
262
|
max_attempts?: number;
|
|
261
263
|
rich_text?: string;
|
|
264
|
+
feedbackOff?: boolean;
|
|
265
|
+
correct_answer_exact_match?: boolean;
|
|
262
266
|
} | null, Error>[];
|
|
263
267
|
};
|
|
264
268
|
declare function useCreateCard(): {
|
|
@@ -340,6 +344,8 @@ declare function useCreateCards(): {
|
|
|
340
344
|
limit_attempts?: boolean;
|
|
341
345
|
max_attempts?: number;
|
|
342
346
|
rich_text?: string;
|
|
347
|
+
feedbackOff?: boolean;
|
|
348
|
+
correct_answer_exact_match?: boolean;
|
|
343
349
|
}[], Error, {
|
|
344
350
|
cards: PageActivity[];
|
|
345
351
|
}, unknown>;
|
|
@@ -427,6 +433,8 @@ declare function useGetCard({ cardId, enabled }: {
|
|
|
427
433
|
limit_attempts?: boolean;
|
|
428
434
|
max_attempts?: number;
|
|
429
435
|
rich_text?: string;
|
|
436
|
+
feedbackOff?: boolean;
|
|
437
|
+
correct_answer_exact_match?: boolean;
|
|
430
438
|
} | null, Error>;
|
|
431
439
|
|
|
432
440
|
declare const createCardRepo: () => {
|
|
@@ -508,6 +516,8 @@ declare const createCardRepo: () => {
|
|
|
508
516
|
limit_attempts?: boolean;
|
|
509
517
|
max_attempts?: number;
|
|
510
518
|
rich_text?: string;
|
|
519
|
+
feedbackOff?: boolean;
|
|
520
|
+
correct_answer_exact_match?: boolean;
|
|
511
521
|
}[]>;
|
|
512
522
|
getCard: (params: {
|
|
513
523
|
cardId: string;
|
|
@@ -582,6 +592,8 @@ declare const createCardRepo: () => {
|
|
|
582
592
|
limit_attempts?: boolean;
|
|
583
593
|
max_attempts?: number;
|
|
584
594
|
rich_text?: string;
|
|
595
|
+
feedbackOff?: boolean;
|
|
596
|
+
correct_answer_exact_match?: boolean;
|
|
585
597
|
} | null>;
|
|
586
598
|
};
|
|
587
599
|
|
|
@@ -617,6 +629,18 @@ declare const getLabelPage: (pageType: ActivityPageType | undefined) => {
|
|
|
617
629
|
long: string;
|
|
618
630
|
};
|
|
619
631
|
|
|
632
|
+
/**
|
|
633
|
+
* Get the media data for a page
|
|
634
|
+
* @param page - The page to get the media data for
|
|
635
|
+
* @returns The media data for the page
|
|
636
|
+
|
|
637
|
+
* - direction: The direction of the media area
|
|
638
|
+
* - mode: The mode of the media area
|
|
639
|
+
* - singleMedia: The single media data for the page
|
|
640
|
+
* - isMediaPage: Whether the page is a media page
|
|
641
|
+
* - hasMediaData: Whether the page has some kind of media data
|
|
642
|
+
* - mediaAreaId: The id of the media area
|
|
643
|
+
*/
|
|
620
644
|
declare function getPageMediaData(page: PageActivityWithId): {
|
|
621
645
|
direction: "left" | "right";
|
|
622
646
|
mode: "single" | "media_area" | "none" | null;
|
|
@@ -629,7 +653,9 @@ declare function getPageMediaData(page: PageActivityWithId): {
|
|
|
629
653
|
content: string;
|
|
630
654
|
} | undefined;
|
|
631
655
|
isMediaPage: boolean;
|
|
632
|
-
hasMediaData:
|
|
656
|
+
hasMediaData: boolean;
|
|
657
|
+
mediaAreaId: string | undefined;
|
|
658
|
+
shouldRenderMediaArea: boolean;
|
|
633
659
|
};
|
|
634
660
|
declare function getSingleMediaPageData(page: PageActivityWithId): {
|
|
635
661
|
rawObject: {
|
|
@@ -1435,6 +1461,8 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1435
1461
|
limit_attempts?: boolean;
|
|
1436
1462
|
max_attempts?: number;
|
|
1437
1463
|
rich_text?: string;
|
|
1464
|
+
feedbackOff?: boolean;
|
|
1465
|
+
correct_answer_exact_match?: boolean;
|
|
1438
1466
|
}[]>;
|
|
1439
1467
|
getCard: (params: {
|
|
1440
1468
|
cardId: string;
|
|
@@ -1509,6 +1537,8 @@ declare function createFsClientBase({ db, helpers, httpsCallable, logEvent, }: {
|
|
|
1509
1537
|
limit_attempts?: boolean;
|
|
1510
1538
|
max_attempts?: number;
|
|
1511
1539
|
rich_text?: string;
|
|
1540
|
+
feedbackOff?: boolean;
|
|
1541
|
+
correct_answer_exact_match?: boolean;
|
|
1512
1542
|
} | null>;
|
|
1513
1543
|
};
|
|
1514
1544
|
};
|
|
@@ -1767,6 +1797,8 @@ declare function useActivity({ id, isAssignment, onAssignmentSubmitted, ltiData,
|
|
|
1767
1797
|
limit_attempts?: boolean;
|
|
1768
1798
|
max_attempts?: number;
|
|
1769
1799
|
rich_text?: string;
|
|
1800
|
+
feedbackOff?: boolean;
|
|
1801
|
+
correct_answer_exact_match?: boolean;
|
|
1770
1802
|
} | null, Error>[];
|
|
1771
1803
|
cardsArray: PageActivityWithId[];
|
|
1772
1804
|
};
|
|
@@ -3314,6 +3346,8 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3314
3346
|
limit_attempts?: boolean;
|
|
3315
3347
|
max_attempts?: number;
|
|
3316
3348
|
rich_text?: string;
|
|
3349
|
+
feedbackOff?: boolean;
|
|
3350
|
+
correct_answer_exact_match?: boolean;
|
|
3317
3351
|
}[]>;
|
|
3318
3352
|
getCard: (params: {
|
|
3319
3353
|
cardId: string;
|
|
@@ -3388,6 +3422,8 @@ declare const createFsClientNative: ({ db, httpsCallable, logEvent }: FsClientPa
|
|
|
3388
3422
|
limit_attempts?: boolean;
|
|
3389
3423
|
max_attempts?: number;
|
|
3390
3424
|
rich_text?: string;
|
|
3425
|
+
feedbackOff?: boolean;
|
|
3426
|
+
correct_answer_exact_match?: boolean;
|
|
3391
3427
|
} | null>;
|
|
3392
3428
|
};
|
|
3393
3429
|
};
|
package/dist/index.native.js
CHANGED
|
@@ -2221,18 +2221,22 @@ var getLabelPage = (pageType) => {
|
|
|
2221
2221
|
|
|
2222
2222
|
// src/domains/cards/utils/get-page-media-data.ts
|
|
2223
2223
|
function getPageMediaData(page) {
|
|
2224
|
-
var _a, _b;
|
|
2224
|
+
var _a, _b, _c, _d;
|
|
2225
2225
|
const direction = (_a = page.media_area_layout) != null ? _a : "left";
|
|
2226
2226
|
const { isMediaPage } = checkTypePageActivity(page.type);
|
|
2227
2227
|
const mode = (_b = page.media_mode) != null ? _b : page.media_area_id ? "media_area" : null;
|
|
2228
2228
|
const singleMedia = getSingleMediaPageData(page);
|
|
2229
|
-
const
|
|
2229
|
+
const mediaAreaId = (_d = (_c = page.media_area_id) != null ? _c : page.media_area_context_ref) != null ? _d : void 0;
|
|
2230
|
+
const shouldRenderMediaArea = isMediaPage || mode === "media_area" || !(page == null ? void 0 : page.media_mode) && mediaAreaId != null;
|
|
2231
|
+
const hasMediaData = !!page.media_area_id || !!page.media_area_context_ref || singleMedia !== void 0;
|
|
2230
2232
|
return {
|
|
2231
2233
|
direction,
|
|
2232
2234
|
mode,
|
|
2233
2235
|
singleMedia,
|
|
2234
2236
|
isMediaPage,
|
|
2235
|
-
hasMediaData
|
|
2237
|
+
hasMediaData,
|
|
2238
|
+
mediaAreaId,
|
|
2239
|
+
shouldRenderMediaArea
|
|
2236
2240
|
};
|
|
2237
2241
|
}
|
|
2238
2242
|
function getSingleMediaPageData(page) {
|