@pie-players/pie-tool-text-to-speech 0.3.45 → 0.3.47

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.
@@ -3716,10 +3716,12 @@ var Wf = {
3716
3716
  draggable: !0,
3717
3717
  resizable: !0,
3718
3718
  closeable: !0,
3719
- initialWidth: 720,
3720
- initialHeight: 620,
3721
- minWidth: 360,
3722
- minHeight: 420
3719
+ initialWidth: 380,
3720
+ initialHeight: 420,
3721
+ minWidth: 380,
3722
+ minHeight: 420,
3723
+ initialAlign: "bottom-right",
3724
+ initialMargin: 16
3723
3725
  }
3724
3726
  }],
3725
3727
  button: d,
@@ -8563,26 +8565,27 @@ function Fp(e, t) {
8563
8565
  }
8564
8566
  }
8565
8567
  function Wp(e, t = {}) {
8566
- const r = typeof document < "u" ? document.activeElement : null, n = (i) => {
8567
- if (i.key === "Escape") {
8568
+ const r = typeof document < "u" ? document.activeElement : null, n = t.wrap ?? !0, i = (o) => {
8569
+ if (o.key === "Escape") {
8568
8570
  t.onEscape?.();
8569
8571
  return;
8570
8572
  }
8571
- if (i.key !== "Tab") return;
8572
- const o = nc(e);
8573
- if (!o.length) {
8574
- i.preventDefault(), e.focus?.();
8573
+ if (o.key !== "Tab") return;
8574
+ const s = nc(e);
8575
+ if (!s.length) {
8576
+ if (!n) return;
8577
+ o.preventDefault(), e.focus?.();
8575
8578
  return;
8576
8579
  }
8577
- const s = document.activeElement, a = o.indexOf(s || o[0]);
8578
- if (i.shiftKey) {
8579
- a <= 0 && (i.preventDefault(), o[o.length - 1].focus());
8580
+ const a = document.activeElement, l = s.indexOf(a || s[0]);
8581
+ if (o.shiftKey) {
8582
+ l <= 0 && (n ? (o.preventDefault(), s[s.length - 1].focus()) : t.onTabExit?.("backward", o));
8580
8583
  return;
8581
8584
  }
8582
- a === o.length - 1 && (i.preventDefault(), o[0].focus());
8585
+ l === s.length - 1 && (n ? (o.preventDefault(), s[0].focus()) : t.onTabExit?.("forward", o));
8583
8586
  };
8584
- return queueMicrotask(() => Fp(e, t.initialFocus)), e.addEventListener("keydown", n), () => {
8585
- e.removeEventListener("keydown", n);
8587
+ return queueMicrotask(() => Fp(e, t.initialFocus)), e.addEventListener("keydown", i), () => {
8588
+ e.removeEventListener("keydown", i);
8586
8589
  try {
8587
8590
  r?.focus?.();
8588
8591
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-players/pie-tool-text-to-speech",
3
- "version": "0.3.45",
3
+ "version": "0.3.47",
4
4
  "type": "module",
5
5
  "description": "Text-to-Speech tool for PIE assessment player with word-level highlighting",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "unpkg": "./dist/tool-text-to-speech.js",
36
36
  "jsdelivr": "./dist/tool-text-to-speech.js",
37
37
  "dependencies": {
38
- "@pie-players/pie-assessment-toolkit": "0.3.45",
39
- "@pie-players/pie-players-shared": "0.3.45"
38
+ "@pie-players/pie-assessment-toolkit": "0.3.47",
39
+ "@pie-players/pie-players-shared": "0.3.47"
40
40
  },
41
41
  "types": "./dist/index.d.ts",
42
42
  "scripts": {