@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.
@@ -1 +1 @@
1
- {"version":3,"file":"CollectionView.vue.d.ts","sourceRoot":"","sources":["../../../src/vue/components/CollectionView.vue"],"names":[],"mappings":"AA+vFA,OAAO,EAQL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EAGrB,MAAM,uBAAuB,CAAC;AAyC/B;;;;;;;;;6CAS6C;AAC7C,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;;;uBAKmB;IACnB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;4EAGwE;IACxE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;wDAGoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;4EACwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AA64IF,QAAA,MAAM,YAAY;;;cAl4IiB,eAAe;qBAAe,MAAM;oBAAc,MAAM;;;;;cAAxD,eAAe;qBAAe,MAAM;oBAAc,MAAM;;kFAq4IzF,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
1
+ {"version":3,"file":"CollectionView.vue.d.ts","sourceRoot":"","sources":["../../../src/vue/components/CollectionView.vue"],"names":[],"mappings":"AA0wFA,OAAO,EAQL,KAAK,kBAAkB,EACvB,KAAK,eAAe,EAGrB,MAAM,uBAAuB,CAAC;AAyC/B;;;;;;;;;6CAS6C;AAC7C,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C;;;;;uBAKmB;IACnB,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;4EAGwE;IACxE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;wDAGoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;4EACwE;IACxE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAw5IF,QAAA,MAAM,YAAY;;;cA74IiB,eAAe;qBAAe,MAAM;oBAAc,MAAM;;;;;cAAxD,eAAe;qBAAe,MAAM;oBAAc,MAAM;;kFAg5IzF,CAAC;wBACkB,OAAO,YAAY;AAAxC,wBAAyC"}
package/dist/vue.cjs CHANGED
@@ -4485,8 +4485,18 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
4485
4485
  const activeFlagFilterCount = (0, vue.computed)(() => flagChips.value.filter((chip) => flagFilterMode(chip.key) !== void 0).length);
4486
4486
  const filterMenuOpen = (0, vue.ref)(false);
4487
4487
  const filterMenuRef = (0, vue.ref)(null);
4488
+ /** Shadow-DOM-safe "did this event land inside the element?". A document-level
4489
+ * listener sees `event.target` retargeted to the shadow HOST when the
4490
+ * component is mounted in a shadow root (MulmoTerminal's PluginFrame), so
4491
+ * `element.contains()` is always false there and the menu closes on the
4492
+ * mousedown before the inner button's click can fire. `composedPath()` still
4493
+ * lists the element for open shadow trees — and in the light DOM too, so both
4494
+ * hosts share this one test. */
4495
+ function eventInsideElement(event, element) {
4496
+ return element !== null && event.composedPath().includes(element);
4497
+ }
4488
4498
  function closeFilterMenuOnOutsideClick(event) {
4489
- if (!filterMenuRef.value?.contains(event.target)) filterMenuOpen.value = false;
4499
+ if (!eventInsideElement(event, filterMenuRef.value)) filterMenuOpen.value = false;
4490
4500
  }
4491
4501
  (0, vue.watch)(filterMenuOpen, (open) => {
4492
4502
  if (open) document.addEventListener("mousedown", closeFilterMenuOnOutsideClick);
@@ -5015,7 +5025,7 @@ var CollectionView_default = /* @__PURE__ */ (0, vue.defineComponent)({
5015
5025
  addMenuOpen.value = !addMenuOpen.value;
5016
5026
  }
5017
5027
  function closeAddMenuOnOutsideClick(event) {
5018
- if (!addMenuRef.value?.contains(event.target)) addMenuOpen.value = false;
5028
+ if (!eventInsideElement(event, addMenuRef.value)) addMenuOpen.value = false;
5019
5029
  }
5020
5030
  (0, vue.watch)(addMenuOpen, (open) => {
5021
5031
  if (open) document.addEventListener("mousedown", closeAddMenuOnOutsideClick);