@pie-players/pie-section-player 0.3.3 → 0.3.4

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.
Files changed (64) hide show
  1. package/README.md +122 -5
  2. package/dist/components/section-player-item-card-element.d.ts +2 -0
  3. package/dist/components/section-player-item-card-element.d.ts.map +1 -0
  4. package/dist/components/section-player-items-pane-element.d.ts +2 -0
  5. package/dist/components/section-player-items-pane-element.d.ts.map +1 -0
  6. package/dist/components/section-player-kernel-host-element.d.ts +2 -0
  7. package/dist/components/section-player-kernel-host-element.d.ts.map +1 -0
  8. package/dist/components/section-player-passage-card-element.d.ts +2 -0
  9. package/dist/components/section-player-passage-card-element.d.ts.map +1 -0
  10. package/dist/components/section-player-passages-pane-element.d.ts +2 -0
  11. package/dist/components/section-player-passages-pane-element.d.ts.map +1 -0
  12. package/dist/components/section-player-shell-element.d.ts +2 -0
  13. package/dist/components/section-player-shell-element.d.ts.map +1 -0
  14. package/dist/components/shared/outer-scrollbars.d.ts +6 -0
  15. package/dist/components/shared/outer-scrollbars.d.ts.map +1 -0
  16. package/dist/components/shared/player-action.d.ts +1 -0
  17. package/dist/components/shared/player-action.d.ts.map +1 -1
  18. package/dist/components/shared/player-preload.d.ts +5 -0
  19. package/dist/components/shared/player-preload.d.ts.map +1 -1
  20. package/dist/components/shared/section-player-card-context.d.ts +15 -0
  21. package/dist/components/shared/section-player-card-context.d.ts.map +1 -0
  22. package/dist/components/shared/section-player-props.d.ts +2 -0
  23. package/dist/components/shared/section-player-props.d.ts.map +1 -0
  24. package/dist/components/shared/section-player-readiness.d.ts +14 -0
  25. package/dist/components/shared/section-player-readiness.d.ts.map +1 -0
  26. package/dist/components/shared/section-player-runtime.d.ts +4 -4
  27. package/dist/components/shared/section-player-runtime.d.ts.map +1 -1
  28. package/dist/components/shared/section-player-view-state.d.ts +9 -0
  29. package/dist/components/shared/section-player-view-state.d.ts.map +1 -1
  30. package/dist/contracts/layout-contract.d.ts +18 -0
  31. package/dist/contracts/layout-contract.d.ts.map +1 -0
  32. package/dist/contracts/layout-parity-metadata.d.ts +4 -0
  33. package/dist/contracts/layout-parity-metadata.d.ts.map +1 -0
  34. package/dist/contracts/public-events.d.ts +25 -0
  35. package/dist/contracts/public-events.d.ts.map +1 -0
  36. package/dist/contracts/runtime-host-contract.d.ts +29 -0
  37. package/dist/contracts/runtime-host-contract.d.ts.map +1 -0
  38. package/dist/controllers/SectionController.d.ts +2 -0
  39. package/dist/controllers/SectionController.d.ts.map +1 -1
  40. package/dist/controllers/types.d.ts +21 -12
  41. package/dist/controllers/types.d.ts.map +1 -1
  42. package/dist/index-CGEKDUBQ-C-8EFMUk.js +216 -0
  43. package/dist/index-DF-Dk87f-lxErM8bo.js +178 -0
  44. package/dist/pie-section-player.d.ts +7 -0
  45. package/dist/pie-section-player.d.ts.map +1 -1
  46. package/dist/pie-section-player.js +8074 -7421
  47. package/dist/{player-preload-9v0AQsMd.js → player-preload-Dj2ELq_u.js} +2179 -2121
  48. package/dist/policies/guards.d.ts +3 -0
  49. package/dist/policies/guards.d.ts.map +1 -0
  50. package/dist/policies/index.d.ts +3 -0
  51. package/dist/policies/index.d.ts.map +1 -0
  52. package/dist/policies/types.d.ts +23 -0
  53. package/dist/policies/types.d.ts.map +1 -0
  54. package/dist/tool-annotation-toolbar-DJvpXk1K.js +4917 -0
  55. package/dist/utils/player-preload.js +1 -1
  56. package/package.json +54 -13
  57. package/dist/tool-annotation-toolbar-m4Mv2j0H.js +0 -4305
  58. package/src/components/ItemShellElement.svelte +0 -302
  59. package/src/components/PassageShellElement.svelte +0 -217
  60. package/src/components/PieSectionPlayerBaseElement.svelte +0 -245
  61. package/src/components/PieSectionPlayerSplitPaneElement.svelte +0 -675
  62. package/src/components/PieSectionPlayerVerticalElement.svelte +0 -439
  63. package/src/components/shared/SectionItemCard.svelte +0 -92
  64. package/src/components/shared/SectionPassageCard.svelte +0 -88
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # @pie-players/pie-section-player
2
2
 
3
- Section rendering package focused on the splitpane custom element:
3
+ Section rendering package with layout custom elements:
4
4
 
5
5
  - `pie-section-player-splitpane`
6
+ - `pie-section-player-vertical`
6
7
 
7
8
  The package no longer exposes the legacy `pie-section-player` layout orchestration API.
8
9
 
@@ -18,6 +19,9 @@ Import the custom-element registration entrypoint in consumers:
18
19
 
