@sparted/shared-library 1.1.0-rc2 → 1.1.0-rc3
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.
|
@@ -73,6 +73,15 @@ export type SwipingCards = {
|
|
|
73
73
|
};
|
|
74
74
|
export type Game = ErrorText | MultipleChoiceQuestion | NoInteraction | OpenQuestion | OrderingCards | PictureSpot | SwipingCards;
|
|
75
75
|
export type GameType = 'error-text' | 'mcq' | 'open-question' | 'no-interaction' | 'picture-spot' | 'swiping-cards' | 'ordering-cards';
|
|
76
|
+
export declare const GAME_TYPE: {
|
|
77
|
+
readonly MCQ: "mcq";
|
|
78
|
+
readonly ERROR_TEXT: "error-text";
|
|
79
|
+
readonly OPEN_QUESTION: "open-question";
|
|
80
|
+
readonly NO_INTERACTION_CONTENT: "no-interaction-content";
|
|
81
|
+
readonly PICTURE_SPOT: "picture-spot";
|
|
82
|
+
readonly ORDERING_CARDS: "ordering-cards";
|
|
83
|
+
readonly SWIPING_CARDS: "swiping-cards";
|
|
84
|
+
};
|
|
76
85
|
export type BaseContent = {
|
|
77
86
|
id: number;
|
|
78
87
|
identifier: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const GAME_TYPE = {
|
|
6
|
+
MCQ: 'mcq',
|
|
7
|
+
ERROR_TEXT: 'error-text',
|
|
8
|
+
OPEN_QUESTION: 'open-question',
|
|
9
|
+
NO_INTERACTION_CONTENT: 'no-interaction-content',
|
|
10
|
+
PICTURE_SPOT: 'picture-spot',
|
|
11
|
+
ORDERING_CARDS: 'ordering-cards',
|
|
12
|
+
SWIPING_CARDS: 'swiping-cards',
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.GAME_TYPE = GAME_TYPE;
|
|
16
|
+
//# sourceMappingURL=content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content.js","sources":["../../../src/business/types/content.ts"],"sourcesContent":["import { MultilingualLabel } from './multilingual';\nimport { Image, Media } from './media';\nimport { Thematic } from './thematic';\n\nexport type ErrorText = {\n type: 'error-text';\n gameMedia?: Media;\n explanationMedia?: Media;\n explanation?: MultilingualLabel;\n wrongText?: MultilingualLabel;\n correctText?: MultilingualLabel;\n};\n\nexport type MultipleChoiceQuestion = {\n type: 'mcq';\n gameMedia?: Media;\n question?: MultilingualLabel;\n explanation?: MultilingualLabel;\n explanationMedia?: Media;\n multiselect?: boolean;\n choices?: {\n correct: boolean;\n text: MultilingualLabel;\n }[];\n};\n\nexport type NoInteraction = {\n type: 'no-interaction';\n firstMedia?: Media;\n secondMedia?: Media;\n title?: MultilingualLabel;\n text?: MultilingualLabel;\n};\n\nexport type OpenQuestion = {\n type: 'open-question';\n gameMedia?: Media;\n question?: MultilingualLabel;\n answer?: MultilingualLabel;\n explanation?: MultilingualLabel;\n explanationMedia?: Media;\n levenshteinDistance?: number;\n};\n\nexport type OrderingCards = {\n type: 'ordering-cards';\n explanation?: MultilingualLabel;\n question?: MultilingualLabel;\n topLabel?: MultilingualLabel;\n bottomLabel?: MultilingualLabel;\n cards: MultilingualLabel[];\n};\n\nexport type PictureSpot = {\n type: 'picture-spot';\n image?: Image;\n explanation?: MultilingualLabel;\n items?: {\n x: number;\n y: number;\n r: number;\n question: MultilingualLabel;\n description: MultilingualLabel;\n }[];\n};\n\nexport type SwipingCards = {\n type: 'swiping-cards';\n explanation?: MultilingualLabel;\n question?: MultilingualLabel;\n zones?: {\n position: 'left' | 'right' | 'top' | 'bottom';\n text: MultilingualLabel;\n }[];\n cards?: {\n image?: Image;\n text?: MultilingualLabel;\n answer: 'left' | 'right' | 'top' | 'bottom';\n }[];\n};\n\nexport type Game =\n | ErrorText\n | MultipleChoiceQuestion\n | NoInteraction\n | OpenQuestion\n | OrderingCards\n | PictureSpot\n | SwipingCards;\n\nexport type GameType =\n | 'error-text'\n | 'mcq'\n | 'open-question'\n | 'no-interaction'\n | 'picture-spot'\n | 'swiping-cards'\n | 'ordering-cards';\n\nexport const GAME_TYPE = {\n MCQ: 'mcq',\n ERROR_TEXT: 'error-text',\n OPEN_QUESTION: 'open-question',\n NO_INTERACTION_CONTENT: 'no-interaction-content',\n PICTURE_SPOT: 'picture-spot',\n ORDERING_CARDS: 'ordering-cards',\n SWIPING_CARDS: 'swiping-cards',\n } as const;\n\nexport type BaseContent = {\n id: number;\n identifier: string;\n name: MultilingualLabel;\n thematic: Thematic;\n coverImage?: Image;\n status: string;\n};\n\nexport type Content = BaseContent &\n (ErrorText | MultipleChoiceQuestion | NoInteraction | OpenQuestion | OrderingCards | PictureSpot | SwipingCards);\n"],"names":[],"mappings":";;;;AAmGa,MAAA,SAAS,GAAG;AACrB,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,UAAU,EAAE,YAAY;AACxB,IAAA,aAAa,EAAE,eAAe;AAC9B,IAAA,sBAAsB,EAAE,wBAAwB;AAChD,IAAA,YAAY,EAAE,cAAc;AAC5B,IAAA,cAAc,EAAE,gBAAgB;AAChC,IAAA,aAAa,EAAE,eAAe;;;;;"}
|
package/business/types/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sparted/shared-library",
|
|
3
|
-
"version": "1.1.0-
|
|
3
|
+
"version": "1.1.0-rc3",
|
|
4
4
|
"repository": "git@github.com:Sparted/shared-library.git",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Sparted",
|
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
},
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"sideEffets": false,
|
|
12
|
-
"main": "index.js",
|
|
12
|
+
"main": "cjs/index.js",
|
|
13
|
+
"files": [
|
|
14
|
+
"**/*",
|
|
15
|
+
"**/**"
|
|
16
|
+
],
|
|
13
17
|
"scripts": {
|
|
14
18
|
"test": "jest",
|
|
15
19
|
"lint": "eslint .",
|