@mulmoclaude/collection-plugin 0.13.1 → 0.13.2
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/vue/components/CollectionView.vue.d.ts.map +1 -1
- package/dist/vue.cjs +12 -2
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.js +12 -2
- package/dist/vue.js.map +1 -1
- package/package.json +3 -3
package/dist/vue.js
CHANGED
|
@@ -4461,8 +4461,18 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
4461
4461
|
const activeFlagFilterCount = computed(() => flagChips.value.filter((chip) => flagFilterMode(chip.key) !== void 0).length);
|
|
4462
4462
|
const filterMenuOpen = ref(false);
|
|
4463
4463
|
const filterMenuRef = ref(null);
|
|
4464
|
+
/** Shadow-DOM-safe "did this event land inside the element?". A document-level
|
|
4465
|
+
* listener sees `event.target` retargeted to the shadow HOST when the
|
|
4466
|
+
* component is mounted in a shadow root (MulmoTerminal's PluginFrame), so
|
|
4467
|
+
* `element.contains()` is always false there and the menu closes on the
|
|
4468
|
+
* mousedown before the inner button's click can fire. `composedPath()` still
|
|
4469
|
+
* lists the element for open shadow trees — and in the light DOM too, so both
|
|
4470
|
+
* hosts share this one test. */
|
|
4471
|
+
function eventInsideElement(event, element) {
|
|
4472
|
+
return element !== null && event.composedPath().includes(element);
|
|
4473
|
+
}
|
|
4464
4474
|
function closeFilterMenuOnOutsideClick(event) {
|
|
4465
|
-
if (!filterMenuRef.value
|
|
4475
|
+
if (!eventInsideElement(event, filterMenuRef.value)) filterMenuOpen.value = false;
|
|
4466
4476
|
}
|
|
4467
4477
|
watch(filterMenuOpen, (open) => {
|
|
4468
4478
|
if (open) document.addEventListener("mousedown", closeFilterMenuOnOutsideClick);
|
|
@@ -4991,7 +5001,7 @@ var CollectionView_default = /* @__PURE__ */ defineComponent({
|
|
|
4991
5001
|
addMenuOpen.value = !addMenuOpen.value;
|
|
4992
5002
|
}
|
|
4993
5003
|
function closeAddMenuOnOutsideClick(event) {
|
|
4994
|
-
if (!addMenuRef.value
|
|
5004
|
+
if (!eventInsideElement(event, addMenuRef.value)) addMenuOpen.value = false;
|
|
4995
5005
|
}
|
|
4996
5006
|
watch(addMenuOpen, (open) => {
|
|
4997
5007
|
if (open) document.addEventListener("mousedown", closeAddMenuOnOutsideClick);
|