@plasmicapp/react-web 0.2.320 → 0.2.322
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 +14 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/react-web.esm.js +14 -3
- package/dist/react-web.esm.js.map +1 -1
- package/package.json +4 -4
- package/skinny/dist/plume/triggered-overlay/index.js +9 -1
- package/skinny/dist/plume/triggered-overlay/index.js.map +1 -1
- 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,
|
|
@@ -3929,7 +3932,15 @@ function useTriggeredOverlay(plasmicClass, props, config, outerRef, isDismissabl
|
|
|
3929
3932
|
if (outerRef === void 0) { outerRef = null; }
|
|
3930
3933
|
if (isDismissable === void 0) { isDismissable = true; }
|
|
3931
3934
|
var overlayRef = React.useRef(null);
|
|
3932
|
-
var onOverlayRef = mergeRefs(overlayRef, outerRef)
|
|
3935
|
+
var onOverlayRef = mergeRefs(overlayRef, outerRef, function (ref) {
|
|
3936
|
+
// Workaround for https://github.com/adobe/react-spectrum/issues/1513
|
|
3937
|
+
// to avoid touch events leaking under the overlay when it is closed.
|
|
3938
|
+
if (ref) {
|
|
3939
|
+
ref.addEventListener("touchend", function (e) {
|
|
3940
|
+
e.preventDefault();
|
|
3941
|
+
});
|
|
3942
|
+
}
|
|
3943
|
+
});
|
|
3933
3944
|
var context = React.useContext(TriggeredOverlayContext);
|
|
3934
3945
|
if (!context) {
|
|
3935
3946
|
// If no context, then we are not being correctly used. Either complain, or
|