@lessonkit/lxpack 1.5.0 → 1.7.0
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/README.md +15 -1
- package/block-tree.v1.json +40 -0
- package/dist/bridge.cjs +81 -22
- package/dist/bridge.d.cts +34 -4
- package/dist/bridge.d.ts +34 -4
- package/dist/bridge.js +78 -23
- package/dist/index.cjs +1479 -187
- package/dist/index.d.cts +212 -2
- package/dist/index.d.ts +212 -2
- package/dist/index.js +1481 -199
- package/lessonkit-manifest.v1.json +75 -5
- package/lkcourse-format.v1.json +21 -0
- package/package.json +17 -11
|
@@ -5,15 +5,18 @@
|
|
|
5
5
|
"description": "Root lessonkit.json project manifest (schemaVersion 1)",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
|
-
"required": ["schemaVersion", "name", "course"
|
|
8
|
+
"required": ["schemaVersion", "name", "course"],
|
|
9
9
|
"properties": {
|
|
10
|
-
"schemaVersion": {
|
|
10
|
+
"schemaVersion": {
|
|
11
|
+
"description": "Must be 1. String \"1\" is coerced to number 1 at parse time.",
|
|
12
|
+
"oneOf": [{ "const": 1 }, { "type": "string", "const": "1" }]
|
|
13
|
+
},
|
|
11
14
|
"name": { "type": "string", "minLength": 1 },
|
|
12
15
|
"course": { "$ref": "#/$defs/LessonkitCourseDescriptor" },
|
|
13
16
|
"paths": {
|
|
14
17
|
"type": "object",
|
|
18
|
+
"description": "Optional. Omitted keys default to spaDistDir=dist, lxpackOutDir=.lxpack/course, outputBaseDir=.lxpack/out.",
|
|
15
19
|
"additionalProperties": false,
|
|
16
|
-
"required": ["spaDistDir", "lxpackOutDir", "outputBaseDir"],
|
|
17
20
|
"properties": {
|
|
18
21
|
"spaDistDir": { "type": "string", "minLength": 1 },
|
|
19
22
|
"lxpackOutDir": { "type": "string", "minLength": 1 },
|
|
@@ -87,7 +90,10 @@
|
|
|
87
90
|
{ "$ref": "#/$defs/TrueFalseAssessmentDescriptor" },
|
|
88
91
|
{ "$ref": "#/$defs/FillInBlanksAssessmentDescriptor" },
|
|
89
92
|
{ "$ref": "#/$defs/FindHotspotAssessmentDescriptor" },
|
|
90
|
-
{ "$ref": "#/$defs/FindMultipleHotspotsAssessmentDescriptor" }
|
|
93
|
+
{ "$ref": "#/$defs/FindMultipleHotspotsAssessmentDescriptor" },
|
|
94
|
+
{ "$ref": "#/$defs/SortParagraphsAssessmentDescriptor" },
|
|
95
|
+
{ "$ref": "#/$defs/GuessTheAnswerAssessmentDescriptor" },
|
|
96
|
+
{ "$ref": "#/$defs/MultimediaChoiceAssessmentDescriptor" }
|
|
91
97
|
]
|
|
92
98
|
},
|
|
93
99
|
"AssessmentBase": {
|
|
@@ -111,7 +117,18 @@
|
|
|
111
117
|
"minItems": 1,
|
|
112
118
|
"items": { "type": "string", "minLength": 1 }
|
|
113
119
|
},
|
|
114
|
-
"answer": { "type": "string", "minLength": 1 }
|
|
120
|
+
"answer": { "type": "string", "minLength": 1 },
|
|
121
|
+
"answers": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"minItems": 1,
|
|
124
|
+
"items": { "type": "string", "minLength": 1 }
|
|
125
|
+
},
|
|
126
|
+
"shuffleChoices": { "type": "boolean" },
|
|
127
|
+
"shuffleSeed": { "oneOf": [{ "type": "string" }, { "type": "number" }] },
|
|
128
|
+
"choiceFeedback": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"additionalProperties": { "type": "string" }
|
|
131
|
+
}
|
|
115
132
|
},
|
|
116
133
|
"required": ["choices", "answer"]
|
|
117
134
|
}
|
|
@@ -187,6 +204,59 @@
|
|
|
187
204
|
}
|
|
188
205
|
}
|
|
189
206
|
]
|
|
207
|
+
},
|
|
208
|
+
"SortParagraphsAssessmentDescriptor": {
|
|
209
|
+
"allOf": [
|
|
210
|
+
{ "$ref": "#/$defs/AssessmentBase" },
|
|
211
|
+
{
|
|
212
|
+
"type": "object",
|
|
213
|
+
"required": ["kind", "paragraphs", "correctOrder"],
|
|
214
|
+
"properties": {
|
|
215
|
+
"kind": { "const": "sortParagraphs" },
|
|
216
|
+
"paragraphs": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"minItems": 1,
|
|
219
|
+
"items": { "type": "string", "minLength": 1 }
|
|
220
|
+
},
|
|
221
|
+
"correctOrder": {
|
|
222
|
+
"type": "array",
|
|
223
|
+
"minItems": 1,
|
|
224
|
+
"items": { "type": "integer", "minimum": 0 }
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
"GuessTheAnswerAssessmentDescriptor": {
|
|
231
|
+
"allOf": [
|
|
232
|
+
{ "$ref": "#/$defs/AssessmentBase" },
|
|
233
|
+
{
|
|
234
|
+
"type": "object",
|
|
235
|
+
"required": ["kind", "answer"],
|
|
236
|
+
"properties": {
|
|
237
|
+
"kind": { "const": "guessTheAnswer" },
|
|
238
|
+
"answer": { "type": "string", "minLength": 1 }
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
"MultimediaChoiceAssessmentDescriptor": {
|
|
244
|
+
"allOf": [
|
|
245
|
+
{ "$ref": "#/$defs/AssessmentBase" },
|
|
246
|
+
{
|
|
247
|
+
"type": "object",
|
|
248
|
+
"required": ["kind", "choices", "answer"],
|
|
249
|
+
"properties": {
|
|
250
|
+
"kind": { "const": "multimediaChoice" },
|
|
251
|
+
"choices": {
|
|
252
|
+
"type": "array",
|
|
253
|
+
"minItems": 1,
|
|
254
|
+
"items": { "type": "string", "minLength": 1 }
|
|
255
|
+
},
|
|
256
|
+
"answer": { "type": "string", "minLength": 1 }
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
]
|
|
190
260
|
}
|
|
191
261
|
}
|
|
192
262
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://lessonkit.dev/schemas/lkcourse-format.v1.json",
|
|
4
|
+
"title": "LkcourseEnvelopeV1",
|
|
5
|
+
"description": "Portable .lkcourse archive envelope (manifest.json at zip root)",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["format", "schemaVersion", "lessonkitVersion", "exportedAt", "sourceManifest", "entries"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"format": { "const": "lkcourse" },
|
|
11
|
+
"schemaVersion": { "const": 1 },
|
|
12
|
+
"lessonkitVersion": { "type": "string", "minLength": 1 },
|
|
13
|
+
"exportedAt": { "type": "string", "minLength": 1 },
|
|
14
|
+
"sourceManifest": { "$ref": "https://lessonkit.dev/schemas/lessonkit-manifest.v1.json" },
|
|
15
|
+
"entries": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"items": { "type": "string", "minLength": 1 }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lessonkit/lxpack",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "LXPack export adapter for LessonKit courses (SCORM, standalone, xAPI, cmi5).",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -39,15 +39,19 @@
|
|
|
39
39
|
"import": "./dist/bridge.js",
|
|
40
40
|
"require": "./dist/bridge.cjs"
|
|
41
41
|
},
|
|
42
|
-
"./lessonkit-manifest.v1.json": "./lessonkit-manifest.v1.json"
|
|
42
|
+
"./lessonkit-manifest.v1.json": "./lessonkit-manifest.v1.json",
|
|
43
|
+
"./lkcourse-format.v1.json": "./lkcourse-format.v1.json",
|
|
44
|
+
"./block-tree.v1.json": "./block-tree.v1.json"
|
|
43
45
|
},
|
|
44
46
|
"files": [
|
|
45
47
|
"dist",
|
|
46
|
-
"lessonkit-manifest.v1.json"
|
|
48
|
+
"lessonkit-manifest.v1.json",
|
|
49
|
+
"lkcourse-format.v1.json",
|
|
50
|
+
"block-tree.v1.json"
|
|
47
51
|
],
|
|
48
52
|
"scripts": {
|
|
49
|
-
"build": "tsup src/index.ts src/bridge.ts --format esm,cjs --dts",
|
|
50
|
-
"dev": "tsup src/index.ts src/bridge.ts --format esm,cjs --dts --watch",
|
|
53
|
+
"build": "tsup src/index.ts src/bridge.ts --format esm,cjs --dts --tsconfig tsconfig.build.json",
|
|
54
|
+
"dev": "tsup src/index.ts src/bridge.ts --format esm,cjs --dts --watch --tsconfig tsconfig.build.json",
|
|
51
55
|
"prepublishOnly": "npm run build",
|
|
52
56
|
"typecheck": "tsc -p tsconfig.json",
|
|
53
57
|
"test": "vitest run --passWithNoTests",
|
|
@@ -55,14 +59,16 @@
|
|
|
55
59
|
"lint": "eslint --max-warnings 0 \"src/**/*.{ts,tsx}\" \"test/**/*.{ts,tsx}\""
|
|
56
60
|
},
|
|
57
61
|
"dependencies": {
|
|
58
|
-
"@lessonkit/core": "1.
|
|
59
|
-
"@lessonkit/themes": "1.
|
|
60
|
-
"@lxpack/api": "0.
|
|
61
|
-
"@lxpack/spa-bridge": "0.
|
|
62
|
-
"@lxpack/tracking-schema": "0.
|
|
63
|
-
"@lxpack/validators": "0.
|
|
62
|
+
"@lessonkit/core": "1.7.0",
|
|
63
|
+
"@lessonkit/themes": "1.7.0",
|
|
64
|
+
"@lxpack/api": "0.7.0",
|
|
65
|
+
"@lxpack/spa-bridge": "0.7.0",
|
|
66
|
+
"@lxpack/tracking-schema": "0.7.0",
|
|
67
|
+
"@lxpack/validators": "0.7.0",
|
|
68
|
+
"fflate": "^0.8.3"
|
|
64
69
|
},
|
|
65
70
|
"devDependencies": {
|
|
71
|
+
"@lessonkit/react": "1.7.0",
|
|
66
72
|
"@types/node": "^25.9.2",
|
|
67
73
|
"tsup": "^8.5.0",
|
|
68
74
|
"typescript": "^6.0.3",
|