@speakableio/core 1.0.52 → 1.0.54
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 -0
- package/dist/index.native.d.ts +14 -0
- package/dist/index.native.js +6 -4
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +6 -4
- package/dist/index.native.mjs.map +1 -1
- package/dist/index.web.d.mts +14 -0
- package/dist/index.web.js +6 -4
- package/dist/index.web.js.map +1 -1
- package/package.json +1 -1
package/dist/index.web.d.mts
CHANGED
|
@@ -675,6 +675,12 @@ declare function getPagePrompt(card: PageActivityWithId | undefined): {
|
|
|
675
675
|
text: string;
|
|
676
676
|
rich_text: string;
|
|
677
677
|
isTextEqualToRichText: boolean;
|
|
678
|
+
extraText: string;
|
|
679
|
+
} | {
|
|
680
|
+
has: boolean;
|
|
681
|
+
text: string;
|
|
682
|
+
rich_text: string;
|
|
683
|
+
isTextEqualToRichText: boolean;
|
|
678
684
|
};
|
|
679
685
|
|
|
680
686
|
declare const getTotalCompletedCards: (pageScores: Score["cards"] | undefined) => number;
|
|
@@ -900,6 +906,14 @@ interface PageScore {
|
|
|
900
906
|
createdAt?: CustomTimestamp;
|
|
901
907
|
completedAt?: CustomTimestamp;
|
|
902
908
|
startedAt?: CustomTimestamp;
|
|
909
|
+
chatMessages?: {
|
|
910
|
+
sender: 'student' | 'teacher' | 'ai';
|
|
911
|
+
content: string;
|
|
912
|
+
timestamp: CustomTimestamp;
|
|
913
|
+
attemptId: string;
|
|
914
|
+
messageId: string;
|
|
915
|
+
audioUrl: string;
|
|
916
|
+
}[] | null;
|
|
903
917
|
}
|
|
904
918
|
|
|
905
919
|
declare enum AssignmentAnalyticsType {
|
package/dist/index.web.js
CHANGED
|
@@ -2009,21 +2009,22 @@ function getPagePrompt(card) {
|
|
|
2009
2009
|
card == null ? void 0 : card.type
|
|
2010
2010
|
);
|
|
2011
2011
|
const hidePrompt = (card == null ? void 0 : card.hidePrompt) === true;
|
|
2012
|
-
const createReturnObject = (text, richText) => {
|
|
2012
|
+
const createReturnObject = (text, richText, extraText) => {
|
|
2013
2013
|
const plainText = text || "";
|
|
2014
2014
|
const richTextPlain = extractTextFromRichText(richText);
|
|
2015
2015
|
return {
|
|
2016
2016
|
has: true,
|
|
2017
2017
|
text: plainText,
|
|
2018
2018
|
rich_text: richText || "",
|
|
2019
|
-
isTextEqualToRichText: plainText.trim() === richTextPlain.trim()
|
|
2019
|
+
isTextEqualToRichText: plainText.trim() === richTextPlain.trim(),
|
|
2020
|
+
extraText: extraText || ""
|
|
2020
2021
|
};
|
|
2021
2022
|
};
|
|
2022
2023
|
if (isRepeat) {
|
|
2023
2024
|
return createReturnObject(card == null ? void 0 : card.target_text, card == null ? void 0 : card.rich_text);
|
|
2024
2025
|
}
|
|
2025
2026
|
if (isConversation) {
|
|
2026
|
-
return createReturnObject(card == null ? void 0 : card.
|
|
2027
|
+
return createReturnObject(card == null ? void 0 : card.prompt, card == null ? void 0 : card.rich_text, card == null ? void 0 : card.goal);
|
|
2027
2028
|
}
|
|
2028
2029
|
if (isRespond && !hidePrompt) {
|
|
2029
2030
|
return createReturnObject(card == null ? void 0 : card.prompt, card == null ? void 0 : card.rich_text);
|
|
@@ -2038,7 +2039,8 @@ function getPagePrompt(card) {
|
|
|
2038
2039
|
has: false,
|
|
2039
2040
|
text: "",
|
|
2040
2041
|
rich_text: "",
|
|
2041
|
-
isTextEqualToRichText: false
|
|
2042
|
+
isTextEqualToRichText: false,
|
|
2043
|
+
extraText: ""
|
|
2042
2044
|
};
|
|
2043
2045
|
}
|
|
2044
2046
|
|