@pie-players/pie-section-player 0.3.73 → 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.
Files changed (145) hide show
  1. package/README.md +395 -149
  2. package/dist/browser/assets/evaluation-worker-CORp9m0K.js +156459 -0
  3. package/dist/browser/chunks/ItemToolBar-jx38w99s-58defccc.js +1 -0
  4. package/dist/browser/chunks/PUA-tLuTiQ7--f2b27953.js +1 -0
  5. package/dist/browser/chunks/ToolCoordinator-cc2dc319.js +1 -0
  6. package/dist/browser/chunks/accents-BTUYmhn9-cafeb96e.js +1 -0
  7. package/dist/browser/chunks/accents-b-i-CngHZsLL-e0eb98fd.js +1 -0
  8. package/dist/browser/chunks/arabic-BzEHMVZD-30ac1ade.js +1 -0
  9. package/dist/browser/chunks/arrows-VjxlU-jv-2e17c192.js +1 -0
  10. package/dist/browser/chunks/base-dfd67c41.js +1 -0
  11. package/dist/browser/chunks/braille-BeWC_Ruq-a3bb8ef9.js +1 -0
  12. package/dist/browser/chunks/braille-d-Dk6J96GO-d832bfbf.js +1 -0
  13. package/dist/browser/chunks/browser-a3c32178.js +37 -0
  14. package/dist/browser/chunks/calculator-element-271c142f.js +13 -0
  15. package/dist/browser/chunks/calligraphic-Cew9cU3x-04cf0735.js +1 -0
  16. package/dist/browser/chunks/catalog-context-46d3e50e.js +1 -0
  17. package/dist/browser/chunks/catalog-owner-d602f784.js +1 -0
  18. package/dist/browser/chunks/cherokee-Cny3FYho-4da7d2f3.js +1 -0
  19. package/dist/browser/chunks/classPrivateFieldGet2-338e0179.js +1 -0
  20. package/dist/browser/chunks/cyrillic-CfCDulXU-5550df0b.js +1 -0
  21. package/dist/browser/chunks/cyrillic-ss-lU7bNGG9-12eb0188.js +1 -0
  22. package/dist/browser/chunks/defineProperty-a20a667d.js +1 -0
  23. package/dist/browser/chunks/devanagari-CDIz2h-r-18c38725.js +1 -0
  24. package/dist/browser/chunks/dist-41b39e7f.js +1 -0
  25. package/dist/browser/chunks/dist-59132a53.js +1 -0
  26. package/dist/browser/chunks/dist-60d7afef.js +1 -0
  27. package/dist/browser/chunks/dist-ca9b9622.js +1 -0
  28. package/dist/browser/chunks/double-struck-BpJEQk8y-500ce8dd.js +1 -0
  29. package/dist/browser/chunks/en-5ff22e17.js +1 -0
  30. package/dist/browser/chunks/es-a0ba6cb6.js +1 -0
  31. package/dist/browser/chunks/focus-trap-44913bf3.js +1 -0
  32. package/dist/browser/chunks/fraktur-rLEq9DEH-44cc14d8.js +1 -0
  33. package/dist/browser/chunks/greek-BlraJTyL-90ce8924.js +1 -0
  34. package/dist/browser/chunks/greek-ss-D-EN2PK0-91610739.js +1 -0
  35. package/dist/browser/chunks/hebrew-GiQZeybp-b583f555.js +1 -0
  36. package/dist/browser/chunks/latin-b-BhEnC7R2-d13e06ff.js +1 -0
  37. package/dist/browser/chunks/latin-bi-DqiIKv3U-1dec8705.js +1 -0
  38. package/dist/browser/chunks/latin-i-B1xtwaE1-21637466.js +1 -0
  39. package/dist/browser/chunks/latin-xfWFlLkD-5bcea5cf.js +1 -0
  40. package/dist/browser/chunks/logger-8b07fb72.js +1 -0
  41. package/dist/browser/chunks/marrows-DD1NgMQi-15b63755.js +1 -0
  42. package/dist/browser/chunks/math-DpWn1mbG-38eeb914.js +1 -0
  43. package/dist/browser/chunks/math-rendering-ready-9a0fd90a.js +1 -0
  44. package/dist/browser/chunks/mathjax-BKrHE4xs-3ca05bf6.js +232 -0
  45. package/dist/browser/chunks/module-0191e321.js +74 -0
  46. package/dist/browser/chunks/module-shim-58659a86.js +0 -0
  47. package/dist/browser/chunks/module-shim-b4470740.js +12 -0
  48. package/dist/browser/chunks/monospace-D116QD2a-98d484fd.js +1 -0
  49. package/dist/browser/chunks/monospace-ex-DcXpouKS-456b403c.js +1 -0
  50. package/dist/browser/chunks/monospace-l-Ct5wkMDs-f34a4a9e.js +1 -0
  51. package/dist/browser/chunks/mshapes-DCp86WSX-c0055952.js +1 -0
  52. package/dist/browser/chunks/nl-NL-364d61b9.js +1 -0
  53. package/dist/browser/chunks/nl-NL-8b7e6d4b.js +1 -0
  54. package/dist/browser/chunks/overlay-containment-edaaff13.js +1 -0
  55. package/dist/browser/chunks/overlay-placement-e8058232.js +1 -0
  56. package/dist/browser/chunks/phonetics-BwOCw2Y9-d2e3af59.js +1 -0
  57. package/dist/browser/chunks/phonetics-ss-CRtMn02f-579b6135.js +1 -0
  58. package/dist/browser/chunks/pie-api-client-687c319a.js +1 -0
  59. package/dist/browser/chunks/pointer-gesture-ce75f0a7.js +1 -0
  60. package/dist/browser/chunks/preload-helper-6ad28da3.js +1 -0
  61. package/dist/browser/chunks/provider-4c704118.js +1 -0
  62. package/dist/browser/chunks/rolldown-runtime-1287ba31.js +1 -0
  63. package/dist/browser/chunks/runtime-wcU7KOFU-ac86d7b8.js +8536 -0
  64. package/dist/browser/chunks/sanitize-svg-icon-b9082bba.js +3 -0
  65. package/dist/browser/chunks/sans-serif-BYPZKlE9-2efdbcd9.js +1 -0
  66. package/dist/browser/chunks/sans-serif-b-B0kRKiC--b5530dce.js +1 -0
  67. package/dist/browser/chunks/sans-serif-bi-DXWul6mu-5370dba4.js +1 -0
  68. package/dist/browser/chunks/sans-serif-ex-Boux1kMP-aa178f31.js +1 -0
  69. package/dist/browser/chunks/sans-serif-i-676RFaSO-2db54474.js +1 -0
  70. package/dist/browser/chunks/sans-serif-r-DrN9xdZt-0fc72eea.js +1 -0
  71. package/dist/browser/chunks/script-0ohehnXc-526904f4.js +1 -0
  72. package/dist/browser/chunks/shapes-BG47NodJ-d59b0eca.js +1 -0
  73. package/dist/browser/chunks/src-BcptuNS5-ed25d7fd.js +191 -0
  74. package/dist/browser/chunks/sre-0162a7a9.js +53 -0
  75. package/dist/browser/chunks/sre-engine-ace23548.js +1 -0
  76. package/dist/browser/chunks/sre-engine-jd8cc08x-42d270e5.js +1 -0
  77. package/dist/browser/chunks/sre-locales-112320af.js +1 -0
  78. package/dist/browser/chunks/symbols-BqnUxf_t-83087e87.js +1 -0
  79. package/dist/browser/chunks/symbols-b-i-eg9k5hmF-9c461ac2.js +1 -0
  80. package/dist/browser/chunks/tool-annotation-toolbar-997438b4.js +249 -0
  81. package/dist/browser/chunks/tool-answer-eliminator-35483abd.js +13 -0
  82. package/dist/browser/chunks/tool-color-scheme-b7de5cdf.js +26 -0
  83. package/dist/browser/chunks/tool-dictionary-cecff3b4.js +7 -0
  84. package/dist/browser/chunks/tool-graph-cb0338e8.js +11 -0
  85. package/dist/browser/chunks/tool-host-contract-b93b482c.js +1 -0
  86. package/dist/browser/chunks/tool-instance-id-2a92deb0.js +1 -0
  87. package/dist/browser/chunks/tool-line-reader-f8ef3c6a.js +62 -0
  88. package/dist/browser/chunks/tool-periodic-table-43b133b8.js +153 -0
  89. package/dist/browser/chunks/tool-picture-dictionary-33721e91.js +4 -0
  90. package/dist/browser/chunks/tool-protractor-23f77028.js +17 -0
  91. package/dist/browser/chunks/tool-ruler-1d9a03a6.js +15 -0
  92. package/dist/browser/chunks/tool-tts-inline-98c2ce7a.js +179 -0
  93. package/dist/browser/chunks/tts-runtime-config-a7ab1ad4.js +194 -0
  94. package/dist/browser/chunks/variants-2LRNhOUP-966fc49d.js +1 -0
  95. package/dist/browser/chunks/versioned-tag-54a76be9.js +1 -0
  96. package/dist/browser/pie-section-player.js +1727 -0
  97. package/dist/browser.d.ts +10 -0
  98. package/dist/chunks/ItemToolBar-jx38w99s-1287ba31.js +28 -0
  99. package/dist/chunks/module-shim-58659a86.js +2129 -0
  100. package/dist/chunks/{nl-NL-9312c316.js → nl-NL-364d61b9.js} +9 -26
  101. package/dist/chunks/sre-engine-jd8cc08x-42d270e5.js +8 -0
  102. package/dist/components/shared/composition.d.ts +3 -2
  103. package/dist/components/shared/framework-error-latch.d.ts +32 -0
  104. package/dist/components/shared/host-element.d.ts +10 -0
  105. package/dist/components/shared/kernel-host-default-body.d.ts +14 -0
  106. package/dist/components/shared/layout-host-methods.d.ts +385 -0
  107. package/dist/components/shared/missing-tool-providers.d.ts +16 -0
  108. package/dist/components/shared/player-preload.d.ts +14 -10
  109. package/dist/components/shared/section-player-backend-delivery.d.ts +1 -1
  110. package/dist/components/shared/section-player-card-context.d.ts +5 -1
  111. package/dist/components/shared/section-player-host-runtime.d.ts +32 -19
  112. package/dist/components/shared/section-player-layout-context.d.ts +77 -0
  113. package/dist/components/shared/section-player-own-event.d.ts +10 -0
  114. package/dist/components/shared/section-player-runtime-callbacks.d.ts +1 -1
  115. package/dist/components/shared/section-player-shell-layout.svelte.d.ts +3 -11
  116. package/dist/components/shared/section-player-view-state.d.ts +6 -1
  117. package/dist/components/shared/toolkit-ready-wait.d.ts +16 -0
  118. package/dist/contracts/host-hooks.d.ts +4 -12
  119. package/dist/contracts/host-hooks.js +0 -0
  120. package/dist/contracts/runtime-host-contract.d.ts +0 -5
  121. package/dist/contracts/runtime-host-contract.js +0 -0
  122. package/dist/controllers/SectionController.d.ts +14 -0
  123. package/dist/controllers/toolkit-section-contracts.d.ts +1 -17
  124. package/dist/controllers/types.d.ts +25 -11
  125. package/dist/item-section/index.d.ts +22 -0
  126. package/dist/item-section/index.js +37 -0
  127. package/dist/pie-section-player.d.ts +4 -6
  128. package/dist/pie-section-player.js +22006 -41076
  129. package/dist/policies/index.d.ts +5 -16
  130. package/dist/policies/index.js +17 -0
  131. package/dist/policies/types.d.ts +0 -4
  132. package/package.json +33 -68
  133. package/dist/chunks/module-a516757f.js +0 -73997
  134. package/dist/chunks/nl-NL-ef6dd604.js +0 -505
  135. package/dist/chunks/pie-api-client-22de9d9c.js +0 -168
  136. package/dist/chunks/rolldown-runtime-1287ba31.js +0 -20
  137. package/dist/chunks/sre-0162a7a9.js +0 -17637
  138. package/dist/components/item-shell-element.d.ts +0 -1
  139. package/dist/components/shared/shell-registration.d.ts +0 -55
  140. package/dist/contracts/layout-contract.d.ts +0 -17
  141. package/dist/contracts/layout-parity-metadata.d.ts +0 -4
  142. package/dist/contracts/public-events.d.ts +0 -93
  143. package/dist/contracts/stages.d.ts +0 -10
  144. package/dist/policies/guards.d.ts +0 -2
  145. package/dist/utils/z-index.d.ts +0 -5