19
20
  ```ts
20
21
  import '@pie-players/pie-section-player/components/section-player-splitpane-element';
22
+ import '@pie-players/pie-section-player/components/section-player-vertical-element';
23
+ import '@pie-players/pie-section-player/components/section-player-item-card-element';
24
+ import '@pie-players/pie-section-player/components/section-player-passage-card-element';
21
25
  ```
22
26
 
23
27
  Render in HTML/Svelte/JSX:
@@ -30,22 +34,135 @@ Set complex values (`runtime`, `section`, `env`) as JS properties.
30
34
 
31
35
  ## Runtime Inputs
32
36
 
33
- `pie-section-player-splitpane` supports:
37
+ Both layout elements support:
34
38
 
35
- - `runtime` (object): coordinator/tools/player runtime bundle
39
+ - `runtime` (object): primary coordinator/tools/player runtime bundle
36
40
  - `section` (object): assessment section payload
37
- - `env` (object): `{ mode, role }`
41
+ - `env` (object): optional top-level override for `{ mode, role }`
38
42
  - `toolbar-position` (string): `top|right|bottom|left|none`
39
- - `show-toolbar` (boolean)
43
+ - `show-toolbar` (boolean-like): accepts `true/false` and common string forms (`"true"`, `"false"`, `"1"`, `"0"`, `"yes"`, `"no"`)
44
+
45
+ ### API direction: CE defaults first, JS customization for advanced cases
46
+
47
+ The intended usage model is:
48
+
49
+ - **CE props for default/standard flows (roughly 90% use cases)**:
50
+ - `assessment-id`, `section`, `section-id`, `attempt-id`
51
+ - `show-toolbar`, `toolbar-position`, `enabled-tools`, `item-toolbar-tools`, `passage-toolbar-tools`
52
+ - **JS API for advanced customization**:
53
+ - Get the controller handle via `getSectionController()` or `waitForSectionController()`
54
+ - Listen to `section-controller-ready`
55
+ - Apply custom policy/gating in host code (for example, domain-specific `canNext` based on controller events like `section-items-complete-changed`)
56
+ - Compose forward/backward eligibility in host code using `selectNavigation()` + host state; there is intentionally no separate parallel CE gating API for this
57
+
58
+ Advanced CE props are still supported as escape hatches (`runtime`, `coordinator`, `createSectionController`, etc.), but hosts should prefer JS/controller composition for non-standard behavior.
59
+
60
+ ### Navigation signals
61
+
62
+ - `item-selected`: item-level navigation change within the current section in the `SectionController` broadcast stream (`itemIndex`, `currentItemId`, `totalItems`).
63
+ - `section-navigation-change`: section-level navigation/selection change in the `SectionController` broadcast stream (`previousSectionId`, `currentSectionId`, `reason`).
64
+
65
+ Runtime precedence is explicit:
66
+
67
+ - `runtime` values are primary for runtime fields (`assessmentId`, `playerType`, `player`, `lazyInit`, `tools`, `accessibility`, `coordinator`, `createSectionController`, `isolation`, `env`).
68
+ - Top-level runtime-like props are treated as compatibility/override inputs when a corresponding `runtime` field is absent.
69
+ - Toolbar placement overrides (`enabled-tools`, `item-toolbar-tools`, `passage-toolbar-tools`) are normalized on top of the runtime tools config.
40
70
 
41
71
  See `apps/section-demos/src/routes/demo/[[id]]/+page.svelte` for an end-to-end host integration.
42
72
 
73
+ ## Data flow and stability guarantees
74
+
75
+ Section-player follows a unidirectional flow model:
76
+
77
+ - Inputs flow downward (`runtime`, `section`, `env`, toolbar options) into base/toolkit/layout/card render paths.
78
+ - State updates flow upward as events (`runtime-*`, `session-changed`, controller change events) and are reconciled by runtime owners.
79
+ - Layout/card components should not create competing sources of truth for composition/session.
80
+
81
+ ### Stability guarantees
82
+
83
+ For non-structural updates, section-player guarantees behavior stability:
84
+
85
+ - Item/passage shell identity remains stable (no remount churn for response-only updates).
86
+ - Pane-local scroll position remains stable in splitpane and vertical layouts.
87
+
88
+ Non-structural updates include:
89
+
90
+ - response/session updates
91
+ - tool toggles/config updates
92
+ - runtime config changes that do not alter composition identity
93
+
94
+ Structural composition changes (new/removed/reordered entities) may legitimately re-render/remount affected nodes.
95
+
96
+ ## Custom layout authoring
97
+
98
+ For section layout authors, `pie-section-player-shell` is the primary abstraction:
99
+
100
+ - Use `pie-section-player-shell` to place the section toolbar around your layout body.
101
+ - Keep your custom layout logic focused on passages/items and layout UI.
102
+ - Treat `pie-section-player-base` as internal runtime plumbing that wraps the shell.
103
+ - Use `pie-section-player-item-card` and `pie-section-player-passage-card` as reusable card primitives.
104
+ - Prefer shared context for cross-cutting card render plumbing (resolved player tag/action) over repeated prop drilling.
105
+
106
+ Minimal pattern for package layout components:
107
+
108
+ ```svelte
109
+ <pie-section-player-base runtime={effectiveRuntime} {section} section-id={sectionId} attempt-id={attemptId}>
110
+ <pie-section-player-shell
111
+ show-toolbar={showToolbar}
112
+ toolbar-position={toolbarPosition}
113
+ enabled-tools={enabledTools}
114
+ >
115
+ <!-- layout-specific body -->
116
+ <pie-section-player-passage-card
117
+ passage={passage}
118
+ playerParams={passagePlayerParams}
119
+ passageToolbarTools={passageToolbarTools}
120
+ ></pie-section-player-passage-card>
121
+ <pie-section-player-item-card
122
+ item={item}
123
+ canonicalItemId={canonicalItemId}
124
+ playerParams={itemPlayerParams}
125
+ itemToolbarTools={itemToolbarTools}
126
+ ></pie-section-player-item-card>
127
+ </pie-section-player-shell>
128
+ </pie-section-player-base>
129
+ ```
130
+
131
+ ### JS API example for advanced host policy
132
+
133
+ ```ts
134
+ const host = document.querySelector("pie-section-player-splitpane") as any;
135
+ const controller = await host.waitForSectionController?.(5000);
136
+ let sectionComplete = false;
137
+
138
+ const unsubscribe = controller?.subscribe?.((event: any) => {
139
+ if (event?.type === "section-items-complete-changed") {
140
+ sectionComplete = event.complete === true;
141
+ }
142
+ });
143
+
144
+ function canAdvance() {
145
+ const nav = host.selectNavigation?.();
146
+ return Boolean(nav?.canNext && sectionComplete);
147
+ }
148
+ ```
149
+
43
150
  ## Exports
