@mobilon-dev/chotto 0.0.101 → 0.0.103
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/{CreateChat-fkFKBxtQ.js → CreateChat-B7Kq9eRQ.js} +4 -4
- package/dist/{CreateChat2-DgUQ2F5L.js → CreateChat2-A8L9xv_j.js} +2 -2
- package/dist/CreateDialog-AZafC-al.js +70 -0
- package/dist/ModalVideoRecorder-C7SsuCCi.js +143 -0
- package/dist/{SelectUser2-DQI-YvpZ.js → SelectUser2-Bk0d8g3e.js} +4 -4
- package/dist/{style.css → chotto.css} +1 -1
- package/dist/{index-D8nDb3IQ.js → index-i2H0KLkk.js} +238 -237
- package/dist/vuessages.es.js +1 -1
- package/dist/vuessages.umd.js +5 -5
- package/package.json +13 -13
- package/dist/CreateDialog-o27tJbMY.js +0 -65
- package/dist/ModalVideoRecorder-DI-hUcNt.js +0 -107
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@mobilon-dev/chotto",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.103",
|
4
4
|
"type": "module",
|
5
5
|
"main": "./dist/vuessages.umd.js",
|
6
6
|
"module": "./dist/vuessages.es.js",
|
@@ -35,23 +35,23 @@
|
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
37
|
"@chromatic-com/storybook": "^3.2.4",
|
38
|
-
"@storybook/addon-essentials": "^8.5.
|
39
|
-
"@storybook/addon-interactions": "^8.5.
|
40
|
-
"@storybook/addon-links": "^8.5.
|
41
|
-
"@storybook/blocks": "^8.5.
|
42
|
-
"@storybook/test": "^8.5.
|
43
|
-
"@storybook/vue3": "^8.5.
|
44
|
-
"@storybook/vue3-vite": "^8.5.
|
45
|
-
"@types/node": "^22.
|
38
|
+
"@storybook/addon-essentials": "^8.5.8",
|
39
|
+
"@storybook/addon-interactions": "^8.5.8",
|
40
|
+
"@storybook/addon-links": "^8.5.8",
|
41
|
+
"@storybook/blocks": "^8.5.8",
|
42
|
+
"@storybook/test": "^8.5.8",
|
43
|
+
"@storybook/vue3": "^8.5.8",
|
44
|
+
"@storybook/vue3-vite": "^8.5.8",
|
45
|
+
"@types/node": "^22.13.4",
|
46
46
|
"@vitejs/plugin-vue": "^5.2.1",
|
47
|
-
"eslint": "^9.
|
47
|
+
"eslint": "^9.20.1",
|
48
48
|
"eslint-plugin-vue": "^9.32.0",
|
49
49
|
"moment": "^2.30.1",
|
50
50
|
"pinia": "^2.3.1",
|
51
|
-
"storybook": "^8.5.
|
51
|
+
"storybook": "^8.5.8",
|
52
52
|
"typescript": "^5.7.3",
|
53
|
-
"vite": "^
|
53
|
+
"vite": "^6.1.1",
|
54
54
|
"vite-plugin-static-copy": "^2.2.0",
|
55
|
-
"vue-tsc": "^2.2.
|
55
|
+
"vue-tsc": "^2.2.2"
|
56
56
|
}
|
57
57
|
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import { ref as d, computed as y, openBlock as a, createElementBlock as n, createElementVNode as t, toDisplayString as s, withDirectives as c, Fragment as m, renderList as v, vModelSelect as p } from "vue";
|
2
|
-
import { _ as b } from "./index-D8nDb3IQ.js";
|
3
|
-
const h = { class: "modal__contact-line" }, C = ["value"], D = { class: "modal__channel-line" }, S = ["value"], q = ["disabled"], k = {
|
4
|
-
__name: "CreateDialog",
|
5
|
-
props: {
|
6
|
-
title: {
|
7
|
-
type: String,
|
8
|
-
required: !0
|
9
|
-
},
|
10
|
-
name: {
|
11
|
-
type: String,
|
12
|
-
required: !0
|
13
|
-
},
|
14
|
-
contacts: {
|
15
|
-
type: Array,
|
16
|
-
required: !0
|
17
|
-
},
|
18
|
-
channels: {
|
19
|
-
type: Array,
|
20
|
-
required: !0
|
21
|
-
}
|
22
|
-
},
|
23
|
-
emits: ["change", "submit"],
|
24
|
-
setup(o, { emit: _ }) {
|
25
|
-
const r = d(), i = d(), g = y(() => !!(r.value && i.value)), u = _, f = () => {
|
26
|
-
u("change", { channel: r.value, contact: i.value }), u("submit");
|
27
|
-
};
|
28
|
-
return (x, l) => (a(), n("div", null, [
|
29
|
-
t("h3", null, s(o.title), 1),
|
30
|
-
t("div", null, " Контакт: " + s(o.name), 1),
|
31
|
-
t("div", h, [
|
32
|
-
l[2] || (l[2] = t("h3", { style: { margin: "0" } }, "Куда пишем", -1)),
|
33
|
-
c(t("select", {
|
34
|
-
"onUpdate:modelValue": l[0] || (l[0] = (e) => i.value = e),
|
35
|
-
id: "folder"
|
36
|
-
}, [
|
37
|
-
(a(!0), n(m, null, v(o.contacts, (e) => (a(), n("option", { value: e }, s(e.value), 9, C))), 256))
|
38
|
-
], 512), [
|
39
|
-
[p, i.value]
|
40
|
-
])
|
41
|
-
]),
|
42
|
-
t("div", D, [
|
43
|
-
l[3] || (l[3] = t("h3", { style: { margin: "0" } }, "Через какой канал", -1)),
|
44
|
-
c(t("select", {
|
45
|
-
"onUpdate:modelValue": l[1] || (l[1] = (e) => r.value = e),
|
46
|
-
id: "folder"
|
47
|
-
}, [
|
48
|
-
(a(!0), n(m, null, v(o.channels, (e) => (a(), n("option", { value: e }, s(e.title), 9, S))), 256))
|
49
|
-
], 512), [
|
50
|
-
[p, r.value]
|
51
|
-
])
|
52
|
-
]),
|
53
|
-
t("button", {
|
54
|
-
type: "button",
|
55
|
-
class: "modal__button-start",
|
56
|
-
"aria-label": "Close modal",
|
57
|
-
disabled: !g.value,
|
58
|
-
onClick: f
|
59
|
-
}, " Начать диалог ", 8, q)
|
60
|
-
]));
|
61
|
-
}
|
62
|
-
}, A = /* @__PURE__ */ b(k, [["__scopeId", "data-v-958bf96c"]]);
|
63
|
-
export {
|
64
|
-
A as default
|
65
|
-
};
|
@@ -1,107 +0,0 @@
|
|
1
|
-
import { defineComponent as T, ref as a, computed as j, onMounted as B, openBlock as c, createElementBlock as _, Fragment as N, createElementVNode as o, withDirectives as h, vShow as M, normalizeClass as R, createCommentVNode as y, toDisplayString as O, nextTick as z, unref as x } from "vue";
|
2
|
-
import { _ as $ } from "./index-D8nDb3IQ.js";
|
3
|
-
const q = { class: "video-recorder__header" }, A = { class: "video-recorder__controls" }, G = { class: "video-recorder__recording-container" }, H = { class: "video-recorder__recording-time" }, J = /* @__PURE__ */ T({
|
4
|
-
__name: "ModalVideoRecorder",
|
5
|
-
emits: ["change", "submit", "close"],
|
6
|
-
setup(K, { emit: F }) {
|
7
|
-
const V = a(), t = a(0), n = a(0), i = a(0), v = a(0), I = j(() => {
|
8
|
-
let l = v.value < 10 ? "0" + v.value : v.value, e = i.value < 10 ? "0" + i.value : i.value, d = n.value < 10 ? "0" + n.value : n.value, S = t.value < 10 ? "00" + t.value : t.value < 100 ? "0" + t.value : t.value;
|
9
|
-
return r.value ? l + ":" + e + ":" + d + ":" + S : " ";
|
10
|
-
}), m = a(), p = a(), r = a(!1), u = a(), f = a(), b = a([]), s = a(), g = a(), L = async () => {
|
11
|
-
r.value || (V.value = setInterval(() => {
|
12
|
-
t.value += 10, t.value == 1e3 && (t.value = 0, n.value++, n.value == 60 && (n.value = 0, i.value++, i.value == 60 && (i.value = 0, v.value++)));
|
13
|
-
}, 10), r.value = !0, f.value instanceof MediaStream && (u.value = new MediaRecorder(f.value), u.value.start(), u.value.ondataavailable = (l) => {
|
14
|
-
b.value.push(l.data);
|
15
|
-
}));
|
16
|
-
}, U = async () => {
|
17
|
-
C(), s.value && (s.value = void 0, await w());
|
18
|
-
}, D = () => {
|
19
|
-
u.value && (u.value.stop(), u.value.onstop = async () => {
|
20
|
-
g.value = new File(b.value, "videomessage.mp4", { type: "video/*" });
|
21
|
-
const l = URL.createObjectURL(g.value);
|
22
|
-
s.value = l, z(() => {
|
23
|
-
p.value && (p.value.src = l);
|
24
|
-
});
|
25
|
-
}), C();
|
26
|
-
}, C = () => {
|
27
|
-
clearInterval(V.value), t.value = 0, n.value = 0, i.value = 0, v.value = 0, r.value = !1, u.value = void 0, b.value = [];
|
28
|
-
}, k = F, E = () => {
|
29
|
-
k("change", { videoFile: g.value }), k("submit");
|
30
|
-
}, w = async () => {
|
31
|
-
await navigator.mediaDevices.getUserMedia({ audio: !0, video: !0 }).then((l) => {
|
32
|
-
const e = x(m.value);
|
33
|
-
f.value = l, e.srcObject = l, e.addEventListener("loadedmetadata", () => {
|
34
|
-
var d;
|
35
|
-
(d = x(m.value)) == null || d.play();
|
36
|
-
}), e.muted = !0;
|
37
|
-
});
|
38
|
-
};
|
39
|
-
return B(async () => {
|
40
|
-
await w();
|
41
|
-
}), (l, e) => (c(), _(N, null, [
|
42
|
-
o("div", q, [
|
43
|
-
o("button", {
|
44
|
-
class: "video-recorder__button video-recorder__button-close",
|
45
|
-
onClick: e[0] || (e[0] = (d) => k("close"))
|
46
|
-
}, e[1] || (e[1] = [
|
47
|
-
o("span", { class: "pi pi-times" }, null, -1)
|
48
|
-
]))
|
49
|
-
]),
|
50
|
-
o("div", null, [
|
51
|
-
h(o("video", {
|
52
|
-
ref_key: "refVideo",
|
53
|
-
ref: m
|
54
|
-
}, null, 512), [
|
55
|
-
[M, !s.value]
|
56
|
-
]),
|
57
|
-
h(o("video", {
|
58
|
-
ref_key: "refRecord",
|
59
|
-
ref: p,
|
60
|
-
controls: ""
|
61
|
-
}, null, 512), [
|
62
|
-
[M, s.value]
|
63
|
-
]),
|
64
|
-
o("div", A, [
|
65
|
-
o("div", G, [
|
66
|
-
s.value ? y("", !0) : (c(), _("button", {
|
67
|
-
key: 0,
|
68
|
-
class: R(["video-recorder__button", { "video-recorder__recording-button": r.value }]),
|
69
|
-
onClick: L
|
70
|
-
}, [
|
71
|
-
o("span", {
|
72
|
-
class: R(["pi", {
|
73
|
-
"pi-circle-fill video-recorder__recording-icon": r.value,
|
74
|
-
"pi-video": !r.value
|
75
|
-
}])
|
76
|
-
}, null, 2)
|
77
|
-
], 2)),
|
78
|
-
!r.value && s.value ? (c(), _("button", {
|
79
|
-
key: 1,
|
80
|
-
class: "video-recorder__button",
|
81
|
-
onClick: U
|
82
|
-
}, e[2] || (e[2] = [
|
83
|
-
o("span", { class: "pi pi-trash" }, null, -1)
|
84
|
-
]))) : y("", !0),
|
85
|
-
r.value ? (c(), _("button", {
|
86
|
-
key: 2,
|
87
|
-
class: "video-recorder__button",
|
88
|
-
onClick: D
|
89
|
-
}, e[3] || (e[3] = [
|
90
|
-
o("div", { class: "video-recorder__stop" }, null, -1)
|
91
|
-
]))) : y("", !0),
|
92
|
-
o("span", H, O(I.value), 1)
|
93
|
-
]),
|
94
|
-
o("button", {
|
95
|
-
class: R(["video-recorder__button", { "video-recorder__button-disabled": !s.value }]),
|
96
|
-
onClick: E
|
97
|
-
}, e[4] || (e[4] = [
|
98
|
-
o("span", { class: "video-recorder__save-button" }, " Прикрепить видео ", -1)
|
99
|
-
]), 2)
|
100
|
-
])
|
101
|
-
])
|
102
|
-
], 64));
|
103
|
-
}
|
104
|
-
}), W = /* @__PURE__ */ $(J, [["__scopeId", "data-v-bcb51b3a"]]);
|
105
|
-
export {
|
106
|
-
W as default
|
107
|
-
};
|