@internetarchive/bookreader 5.0.0-108 → 5.0.0-109
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@internetarchive/bookreader",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-109",
|
|
4
4
|
"description": "The Internet Archive BookReader.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
]
|
|
107
107
|
},
|
|
108
108
|
"scripts": {
|
|
109
|
-
"preversion": "
|
|
109
|
+
"preversion": "node scripts/preversion.js",
|
|
110
110
|
"version": "node scripts/version.js",
|
|
111
111
|
"postversion": "node scripts/postversion.js",
|
|
112
112
|
"build": "npm run clean && npx concurrently --group npm:build-js npm:build-css npm:build-assets npm:build-hypothesis npm:build-bergamot",
|
package/src/util/lit.js
CHANGED
|
@@ -6,12 +6,10 @@ import { css } from 'lit';
|
|
|
6
6
|
* @returns {import('lit').CSSResult}
|
|
7
7
|
*/
|
|
8
8
|
export function svgToDataUrl(svgTemplate) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
svgTemplate.strings[0]
|
|
15
|
-
);
|
|
9
|
+
// No clue why, on prod the template from the close icon comes in as a class instead of a TemplateResult.
|
|
10
|
+
// Might be a discrepancy with lit versions.
|
|
11
|
+
if (svgTemplate.prototype) svgTemplate = svgTemplate.prototype.render();
|
|
12
|
+
|
|
13
|
+
const svgString = svgTemplate.strings[0];
|
|
16
14
|
return css([`data:image/svg+xml;base64,${btoa(svgString.replace(/\n/g, ' '))}`]);
|
|
17
15
|
}
|