@v-c/util 0.0.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.
Files changed (187) hide show
  1. package/LICENSE +21 -0
  2. package/dist/Children/isFragment.cjs +1 -0
  3. package/dist/Children/isFragment.d.ts +3 -0
  4. package/dist/Children/isFragment.js +7 -0
  5. package/dist/Children/toArray.cjs +1 -0
  6. package/dist/Children/toArray.d.ts +8 -0
  7. package/dist/Children/toArray.js +11 -0
  8. package/dist/Dom/addEventListener.cjs +1 -0
  9. package/dist/Dom/addEventListener.d.ts +8 -0
  10. package/dist/Dom/addEventListener.js +12 -0
  11. package/dist/Dom/canUseDom.cjs +1 -0
  12. package/dist/Dom/canUseDom.d.ts +1 -0
  13. package/dist/Dom/canUseDom.js +6 -0
  14. package/dist/Dom/class.cjs +1 -0
  15. package/dist/Dom/class.d.ts +3 -0
  16. package/dist/Dom/class.js +19 -0
  17. package/dist/Dom/contains.cjs +1 -0
  18. package/dist/Dom/contains.d.ts +1 -0
  19. package/dist/Dom/contains.js +16 -0
  20. package/dist/Dom/css.cjs +1 -0
  21. package/dist/Dom/css.d.ts +20 -0
  22. package/dist/Dom/css.js +75 -0
  23. package/dist/Dom/dynamicCSS.cjs +1 -0
  24. package/dist/Dom/dynamicCSS.d.ts +24 -0
  25. package/dist/Dom/dynamicCSS.js +78 -0
  26. package/dist/Dom/findDOMNode.cjs +1 -0
  27. package/dist/Dom/findDOMNode.d.ts +7 -0
  28. package/dist/Dom/findDOMNode.js +12 -0
  29. package/dist/Dom/focus.cjs +1 -0
  30. package/dist/Dom/focus.d.ts +8 -0
  31. package/dist/Dom/focus.js +40 -0
  32. package/dist/Dom/isVisible.cjs +1 -0
  33. package/dist/Dom/isVisible.d.ts +2 -0
  34. package/dist/Dom/isVisible.js +22 -0
  35. package/dist/Dom/scrollLocker.cjs +1 -0
  36. package/dist/Dom/scrollLocker.d.ts +12 -0
  37. package/dist/Dom/scrollLocker.js +81 -0
  38. package/dist/Dom/shadow.cjs +1 -0
  39. package/dist/Dom/shadow.d.ts +8 -0
  40. package/dist/Dom/shadow.js +14 -0
  41. package/dist/Dom/styleChecker.cjs +1 -0
  42. package/dist/Dom/styleChecker.d.ts +2 -0
  43. package/dist/Dom/styleChecker.js +20 -0
  44. package/dist/Dom/support.cjs +1 -0
  45. package/dist/Dom/support.d.ts +6 -0
  46. package/dist/Dom/support.js +24 -0
  47. package/dist/EventInterface.cjs +1 -0
  48. package/dist/EventInterface.d.ts +18 -0
  49. package/dist/EventInterface.js +1 -0
  50. package/dist/KeyCode.cjs +1 -0
  51. package/dist/KeyCode.d.ts +435 -0
  52. package/dist/KeyCode.js +516 -0
  53. package/dist/Portal.cjs +1 -0
  54. package/dist/Portal.d.ts +8 -0
  55. package/dist/Portal.js +38 -0
  56. package/dist/PortalWrapper.cjs +1 -0
  57. package/dist/PortalWrapper.d.ts +28 -0
  58. package/dist/PortalWrapper.js +114 -0
  59. package/dist/composeProps.cjs +1 -0
  60. package/dist/composeProps.d.ts +2 -0
  61. package/dist/composeProps.js +16 -0
  62. package/dist/createRef.cjs +1 -0
  63. package/dist/createRef.d.ts +12 -0
  64. package/dist/createRef.js +21 -0
  65. package/dist/debug/diff.cjs +1 -0
  66. package/dist/debug/diff.d.ts +1 -0
  67. package/dist/debug/diff.js +41 -0
  68. package/dist/deprecated.cjs +1 -0
  69. package/dist/deprecated.d.ts +1 -0
  70. package/dist/deprecated.js +8 -0
  71. package/dist/getScrollBarSize.cjs +1 -0
  72. package/dist/getScrollBarSize.d.ts +5 -0
  73. package/dist/getScrollBarSize.js +37 -0
  74. package/dist/guid.cjs +1 -0
  75. package/dist/guid.d.ts +1 -0
  76. package/dist/guid.js +7 -0
  77. package/dist/hooks/useId.cjs +1 -0
  78. package/dist/hooks/useId.d.ts +5 -0
  79. package/dist/hooks/useId.js +17 -0
  80. package/dist/hooks/useMemo.cjs +1 -0
  81. package/dist/hooks/useMemo.d.ts +3 -0
  82. package/dist/hooks/useMemo.js +10 -0
  83. package/dist/hooks/useMergedState.cjs +1 -0
  84. package/dist/hooks/useMergedState.d.ts +8 -0
  85. package/dist/hooks/useMergedState.js +21 -0
  86. package/dist/hooks/useState.cjs +1 -0
  87. package/dist/hooks/useState.d.ts +3 -0
  88. package/dist/hooks/useState.js +11 -0
  89. package/dist/index.cjs +1 -0
  90. package/dist/index.d.ts +3 -0
  91. package/dist/index.js +8 -0
  92. package/dist/isEqual.cjs +1 -0
  93. package/dist/isEqual.d.ts +8 -0
  94. package/dist/isEqual.js +32 -0
  95. package/dist/isMobile.cjs +1 -0
  96. package/dist/isMobile.d.ts +2 -0
  97. package/dist/isMobile.js +13 -0
  98. package/dist/omit.cjs +1 -0
  99. package/dist/omit.d.ts +1 -0
  100. package/dist/omit.js +9 -0
  101. package/dist/pickAttrs.cjs +18 -0
  102. package/dist/pickAttrs.d.ts +11 -0
  103. package/dist/pickAttrs.js +41 -0
  104. package/dist/props-util/index.cjs +1 -0
  105. package/dist/props-util/index.d.ts +2 -0
  106. package/dist/props-util/index.js +14 -0
  107. package/dist/raf.cjs +1 -0
  108. package/dist/raf.d.ts +6 -0
  109. package/dist/raf.js +30 -0
  110. package/dist/setStyle.cjs +1 -0
  111. package/dist/setStyle.d.ts +13 -0
  112. package/dist/setStyle.js +13 -0
  113. package/dist/switchScrollingEffect.cjs +1 -0
  114. package/dist/switchScrollingEffect.d.ts +2 -0
  115. package/dist/switchScrollingEffect.js +31 -0
  116. package/dist/test/domHook.cjs +1 -0
  117. package/dist/test/domHook.d.ts +8 -0
  118. package/dist/test/domHook.js +37 -0
  119. package/dist/type.cjs +1 -0
  120. package/dist/type.d.ts +63 -0
  121. package/dist/type.js +49 -0
  122. package/dist/utils/checkSlotProp.cjs +1 -0
  123. package/dist/utils/checkSlotProp.d.ts +1 -0
  124. package/dist/utils/checkSlotProp.js +7 -0
  125. package/dist/utils/get.cjs +1 -0
  126. package/dist/utils/get.d.ts +1 -0
  127. package/dist/utils/get.js +12 -0
  128. package/dist/utils/set.cjs +1 -0
  129. package/dist/utils/set.d.ts +6 -0
  130. package/dist/utils/set.js +41 -0
  131. package/dist/vnode.cjs +1 -0
  132. package/dist/vnode.d.ts +12 -0
  133. package/dist/vnode.js +41 -0
  134. package/dist/warning.cjs +1 -0
  135. package/dist/warning.d.ts +18 -0
  136. package/dist/warning.js +48 -0
  137. package/package.json +37 -0
  138. package/src/Children/isFragment.ts +6 -0
  139. package/src/Children/tests/isFragment.test.tsx +15 -0
  140. package/src/Children/tests/toArray.test.tsx +101 -0
  141. package/src/Children/toArray.ts +27 -0
  142. package/src/Dom/addEventListener.ts +20 -0
  143. package/src/Dom/canUseDom.ts +7 -0
  144. package/src/Dom/class.ts +29 -0
  145. package/src/Dom/contains.ts +19 -0
  146. package/src/Dom/css.ts +113 -0
  147. package/src/Dom/dynamicCSS.ts +173 -0
  148. package/src/Dom/findDOMNode.ts +23 -0
  149. package/src/Dom/focus.ts +96 -0
  150. package/src/Dom/isVisible.ts +23 -0
  151. package/src/Dom/scrollLocker.ts +143 -0
  152. package/src/Dom/shadow.ts +17 -0
  153. package/src/Dom/styleChecker.ts +31 -0
  154. package/src/Dom/support.ts +27 -0
  155. package/src/EventInterface.ts +19 -0
  156. package/src/KeyCode.ts +516 -0
  157. package/src/Portal.tsx +50 -0
  158. package/src/PortalWrapper.tsx +214 -0
  159. package/src/composeProps.ts +23 -0
  160. package/src/createRef.ts +33 -0
  161. package/src/debug/diff.ts +66 -0
  162. package/src/deprecated.ts +8 -0
  163. package/src/getScrollBarSize.tsx +57 -0
  164. package/src/guid.ts +4 -0
  165. package/src/hooks/useId.ts +31 -0
  166. package/src/hooks/useMemo.ts +21 -0
  167. package/src/hooks/useMergedState.ts +44 -0
  168. package/src/hooks/useState.ts +17 -0
  169. package/src/index.ts +3 -0
  170. package/src/isEqual.ts +50 -0
  171. package/src/isMobile.ts +15 -0
  172. package/src/omit.ts +14 -0
  173. package/src/pickAttrs.ts +78 -0
  174. package/src/props-util/index.ts +22 -0
  175. package/src/raf.ts +55 -0
  176. package/src/setStyle.ts +38 -0
  177. package/src/switchScrollingEffect.ts +48 -0
  178. package/src/test/domHook.ts +67 -0
  179. package/src/type.ts +94 -0
  180. package/src/utils/checkSlotProp.ts +10 -0
  181. package/src/utils/get.ts +15 -0
  182. package/src/utils/set.ts +110 -0
  183. package/src/vnode.ts +86 -0
  184. package/src/warning.ts +79 -0
  185. package/tests/Portal.test.tsx +199 -0
  186. package/tsconfig.json +7 -0
  187. package/vite.config.ts +18 -0
