@opentiny/tiny-robot 0.2.0-alpha.1 → 0.2.0-alpha.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.
Files changed (56) hide show
  1. package/dist/action-group/index.type.d.ts +1 -0
  2. package/dist/bubble/index.d.ts +2 -2
  3. package/dist/bubble/index.type.d.ts +16 -18
  4. package/dist/feedback/index.vue.d.ts +2 -2
  5. package/dist/icon-button/index.type.d.ts +2 -3
  6. package/dist/icon-button/index.vue.d.ts +3 -3
  7. package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +262 -142
  8. package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +96 -39
  9. package/dist/packages/components/src/action-group/ActionGroup.vue.js +2 -2
  10. package/dist/packages/components/src/action-group/ActionGroup.vue2.js +96 -72
  11. package/dist/packages/components/src/bubble/Bubble.vue.js +7 -0
  12. package/dist/packages/components/src/bubble/Bubble.vue2.js +76 -0
  13. package/dist/packages/components/src/bubble/BubbleList.vue.js +7 -0
  14. package/dist/packages/components/src/bubble/BubbleList.vue2.js +50 -0
  15. package/dist/packages/components/src/bubble/index.js +2 -2
  16. package/dist/packages/components/src/container/index.vue.js +2 -2
  17. package/dist/packages/components/src/container/index.vue2.js +36 -36
  18. package/dist/packages/components/src/feedback/index.vue.js +2 -2
  19. package/dist/packages/components/src/feedback/index.vue2.js +72 -71
  20. package/dist/packages/components/src/icon-button/index.vue.js +2 -2
  21. package/dist/packages/components/src/icon-button/index.vue2.js +9 -27
  22. package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +2 -2
  23. package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +137 -83
  24. package/dist/sender/index.vue.d.ts +2 -2
  25. package/dist/style.css +1 -1
  26. package/package.json +3 -3
  27. package/src/action-group/ActionGroup.vue +38 -23
  28. package/src/action-group/index.type.ts +1 -0
  29. package/src/bubble/{bubble.vue → Bubble.vue} +13 -97
  30. package/src/bubble/BubbleList.vue +55 -0
  31. package/src/bubble/index.ts +2 -2
  32. package/src/bubble/index.type.ts +7 -21
  33. package/src/container/index.vue +10 -35
  34. package/src/feedback/index.vue +14 -14
  35. package/src/icon-button/index.type.ts +2 -3
  36. package/src/icon-button/index.vue +16 -10
  37. package/src/sender/components/TemplateEditor.vue +301 -110
  38. package/dist/bubble/components/actions/copy.vue.d.ts +0 -10
  39. package/dist/bubble/components/actions/index.d.ts +0 -2
  40. package/dist/bubble/components/actions/refresh.vue.d.ts +0 -2
  41. package/dist/bubble/useScroll.d.ts +0 -4
  42. package/dist/packages/components/src/bubble/bubble-list.vue.js +0 -7
  43. package/dist/packages/components/src/bubble/bubble-list.vue2.js +0 -37
  44. package/dist/packages/components/src/bubble/bubble.vue.js +0 -7
  45. package/dist/packages/components/src/bubble/bubble.vue2.js +0 -118
  46. package/dist/packages/components/src/bubble/components/actions/copy.vue.js +0 -7
  47. package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +0 -35
  48. package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +0 -7
  49. package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +0 -16
  50. package/dist/packages/components/src/bubble/useScroll.js +0 -13
  51. package/src/bubble/bubble-list.vue +0 -42
  52. package/src/bubble/components/actions/copy.vue +0 -54
  53. package/src/bubble/components/actions/index.ts +0 -2
  54. package/src/bubble/components/actions/refresh.vue +0 -31
  55. package/src/bubble/useScroll.ts +0 -14
  56. /package/dist/bubble/{bubble-list.vue.d.ts → BubbleList.vue.d.ts} +0 -0
@@ -1,6 +1,7 @@
1
1
  import { VNode } from 'vue';
2
2
  export interface ActionGroupProps {
3
3
  maxNum?: number;
4
+ showTooltip?: boolean;
4
5
  dropDownShowLabelOnly?: boolean;
5
6
  }
