From 5e789a38cfdad8a457b7077c0f16092d33d41c48 Mon Sep 17 00:00:00 2001 From: "igor.js" <2278164+igorjs@users.noreply.github.com> Date: Fri, 26 Apr 2024 04:19:59 +0000 Subject: [PATCH 1/2] Fixes wrong event target when loading inside shadow dom --- src/hooks/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/index.ts b/src/hooks/index.ts index c99e5d42..cd549308 100644 --- a/src/hooks/index.ts +++ b/src/hooks/index.ts @@ -6,7 +6,7 @@ export default function useOnClickOutside( ) { useEffect(() => { const listener = (event: MouseEvent | TouchEvent) => { - if (!ref.current || ref.current.contains(event.target as Node)) { + if (!ref.current || ref.current.contains(event.composedPath()[0] as Node)) { return; } From e7dc6bf979002d0d26660d53aba752f20447906c Mon Sep 17 00:00:00 2001 From: "igor.js" <2278164+igorjs@users.noreply.github.com> Date: Fri, 26 Apr 2024 04:20:51 +0000 Subject: [PATCH 2/2] Ensure the published package is always public --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ac9c06cf..9647e90c 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "code-style": "npm run pret && npm run lint", "code-style:fix": "npm run pret:fix && npm run pret:fix", "build": "npm run code-style && npm run clean && rollup -c", - "pub": "npm run build && npm publish", + "pub": "npm run build && npm publish --access public", "dev": "next dev -p 8888", "prepare": "husky install" },