@readium/speech 0.12.0 → 0.13.0
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/build/decorator/createLocator.d.ts +1 -0
- package/build/index.js +16 -12
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -2863,17 +2863,17 @@ function $s(n) {
|
|
|
2863
2863
|
});
|
|
2864
2864
|
}
|
|
2865
2865
|
function Gs(n, e = window) {
|
|
2866
|
-
const {
|
|
2867
|
-
|
|
2868
|
-
const
|
|
2869
|
-
fragments:
|
|
2870
|
-
otherLocations:
|
|
2866
|
+
const { href: t, text: s, cssSelector: i, domRange: a, fragment: r } = n, o = s ? new bn(s) : void 0, l = i || a ? /* @__PURE__ */ new Map() : void 0;
|
|
2867
|
+
l && (i && l.set("cssSelector", i), a && l.set("domRange", $s(a).serialize()));
|
|
2868
|
+
const u = l !== void 0 || r !== void 0 ? new wn({
|
|
2869
|
+
fragments: r ? [r] : void 0,
|
|
2870
|
+
otherLocations: l
|
|
2871
2871
|
}) : void 0;
|
|
2872
2872
|
return new kn({
|
|
2873
|
-
href: e.location.href,
|
|
2873
|
+
href: t ?? e.location.href,
|
|
2874
2874
|
type: "text/html",
|
|
2875
|
-
text:
|
|
2876
|
-
locations:
|
|
2875
|
+
text: o,
|
|
2876
|
+
locations: u
|
|
2877
2877
|
});
|
|
2878
2878
|
}
|
|
2879
2879
|
class Ks extends vn {
|
|
@@ -3799,7 +3799,9 @@ function $e(n) {
|
|
|
3799
3799
|
}
|
|
3800
3800
|
function H(n, e) {
|
|
3801
3801
|
const t = n.cssSelector ?? n.domRange?.start.cssSelector;
|
|
3802
|
-
|
|
3802
|
+
if (!t) return { ...n, text: { highlight: e } };
|
|
3803
|
+
const s = { cssSelector: t, text: { highlight: e } };
|
|
3804
|
+
return n.href !== void 0 && (s.href = n.href), s;
|
|
3803
3805
|
}
|
|
3804
3806
|
function A(n, e) {
|
|
3805
3807
|
const t = Xe(n);
|
|
@@ -3976,9 +3978,11 @@ function pe(n) {
|
|
|
3976
3978
|
return { joined: e, ranges: t };
|
|
3977
3979
|
}
|
|
3978
3980
|
function Ce(n, e) {
|
|
3979
|
-
const t = Rn(n);
|
|
3980
|
-
if (t)
|
|
3981
|
-
|
|
3981
|
+
const t = Rn(n), s = A(n, e.ancestorChains)?.ref;
|
|
3982
|
+
if (t) {
|
|
3983
|
+
const i = { cssSelector: t };
|
|
3984
|
+
return s?.href !== void 0 && (i.href = s.href), St(i);
|
|
3985
|
+
}
|
|
3982
3986
|
return s && St(s);
|
|
3983
3987
|
}
|
|
3984
3988
|
function Ni(n, e, t) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@readium/speech",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "A TypeScript library for implementing read aloud features with Web technologies, following best practices for digital publishing.",
|
|
5
5
|
"author": "Readium Foundation",
|
|
6
6
|
"keywords": [
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@readium/decorator": "^1.2.5",
|
|
65
|
-
"@readium/guided-navigation": "^1.0
|
|
65
|
+
"@readium/guided-navigation": "^1.1.0",
|
|
66
66
|
"@readium/helpers": "^1.2.0",
|
|
67
67
|
"@readium/shared": "^2.7.0",
|
|
68
68
|
"i18next": "^26.4.0"
|