@pie-players/pie-section-player 0.3.37 → 0.3.39

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.
@@ -1,5 +1,4 @@
1
- import { SectionPlayerAutoFocusStrategy, SectionPlayerFocusPolicy, SectionPlayerPolicies } from './types.js';
2
- export declare const DEFAULT_FOCUS_POLICY: SectionPlayerFocusPolicy;
1
+ import { SectionPlayerPolicies } from './types.js';
3
2
  export declare const DEFAULT_SECTION_PLAYER_POLICIES: SectionPlayerPolicies;
4
3
  /**
5
4
  * Whether the section-level element preload pipeline should run. Defaults to
@@ -19,10 +18,4 @@ export declare function isPreloadEnabled(policies: SectionPlayerPolicies | null
19
18
  * `instrumentationProvider`.
20
19
  */
21
20
  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;
28
21
  //# 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,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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/policies/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,eAAO,MAAM,+BAA+B,EAAE,qBAI7C,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"}
@@ -5,33 +5,12 @@ 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";
25
- export type SectionPlayerFocusPolicy = {
26
- autoFocus: SectionPlayerAutoFocusStrategy;
27
- };
28
8
  export type SectionPlayerTelemetryPolicy = {
29
9
  enabled: boolean;
30
10
  };
31
11
  export type SectionPlayerPolicies = {
32
12
  readiness: SectionPlayerReadinessPolicy;
33
13
  preload: SectionPlayerPreloadPolicy;
34
- focus: SectionPlayerFocusPolicy;
35
14
  telemetry: SectionPlayerTelemetryPolicy;
36
15
  };
37
16
  export interface ReadinessPolicyAdapter {
@@ -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;;;;;;;;;;;;;;;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"}
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,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,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.37",
3
+ "version": "0.3.39",
4
4
  "type": "module",
5
5
  "description": "Web component for rendering QTI 3.0 assessment sections with passages and items",
6
6
  "license": "MIT",
@@ -94,7 +94,7 @@
94
94
  "test": "bun test '.test.ts'"
95
95
  },
96
96
  "peerDependencies": {
97
- "@pie-players/pie-tool-annotation-toolbar": "0.3.37"
97
+ "@pie-players/pie-tool-annotation-toolbar": "0.3.39"
98
98
  },
99
99
  "peerDependenciesMeta": {
100
100
  "@pie-players/pie-tool-annotation-toolbar": {
@@ -102,14 +102,14 @@
102
102
  }
103
103
  },
104
104
  "dependencies": {
105
- "@pie-players/pie-assessment-toolkit": "0.3.37",
106
- "@pie-players/pie-item-player": "0.3.37",
107
- "@pie-players/pie-context": "0.3.37",
108
- "@pie-players/pie-players-shared": "0.3.37",
109
- "@pie-players/pie-tool-calculator-desmos": "0.3.37",
110
- "@pie-players/pie-tool-text-to-speech": "0.3.37",
111
- "@pie-players/pie-tool-tts-inline": "0.3.37",
112
- "@pie-players/pie-toolbars": "0.3.37"
105
+ "@pie-players/pie-assessment-toolkit": "0.3.39",
106
+ "@pie-players/pie-item-player": "0.3.39",
107
+ "@pie-players/pie-context": "0.3.39",
108
+ "@pie-players/pie-players-shared": "0.3.39",
109
+ "@pie-players/pie-tool-calculator-desmos": "0.3.39",
110
+ "@pie-players/pie-tool-text-to-speech": "0.3.39",
111
+ "@pie-players/pie-tool-tts-inline": "0.3.39",
112
+ "@pie-players/pie-toolbars": "0.3.39"
113
113
  },
114
114
  "devDependencies": {
115
115
  "@axe-core/playwright": "^4.11.1",