@plasmicapp/react-web 0.2.320 → 0.2.321
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/all.d.ts +8 -0
- package/dist/index.cjs.js +5 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/react-web.esm.js +5 -2
- package/dist/react-web.esm.js.map +1 -1
- package/package.json +4 -4
- package/skinny/dist/render/PlasmicImg/index.js +5 -2
- package/skinny/dist/render/PlasmicImg/index.js.map +1 -1
package/dist/react-web.esm.js
CHANGED
|
@@ -1393,14 +1393,17 @@ function getImageLoader(loader) {
|
|
|
1393
1393
|
return loader;
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
+
function isInternalKey(src) {
|
|
1397
|
+
return /^([a-f0-9]{32})\..{1,16}$/i.test(src);
|
|
1398
|
+
}
|
|
1396
1399
|
var PLASMIC_IMAGE_LOADER = {
|
|
1397
1400
|
supportsUrl: function (src) {
|
|
1398
|
-
return src.startsWith("http") && !isSvg(src);
|
|
1401
|
+
return (src.startsWith("http") || isInternalKey(src)) && !isSvg(src);
|
|
1399
1402
|
},
|
|
1400
1403
|
transformUrl: function (opts) {
|
|
1401
1404
|
var _a;
|
|
1402
1405
|
var params = [
|
|
1403
|
-
"src=".concat(opts.src),
|
|
1406
|
+
"src=".concat(encodeURIComponent(opts.src)),
|
|
1404
1407
|
opts.width ? "w=".concat(opts.width) : undefined,
|
|
1405
1408
|
"q=".concat((_a = opts.quality) !== null && _a !== void 0 ? _a : 75),
|
|
1406
1409
|
opts.format ? "f=".concat(opts.format) : undefined,
|