@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.native.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.native.d.ts
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.native.js
CHANGED
|
@@ -2124,21 +2124,22 @@ function getPagePrompt(card) {
|
|
|
2124
2124
|
card == null ? void 0 : card.type
|
|
2125
2125
|
);
|
|
2126
2126
|
const hidePrompt = (card == null ? void 0 : card.hidePrompt) === true;
|
|
2127
|
-
const createReturnObject = (text, richText) => {
|
|
2127
|
+
const createReturnObject = (text, richText, extraText) => {
|
|
2128
2128
|
const plainText = text || "";
|
|
2129
2129
|
const richTextPlain = extractTextFromRichText(richText);
|
|
2130
2130
|
return {
|
|
2131
2131
|
has: true,
|
|
2132
2132
|
text: plainText,
|
|
2133
2133
|
rich_text: richText || "",
|
|
2134
|
-
isTextEqualToRichText: plainText.trim() === richTextPlain.trim()
|
|
2134
|
+
isTextEqualToRichText: plainText.trim() === richTextPlain.trim(),
|
|
2135
|
+
extraText: extraText || ""
|
|
2135
2136
|
};
|
|
2136
2137
|
};
|
|
2137
2138
|
if (isRepeat) {
|
|
2138
2139
|
return createReturnObject(card == null ? void 0 : card.target_text, card == null ? void 0 : card.rich_text);
|
|
2139
2140
|
}
|
|
2140
2141
|
if (isConversation) {
|
|
2141
|
-
return createReturnObject(card == null ? void 0 : card.
|
|
2142
|
+
return createReturnObject(card == null ? void 0 : card.prompt, card == null ? void 0 : card.rich_text, card == null ? void 0 : card.goal);
|
|
2142
2143
|
}
|
|
2143
2144
|
if (isRespond && !hidePrompt) {
|
|
2144
2145
|
return createReturnObject(card == null ? void 0 : card.prompt, card == null ? void 0 : card.rich_text);
|
|
@@ -2153,7 +2154,8 @@ function getPagePrompt(card) {
|
|
|
2153
2154
|
has: false,
|
|
2154
2155
|
text: "",
|
|
2155
2156
|
rich_text: "",
|
|
2156
|
-
isTextEqualToRichText: false
|
|
2157
|
+
isTextEqualToRichText: false,
|
|
2158
|
+
extraText: ""
|
|
2157
2159
|
};
|
|
2158
2160
|
}
|
|
2159
2161
|
|