6
7
  export interface ActionGroupEvents {
@@ -1,6 +1,6 @@
1
1
  import { App } from 'vue';
2
- import { default as BubbleComp } from './bubble.vue';
3
- import { default as BubbleListComp } from './bubble-list.vue';
2
+ import { default as BubbleComp } from './Bubble.vue';
3
+ import { default as BubbleListComp } from './BubbleList.vue';
4
4
  declare const bubbleInstall: (app: App) => void;
5
5
  export declare const Bubble: typeof BubbleComp & {
6
6
  install: typeof bubbleInstall;
@@ -1,11 +1,5 @@
1
1
  import { Options as MarkdownItOptions } from 'markdown-it';
2
- import { Component, CSSProperties, VNode } from 'vue';
3
- export interface BubbleActionOptions {
4
- name: 'copy' | 'refresh' | string;
5
- vnode?: VNode | Component;
6
- show?: boolean | ((props: BubbleProps) => boolean);
7
- }
8
- export type BubbleAction = 'copy' | 'refresh' | BubbleActionOptions;
2
+ import { CSSProperties, VNode } from 'vue';
9
3
  export type BubblePalcement = 'start' | 'end';
10
4
  export interface BubbleProps {
11
5
  /**
@@ -29,22 +23,26 @@ export interface BubbleProps {
29
23
  * type 为 'markdown' 时,markdown 的配置项
30
24
  */
31
25
  mdConfig?: MarkdownItOptions;
32
- actions?: BubbleAction[];
33
26
  maxWidth?: CSSProperties['maxWidth'];
34
27
  }
35
28
  export interface BubbleSlots {
36
- default: () => unknown;
37
- footer: () => unknown;
38
- loading: () => unknown;
39
- }
40
- export interface BubbleEvents {
41
- (e: 'copy', result: boolean): void;
42
- (e: 'refresh'): void;
43
- (e: 'action', name: string, ...args: unknown[]): void;
29
+ default?: (slotProps: {
30
+ bubbleProps: BubbleProps;
31
+ }) => unknown;
32
+ footer?: (slotProps: {
33
+ bubbleProps: BubbleProps;
34
+ }) => unknown;
35
+ loading?: (slotProps: {
36
+ bubbleProps: BubbleProps;
37
+ }) => unknown;
44
38
  }
45
- export type BubbleRoleConfig = Pick<BubbleProps, 'placement' | 'avatar' | 'type' | 'mdConfig' | 'actions' | 'maxWidth'>;
39
+ export type BubbleRoleConfig = Pick<BubbleProps, 'placement' | 'avatar' | 'type' | 'mdConfig' | 'maxWidth'> & {
40
+ slots?: BubbleSlots;
41
+ };
46
42
  export interface BubbleListProps {
47
- items: BubbleProps[];
43
+ items: (BubbleProps & {
44
+ slots?: BubbleSlots;
45
+ })[];
48
46
  /**
49
47
  * 每个角色的默认配置项
50
48
  */
@@ -1,10 +1,10 @@
1
1
  import { FeedbackProps } from './index.type';
2
2
  declare const _default: import('vue').DefineComponent<FeedbackProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
- action: (name: string) => any;
4
3
  operation: (name: string) => any;
4
+ action: (name: string) => any;
5
5
  }, string, import('vue').PublicProps, Readonly<FeedbackProps> & Readonly<{
6
- onAction?: ((name: string) => any) | undefined;
7
6
  onOperation?: ((name: string) => any) | undefined;
7
+ onAction?: ((name: string) => any) | undefined;
8
8
  }>, {
9
9
  operationsLimit: number;
10
10
  actionsLimit: number;
@@ -1,7 +1,6 @@
1
1
  import { Component, VNode } from 'vue';
2
2
  export interface IconButtonProps {
3
3
  icon: VNode | Component;
4
- size?: string;
5
- svgSize?: string;
6
- tooltip?: string;
4
+ size?: string | number;
5
+ svgSize?: string | number;
7
6
  }
@@ -1,6 +1,6 @@
1
1
  import { IconButtonProps } from './index.type';
2
2
  declare const _default: import('vue').DefineComponent<IconButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IconButtonProps> & Readonly<{}>, {
3
- size: string;
4
- svgSize: string;
5
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
+ size: string | number;
4
+ svgSize: string | number;
5
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
6
6
  export default _default;
@@ -1,190 +1,310 @@
1
- import { noop as E, isIOS as A, tryOnMounted as C, isClient as N, toArray as S, watchImmediate as x, tryOnScopeDispose as L, pxValue as P, injectLocal as z, isObject as H } from "../../../../@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js";
2
- import { getLifeCycleTarget as te } from "../../../../@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js";
3
- import { shallowRef as I, watch as R, computed as O, toValue as y, watchEffect as F, hasInjectionContext as $, unref as j, getCurrentInstance as B, onMounted as Q } from "vue";
4
- const W = N ? window : void 0;
5
- function M(o) {
6
- var t;
7
- const r = y(o);
8
- return (t = r == null ? void 0 : r.$el) != null ? t : r;
1
+ import { noop as I, useThrottleFn as J, tryOnMounted as G, isClient as K, toArray as k, watchImmediate as U, tryOnScopeDispose as Z, useDebounceFn as q, isObject as ee, isIOS as te, pxValue as B, injectLocal as oe } from "../../../../@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js";
2
+ import { createFilterWrapper as ye, debounceFilter as Te, getLifeCycleTarget as we, throttleFilter as Me } from "../../../../@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js";
3
+ import { shallowRef as w, computed as H, toValue as p, reactive as Y, unref as ne, watch as le, watchEffect as re, hasInjectionContext as ie, getCurrentInstance as se, onMounted as ue } from "vue";
4
+ const P = K ? window : void 0;
5
+ function V(t) {
6
+ var n;
7
+ const c = p(t);
8
+ return (n = c == null ? void 0 : c.$el) != null ? n : c;
9
9
  }
10
- function w(...o) {
11
- const t = [], r = () => {
12
- t.forEach((i) => i()), t.length = 0;
13
- }, l = (i, n, u, c) => (i.addEventListener(n, u, c), () => i.removeEventListener(n, u, c)), f = O(() => {
14
- const i = S(y(o[0])).filter((n) => n != null);
15
- return i.every((n) => typeof n != "string") ? i : void 0;
16
- }), g = x(
10
+ function T(...t) {
11
+ const n = [], c = () => {
12
+ n.forEach((l) => l()), n.length = 0;
13
+ }, a = (l, r, i, d) => (l.addEventListener(r, i, d), () => l.removeEventListener(r, i, d)), g = H(() => {
14
+ const l = k(p(t[0])).filter((r) => r != null);
15
+ return l.every((r) => typeof r != "string") ? l : void 0;
16
+ }), y = U(
17
17
  () => {
18
- var i, n;
18
+ var l, r;
19
19
  return [
20
- (n = (i = f.value) == null ? void 0 : i.map((u) => M(u))) != null ? n : [W].filter((u) => u != null),
21
- S(y(f.value ? o[1] : o[0])),
22
- S(j(f.value ? o[2] : o[1])),
20
+ (r = (l = g.value) == null ? void 0 : l.map((i) => V(i))) != null ? r : [P].filter((i) => i != null),
21
+ k(p(g.value ? t[1] : t[0])),
22
+ k(ne(g.value ? t[2] : t[1])),
23
23
  // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
24
- y(f.value ? o[3] : o[2])
24
+ p(g.value ? t[3] : t[2])
25
25
  ];
26
26
  },
27
- ([i, n, u, c]) => {
28
- if (r(), !(i != null && i.length) || !(n != null && n.length) || !(u != null && u.length))
27
+ ([l, r, i, d]) => {
28
+ if (c(), !(l != null && l.length) || !(r != null && r.length) || !(i != null && i.length))
29
29
  return;
30
- const v = H(c) ? { ...c } : c;
31
- t.push(
32
- ...i.flatMap(
33
- (h) => n.flatMap(
34
- (a) => u.map((p) => l(h, a, p, v))
30
+ const v = ee(d) ? { ...d } : d;
31
+ n.push(
32
+ ...l.flatMap(
33
+ (m) => r.flatMap(
34
+ (h) => i.map((b) => a(m, h, b, v))
35
35
  )
36
36
  )
37
37
  );
38
38
  },
39
39
  { flush: "post" }
40
- ), m = () => {
41
- g(), r();
40
+ ), f = () => {
41
+ y(), c();
42
42
  };
43
- return L(r), m;
43
+ return Z(c), f;
44
44
  }
45
- let k = !1;
46
- function Z(o, t, r = {}) {
47
- const { window: l = W, ignore: f = [], capture: g = !0, detectIframe: m = !1, controls: i = !1 } = r;
48
- if (!l)
49
- return i ? { stop: E, cancel: E, trigger: E } : E;
50
- if (A && !k) {
51
- k = !0;
45
+ let Q = !1;
46
+ function pe(t, n, c = {}) {
47
+ const { window: a = P, ignore: g = [], capture: y = !0, detectIframe: f = !1, controls: l = !1 } = c;
48
+ if (!a)
49
+ return l ? { stop: I, cancel: I, trigger: I } : I;
50
+ if (te && !Q) {
51
+ Q = !0;
52
52
  const e = { passive: !0 };
53
- Array.from(l.document.body.children).forEach((s) => w(s, "click", E, e)), w(l.document.documentElement, "click", E, e);
53
+ Array.from(a.document.body.children).forEach((o) => T(o, "click", I, e)), T(a.document.documentElement, "click", I, e);
54
54
  }
55
- let n = !0;
56
- const u = (e) => y(f).some((s) => {
57
- if (typeof s == "string")
58
- return Array.from(l.document.querySelectorAll(s)).some((d) => d === e.target || e.composedPath().includes(d));
55
+ let r = !0;
56
+ const i = (e) => p(g).some((o) => {
57
+ if (typeof o == "string")
58
+ return Array.from(a.document.querySelectorAll(o)).some((u) => u === e.target || e.composedPath().includes(u));
59
59
  {
60
- const d = M(s);
61
- return d && (e.target === d || e.composedPath().includes(d));
60
+ const u = V(o);
61
+ return u && (e.target === u || e.composedPath().includes(u));
62
62
  }
63
63
  });
64
- function c(e) {
65
- const s = y(e);
66
- return s && s.$.subTree.shapeFlag === 16;
64
+ function d(e) {
65
+ const o = p(e);
66
+ return o && o.$.subTree.shapeFlag === 16;
67
67
  }
68
- function v(e, s) {
69
- const d = y(e), b = d.$.subTree && d.$.subTree.children;
70
- return b == null || !Array.isArray(b) ? !1 : b.some((V) => V.el === s.target || s.composedPath().includes(V.el));
68
+ function v(e, o) {
69
+ const u = p(e), L = u.$.subTree && u.$.subTree.children;
70
+ return L == null || !Array.isArray(L) ? !1 : L.some((C) => C.el === o.target || o.composedPath().includes(C.el));
71
71
  }
72
- const h = (e) => {
73
- const s = M(o);
74
- if (e.target != null && !(!(s instanceof Element) && c(o) && v(o, e)) && !(!s || s === e.target || e.composedPath().includes(s))) {
75
- if ("detail" in e && e.detail === 0 && (n = !u(e)), !n) {
76
- n = !0;
72
+ const m = (e) => {
73
+ const o = V(t);
74
+ if (e.target != null && !(!(o instanceof Element) && d(t) && v(t, e)) && !(!o || o === e.target || e.composedPath().includes(o))) {
75
+ if ("detail" in e && e.detail === 0 && (r = !i(e)), !r) {
76
+ r = !0;
77
77
  return;
78
78
  }
79
- t(e);
79
+ n(e);
80
80
  }
81
81
  };
82
- let a = !1;
83
- const p = [
84
- w(l, "click", (e) => {
85
- a || (a = !0, setTimeout(() => {
86
- a = !1;
87
- }, 0), h(e));
88
- }, { passive: !0, capture: g }),
89
- w(l, "pointerdown", (e) => {
90
- const s = M(o);
91
- n = !u(e) && !!(s && !e.composedPath().includes(s));
82
+ let h = !1;
83
+ const b = [
84
+ T(a, "click", (e) => {
85
+ h || (h = !0, setTimeout(() => {
86
+ h = !1;
87
+ }, 0), m(e));
88
+ }, { passive: !0, capture: y }),
89
+ T(a, "pointerdown", (e) => {
90
+ const o = V(t);
91
+ r = !i(e) && !!(o && !e.composedPath().includes(o));
92
92
  }, { passive: !0 }),
93
- m && w(l, "blur", (e) => {
93
+ f && T(a, "blur", (e) => {
94
94
  setTimeout(() => {
95
- var s;
96
- const d = M(o);
97
- ((s = l.document.activeElement) == null ? void 0 : s.tagName) === "IFRAME" && !(d != null && d.contains(l.document.activeElement)) && t(e);
95
+ var o;
96
+ const u = V(t);
97
+ ((o = a.document.activeElement) == null ? void 0 : o.tagName) === "IFRAME" && !(u != null && u.contains(a.document.activeElement)) && n(e);
98
98
  }, 0);
99
99
  }, { passive: !0 })
100
- ].filter(Boolean), T = () => p.forEach((e) => e());
101
- return i ? {
102
- stop: T,
100
+ ].filter(Boolean), _ = () => b.forEach((e) => e());
101
+ return l ? {
102
+ stop: _,
103
103
  cancel: () => {
104
- n = !1;
104
+ r = !1;
105
105
  },
106
106
  trigger: (e) => {
107
- n = !0, h(e), n = !1;
107
+ r = !0, m(e), r = !1;
108
108
  }
109
- } : T;
109
+ } : _;
110
110
  }
111
- function Y() {
112
- const o = I(!1), t = B();
113
- return t && Q(() => {
114
- o.value = !0;
115
- }, t), o;
111
+ function ce() {
112
+ const t = w(!1), n = se();
113
+ return n && ue(() => {
114
+ t.value = !0;
115
+ }, n), t;
116
116
  }
117
- function D(o) {
118
- const t = Y();
119
- return O(() => (t.value, !!o()));
117
+ function ae(t) {
118
+ const n = ce();
119
+ return H(() => (n.value, !!t()));
120
120
  }
121
- const G = Symbol("vueuse-ssr-width");
122
- function J() {
123
- const o = $() ? z(G, null) : null;
124
- return typeof o == "number" ? o : void 0;
121
+ const de = Symbol("vueuse-ssr-width");
122
+ function fe() {
123
+ const t = ie() ? oe(de, null) : null;
124
+ return typeof t == "number" ? t : void 0;
125
125
  }
126
- function K(o, t = {}) {
127
- const { window: r = W, ssrWidth: l = J() } = t, f = D(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), g = I(typeof l == "number"), m = I(), i = I(!1), n = (u) => {
128
- i.value = u.matches;
126
+ function me(t, n = {}) {
127
+ const { window: c = P, ssrWidth: a = fe() } = n, g = ae(() => c && "matchMedia" in c && typeof c.matchMedia == "function"), y = w(typeof a == "number"), f = w(), l = w(!1), r = (i) => {
128
+ l.value = i.matches;
129
129
  };
130
- return F(() => {
131
- if (g.value) {
132
- g.value = !f.value;
133
- const u = y(o).split(",");
134
- i.value = u.some((c) => {
135
- const v = c.includes("not all"), h = c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), a = c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
136
- let p = !!(h || a);
137
- return h && p && (p = l >= P(h[1])), a && p && (p = l <= P(a[1])), v ? !p : p;
130
+ return re(() => {
131
+ if (y.value) {
132
+ y.value = !g.value;
133
+ const i = p(t).split(",");
134
+ l.value = i.some((d) => {
135
+ const v = d.includes("not all"), m = d.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), h = d.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
136
+ let b = !!(m || h);
137
+ return m && b && (b = a >= B(m[1])), h && b && (b = a <= B(h[1])), v ? !b : b;
138
138
  });
139
139
  return;
140
140
  }
141
- f.value && (m.value = r.matchMedia(y(o)), i.value = m.value.matches);
142
- }), w(m, "change", n, { passive: !0 }), O(() => i.value);
141
+ g.value && (f.value = c.matchMedia(p(t)), l.value = f.value.matches);
142
+ }), T(f, "change", r, { passive: !0 }), H(() => l.value);
143
143
  }
144
- function q(o = {}) {
144
+ const X = 1;
145
+ function be(t, n = {}) {
145
146
  const {
146
- window: t = W,
147
- initialWidth: r = Number.POSITIVE_INFINITY,
148
- initialHeight: l = Number.POSITIVE_INFINITY,
149
- listenOrientation: f = !0,
150
- includeScrollbar: g = !0,
151
- type: m = "inner"
152
- } = o, i = I(r), n = I(l), u = () => {
153
- if (t)
154
- if (m === "outer")
155
- i.value = t.outerWidth, n.value = t.outerHeight;
156
- else if (m === "visual" && t.visualViewport) {
157
- const { width: v, height: h, scale: a } = t.visualViewport;
158
- i.value = Math.round(v * a), n.value = Math.round(h * a);
159
- } else g ? (i.value = t.innerWidth, n.value = t.innerHeight) : (i.value = t.document.documentElement.clientWidth, n.value = t.document.documentElement.clientHeight);
147
+ throttle: c = 0,
148
+ idle: a = 200,
149
+ onStop: g = I,
150
+ onScroll: y = I,
151
+ offset: f = {
152
+ left: 0,
153
+ right: 0,
154
+ top: 0,
155
+ bottom: 0
156
+ },
157
+ eventListenerOptions: l = {
158
+ capture: !1,
159
+ passive: !0
160
+ },
161
+ behavior: r = "auto",
162
+ window: i = P,
163
+ onError: d = (s) => {
164
+ console.error(s);
165
+ }
166
+ } = n, v = w(0), m = w(0), h = H({
167
+ get() {
168
+ return v.value;
169
+ },
170
+ set(s) {
171
+ _(s, void 0);
172
+ }
173
+ }), b = H({
174
+ get() {
175
+ return m.value;
176
+ },
177
+ set(s) {
178
+ _(void 0, s);
179
+ }
180
+ });
181
+ function _(s, W) {
182
+ var E, x, A, F;
183
+ if (!i)
184
+ return;
185
+ const S = p(t);
186
+ if (!S)
187
+ return;
188
+ (A = S instanceof Document ? i.document.body : S) == null || A.scrollTo({
189
+ top: (E = p(W)) != null ? E : b.value,
190
+ left: (x = p(s)) != null ? x : h.value,
191
+ behavior: p(r)
192
+ });
193
+ const M = ((F = S == null ? void 0 : S.document) == null ? void 0 : F.documentElement) || (S == null ? void 0 : S.documentElement) || S;
194
+ h != null && (v.value = M.scrollLeft), b != null && (m.value = M.scrollTop);
195
+ }
196
+ const e = w(!1), o = Y({
197
+ left: !0,
198
+ right: !1,
199
+ top: !0,
200
+ bottom: !1
201
+ }), u = Y({
202
+ left: !1,
203
+ right: !1,
204
+ top: !1,
205
+ bottom: !1
206
+ }), L = (s) => {
207
+ e.value && (e.value = !1, u.left = !1, u.right = !1, u.top = !1, u.bottom = !1, g(s));
208
+ }, C = q(L, c + a), R = (s) => {
209
+ var W;
210
+ if (!i)
211
+ return;
212
+ const E = ((W = s == null ? void 0 : s.document) == null ? void 0 : W.documentElement) || (s == null ? void 0 : s.documentElement) || V(s), { display: x, flexDirection: A, direction: F } = getComputedStyle(E), S = F === "rtl" ? -1 : 1, M = E.scrollLeft;
213
+ u.left = M < v.value, u.right = M > v.value;
214
+ const N = Math.abs(M * S) <= (f.left || 0), z = Math.abs(M * S) + E.clientWidth >= E.scrollWidth - (f.right || 0) - X;
215
+ x === "flex" && A === "row-reverse" ? (o.left = z, o.right = N) : (o.left = N, o.right = z), v.value = M;
216
+ let O = E.scrollTop;
217
+ s === i.document && !O && (O = i.document.body.scrollTop), u.top = O < m.value, u.bottom = O > m.value;
218
+ const $ = Math.abs(O) <= (f.top || 0), j = Math.abs(O) + E.clientHeight >= E.scrollHeight - (f.bottom || 0) - X;
219
+ x === "flex" && A === "column-reverse" ? (o.top = j, o.bottom = $) : (o.top = $, o.bottom = j), m.value = O;
220
+ }, D = (s) => {
221
+ var W;
222
+ if (!i)
223
+ return;
224
+ const E = (W = s.target.documentElement) != null ? W : s.target;
225
+ R(E), e.value = !0, C(s), y(s);
226
+ };
227
+ return T(
228
+ t,
229
+ "scroll",
230
+ c ? J(D, c, !0, !1) : D,
231
+ l
232
+ ), G(() => {
233
+ try {
234
+ const s = p(t);
235
+ if (!s)
236
+ return;
237
+ R(s);
238
+ } catch (s) {
239
+ d(s);
240
+ }
241
+ }), T(
242
+ t,
243
+ "scrollend",
244
+ L,
245
+ l
246
+ ), {
247
+ x: h,
248
+ y: b,
249
+ isScrolling: e,
250
+ arrivedState: o,
251
+ directions: u,
252
+ measure() {
253
+ const s = p(t);
254
+ i && s && R(s);
255
+ }
256
+ };
257
+ }
258
+ function ge(t = {}) {
259
+ const {
260
+ window: n = P,
261
+ initialWidth: c = Number.POSITIVE_INFINITY,
262
+ initialHeight: a = Number.POSITIVE_INFINITY,
263
+ listenOrientation: g = !0,
264
+ includeScrollbar: y = !0,
265
+ type: f = "inner"
266
+ } = t, l = w(c), r = w(a), i = () => {
267
+ if (n)
268
+ if (f === "outer")
269
+ l.value = n.outerWidth, r.value = n.outerHeight;
270
+ else if (f === "visual" && n.visualViewport) {
271
+ const { width: v, height: m, scale: h } = n.visualViewport;
272
+ l.value = Math.round(v * h), r.value = Math.round(m * h);
273
+ } else y ? (l.value = n.innerWidth, r.value = n.innerHeight) : (l.value = n.document.documentElement.clientWidth, r.value = n.document.documentElement.clientHeight);
160
274
  };
161
- u(), C(u);
162
- const c = { passive: !0 };
163
- if (w("resize", u, c), t && m === "visual" && t.visualViewport && w(t.visualViewport, "resize", u, c), f) {
164
- const v = K("(orientation: portrait)");
165
- R(v, () => u());
275
+ i(), G(i);
276
+ const d = { passive: !0 };
277
+ if (T("resize", i, d), n && f === "visual" && n.visualViewport && T(n.visualViewport, "resize", i, d), g) {
278
+ const v = me("(orientation: portrait)");
279
+ le(v, () => i());
166
280
  }
167
- return { width: i, height: n };
281
+ return { width: l, height: r };
168
282
  }
169
283
  export {
170
- W as defaultWindow,
171
- te as getLifeCycleTarget,
172
- z as injectLocal,
173
- N as isClient,
174
- A as isIOS,
175
- H as isObject,
176
- E as noop,
177
- Z as onClickOutside,
178
- P as pxValue,
179
- S as toArray,
180
- C as tryOnMounted,
181
- L as tryOnScopeDispose,
182
- M as unrefElement,
183
- w as useEventListener,
184
- K as useMediaQuery,
185
- Y as useMounted,
186
- J as useSSRWidth,
187
- D as useSupported,
188
- q as useWindowSize,
189
- x as watchImmediate
284
+ ye as createFilterWrapper,
285
+ Te as debounceFilter,
286
+ P as defaultWindow,
287
+ we as getLifeCycleTarget,
288
+ oe as injectLocal,
289
+ K as isClient,
290
+ te as isIOS,
291
+ ee as isObject,
292
+ I as noop,
293
+ pe as onClickOutside,
294
+ B as pxValue,
295
+ Me as throttleFilter,
296
+ k as toArray,
297
+ G as tryOnMounted,
298
+ Z as tryOnScopeDispose,
299
+ V as unrefElement,
300
+ q as useDebounceFn,
301
+ T as useEventListener,
302
+ me as useMediaQuery,
303
+ ce as useMounted,
304
+ fe as useSSRWidth,
305
+ be as useScroll,
306
+ ae as useSupported,
307
+ J as useThrottleFn,
308
+ ge as useWindowSize,
309
+ U as watchImmediate
190
310
  };