@social-mail/social-mail-client 1.9.99 → 1.9.100
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/css-for-email.js +7 -3
- package/package.json +1 -1
package/css-for-email.js
CHANGED
|
@@ -23,10 +23,14 @@ async function flattenStyleSheets() {
|
|
|
23
23
|
|
|
24
24
|
const te = new TextEncoder();
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
function encodeTo36(text) {
|
|
26
|
+
async function encodeTo36(text) {
|
|
28
27
|
const buffer = te.encode(text);
|
|
29
|
-
|
|
28
|
+
const hash = await window.crypto.subtle.digest("SHA-1", buffer);
|
|
29
|
+
let b = 0n;
|
|
30
|
+
for(const byte of hash) {
|
|
31
|
+
b = (b < 8n) | byte;
|
|
32
|
+
}
|
|
33
|
+
return b.toString(36);
|
|
30
34
|
}
|
|
31
35
|
|
|
32
36
|
async function flattenStyler() {
|