@mobilon-dev/chotto 0.3.65 → 0.3.67
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/chotto.css +1 -1
- package/dist/components/1_atoms/Tooltip/Tooltip.vue.js +1 -1
- package/dist/components/1_atoms/Tooltip/Tooltip.vue2.js +59 -52
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue.js +1 -1
- package/dist/components/2_feed_elements/AudioMessage/AudioMessage.vue2.js +412 -342
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue.js +4 -4
- package/dist/components/2_feed_elements/CallMessage/CallMessage.vue2.js +445 -362
- package/dist/components/3_compounds/SideBar/SideBar.vue.js +201 -128
- package/dist/themes/dark.css +1 -1
- package/dist/themes/default.css +1 -1
- package/dist/themes/glass.css +1 -1
- package/dist/themes/green.css +1 -1
- package/dist/themes/mobilon1.css +1 -1
- package/dist/types/apps/data/messages.d.ts +235 -10
- package/dist/types/components/1_atoms/Tooltip/Tooltip.vue.d.ts +9 -0
- package/dist/types/components/2_feed_elements/AudioMessage/AudioMessage.vue.d.ts +1 -1
- package/dist/types/components/2_feed_elements/AudioMessage/styles/types.d.ts +64 -0
- package/dist/types/components/2_feed_elements/CallMessage/CallMessage.vue.d.ts +1 -1
- package/dist/types/components/2_feed_elements/CallMessage/styles/types.d.ts +44 -44
- package/dist/types/components/2_feed_elements/types/messages.d.ts +31 -1
- package/dist/types/components/3_compounds/SideBar/SideBar.vue.d.ts +6 -0
- package/dist/types/components/3_compounds/SideBar/styles/types.d.ts +24 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Tooltip.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-14a39a1d"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as A, inject as D, ref as n, computed as T, onUnmounted as R, createElementBlock as d, openBlock as s, Fragment as V, createElementVNode as W, createBlock as z, renderSlot as E, Teleport as I, createVNode as L, Transition as M, withCtx as $, createCommentVNode as j, normalizeStyle as q, normalizeClass as F, unref as g, toDisplayString as P, nextTick as v } from "vue";
|
|
2
2
|
import "../../../hooks/useMessageDraft.js";
|
|
3
3
|
import "../../../hooks/useSearchModel.js";
|
|
4
|
-
import { useTheme as
|
|
4
|
+
import { useTheme as U } from "../../../hooks/useTheme.js";
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
import "../../../node_modules/linkifyjs/dist/linkify.js";
|
|
8
8
|
import "../../../node_modules/linkify-string/dist/linkify-string.js";
|
|
9
9
|
import "../../../functions/parseMarkdown.js";
|
|
10
|
-
const
|
|
10
|
+
const G = ["data-theme"], tt = /* @__PURE__ */ A({
|
|
11
11
|
__name: "Tooltip",
|
|
12
12
|
props: {
|
|
13
13
|
text: {
|
|
@@ -33,79 +33,86 @@ const U = ["data-theme"], Z = /* @__PURE__ */ k({
|
|
|
33
33
|
delay: {
|
|
34
34
|
type: Number,
|
|
35
35
|
default: 600
|
|
36
|
+
},
|
|
37
|
+
maxWidth: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: ""
|
|
36
40
|
}
|
|
37
41
|
},
|
|
38
|
-
setup(w, { expose:
|
|
39
|
-
const
|
|
42
|
+
setup(w, { expose: x }) {
|
|
43
|
+
const S = D("chatAppId"), { getTheme: y } = U(S), p = n(), a = n(), c = n(!1), u = n(null), r = n(null), e = w, _ = T(() => ({
|
|
40
44
|
tooltip__text: !0,
|
|
41
|
-
[`tooltip--${
|
|
42
|
-
})), B = () => {
|
|
43
|
-
|
|
45
|
+
[`tooltip--${e.position}`]: !0
|
|
46
|
+
})), B = T(() => ({
|
|
47
|
+
maxWidth: e.maxWidth || void 0
|
|
48
|
+
})), C = () => {
|
|
49
|
+
e.trigger !== "auto" && (r.value && (clearTimeout(r.value), r.value = null), r.value = setTimeout(() => {
|
|
44
50
|
c.value = !0, v(() => {
|
|
45
|
-
if (
|
|
46
|
-
const f =
|
|
47
|
-
left: { top: t.top - (
|
|
48
|
-
right: { top: t.top - (
|
|
49
|
-
bottom: { top: (t == null ? void 0 : t.bottom) - i +
|
|
50
|
-
"bottom-center": { top: (t == null ? void 0 : t.bottom) - i +
|
|
51
|
-
top: { top: t.top -
|
|
52
|
-
"top-center": { top: t.top -
|
|
53
|
-
"bottom-left": { top: (t == null ? void 0 : t.bottom) - i +
|
|
51
|
+
if (p.value && a.value) {
|
|
52
|
+
const f = a.value, t = p.value.getBoundingClientRect(), o = a.value.getBoundingClientRect(), l = o.left < 0 ? o.left : 0, i = o.top < 0 ? o.top : 0, h = {
|
|
53
|
+
left: { top: t.top - (o.height - t.height) / 2 - i, left: (t == null ? void 0 : t.left) - o.width - l - e.offset },
|
|
54
|
+
right: { top: t.top - (o.height - t.height) / 2 - i, left: (t == null ? void 0 : t.left) + t.width - l + e.offset },
|
|
55
|
+
bottom: { top: (t == null ? void 0 : t.bottom) - i + e.offset, left: (t == null ? void 0 : t.left) - l },
|
|
56
|
+
"bottom-center": { top: (t == null ? void 0 : t.bottom) - i + e.offset, left: (t == null ? void 0 : t.left) + t.width / 2 - o.width / 2 - l },
|
|
57
|
+
top: { top: t.top - o.height - e.offset - i, left: (t == null ? void 0 : t.left) - l },
|
|
58
|
+
"top-center": { top: t.top - o.height - e.offset - i, left: (t == null ? void 0 : t.left) + t.width / 2 - o.width / 2 - l },
|
|
59
|
+
"bottom-left": { top: (t == null ? void 0 : t.bottom) - i + e.offset, left: (t == null ? void 0 : t.left) + t.width - o.width - l }
|
|
54
60
|
};
|
|
55
|
-
f.style.top = h[
|
|
61
|
+
f.style.top = h[e.position].top + "px", f.style.left = h[e.position].left + "px";
|
|
56
62
|
}
|
|
57
63
|
}), r.value = null;
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
const f = g(
|
|
64
|
+
}, e.delay));
|
|
65
|
+
}, k = () => {
|
|
66
|
+
e.trigger !== "auto" && (r.value && (clearTimeout(r.value), r.value = null), c.value = !1, v(() => {
|
|
67
|
+
const f = g(a);
|
|
62
68
|
f && (f.style.top = "0", f.style.left = "0");
|
|
63
69
|
}));
|
|
64
|
-
},
|
|
70
|
+
}, N = () => {
|
|
65
71
|
m(), c.value = !0, v(() => {
|
|
66
|
-
if (
|
|
67
|
-
const f =
|
|
68
|
-
left: { top: t.top - (
|
|
69
|
-
right: { top: t.top - (
|
|
70
|
-
bottom: { top: (t == null ? void 0 : t.bottom) - i +
|
|
71
|
-
"bottom-center": { top: (t == null ? void 0 : t.bottom) - i +
|
|
72
|
-
top: { top: t.top -
|
|
73
|
-
"top-center": { top: t.top -
|
|
74
|
-
"bottom-left": { top: (t == null ? void 0 : t.bottom) - i +
|
|
72
|
+
if (p.value && a.value) {
|
|
73
|
+
const f = a.value, t = p.value.getBoundingClientRect(), o = a.value.getBoundingClientRect(), l = o.left < 0 ? o.left : 0, i = o.top < 0 ? o.top : 0, h = {
|
|
74
|
+
left: { top: t.top - (o.height - t.height) / 2 - i, left: (t == null ? void 0 : t.left) - o.width - l - e.offset },
|
|
75
|
+
right: { top: t.top - (o.height - t.height) / 2 - i, left: (t == null ? void 0 : t.left) + t.width - l + e.offset },
|
|
76
|
+
bottom: { top: (t == null ? void 0 : t.bottom) - i + e.offset, left: (t == null ? void 0 : t.left) - l },
|
|
77
|
+
"bottom-center": { top: (t == null ? void 0 : t.bottom) - i + e.offset, left: (t == null ? void 0 : t.left) + t.width / 2 - o.width / 2 - l },
|
|
78
|
+
top: { top: t.top - o.height - e.offset - i, left: (t == null ? void 0 : t.left) - l },
|
|
79
|
+
"top-center": { top: t.top - o.height - e.offset - i, left: (t == null ? void 0 : t.left) + t.width / 2 - o.width / 2 - l },
|
|
80
|
+
"bottom-left": { top: (t == null ? void 0 : t.bottom) - i + e.offset, left: (t == null ? void 0 : t.left) + t.width - o.width - l }
|
|
75
81
|
};
|
|
76
|
-
f.style.top = h[
|
|
82
|
+
f.style.top = h[e.position].top + "px", f.style.left = h[e.position].left + "px";
|
|
77
83
|
}
|
|
78
|
-
}),
|
|
84
|
+
}), e.autoShowDuration > 0 && (u.value = setTimeout(() => {
|
|
79
85
|
c.value = !1;
|
|
80
|
-
},
|
|
86
|
+
}, e.autoShowDuration));
|
|
81
87
|
}, m = () => {
|
|
82
88
|
u.value && (clearTimeout(u.value), u.value = null);
|
|
83
89
|
};
|
|
84
|
-
return
|
|
90
|
+
return R(() => {
|
|
85
91
|
r.value && clearTimeout(r.value), m();
|
|
86
|
-
}),
|
|
87
|
-
startAutoShow:
|
|
92
|
+
}), x({
|
|
93
|
+
startAutoShow: N,
|
|
88
94
|
clearAutoTimer: m
|
|
89
|
-
}), (f, t) => (s(),
|
|
90
|
-
|
|
95
|
+
}), (f, t) => (s(), d(V, null, [
|
|
96
|
+
W("div", {
|
|
91
97
|
ref_key: "container",
|
|
92
|
-
ref:
|
|
98
|
+
ref: p,
|
|
93
99
|
class: "tooltip-wrapper",
|
|
94
|
-
onMouseover:
|
|
95
|
-
onMouseout:
|
|
100
|
+
onMouseover: C,
|
|
101
|
+
onMouseout: k
|
|
96
102
|
}, [
|
|
97
|
-
|
|
103
|
+
E(f.$slots, "default", {}, void 0, !0)
|
|
98
104
|
], 544),
|
|
99
|
-
(s(),
|
|
100
|
-
M
|
|
101
|
-
default:
|
|
102
|
-
c.value ? (s(),
|
|
105
|
+
(s(), z(I, { to: "body" }, [
|
|
106
|
+
L(M, null, {
|
|
107
|
+
default: $(() => [
|
|
108
|
+
c.value ? (s(), d("span", {
|
|
103
109
|
key: 0,
|
|
104
110
|
ref_key: "tooltip",
|
|
105
|
-
ref:
|
|
111
|
+
ref: a,
|
|
106
112
|
"data-theme": g(y)().theme ? g(y)().theme : "light",
|
|
107
|
-
class:
|
|
108
|
-
|
|
113
|
+
class: F(_.value),
|
|
114
|
+
style: q(B.value)
|
|
115
|
+
}, P(w.text), 15, G)) : j("", !0)
|
|
109
116
|
]),
|
|
110
117
|
_: 1
|
|
111
118
|
})
|
|
@@ -114,5 +121,5 @@ const U = ["data-theme"], Z = /* @__PURE__ */ k({
|
|
|
114
121
|
}
|
|
115
122
|
});
|
|
116
123
|
export {
|
|
117
|
-
|
|
124
|
+
tt as default
|
|
118
125
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./AudioMessage.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1a1c6565"]]);
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
|
7
7
|
};
|