@v-c/util 1.2.0 → 1.2.1

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,8 +1,8 @@
1
1
  /**
2
2
  * Check if is in shadowRoot
3
3
  */
4
- export declare function inShadow(ele: Node): boolean;
4
+ export declare function inShadow(ele?: Node | null): boolean;
5
5
  /**
6
6
  * Return shadowRoot if possible
7
7
  */
8
- export declare function getShadowRoot(ele: Node): ShadowRoot | null;
8
+ export declare function getShadowRoot(ele?: Node | null): ShadowRoot | null;
@@ -6,6 +6,7 @@ function getRoot(ele) {
6
6
  * Check if is in shadowRoot
7
7
  */
8
8
  function inShadow(ele) {
9
+ if (typeof ShadowRoot === "undefined") return false;
9
10
  return getRoot(ele) instanceof ShadowRoot;
10
11
  }
11
12
  /**
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@v-c/util",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.2.1",
5
5
  "description": "Vue3 components utils",
6
+ "author": {
7
+ "name": "aibayanyu20",
8
+ "email": "aibayanyu@qq.com",
9
+ "url": "https://yanyu.me"
10
+ },
6
11
  "license": "MIT",
7
12
  "homepage": "https://github.com/antdv-next/vue-components/tree/next/packages/util",
8
13
  "repository": {
@@ -12,11 +17,6 @@
12
17
  "publishConfig": {
13
18
  "access": "public"
14
19
  },
15
- "author": {
16
- "name": "aibayanyu20",
17
- "email": "aibayanyu@qq.com",
18
- "url": "https://yanyu.me"
19
- },
20
20
  "exports": {
21
21
  ".": {
22
22
  "types": "./dist/index.d.ts",