@@ -1 +0,0 @@
1
- export {};
@@ -1,55 +0,0 @@
1
- /**
2
- * Registration dispatch for the item and passage shells.
3
- *
4
- * Registration is a statement of fact to the runtime, and the runtime takes it
5
- * literally: a `pie-register` makes the toolkit unregister and re-register the
6
- * content's accessibility catalogs, re-run `sectionEngine.register`, and
7
- * re-notify the section controller. Both shells used to dispatch it from the
8
- * same effect that attached their listeners, with `pie-unregister` in that
9
- * effect's cleanup — so every re-run announced a teardown and a rebuild of state
10
- * that had not moved, and between the two the content had no catalogs at all.
11
- *
12
- * Those effects re-run on prop changes, and a shell's props are re-applied
13
- * whenever its parent card's template updates. That made the dispatch the far
14
- * half of a cycle: a reader that re-renders in response to a catalog change
15
- * re-applies a shell's props, which re-registers, which changes catalogs again.
16
- * It shipped once at roughly a thousand rounds per item, ending in Svelte
17
- * abandoning the update at its depth limit with the DOM half-applied — and every
18
- * assertion about the rendered output passed while it was happening, because the
19
- * elements were all present.
20
- *
21
- * So the dispatcher keeps the last identity it announced and says nothing when
22
- * the next one matches.
23
- */
24
- export type ShellRegistrationIdentity = {
25
- kind: "item" | "passage";
26
- host: HTMLElement;
27
- itemId: string;
28
- canonicalItemId: string;
29
- contentKind: string;
30
- item: unknown;
31
- };
32
- export type ShellRegistrationDispatcher = {
33
- /**
34
- * Announce `identity` if it says anything new, and retire the live
35
- * registration when there is nothing left to describe — a shell without a host
36
- * or an id no longer stands for content, and leaving its registration behind
37
- * would strand it in the runtime.
38
- *
39
- * Never dispatches `pie-unregister` before a re-register: both registration
40
- * paths in the toolkit are keyed by element and replace what is there, so the
41
- * unregister only ever created the gap.
42
- */
43
- sync: (identity: ShellRegistrationIdentity | null) => void;
44
- /**
45
- * Retire the live registration, replaying the identity it was made under
46
- * rather than whatever the props say now — by the time a registration is
47
- * retired the props may already describe its replacement, and unregistering
48
- * under the new identity would leave the old one live.
49
- *
50
- * Belongs in a teardown that runs on teardown only. Attaching it to an effect
51
- * that re-runs on prop changes is what made the churn.
52
- */
53
- retire: () => void;
54
- };
55
- export declare function createShellRegistrationDispatcher(): ShellRegistrationDispatcher;
@@ -1,17 +0,0 @@
1
- import { SectionPlayerPublicEventName } from './public-events.js';
2
- export type SectionPlayerLayoutName = "splitpane" | "vertical" | "tabbed";
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" | "iifeBundleHost" | "toolRegistry" | "sectionHostButtons" | "itemHostButtons" | "passageHostButtons" | "policies" | "toolConfigStrictness" | "hooks" | "onFrameworkError" | "onStageChange" | "onLoadingComplete";
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
- };
@@ -1,4 +0,0 @@
1
- import { SectionPlayerLayoutContract } from './layout-contract.js';
2
- export declare const SPLITPANE_LAYOUT_CONTRACT: SectionPlayerLayoutContract;
3
- export declare const VERTICAL_LAYOUT_CONTRACT: SectionPlayerLayoutContract;
4
- export declare const TABBED_LAYOUT_CONTRACT: SectionPlayerLayoutContract;
@@ -1,93 +0,0 @@
1
- /**
2
- * Section-player layout-CE public DOM event vocabulary.
3
- *
4
- * **Engine routing (M7).** The *stage / loading-complete /
5
- * framework-error* family is dispatched on the layout CE host by the
6
- * section runtime engine
7
- * (`@pie-players/pie-assessment-toolkit/runtime/engine`) — not by an
8
- * in-CE `$effect` cluster. The kernel attaches the engine to the host
9
- * (`engine.attachHost({ host, sourceCe, frameworkErrorBus })`), and
10
- * the engine's DOM-event bridge dispatches `pie-stage-change`,
11
- * `pie-loading-complete`, and `framework-error`.
12
- *
13
- * **Kernel-side Svelte forwards (not engine-routed).** The
14
- * composition / session / runtime-tier family
15
- * (`composition-changed`, `session-changed`, `runtime-owned`,
16
- * `runtime-inherited`) is forwarded by the kernel's Svelte
17
- * `createEventDispatcher` from `<pie-section-player-base>` events; it
18
- * does not flow through the engine. This split is intentional: the
19
- * engine owns lifecycle and error reporting, while composition /
20
- * session forwarding stays in section-player because the shape is
21
- * section-player-specific and the engine has no opinion on it.
22
- *
23
- * **`framework-error` single-emit on the layout host.**
24
- * `<pie-assessment-toolkit>` nested inside a layout CE still
25
- * dispatches its own `framework-error` (with `bubbles: true,
26
- * composed: true`) so direct toolkit consumers keep working. The
27
- * kernel's `handleFrameworkError` listener intercepts that bubbled
28
- * emit at `<pie-section-player-base>` and calls
29
- * `event.stopPropagation()`, leaving the engine-bridge emit on the
30
- * layout host as the single canonical DOM surface for
31
- * section-player consumers. The single-emit contract is pinned by
32
- * `tests/section-player-framework-error-dual-emit.test.ts`. The
33
- * layout host does not receive duplicate framework-error events.
34
- *
35
- * Lifecycle should be consumed through canonical events:
36
- * - `readiness-change` → `pie-stage-change` (the readiness phase
37
- * is also reachable via `selectReadiness()` /
38
- * `getSnapshot().readiness`).
39
- * - `interaction-ready` → `pie-stage-change` filtered on
40
- * `detail.stage === "interactive"`.
41
- * - `ready` → `pie-loading-complete`.
42
- *
43
- * Controller readiness is available through
44
- * `waitForSectionController(timeoutMs)` / `getSectionController()` on the
45
- * layout CE, or by filtering `pie-stage-change` for
46
- * `detail.stage === "engine-ready"`.
47
- *
48
- * Source of truth for the names: `players-shared/src/pie/stages.ts`
49
- * and the `SectionEngineOutput` discriminator in
50
- * `assessment-toolkit/src/runtime/core/engine-output.ts`.
51
- */
52
- export declare const SECTION_PLAYER_PUBLIC_EVENTS: {
53
- readonly runtimeOwned: "runtime-owned";
54
- readonly runtimeInherited: "runtime-inherited";
55
- /**
56
- * Engine-routed (M7). Dispatched by
57
- * `framework-error-bridge.ts` on the layout CE host whenever the
58
- * engine receives a `framework-error` input. See class doc on
59
- * `FrameworkErrorBus` for the back-pressure / fan-out semantics.
60
- */
61
- readonly frameworkError: "framework-error";
62
- readonly compositionChanged: "composition-changed";
63
- readonly sessionChanged: "session-changed";
64
- /**
65
- * Engine-routed (M7). One DOM event family carries every stage
66
- * transition (`composed` → `engine-ready` → `interactive` →
67
- * `disposed`) with the discriminator in `event.detail.stage`.
68
- * Dispatched by the engine's `dom-event-bridge.ts` on each
69
- * `SectionEngineOutput` of kind `stage-change`. See
70
- * `packages/players-shared/src/pie/stages.ts`.
71
- */
72
- readonly stageChange: "pie-stage-change";
73
- /**
74
- * Engine-routed (M7). Companion to `stageChange`. Fires once per
75
- * cohort when every item in the section has finished loading
76
- * (`loadedCount === itemCount`), gated by the engine's
77
- * `interactive` state.
78
- */
79
- readonly loadingComplete: "pie-loading-complete";
80
- };
81
- export type SectionPlayerPublicEventName = (typeof SECTION_PLAYER_PUBLIC_EVENTS)[keyof typeof SECTION_PLAYER_PUBLIC_EVENTS];
82
- /**
83
- * Readiness phase reported by the engine's readiness derivation. The
84
- * type preserves the readiness payload shape used by
85
- * `selectReadiness()`.
86
- */
87
- export type SectionPlayerReadinessPhase = "bootstrapping" | "interaction-ready" | "loading" | "ready" | "error";
88
- export type SectionPlayerReadinessChangeDetail = {
89
- phase: SectionPlayerReadinessPhase;
90
- interactionReady: boolean;
91
- allLoadingComplete: boolean;
92
- reason?: string;
93
- };
@@ -1,10 +0,0 @@
1
- /**
2
- * Re-export shim for the canonical stage vocabulary.
3
- *
4
- * The contract types and tracker primitive live in
5
- * `@pie-players/pie-players-shared/pie` so both
6
- * `<pie-section-player-*>` and `<pie-assessment-toolkit>` import the
7
- * same source of truth (M6 Phase C).
8
- */
9
- export { STAGES, applicableStages, stageOrdinal, } from '@pie-players/pie-players-shared/pie';
10
- export type { LoadingCompleteDetail, Stage, StageChangeDetail, StageSourceCe, StageStatus, } from '@pie-players/pie-players-shared/pie';
@@ -1,2 +0,0 @@
1
- import { SectionPlayerPublicEventName } from '../contracts/public-events.js';
2
- export declare function assertPublicEventName(eventName: string): asserts eventName is SectionPlayerPublicEventName;
@@ -1,5 +0,0 @@
1
- /**
2
- * Canonical z-index layering is defined in assessment-toolkit.
3
- * Re-export locally so section-player consumers keep a stable import path.
4
- */
5
- export { ZIndexLayer } from '@pie-players/pie-assessment-toolkit';