@novely/solid-renderer 0.10.0 → 0.10.1
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/dist/index.jsx +24 -0
- package/package.json +1 -1
package/dist/index.jsx
CHANGED
|
@@ -3210,6 +3210,14 @@ var createSolidRenderer = ({
|
|
|
3210
3210
|
result ? result.then(resolve) : resolve();
|
|
3211
3211
|
return result;
|
|
3212
3212
|
},
|
|
3213
|
+
vibrate(pattern) {
|
|
3214
|
+
try {
|
|
3215
|
+
if ("vibrate" in navigator) {
|
|
3216
|
+
navigator.vibrate(pattern);
|
|
3217
|
+
}
|
|
3218
|
+
} catch {
|
|
3219
|
+
}
|
|
3220
|
+
},
|
|
3213
3221
|
text(content, resolve, goingBack) {
|
|
3214
3222
|
setState("text", {
|
|
3215
3223
|
content,
|
|
@@ -3235,6 +3243,22 @@ var createSolidRenderer = ({
|
|
|
3235
3243
|
}
|
|
3236
3244
|
};
|
|
3237
3245
|
}
|
|
3246
|
+
},
|
|
3247
|
+
misc: {
|
|
3248
|
+
preloadImagesBlocking: (images) => {
|
|
3249
|
+
return Promise.allSettled([...images].map((src) => {
|
|
3250
|
+
const img = document.createElement("img");
|
|
3251
|
+
img.src = src;
|
|
3252
|
+
return new Promise((resolve, reject) => {
|
|
3253
|
+
if (img.complete && img.naturalHeight !== 0) {
|
|
3254
|
+
resolve(void 0);
|
|
3255
|
+
}
|
|
3256
|
+
img.addEventListener("load", resolve);
|
|
3257
|
+
img.addEventListener("abort", reject);
|
|
3258
|
+
img.addEventListener("error", reject);
|
|
3259
|
+
});
|
|
3260
|
+
}));
|
|
3261
|
+
}
|
|
3238
3262
|
}
|
|
3239
3263
|
};
|
|
3240
3264
|
},
|