44
151
 
45
152
  Published exports are intentionally minimal:
46
153
 
47
154
  - `@pie-players/pie-section-player`
48
155
  - `@pie-players/pie-section-player/components/section-player-splitpane-element`
156
+ - `@pie-players/pie-section-player/components/section-player-vertical-element`
157
+ - `@pie-players/pie-section-player/components/section-player-kernel-host-element`
158
+ - `@pie-players/pie-section-player/components/section-player-shell-element`
159
+ - `@pie-players/pie-section-player/components/section-player-item-card-element`
160
+ - `@pie-players/pie-section-player/components/section-player-passage-card-element`
161
+ - `@pie-players/pie-section-player/contracts/layout-contract`
162
+ - `@pie-players/pie-section-player/contracts/public-events`
163
+ - `@pie-players/pie-section-player/contracts/runtime-host-contract`
164
+ - `@pie-players/pie-section-player/contracts/layout-parity-metadata`
165
+ - `@pie-players/pie-section-player/policies`
49
166
 
50
167
  ## Development
51
168
 
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=section-player-item-card-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-player-item-card-element.d.ts","sourceRoot":"","sources":["../../src/components/section-player-item-card-element.ts"],"names":[],"mappings":"AAAA,OAAO,iCAAiC,CAAC;AAEzC,OAAO,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=section-player-items-pane-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-player-items-pane-element.d.ts","sourceRoot":"","sources":["../../src/components/section-player-items-pane-element.ts"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAE1C,OAAO,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=section-player-kernel-host-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-player-kernel-host-element.d.ts","sourceRoot":"","sources":["../../src/components/section-player-kernel-host-element.ts"],"names":[],"mappings":"AAAA,OAAO,4CAA4C,CAAC;AAEpD,OAAO,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=section-player-passage-card-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-player-passage-card-element.d.ts","sourceRoot":"","sources":["../../src/components/section-player-passage-card-element.ts"],"names":[],"mappings":"AAAA,OAAO,oCAAoC,CAAC;AAE5C,OAAO,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=section-player-passages-pane-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-player-passages-pane-element.d.ts","sourceRoot":"","sources":["../../src/components/section-player-passages-pane-element.ts"],"names":[],"mappings":"AAAA,OAAO,qCAAqC,CAAC;AAE7C,OAAO,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=section-player-shell-element.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-player-shell-element.d.ts","sourceRoot":"","sources":["../../src/components/section-player-shell-element.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAC;AAErC,OAAO,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export declare function manageOuterScrollbars(args?: {
2
+ managedClass?: string;
3
+ activeClass?: string;
4
+ idleTimeoutMs?: number;
5
+ }): () => void;
6
+ //# sourceMappingURL=outer-scrollbars.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outer-scrollbars.d.ts","sourceRoot":"","sources":["../../../src/components/shared/outer-scrollbars.ts"],"names":[],"mappings":"AAAA,wBAAgB,qBAAqB,CAAC,IAAI,CAAC,EAAE;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,IAAI,CAkCb"}
@@ -13,6 +13,7 @@ type PlayerActionOptions = {
13
13
  };
14
14
  export declare function createPlayerAction(options: PlayerActionOptions): (node: HTMLElement, params: PlayerElementParams) => {
15
15
  update(nextParams: PlayerElementParams): void;
16
+ destroy(): void;
16
17
  };
17
18
  export {};
18
19
  //# sourceMappingURL=player-action.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"player-action.d.ts","sourceRoot":"","sources":["../../../src/components/shared/player-action.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,m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C,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACnC,CAAC;AA2BF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,IACtD,MAAM,WAAW,EAAE,QAAQ,mBAAmB;uBAGjC,mBAAmB;;EAQxC"}
@@ -23,6 +23,11 @@ export type PlayerPreloadState = {
23
23
  preloadRunToken: number;
24
24
  elementsLoaded: boolean;
25
25
  };
