@pie-players/pie-section-player 0.3.43 → 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.
Files changed (90) hide show
  1. package/README.md +11 -23
  2. package/dist/chunks/dist-24a90544.js +198 -173
  3. package/dist/chunks/{dist-DIBQdekL-ec6db34a.js → dist-DfQrc9XY-6d8e61c6.js} +175 -150
  4. package/dist/chunks/{dist-rF11IR1B-adc4857f.js → dist-Dns3leWh-4f7af4d3.js} +1 -1
  5. package/dist/chunks/dist-c4148994.js +1 -1
  6. package/dist/chunks/sre-0162a7a9.js +17534 -0
  7. package/dist/chunks/sre-CXN7ed6H-7db47d5d.js +17532 -0
  8. package/dist/chunks/tool-annotation-toolbar-db5bfbec.js +5303 -2118
  9. package/dist/component-definitions.d.ts +0 -1
  10. package/dist/components/item-shell-element.d.ts +0 -1
  11. package/dist/components/passage-shell-element.d.ts +0 -1
  12. package/dist/components/section-player-base-element.d.ts +0 -1
  13. package/dist/components/section-player-item-card-element.d.ts +0 -1
  14. package/dist/components/section-player-items-pane-element.d.ts +0 -1
  15. package/dist/components/section-player-kernel-host-element.d.ts +0 -1
  16. package/dist/components/section-player-passage-card-element.d.ts +0 -1
  17. package/dist/components/section-player-passages-pane-element.d.ts +0 -1
  18. package/dist/components/section-player-shell-element.d.ts +0 -1
  19. package/dist/components/section-player-splitpane-element.d.ts +0 -1
  20. package/dist/components/section-player-tabbed-element.d.ts +0 -1
  21. package/dist/components/section-player-vertical-element.d.ts +0 -1
  22. package/dist/components/shared/composition.d.ts +0 -1
  23. package/dist/components/shared/player-action.d.ts +0 -1
  24. package/dist/components/shared/player-preload.d.ts +0 -1
  25. package/dist/components/shared/section-player-card-context.d.ts +0 -1
  26. package/dist/components/shared/section-player-host-runtime.d.ts +2 -12
  27. package/dist/components/shared/section-player-props.d.ts +0 -1
  28. package/dist/components/shared/section-player-runtime-callbacks.d.ts +0 -1
  29. package/dist/components/shared/section-player-view-state.d.ts +0 -1
  30. package/dist/contracts/card-title-formatters.d.ts +0 -1
  31. package/dist/contracts/host-hooks.d.ts +0 -1
  32. package/dist/contracts/layout-contract.d.ts +2 -3
  33. package/dist/contracts/layout-parity-metadata.d.ts +0 -1
  34. package/dist/contracts/public-events.d.ts +8 -16
  35. package/dist/contracts/runtime-host-contract.d.ts +0 -1
  36. package/dist/contracts/stages.d.ts +0 -1
  37. package/dist/controllers/SectionContentService.d.ts +0 -1
  38. package/dist/controllers/SectionController.d.ts +0 -1
  39. package/dist/controllers/SectionItemNavigationService.d.ts +0 -1
  40. package/dist/controllers/SectionSessionService.d.ts +0 -1
  41. package/dist/controllers/toolkit-section-contracts.d.ts +0 -1
  42. package/dist/controllers/types.d.ts +0 -1
  43. package/dist/pie-section-player.d.ts +0 -1
  44. package/dist/pie-section-player.js +42872 -19696
  45. package/dist/policies/guards.d.ts +0 -1
  46. package/dist/policies/index.d.ts +0 -1
  47. package/dist/policies/types.d.ts +0 -1
  48. package/dist/utils/z-index.d.ts +0 -1
  49. package/package.json +10 -10
  50. package/dist/component-definitions.d.ts.map +0 -1
  51. package/dist/components/item-shell-element.d.ts.map +0 -1
  52. package/dist/components/passage-shell-element.d.ts.map +0 -1
  53. package/dist/components/section-player-base-element.d.ts.map +0 -1
  54. package/dist/components/section-player-item-card-element.d.ts.map +0 -1
  55. package/dist/components/section-player-items-pane-element.d.ts.map +0 -1
  56. package/dist/components/section-player-kernel-host-element.d.ts.map +0 -1
  57. package/dist/components/section-player-passage-card-element.d.ts.map +0 -1
  58. package/dist/components/section-player-passages-pane-element.d.ts.map +0 -1
  59. package/dist/components/section-player-shell-element.d.ts.map +0 -1
  60. package/dist/components/section-player-splitpane-element.d.ts.map +0 -1
  61. package/dist/components/section-player-tabbed-element.d.ts.map +0 -1
  62. package/dist/components/section-player-vertical-element.d.ts.map +0 -1
  63. package/dist/components/shared/composition.d.ts.map +0 -1
  64. package/dist/components/shared/player-action.d.ts.map +0 -1
  65. package/dist/components/shared/player-preload.d.ts.map +0 -1
  66. package/dist/components/shared/section-player-card-context.d.ts.map +0 -1
  67. package/dist/components/shared/section-player-host-runtime.d.ts.map +0 -1
  68. package/dist/components/shared/section-player-props.d.ts.map +0 -1
  69. package/dist/components/shared/section-player-runtime-callbacks.d.ts.map +0 -1
  70. package/dist/components/shared/section-player-view-state.d.ts.map +0 -1
  71. package/dist/contracts/card-title-formatters.d.ts.map +0 -1
  72. package/dist/contracts/host-hooks.d.ts.map +0 -1
  73. package/dist/contracts/layout-contract.d.ts.map +0 -1
  74. package/dist/contracts/layout-parity-metadata.d.ts.map +0 -1
  75. package/dist/contracts/public-events.d.ts.map +0 -1
  76. package/dist/contracts/runtime-host-contract.d.ts.map +0 -1
  77. package/dist/contracts/stages.d.ts.map +0 -1
  78. package/dist/controllers/SectionContentService.d.ts.map +0 -1
  79. package/dist/controllers/SectionController.d.ts.map +0 -1
  80. package/dist/controllers/SectionItemNavigationService.d.ts.map +0 -1
  81. package/dist/controllers/SectionSessionService.d.ts.map +0 -1
  82. package/dist/controllers/toolkit-section-contracts.d.ts.map +0 -1
  83. package/dist/controllers/types.d.ts.map +0 -1
  84. package/dist/pie-section-player.d.ts.map +0 -1
  85. package/dist/policies/guards.d.ts.map +0 -1
  86. package/dist/policies/index.d.ts.map +0 -1
  87. package/dist/policies/types.d.ts.map +0 -1
  88. package/dist/utils/z-index.d.ts.map +0 -1
  89. /package/dist/chunks/{defineProperty-aab5a8e0.js → defineProperty-8fd4b6d7.js} +0 -0
  90. /package/dist/chunks/{defineProperty-CyepwRr5-3800a70a.js → defineProperty-Dt7ri80W-76aeaed7.js} +0 -0
