@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/dist/policies/index.d.ts
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
-
import { SectionPlayerPolicies } from './types.js';
|
|
1
|
+
import { SectionPlayerAutoFocusStrategy, SectionPlayerFocusPolicy, SectionPlayerPolicies } from './types.js';
|
|
2
|
+
export declare const DEFAULT_FOCUS_POLICY: SectionPlayerFocusPolicy;
|
|
2
3
|
export declare const DEFAULT_SECTION_PLAYER_POLICIES: SectionPlayerPolicies;
|
|
4
|
+
/**
|
|
5
|
+
* Whether the section-level element preload pipeline should run. Defaults to
|
|
6
|
+
* `true` when the policy is unset or partially set so existing hosts are
|
|
7
|
+
* unaffected. Hosts opt out by passing `policies.preload.enabled === false`,
|
|
8
|
+
* which short-circuits `warmupSectionElements` in `SectionItemsPane`. Items
|
|
9
|
+
* still mount and item-players register their own elements on demand.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isPreloadEnabled(policies: SectionPlayerPolicies | null | undefined): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the section-player layout elements should attach the
|
|
14
|
+
* instrumentation event bridge. Defaults to `true` when the policy is unset
|
|
15
|
+
* or partially set. Hosts opt out by passing
|
|
16
|
+
* `policies.telemetry.enabled === false`, which skips
|
|
17
|
+
* `attachInstrumentationEventBridge` setup entirely. Hosts that want a
|
|
18
|
+
* different shape of opt-out can still supply a custom
|
|
19
|
+
* `instrumentationProvider`.
|
|
20
|
+
*/
|
|
21
|
+
export declare function isTelemetryEnabled(policies: SectionPlayerPolicies | null | undefined): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the auto-focus strategy from a focus policy input, falling back to
|
|
24
|
+
* the package default (`"start-of-content"`) when the policy is unset or
|
|
25
|
+
* leaves `autoFocus` undefined.
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveAutoFocusStrategy(policy: SectionPlayerFocusPolicy | null | undefined): SectionPlayerAutoFocusStrategy;
|
|
3
28
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/policies/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/policies/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,8BAA8B,EAC9B,wBAAwB,EACxB,qBAAqB,EACrB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,oBAAoB,EAAE,wBAElC,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,qBAK7C,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC/B,QAAQ,EAAE,qBAAqB,GAAG,IAAI,GAAG,SAAS,GAChD,OAAO,CAET;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,qBAAqB,GAAG,IAAI,GAAG,SAAS,GAChD,OAAO,CAET;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,GACjD,8BAA8B,CAGhC"}
|
package/dist/policies/types.d.ts
CHANGED
|
@@ -5,8 +5,25 @@ export type SectionPlayerReadinessPolicy = {
|
|
|
5
5
|
export type SectionPlayerPreloadPolicy = {
|
|
6
6
|
enabled: boolean;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Strategy the section player uses to move focus after every navigation event
|
|
10
|
+
* (Next / Back / navigateTo) and when the host calls `focusStart()` on the
|
|
11
|
+
* layout element (Skip-to-Main).
|
|
12
|
+
*
|
|
13
|
+
* - `"start-of-content"` (default): focus the passage card when present,
|
|
14
|
+
* else the first item card. Matches assessment UX where Skip-to-Main and
|
|
15
|
+
* navigation land in the same place. Best for one-item-per-page layouts.
|
|
16
|
+
* - `"current-item"`: focus the newly-active item card (queried as
|
|
17
|
+
* `pie-section-player-item-card[is-current]`). Best for stacked/list
|
|
18
|
+
* layouts where multiple items are visible at once.
|
|
19
|
+
* - `"none"`: framework never moves focus on navigation; the host owns it
|
|
20
|
+
* entirely. `focusStart()` still moves focus (defaults to
|
|
21
|
+
* start-of-content) because hosts only call it when they want focus
|
|
22
|
+
* to move.
|
|
23
|
+
*/
|
|
24
|
+
export type SectionPlayerAutoFocusStrategy = "none" | "start-of-content" | "current-item";
|
|
8
25
|
export type SectionPlayerFocusPolicy = {
|
|
9
|
-
|
|
26
|
+
autoFocus: SectionPlayerAutoFocusStrategy;
|
|
10
27
|
};
|
|
11
28
|
export type SectionPlayerTelemetryPolicy = {
|
|
12
29
|
enabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/policies/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AAExF,MAAM,MAAM,4BAA4B,GAAG;IAC1C,IAAI,EAAE,aAAa,GAAG,QAAQ,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACtC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/policies/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AAExF,MAAM,MAAM,4BAA4B,GAAG;IAC1C,IAAI,EAAE,aAAa,GAAG,QAAQ,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,8BAA8B,GACvC,MAAM,GACN,kBAAkB,GAClB,cAAc,CAAC;AAElB,MAAM,MAAM,wBAAwB,GAAG;IACtC,SAAS,EAAE,8BAA8B,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IAC1C,OAAO,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,SAAS,EAAE,4BAA4B,CAAC;IACxC,OAAO,EAAE,0BAA0B,CAAC;IACpC,KAAK,EAAE,wBAAwB,CAAC;IAChC,SAAS,EAAE,4BAA4B,CAAC;CACxC,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACtC,iBAAiB,CAAC,MAAM,EAAE,kCAAkC,GAAG,OAAO,CAAC;CACvE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-section-player",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.31",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Web component for rendering QTI 3.0 assessment sections with passages and items",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"types": "./dist/pie-section-player.d.ts",
|
|
30
30
|
"import": "./dist/pie-section-player.js"
|
|
31
31
|
},
|
|
32
|
+
"./components/section-player-tabbed-element": {
|
|
33
|
+
"types": "./dist/pie-section-player.d.ts",
|
|
34
|
+
"import": "./dist/pie-section-player.js"
|
|
35
|
+
},
|
|
32
36
|
"./components/section-player-shell-element": {
|
|
33
37
|
"types": "./dist/pie-section-player.d.ts",
|
|
34
38
|
"import": "./dist/pie-section-player.js"
|
|
@@ -76,10 +80,6 @@
|
|
|
76
80
|
"./policies": {
|
|
77
81
|
"types": "./dist/pie-section-player.d.ts",
|
|
78
82
|
"import": "./dist/pie-section-player.js"
|
|
79
|
-
},
|
|
80
|
-
"./utils/player-preload": {
|
|
81
|
-
"types": "./dist/utils/player-preload.d.ts",
|
|
82
|
-
"import": "./dist/utils/player-preload.js"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"files": [
|
|
@@ -90,10 +90,11 @@
|
|
|
90
90
|
"dev": "vite build --watch",
|
|
91
91
|
"typecheck": "tsc --noEmit",
|
|
92
92
|
"check": "svelte-check --tsconfig ./tsconfig.svelte-check.json --compiler-warnings options_missing_custom_element:ignore",
|
|
93
|
-
"lint": "biome check ."
|
|
93
|
+
"lint": "biome check .",
|
|
94
|
+
"test": "bun test '.test.ts'"
|
|
94
95
|
},
|
|
95
96
|
"peerDependencies": {
|
|
96
|
-
"@pie-players/pie-tool-annotation-toolbar": "0.3.
|
|
97
|
+
"@pie-players/pie-tool-annotation-toolbar": "0.3.31"
|
|
97
98
|
},
|
|
98
99
|
"peerDependenciesMeta": {
|
|
99
100
|
"@pie-players/pie-tool-annotation-toolbar": {
|
|
@@ -101,25 +102,26 @@
|
|
|
101
102
|
}
|
|
102
103
|
},
|
|
103
104
|
"dependencies": {
|
|
104
|
-
"@pie-players/pie-assessment-toolkit": "0.3.
|
|
105
|
-
"@pie-players/pie-item-player": "0.3.
|
|
106
|
-
"@pie-players/pie-context": "0.3.
|
|
107
|
-
"@pie-players/pie-players-shared": "0.3.
|
|
108
|
-
"@pie-players/pie-tool-calculator-desmos": "0.3.
|
|
109
|
-
"@pie-players/pie-tool-text-to-speech": "0.3.
|
|
110
|
-
"@pie-players/pie-tool-tts-inline": "0.3.
|
|
111
|
-
"@pie-players/pie-toolbars": "0.3.
|
|
105
|
+
"@pie-players/pie-assessment-toolkit": "0.3.31",
|
|
106
|
+
"@pie-players/pie-item-player": "0.3.31",
|
|
107
|
+
"@pie-players/pie-context": "0.3.31",
|
|
108
|
+
"@pie-players/pie-players-shared": "0.3.31",
|
|
109
|
+
"@pie-players/pie-tool-calculator-desmos": "0.3.31",
|
|
110
|
+
"@pie-players/pie-tool-text-to-speech": "0.3.31",
|
|
111
|
+
"@pie-players/pie-tool-tts-inline": "0.3.31",
|
|
112
|
+
"@pie-players/pie-toolbars": "0.3.31"
|
|
112
113
|
},
|
|
113
114
|
"devDependencies": {
|
|
114
115
|
"@axe-core/playwright": "^4.11.1",
|
|
115
|
-
"@biomejs/biome": "^2.
|
|
116
|
-
"@
|
|
116
|
+
"@biomejs/biome": "^2.4.12",
|
|
117
|
+
"@happy-dom/global-registrator": "^20.9.0",
|
|
118
|
+
"@playwright/test": "^1.59.1",
|
|
117
119
|
"@sveltejs/vite-plugin-svelte": "^7.0.0",
|
|
118
120
|
"@types/node": "^25.1.0",
|
|
119
121
|
"svelte": "^5.54.0",
|
|
120
|
-
"svelte-check": "^4.4.
|
|
122
|
+
"svelte-check": "^4.4.6",
|
|
121
123
|
"typescript": "^5.9.3",
|
|
122
|
-
"vite": "^8.0.
|
|
124
|
+
"vite": "^8.0.10",
|
|
123
125
|
"vite-plugin-dts": "^4.5.4"
|
|
124
126
|
},
|
|
125
127
|
"homepage": "https://github.com/pie-framework/pie-players/tree/master/packages/section-player#readme",
|