@pie-players/pie-section-player 0.3.29 → 0.3.31
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 +261 -21
- package/dist/chunks/dist-24a90544.js +193 -138
- package/dist/chunks/{dist-Bud4G4lv-b2620662.js → dist-DIBQdekL-ec6db34a.js} +120 -66
- package/dist/chunks/dist-c4148994.js +14 -2
- package/dist/chunks/{dist-DwP27yIs-cfd207a3.js → dist-rF11IR1B-adc4857f.js} +13 -1
- package/dist/chunks/module-c1d68911.js +1819 -1835
- package/dist/chunks/tool-annotation-toolbar-db5bfbec.js +1642 -1473
- package/dist/components/section-player-tabbed-element.d.ts +2 -0
- package/dist/components/section-player-tabbed-element.d.ts.map +1 -0
- package/dist/components/shared/player-preload.d.ts +88 -71
- package/dist/components/shared/player-preload.d.ts.map +1 -1
- package/dist/components/shared/section-player-host-runtime.d.ts +72 -0
- package/dist/components/shared/section-player-host-runtime.d.ts.map +1 -0
- package/dist/components/shared/section-player-runtime-callbacks.d.ts +33 -0
- package/dist/components/shared/section-player-runtime-callbacks.d.ts.map +1 -0
- package/dist/components/shared/section-player-view-state.d.ts.map +1 -1
- package/dist/contracts/host-hooks.d.ts +20 -0
- package/dist/contracts/host-hooks.d.ts.map +1 -1
- package/dist/contracts/layout-contract.d.ts +3 -3
- package/dist/contracts/layout-contract.d.ts.map +1 -1
- package/dist/contracts/layout-parity-metadata.d.ts +1 -0
- package/dist/contracts/layout-parity-metadata.d.ts.map +1 -1
- package/dist/contracts/public-events.d.ts +86 -10
- package/dist/contracts/public-events.d.ts.map +1 -1
- package/dist/contracts/runtime-host-contract.d.ts +13 -0
- package/dist/contracts/runtime-host-contract.d.ts.map +1 -1
- package/dist/contracts/stages.d.ts +11 -0
- package/dist/contracts/stages.d.ts.map +1 -0
- package/dist/controllers/SectionController.d.ts.map +1 -1
- package/dist/controllers/SectionItemNavigationService.d.ts +0 -1
- package/dist/controllers/SectionItemNavigationService.d.ts.map +1 -1
- package/dist/controllers/types.d.ts +16 -0
- package/dist/controllers/types.d.ts.map +1 -1
- package/dist/pie-section-player.d.ts +4 -4
- package/dist/pie-section-player.d.ts.map +1 -1
- package/dist/pie-section-player.js +19513 -6465
- package/dist/policies/index.d.ts +26 -1
- package/dist/policies/index.d.ts.map +1 -1
- package/dist/policies/types.d.ts +18 -1
- package/dist/policies/types.d.ts.map +1 -1
- package/package.json +21 -19
- package/dist/chunks/player-preload-79b07366.js +0 -7066
- package/dist/components/shared/section-player-readiness.d.ts +0 -14
- package/dist/components/shared/section-player-readiness.d.ts.map +0 -1
- package/dist/components/shared/section-player-runtime.d.ts +0 -154
- package/dist/components/shared/section-player-runtime.d.ts.map +0 -1
- package/dist/utils/player-preload.d.ts +0 -2
- package/dist/utils/player-preload.d.ts.map +0 -1
- package/dist/utils/player-preload.js +0 -8
- /package/dist/chunks/{defineProperty-318b8855.js → defineProperty-aab5a8e0.js} +0 -0
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@ Section rendering package with layout custom elements:
|
|
|
4
4
|
|
|
5
5
|
- `pie-section-player-splitpane`
|
|
6
6
|
- `pie-section-player-vertical`
|
|
7
|
+
- `pie-section-player-tabbed`
|
|
7
8
|
|
|
8
9
|
The package no longer exposes the legacy `pie-section-player` layout orchestration API.
|
|
9
10
|
|
|
@@ -38,6 +39,7 @@ Import the custom-element registration entrypoint in consumers:
|
|
|
38
39
|
```ts
|
|
39
40
|
import '@pie-players/pie-section-player/components/section-player-splitpane-element';
|
|
40
41
|
import '@pie-players/pie-section-player/components/section-player-vertical-element';
|
|
42
|
+
import '@pie-players/pie-section-player/components/section-player-tabbed-element';
|
|
41
43
|
import '@pie-players/pie-section-player/components/section-player-item-card-element';
|
|
42
44
|
import '@pie-players/pie-section-player/components/section-player-passage-card-element';
|
|
43
45
|
```
|
|
@@ -60,25 +62,99 @@ Both layout elements support:
|
|
|
60
62
|
- `debug` (boolean-like): verbose debug logging control (`"true"` enables, `"false"`/`"0"` disables)
|
|
61
63
|
- `toolbar-position` (string): `top|right|bottom|left|none`
|
|
62
64
|
- `narrow-layout-breakpoint` (number, optional): viewport width in px below which the layout collapses (split pane: single column; vertical: toolbar moves to top). Clamped to 400–2000; default 1100.
|
|
65
|
+
- `content-max-width-no-passage` (number, optional): max width in px when no passages exist. Clamped to 320–2200. Unset by default (layout uses available width).
|
|
66
|
+
- `content-max-width-with-passage` (number, optional): max width in px when passages are present. Clamped to 320–2200. Unset by default (layout uses available width).
|
|
67
|
+
- `split-pane-min-region-width` (number, optional): splitpane minimum pane width in px. Clamped to 160–1200. Unset by default (legacy split bounds stay at 20–80). (Ignored by vertical layout; supported for API parity.)
|
|
68
|
+
- `split-pane-collapse-strategy` (string, optional): splitpane stacked-mode strategy. Supported values: `tabbed` (default) and `vertical`. (Ignored by vertical/tabbed layouts; supported for API parity.)
|
|
63
69
|
- `show-toolbar` (boolean-like): accepts `true/false` and common string forms (`"true"`, `"false"`, `"1"`, `"0"`, `"yes"`, `"no"`)
|
|
64
70
|
- Host extension props (JS properties only): `toolRegistry`, `sectionHostButtons`, `itemHostButtons`, `passageHostButtons`, `hooks`
|
|
65
71
|
|
|
66
|
-
When viewport width is within the collapsed range (~1100px and below),
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
When viewport width is within the collapsed range (~1100px and below), splitpane and
|
|
73
|
+
vertical layout hosts normalize section toolbar placement to `top`. This includes
|
|
74
|
+
`left`, `right`, `bottom`, and `none` values.
|
|
69
75
|
|
|
70
76
|
`hooks.cardTitleFormatter` remains active across responsive splitpane transitions (split -> stacked and stacked -> split), because title rendering is provided through shared card context rather than layout-specific state.
|
|
71
77
|
|
|
78
|
+
To opt into PIE-117 dimensions from a host, configure:
|
|
79
|
+
|
|
80
|
+
```html
|
|
81
|
+
<pie-section-player-splitpane
|
|
82
|
+
content-max-width-no-passage="800"
|
|
83
|
+
content-max-width-with-passage="1200"
|
|
84
|
+
split-pane-min-region-width="280"
|
|
85
|
+
></pie-section-player-splitpane>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Use the same max-width attributes on `pie-section-player-vertical` when you want the same no-passage/with-passage width behavior in vertical mode.
|
|
89
|
+
|
|
90
|
+
To force splitpane stacked mode to use vertical rendering:
|
|
91
|
+
|
|
92
|
+
```html
|
|
93
|
+
<pie-section-player-splitpane
|
|
94
|
+
narrow-layout-breakpoint="1100"
|
|
95
|
+
split-pane-collapse-strategy="vertical"
|
|
96
|
+
></pie-section-player-splitpane>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
By default, splitpane stacked mode uses tabs. The dedicated `pie-section-player-tabbed` layout also always renders passage/items tabs when passages are present.
|
|
100
|
+
|
|
101
|
+
### Tab styling hooks
|
|
102
|
+
|
|
103
|
+
`pie-section-player-tabbed` and splitpane `tabbed` collapse mode expose canonical `pie-*`
|
|
104
|
+
hooks for theming:
|
|
105
|
+
|
|
106
|
+
- `pie-section-player-tabs`
|
|
107
|
+
- `pie-section-player-tab`
|
|
108
|
+
- `pie-section-player-tab--active`
|
|
109
|
+
- `pie-section-player-tab-panel`
|
|
110
|
+
|
|
111
|
+
For theme compatibility with existing passage-label patterns, tabs also expose:
|
|
112
|
+
|
|
113
|
+
- `data-pie-purpose="passage-label"` and alias class `passage-label`
|
|
114
|
+
- `data-pie-purpose="item-label"` and alias class `item-label`
|
|
115
|
+
|
|
116
|
+
Tab colors/spacing can be themed via CSS variables such as:
|
|
117
|
+
`--pie-section-player-tab-color`, `--pie-section-player-tab-active-color`,
|
|
118
|
+
`--pie-section-player-tab-indicator-color`, and `--pie-section-player-tab-spacing`.
|
|
119
|
+
|
|
120
|
+
### Card header styling hooks
|
|
121
|
+
|
|
122
|
+
Passage and item cards share a common header row
|
|
123
|
+
(`.pie-section-player-content-card-header`, with the card-specific aliases
|
|
124
|
+
`.pie-section-player-passage-header` / `.pie-section-player-item-header`).
|
|
125
|
+
|
|
126
|
+
- Title and toolbar are centered vertically by default. There is no prop or
|
|
127
|
+
attribute for this — hosts needing a non-standard alignment should override
|
|
128
|
+
the selector in their own stylesheet.
|
|
129
|
+
- The header fill is transparent by default. Hosts/themes opt into a color
|
|
130
|
+
via the `--pie-section-player-card-header-background` CSS variable; the
|
|
131
|
+
framework does not ship a brand palette.
|
|
132
|
+
|
|
133
|
+
Example (host CSS):
|
|
134
|
+
|
|
135
|
+
```css
|
|
136
|
+
pie-section-player-passage-card,
|
|
137
|
+
pie-section-player-item-card {
|
|
138
|
+
--pie-section-player-card-header-background: #c9e5e6;
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
When both max-width attributes are set, the with-passage cap resolves to the greater
|
|
143
|
+
of the two configured values (after clamp), so with-passage mode never ends up narrower
|
|
144
|
+
than no-passage mode.
|
|
145
|
+
|
|
72
146
|
### API direction: CE defaults first, JS customization for advanced cases
|
|
73
147
|
|
|
74
148
|
The intended usage model is:
|
|
75
149
|
|
|
76
150
|
- **CE props for default/standard flows (roughly 90% use cases)**:
|
|
77
151
|
- `assessment-id`, `section`, `section-id`, `attempt-id`, `debug`
|
|
78
|
-
- `show-toolbar`, `toolbar-position`, `narrow-layout-breakpoint
|
|
152
|
+
- `show-toolbar`, `toolbar-position`, `narrow-layout-breakpoint`
|
|
153
|
+
- `content-max-width-no-passage`, `content-max-width-with-passage`, `split-pane-min-region-width`, `split-pane-collapse-strategy`
|
|
154
|
+
- `enabled-tools` (per-region tool placement is configured via `tools.placement.{item,passage}`; the `item-toolbar-tools` / `passage-toolbar-tools` aliases were removed in the broad architecture review compat sweep)
|
|
79
155
|
- **JS API for advanced customization**:
|
|
80
|
-
- Get the controller handle via `getSectionController()` or `waitForSectionController()`
|
|
81
|
-
- Listen
|
|
156
|
+
- Get the controller handle via `getSectionController()` or `waitForSectionController()` (preferred)
|
|
157
|
+
- Listen for `pie-stage-change` and filter on `detail.stage === "engine-ready"` for an event-driven entry point
|
|
82
158
|
- Apply custom policy/gating in host code (for example, domain-specific `canNext` based on controller events like `section-items-complete-changed`)
|
|
83
159
|
- Compose forward/backward eligibility in host code using `selectNavigation()` + host state; there is intentionally no separate parallel CE gating API for this
|
|
84
160
|
- Inject custom toolbar tooling with `toolRegistry` and optional host button arrays (`sectionHostButtons`, `itemHostButtons`, `passageHostButtons`)
|
|
@@ -98,7 +174,99 @@ host.hooks = {
|
|
|
98
174
|
};
|
|
99
175
|
```
|
|
100
176
|
|
|
101
|
-
Advanced CE props are still supported as escape hatches (`runtime`, `coordinator`,
|
|
177
|
+
Advanced CE props are still supported as escape hatches (`runtime`, `coordinator`, etc.), but hosts should prefer JS/controller composition for non-standard behavior. Note: `createSectionController` is **runtime-only** — set it on `runtime.createSectionController` rather than as a top-level CE prop (the prop alias was removed in the broad architecture review compat sweep).
|
|
178
|
+
|
|
179
|
+
### Focus management
|
|
180
|
+
|
|
181
|
+
Section-player owns its own focus contract so hosts can integrate a
|
|
182
|
+
"Skip to Main" affordance and keyboard navigation without re-encoding
|
|
183
|
+
the passage-first rule.
|
|
184
|
+
|
|
185
|
+
**Public focus targets.** Both card custom elements are `tabindex="-1"`
|
|
186
|
+
(programmatically focusable, never in sequential tab order) and expose a
|
|
187
|
+
`:focus-visible` outline:
|
|
188
|
+
|
|
189
|
+
- `<pie-section-player-passage-card>` (when the section has a passage)
|
|
190
|
+
- `<pie-section-player-item-card>`
|
|
191
|
+
|
|
192
|
+
The inner `.pie-section-player-content-card[data-section-item-card]`
|
|
193
|
+
selector is an internal back-compat hook and is not part of the public
|
|
194
|
+
contract — prefer querying the custom element tags.
|
|
195
|
+
|
|
196
|
+
**Declarative control.** The `SectionPlayerFocusPolicy.autoFocus` strategy
|
|
197
|
+
governs focus on every navigation event (Next / Back / `navigateTo`) and is
|
|
198
|
+
also honored by the imperative `focusStart()`:
|
|
199
|
+
|
|
200
|
+
- `"start-of-content"` *(default)* — focus the passage card when present,
|
|
201
|
+
otherwise the first item card. Matches the canonical assessment UX where
|
|
202
|
+
Skip-to-Main and navigation land in the same place. Best for
|
|
203
|
+
one-item-per-page layouts (splitpane, tabbed).
|
|
204
|
+
- `"current-item"` — focus the newly-active item card (queried as
|
|
205
|
+
`pie-section-player-item-card[is-current]`). Best for stacked/list
|
|
206
|
+
layouts where multiple items are visible at once (vertical, custom
|
|
207
|
+
kernel-host variants). Works in both paginated and keep-together
|
|
208
|
+
sections — QTI 3 `keep-together` is a pagination hint only and does
|
|
209
|
+
not disable item-level navigation or current-item tracking.
|
|
210
|
+
- `"none"` — framework never moves focus on navigation; the host owns it
|
|
211
|
+
entirely. `focusStart()` still moves focus (defaults to
|
|
212
|
+
start-of-content) because hosts only call it when they *want* focus to
|
|
213
|
+
move.
|
|
214
|
+
|
|
215
|
+
```ts
|
|
216
|
+
const host = document.querySelector("pie-section-player-splitpane") as any;
|
|
217
|
+
host.policies = {
|
|
218
|
+
readiness: { mode: "progressive" },
|
|
219
|
+
preload: { enabled: true },
|
|
220
|
+
focus: { autoFocus: "start-of-content" },
|
|
221
|
+
telemetry: { enabled: true },
|
|
222
|
+
};
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Wired policy toggles.** Each `SectionPlayerPolicies` field has a real
|
|
226
|
+
runtime effect; nothing in this surface is decorative.
|
|
227
|
+
|
|
228
|
+
- `readiness.mode` (`"progressive"` | `"strict"`) — drives readiness-event
|
|
229
|
+
emission via `createReadinessDetail` in `SectionPlayerLayoutKernel`.
|
|
230
|
+
- `preload.enabled` — when `false`, `SectionItemsPane` short-circuits the
|
|
231
|
+
section-level element warmup pipeline (`warmupSectionElements`). Items
|
|
232
|
+
still mount and item-players register their own elements on demand. Use
|
|
233
|
+
this to disable section pre-warm when the host already owns element
|
|
234
|
+
registration end-to-end. Default: `true`.
|
|
235
|
+
- `focus.autoFocus` — focus strategy on navigation; see "Focus management"
|
|
236
|
+
above.
|
|
237
|
+
- `telemetry.enabled` — when `false`, the layout custom elements skip
|
|
238
|
+
`attachInstrumentationEventBridge` setup, so no `pie-section-*`
|
|
239
|
+
telemetry events flow through the bridge. Hosts that want a different
|
|
240
|
+
shape of opt-out can still override `runtime.player.loaderConfig.instrumentationProvider`.
|
|
241
|
+
Default: `true`.
|
|
242
|
+
|
|
243
|
+
The exported `isPreloadEnabled(policies)` and `isTelemetryEnabled(policies)`
|
|
244
|
+
helpers read these toggles with the documented default-true semantics, so
|
|
245
|
+
host code that needs to mirror the same gate (e.g. when composing a custom
|
|
246
|
+
layout host) can call them directly.
|
|
247
|
+
|
|
248
|
+
**Imperative escape hatch (host-owned focus moments).** Every layout
|
|
249
|
+
element (`pie-section-player-splitpane`, `-vertical`, `-tabbed`,
|
|
250
|
+
`-kernel-host`, and `-base`) exposes a `focusStart(): boolean` method.
|
|
251
|
+
Call it from host-owned affordances the framework cannot observe — most
|
|
252
|
+
commonly a "Skip to Main" button in the host's ribbon:
|
|
253
|
+
|
|
254
|
+
```ts
|
|
255
|
+
document.querySelector("pie-section-player-splitpane")?.focusStart();
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
`focusStart()` honors the `autoFocus` strategy so Skip-to-Main lands
|
|
259
|
+
wherever the host has opted in for navigation focus:
|
|
260
|
+
|
|
261
|
+
- `"start-of-content"` *(default)* → passage card when present, else first
|
|
262
|
+
item card.
|
|
263
|
+
- `"current-item"` → the item card currently marked `is-current`, falling
|
|
264
|
+
back to start-of-content if no current item is resolvable.
|
|
265
|
+
- `"none"` → start-of-content (hosts call `focusStart()` precisely
|
|
266
|
+
because they want focus to move).
|
|
267
|
+
|
|
268
|
+
For Next / Back / question-number navigation the host does **not** call
|
|
269
|
+
`focusStart()` — the `autoFocus` policy fires automatically.
|
|
102
270
|
|
|
103
271
|
### Navigation signals
|
|
104
272
|
|
|
@@ -107,9 +275,9 @@ Advanced CE props are still supported as escape hatches (`runtime`, `coordinator
|
|
|
107
275
|
|
|
108
276
|
Runtime precedence is explicit:
|
|
109
277
|
|
|
110
|
-
- `runtime` values are primary for runtime fields (`assessmentId`, `playerType`, `player`, `lazyInit`, `tools`, `accessibility`, `coordinator`, `
|
|
278
|
+
- `runtime` values are primary for runtime fields (`assessmentId`, `playerType`, `player`, `lazyInit`, `tools`, `accessibility`, `coordinator`, `isolation`, `env`). `createSectionController` is exposed only via `runtime.createSectionController`.
|
|
111
279
|
- Top-level runtime-like props remain compatibility inputs and are merged with `runtime` values. For `player`, top-level values are merged first, then `runtime.player` overrides. Nested `loaderOptions` and `loaderConfig` are also merged with the same precedence.
|
|
112
|
-
-
|
|
280
|
+
- The section-level toolbar placement override (`enabled-tools`) is normalized on top of the runtime tools config and merges into `tools.placement.section`. Per-region placement (`tools.placement.item` / `tools.placement.passage`) is configured directly on the canonical `tools` / `runtime.tools` object — the deprecated `item-toolbar-tools` / `passage-toolbar-tools` aliases were removed in the broad architecture review compat sweep.
|
|
113
281
|
- Tool configuration validation is canonical in toolkit initialization (`pie-assessment-toolkit`), including toolbar overlays. Use `runtime.toolConfigStrictness` (`off` | `warn` | `error`) to control warning-only vs fail-fast behavior.
|
|
114
282
|
- TTS provider config must use `tools.providers.textToSpeech` (canonical). `tools.providers.tts` is rejected by validation.
|
|
115
283
|
- Host tool overrides are additive:
|
|
@@ -276,20 +444,66 @@ Section-player instrumentation is provider-agnostic and uses the shared
|
|
|
276
444
|
- Toolkit telemetry forwarding uses the same provider path, so tool/backend
|
|
277
445
|
operational events are visible alongside section events when toolkit is mounted.
|
|
278
446
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
- `pie-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
- `pie-
|
|
447
|
+
Canonical lifecycle stream (engine-routed, dispatched on the outer layout CE):
|
|
448
|
+
|
|
449
|
+
- `pie-stage-change` — single typed transition stream covering
|
|
450
|
+
`composed` → `engine-ready` → `interactive` → `disposed`. Payload is a
|
|
451
|
+
`StageChangeDetail`. Replaces the legacy readiness vocabulary.
|
|
452
|
+
- `pie-loading-complete` — fires once per cohort when every item has
|
|
453
|
+
loaded (kernel-routed; gated on `interactive`).
|
|
454
|
+
- `framework-error` — canonical error event for any failure crossing the
|
|
455
|
+
framework boundary. Payload is a `FrameworkErrorModel`. The toolkit's
|
|
456
|
+
package-internal `FrameworkErrorBus` and the `onFrameworkError`
|
|
457
|
+
callback prop deliver each error exactly once regardless of wrapper
|
|
458
|
+
depth. The `framework-error` *DOM event* on the outer layout CE
|
|
459
|
+
also delivers each error exactly once: the kernel listener at
|
|
460
|
+
`<pie-section-player-base>` intercepts the toolkit's bubbled emit
|
|
461
|
+
and calls `event.stopPropagation()`, leaving only the canonical
|
|
462
|
+
engine-bridge emit on the layout host. The single-emit contract is
|
|
463
|
+
pinned by `tests/section-player-framework-error-dual-emit.test.ts`.
|
|
464
|
+
Direct listeners attached to `<pie-assessment-toolkit>` itself
|
|
465
|
+
still see the toolkit's own emit. The previous dual-emit on the
|
|
466
|
+
layout host was removed in the broad architecture review compat
|
|
467
|
+
sweep.
|
|
468
|
+
|
|
469
|
+
Callback-prop mirrors with two-tier precedence (`runtime.<key>` wins over
|
|
470
|
+
the top-level prop):
|
|
471
|
+
|
|
472
|
+
- `onStageChange(detail)` — on every layout CE, `pie-section-player-base`,
|
|
473
|
+
and `pie-assessment-toolkit`.
|
|
474
|
+
- `onLoadingComplete(detail)` — on the kernel-backed layout CEs only
|
|
475
|
+
(split-pane / vertical / tabbed / kernel-host).
|
|
476
|
+
- `onFrameworkError(model)` — on every layout CE and
|
|
477
|
+
`pie-section-player-base`. Fires exactly once per error regardless of
|
|
478
|
+
wrapper depth (delivered through the package-internal
|
|
479
|
+
`FrameworkErrorBus`). The `framework-error` DOM event on the layout
|
|
480
|
+
CE host is also single-fire post-compat-sweep; consume either.
|
|
481
|
+
|
|
482
|
+
Section-player owned instrumentation stream:
|
|
483
|
+
|
|
484
|
+
- `pie-section-stage-change`
|
|
485
|
+
- `pie-section-loading-complete`
|
|
285
486
|
- `pie-section-session-changed`
|
|
286
487
|
- `pie-section-composition-changed`
|
|
287
|
-
- `pie-section-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
488
|
+
- `pie-section-framework-error`
|
|
489
|
+
|
|
490
|
+
The deprecated readiness aliases (`readiness-change`,
|
|
491
|
+
`interaction-ready`, `ready`) and their `legacy-event-bridge`, along
|
|
492
|
+
with the deprecated `section-controller-ready` Svelte/DOM event and
|
|
493
|
+
its `pie-section-controller-ready` instrumentation mapping, were
|
|
494
|
+
removed in the broad architecture review compat sweep. Migrate
|
|
495
|
+
consumers as follows:
|
|
496
|
+
|
|
497
|
+
- `readiness-change` → listen for `pie-stage-change`. The readiness
|
|
498
|
+
payload is also available via `selectReadiness()` /
|
|
499
|
+
`getSnapshot().readiness` on the layout CE.
|
|
500
|
+
- `interaction-ready` → `pie-stage-change` filtered on
|
|
501
|
+
`detail.stage === "interactive"`.
|
|
502
|
+
- `ready` → `pie-loading-complete`.
|
|
503
|
+
- `section-controller-ready` → call
|
|
504
|
+
`waitForSectionController(timeoutMs)` or `getSectionController()`
|
|
505
|
+
on the layout CE, or filter `pie-stage-change` for
|
|
506
|
+
`detail.stage === "engine-ready"`.
|
|
293
507
|
|
|
294
508
|
If toolkit is mounted, toolkit lifecycle events are emitted on a separate
|
|
295
509
|
`pie-toolkit-*` stream. This separation avoids semantic overlap; bridge dedupe
|
|
@@ -335,6 +549,29 @@ await controller?.updateItemSession?.("q1", {
|
|
|
335
549
|
The same controller snapshot is what the persistence strategy saves/loads.
|
|
336
550
|
When a controller is reused for the same `sectionId`/`attemptId`, `updateInput()` refreshes composition input while preserving in-memory section session data.
|
|
337
551
|
|
|
552
|
+
## Content trust boundary
|
|
553
|
+
|
|
554
|
+
Section-player layouts embed `<pie-item-player>` elements for each item.
|
|
555
|
+
Item and passage markup is sanitized by default via DOMPurify; see
|
|
556
|
+
[pie-item-player README](./README.md#content-trust-boundary)
|
|
557
|
+
property. Hosts can forward those settings through the section-player
|
|
558
|
+
`runtime.player` overrides — the runtime flattens these onto the embedded
|
|
559
|
+
`<pie-item-player>` instance, so any field not recognized by the kernel is
|
|
560
|
+
passed straight through as a prop/attribute:
|
|
561
|
+
|
|
562
|
+
```ts
|
|
563
|
+
const runtime = {
|
|
564
|
+
playerType: "iife",
|
|
565
|
+
player: {
|
|
566
|
+
trustMarkup: false, // default, keeps DOMPurify on
|
|
567
|
+
// sanitizeMarkup: (html) => myCustomSanitize(html),
|
|
568
|
+
},
|
|
569
|
+
};
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
Set `trustMarkup: true` only when the section payload is guaranteed to be
|
|
573
|
+
produced by a trusted pipeline.
|
|
574
|
+
|
|
338
575
|
## Exports
|
|
339
576
|
|
|
340
577
|
Published exports are intentionally minimal:
|
|
@@ -342,10 +579,13 @@ Published exports are intentionally minimal:
|
|
|
342
579
|
- `@pie-players/pie-section-player`
|
|
343
580
|
- `@pie-players/pie-section-player/components/section-player-splitpane-element`
|
|
344
581
|
- `@pie-players/pie-section-player/components/section-player-vertical-element`
|
|
582
|
+
- `@pie-players/pie-section-player/components/section-player-tabbed-element`
|
|
345
583
|
- `@pie-players/pie-section-player/components/section-player-kernel-host-element`
|
|
346
584
|
- `@pie-players/pie-section-player/components/section-player-shell-element`
|
|
347
585
|
- `@pie-players/pie-section-player/components/section-player-item-card-element`
|
|
348
586
|
- `@pie-players/pie-section-player/components/section-player-passage-card-element`
|
|
587
|
+
- `@pie-players/pie-section-player/components/section-player-items-pane-element`
|
|
588
|
+
- `@pie-players/pie-section-player/components/section-player-passages-pane-element`
|
|
349
589
|
- `@pie-players/pie-section-player/contracts/layout-contract`
|
|
350
590
|
- `@pie-players/pie-section-player/contracts/public-events`
|
|
351
591
|
- `@pie-players/pie-section-player/contracts/runtime-host-contract`
|