@@ -0,0 +1,16 @@
1
+ function b(t, c, m) {
2
+ const f = {
3
+ ...t,
4
+ ...m ? c : {}
5
+ };
6
+ return Object.keys(c).forEach((e) => {
7
+ const u = c[e];
8
+ typeof u == "function" && (f[e] = (...n) => {
9
+ var d;
10
+ return u(...n), (d = t[e]) == null ? void 0 : d.call(t, ...n);
11
+ });
12
+ }), f;
13
+ }
14
+ export {
15
+ b as default
16
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function u(){const e=t=>{e.current=t};return e}function n(e,t){typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)}function c(...e){return t=>{e.forEach(o=>{n(o,t)})}}exports.composeRef=c;exports.default=u;exports.fillRef=n;
@@ -0,0 +1,12 @@
1
+ import { Ref } from 'vue';
2
+
3
+ export interface RefObject extends Function {
4
+ current?: any;
5
+ }
6
+ declare function createRef(): any;
7
+ export declare function fillRef<T>(ref: Ref, node: T): void;
8
+ /**
9
+ * Merge refs into one ref function to support ref passing.
10
+ */
11
+ export declare function composeRef<T>(...refs: any[]): (node: T) => void;
12
+ export default createRef;
@@ -0,0 +1,21 @@
1
+ function o() {
2
+ const t = (n) => {
3
+ t.current = n;
4
+ };
5
+ return t;
6
+ }
7
+ function e(t, n) {
8
+ typeof t == "function" ? t(n) : typeof t == "object" && t && "current" in t && (t.current = n);
9
+ }
10
+ function u(...t) {
11
+ return (n) => {
12
+ t.forEach((c) => {
13
+ e(c, n);
14
+ });
15
+ };
16
+ }
17
+ export {
18
+ u as composeRef,
19
+ o as default,
20
+ e as fillRef
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function l(){const t=[];return t.__proto__=[],t.__proto__.format=function(){return this.map(n=>({...n,path:n.path.join(" > ")}))},t.__proto__.toString=function(){return JSON.stringify(this.format(),null,2)},t}function i(t,c,n=10,a=[],o=l()){return n<=0||new Set([...Object.keys(t),...Object.keys(c)]).forEach(u=>{const r=t[u],e=c[u];if(r===e)return;const s=typeof r;if(s!==typeof e){o.push({path:a.concat(u),value1:r,value2:e});return}if(!(Number.isNaN(r)&&Number.isNaN(e))){if(s==="object"&&r!==null&&e!==null){i(r,e,n-1,a.concat(u),o);return}o.push({path:a.concat(u),value1:r,value2:e})}}),o}exports.default=i;
@@ -0,0 +1 @@
1
+ export default function diff(obj1: any, obj2: any, depth?: number, path?: never[], diffList?: any[]): any[];
@@ -0,0 +1,41 @@
1
+ function p() {
2
+ const t = [];
3
+ return t.__proto__ = [], t.__proto__.format = function() {
4
+ return this.map((o) => ({
5
+ ...o,
6
+ path: o.path.join(" > ")
7
+ }));
8
+ }, t.__proto__.toString = function() {
9
+ return JSON.stringify(this.format(), null, 2);
10
+ }, t;
11
+ }
12
+ function i(t, c, o = 10, a = [], e = p()) {
13
+ return o <= 0 || (/* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(c)])).forEach((u) => {
14
+ const r = t[u], n = c[u];
15
+ if (r === n)
16
+ return;
17
+ const s = typeof r;
18
+ if (s !== typeof n) {
19
+ e.push({
20
+ path: a.concat(u),
21
+ value1: r,
22
+ value2: n
23
+ });
24
+ return;
25
+ }
26
+ if (!(Number.isNaN(r) && Number.isNaN(n))) {
27
+ if (s === "object" && r !== null && n !== null) {
28
+ i(r, n, o - 1, a.concat(u), e);
29
+ return;
30
+ }
31
+ e.push({
32
+ path: a.concat(u),
33
+ value1: r,
34
+ value2: n
35
+ });
36
+ }
37
+ }), e;
38
+ }
39
+ export {
40
+ i as default
41
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function d(e,o,n){typeof window<"u"&&window.console&&window.console.error&&window.console.error(`Warning: ${e} is deprecated at [ ${n} ], use [ ${o} ] instead of it.`)}exports.default=d;
@@ -0,0 +1 @@
1
+ export default function deprecated(props: any, instead: any, component: any): void;
@@ -0,0 +1,8 @@
1
+ function d(e, o, n) {
2
+ typeof window < "u" && window.console && window.console.error && window.console.error(
3
+ `Warning: ${e} is deprecated at [ ${n} ], use [ ${o} ] instead of it.`
4
+ );
5
+ }
6
+ export {
7
+ d as default
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let d;function u(n){if(typeof document>"u")return 0;if(n||d===void 0){const e=document.createElement("div");e.style.width="100%",e.style.height="200px";const t=document.createElement("div"),i=t.style;i.position="absolute",i.top="0",i.left="0",i.pointerEvents="none",i.visibility="hidden",i.width="200px",i.height="150px",i.overflow="hidden",t.appendChild(e),document.body.appendChild(t);const l=e.offsetWidth;t.style.overflow="scroll";let o=e.offsetWidth;l===o&&(o=t.clientWidth),document.body.removeChild(t),d=l-o}return d}function r(n){const e=n.match(/^(.*)px$/),t=Number(e==null?void 0:e[1]);return Number.isNaN(t)?u():t}function c(n){if(typeof document>"u"||!n||!(n instanceof Element))return{width:0,height:0};const{width:e,height:t}=getComputedStyle(n,"::-webkit-scrollbar");return{width:r(e),height:r(t)}}exports.default=u;exports.getTargetScrollBarSize=c;
@@ -0,0 +1,5 @@
1
+ export default function getScrollBarSize(fresh?: boolean): number;
2
+ export declare function getTargetScrollBarSize(target: HTMLElement): {
3
+ width: number;
4
+ height: number;
5
+ };
@@ -0,0 +1,37 @@
1
+ let d;
2
+ function c(i) {
3
+ if (typeof document > "u") return 0;
4
+ if (i || d === void 0) {
5
+ const e = document.createElement("div");
6
+ e.style.width = "100%", e.style.height = "200px";
7
+ const t = document.createElement("div"), n = t.style;
8
+ n.position = "absolute", n.top = "0", n.left = "0", n.pointerEvents = "none", n.visibility = "hidden", n.width = "200px", n.height = "150px", n.overflow = "hidden", t.appendChild(e), document.body.appendChild(t);
9
+ const l = e.offsetWidth;
10
+ t.style.overflow = "scroll";
11
+ let o = e.offsetWidth;
12
+ l === o && (o = t.clientWidth), document.body.removeChild(t), d = l - o;
13
+ }
14
+ return d;
15
+ }
16
+ function r(i) {
17
+ const e = i.match(/^(.*)px$/), t = Number(e == null ? void 0 : e[1]);
18
+ return Number.isNaN(t) ? c() : t;
19
+ }
20
+ function h(i) {
21
+ if (typeof document > "u" || !i || !(i instanceof Element)) return {
22
+ width: 0,
23
+ height: 0
24
+ };
25
+ const {
26
+ width: e,
27
+ height: t
28
+ } = getComputedStyle(i, "::-webkit-scrollbar");
29
+ return {
30
+ width: r(e),
31
+ height: r(t)
32
+ };
33
+ }
34
+ export {
35
+ c as default,
36
+ h as getTargetScrollBarSize
37
+ };
package/dist/guid.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let e=0;function t(){return`${Date.now()}_${e++}`}exports.default=t;
package/dist/guid.d.ts ADDED
@@ -0,0 +1 @@
1
+ export default function guid(): string;
package/dist/guid.js ADDED
@@ -0,0 +1,7 @@
1
+ let e = 0;
2
+ function t() {
3
+ return `${Date.now()}_${e++}`;
4
+ }
5
+ export {
6
+ t as default
7
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),i=require("../Dom/canUseDom.cjs");let t=0;const r=process.env.NODE_ENV!=="test"&&i.default();function u(){let e;return r?(e=t,t+=1):e="TEST_OR_SSR",e}function o(e=s.ref("")){const n=`vc_unique_${u()}`;return e.value||n}exports.default=o;exports.getUUID=u;exports.isBrowserClient=r;
@@ -0,0 +1,5 @@
1
+ /** Is client side and not jsdom */
2
+ export declare const isBrowserClient: boolean;
3
+ /** Get unique id for accessibility usage */
4
+ export declare function getUUID(): number | string;
5
+ export default function useId(id?: import('vue').Ref<string, string>): string;
@@ -0,0 +1,17 @@
1
+ import { ref as n } from "vue";
2
+ import o from "../Dom/canUseDom.js";
3
+ let t = 0;
4
+ const s = process.env.NODE_ENV !== "test" && o();
5
+ function u() {
6
+ let e;
7
+ return s ? (e = t, t += 1) : e = "TEST_OR_SSR", e;
8
+ }
9
+ function f(e = n("")) {
10
+ const r = `vc_unique_${u()}`;
11
+ return e.value || r;
12
+ }
13
+ export {
14
+ f as default,
15
+ u as getUUID,
16
+ s as isBrowserClient
17
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue");function f(e,c,r){const u=t.ref(e());return t.watch(c,(i,o)=>{r?r(i,o)&&(u.value=e()):u.value=e()}),u}exports.default=f;
@@ -0,0 +1,3 @@
1
+ import { Ref, WatchSource } from 'vue';
2
+
3
+ export default function useMemo<T>(getValue: () => T, condition: (WatchSource<unknown> | object)[], shouldUpdate?: (prev: any[], next: any[]) => boolean): Ref<T, T>;
@@ -0,0 +1,10 @@
1
+ import { ref as n, watch as t } from "vue";
2
+ function m(e, c, r) {
3
+ const f = n(e());
4
+ return t(c, (o, i) => {
5
+ r ? r(o, i) && (f.value = e()) : f.value = e();
6
+ }), f;
7
+ }
8
+ export {
9
+ m as default
10
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue");function g(f,e){const{defaultValue:r,value:l=a.ref()}=e||{};let t=typeof f=="function"?f():f;l.value!==void 0&&(t=a.unref(l)),r!==void 0&&(t=typeof r=="function"?r():r);const c=a.ref(t),v=a.ref(t);a.watchEffect(()=>{let u=l.value!==void 0?l.value:c.value;e!=null&&e.postState&&(u=e.postState(u)),v.value=u});function s(u){const n=v.value;c.value=u,a.toRaw(v.value)!==u&&(e!=null&&e.onChange)&&e.onChange(u,n)}return a.watch(l,()=>{c.value=l.value}),[v,s]}exports.default=g;
@@ -0,0 +1,8 @@
1
+ import { ComputedRef, Ref, UnwrapRef } from 'vue';
2
+
3
+ export default function useMergedState<T, R = Ref<T>>(defaultStateValue: T | (() => T), option?: {
4
+ defaultValue?: T | (() => T);
5
+ value?: Ref<T> | Ref<UnwrapRef<T>> | ComputedRef<T>;
6
+ onChange?: (val: T, prevValue: T) => void;
7
+ postState?: (val: T) => T;
8
+ }): [R, (val: T) => void];
@@ -0,0 +1,21 @@
1
+ import { ref as c, unref as g, watchEffect as d, watch as h, toRaw as i } from "vue";
2
+ function C(r, e) {
3
+ const { defaultValue: f, value: u = c() } = e || {};
4
+ let l = typeof r == "function" ? r() : r;
5
+ u.value !== void 0 && (l = g(u)), f !== void 0 && (l = typeof f == "function" ? f() : f);
6
+ const t = c(l), v = c(l);
7
+ d(() => {
8
+ let a = u.value !== void 0 ? u.value : t.value;
9
+ e != null && e.postState && (a = e.postState(a)), v.value = a;
10
+ });
11
+ function n(a) {
12
+ const s = v.value;
13
+ t.value = a, i(v.value) !== a && (e != null && e.onChange) && e.onChange(a, s);
14
+ }
15
+ return h(u, () => {
16
+ t.value = u.value;
17
+ }), [v, n];
18
+ }
19
+ export {
20
+ C as default
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("vue");function o(e){const t=typeof e=="function"?e():e,n=i.ref(t);function r(u){n.value=u}return[n,r]}exports.default=o;
@@ -0,0 +1,3 @@
1
+ import { Ref } from 'vue';
2
+
3
+ export default function useState<T, R = Ref<T>>(defaultStateValue?: T | (() => T)): [R, (val: T) => void];
@@ -0,0 +1,11 @@
1
+ import { ref as e } from "vue";
2
+ function f(n) {
3
+ const r = typeof n == "function" ? n() : n, o = e(r);
4
+ function i(t) {
5
+ o.value = t;
6
+ }
7
+ return [o, i];
8
+ }
9
+ export {
10
+ f as default
11
+ };
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./utils/get.cjs"),t=require("./utils/set.cjs"),r=require("./warning.cjs");exports.get=e.default;exports.set=t.default;exports.warning=r.warningOnce;
@@ -0,0 +1,3 @@
1
+ export { default as get } from './utils/get';
2
+ export { default as set } from './utils/set';
3
+ export { default as warning } from './warning';
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { default as a } from "./utils/get.js";
2
+ import { default as o } from "./utils/set.js";
3
+ import { warningOnce as n } from "./warning.js";
4
+ export {
5
+ a as get,
6
+ o as set,
7
+ n as warning
8
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("./warning.cjs");function g(c,o,a=!1){const u=new Set;function n(e,r,f=1){const i=u.has(e);if(y.warningOnce(!i,"Warning: There may be circular references"),i)return!1;if(e===r)return!0;if(a&&f>1)return!1;u.add(e);const s=f+1;if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(let t=0;t<e.length;t++)if(!n(e[t],r[t],s))return!1;return!0}if(e&&r&&typeof e=="object"&&typeof r=="object"){const t=Object.keys(e);return t.length!==Object.keys(r).length?!1:t.every(l=>n(e[l],r[l],s))}return!1}return n(c,o)}exports.default=g;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Deeply compares two object literals.
3
+ * @param obj1 object 1
4
+ * @param obj2 object 2
5
+ * @param shallow shallow compare
6
+ */
7
+ declare function isEqual(obj1: any, obj2: any, shallow?: boolean): boolean;
8
+ export default isEqual;
@@ -0,0 +1,32 @@
1
+ import { warningOnce as y } from "./warning.js";
2
+ function h(c, o, a = !1) {
3
+ const f = /* @__PURE__ */ new Set();
4
+ function n(e, r, s = 1) {
5
+ const i = f.has(e);
6
+ if (y(!i, "Warning: There may be circular references"), i)
7
+ return !1;
8
+ if (e === r)
9
+ return !0;
10
+ if (a && s > 1)
11
+ return !1;
12
+ f.add(e);
13
+ const u = s + 1;
14
+ if (Array.isArray(e)) {
15
+ if (!Array.isArray(r) || e.length !== r.length)
16
+ return !1;
17
+ for (let t = 0; t < e.length; t++)
18
+ if (!n(e[t], r[t], u))
19
+ return !1;
20
+ return !0;
21
+ }
22
+ if (e && r && typeof e == "object" && typeof r == "object") {
23
+ const t = Object.keys(e);
24
+ return t.length !== Object.keys(r).length ? !1 : t.every((l) => n(e[l], r[l], u));
25
+ }
26
+ return !1;
27
+ }
28
+ return n(c, o);
29
+ }
30
+ export {
31
+ h as default
32
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=()=>{if(typeof navigator>"u"||typeof window>"u")return!1;const i=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(i)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(i==null?void 0:i.substr(0,4))};exports.default=e;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => boolean;
2
+ export default _default;
@@ -0,0 +1,13 @@
1
+ const o = () => {
2
+ if (typeof navigator > "u" || typeof window > "u")
3
+ return !1;
4
+ const i = navigator.userAgent || navigator.vendor || window.opera;
5
+ return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(
6
+ i
7
+ ) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(
8
+ i == null ? void 0 : i.substr(0, 4)
9
+ );
10
+ };
11
+ export {
12
+ o as default
13
+ };
package/dist/omit.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function u(r,e){const t={...r};return Array.isArray(e)&&e.forEach(o=>{delete t[o]}),t}exports.default=u;
package/dist/omit.d.ts ADDED
@@ -0,0 +1 @@
1
+ export default function omit<T extends object, K extends keyof T>(obj: T, fields: K[] | readonly K[]): Omit<T, K>;
package/dist/omit.js ADDED
@@ -0,0 +1,9 @@
1
+ function a(e, r) {
2
+ const t = { ...e };
3
+ return Array.isArray(r) && r.forEach((o) => {
4
+ delete t[o];
5
+ }), t;
6
+ }
7
+ export {
8
+ a as default
9
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=`accept acceptCharset accessKey action allowFullScreen allowTransparency
2
+ alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
3
+ charSet checked classID className colSpan cols content contentEditable contextMenu
4
+ controls coords crossOrigin data dateTime default defer dir disabled download draggable
5
+ encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
6
+ headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
7
+ is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
8
+ mediaGroup method min minLength multiple muted name noValidate nonce open
9
+ optimum pattern placeholder poster preload radioGroup readOnly rel required
10
+ reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
11
+ shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
12
+ summary tabIndex target title type useMap value width wmode wrap`,i=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
13
+ onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
14
+ onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
15
+ onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
16
+ onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
17
+ onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
18
+ onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,l=`${s} ${i}`.split(/[\s\n]+/),d="aria-",c="data-";function r(a,n){return a.indexOf(n)===0}function u(a,n=!1){let e;n===!1?e={aria:!0,data:!0,attr:!0}:n===!0?e={aria:!0}:e={...n};const t={};return Object.keys(a).forEach(o=>{(e.aria&&(o==="role"||r(o,d))||e.data&&r(o,c)||e.attr&&l.includes(o))&&(t[o]=a[o])}),t}exports.default=u;
@@ -0,0 +1,11 @@
1
+ export interface PickConfig {
2
+ aria?: boolean;
3
+ data?: boolean;
4
+ attr?: boolean;
5
+ }
6
+ /**
7
+ * Picker props from exist props with filter
8
+ * @param props Passed props
9
+ * @param ariaOnly boolean | { aria?: boolean; data?: boolean; attr?: boolean; } filter config
10
+ */
11
+ export default function pickAttrs(props: object, ariaOnly?: boolean | PickConfig): Record<string, any>;
@@ -0,0 +1,41 @@
1
+ const s = `accept acceptCharset accessKey action allowFullScreen allowTransparency
2
+ alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
3
+ charSet checked classID className colSpan cols content contentEditable contextMenu
4
+ controls coords crossOrigin data dateTime default defer dir disabled download draggable
5
+ encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
6
+ headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
7
+ is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
8
+ mediaGroup method min minLength multiple muted name noValidate nonce open
9
+ optimum pattern placeholder poster preload radioGroup readOnly rel required
10
+ reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
11
+ shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
12
+ summary tabIndex target title type useMap value width wmode wrap`, i = `onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
13
+ onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
14
+ onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
15
+ onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
16
+ onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
17
+ onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
18
+ onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`, l = `${s} ${i}`.split(/[\s\n]+/), c = "aria-", d = "data-";
19
+ function r(a, n) {
20
+ return a.indexOf(n) === 0;
21
+ }
22
+ function u(a, n = !1) {
23
+ let e;
24
+ n === !1 ? e = {
25
+ aria: !0,
26
+ data: !0,
27
+ attr: !0
28
+ } : n === !0 ? e = {
29
+ aria: !0
30
+ } : e = {
31
+ ...n
32
+ };
33
+ const t = {};
34
+ return Object.keys(a).forEach((o) => {
35
+ // Aria
36
+ (e.aria && (o === "role" || r(o, c)) || e.data && r(o, d) || e.attr && l.includes(o)) && (t[o] = a[o]);
37
+ }), t;
38
+ }
39
+ export {
40
+ u as default
41
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue");function s(t){return t&&(t.type===Comment||t.type===n.Fragment&&t.children.length===0||t.type===Text&&t.children.trim()==="")}function m(t=[]){const r=[];return t.forEach(e=>{Array.isArray(e)?r.push(...e):(e==null?void 0:e.type)===n.Fragment?r.push(...m(e.children)):r.push(e)}),r.filter(e=>!s(e))}exports.filterEmpty=m;exports.isEmptyElement=s;
@@ -0,0 +1,2 @@
1
+ export declare function isEmptyElement(c: any): any;
2
+ export declare function filterEmpty(children?: any[]): any[];
@@ -0,0 +1,14 @@
1
+ import { Fragment as n } from "vue";
2
+ function p(t) {
3
+ return t && (t.type === Comment || t.type === n && t.children.length === 0 || t.type === Text && t.children.trim() === "");
4
+ }
5
+ function m(t = []) {
6
+ const r = [];
7
+ return t.forEach((e) => {
8
+ Array.isArray(e) ? r.push(...e) : (e == null ? void 0 : e.type) === n ? r.push(...m(e.children)) : r.push(e);
9
+ }), r.filter((e) => !p(e));
10
+ }
11
+ export {
12
+ m as filterEmpty,
13
+ p as isEmptyElement
14
+ };
package/dist/raf.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});let u=e=>+setTimeout(e,16),l=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(u=e=>window.requestAnimationFrame(e),l=e=>window.cancelAnimationFrame(e));let c=0;const n=new Map;function d(e){n.delete(e)}function o(e,t=1){c+=1;const i=c;function a(r){if(r===0)d(i),e();else{const s=u(()=>{a(r-1)});n.set(i,s)}}return a(t),i}o.cancel=e=>{const t=n.get(e);return d(e),l(t)};process.env.NODE_ENV!=="production"&&(o.ids=()=>n);exports.default=o;
package/dist/raf.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ declare function wrapperRaf(callback: () => void, times?: number): number;
2
+ declare namespace wrapperRaf {
3
+ var cancel: (id: number) => void;
4
+ var ids: () => Map<number, number>;
5
+ }
6
+ export default wrapperRaf;
package/dist/raf.js ADDED
@@ -0,0 +1,30 @@
1
+ let c = (e) => +setTimeout(e, 16), f = (e) => clearTimeout(e);
2
+ typeof window < "u" && "requestAnimationFrame" in window && (c = (e) => window.requestAnimationFrame(e), f = (e) => window.cancelAnimationFrame(e));
3
+ let r = 0;
4
+ const n = /* @__PURE__ */ new Map();
5
+ function d(e) {
6
+ n.delete(e);
7
+ }
8
+ function l(e, t = 1) {
9
+ r += 1;
10
+ const a = r;
11
+ function i(o) {
12
+ if (o === 0)
13
+ d(a), e();
14
+ else {
15
+ const s = c(() => {
16
+ i(o - 1);
17
+ });
18
+ n.set(a, s);
19
+ }
20
+ }
21
+ return i(t), a;
22
+ }
23
+ l.cancel = (e) => {
24
+ const t = n.get(e);
25
+ return d(e), f(t);
26
+ };
27
+ process.env.NODE_ENV !== "production" && (l.ids = () => n);
28
+ export {
29
+ l as default
30
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function s(t,r={}){if(!t)return{};const{element:o=document.body}=r,l={},n=Object.keys(t);return n.forEach(e=>{l[e]=o.style[e]}),n.forEach(e=>{o.style[e]=t[e]}),l}exports.default=s;
@@ -0,0 +1,13 @@
1
+ import { CSSProperties } from 'vue';
2
+
3
+ export interface SetStyleOptions {
4
+ element?: HTMLElement;
5
+ }
6
+ /**
7
+ * Easy to set element style, return previous style
8
+ * IE browser compatible(IE browser doesn't merge overflow style, need to set it separately)
9
+ * https://github.com/ant-design/ant-design/issues/19393
10
+ *
11
+ */
12
+ declare function setStyle(style: CSSProperties, options?: SetStyleOptions): CSSProperties;
13
+ export default setStyle;
@@ -0,0 +1,13 @@
1
+ function r(e, s = {}) {
2
+ if (!e)
3
+ return {};
4
+ const { element: o = document.body } = s, n = {}, c = Object.keys(e);
5
+ return c.forEach((t) => {
6
+ n[t] = o.style[t];
7
+ }), c.forEach((t) => {
8
+ o.style[t] = e[t];
9
+ }), n;
10
+ }
11
+ export {
12
+ r as default
13
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./getScrollBarSize.cjs"),i=require("./setStyle.cjs");function a(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}let o={};const d=n=>{if(!a()&&!n)return;const c="ant-scrolling-effect",t=new RegExp(`${c}`,"g"),e=document.body.className;if(n){if(!t.test(e))return;i.default(o),o={},document.body.className=e.replace(t,"").trim();return}const l=r.default();if(l&&(o=i.default({position:"relative",width:`calc(100% - ${l}px)`}),!t.test(e))){const s=`${e} ${c}`;document.body.className=s.trim()}};exports.default=d;
@@ -0,0 +1,2 @@
1
+ declare const _default: (close: any) => void;
2
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import r from "./getScrollBarSize.js";
2
+ import s from "./setStyle.js";
3
+ function a() {
4
+ return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
5
+ }
6
+ let o = {};
7
+ const f = (n) => {
8
+ if (!a() && !n)
9
+ return;
10
+ const c = "ant-scrolling-effect", t = new RegExp(
11
+ `${c}`,
12
+ "g"
13
+ ), e = document.body.className;
14
+ if (n) {
15
+ if (!t.test(e))
16
+ return;
17
+ s(o), o = {}, document.body.className = e.replace(t, "").trim();
18
+ return;
19
+ }
20
+ const i = r();
21
+ if (i && (o = s({
22
+ position: "relative",
23
+ width: `calc(100% - ${i}px)`
24
+ }), !t.test(e))) {
25
+ const l = `${e} ${c}`;
26
+ document.body.className = l.trim();
27
+ }
28
+ };
29
+ export {
30
+ f as default
31
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={__NOT_EXIST:!0};function p(o,n){const c=Object.keys(n),y={};return c.forEach(e=>{const t=Object.getOwnPropertyDescriptor(o.prototype,e);y[e]=t||s;const r=n[e];typeof r=="function"?o.prototype[e]=function(...f){return r.call(this,t,...f)}:Object.defineProperty(o.prototype,e,{...r,set(i){return r.set?r.set.call(this,t,i):t.set(i)},get(){return r.get?r.get.call(this,t):t.get()},configurable:!0})}),{mockRestore(){c.forEach(e=>{const t=y[e];t===s?delete o.prototype[e]:typeof t=="function"?o.prototype[e]=t:Object.defineProperty(o.prototype,e,t)})}}}function u(o,n,c){return p(o,{[n]:c})}exports.spyElementPrototype=u;exports.spyElementPrototypes=p;