@ohhwells/bridge 0.1.113-next.300 → 0.1.113-next.301

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.cjs CHANGED
@@ -20359,6 +20359,23 @@ function OhhwellsBridge() {
20359
20359
  if (selectedMediaElRef.current && !selectedMediaElRef.current.contains(target) && !target.closest("[data-ohw-media-overlay], [data-ohw-edit-chrome], [data-ohw-item-interaction]")) {
20360
20360
  clearMediaSelectionRef.current();
20361
20361
  }
20362
+ if (selectedMediaElRef.current && target.closest("[data-ohw-media-overlay]") && !findClosestButtonLike(target)) {
20363
+ const hit = findImageAtPoint(e.clientX, e.clientY, false);
20364
+ if (hit && hit !== selectedMediaElRef.current) {
20365
+ e.preventDefault();
20366
+ e.stopPropagation();
20367
+ const fullBleedSectionId = fullBleedSectionIdOf(hit);
20368
+ if (fullBleedSectionId && fullBleedSectionId !== selectedAiSectionIdRef.current) {
20369
+ clearMediaSelectionRef.current();
20370
+ deselectRef.current();
20371
+ deactivateRef.current();
20372
+ aiSectionApiRef.current?.selectFromElement(hit);
20373
+ return;
20374
+ }
20375
+ selectMediaElementRef.current(hit);
20376
+ return;
20377
+ }
20378
+ }
20362
20379
  {
20363
20380
  const formEl = getFormElement(target);
20364
20381
  const onSuccessText = target.closest(`[${SUCCESS_TEXT_ATTR}]`);