@superblocksteam/library 2.0.37-next.24 → 2.0.37-next.25
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.js +11 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3196,8 +3196,12 @@ const ReactiveComponent = observer(function Component$1({ Component: Component$2
|
|
|
3196
3196
|
const editorClickHandler = editorProps?.onClick;
|
|
3197
3197
|
const handleClick = useCallback(async (e, ...rest) => {
|
|
3198
3198
|
if (typeof realClickHandler === "function") realClickHandler(e, ...rest);
|
|
3199
|
-
|
|
3200
|
-
|
|
3199
|
+
try {
|
|
3200
|
+
const extraClickHandler = editorClickHandler;
|
|
3201
|
+
if (typeof extraClickHandler === "function") extraClickHandler(e);
|
|
3202
|
+
} catch (error) {
|
|
3203
|
+
console.error("Editor click handler error", error);
|
|
3204
|
+
}
|
|
3201
3205
|
}, [editorClickHandler, realClickHandler]);
|
|
3202
3206
|
const hide = shouldHideComponent(reactiveProps?.isVisible);
|
|
3203
3207
|
const fallbackPassthroughProps = useMemo(() => {
|
|
@@ -5043,16 +5047,19 @@ const EditWrapper = observer(function EditWrapper$1(props) {
|
|
|
5043
5047
|
const { onContextMenu } = useRightClickMenu({ sourceId: props.identifier.sourceId });
|
|
5044
5048
|
const showVisibilityBackground = props.widgetProps.isVisible === false && !editStore.ui.getSelectedSourceIds().includes(props.identifier.sourceId);
|
|
5045
5049
|
const handleClick = useCallback((ev) => {
|
|
5050
|
+
const stopPropagation = () => {
|
|
5051
|
+
if (ev.stopPropagation) ev.stopPropagation();
|
|
5052
|
+
};
|
|
5046
5053
|
const editStore$1 = getEditStore();
|
|
5047
5054
|
if (ev.altKey || editStore$1.ai.getIsTaggingEnabled() && editStore$1.ai.shouldToggleComponentInAiContext()) {
|
|
5048
5055
|
const sourceId = props.identifier.sourceId;
|
|
5049
5056
|
const instanceId = props.identifier.instanceId;
|
|
5050
5057
|
editorBridge.toggleComponentInAiContext(sourceId, instanceId);
|
|
5051
|
-
|
|
5058
|
+
stopPropagation();
|
|
5052
5059
|
return;
|
|
5053
5060
|
}
|
|
5054
5061
|
editStore$1.ui.selectWidget(props.identifier.instanceId, ev.shiftKey === true);
|
|
5055
|
-
|
|
5062
|
+
stopPropagation();
|
|
5056
5063
|
}, [props.identifier.sourceId, props.identifier.instanceId]);
|
|
5057
5064
|
const dropTargetRef = useRef(null);
|
|
5058
5065
|
const handleRef = useCallback((el) => {
|