sanity-plugin-hotspot-array
5.0.165.0.17
dist/index.js~
dist/index.jsModified+13−15
Index: package/dist/index.js
===================================================================
--- package/dist/index.js
+++ package/dist/index.js
@@ -158,21 +158,8 @@
style: t13,
children: t22
}), $[62] = bounds, $[63] = handleDragEnd, $[64] = t13, $[65] = t22, $[66] = t23) : t23 = $[66], t23;
}
-const imageHotspotArrayPlugin = definePlugin({
- name: "image-hotspot-array",
- form: { components: { input: (props) => {
- if (props.schemaType.jsonType === "array" && props.schemaType.options?.imageHotspot) {
- let imageHotspotOptions = props.schemaType.options?.imageHotspot;
- if (imageHotspotOptions) return /* @__PURE__ */ jsx(ImageHotspotArray, {
- ...props,
- imageHotspotOptions
- });
- }
- return props.renderDefault(props);
- } } }
-});
/**
* Run effect only when component is unmounted.
*
* @param effect Effector to run on unmount
@@ -202,9 +189,8 @@
return useUnmountEffect(clear), useEffect(() => {
cb.current = callback;
}, deps), useMemo(() => {
let execute = () => {
- /* istanbul ignore next */
if (clear(), !lastCall.current) return;
let context = lastCall.current;
lastCall.current = void 0, cb.current.apply(context.this, context.args);
}, wrapped = function(...args) {
@@ -240,9 +226,8 @@
cbs || (cbs = /* @__PURE__ */ new Set(), callbacks.set(target, cbs), observer.observe(target)), cbs.add(callback);
},
unsubscribe(target, callback) {
let cbs = callbacks.get(target);
- /* istanbul ignore else */
cbs && (cbs.delete(callback), cbs.size === 0 && (callbacks.delete(target), observer.unobserve(target)));
}
}, observerSingleton;
}
@@ -391,7 +376,20 @@
function _temp2() {}
function _temp(initialValue) {
return initialValue;
}
+const imageHotspotArrayPlugin = definePlugin({
+ name: "image-hotspot-array",
+ form: { components: { input: (props) => {
+ if (props.schemaType.jsonType === "array" && props.schemaType.options?.imageHotspot) {
+ let imageHotspotOptions = props.schemaType.options?.imageHotspot;
+ if (imageHotspotOptions) return /* @__PURE__ */ jsx(ImageHotspotArray, {
+ ...props,
+ imageHotspotOptions
+ });
+ }
+ return props.renderDefault(props);
+ } } }
+});
export { ImageHotspotArray, imageHotspotArrayPlugin };
//# sourceMappingURL=index.js.map
\ No newline at end of file