@pie-players/pie-section-player 0.3.74 → 0.3.75
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 +249 -134
- package/dist/browser/assets/{evaluation-worker-DkU_wGh3.js → evaluation-worker-CORp9m0K.js} +39245 -38027
- package/dist/browser/chunks/PUA-tLuTiQ7--f2b27953.js +1 -1
- package/dist/browser/chunks/accents-BTUYmhn9-cafeb96e.js +1 -1
- package/dist/browser/chunks/accents-b-i-CngHZsLL-e0eb98fd.js +1 -1
- package/dist/browser/chunks/arabic-BzEHMVZD-30ac1ade.js +1 -1
- package/dist/browser/chunks/arrows-VjxlU-jv-2e17c192.js +1 -1
- package/dist/browser/chunks/braille-BeWC_Ruq-a3bb8ef9.js +1 -1
- package/dist/browser/chunks/braille-d-Dk6J96GO-d832bfbf.js +1 -1
- package/dist/browser/chunks/browser-a3c32178.js +17 -16
- package/dist/browser/chunks/calculator-element-271c142f.js +7 -3
- package/dist/browser/chunks/calligraphic-Cew9cU3x-04cf0735.js +1 -1
- package/dist/browser/chunks/catalog-context-46d3e50e.js +1 -0
- package/dist/browser/chunks/catalog-owner-d602f784.js +1 -0
- package/dist/browser/chunks/cherokee-Cny3FYho-4da7d2f3.js +1 -1
- package/dist/browser/chunks/cyrillic-CfCDulXU-5550df0b.js +1 -1
- package/dist/browser/chunks/cyrillic-ss-lU7bNGG9-12eb0188.js +1 -1
- package/dist/browser/chunks/devanagari-CDIz2h-r-18c38725.js +1 -1
- package/dist/browser/chunks/dist-41b39e7f.js +1 -1
- package/dist/browser/chunks/dist-59132a53.js +1 -1
- package/dist/browser/chunks/dist-60d7afef.js +1 -1
- package/dist/browser/chunks/dist-ca9b9622.js +1 -1
- package/dist/browser/chunks/double-struck-BpJEQk8y-500ce8dd.js +1 -1
- package/dist/browser/chunks/fraktur-rLEq9DEH-44cc14d8.js +1 -1
- package/dist/browser/chunks/greek-BlraJTyL-90ce8924.js +1 -1
- package/dist/browser/chunks/greek-ss-D-EN2PK0-91610739.js +1 -1
- package/dist/browser/chunks/hebrew-GiQZeybp-b583f555.js +1 -1
- package/dist/browser/chunks/latin-b-BhEnC7R2-d13e06ff.js +1 -1
- package/dist/browser/chunks/latin-bi-DqiIKv3U-1dec8705.js +1 -1
- package/dist/browser/chunks/latin-i-B1xtwaE1-21637466.js +1 -1
- package/dist/browser/chunks/latin-xfWFlLkD-5bcea5cf.js +1 -1
- package/dist/browser/chunks/logger-8b07fb72.js +1 -1
- package/dist/browser/chunks/marrows-DD1NgMQi-15b63755.js +1 -1
- package/dist/browser/chunks/math-DpWn1mbG-38eeb914.js +1 -1
- package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -1
- package/dist/browser/chunks/{mathjax-D2JHb_R_-64780dc5.js → mathjax-BKrHE4xs-3ca05bf6.js} +41 -41
- package/dist/browser/chunks/monospace-D116QD2a-98d484fd.js +1 -1
- package/dist/browser/chunks/monospace-ex-DcXpouKS-456b403c.js +1 -1
- package/dist/browser/chunks/monospace-l-Ct5wkMDs-f34a4a9e.js +1 -1
- package/dist/browser/chunks/mshapes-DCp86WSX-c0055952.js +1 -1
- package/dist/browser/chunks/nl-NL-364d61b9.js +1 -1
- package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -1
- package/dist/browser/chunks/phonetics-BwOCw2Y9-d2e3af59.js +1 -1
- package/dist/browser/chunks/phonetics-ss-CRtMn02f-579b6135.js +1 -1
- package/dist/browser/chunks/pie-api-client-687c319a.js +1 -1
- package/dist/browser/chunks/provider-4c704118.js +1 -1
- package/dist/browser/chunks/{runtime-C7H1jS4E-64772f5e.js → runtime-wcU7KOFU-ac86d7b8.js} +401 -278
- package/dist/browser/chunks/sans-serif-BYPZKlE9-2efdbcd9.js +1 -1
- package/dist/browser/chunks/sans-serif-b-B0kRKiC--b5530dce.js +1 -1
- package/dist/browser/chunks/sans-serif-bi-DXWul6mu-5370dba4.js +1 -1
- package/dist/browser/chunks/sans-serif-ex-Boux1kMP-aa178f31.js +1 -1
- package/dist/browser/chunks/sans-serif-i-676RFaSO-2db54474.js +1 -1
- package/dist/browser/chunks/sans-serif-r-DrN9xdZt-0fc72eea.js +1 -1
- package/dist/browser/chunks/script-0ohehnXc-526904f4.js +1 -1
- package/dist/browser/chunks/shapes-BG47NodJ-d59b0eca.js +1 -1
- package/dist/browser/chunks/{sre-engine-wf9s43gg-f09289c5.js → sre-0162a7a9.js} +18 -18
- package/dist/browser/chunks/sre-engine-ace23548.js +1 -0
- package/dist/browser/chunks/sre-engine-jd8cc08x-42d270e5.js +1 -0
- package/dist/browser/chunks/sre-locales-112320af.js +1 -0
- package/dist/browser/chunks/symbols-BqnUxf_t-83087e87.js +1 -1
- package/dist/browser/chunks/symbols-b-i-eg9k5hmF-9c461ac2.js +1 -1
- package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +7 -6
- package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +4 -4
- package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +2 -2
- package/dist/browser/chunks/tool-dictionary-cecff3b4.js +1 -1
- package/dist/browser/chunks/tool-graph-cb0338e8.js +4 -4
- package/dist/browser/chunks/tool-host-contract-b93b482c.js +1 -1
- package/dist/browser/chunks/tool-instance-id-2a92deb0.js +1 -0
- package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +2 -2
- package/dist/browser/chunks/tool-periodic-table-43b133b8.js +1 -1
- package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +1 -1
- package/dist/browser/chunks/tool-protractor-23f77028.js +6 -6
- package/dist/browser/chunks/tool-ruler-1d9a03a6.js +6 -6
- package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +7 -7
- package/dist/browser/chunks/tts-runtime-config-a7ab1ad4.js +194 -0
- package/dist/browser/chunks/variants-2LRNhOUP-966fc49d.js +1 -1
- package/dist/browser/pie-section-player.js +199 -85
- package/dist/chunks/nl-NL-364d61b9.js +1 -24
- package/dist/chunks/{sre-engine-wf9s43gg-f09289c5.js → sre-engine-jd8cc08x-42d270e5.js} +1 -1
- package/dist/components/shared/composition.d.ts +3 -1
- package/dist/components/shared/framework-error-latch.d.ts +32 -0
- package/dist/components/shared/host-element.d.ts +10 -0
- package/dist/components/shared/kernel-host-default-body.d.ts +14 -0
- package/dist/components/shared/layout-host-methods.d.ts +12 -27
- package/dist/components/shared/missing-tool-providers.d.ts +8 -8
- package/dist/components/shared/section-player-backend-delivery.d.ts +1 -1
- package/dist/components/shared/section-player-card-context.d.ts +5 -1
- package/dist/components/shared/section-player-host-runtime.d.ts +32 -19
- package/dist/components/shared/section-player-layout-context.d.ts +77 -0
- package/dist/components/shared/section-player-own-event.d.ts +10 -0
- package/dist/components/shared/section-player-runtime-callbacks.d.ts +1 -1
- package/dist/components/shared/section-player-shell-layout.svelte.d.ts +3 -11
- package/dist/components/shared/section-player-view-state.d.ts +6 -1
- package/dist/components/shared/toolkit-ready-wait.d.ts +16 -0
- package/dist/contracts/host-hooks.d.ts +0 -7
- package/dist/contracts/runtime-host-contract.d.ts +0 -5
- package/dist/controllers/SectionController.d.ts +1 -0
- package/dist/controllers/types.d.ts +8 -1
- package/dist/item-section/index.d.ts +22 -0
- package/dist/item-section/index.js +37 -0
- package/dist/pie-section-player.d.ts +4 -6
- package/dist/pie-section-player.js +19437 -19877
- package/dist/policies/index.d.ts +1 -19
- package/dist/policies/index.js +6 -14
- package/dist/policies/types.d.ts +0 -4
- package/package.json +13 -53
- package/dist/browser/chunks/custom-element-define-2a92deb0.js +0 -1
- package/dist/browser/chunks/nds-icon-button-d602f784.js +0 -194
- package/dist/browser/chunks/pie-tool-calculator-cortex-0626bc24.js +0 -9
- package/dist/browser/chunks/pie-tool-calculator-geogebra-561236cb.js +0 -9
- package/dist/components/item-shell-element.d.ts +0 -1
- package/dist/components/shared/shell-registration.d.ts +0 -55
- package/dist/contracts/layout-contract.d.ts +0 -17
- package/dist/contracts/layout-contract.js +0 -0
- package/dist/contracts/layout-parity-metadata.d.ts +0 -4
- package/dist/contracts/layout-parity-metadata.js +0 -87
- package/dist/contracts/public-events.d.ts +0 -92
- package/dist/contracts/public-events.js +0 -12
- package/dist/policies/guards.d.ts +0 -2
- /package/dist/browser/chunks/{ItemToolBar-wr2myaah-2ce4b643.js → ItemToolBar-jx38w99s-58defccc.js} +0 -0
- /package/dist/chunks/{ItemToolBar-wr2myaah-1287ba31.js → ItemToolBar-jx38w99s-1287ba31.js} +0 -0
|
@@ -306,30 +306,6 @@ var e = {
|
|
|
306
306
|
textToSpeech: {
|
|
307
307
|
name: "Voorlezen",
|
|
308
308
|
description: "Inhoud laten voorlezen",
|
|
309
|
-
toolA11y: "Voorleeshulp",
|
|
310
|
-
title: "Voorlezen",
|
|
311
|
-
initializing: "Wordt gestart…",
|
|
312
|
-
initFailed: "Voorlezen kon niet worden gestart.",
|
|
313
|
-
selectText: "Selecteer tekst op de pagina om die te laten voorlezen.",
|
|
314
|
-
speed: "Snelheid:",
|
|
315
|
-
play: "Voorlezen",
|
|
316
|
-
pause: "Pauzeren",
|
|
317
|
-
resume: "Hervatten",
|
|
318
|
-
stop: "Stoppen",
|
|
319
|
-
speaking: "Aan het voorlezen…",
|
|
320
|
-
paused: "Gepauzeerd",
|
|
321
|
-
charactersSelected: {
|
|
322
|
-
one: "{count} teken geselecteerd",
|
|
323
|
-
other: "{count} tekens geselecteerd"
|
|
324
|
-
},
|
|
325
|
-
rate: {
|
|
326
|
-
slow: "Langzaam",
|
|
327
|
-
slower: "Langzamer",
|
|
328
|
-
normal: "Normaal",
|
|
329
|
-
faster: "Sneller",
|
|
330
|
-
fast: "Snel",
|
|
331
|
-
veryFast: "Zeer snel"
|
|
332
|
-
},
|
|
333
309
|
inline: {
|
|
334
310
|
controlsA11y: "Voorleesknoppen",
|
|
335
311
|
playbackSpeedA11y: "Voorleessnelheid",
|
|
@@ -435,6 +411,7 @@ var e = {
|
|
|
435
411
|
resolvedTools: "Toegekende hulpmiddelen (toolkit)",
|
|
436
412
|
provenanceSummary: "Overzicht van herkomst van het hulpmiddelenbeleid",
|
|
437
413
|
perToolDecisions: "Beslissingen per hulpmiddel",
|
|
414
|
+
policyDiagnostics: "Diagnose van het hulpmiddelenbeleid",
|
|
438
415
|
profileReadOnly: "PNP-profiel (alleen lezen)"
|
|
439
416
|
},
|
|
440
417
|
tts: {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ItemEntity } from '@pie-players/pie-players-shared/types';
|
|
1
|
+
import { ItemEntity, ItemSettings } from '@pie-players/pie-players-shared/types';
|
|
2
2
|
import { SectionCompositionModel } from '../../controllers/types.js';
|
|
3
3
|
export declare const EMPTY_ITEM_SESSION: Record<string, unknown>;
|
|
4
4
|
export declare const EMPTY_COMPOSITION: SectionCompositionModel;
|
|
5
5
|
export declare function getCanonicalItemIdForItem(compositionModel: SectionCompositionModel, item: ItemEntity): string;
|
|
6
|
+
/** The item's policy settings from its assessment item reference. */
|
|
7
|
+
export declare function getItemSettingsForItem(compositionModel: SectionCompositionModel, item: ItemEntity): ItemSettings | null;
|
|
6
8
|
export declare function getSessionForItem(compositionModel: SectionCompositionModel, item: ItemEntity): unknown;
|
|
7
9
|
export declare function getSessionForItemOrEmpty(compositionModel: SectionCompositionModel, item: ItemEntity): Record<string, unknown>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FrameworkErrorModel } from '@pie-players/pie-assessment-toolkit';
|
|
2
|
+
/**
|
|
3
|
+
* The section player's readiness error latch. A non-recoverable framework error
|
|
4
|
+
* latches the scope its report site set: a `cohort` error fails the section it
|
|
5
|
+
* was reported for and clears when the cohort rolls; a `runtime` error fails
|
|
6
|
+
* every later section, since they run on the same coordinator. A recoverable
|
|
7
|
+
* error latches nothing.
|
|
8
|
+
*
|
|
9
|
+
* A toolkit bootstrap failure is a runtime error held against the coordinator
|
|
10
|
+
* the toolkit had announced when it was reported. It clears when the toolkit
|
|
11
|
+
* announces a different one, which it builds once the host corrects the input
|
|
12
|
+
* that failed: the coordinator the failure took down is no longer the one later
|
|
13
|
+
* sections run on.
|
|
14
|
+
*
|
|
15
|
+
* `element-preload` latches nothing either. The items pane reports its warmup
|
|
16
|
+
* outcome with the composition it was for, and the kernel reads that instead: a
|
|
17
|
+
* latched event cannot tell which section's warmup failed.
|
|
18
|
+
*/
|
|
19
|
+
export type FrameworkErrorLatch = {
|
|
20
|
+
readonly cohort: boolean;
|
|
21
|
+
readonly runtime: boolean;
|
|
22
|
+
/** The coordinator a bootstrap failure was reported under, while one is latched. */
|
|
23
|
+
readonly bootstrap: {
|
|
24
|
+
readonly coordinator: unknown;
|
|
25
|
+
} | null;
|
|
26
|
+
};
|
|
27
|
+
export declare const CLEAR_FRAMEWORK_ERROR_LATCH: FrameworkErrorLatch;
|
|
28
|
+
export declare function latchFrameworkError(latch: FrameworkErrorLatch, detail: Pick<FrameworkErrorModel, "recoverable" | "scope" | "kind"> | null | undefined, coordinator: unknown): FrameworkErrorLatch;
|
|
29
|
+
export declare function rollFrameworkErrorLatch(latch: FrameworkErrorLatch): FrameworkErrorLatch;
|
|
30
|
+
/** Applied on each `toolkit-ready`, with the coordinator it announces. */
|
|
31
|
+
export declare function announceToolkitCoordinator(latch: FrameworkErrorLatch, coordinator: unknown): FrameworkErrorLatch;
|
|
32
|
+
export declare function isFrameworkErrorLatched(latch: FrameworkErrorLatch): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The custom element a component renders into, reached from an anchor node at
|
|
3
|
+
* the top of its template.
|
|
4
|
+
*
|
|
5
|
+
* The anchor's parent node: the element itself under `shadow: "none"`, or its
|
|
6
|
+
* shadow root otherwise. The anchor's root node names the host only in the second
|
|
7
|
+
* case. A light-DOM element inside another component's shadow root shares that
|
|
8
|
+
* root, so resolving through `getRootNode()` returned the outer component.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getHostElementFromAnchor(anchor: HTMLElement | null): HTMLElement | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The kernel host's default body: its stock arrangement of the panes, present
|
|
3
|
+
* exactly while the host gives the element no element children of its own.
|
|
4
|
+
*
|
|
5
|
+
* Mounted into the element's light DOM, beside any children, where the player's
|
|
6
|
+
* item content renders in every layout: that is where page styles, the content
|
|
7
|
+
* stylesheet and the item players' own injected styles reach it. As fallback
|
|
8
|
+
* content of the shadow root's slot it would sit in the shadow tree, out of their
|
|
9
|
+
* reach, and stay mounted, hidden, beside a host's own panes.
|
|
10
|
+
*
|
|
11
|
+
* Text and comment children do not count, so markup whitespace and a framework's
|
|
12
|
+
* placeholder comments leave the default in place. Returns the teardown.
|
|
13
|
+
*/
|
|
14
|
+
export declare function attachKernelHostDefaultBody(host: HTMLElement, mountBody: (target: HTMLElement) => () => void): () => void;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
import { SectionControllerHandle } from '@pie-players/pie-assessment-toolkit';
|
|
2
|
-
import {
|
|
3
|
-
export declare const BOOTSTRAP_READINESS: {
|
|
4
|
-
readonly phase: "bootstrapping";
|
|
5
|
-
readonly interactionReady: false;
|
|
6
|
-
readonly allLoadingComplete: false;
|
|
7
|
-
};
|
|
1
|
+
import { SectionControllerHandle, SectionControllerSessionState } from '@pie-players/pie-assessment-toolkit';
|
|
2
|
+
import { SectionPlayerSnapshot } from '../../contracts/runtime-host-contract.js';
|
|
8
3
|
export declare const BOOTSTRAP_SNAPSHOT: {
|
|
9
|
-
readonly readiness: {
|
|
10
|
-
readonly phase: "bootstrapping";
|
|
11
|
-
readonly interactionReady: false;
|
|
12
|
-
readonly allLoadingComplete: false;
|
|
13
|
-
};
|
|
14
4
|
readonly composition: {
|
|
15
5
|
readonly itemsCount: 0;
|
|
16
6
|
readonly passagesCount: 0;
|
|
@@ -22,29 +12,24 @@ export declare const BOOTSTRAP_SNAPSHOT: {
|
|
|
22
12
|
readonly canPrevious: false;
|
|
23
13
|
};
|
|
24
14
|
};
|
|
25
|
-
/** What each read returns before the component mounts. */
|
|
26
|
-
export type UnmountedReads = {
|
|
27
|
-
snapshot: SectionPlayerSnapshot | null;
|
|
28
|
-
composition: SectionPlayerSnapshot["composition"] | null;
|
|
29
|
-
navigation: SectionPlayerNavigationSnapshot | null;
|
|
30
|
-
readiness: SectionPlayerSnapshot["readiness"] | null;
|
|
31
|
-
};
|
|
32
|
-
export declare const NULL_READS: UnmountedReads;
|
|
33
|
-
export declare const BOOTSTRAP_READS: UnmountedReads;
|
|
34
15
|
/**
|
|
35
|
-
* For a layout element's `customElement.extend`. `
|
|
36
|
-
* element's
|
|
16
|
+
* For a layout element's `customElement.extend`. `unmountedSnapshot` is what
|
|
17
|
+
* that element's `getSnapshot` returns while its kernel is not bound.
|
|
37
18
|
*/
|
|
38
|
-
export declare function withHostMethods(
|
|
19
|
+
export declare function withHostMethods(unmountedSnapshot: SectionPlayerSnapshot | null): <Base extends CustomElementConstructor>(ElementClass: Base) => {
|
|
39
20
|
new (...params: any[]): {
|
|
40
21
|
getSnapshot(): SectionPlayerSnapshot | null;
|
|
41
|
-
selectComposition(): SectionPlayerSnapshot["composition"] | null;
|
|
42
|
-
selectNavigation(): SectionPlayerNavigationSnapshot | null;
|
|
43
|
-
selectReadiness(): SectionPlayerSnapshot["readiness"] | null;
|
|
44
22
|
navigateTo(index: number): boolean;
|
|
45
23
|
navigateNext(): boolean;
|
|
46
24
|
navigatePrevious(): boolean;
|
|
47
25
|
getSectionController(): SectionControllerHandle | null;
|
|
26
|
+
/**
|
|
27
|
+
* A fresh snapshot on each read once the controller is published. The
|
|
28
|
+
* item player instead returns the host's own object, kept current by
|
|
29
|
+
* projection; no host reads a section session by reference.
|
|
30
|
+
*/
|
|
31
|
+
get session(): SectionControllerSessionState | null;
|
|
32
|
+
set session(value: SectionControllerSessionState | null);
|
|
48
33
|
waitForSectionController(timeoutMs?: number): Promise<SectionControllerHandle | null>;
|
|
49
34
|
accessKey: string;
|
|
50
35
|
readonly accessKeyLabel: string;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ToolkitCoordinatorApi, ToolRegistry } from '@pie-players/pie-assessment-toolkit';
|
|
2
2
|
/**
|
|
3
3
|
* Warn once per placed tool whose registration carries a provider the coordinator
|
|
4
|
-
* has not registered. Reads the coordinator's current
|
|
5
|
-
* call it only once the coordinator reports ready.
|
|
4
|
+
* has not registered under the tool's id. Reads the coordinator's current
|
|
5
|
+
* placement and providers, so call it only once the coordinator reports ready.
|
|
6
6
|
*/
|
|
7
7
|
export declare function reportMissingToolProviders(coordinator: ToolkitCoordinatorApi, toolRegistry: ToolRegistry): void;
|
|
8
8
|
/**
|
|
9
|
-
* Check `coordinator`
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
9
|
+
* Check `coordinator` once it reports ready, and again whenever readiness or its
|
|
10
|
+
* policy inputs change, since placement can. Its providers have registered by
|
|
11
|
+
* then, and a text-to-speech reconfiguration, which unregisters and re-registers
|
|
12
|
+
* that provider, holds readiness until it is back. `waitUntilReady()` is not
|
|
13
|
+
* awaited: it would start text-to-speech a lazy coordinator defers, and retry
|
|
14
|
+
* one that failed. Returns the teardown.
|
|
15
15
|
*/
|
|
16
16
|
export declare function watchMissingToolProviders(coordinator: ToolkitCoordinatorApi, toolRegistry: ToolRegistry): () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BackendConfig } from '@pie-players/pie-item-player';
|
|
2
|
-
import { PlayerOverrides, RuntimeConfig } from '@pie-players/pie-assessment-toolkit/runtime/
|
|
2
|
+
import { PlayerOverrides, RuntimeConfig } from '@pie-players/pie-assessment-toolkit/runtime/engine';
|
|
3
3
|
import { ItemEntity } from '@pie-players/pie-players-shared/types';
|
|
4
4
|
export type SectionPlayerBackendResolverContext = {
|
|
5
5
|
itemId: string;
|
|
@@ -8,8 +8,12 @@ export type SectionPlayerCardRenderContext = {
|
|
|
8
8
|
export declare const sectionPlayerCardRenderContext: {
|
|
9
9
|
__context__: SectionPlayerCardRenderContext;
|
|
10
10
|
};
|
|
11
|
-
export declare function getHostElementFromAnchor(anchor: HTMLElement | null): HTMLElement | null;
|
|
12
11
|
export declare function connectSectionPlayerCardRenderContext(host: HTMLElement, onValue: (value: SectionPlayerCardRenderContext) => void): () => void;
|
|
12
|
+
/**
|
|
13
|
+
* A card that subscribes before this provider connects is answered through the
|
|
14
|
+
* document's context root, which replays its request when the provider
|
|
15
|
+
* announces itself.
|
|
16
|
+
*/
|
|
13
17
|
export declare function createSectionPlayerCardRenderContextProvider(host: HTMLElement, initialValue: SectionPlayerCardRenderContext): {
|
|
14
18
|
setValue: (value: SectionPlayerCardRenderContext) => void;
|
|
15
19
|
disconnect: () => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RuntimeInputs } from '@pie-players/pie-assessment-toolkit/runtime/engine';
|
|
2
2
|
import { ItemEntity } from '@pie-players/pie-players-shared';
|
|
3
3
|
/**
|
|
4
4
|
* Resolve the player-runtime view (player tag, attributes, props,
|
|
@@ -21,14 +21,16 @@ export declare function resolvePlayerRuntime(args: {
|
|
|
21
21
|
loaderOptions: {
|
|
22
22
|
[x: string]: unknown;
|
|
23
23
|
};
|
|
24
|
-
loaderConfig?: import('@pie-players/pie-players-shared').LoaderConfig;
|
|
25
24
|
hosted: boolean;
|
|
25
|
+
loaderConfig?: import('@pie-players/pie-players-shared').LoaderConfig;
|
|
26
|
+
backend?: Record<string, unknown> | null;
|
|
26
27
|
} | {
|
|
27
28
|
loaderOptions: {
|
|
28
29
|
[x: string]: unknown;
|
|
29
30
|
};
|
|
31
|
+
hosted?: boolean;
|
|
30
32
|
loaderConfig?: import('@pie-players/pie-players-shared').LoaderConfig;
|
|
31
|
-
|
|
33
|
+
backend?: Record<string, unknown> | null;
|
|
32
34
|
};
|
|
33
35
|
resolvedPlayerEnv: Record<string, unknown>;
|
|
34
36
|
strategy: import('@pie-players/pie-players-shared').ItemPlayerStrategy;
|
|
@@ -51,7 +53,29 @@ export declare function mapRenderablesToItems(renderables: unknown[]): ItemEntit
|
|
|
51
53
|
*/
|
|
52
54
|
export declare function resolveSectionPlayerRuntimeState(args: RuntimeInputs): {
|
|
53
55
|
effectiveToolsConfig: unknown;
|
|
54
|
-
effectiveRuntime:
|
|
56
|
+
effectiveRuntime: {
|
|
57
|
+
playerType: string;
|
|
58
|
+
player: {
|
|
59
|
+
hosted?: boolean;
|
|
60
|
+
loaderConfig?: import('@pie-players/pie-players-shared').LoaderConfig;
|
|
61
|
+
loaderOptions?: Record<string, unknown>;
|
|
62
|
+
backend?: Record<string, unknown> | null;
|
|
63
|
+
} | null;
|
|
64
|
+
lazyInit: boolean;
|
|
65
|
+
accessibility: Record<string, unknown> | null;
|
|
66
|
+
coordinator: {} | null;
|
|
67
|
+
createSectionController: unknown;
|
|
68
|
+
isolation: string;
|
|
69
|
+
env: Record<string, unknown>;
|
|
70
|
+
toolConfigStrictness: import('@pie-players/pie-assessment-toolkit').ToolConfigStrictness;
|
|
71
|
+
tools: unknown;
|
|
72
|
+
assessmentId?: string;
|
|
73
|
+
toolContextResolvers?: Record<string, unknown> | null;
|
|
74
|
+
contentLanguage?: string;
|
|
75
|
+
onFrameworkError?: import('@pie-players/pie-assessment-toolkit/runtime/engine').FrameworkErrorHandler;
|
|
76
|
+
onStageChange?: import('@pie-players/pie-assessment-toolkit/runtime/engine').StageChangeHandler;
|
|
77
|
+
onLoadingComplete?: import('@pie-players/pie-assessment-toolkit/runtime/engine').LoadingCompleteHandler;
|
|
78
|
+
};
|
|
55
79
|
playerRuntime: {
|
|
56
80
|
effectivePlayerType: string;
|
|
57
81
|
resolvedPlayerDefinition: import('../../component-definitions.js').ComponentDefinition;
|
|
@@ -61,29 +85,18 @@ export declare function resolveSectionPlayerRuntimeState(args: RuntimeInputs): {
|
|
|
61
85
|
loaderOptions: {
|
|
62
86
|
[x: string]: unknown;
|
|
63
87
|
};
|
|
64
|
-
loaderConfig?: import('@pie-players/pie-players-shared').LoaderConfig;
|
|
65
88
|
hosted: boolean;
|
|
89
|
+
loaderConfig?: import('@pie-players/pie-players-shared').LoaderConfig;
|
|
90
|
+
backend?: Record<string, unknown> | null;
|
|
66
91
|
} | {
|
|
67
92
|
loaderOptions: {
|
|
68
93
|
[x: string]: unknown;
|
|
69
94
|
};
|
|
95
|
+
hosted?: boolean;
|
|
70
96
|
loaderConfig?: import('@pie-players/pie-players-shared').LoaderConfig;
|
|
71
|
-
|
|
97
|
+
backend?: Record<string, unknown> | null;
|
|
72
98
|
};
|
|
73
99
|
resolvedPlayerEnv: Record<string, unknown>;
|
|
74
100
|
strategy: import('@pie-players/pie-players-shared').ItemPlayerStrategy;
|
|
75
101
|
};
|
|
76
102
|
};
|
|
77
|
-
/**
|
|
78
|
-
* Fold a layout element's presentation convenience attributes — `nds-icons` and
|
|
79
|
-
* `locale` — into the `runtime` config handed to the kernel.
|
|
80
|
-
*
|
|
81
|
-
* Only injects an attribute that is explicitly set, so an unset one never
|
|
82
|
-
* clobbers a value the host put on `runtime`; when both are present, `runtime`
|
|
83
|
-
* wins (spread last). Returns the input unchanged when neither is set, which
|
|
84
|
-
* keeps `kernelRuntime` referentially stable for a host that supplies neither.
|
|
85
|
-
*/
|
|
86
|
-
export declare function mergeLayoutAttrsIntoRuntime(runtime: RuntimeConfig | null, attrs: {
|
|
87
|
-
ndsIcons?: boolean;
|
|
88
|
-
locale?: string;
|
|
89
|
-
}): RuntimeConfig | null;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ToolRegistry, ToolbarItem } from '@pie-players/pie-assessment-toolkit';
|
|
2
|
+
import { ItemEntity } from '@pie-players/pie-players-shared/types';
|
|
3
|
+
import { SectionCompositionModel } from '../../controllers/types.js';
|
|
4
|
+
import { ElementPreloadErrorDetail, ElementPreloadRetryDetail } from './player-preload.js';
|
|
5
|
+
import { HeadingLevel } from './section-player-view-state.js';
|
|
6
|
+
export type SectionPlayerPaneKind = "items" | "passages";
|
|
7
|
+
/** Where the items pane's element pre-warm stands. */
|
|
8
|
+
export type SectionPlayerPaneWarmup = "pending" | "loaded" | "failed";
|
|
9
|
+
export type SectionPlayerPaneReport = {
|
|
10
|
+
warmup: SectionPlayerPaneWarmup;
|
|
11
|
+
/** The renderables signature the report was made for. */
|
|
12
|
+
renderablesSignature: string;
|
|
13
|
+
};
|
|
14
|
+
export type SectionPlayerLayoutContext = {
|
|
15
|
+
/** The layout element's tag, which labels the items pane's preload reports. */
|
|
16
|
+
componentTag: string;
|
|
17
|
+
items: SectionCompositionModel["items"];
|
|
18
|
+
passages: SectionCompositionModel["passages"];
|
|
19
|
+
compositionModel: SectionCompositionModel;
|
|
20
|
+
preloadedRenderables: ItemEntity[];
|
|
21
|
+
preloadedRenderablesSignature: string;
|
|
22
|
+
preloadEnabled: boolean;
|
|
23
|
+
resolvedPlayerEnv: Record<string, unknown>;
|
|
24
|
+
resolvedPlayerAttributes: Record<string, string>;
|
|
25
|
+
resolvedPlayerProps: Record<string, unknown>;
|
|
26
|
+
playerStrategy: string;
|
|
27
|
+
baseHeadingLevel: HeadingLevel;
|
|
28
|
+
iifeBundleHost: string | null;
|
|
29
|
+
toolRegistry: ToolRegistry;
|
|
30
|
+
itemToolbarTools: string;
|
|
31
|
+
passageToolbarTools: string;
|
|
32
|
+
itemHostButtons: ToolbarItem[];
|
|
33
|
+
passageHostButtons: ToolbarItem[];
|
|
34
|
+
/**
|
|
35
|
+
* Whether the items pane's element pre-warm has resolved for the current
|
|
36
|
+
* composition; the passages pane shows its loading card until it has.
|
|
37
|
+
*/
|
|
38
|
+
elementsLoaded: boolean;
|
|
39
|
+
/** The pane of each kind that renders. */
|
|
40
|
+
activePanes: Readonly<Record<SectionPlayerPaneKind, Element | null>>;
|
|
41
|
+
/** Returns the unregister. */
|
|
42
|
+
registerPane: (kind: SectionPlayerPaneKind, pane: Element) => () => void;
|
|
43
|
+
/** Reports from any pane but the active items pane are ignored. */
|
|
44
|
+
reportWarmup: (pane: Element, report: SectionPlayerPaneReport) => void;
|
|
45
|
+
reportPreloadRetry: (pane: Element, detail: ElementPreloadRetryDetail) => void;
|
|
46
|
+
reportPreloadError: (pane: Element, detail: ElementPreloadErrorDetail) => void;
|
|
47
|
+
};
|
|
48
|
+
export declare const sectionPlayerLayoutContext: {
|
|
49
|
+
__context__: SectionPlayerLayoutContext;
|
|
50
|
+
};
|
|
51
|
+
export declare function connectSectionPlayerLayoutContext(host: HTMLElement, onValue: (value: SectionPlayerLayoutContext) => void): () => void;
|
|
52
|
+
/**
|
|
53
|
+
* A pane that subscribes before this provider connects is answered through the
|
|
54
|
+
* document's context root, which replays its request when the provider
|
|
55
|
+
* announces itself.
|
|
56
|
+
*/
|
|
57
|
+
export declare function createSectionPlayerLayoutContextProvider(host: HTMLElement, initialValue: SectionPlayerLayoutContext): {
|
|
58
|
+
setValue: (value: SectionPlayerLayoutContext) => void;
|
|
59
|
+
disconnect: () => void;
|
|
60
|
+
};
|
|
61
|
+
export type SectionPlayerPaneRegistry = {
|
|
62
|
+
register: (kind: SectionPlayerPaneKind, pane: Element) => () => void;
|
|
63
|
+
active: () => Record<SectionPlayerPaneKind, Element | null>;
|
|
64
|
+
dispose: () => void;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The panes registered with one section player, in registration order.
|
|
68
|
+
*
|
|
69
|
+
* `onChange` receives the active pane of each kind after every change. A second
|
|
70
|
+
* pane of a kind still registered a task later is a layout that renders the
|
|
71
|
+
* kind twice, reported once per registry through `warn`; the deferral lets a
|
|
72
|
+
* layout replace a pane without being reported.
|
|
73
|
+
*/
|
|
74
|
+
export declare function createSectionPlayerPaneRegistry(options: {
|
|
75
|
+
onChange: (active: Record<SectionPlayerPaneKind, Element | null>) => void;
|
|
76
|
+
warn?: (message: string) => void;
|
|
77
|
+
}): SectionPlayerPaneRegistry;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether an event that reached a layout host belongs to that section player.
|
|
3
|
+
*
|
|
4
|
+
* The runtime engine dispatches its events on the host. The toolkit's
|
|
5
|
+
* `framework-error` bubbles out of the player's own `<pie-section-player-base>`,
|
|
6
|
+
* the first one in the host's render root: its light DOM, or the shadow root
|
|
7
|
+
* of a host that has one, where the event arrives retargeted to the host. An
|
|
8
|
+
* event from a player nested in an item reaches the host with another target.
|
|
9
|
+
*/
|
|
10
|
+
export declare function isOwnSectionPlayerEvent(event: Event, host: Element): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LoadingCompleteHandler, StageChangeHandler } from '@pie-players/pie-assessment-toolkit/runtime/
|
|
1
|
+
import { LoadingCompleteHandler, StageChangeHandler } from '@pie-players/pie-assessment-toolkit/runtime/engine';
|
|
2
2
|
export type RuntimeCallbackBridgeChannel = "onStageChange" | "onLoadingComplete";
|
|
3
3
|
export interface RuntimeCallbackBridgeOptions {
|
|
4
4
|
/** Layout CE host element the engine dispatches DOM events on. */
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The three shells — vertical, tabbed, split-pane — differ in how they arrange
|
|
5
5
|
* panes and in nothing else at this level: each clamps the same host-configurable
|
|
6
|
-
* pixel values
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* pixel values and watches the same narrow-layout media query. That was copied
|
|
7
|
+
* three times, so a changed clamp bound reached whichever shells someone
|
|
8
|
+
* remembered.
|
|
9
9
|
*
|
|
10
10
|
* What cannot be shared, and is not this module's failure: the `props` map inside
|
|
11
11
|
* `<svelte:options customElement={{…}}>`. The Svelte compiler rejects anything but
|
|
@@ -35,14 +35,6 @@ export declare function resolveContentMaxWidths(contentMaxWidthNoPassage: unknow
|
|
|
35
35
|
noPassagePx: number | undefined;
|
|
36
36
|
withPassagePx: number | undefined;
|
|
37
37
|
};
|
|
38
|
-
/**
|
|
39
|
-
* The custom element hosting this shell, reached from the shell's anchor node.
|
|
40
|
-
*
|
|
41
|
-
* Through `getRootNode` so it works whether the shell renders into a shadow root
|
|
42
|
-
* or into light DOM, which these shells do (`shadow: "none"`, so item-player and
|
|
43
|
-
* runtime styles can cascade into rendered item content).
|
|
44
|
-
*/
|
|
45
|
-
export declare function getShellHostElement(anchor: HTMLElement | null): HTMLElement | null;
|
|
46
38
|
/**
|
|
47
39
|
* Track whether the viewport is below the shell's narrow-layout breakpoint.
|
|
48
40
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ItemEntity } from '@pie-players/pie-players-shared/types';
|
|
1
|
+
import { ItemEntity, ItemSettings } from '@pie-players/pie-players-shared/types';
|
|
2
2
|
import { FormativeItemView } from '@pie-players/pie-players-shared/formative';
|
|
3
3
|
import { SectionCompositionModel } from '../../controllers/types.js';
|
|
4
4
|
import { PlayerElementParams } from './player-action.js';
|
|
@@ -101,3 +101,8 @@ export declare function getCanonicalItemId(args: {
|
|
|
101
101
|
compositionModel: SectionCompositionModel;
|
|
102
102
|
item: ItemEntity;
|
|
103
103
|
}): string;
|
|
104
|
+
/** The policy settings the item's card registers through its item scope. */
|
|
105
|
+
export declare function getItemSettings(args: {
|
|
106
|
+
compositionModel: SectionCompositionModel;
|
|
107
|
+
item: ItemEntity;
|
|
108
|
+
}): ItemSettings | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The section controller lookups behind `waitForSectionController`.
|
|
3
|
+
*
|
|
4
|
+
* The toolkit emits `toolkit-ready` each time it initializes a section, once
|
|
5
|
+
* that section's controller has resolved: the first section, each switch and
|
|
6
|
+
* each update to the current one. The event bubbles, composed, through every
|
|
7
|
+
* element around it.
|
|
8
|
+
* A wait listens for it on `target` and looks the controller up again each time
|
|
9
|
+
* it arrives, then once more at the timeout.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Resolves with the first controller `lookup` returns after a `toolkit-ready`
|
|
13
|
+
* reaches `target`, or with what it returns at `timeoutMs`. A `timeoutMs` that
|
|
14
|
+
* is not finite, or too long for a timer, waits for the event alone.
|
|
15
|
+
*/
|
|
16
|
+
export declare function waitForToolkitReady<Controller>(target: EventTarget | null, lookup: (event?: Event) => Controller | null, timeoutMs: number): Promise<Controller | null>;
|
|
@@ -10,13 +10,6 @@ import { SectionPlayerCardTitleFormatter } from './card-title-formatters.js';
|
|
|
10
10
|
* Today the contract has a single member (`cardTitleFormatter`). The shape is
|
|
11
11
|
* intentionally a struct, not a single callback prop, so future host-supplied
|
|
12
12
|
* formatters / decorators can be added without renaming the surface.
|
|
13
|
-
*
|
|
14
|
-
* The naming/expansion of this contract is part of the
|
|
15
|
-
* "Coherent Options Surface" review; the broader expansion (additional hook
|
|
16
|
-
* fields produced as the section host runtime engine consolidates) is owned
|
|
17
|
-
* by the M7 follow-up plan in `coherent_options_surface_review_0133a7cd.plan.md`.
|
|
18
|
-
* Keeping the current name (`SectionPlayerHostHooks`) is deliberate so that
|
|
19
|
-
* additions there do not require a breaking rename across the layout CEs.
|
|
20
13
|
*/
|
|
21
14
|
export type SectionPlayerHostHooks = {
|
|
22
15
|
cardTitleFormatter?: SectionPlayerCardTitleFormatter;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SectionPlayerReadinessChangeDetail } from './public-events.js';
|
|
2
1
|
import { SectionControllerHandle } from '@pie-players/pie-assessment-toolkit';
|
|
3
2
|
export type SectionPlayerNavigationSnapshot = {
|
|
4
3
|
currentIndex: number;
|
|
@@ -8,7 +7,6 @@ export type SectionPlayerNavigationSnapshot = {
|
|
|
8
7
|
currentItemId?: string;
|
|
9
8
|
};
|
|
10
9
|
export type SectionPlayerSnapshot = {
|
|
11
|
-
readiness: SectionPlayerReadinessChangeDetail;
|
|
12
10
|
composition: {
|
|
13
11
|
itemsCount: number;
|
|
14
12
|
passagesCount: number;
|
|
@@ -17,9 +15,6 @@ export type SectionPlayerSnapshot = {
|
|
|
17
15
|
};
|
|
18
16
|
export interface SectionPlayerRuntimeHostContract {
|
|
19
17
|
getSnapshot(): SectionPlayerSnapshot;
|
|
20
|
-
selectComposition(): SectionPlayerSnapshot["composition"];
|
|
21
|
-
selectNavigation(): SectionPlayerNavigationSnapshot;
|
|
22
|
-
selectReadiness(): SectionPlayerReadinessChangeDetail;
|
|
23
18
|
navigateTo(index: number): boolean;
|
|
24
19
|
navigateNext(): boolean;
|
|
25
20
|
navigatePrevious(): boolean;
|
|
@@ -14,6 +14,7 @@ export declare class SectionController implements SectionControllerHandle {
|
|
|
14
14
|
private readonly listeners;
|
|
15
15
|
private readonly trackedRenderables;
|
|
16
16
|
private readonly loadedRenderableKeys;
|
|
17
|
+
private readonly heldContentLoads;
|
|
17
18
|
private readonly itemCompletionByCanonicalId;
|
|
18
19
|
private readonly elementCompletionByCanonicalId;
|
|
19
20
|
private readonly reportedCompletionIds;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TestAttemptSession } from '@pie-players/pie-assessment-toolkit';
|
|
2
2
|
import { ItemSessionUpdateIntent, SessionCommitReason, AssessmentItemRef, AssessmentSection, ItemEntity, PassageEntity, RubricBlock } from '@pie-players/pie-players-shared';
|
|
3
|
-
import { ConfigContainerEntity } from '@pie-players/pie-players-shared/types';
|
|
3
|
+
import { ConfigContainerEntity, ItemSettings } 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';
|
|
6
6
|
export type SectionView = "candidate" | "scorer" | "author" | "proctor" | "testConstructor" | "tutor";
|
|
@@ -23,6 +23,8 @@ export interface SectionContentModel {
|
|
|
23
23
|
* that identifier, and two implementations of one mapping.
|
|
24
24
|
*/
|
|
25
25
|
formative?: FormativeItemPolicy;
|
|
26
|
+
/** The item ref's policy settings, carried for the same reason. */
|
|
27
|
+
settings?: ItemSettings;
|
|
26
28
|
}>;
|
|
27
29
|
/**
|
|
28
30
|
* How an authored `timedMedia.stimulusRef` resolves to a renderable.
|
|
@@ -119,6 +121,11 @@ export interface SectionCanonicalItemViewModel {
|
|
|
119
121
|
index: number;
|
|
120
122
|
isCurrent: boolean;
|
|
121
123
|
session: unknown;
|
|
124
|
+
/**
|
|
125
|
+
* The item ref's policy settings, which the item's scope registers; they
|
|
126
|
+
* govern the item's own toolbar.
|
|
127
|
+
*/
|
|
128
|
+
settings?: ItemSettings;
|
|
122
129
|
}
|
|
123
130
|
export interface SectionAttemptSessionSliceLoadedRenderable {
|
|
124
131
|
itemId: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AssessmentSection, ItemConfig, SectionControllerSessionState } from '@pie-players/pie-players-shared/types';
|
|
2
|
+
export interface ItemSectionOptions {
|
|
3
|
+
/** Defaults to the item config's id. */
|
|
4
|
+
sectionId?: string;
|
|
5
|
+
itemVId?: string;
|
|
6
|
+
/** The item's session, in the shape `<pie-item-player session>` takes. */
|
|
7
|
+
session?: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface ItemSection {
|
|
10
|
+
section: AssessmentSection;
|
|
11
|
+
session: SectionControllerSessionState | null;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Build the `section` and `session` a section player layout takes from one item
|
|
15
|
+
* config and, optionally, its session.
|
|
16
|
+
*
|
|
17
|
+
* The item ref's `identifier` and the item's `id` are the config's `id`, so
|
|
18
|
+
* every `itemId` the section reports is the id the host already holds. The item
|
|
19
|
+
* and its passage carry no `baseId` or `version`. The host sets `section-id` to
|
|
20
|
+
* `section.identifier`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function sectionFromItem(config: ItemConfig, options?: ItemSectionOptions): ItemSection;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
function d(e) {
|
|
2
|
+
return !!e.pie;
|
|
3
|
+
}
|
|
4
|
+
function r(e) {
|
|
5
|
+
const s = { ...e.pie };
|
|
6
|
+
e.instructorResources !== void 0 && s.instructorResources === void 0 && (s.instructorResources = e.instructorResources), e.defaultExtraModels !== void 0 && s.defaultExtraModels === void 0 && (s.defaultExtraModels = e.defaultExtraModels);
|
|
7
|
+
const t = {
|
|
8
|
+
id: e.id,
|
|
9
|
+
config: s
|
|
10
|
+
};
|
|
11
|
+
return e.passage && (t.passage = {
|
|
12
|
+
id: e.passage.id,
|
|
13
|
+
config: e.passage
|
|
14
|
+
}), t;
|
|
15
|
+
}
|
|
16
|
+
function n(e, s = {}) {
|
|
17
|
+
const t = d(e) ? r(e) : {
|
|
18
|
+
id: e.id,
|
|
19
|
+
config: e
|
|
20
|
+
}, i = {
|
|
21
|
+
identifier: e.id,
|
|
22
|
+
item: t
|
|
23
|
+
};
|
|
24
|
+
return s.itemVId !== void 0 && (i.itemVId = s.itemVId), {
|
|
25
|
+
section: {
|
|
26
|
+
identifier: s.sectionId ?? e.id,
|
|
27
|
+
assessmentItemRefs: [i]
|
|
28
|
+
},
|
|
29
|
+
session: s.session == null ? null : {
|
|
30
|
+
currentItemIndex: 0,
|
|
31
|
+
itemSessions: { [e.id]: s.session }
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
n as sectionFromItem
|
|
37
|
+
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
export type { SectionPlayerLayoutContract, SectionPlayerLayoutName, SectionPlayerLayoutCapability, SectionPlayerBasicPropName, SectionPlayerAdvancedPropName, SectionPlayerLayoutPropName, SectionPlayerLayoutCommandName, } from './contracts/layout-contract.js';
|
|
2
|
-
export type { SectionPlayerPublicEventName, SectionPlayerReadinessPhase, SectionPlayerReadinessChangeDetail, } from './contracts/public-events.js';
|
|
3
|
-
export { SECTION_PLAYER_PUBLIC_EVENTS } from './contracts/public-events.js';
|
|
4
1
|
export type { SectionPlayerRuntimeHostContract, SectionPlayerNavigationSnapshot, SectionPlayerSnapshot, } from './contracts/runtime-host-contract.js';
|
|
5
|
-
export {
|
|
6
|
-
export
|
|
7
|
-
export {
|
|
2
|
+
export type { SectionPlayerPolicies, SectionPlayerReadinessPolicy, SectionPlayerPreloadPolicy, SectionPlayerTelemetryPolicy, } from './policies/types.js';
|
|
3
|
+
export { DEFAULT_SECTION_PLAYER_POLICIES } from './policies/index.js';
|
|
4
|
+
export { sectionFromItem } from './item-section/index.js';
|
|
5
|
+
export type { ItemSection, ItemSectionOptions } from './item-section/index.js';
|
|
8
6
|
export type { SectionPlayerCardTitleContext, SectionPlayerCardTitleFormatter, SectionPlayerItemTitleContext, SectionPlayerPassageTitleContext, } from './contracts/card-title-formatters.js';
|
|
9
7
|
export type { SectionPlayerHostHooks } from './contracts/host-hooks.js';
|
|
10
8
|
export type { SectionPlayerBackendResolver, SectionPlayerBackendResolverContext, SectionPlayerRuntimeConfig, SectionPlayerRuntimePlayerConfig, } from './components/shared/section-player-backend-delivery.js';
|