@lessonkit/lxpack 1.3.0 → 1.4.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 +2 -2
- package/dist/bridge.d.cts +3 -2
- package/dist/bridge.d.ts +3 -2
- package/dist/index.cjs +295 -88
- package/dist/index.d.cts +24 -10
- package/dist/index.d.ts +24 -10
- package/dist/index.js +264 -58
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
[](https://lessonkit.readthedocs.io/en/latest/reference/packaging.html)
|
|
5
5
|
[](https://github.com/eddiethedean/lessonkit/blob/main/LICENSE)
|
|
6
6
|
|
|
7
|
-
Package Vite SPAs for LMS delivery — SCORM 1.2/2004, standalone, xAPI, and cmi5
|
|
7
|
+
Package Vite SPAs for LMS delivery — SCORM 1.2/2004, standalone, xAPI, and cmi5. `@lessonkit/lxpack` bundles [`@lxpack/*`](https://www.npmjs.com/org/lxpack) as direct dependencies (no separate `@lxpack/api` install).
|
|
8
8
|
|
|
9
9
|
Requires Node.js **18+**.
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm install @lessonkit/lxpack
|
|
14
|
+
npm install @lessonkit/lxpack
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Usage
|
package/dist/bridge.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TelemetryEvent, CheckId, LessonId } from '@lessonkit/core';
|
|
1
|
+
import { LmsBridgeMode, TelemetryEvent, CheckId, LessonId } from '@lessonkit/core';
|
|
2
2
|
import { LxpackBridgeV1, LxpackBridgeSubmitAssessmentPayload } from '@lxpack/spa-bridge';
|
|
3
3
|
export { DEFAULT_BRIDGE_PASSING_SCORE, LXPACK_BRIDGE_VERSIONS, LxpackBridgeSubmitAssessmentPayload, LxpackBridgeV1, createLxpackBridgeHost, getLxpackBridge, normalizePassingThreshold, normalizeScore, supportedBridgeVersions } from '@lxpack/spa-bridge';
|
|
4
4
|
import { mapLessonkitTelemetryToBridgeAction } from '@lxpack/tracking-schema';
|
|
@@ -21,7 +21,8 @@ declare function normalizeAssessmentPassingScore(opts?: {
|
|
|
21
21
|
passingScore?: number;
|
|
22
22
|
maxScore?: number;
|
|
23
23
|
}): number;
|
|
24
|
-
|
|
24
|
+
/** @deprecated Use `LmsBridgeMode` from `@lessonkit/core`. */
|
|
25
|
+
type LxpackBridgeMode = LmsBridgeMode;
|
|
25
26
|
/** Apply a mapped bridge action to an LXPack bridge instance. */
|
|
26
27
|
declare function dispatchBridgeAction(bridge: LxpackBridgeV1, action: ReturnType<typeof mapLessonkitTelemetryToBridgeAction>): void;
|
|
27
28
|
declare function forwardTelemetryToBridge(event: TelemetryEvent, mode?: LxpackBridgeMode, parentWindow?: Window): void;
|
package/dist/bridge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TelemetryEvent, CheckId, LessonId } from '@lessonkit/core';
|
|
1
|
+
import { LmsBridgeMode, TelemetryEvent, CheckId, LessonId } from '@lessonkit/core';
|
|
2
2
|
import { LxpackBridgeV1, LxpackBridgeSubmitAssessmentPayload } from '@lxpack/spa-bridge';
|
|
3
3
|
export { DEFAULT_BRIDGE_PASSING_SCORE, LXPACK_BRIDGE_VERSIONS, LxpackBridgeSubmitAssessmentPayload, LxpackBridgeV1, createLxpackBridgeHost, getLxpackBridge, normalizePassingThreshold, normalizeScore, supportedBridgeVersions } from '@lxpack/spa-bridge';
|
|
4
4
|
import { mapLessonkitTelemetryToBridgeAction } from '@lxpack/tracking-schema';
|
|
@@ -21,7 +21,8 @@ declare function normalizeAssessmentPassingScore(opts?: {
|
|
|
21
21
|
passingScore?: number;
|
|
22
22
|
maxScore?: number;
|
|
23
23
|
}): number;
|
|
24
|
-
|
|
24
|
+
/** @deprecated Use `LmsBridgeMode` from `@lessonkit/core`. */
|
|
25
|
+
type LxpackBridgeMode = LmsBridgeMode;
|
|
25
26
|
/** Apply a mapped bridge action to an LXPack bridge instance. */
|
|
26
27
|
declare function dispatchBridgeAction(bridge: LxpackBridgeV1, action: ReturnType<typeof mapLessonkitTelemetryToBridgeAction>): void;
|
|
27
28
|
declare function forwardTelemetryToBridge(event: TelemetryEvent, mode?: LxpackBridgeMode, parentWindow?: Window): void;
|