@pie-players/pie-section-player 0.3.73 → 0.3.74
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 +173 -42
- package/dist/browser/assets/evaluation-worker-DkU_wGh3.js +155241 -0
- package/dist/browser/chunks/ItemToolBar-wr2myaah-2ce4b643.js +1 -0
- package/dist/browser/chunks/PUA-tLuTiQ7--f2b27953.js +1 -0
- package/dist/browser/chunks/ToolCoordinator-cc2dc319.js +1 -0
- package/dist/browser/chunks/accents-BTUYmhn9-cafeb96e.js +1 -0
- package/dist/browser/chunks/accents-b-i-CngHZsLL-e0eb98fd.js +1 -0
- package/dist/browser/chunks/arabic-BzEHMVZD-30ac1ade.js +1 -0
- package/dist/browser/chunks/arrows-VjxlU-jv-2e17c192.js +1 -0
- package/dist/browser/chunks/base-dfd67c41.js +1 -0
- package/dist/browser/chunks/braille-BeWC_Ruq-a3bb8ef9.js +1 -0
- package/dist/browser/chunks/braille-d-Dk6J96GO-d832bfbf.js +1 -0
- package/dist/browser/chunks/browser-a3c32178.js +36 -0
- package/dist/browser/chunks/calculator-element-271c142f.js +9 -0
- package/dist/browser/chunks/calligraphic-Cew9cU3x-04cf0735.js +1 -0
- package/dist/browser/chunks/cherokee-Cny3FYho-4da7d2f3.js +1 -0
- package/dist/browser/chunks/classPrivateFieldGet2-338e0179.js +1 -0
- package/dist/browser/chunks/custom-element-define-2a92deb0.js +1 -0
- package/dist/browser/chunks/cyrillic-CfCDulXU-5550df0b.js +1 -0
- package/dist/browser/chunks/cyrillic-ss-lU7bNGG9-12eb0188.js +1 -0
- package/dist/browser/chunks/defineProperty-a20a667d.js +1 -0
- package/dist/browser/chunks/devanagari-CDIz2h-r-18c38725.js +1 -0
- package/dist/browser/chunks/dist-41b39e7f.js +1 -0
- package/dist/browser/chunks/dist-59132a53.js +1 -0
- package/dist/browser/chunks/dist-60d7afef.js +1 -0
- package/dist/browser/chunks/dist-ca9b9622.js +1 -0
- package/dist/browser/chunks/double-struck-BpJEQk8y-500ce8dd.js +1 -0
- package/dist/browser/chunks/en-5ff22e17.js +1 -0
- package/dist/browser/chunks/es-a0ba6cb6.js +1 -0
- package/dist/browser/chunks/focus-trap-44913bf3.js +1 -0
- package/dist/browser/chunks/fraktur-rLEq9DEH-44cc14d8.js +1 -0
- package/dist/browser/chunks/greek-BlraJTyL-90ce8924.js +1 -0
- package/dist/browser/chunks/greek-ss-D-EN2PK0-91610739.js +1 -0
- package/dist/browser/chunks/hebrew-GiQZeybp-b583f555.js +1 -0
- package/dist/browser/chunks/latin-b-BhEnC7R2-d13e06ff.js +1 -0
- package/dist/browser/chunks/latin-bi-DqiIKv3U-1dec8705.js +1 -0
- package/dist/browser/chunks/latin-i-B1xtwaE1-21637466.js +1 -0
- package/dist/browser/chunks/latin-xfWFlLkD-5bcea5cf.js +1 -0
- package/dist/browser/chunks/logger-8b07fb72.js +1 -0
- package/dist/browser/chunks/marrows-DD1NgMQi-15b63755.js +1 -0
- package/dist/browser/chunks/math-DpWn1mbG-38eeb914.js +1 -0
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -0
- package/dist/browser/chunks/mathjax-D2JHb_R_-64780dc5.js +232 -0
- package/dist/browser/chunks/module-0191e321.js +74 -0
- package/dist/browser/chunks/module-shim-58659a86.js +0 -0
- package/dist/browser/chunks/module-shim-b4470740.js +12 -0
- package/dist/browser/chunks/monospace-D116QD2a-98d484fd.js +1 -0
- package/dist/browser/chunks/monospace-ex-DcXpouKS-456b403c.js +1 -0
- package/dist/browser/chunks/monospace-l-Ct5wkMDs-f34a4a9e.js +1 -0
- package/dist/browser/chunks/mshapes-DCp86WSX-c0055952.js +1 -0
- package/dist/browser/chunks/nds-icon-button-d602f784.js +194 -0
- package/dist/browser/chunks/nl-NL-364d61b9.js +1 -0
- package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -0
- package/dist/browser/chunks/overlay-containment-edaaff13.js +1 -0
- package/dist/browser/chunks/overlay-placement-e8058232.js +1 -0
- package/dist/browser/chunks/phonetics-BwOCw2Y9-d2e3af59.js +1 -0
- package/dist/browser/chunks/phonetics-ss-CRtMn02f-579b6135.js +1 -0
- package/dist/browser/chunks/pie-api-client-687c319a.js +1 -0
- package/dist/browser/chunks/pie-tool-calculator-cortex-0626bc24.js +9 -0
- package/dist/browser/chunks/pie-tool-calculator-geogebra-561236cb.js +9 -0
- package/dist/browser/chunks/pointer-gesture-ce75f0a7.js +1 -0
- package/dist/browser/chunks/preload-helper-6ad28da3.js +1 -0
- package/dist/browser/chunks/provider-4c704118.js +1 -0
- package/dist/browser/chunks/rolldown-runtime-1287ba31.js +1 -0
- package/dist/browser/chunks/runtime-C7H1jS4E-64772f5e.js +8413 -0
- package/dist/browser/chunks/sanitize-svg-icon-b9082bba.js +3 -0
- package/dist/browser/chunks/sans-serif-BYPZKlE9-2efdbcd9.js +1 -0
- package/dist/browser/chunks/sans-serif-b-B0kRKiC--b5530dce.js +1 -0
- package/dist/browser/chunks/sans-serif-bi-DXWul6mu-5370dba4.js +1 -0
- package/dist/browser/chunks/sans-serif-ex-Boux1kMP-aa178f31.js +1 -0
- package/dist/browser/chunks/sans-serif-i-676RFaSO-2db54474.js +1 -0
- package/dist/browser/chunks/sans-serif-r-DrN9xdZt-0fc72eea.js +1 -0
- package/dist/browser/chunks/script-0ohehnXc-526904f4.js +1 -0
- package/dist/browser/chunks/shapes-BG47NodJ-d59b0eca.js +1 -0
- package/dist/browser/chunks/src-BcptuNS5-ed25d7fd.js +191 -0
- package/dist/browser/chunks/sre-engine-wf9s43gg-f09289c5.js +53 -0
- package/dist/browser/chunks/symbols-BqnUxf_t-83087e87.js +1 -0
- package/dist/browser/chunks/symbols-b-i-eg9k5hmF-9c461ac2.js +1 -0
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +248 -0
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +13 -0
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +26 -0
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +7 -0
- package/dist/browser/chunks/tool-graph-cb0338e8.js +11 -0
- package/dist/browser/chunks/tool-host-contract-b93b482c.js +1 -0
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +62 -0
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +153 -0
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +4 -0
- package/dist/browser/chunks/tool-protractor-23f77028.js +17 -0
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +15 -0
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +179 -0
- package/dist/browser/chunks/variants-2LRNhOUP-966fc49d.js +1 -0
- package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -0
- package/dist/browser/pie-section-player.js +1613 -0
- package/dist/browser.d.ts +10 -0
- package/dist/chunks/ItemToolBar-wr2myaah-1287ba31.js +28 -0
- package/dist/chunks/module-shim-58659a86.js +2129 -0
- package/dist/chunks/{nl-NL-9312c316.js → nl-NL-364d61b9.js} +8 -2
- package/dist/chunks/sre-engine-wf9s43gg-f09289c5.js +8 -0
- package/dist/components/shared/composition.d.ts +0 -1
- package/dist/components/shared/layout-host-methods.d.ts +400 -0
- package/dist/components/shared/missing-tool-providers.d.ts +16 -0
- package/dist/components/shared/player-preload.d.ts +14 -10
- package/dist/contracts/host-hooks.d.ts +4 -5
- package/dist/contracts/host-hooks.js +0 -0
- package/dist/contracts/layout-contract.js +0 -0
- package/dist/contracts/layout-parity-metadata.js +87 -0
- package/dist/contracts/public-events.d.ts +14 -15
- package/dist/contracts/public-events.js +12 -0
- package/dist/contracts/runtime-host-contract.js +0 -0
- package/dist/controllers/SectionController.d.ts +13 -0
- package/dist/controllers/toolkit-section-contracts.d.ts +1 -17
- package/dist/controllers/types.d.ts +17 -10
- package/dist/pie-section-player.js +19298 -37928
- package/dist/policies/index.d.ts +9 -2
- package/dist/policies/index.js +25 -0
- package/package.json +34 -29
- package/dist/chunks/module-a516757f.js +0 -73997
- package/dist/chunks/nl-NL-ef6dd604.js +0 -505
- package/dist/chunks/pie-api-client-22de9d9c.js +0 -168
- package/dist/chunks/rolldown-runtime-1287ba31.js +0 -20
- package/dist/chunks/sre-0162a7a9.js +0 -17637
- package/dist/contracts/stages.d.ts +0 -10
- package/dist/utils/z-index.d.ts +0 -5
|
@@ -10,15 +10,14 @@
|
|
|
10
10
|
* the engine's DOM-event bridge dispatches `pie-stage-change`,
|
|
11
11
|
* `pie-loading-complete`, and `framework-error`.
|
|
12
12
|
*
|
|
13
|
-
* **
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* `
|
|
18
|
-
*
|
|
19
|
-
* engine owns lifecycle and error reporting,
|
|
20
|
-
*
|
|
21
|
-
* section-player-specific and the engine has no opinion on it.
|
|
13
|
+
* **Toolkit events (not engine-routed).** The composition / session /
|
|
14
|
+
* runtime-tier family (`composition-changed`, `session-changed`,
|
|
15
|
+
* `runtime-owned`, `runtime-inherited`) is dispatched by
|
|
16
|
+
* `<pie-assessment-toolkit>` and bubbles through the layout CE host to
|
|
17
|
+
* `document`; no section-player component re-dispatches it, so each
|
|
18
|
+
* listener receives each dispatch once. It does not flow through the
|
|
19
|
+
* engine: the engine owns lifecycle and error reporting, and has no
|
|
20
|
+
* opinion on composition or session shape.
|
|
22
21
|
*
|
|
23
22
|
* **`framework-error` single-emit on the layout host.**
|
|
24
23
|
* `<pie-assessment-toolkit>` nested inside a layout CE still
|
|
@@ -28,9 +27,9 @@
|
|
|
28
27
|
* emit at `<pie-section-player-base>` and calls
|
|
29
28
|
* `event.stopPropagation()`, leaving the engine-bridge emit on the
|
|
30
29
|
* layout host as the single canonical DOM surface for
|
|
31
|
-
* section-player consumers.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
30
|
+
* section-player consumers. `tests/section-player-event-delivery.spec.ts`
|
|
31
|
+
* pins one delivery per error on the layout host and none on
|
|
32
|
+
* `document`.
|
|
34
33
|
*
|
|
35
34
|
* Lifecycle should be consumed through canonical events:
|
|
36
35
|
* - `readiness-change` → `pie-stage-change` (the readiness phase
|
|
@@ -72,9 +71,9 @@ export declare const SECTION_PLAYER_PUBLIC_EVENTS: {
|
|
|
72
71
|
readonly stageChange: "pie-stage-change";
|
|
73
72
|
/**
|
|
74
73
|
* Engine-routed (M7). Companion to `stageChange`. Fires once per
|
|
75
|
-
* cohort
|
|
76
|
-
*
|
|
77
|
-
* `interactive
|
|
74
|
+
* cohort, once the section controller is ready and the section's
|
|
75
|
+
* element pre-warm has resolved for the current items: the same
|
|
76
|
+
* condition that moves a layout element to `interactive`.
|
|
78
77
|
*/
|
|
79
78
|
readonly loadingComplete: "pie-loading-complete";
|
|
80
79
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var e = {
|
|
2
|
+
runtimeOwned: "runtime-owned",
|
|
3
|
+
runtimeInherited: "runtime-inherited",
|
|
4
|
+
frameworkError: "framework-error",
|
|
5
|
+
compositionChanged: "composition-changed",
|
|
6
|
+
sessionChanged: "session-changed",
|
|
7
|
+
stageChange: "pie-stage-change",
|
|
8
|
+
loadingComplete: "pie-loading-complete"
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
e as SECTION_PLAYER_PUBLIC_EVENTS
|
|
12
|
+
};
|
|
File without changes
|
|
@@ -15,6 +15,8 @@ export declare class SectionController implements SectionControllerHandle {
|
|
|
15
15
|
private readonly trackedRenderables;
|
|
16
16
|
private readonly loadedRenderableKeys;
|
|
17
17
|
private readonly itemCompletionByCanonicalId;
|
|
18
|
+
private readonly elementCompletionByCanonicalId;
|
|
19
|
+
private readonly reportedCompletionIds;
|
|
18
20
|
private sectionLoadingComplete;
|
|
19
21
|
private totalRegistered;
|
|
20
22
|
private totalLoaded;
|
|
@@ -254,6 +256,7 @@ export declare class SectionController implements SectionControllerHandle {
|
|
|
254
256
|
applySession(session: SectionControllerSessionState | null, options?: {
|
|
255
257
|
mode?: "replace" | "merge";
|
|
256
258
|
}): Promise<void>;
|
|
259
|
+
private applySessionState;
|
|
257
260
|
/**
|
|
258
261
|
* Move between items inside the current section only.
|
|
259
262
|
* Cross-section navigation belongs to the higher-level assessment player.
|
|
@@ -295,7 +298,17 @@ export declare class SectionController implements SectionControllerHandle {
|
|
|
295
298
|
private toSectionContentKind;
|
|
296
299
|
private getRenderableKey;
|
|
297
300
|
private readCompleteFromSession;
|
|
301
|
+
private sessionHoldsResponse;
|
|
302
|
+
/**
|
|
303
|
+
* `restored` names the items a host session was just applied to: what their
|
|
304
|
+
* elements reported before it describes the session the restore replaced.
|
|
305
|
+
*/
|
|
298
306
|
private bootstrapCompletionFromSessions;
|
|
307
|
+
/**
|
|
308
|
+
* The item's completion after one element reports its own. A report that
|
|
309
|
+
* names no element is the item's completion itself.
|
|
310
|
+
*/
|
|
311
|
+
private recordElementCompletion;
|
|
299
312
|
private updateItemCompleteState;
|
|
300
313
|
private emitSectionItemsCompleteIfChanged;
|
|
301
314
|
private evaluateSectionLoadingState;
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export type { SectionControllerContext, SectionControllerEvent, SectionControllerEventType, SectionControllerHandle, SectionControllerKey, SectionControllerLoadedRenderable, SectionSessionPersistenceConfig, SectionSessionPersistenceStrategy, SectionControllerRuntimeState, SectionControllerSessionState, } from '@pie-players/pie-assessment-toolkit';
|
|
3
|
-
export type CoordinatorWithSectionControllers = ToolkitCoordinator & {
|
|
4
|
-
getOrCreateSectionController(args: {
|
|
5
|
-
sectionId: string;
|
|
6
|
-
attemptId?: string;
|
|
7
|
-
input?: unknown;
|
|
8
|
-
updateExisting?: boolean;
|
|
9
|
-
createDefaultController: () => SectionControllerHandle | Promise<SectionControllerHandle>;
|
|
10
|
-
}): Promise<SectionControllerHandle>;
|
|
11
|
-
disposeSectionController(args: {
|
|
12
|
-
sectionId: string;
|
|
13
|
-
attemptId?: string;
|
|
14
|
-
persistBeforeDispose?: boolean;
|
|
15
|
-
clearPersistence?: boolean;
|
|
16
|
-
}): Promise<void>;
|
|
17
|
-
};
|
|
1
|
+
export type { SectionControllerHandle, SectionSessionPersistenceConfig, SectionControllerRuntimeState, SectionControllerSessionState, } from '@pie-players/pie-assessment-toolkit';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TestAttemptSession } from '@pie-players/pie-assessment-toolkit';
|
|
2
|
-
import { ItemSessionUpdateIntent, AssessmentItemRef, AssessmentSection, ItemEntity, PassageEntity, RubricBlock } from '@pie-players/pie-players-shared';
|
|
2
|
+
import { ItemSessionUpdateIntent, SessionCommitReason, AssessmentItemRef, AssessmentSection, ItemEntity, PassageEntity, RubricBlock } from '@pie-players/pie-players-shared';
|
|
3
3
|
import { ConfigContainerEntity } from '@pie-players/pie-players-shared/types';
|
|
4
4
|
import { FormativeFeedbackReveal, FormativeItemPolicy, FormativeMasteryRollup, FormativeSectionProjection, FormativeSectionSlice, FormativeTryOutcome } from '@pie-players/pie-players-shared/formative';
|
|
5
5
|
import { TimedMediaDegradation, TimedMediaSectionProjection, TimedMediaSectionSessionSlice, TimedMediaValidationError } from '@pie-players/pie-players-shared/timed-media';
|
|
@@ -120,15 +120,6 @@ export interface SectionCanonicalItemViewModel {
|
|
|
120
120
|
isCurrent: boolean;
|
|
121
121
|
session: unknown;
|
|
122
122
|
}
|
|
123
|
-
export interface SectionCanonicalSectionViewModel {
|
|
124
|
-
sectionId: string;
|
|
125
|
-
currentItemIndex: number;
|
|
126
|
-
items: SectionCanonicalItemViewModel[];
|
|
127
|
-
}
|
|
128
|
-
export interface SectionCanonicalSessionViewModel {
|
|
129
|
-
currentItemIndex: number;
|
|
130
|
-
itemSessionsByCanonicalId: Record<string, unknown>;
|
|
131
|
-
}
|
|
132
123
|
export interface SectionAttemptSessionSliceLoadedRenderable {
|
|
133
124
|
itemId: string;
|
|
134
125
|
canonicalItemId: string;
|
|
@@ -160,6 +151,8 @@ export interface SessionChangedResult {
|
|
|
160
151
|
intent?: ItemSessionUpdateIntent;
|
|
161
152
|
complete?: boolean;
|
|
162
153
|
component?: string;
|
|
154
|
+
elementId?: string;
|
|
155
|
+
sessionCommitReason?: SessionCommitReason;
|
|
163
156
|
timestamp: number;
|
|
164
157
|
};
|
|
165
158
|
}
|
|
@@ -197,15 +190,29 @@ export interface ItemSessionDataChangedEvent extends ItemScopedControllerEventBa
|
|
|
197
190
|
canonicalItemId: string;
|
|
198
191
|
session: unknown;
|
|
199
192
|
intent?: ItemSessionUpdateIntent;
|
|
193
|
+
/** The reported completion: the element's own when `elementId` is set. */
|
|
200
194
|
complete?: boolean;
|
|
201
195
|
component?: string;
|
|
196
|
+
/** The id of the element that reported, when the change names one. */
|
|
197
|
+
elementId?: string;
|
|
198
|
+
/** The controller input's `sectionId`. */
|
|
199
|
+
sectionId?: string;
|
|
200
|
+
/** Set when the change is a commit at a teardown, navigation or page-hidden seam. */
|
|
201
|
+
sessionCommitReason?: SessionCommitReason;
|
|
202
202
|
}
|
|
203
203
|
export interface ItemSessionMetaChangedEvent extends ItemScopedControllerEventBase {
|
|
204
204
|
type: "item-session-meta-changed";
|
|
205
205
|
itemId: string;
|
|
206
206
|
canonicalItemId: string;
|
|
207
|
+
/** The reported completion: the element's own when `elementId` is set. */
|
|
207
208
|
complete?: boolean;
|
|
208
209
|
component?: string;
|
|
210
|
+
/** The id of the element that reported, when the change names one. */
|
|
211
|
+
elementId?: string;
|
|
212
|
+
/** The controller input's `sectionId`. */
|
|
213
|
+
sectionId?: string;
|
|
214
|
+
/** Set when the change is a commit at a teardown, navigation or page-hidden seam. */
|
|
215
|
+
sessionCommitReason?: SessionCommitReason;
|
|
209
216
|
}
|
|
210
217
|
export interface ItemSelectedEvent extends ItemScopedControllerEventBase {
|
|
211
218
|
type: "item-selected";
|