@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.
- package/dist/action-group/index.type.d.ts +1 -0
- package/dist/bubble/index.d.ts +2 -2
- package/dist/bubble/index.type.d.ts +16 -18
- package/dist/feedback/index.vue.d.ts +2 -2
- package/dist/icon-button/index.type.d.ts +2 -3
- package/dist/icon-button/index.vue.d.ts +3 -3
- package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js +262 -142
- package/dist/node_modules/.pnpm/@vueuse_shared@13.1.0_vue@3.5.13/node_modules/@vueuse/shared/index.js +96 -39
- package/dist/packages/components/src/action-group/ActionGroup.vue.js +2 -2
- package/dist/packages/components/src/action-group/ActionGroup.vue2.js +96 -72
- package/dist/packages/components/src/bubble/Bubble.vue.js +7 -0
- package/dist/packages/components/src/bubble/Bubble.vue2.js +76 -0
- package/dist/packages/components/src/bubble/BubbleList.vue.js +7 -0
- package/dist/packages/components/src/bubble/BubbleList.vue2.js +50 -0
- package/dist/packages/components/src/bubble/index.js +2 -2
- package/dist/packages/components/src/container/index.vue.js +2 -2
- package/dist/packages/components/src/container/index.vue2.js +36 -36
- package/dist/packages/components/src/feedback/index.vue.js +2 -2
- package/dist/packages/components/src/feedback/index.vue2.js +72 -71
- package/dist/packages/components/src/icon-button/index.vue.js +2 -2
- package/dist/packages/components/src/icon-button/index.vue2.js +9 -27
- package/dist/packages/components/src/sender/components/TemplateEditor.vue.js +2 -2
- package/dist/packages/components/src/sender/components/TemplateEditor.vue2.js +137 -83
- package/dist/sender/index.vue.d.ts +2 -2
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/src/action-group/ActionGroup.vue +38 -23
- package/src/action-group/index.type.ts +1 -0
- package/src/bubble/{bubble.vue → Bubble.vue} +13 -97
- package/src/bubble/BubbleList.vue +55 -0
- package/src/bubble/index.ts +2 -2
- package/src/bubble/index.type.ts +7 -21
- package/src/container/index.vue +10 -35
- package/src/feedback/index.vue +14 -14
- package/src/icon-button/index.type.ts +2 -3
- package/src/icon-button/index.vue +16 -10
- package/src/sender/components/TemplateEditor.vue +301 -110
- package/dist/bubble/components/actions/copy.vue.d.ts +0 -10
- package/dist/bubble/components/actions/index.d.ts +0 -2
- package/dist/bubble/components/actions/refresh.vue.d.ts +0 -2
- package/dist/bubble/useScroll.d.ts +0 -4
- package/dist/packages/components/src/bubble/bubble-list.vue.js +0 -7
- package/dist/packages/components/src/bubble/bubble-list.vue2.js +0 -37
- package/dist/packages/components/src/bubble/bubble.vue.js +0 -7
- package/dist/packages/components/src/bubble/bubble.vue2.js +0 -118
- package/dist/packages/components/src/bubble/components/actions/copy.vue.js +0 -7
- package/dist/packages/components/src/bubble/components/actions/copy.vue2.js +0 -35
- package/dist/packages/components/src/bubble/components/actions/refresh.vue.js +0 -7
- package/dist/packages/components/src/bubble/components/actions/refresh.vue2.js +0 -16
- package/dist/packages/components/src/bubble/useScroll.js +0 -13
- package/src/bubble/bubble-list.vue +0 -42
- package/src/bubble/components/actions/copy.vue +0 -54
- package/src/bubble/components/actions/index.ts +0 -2
- package/src/bubble/components/actions/refresh.vue +0 -31
- package/src/bubble/useScroll.ts +0 -14
- /package/dist/bubble/{bubble-list.vue.d.ts → BubbleList.vue.d.ts} +0 -0
package/dist/bubble/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
|
-
import { default as BubbleComp } from './
|
|
3
|
-
import { default as BubbleListComp } from './
|
|
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 {
|
|
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
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
(
|
|
43
|
-
|
|
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' | '
|
|
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,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, {},
|
|
3
|
+
size: string | number;
|
|
4
|
+
svgSize: string | number;
|
|
5
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
|
|
6
6
|
export default _default;
|
package/dist/node_modules/.pnpm/@vueuse_core@13.1.0_vue@3.5.13/node_modules/@vueuse/core/index.js
CHANGED
|
@@ -1,190 +1,310 @@
|
|
|
1
|
-
import { noop as
|
|
2
|
-
import { getLifeCycleTarget as
|
|
3
|
-
import { shallowRef as
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
var
|
|
7
|
-
const
|
|
8
|
-
return (
|
|
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
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
const
|
|
15
|
-
return
|
|
16
|
-
}),
|
|
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
|
|
18
|
+
var l, r;
|
|
19
19
|
return [
|
|
20
|
-
(
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
24
|
+
p(g.value ? t[3] : t[2])
|
|
25
25
|
];
|
|
26
26
|
},
|
|
27
|
-
([
|
|
28
|
-
if (
|
|
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 =
|
|
31
|
-
|
|
32
|
-
...
|
|
33
|
-
(
|
|
34
|
-
(
|
|
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
|
-
),
|
|
41
|
-
|
|
40
|
+
), f = () => {
|
|
41
|
+
y(), c();
|
|
42
42
|
};
|
|
43
|
-
return
|
|
43
|
+
return Z(c), f;
|
|
44
44
|
}
|
|
45
|
-
let
|
|
46
|
-
function
|
|
47
|
-
const { window:
|
|
48
|
-
if (!
|
|
49
|
-
return
|
|
50
|
-
if (
|
|
51
|
-
|
|
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(
|
|
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
|
|
56
|
-
const
|
|
57
|
-
if (typeof
|
|
58
|
-
return Array.from(
|
|
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
|
|
61
|
-
return
|
|
60
|
+
const u = V(o);
|
|
61
|
+
return u && (e.target === u || e.composedPath().includes(u));
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
function
|
|
65
|
-
const
|
|
66
|
-
return
|
|
64
|
+
function d(e) {
|
|
65
|
+
const o = p(e);
|
|
66
|
+
return o && o.$.subTree.shapeFlag === 16;
|
|
67
67
|
}
|
|
68
|
-
function v(e,
|
|
69
|
-
const
|
|
70
|
-
return
|
|
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
|
|
73
|
-
const
|
|
74
|
-
if (e.target != null && !(!(
|
|
75
|
-
if ("detail" in e && e.detail === 0 && (
|
|
76
|
-
|
|
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
|
-
|
|
79
|
+
n(e);
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
let
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}, 0),
|
|
88
|
-
}, { passive: !0, capture:
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
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
|
-
|
|
93
|
+
f && T(a, "blur", (e) => {
|
|
94
94
|
setTimeout(() => {
|
|
95
|
-
var
|
|
96
|
-
const
|
|
97
|
-
((
|
|
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),
|
|
101
|
-
return
|
|
102
|
-
stop:
|
|
100
|
+
].filter(Boolean), _ = () => b.forEach((e) => e());
|
|
101
|
+
return l ? {
|
|
102
|
+
stop: _,
|
|
103
103
|
cancel: () => {
|
|
104
|
-
|
|
104
|
+
r = !1;
|
|
105
105
|
},
|
|
106
106
|
trigger: (e) => {
|
|
107
|
-
|
|
107
|
+
r = !0, m(e), r = !1;
|
|
108
108
|
}
|
|
109
|
-
} :
|
|
109
|
+
} : _;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
const
|
|
113
|
-
return
|
|
114
|
-
|
|
115
|
-
},
|
|
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
|
|
118
|
-
const
|
|
119
|
-
return
|
|
117
|
+
function ae(t) {
|
|
118
|
+
const n = ce();
|
|
119
|
+
return H(() => (n.value, !!t()));
|
|
120
120
|
}
|
|
121
|
-
const
|
|
122
|
-
function
|
|
123
|
-
const
|
|
124
|
-
return typeof
|
|
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
|
|
127
|
-
const { window:
|
|
128
|
-
|
|
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
|
|
131
|
-
if (
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
const v =
|
|
136
|
-
let
|
|
137
|
-
return
|
|
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
|
-
|
|
142
|
-
}),
|
|
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
|
-
|
|
144
|
+
const X = 1;
|
|
145
|
+
function be(t, n = {}) {
|
|
145
146
|
const {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
-
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
const v =
|
|
165
|
-
|
|
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:
|
|
281
|
+
return { width: l, height: r };
|
|
168
282
|
}
|
|
169
283
|
export {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
};
|