@pie-players/pie-section-player 0.3.44 → 0.3.45
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 +11 -23
- package/dist/chunks/dist-24a90544.js +198 -173
- package/dist/chunks/{dist-DIBQdekL-ec6db34a.js → dist-DfQrc9XY-6d8e61c6.js} +175 -150
- package/dist/chunks/{dist-rF11IR1B-adc4857f.js → dist-Dns3leWh-4f7af4d3.js} +1 -1
- package/dist/chunks/dist-c4148994.js +1 -1
- package/dist/chunks/sre-0162a7a9.js +17534 -0
- package/dist/chunks/sre-CXN7ed6H-7db47d5d.js +17532 -0
- package/dist/chunks/tool-annotation-toolbar-db5bfbec.js +5303 -2118
- package/dist/components/shared/section-player-host-runtime.d.ts +2 -11
- package/dist/contracts/layout-contract.d.ts +2 -2
- package/dist/contracts/public-events.d.ts +8 -15
- package/dist/pie-section-player.js +39383 -16732
- package/package.json +10 -10
- /package/dist/chunks/{defineProperty-aab5a8e0.js → defineProperty-8fd4b6d7.js} +0 -0
- /package/dist/chunks/{defineProperty-CyepwRr5-3800a70a.js → defineProperty-Dt7ri80W-76aeaed7.js} +0 -0
|
@@ -6,10 +6,7 @@ import { ItemEntity } from '@pie-players/pie-players-shared';
|
|
|
6
6
|
* because of the `DEFAULT_PLAYER_DEFINITIONS` dependency, which
|
|
7
7
|
* side-effect-imports `@pie-players/pie-item-player`.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
* `section-player-runtime.ts`; behavior is byte-for-byte identical
|
|
11
|
-
* (the existing `tests/section-player-runtime.test.ts` test suite
|
|
12
|
-
* pins this module's export at PR 7).
|
|
9
|
+
* Pinned by `tests/section-player-runtime.test.ts`.
|
|
13
10
|
*/
|
|
14
11
|
export declare function resolvePlayerRuntime(args: {
|
|
15
12
|
effectiveRuntime: Record<string, unknown>;
|
|
@@ -43,13 +40,7 @@ export declare function mapRenderablesToItems(renderables: unknown[]): ItemEntit
|
|
|
43
40
|
* local `resolvePlayerRuntime` so the toolkit core never imports
|
|
44
41
|
* `DEFAULT_PLAYER_DEFINITIONS`.
|
|
45
42
|
*
|
|
46
|
-
*
|
|
47
|
-
* `resolveSectionPlayerRuntimeState` from `section-player-runtime.ts`;
|
|
48
|
-
* post-PR-7 the legacy file is deleted and this wrapper is the only
|
|
49
|
-
* orchestrator entry point.
|
|
50
|
-
*
|
|
51
|
-
* Behavior is byte-for-byte identical to the pre-PR-7 implementation
|
|
52
|
-
* (pinned by `tests/section-player-runtime.test.ts`).
|
|
43
|
+
* Pinned by `tests/section-player-runtime.test.ts`.
|
|
53
44
|
*/
|
|
54
45
|
export declare function resolveSectionPlayerRuntimeState(args: RuntimeInputs): {
|
|
55
46
|
effectiveToolsConfig: unknown;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SectionPlayerPublicEventName } from './public-events.js';
|
|
2
2
|
export type SectionPlayerLayoutName = "splitpane" | "vertical" | "tabbed";
|
|
3
3
|
export type SectionPlayerLayoutCapability = "items-pane" | "passages-pane" | "section-toolbar" | "item-toolbar" | "passage-toolbar" | "readiness-events" | "navigation-events";
|
|
4
|
-
export type SectionPlayerBasicPropName = "assessmentId" | "section" | "sectionId" | "attemptId" | "debug" | "showToolbar" | "toolbarPosition" | "narrowLayoutBreakpoint" | "contentMaxWidthNoPassage" | "contentMaxWidthWithPassage" | "splitPaneMinRegionWidth" | "splitPaneInitialPassageWidth" | "splitPaneCollapseStrategy"
|
|
5
|
-
export type SectionPlayerAdvancedPropName = "runtime" | "
|
|
4
|
+
export type SectionPlayerBasicPropName = "assessmentId" | "section" | "sectionId" | "attemptId" | "debug" | "showToolbar" | "toolbarPosition" | "narrowLayoutBreakpoint" | "contentMaxWidthNoPassage" | "contentMaxWidthWithPassage" | "splitPaneMinRegionWidth" | "splitPaneInitialPassageWidth" | "splitPaneCollapseStrategy";
|
|
5
|
+
export type SectionPlayerAdvancedPropName = "runtime" | "iifeBundleHost" | "toolRegistry" | "sectionHostButtons" | "itemHostButtons" | "passageHostButtons" | "policies" | "toolConfigStrictness" | "hooks" | "onFrameworkError" | "onStageChange" | "onLoadingComplete";
|
|
6
6
|
export type SectionPlayerLayoutPropName = SectionPlayerBasicPropName | SectionPlayerAdvancedPropName;
|
|
7
7
|
export type SectionPlayerLayoutCommandName = "getSnapshot" | "selectComposition" | "selectNavigation" | "selectReadiness" | "navigateTo" | "navigateNext" | "navigatePrevious" | "getSectionController" | "waitForSectionController";
|
|
8
8
|
export type SectionPlayerLayoutContract = {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* session forwarding stays in section-player because the shape is
|
|
21
21
|
* section-player-specific and the engine has no opinion on it.
|
|
22
22
|
*
|
|
23
|
-
* **`framework-error` single-emit on the layout host
|
|
23
|
+
* **`framework-error` single-emit on the layout host.**
|
|
24
24
|
* `<pie-assessment-toolkit>` nested inside a layout CE still
|
|
25
25
|
* dispatches its own `framework-error` (with `bubbles: true,
|
|
26
26
|
* composed: true`) so direct toolkit consumers keep working. The
|
|
@@ -30,13 +30,9 @@
|
|
|
30
30
|
* layout host as the single canonical DOM surface for
|
|
31
31
|
* section-player consumers. The single-emit contract is pinned by
|
|
32
32
|
* `tests/section-player-framework-error-dual-emit.test.ts`. The
|
|
33
|
-
*
|
|
34
|
-
* compat sweep.
|
|
33
|
+
* layout host does not receive duplicate framework-error events.
|
|
35
34
|
*
|
|
36
|
-
*
|
|
37
|
-
* deprecated readiness aliases (`readiness-change`,
|
|
38
|
-
* `interaction-ready`, `ready`) and their `legacy-event-bridge.ts`
|
|
39
|
-
* are gone. Hosts that previously listened for them migrate to:
|
|
35
|
+
* Lifecycle should be consumed through canonical events:
|
|
40
36
|
* - `readiness-change` → `pie-stage-change` (the readiness phase
|
|
41
37
|
* is also reachable via `selectReadiness()` /
|
|
42
38
|
* `getSnapshot().readiness`).
|
|
@@ -44,10 +40,9 @@
|
|
|
44
40
|
* `detail.stage === "interactive"`.
|
|
45
41
|
* - `ready` → `pie-loading-complete`.
|
|
46
42
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* on the layout CE, or filter `pie-stage-change` for
|
|
43
|
+
* Controller readiness is available through
|
|
44
|
+
* `waitForSectionController(timeoutMs)` / `getSectionController()` on the
|
|
45
|
+
* layout CE, or by filtering `pie-stage-change` for
|
|
51
46
|
* `detail.stage === "engine-ready"`.
|
|
52
47
|
*
|
|
53
48
|
* Source of truth for the names: `players-shared/src/pie/stages.ts`
|
|
@@ -86,10 +81,8 @@ export declare const SECTION_PLAYER_PUBLIC_EVENTS: {
|
|
|
86
81
|
export type SectionPlayerPublicEventName = (typeof SECTION_PLAYER_PUBLIC_EVENTS)[keyof typeof SECTION_PLAYER_PUBLIC_EVENTS];
|
|
87
82
|
/**
|
|
88
83
|
* Readiness phase reported by the engine's readiness derivation. The
|
|
89
|
-
* type
|
|
90
|
-
*
|
|
91
|
-
* kernel's `selectReadiness()` selector — the *event name* is gone,
|
|
92
|
-
* but the readiness payload itself is still the canonical shape.
|
|
84
|
+
* type preserves the readiness payload shape used by
|
|
85
|
+
* `selectReadiness()`.
|
|
93
86
|
*/
|
|
94
87
|
export type SectionPlayerReadinessPhase = "bootstrapping" | "interaction-ready" | "loading" | "ready" | "error";
|
|
95
88
|
export type SectionPlayerReadinessChangeDetail = {
|