package/README.md CHANGED
@@ -6,7 +6,7 @@ Section rendering package with layout custom elements:
6
6
  - `pie-section-player-vertical`
7
7
  - `pie-section-player-tabbed`
8
8
 
9
- The package no longer exposes the legacy `pie-section-player` layout orchestration API.
9
+ Use the layout custom elements listed above for section rendering.
10
10
 
11
11
  ## Install
12
12
 
@@ -58,9 +58,7 @@ const controller = await host.waitForSectionController?.(5000);
58
58
  `waitForSectionController(timeoutMs)` resolves when the layout CE has wired
59
59
  its controller (the same anchor `pie-stage-change` reaches with
60
60
  `detail.stage === "engine-ready"`). Use `getSectionController()` if you've
61
- already passed the readiness anchor synchronously. The legacy
62
- `section-controller-ready` event was removed; either of these helpers
63
- replaces it.
61
+ already passed the readiness anchor synchronously.
64
62
 
65
63
  ### Session lifecycle
66
64
 
@@ -131,7 +129,7 @@ Both layout elements support:
131
129
  - `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.
132
130
  - `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).
133
131
  - `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).
134
- - `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.)
132
+ - `split-pane-min-region-width` (number, optional): splitpane minimum pane width in px. Clamped to 160–1200. Unset by default (split bounds stay at 20–80). (Ignored by vertical layout; supported for API parity.)
135
133
  - `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.)
136
134
  - `show-toolbar` (boolean-like): accepts `true/false` and common string forms (`"true"`, `"false"`, `"1"`, `"0"`, `"yes"`, `"no"`)
137
135
  - Host extension props (JS properties only): `toolRegistry`, `sectionHostButtons`, `itemHostButtons`, `passageHostButtons`, `hooks`
@@ -218,7 +216,6 @@ The intended usage model is:
218
216
  - `assessment-id`, `section`, `section-id`, `attempt-id`, `debug`
219
217
  - `show-toolbar`, `toolbar-position`, `narrow-layout-breakpoint`
220
218
  - `content-max-width-no-passage`, `content-max-width-with-passage`, `split-pane-min-region-width`, `split-pane-collapse-strategy`
221
- - `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)
222
219
  - **JS API for advanced customization**:
223
220
  - Get the controller handle via `getSectionController()` or `waitForSectionController()` (preferred)
