@pie-players/pie-preloaded-player 0.3.72-d73a3d3.1 → 0.3.73-afb2f1e.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @pie-players/pie-preloaded-player
2
2
 
3
- Version: `0.3.72-d73a3d3.1`
3
+ Version: `0.3.73-afb2f1e.1`
4
4
 
5
5
  Pre-bundled PIE item-player package with static element versions for production use.
6
6
 
@@ -10,24 +10,24 @@ Pre-bundled PIE item-player package with static element versions for production
10
10
 
11
11
  | Package | Version |
12
12
  | --- | --- |
13
- | `@pie-element/categorize` | `13.2.2` |
14
- | `@pie-element/drag-in-the-blank` | `10.2.3` |
15
- | `@pie-element/hotspot` | `11.3.2` |
16
- | `@pie-element/image-cloze-association` | `10.3.1` |
17
- | `@pie-element/mc-populated-blank` | `0.3.0-next.8` |
18
- | `@pie-element/multiple-choice` | `13.4.2` |
13
+ | `@pie-element/categorize` | `13.2.3` |
14
+ | `@pie-element/drag-in-the-blank` | `10.2.4` |
15
+ | `@pie-element/hotspot` | `11.3.3` |
16
+ | `@pie-element/image-cloze-association` | `10.3.2` |
17
+ | `@pie-element/mc-populated-blank` | `0.3.0-next.9` |
18
+ | `@pie-element/multiple-choice` | `13.4.3` |
19
19
 
20
20
  ## Package metadata
21
21
 
22
- - Version: `0.3.72-d73a3d3.1`
23
- - Bundle hash: `d73a3d3`
24
- - Loader version: `0.3.72`
22
+ - Version: `0.3.73-afb2f1e.1`
23
+ - Bundle hash: `afb2f1e`
24
+ - Loader version: `0.3.73`
25
25
  - Iteration: `1`
26
26
 
27
27
  ## Installation
28
28
 
29
29
  ```bash
30
- npm install @pie-players/pie-preloaded-player@0.3.72-d73a3d3.1
30
+ npm install @pie-players/pie-preloaded-player@0.3.73-afb2f1e.1
31
31
  ```
32
32
 
33
33
  ## Usage
@@ -39,7 +39,7 @@ npm install @pie-players/pie-preloaded-player@0.3.72-d73a3d3.1
39
39
 
40
40
  <pie-item-player
41
41
  strategy="preloaded"
42
- config='{"elements":{"pie-element-categorize":"@pie-element/categorize@13.2.2"},"models":[{"id":"1","element":"pie-element-categorize"}],"markup":"<pie-element-categorize id=\"1\"></pie-element-categorize>"}'
42
+ config='{"elements":{"pie-element-categorize":"@pie-element/categorize@13.2.3"},"models":[{"id":"1","element":"pie-element-categorize"}],"markup":"<pie-element-categorize id=\"1\"></pie-element-categorize>"}'
43
43
  env='{"mode":"gather","role":"student"}'
44
44
  session='{"id":"session-1","data":[]}'
45
45
  ></pie-item-player>
@@ -9,5 +9,7 @@ export declare function getDeliveryBackendLoadSignature(backend: BackendConfig |
9
9
  export declare function getDeliveryBackendModelSignature(backend: BackendConfig | null | undefined, env: unknown): string;
10
10
  export declare function loadFromDeliveryBackend(backend: BackendConfig, env: unknown): Promise<BackendLoadResult>;
11
11
  export declare function modelFromDeliveryBackend(backend: BackendConfig, context: BackendDeliverySessionContext): Promise<BackendDeliveryModelResult>;
12
- export declare function saveToDeliveryBackend(backend: BackendConfig, context: BackendDeliverySessionContext): Promise<unknown>;
12
+ export declare function saveToDeliveryBackend(backend: BackendConfig, context: BackendDeliverySessionContext, options?: {
13
+ keepalive?: boolean;
14
+ }): Promise<unknown>;
13
15
  export declare function scoreWithDeliveryBackend(backend: BackendConfig, context: BackendDeliverySessionContext, options?: BackendScoreOptions): Promise<unknown>;
@@ -43,7 +43,17 @@ export type BackendOrchestrator = {
43
43
  */
44
44
  noteConfigChanged: () => void;
45
45
  load: (scope?: "delivery" | "authoring") => Promise<void>;
46
- saveSession: () => Promise<void>;
46
+ saveSession: (options?: {
47
+ keepalive?: boolean;
48
+ }) => Promise<void>;
49
+ /**
50
+ * Run a scheduled autosave now instead of waiting out its debounce. Called
51
+ * at a teardown seam and on the page going hidden, where the alternative is
52
+ * dropping the save. `keepalive` lets the request outlive the document.
53
+ */
54
+ flushPendingSave: (options?: {
55
+ keepalive?: boolean;
56
+ }) => void;
47
57
  score: (options?: BackendScoreOptions) => Promise<unknown>;
48
58
  saveContent: (options?: BackendSaveContentOptions) => Promise<string>;
49
59
  releaseContent: (options?: BackendAuthoringReleaseOptions) => Promise<string>;
@@ -1,6 +1,8 @@
1
1
  import { BackendAuthConfig, BackendAuthoringConfig, BackendAuthoringIdentity, BackendAuthoringLoadResult, BackendAuthoringReleaseContext, BackendAuthoringSaveContext, BackendDeliveryConfig, BackendDeliveryLoadContext, BackendDeliveryLoadResult, BackendDeliveryModelResult, BackendDeliveryScoreContext, BackendDeliverySessionContext } from './types.js';
2
2
  export declare function callPieApiDeliveryLoad(config: BackendDeliveryConfig, sharedAuth: BackendAuthConfig | undefined, context: BackendDeliveryLoadContext): Promise<BackendDeliveryLoadResult>;
3
- export declare function callPieApiDeliverySave(config: BackendDeliveryConfig, sharedAuth: BackendAuthConfig | undefined, context: BackendDeliverySessionContext): Promise<unknown>;
3
+ export declare function callPieApiDeliverySave(config: BackendDeliveryConfig, sharedAuth: BackendAuthConfig | undefined, context: BackendDeliverySessionContext, options?: {
4
+ keepalive?: boolean;
5
+ }): Promise<unknown>;
4
6
  export declare function callPieApiDeliveryModel(config: BackendDeliveryConfig, sharedAuth: BackendAuthConfig | undefined, context: BackendDeliverySessionContext): Promise<BackendDeliveryModelResult>;
5
7
  export declare function callPieApiDeliveryScore(config: BackendDeliveryConfig, sharedAuth: BackendAuthConfig | undefined, context: BackendDeliveryScoreContext): Promise<unknown>;
6
8
  export declare function callPieApiAuthoringLoad(config: BackendAuthoringConfig, sharedAuth: BackendAuthConfig | undefined, context: BackendAuthoringIdentity & {
@@ -16,6 +16,11 @@ export type BackendRequestConfig = {
16
16
  };
17
17
  export type BackendRequestOptions = {
18
18
  overrides?: Record<string, string>;
19
+ /**
20
+ * Set on a save issued while the page is going away. A custom delivery
21
+ * client should pass it to `fetch` so the request outlives the document.
22
+ */
23
+ keepalive?: boolean;
19
24
  };
20
25
  export type BackendAutosaveConfig = boolean | {
21
26
  enabled?: boolean;