26
+ export declare function createPlayerPreloadStateSetter(args: {
27
+ setLastPreloadSignature: (value: string) => void;
28
+ setPreloadRunToken: (value: number) => void;
29
+ setElementsLoaded: (value: boolean) => void;
30
+ }): (next: Partial<PlayerPreloadState>) => void;
26
31
  export declare function orchestratePlayerElementPreload(args: {
27
32
  componentTag: string;
28
33
  strategy: string;
@@ -1 +1 @@
1
- {"version":3,"file":"player-preload.d.ts","sourceRoot":"","sources":["../../../src/components/shared/player-preload.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,KAAK,UAAU,EACf,MAAM,iCAAiC,CAAC;AAGzC,eAAO,MAAM,kBAAkB,QAAQ,CAAC;AAExC,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,MAAM,CAmBtE;AAED,wBAAgB,aAAa,CAC5B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC1B,QAAQ,GAAG,UAAU,CAEvB;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,MAAM,CAAC;CAC7B,UAOA;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,UAAU,EAAE,QAAQ,GAAG,UAAU,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,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C;IACnC,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;CACtD,QAsEA"}
@@ -0,0 +1,15 @@
1
+ import { PlayerElementParams } from './player-action.js';
2
+ export type SectionPlayerCardRenderContext = {
3
+ resolvedPlayerTag: string;
4
+ playerAction: (node: HTMLElement, params: PlayerElementParams) => unknown;
5
+ };
6
+ export declare const sectionPlayerCardRenderContext: {
7
+ __context__: SectionPlayerCardRenderContext;
8
+ };
9
+ export declare function getHostElementFromAnchor(anchor: HTMLElement | null): HTMLElement | null;
10
+ export declare function connectSectionPlayerCardRenderContext(host: HTMLElement, onValue: (value: SectionPlayerCardRenderContext) => void): () => void;
11
+ export declare function createSectionPlayerCardRenderContextProvider(host: HTMLElement, initialValue: SectionPlayerCardRenderContext): {
12
+ setValue: (value: SectionPlayerCardRenderContext) => void;
13
+ disconnect: () => void;
14
+ };
15
+ //# sourceMappingURL=section-player-card-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-player-card-context.d.ts","sourceRoot":"","sources":["../../../src/components/shared/section-player-card-context.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,MAAM,MAAM,8BAA8B,GAAG;IAC5C,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,mBAAmB,KAAK,OAAO,CAAC;CAC1E,CAAC;AAEF,eAAO,MAAM,8BAA8B;;CAE1C,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,CAOvF;AA8CD,wBAAgB,qCAAqC,CACpD,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,GACtD,MAAM,IAAI,CAMZ;AAED,wBAAgB,4CAA4C,CAC3D,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,8BAA8B;sBAUzB,8BAA8B;;EAMjD"}
@@ -0,0 +1,2 @@
1
+ export declare function coerceBooleanLike(value: boolean | string | null | undefined, defaultValue?: boolean): boolean;
2
+ //# sourceMappingURL=section-player-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-player-props.d.ts","sourceRoot":"","sources":["../../../src/components/shared/section-player-props.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAChC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,EAC1C,YAAY,UAAQ,GAClB,OAAO,CAkBT"}
@@ -0,0 +1,14 @@
1
+ import { SectionPlayerReadinessChangeDetail, SectionPlayerReadinessPhase } from '../../contracts/public-events.js';
2
+ export type ReadinessSignals = {
3
+ sectionReady: boolean;
4
+ interactionReady: boolean;
5
+ allLoadingComplete: boolean;
6
+ runtimeError: boolean;
7
+ };
8
+ export declare function resolveReadinessPhase(signals: ReadinessSignals): SectionPlayerReadinessPhase;
9
+ export declare function createReadinessDetail(args: {
10
+ mode: "progressive" | "strict";
11
+ signals: ReadinessSignals;
12
+ reason?: string;
13
+ }): SectionPlayerReadinessChangeDetail;
14
+ //# sourceMappingURL=section-player-readiness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-player-readiness.d.ts","sourceRoot":"","sources":["../../../src/components/shared/section-player-readiness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,2BAA2B,EAC3B,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,gBAAgB,GAAG;IAC9B,YAAY,EAAE,OAAO,CAAC;IACtB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,GAAG,2BAA2B,CAM5F;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC3C,IAAI,EAAE,aAAa,GAAG,QAAQ,CAAC;IAC/B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,kCAAkC,CAiBrC"}
@@ -52,8 +52,6 @@ export declare function resolveRuntime(args: {
52
52
  runtime: RuntimeConfig | null;
53
53
  effectiveToolsConfig: unknown;
54
54
  }): {
55
- env: Record<string, unknown>;
56
- tools: unknown;
57
55
  assessmentId: string;
58
56
  playerType: string;
59
57
  player: Record<string, unknown> | null;
@@ -62,6 +60,8 @@ export declare function resolveRuntime(args: {
62
60
  coordinator: unknown;
63
61
  createSectionController: unknown;
64
62
  isolation: string;
63
+ env: Record<string, unknown>;
64
+ tools: unknown;
65
65
  };
66
66
  export declare function resolvePlayerRuntime(args: {
67
67
  effectiveRuntime: Record<string, unknown>;
@@ -80,8 +80,6 @@ export declare function mapRenderablesToItems(renderables: unknown[]): ItemEntit
80
80
  export declare function resolveSectionPlayerRuntimeState(args: RuntimeInputs): {
81
81
  effectiveToolsConfig: import('@pie-players/pie-assessment-toolkit').CanonicalToolsConfig;
82
82
  effectiveRuntime: {
83
- env: Record<string, unknown>;
84
- tools: unknown;
85
83
  assessmentId: string;
86
84
  playerType: string;
87
85
  player: Record<string, unknown> | null;
@@ -90,6 +88,8 @@ export declare function resolveSectionPlayerRuntimeState(args: RuntimeInputs): {
90
88
  coordinator: unknown;
91
89
  createSectionController: unknown;
92
90
  isolation: string;
91
+ env: Record<string, unknown>;
92
+ tools: unknown;
93
93
  };
94
94
  playerRuntime: {
95
95
  effectivePlayerType: string;
@@ -1 +1 @@
1
- {"version":3,"file":"section-player-runtime.d.ts","sourceRoot":"","sources":["../../../src/components/shared/section-player-runtime.ts"],"names":[],"mappings":"AAIA,OAAO,EAEN,KAAK,UAAU,EACf,MAAM,iCAAiC,CAAC;AAGzC,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAC3D,eAAO,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B,CAAC,IAAI,EAAE;IAC1C,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACpC;;;;;;;;EAgCA;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAK1E;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,aAAa;;;;;sBAlIpD,MAAM;oBACR,MAAM;gBACV,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;kBAC5B,OAAO;uBAEF,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;qBAChC,OAAO;iCACK,OAAO;mBACrB,MAAM;;;;;;;;;;;EAoKlB"}
1
+ {"version":3,"file":"section-player-runtime.d.ts","sourceRoot":"","sources":["../../../src/components/shared/section-player-runtime.ts"],"names":[],"mappings":"AAIA,OAAO,EAEN,KAAK,UAAU,EACf,MAAM,iCAAiC,CAAC;AAGzC,eAAO,MAAM,qBAAqB,wBAAwB,CAAC;AAC3D,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAC1C,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,WAAW,EAA0C,MAAM,CACvE,MAAM,EACN,OAAO,CACP,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACvC,aAA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5B,sEAoBA;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC9C,WAAW,EAAE,OAAO,CAAC;IACrB,uBAAuB,EAAE,OAAO,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACpC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAC;IAC9B,oBAAoB,EAAE,OAAO,CAAC;CAC9B;;;;;;;;;;;EAgBA;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IAC1C,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CACpC;;;;;;;;EAgCA;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE,CAK1E;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;EA0CnE"}
@@ -1,7 +1,16 @@
1
1
  import { ItemEntity } from '../../../../players-shared/dist/types/index.d.ts';
2
2
  import { SectionCompositionModel } from '../../controllers/types.js';
3
3
  import { PlayerElementParams } from './player-action.js';
4
+ export type LayoutCompositionSnapshot = {
5
+ compositionModel: SectionCompositionModel;
6
+ passages: SectionCompositionModel["passages"];
7
+ items: SectionCompositionModel["items"];
8
+ renderables: ItemEntity[];
9
+ renderablesSignature: string;
10
+ };
4
11
  export declare function getCompositionFromEvent(event: Event): SectionCompositionModel;
12
+ export declare function deriveLayoutCompositionSnapshot(compositionModel: SectionCompositionModel): LayoutCompositionSnapshot;
13
+ export declare function getCompositionSnapshotFromEvent(event: Event): LayoutCompositionSnapshot;
5
14
  export declare function getPassagePlayerParams(args: {
6
15
  passage: any;
7
16
  resolvedPlayerEnv: Record<string, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"section-player-view-state.d.ts","sourceRoot":"","sources":["../../../src/components/shared/section-player-view-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,KAAK,GAAG,uBAAuB,CAI7E;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC5C,OAAO,EAAE,GAAG,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,cAAc,EAAE,MAAM,CAAC;CACvB,GAAG,mBAAmB,CAUtB;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACzC,IAAI,EAAE,UAAU,CAAC;IACjB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,cAAc,EAAE,MAAM,CAAC;CACvB,GAAG,mBAAmB,CAStB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACxC,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,IAAI,EAAE,UAAU,CAAC;CACjB,GAAG,MAAM,CAET"}
1
+ {"version":3,"file":"section-player-view-state.d.ts","sourceRoot":"","sources":["../../../src/components/shared/section-player-view-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACxE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAI9D,MAAM,MAAM,yBAAyB,GAAG;IACvC,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,QAAQ,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAC;IAC9C,KAAK,EAAE,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACxC,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,KAAK,GAAG,uBAAuB,CAI7E;AAED,wBAAgB,+BAA+B,CAC9C,gBAAgB,EAAE,uBAAuB,GACvC,yBAAyB,CAS3B;AAED,wBAAgB,+BAA+B,CAC9C,KAAK,EAAE,KAAK,GACV,yBAAyB,CAE3B;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE;IAC5C,OAAO,EAAE,GAAG,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,cAAc,EAAE,MAAM,CAAC;CACvB,GAAG,mBAAmB,CAUtB;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACzC,IAAI,EAAE,UAAU,CAAC;IACjB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjD,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7C,cAAc,EAAE,MAAM,CAAC;CACvB,GAAG,mBAAmB,CAStB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACxC,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,IAAI,EAAE,UAAU,CAAC;CACjB,GAAG,MAAM,CAET"}
@@ -0,0 +1,18 @@
1
+ import { SectionPlayerPublicEventName } from './public-events.js';
2
+ export type SectionPlayerLayoutName = "splitpane" | "vertical";
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" | "showToolbar" | "toolbarPosition" | "enabledTools" | "itemToolbarTools" | "passageToolbarTools";
5
+ export type SectionPlayerAdvancedPropName = "runtime" | "playerType" | "player" | "lazyInit" | "tools" | "accessibility" | "coordinator" | "createSectionController" | "isolation" | "env" | "iifeBundleHost";
6
+ export type SectionPlayerLayoutPropName = SectionPlayerBasicPropName | SectionPlayerAdvancedPropName;
7
+ export type SectionPlayerLayoutCommandName = "getSnapshot" | "selectComposition" | "selectNavigation" | "selectReadiness" | "navigateTo" | "navigateNext" | "navigatePrevious" | "getSectionController" | "waitForSectionController";
8
+ export type SectionPlayerLayoutContract = {
9
+ version: 1;
10
+ layout: SectionPlayerLayoutName;
11
+ props: readonly SectionPlayerLayoutPropName[];
12
+ recommendedBasicProps: readonly SectionPlayerBasicPropName[];
13
+ advancedEscapeHatchProps: readonly SectionPlayerAdvancedPropName[];
14
+ events: readonly SectionPlayerPublicEventName[];
15
+ commands: readonly SectionPlayerLayoutCommandName[];
16
+ capabilities: readonly SectionPlayerLayoutCapability[];
17
+ };
18
+ //# sourceMappingURL=layout-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-contract.d.ts","sourceRoot":"","sources":["../../src/contracts/layout-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAEvE,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG,UAAU,CAAC;AAE/D,MAAM,MAAM,6BAA6B,GACtC,YAAY,GACZ,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,iBAAiB,GACjB,kBAAkB,GAClB,mBAAmB,CAAC;AAEvB,MAAM,MAAM,0BAA0B,GACnC,cAAc,GACd,SAAS,GACT,WAAW,GACX,WAAW,GACX,aAAa,GACb,iBAAiB,GACjB,cAAc,GACd,kBAAkB,GAClB,qBAAqB,CAAC;AAEzB,MAAM,MAAM,6BAA6B,GACtC,SAAS,GACT,YAAY,GACZ,QAAQ,GACR,UAAU,GACV,OAAO,GACP,eAAe,GACf,aAAa,GACb,yBAAyB,GACzB,WAAW,GACX,KAAK,GACL,gBAAgB,CAAC;AAEpB,MAAM,MAAM,2BAA2B,GACpC,0BAA0B,GAC1B,6BAA6B,CAAC;AAEjC,MAAM,MAAM,8BAA8B,GACvC,aAAa,GACb,mBAAmB,GACnB,kBAAkB,GAClB,iBAAiB,GACjB,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,sBAAsB,GACtB,0BAA0B,CAAC;AAE9B,MAAM,MAAM,2BAA2B,GAAG;IACzC,OAAO,EAAE,CAAC,CAAC;IACX,MAAM,EAAE,uBAAuB,CAAC;IAChC,KAAK,EAAE,SAAS,2BAA2B,EAAE,CAAC;IAC9C,qBAAqB,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAC7D,wBAAwB,EAAE,SAAS,6BAA6B,EAAE,CAAC;IACnE,MAAM,EAAE,SAAS,4BAA4B,EAAE,CAAC;IAChD,QAAQ,EAAE,SAAS,8BAA8B,EAAE,CAAC;IACpD,YAAY,EAAE,SAAS,6BAA6B,EAAE,CAAC;CACvD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { SectionPlayerLayoutContract } from './layout-contract.js';
2
+ export declare const SPLITPANE_LAYOUT_CONTRACT: SectionPlayerLayoutContract;
3
+ export declare const VERTICAL_LAYOUT_CONTRACT: SectionPlayerLayoutContract;
4
+ //# sourceMappingURL=layout-parity-metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-parity-metadata.d.ts","sourceRoot":"","sources":["../../src/contracts/layout-parity-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAoExE,eAAO,MAAM,yBAAyB,EAAE,2BASvC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,2BAStC,CAAC"}
@@ -0,0 +1,25 @@
1
+ export declare const SECTION_PLAYER_PUBLIC_EVENTS: {
2
+ readonly runtimeOwned: "runtime-owned";
3
+ readonly runtimeInherited: "runtime-inherited";
4
+ readonly runtimeError: "runtime-error";
5
+ readonly compositionChanged: "composition-changed";
6
+ readonly sessionChanged: "session-changed";
7
+ readonly sectionControllerReady: "section-controller-ready";
8
+ readonly readinessChange: "readiness-change";
9
+ readonly interactionReady: "interaction-ready";
10
+ readonly ready: "ready";
11
+ };
12
+ export type SectionPlayerPublicEventName = (typeof SECTION_PLAYER_PUBLIC_EVENTS)[keyof typeof SECTION_PLAYER_PUBLIC_EVENTS];
13
+ export type SectionPlayerReadinessPhase = "bootstrapping" | "interaction-ready" | "loading" | "ready" | "error";
14
+ export type SectionPlayerReadinessChangeDetail = {
15
+ phase: SectionPlayerReadinessPhase;
16
+ interactionReady: boolean;
17
+ allLoadingComplete: boolean;
18
+ reason?: string;
19
+ };
20
+ export type SectionPlayerControllerReadyDetail = {
21
+ sectionId: string;
22
+ attemptId?: string;
23
+ controller: unknown;
24
+ };
25
+ //# sourceMappingURL=public-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-events.d.ts","sourceRoot":"","sources":["../../src/contracts/public-events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4BAA4B;;;;;;;;;;CAU/B,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACvC,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC;AAElF,MAAM,MAAM,2BAA2B,GACpC,eAAe,GACf,mBAAmB,GACnB,SAAS,GACT,OAAO,GACP,OAAO,CAAC;AAEX,MAAM,MAAM,kCAAkC,GAAG;IAChD,KAAK,EAAE,2BAA2B,CAAC;IACnC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACpB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { SectionPlayerReadinessChangeDetail } from './public-events.js';
2
+ import { SectionControllerHandle } from '@pie-players/pie-assessment-toolkit';
3
+ export type SectionPlayerNavigationSnapshot = {
4
+ currentIndex: number;
5
+ totalItems: number;
6
+ canNext: boolean;
7
+ canPrevious: boolean;
8
+ currentItemId?: string;
9
+ };
10
+ export type SectionPlayerSnapshot = {
11
+ readiness: SectionPlayerReadinessChangeDetail;
12
+ composition: {
13
+ itemsCount: number;
14
+ passagesCount: number;
15
+ };
16
+ navigation: SectionPlayerNavigationSnapshot;
17
+ };
18
+ export interface SectionPlayerRuntimeHostContract {
19
+ getSnapshot(): SectionPlayerSnapshot;
20
+ selectComposition(): SectionPlayerSnapshot["composition"];
21
+ selectNavigation(): SectionPlayerNavigationSnapshot;
22
+ selectReadiness(): SectionPlayerReadinessChangeDetail;
23
+ navigateTo(index: number): boolean;
24
+ navigateNext(): boolean;
25
+ navigatePrevious(): boolean;
26
+ getSectionController(): SectionControllerHandle | null;
27
+ waitForSectionController(timeoutMs?: number): Promise<SectionControllerHandle | null>;
28
+ }
29
+ //# sourceMappingURL=runtime-host-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-host-contract.d.ts","sourceRoot":"","sources":["../../src/contracts/runtime-host-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,kCAAkC,EAClC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAEnF,MAAM,MAAM,+BAA+B,GAAG;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,SAAS,EAAE,kCAAkC,CAAC;IAC9C,WAAW,EAAE;QACZ,UAAU,EAAE,MAAM,CAAC;QACnB,aAAa,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,UAAU,EAAE,+BAA+B,CAAC;CAC5C,CAAC;AAEF,MAAM,WAAW,gCAAgC;IAChD,WAAW,IAAI,qBAAqB,CAAC;IACrC,iBAAiB,IAAI,qBAAqB,CAAC,aAAa,CAAC,CAAC;IAC1D,gBAAgB,IAAI,+BAA+B,CAAC;IACpD,eAAe,IAAI,kCAAkC,CAAC;IACtD,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACnC,YAAY,IAAI,OAAO,CAAC;IACxB,gBAAgB,IAAI,OAAO,CAAC;IAC5B,oBAAoB,IAAI,uBAAuB,GAAG,IAAI,CAAC;IACvD,wBAAwB,CACvB,SAAS,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;CAC3C"}
@@ -16,6 +16,7 @@ export declare class SectionController implements SectionControllerHandle {
16
16
  private sectionLoadingComplete;
17
17
  private sectionLoadingSnapshot;
18
18
  private sectionItemsCompleteSnapshot;
19
+ private sectionNavigationSnapshot;
19
20
  private lastItemSelectionSnapshot;
20
21
  private lastSectionErrorSnapshot;
21
22
  private emitChange;
@@ -109,5 +110,6 @@ export declare class SectionController implements SectionControllerHandle {
109
110
  private evaluateSectionLoadingState;
110
111
  private captureReplaySnapshot;
111
112
  private buildReplayEvents;
113
+ private cloneForRead;
112
114
  }
113
115
  //# sourceMappingURL=SectionController.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionController.d.ts","sourceRoot":"","sources":["../../src/controllers/SectionController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,OAAO,KAAK,EACX,wBAAwB,EACxB,uBAAuB,EACvB,oCAAoC,EACpC,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAIlE,OAAO,KAAK,EAOX,gBAAgB,EAEhB,6BAA6B,EAC7B,gCAAgC,EAChC,gCAAgC,EAEhC,+BAA+B,EAC/B,uBAAuB,EACvB,0BAA0B,EAE1B,sBAAsB,EAItB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,MAAM,YAAY,CAAC;AAcpB,qBAAa,iBAAkB,YAAW,uBAAuB;IAGhE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA+B;IAC9D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA+B;IAC9D,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAsC;IAC5E,OAAO,CAAC,mBAAmB,CACrB;IACN,OAAO,CAAC,kBAAkB,CAAyC;IACnE,OAAO,CAAC,KAAK,CAaX;IACF,OAAO,CAAC,QAA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,EAAE;QAChC,MAAM,EAAE,MAAM,CAAC;QACf,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,IAAI;IAqBD,qBAAqB,CAAC,IAAI,EAAE;QAClC,MAAM,EAAE,MAAM,CAAC;QACf,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,EAAE,OAAO,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,IAAI;IA0BD,kBAAkB,CAAC,IAAI,EAAE;QAC/B,MAAM,EAAE,aAAa,GAAG,iBAAiB,GAAG,SAAS,GAAG,YAAY,CAAC;QACrE,KAAK,EAAE,OAAO,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,IAAI;IAgBR,OAAO,CAAC,sBAAsB;IAY9B,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,uBAAuB;IAM/B,OAAO,CAAC,+BAA+B;IAavC,OAAO,CAAC,uBAAuB;IA0B/B,OAAO,CAAC,iCAAiC;IA+BzC,OAAO,CAAC,2BAA2B;IAiBnC,OAAO,CAAC,qBAAqB;IAkB7B,OAAO,CAAC,iBAAiB;IAmFzB,OAAO,CAAC,YAAY;CAYpB"}
@@ -110,12 +110,14 @@ export interface SectionNavigationState {
110
110
  }
111
111
  export type SectionContentKind = "item" | "passage" | "rubric" | "unknown";
112
112
  interface SectionControllerEventBase {
113
- type: "item-session-data-changed" | "item-session-meta-changed" | "item-selected" | "content-loaded" | "item-player-error" | "item-complete-changed" | "section-loading-complete" | "section-items-complete-changed" | "section-error";
114
- currentItemIndex: number;
113
+ type: "item-session-data-changed" | "item-session-meta-changed" | "item-selected" | "section-navigation-change" | "content-loaded" | "item-player-error" | "item-complete-changed" | "section-loading-complete" | "section-items-complete-changed" | "section-error";
115
114
  timestamp: number;
116
115
  replayed?: boolean;
117
116
  }
118
- export interface ItemSessionDataChangedEvent extends SectionControllerEventBase {
117
+ interface ItemScopedControllerEventBase extends SectionControllerEventBase {
118
+ currentItemIndex: number;
119
+ }
120
+ export interface ItemSessionDataChangedEvent extends ItemScopedControllerEventBase {
119
121
  type: "item-session-data-changed";
120
122
  itemId: string;
121
123
  canonicalItemId: string;
@@ -124,53 +126,60 @@ export interface ItemSessionDataChangedEvent extends SectionControllerEventBase
124
126
  complete?: boolean;
125
127
  component?: string;
126
128
  }
127
- export interface ItemSessionMetaChangedEvent extends SectionControllerEventBase {
129
+ export interface ItemSessionMetaChangedEvent extends ItemScopedControllerEventBase {
128
130
  type: "item-session-meta-changed";
129
131
  itemId: string;
130
132
  canonicalItemId: string;
131
133
  complete?: boolean;
132
134
  component?: string;
133
135
  }
134
- export interface ItemSelectedEvent extends SectionControllerEventBase {
136
+ export interface ItemSelectedEvent extends ItemScopedControllerEventBase {
135
137
  type: "item-selected";
136
138
  previousItemId: string;
137
139
  currentItemId: string;
138
140
  itemIndex: number;
139
141
  totalItems: number;
140
142
  }
141
- export interface ContentLoadedEvent extends SectionControllerEventBase {
143
+ export interface SectionNavigationChangeEvent extends SectionControllerEventBase {
144
+ type: "section-navigation-change";
145
+ previousSectionId?: string;
146
+ currentSectionId?: string;
147
+ attemptId?: string;
148
+ reason?: "input-change" | "runtime-transition";
149
+ }
150
+ export interface ContentLoadedEvent extends ItemScopedControllerEventBase {
142
151
  type: "content-loaded";
143
152
  contentKind: SectionContentKind;
144
153
  itemId: string;
145
154
  canonicalItemId: string;
146
155
  detail?: unknown;
147
156
  }
148
- export interface ItemPlayerErrorEvent extends SectionControllerEventBase {
157
+ export interface ItemPlayerErrorEvent extends ItemScopedControllerEventBase {
149
158
  type: "item-player-error";
150
159
  contentKind: SectionContentKind;
151
160
  itemId: string;
152
161
  canonicalItemId: string;
153
162
  error: unknown;
154
163
  }
155
- export interface ItemCompleteChangedEvent extends SectionControllerEventBase {
164
+ export interface ItemCompleteChangedEvent extends ItemScopedControllerEventBase {
156
165
  type: "item-complete-changed";
157
166
  itemId: string;
158
167
  canonicalItemId: string;
159
168
  complete: boolean;
160
169
  previousComplete: boolean;
161
170
  }
162
- export interface SectionLoadingCompleteEvent extends SectionControllerEventBase {
171
+ export interface SectionLoadingCompleteEvent extends ItemScopedControllerEventBase {
163
172
  type: "section-loading-complete";
164
173
  totalRegistered: number;
165
174
  totalLoaded: number;
166
175
  }
167
- export interface SectionItemsCompleteChangedEvent extends SectionControllerEventBase {
176
+ export interface SectionItemsCompleteChangedEvent extends ItemScopedControllerEventBase {
168
177
  type: "section-items-complete-changed";
169
178
  complete: boolean;
170
179
  completedCount: number;
171
180
  totalItems: number;
172
181
  }
173
- export interface SectionErrorEvent extends SectionControllerEventBase {
182
+ export interface SectionErrorEvent extends ItemScopedControllerEventBase {
174
183
  type: "section-error";
175
184
  source: "item-player" | "section-runtime" | "toolkit" | "controller";
176
185
  error: unknown;
@@ -178,7 +187,7 @@ export interface SectionErrorEvent extends SectionControllerEventBase {
178
187
  canonicalItemId?: string;
179
188
  contentKind?: SectionContentKind;
180
189
  }
181
- export type SectionControllerChangeEvent = ItemSessionDataChangedEvent | ItemSessionMetaChangedEvent | ItemSelectedEvent | ContentLoadedEvent | ItemPlayerErrorEvent | ItemCompleteChangedEvent | SectionLoadingCompleteEvent | SectionItemsCompleteChangedEvent | SectionErrorEvent;
190
+ export type SectionControllerChangeEvent = ItemSessionDataChangedEvent | ItemSessionMetaChangedEvent | ItemSelectedEvent | SectionNavigationChangeEvent | ContentLoadedEvent | ItemPlayerErrorEvent | ItemCompleteChangedEvent | SectionLoadingCompleteEvent | SectionItemsCompleteChangedEvent | SectionErrorEvent;
182
191
  export type SectionControllerChangeListener = (event: SectionControllerChangeEvent) => void;
183
192
  export {};
184
193
  //# sourceMappingURL=types.d.ts.map