224
221
  - Listen for `pie-stage-change` and filter on `detail.stage === "engine-ready"` for an event-driven entry point
@@ -241,7 +238,7 @@ host.hooks = {
241
238
  };
242
239
  ```
243
240
 
244
- 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).
241
+ Advanced runtime configuration is supplied through the `runtime` object. Set player config, tools, accessibility, coordinator, env, and `createSectionController` on `runtime.<key>`.
245
242
 
246
243
  ### Host-owned focus
247
244
 
@@ -290,11 +287,10 @@ layout host) can call them directly.
290
287
  - `item-selected`: item-level navigation change within the current section in the `SectionController` broadcast stream (`itemIndex`, `currentItemId`, `totalItems`).
291
288
  - `section-navigation-change`: section-level navigation/selection change in the `SectionController` broadcast stream (`previousSectionId`, `currentSectionId`, `reason`).
292
289
 
293
- Runtime precedence is explicit:
290
+ Runtime configuration is explicit:
294
291
 
295
- - `runtime` values are primary for runtime fields (`assessmentId`, `playerType`, `player`, `lazyInit`, `tools`, `accessibility`, `coordinator`, `isolation`, `env`). `createSectionController` is exposed only via `runtime.createSectionController`.
296
- - 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.
297
- - 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.
292
+ - `runtime` owns runtime fields (`assessmentId`, `playerType`, `player`, `lazyInit`, `tools`, `accessibility`, `coordinator`, `isolation`, `env`, `createSectionController`).
293
+ - Tool placement is configured through `runtime.tools.placement.section`, `runtime.tools.placement.item`, and `runtime.tools.placement.passage`.
298
294
  - 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.
299
295
  - TTS provider config must use `tools.providers.textToSpeech` (canonical). `tools.providers.tts` is rejected by validation.
300
296
  - Host tool overrides are additive:
@@ -350,7 +346,6 @@ Minimal pattern for package layout components:
350
346
  <pie-section-player-shell
351
347
  show-toolbar={showToolbar}
352
348
  toolbar-position={toolbarPosition}
353
- enabled-tools={enabledTools}
354
349
  toolRegistry={toolRegistry}
355
350
  sectionHostButtons={sectionHostButtons}
356
351
  >
@@ -465,7 +460,7 @@ Canonical lifecycle stream (engine-routed, dispatched on the outer layout CE):
465
460
 
466
461
  - `pie-stage-change` — single typed transition stream covering
467
462
  `composed` → `engine-ready` → `interactive` → `disposed`. Payload is a
468
- `StageChangeDetail`. Replaces the legacy readiness vocabulary.
463
+ `StageChangeDetail`.
469
464
  - `pie-loading-complete` — fires once per cohort when every item has
470
465
  loaded (kernel-routed; gated on `interactive`).
471
466
  - `framework-error` — canonical error event for any failure crossing the
@@ -479,9 +474,7 @@ Canonical lifecycle stream (engine-routed, dispatched on the outer layout CE):
479
474
  engine-bridge emit on the layout host. The single-emit contract is
480
475
  pinned by `tests/section-player-framework-error-dual-emit.test.ts`.
481
476
  Direct listeners attached to `<pie-assessment-toolkit>` itself
482
- still see the toolkit's own emit. The previous dual-emit on the
483
- layout host was removed in the broad architecture review compat
484
- sweep.
477
+ still see the toolkit's own emit.
485
478
 
486
479
  Callback-prop mirrors with two-tier precedence (`runtime.<key>` wins over
487
480
  the top-level prop):
@@ -494,7 +487,7 @@ the top-level prop):
494
487
  `pie-section-player-base`. Fires exactly once per error regardless of
495
488
  wrapper depth (delivered through the package-internal
496
489
  `FrameworkErrorBus`). The `framework-error` DOM event on the layout
497
- CE host is also single-fire post-compat-sweep; consume either.
490
+ CE host is also single-fire; consume either.
498
491
 
499
492
  Section-player owned instrumentation stream:
500
493
 
@@ -504,12 +497,7 @@ Section-player owned instrumentation stream:
504
497
  - `pie-section-composition-changed`
505
498
  - `pie-section-framework-error`
506
499
 
507
- The deprecated readiness aliases (`readiness-change`,
508
- `interaction-ready`, `ready`) and their `legacy-event-bridge`, along
509
- with the deprecated `section-controller-ready` Svelte/DOM event and
510
- its `pie-section-controller-ready` instrumentation mapping, were
511
- removed in the broad architecture review compat sweep. Migrate
512
- consumers as follows:
500
+ Build consumers against these canonical lifecycle events:
513
501
 
514
502
  - `readiness-change` → listen for `pie-stage-change`. The readiness
515
503
  payload is also available via `selectReadiness()` /