@mobilon-dev/chotto 0.3.110 → 0.3.112

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 (35) hide show
  1. package/dist/chotto.css +1 -1
  2. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue.js +2 -2
  3. package/dist/components/2_blocks/FeedFoundItem/FeedFoundItem.vue2.js +37 -25
  4. package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue.js +2 -2
  5. package/dist/components/2_feed_elements/FeedReplyQuote/FeedReplyQuote.vue2.js +14 -11
  6. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue.js +3 -3
  7. package/dist/components/2_feed_elements/ImageMessage/ImageMessage.vue2.js +341 -253
  8. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue.js +3 -3
  9. package/dist/components/2_feed_elements/ReplyImageMessage/ReplyImageMessage.vue2.js +27 -27
  10. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue.js +1 -1
  11. package/dist/components/2_feed_elements/ReplyVideoMessage/ReplyVideoMessage.vue2.js +48 -35
  12. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue.js +3 -3
  13. package/dist/components/2_feed_elements/VideoMessage/VideoMessage.vue2.js +297 -286
  14. package/dist/hooks/messages/buildReplyPayload.js +14 -9
  15. package/dist/hooks/messages/getImageMessageItems.js +21 -0
  16. package/dist/hooks/validators/messages/messageValidator.js +59 -52
  17. package/dist/index.js +80 -77
  18. package/dist/themes/dark.css +1 -1
  19. package/dist/themes/default.css +1 -1
  20. package/dist/themes/glass.css +1 -1
  21. package/dist/themes/green.css +1 -1
  22. package/dist/themes/mobilon1.css +1 -1
  23. package/dist/types/src/apps/data/messages.d.ts +535 -74
  24. package/dist/types/src/components/2_feed_elements/ImageMessage/stories/ImageMessage.stories.d.ts +5 -0
  25. package/dist/types/src/components/2_feed_elements/ImageMessage/styles/types.d.ts +40 -0
  26. package/dist/types/src/components/2_feed_elements/ReplyVideoMessage/styles/types.d.ts +32 -0
  27. package/dist/types/src/components/2_feed_elements/VideoMessage/stories/VideoMessage.stories.d.ts +3 -0
  28. package/dist/types/src/components/2_feed_elements/VideoMessage/styles/types.d.ts +32 -0
  29. package/dist/types/src/components/2_feed_elements/types/components.d.ts +9 -1
  30. package/dist/types/src/components/2_feed_elements/types/messages.d.ts +27 -1
  31. package/dist/types/src/hooks/messages/buildReplyPayload.d.ts +5 -1
  32. package/dist/types/src/hooks/messages/getImageMessageItems.d.ts +12 -0
  33. package/dist/types/src/hooks/messages/index.d.ts +1 -0
  34. package/dist/types/src/hooks/validators/messages/types.d.ts +12 -0
  35. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import o from "./FeedFoundItem.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dd915a68"]]);
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ead1327f"]]);
5
5
  export {
6
- r as default
6
+ a as default
7
7
  };
@@ -1,8 +1,16 @@
1
- import { defineComponent as m, computed as r, createElementBlock as s, openBlock as i, normalizeClass as c, createElementVNode as t, toDisplayString as o, createCommentVNode as a } from "vue";
2
- const u = { class: "feed-found-item__avatar-container" }, f = ["src"], _ = {
1
+ import { defineComponent as u, computed as l, createElementBlock as o, openBlock as s, normalizeClass as r, createElementVNode as i, toDisplayString as c, createCommentVNode as m } from "vue";
2
+ import "../../../locale/useLocale.js";
3
+ /* empty css */
4
+ import "../../../node_modules/linkifyjs/dist/linkify.js";
5
+ import "../../../node_modules/linkify-string/dist/linkify-string.js";
6
+ import "../../../functions/parseMarkdown.js";
7
+ /* empty css */
8
+ /* empty css */
9
+ import { getPrimaryImageItem as f } from "../../../hooks/messages/getImageMessageItems.js";
10
+ const p = { class: "feed-found-item__avatar-container" }, _ = ["src"], g = {
3
11
  key: 1,
4
12
  class: "pi pi-user"
5
- }, p = { class: "feed-found-item__info" }, h = { class: "feed-found-item__first-line" }, g = { class: "feed-found-item__name" }, v = { class: "feed-found-item__time" }, y = { class: "feed-found-item__second-line" }, b = ["src"], k = /* @__PURE__ */ m({
13
+ }, h = { class: "feed-found-item__info" }, v = { class: "feed-found-item__first-line" }, b = { class: "feed-found-item__name" }, j = { class: "feed-found-item__time" }, y = { class: "feed-found-item__second-line" }, x = ["src"], S = /* @__PURE__ */ u({
6
14
  __name: "FeedFoundItem",
7
15
  props: {
8
16
  object: {
@@ -14,48 +22,52 @@ const u = { class: "feed-found-item__avatar-container" }, f = ["src"], _ = {
14
22
  default: !1
15
23
  }
16
24
  },
17
- setup(e) {
18
- const d = e, n = r(() => ({
25
+ setup(t) {
26
+ const n = t, a = l(() => {
27
+ if (n.object.type !== "message.image") return "";
28
+ const e = f(n.object);
29
+ return (e == null ? void 0 : e.imagePreviewUrl) || (e == null ? void 0 : e.url) || "";
30
+ }), d = l(() => ({
19
31
  "message.file": "pi pi-file",
20
32
  "message.audio": "pi pi-volume-up",
21
33
  "message.video": "pi pi-video",
22
34
  "message.call": "pi pi-phone"
23
- })[d.object.type] || null);
24
- return (l, j) => (i(), s("div", {
25
- class: c(["feed-found-item__container", { "feed-found-item__selected-container": e.selected }])
35
+ })[n.object.type] || null);
36
+ return (e, k) => (s(), o("div", {
37
+ class: r(["feed-found-item__container", { "feed-found-item__selected-container": t.selected }])
26
38
  }, [
27
- t("div", u, [
28
- e.object.avatar ? (i(), s("img", {
39
+ i("div", p, [
40
+ t.object.avatar ? (s(), o("img", {
29
41
  key: 0,
30
- src: e.object.avatar,
42
+ src: t.object.avatar,
31
43
  width: "48",
32
44
  height: "48"
33
- }, null, 8, f)) : (i(), s("span", _))
45
+ }, null, 8, _)) : (s(), o("span", g))
34
46
  ]),
35
- t("div", p, [
36
- t("div", h, [
37
- t("p", g, o(e.object.subtext), 1),
38
- t("p", v, o(e.object.time), 1)
47
+ i("div", h, [
48
+ i("div", v, [
49
+ i("p", b, c(t.object.subtext), 1),
50
+ i("p", j, c(t.object.time), 1)
39
51
  ]),
40
- t("div", y, [
41
- e.object.type == "message.image" ? (i(), s("img", {
52
+ i("div", y, [
53
+ a.value ? (s(), o("img", {
42
54
  key: 0,
43
- src: e.object.url,
55
+ src: a.value,
44
56
  style: { "margin-right": "3px" },
45
57
  width: "24",
46
58
  height: "24"
47
- }, null, 8, b)) : a("", !0),
48
- n.value ? (i(), s("span", {
59
+ }, null, 8, x)) : m("", !0),
60
+ d.value ? (s(), o("span", {
49
61
  key: 1,
50
- class: c(n.value),
62
+ class: r(d.value),
51
63
  style: { "margin-right": "3px", "font-size": "20px" }
52
- }, null, 2)) : a("", !0),
53
- t("p", null, o(e.object.text), 1)
64
+ }, null, 2)) : m("", !0),
65
+ i("p", null, c(t.object.text), 1)
54
66
  ])
55
67
  ])
56
68
  ], 2));
57
69
  }
58
70
  });
59
71
  export {
60
- k as default
72
+ S as default
61
73
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FeedReplyQuote.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0fc66794"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d0442c76"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as h, computed as a, createElementBlock as r, openBlock as n, normalizeClass as v, createCommentVNode as c, createElementVNode as k, toDisplayString as d } from "vue";
2
- const C = ["src"], E = { class: "feed-reply-quote__content" }, q = {
1
+ import { defineComponent as h, computed as a, createElementBlock as r, openBlock as n, normalizeClass as y, createCommentVNode as c, createElementVNode as k, toDisplayString as d } from "vue";
2
+ const w = ["src"], C = { class: "feed-reply-quote__content" }, E = {
3
3
  key: 0,
4
4
  class: "feed-reply-quote__heading"
5
- }, w = {
5
+ }, q = {
6
6
  key: 1,
7
7
  class: "feed-reply-quote__body"
8
8
  }, I = /* @__PURE__ */ h({
@@ -17,7 +17,10 @@ const C = ["src"], E = { class: "feed-reply-quote__content" }, q = {
17
17
  setup(m, { emit: g }) {
18
18
  const _ = g, t = m, p = /* @__PURE__ */ new Set(["message.image", "message.sticker"]), o = a(() => {
19
19
  const e = t.message;
20
- return !(e != null && e.url) || !p.has(e.type || "") || e.url.endsWith(".tgs") ? "" : e.url;
20
+ if ((e == null ? void 0 : e.type) === "message.video") return e.coverUrl || "";
21
+ if (!p.has((e == null ? void 0 : e.type) || "")) return "";
22
+ const s = e.imagePreviewUrl || e.url;
23
+ return !s || s.endsWith(".tgs") ? "" : s;
21
24
  }), i = a(() => {
22
25
  var s;
23
26
  const e = (s = t.message) == null ? void 0 : s.header;
@@ -43,14 +46,14 @@ const C = ["src"], E = { class: "feed-reply-quote__content" }, q = {
43
46
  return "";
44
47
  }
45
48
  }), f = a(() => o.value ? "grid" : "");
46
- function y() {
49
+ function v() {
47
50
  var e;
48
51
  (e = t.message) != null && e.messageId && _("reply", t.message.messageId);
49
52
  }
50
53
  return (e, s) => (n(), r("div", {
51
- class: v(["reply__container", f.value]),
54
+ class: y(["reply__container", f.value]),
52
55
  "data-testid": "feed-reply-quote",
53
- onClick: y
56
+ onClick: v
54
57
  }, [
55
58
  o.value ? (n(), r("img", {
56
59
  key: 0,
@@ -61,10 +64,10 @@ const C = ["src"], E = { class: "feed-reply-quote__content" }, q = {
61
64
  height: "40",
62
65
  loading: "lazy",
63
66
  decoding: "async"
64
- }, null, 8, C)) : c("", !0),
65
- k("div", E, [
66
- i.value ? (n(), r("p", q, d(i.value), 1)) : c("", !0),
67
- l.value ? (n(), r("p", w, d(l.value), 1)) : c("", !0)
67
+ }, null, 8, w)) : c("", !0),
68
+ k("div", C, [
69
+ i.value ? (n(), r("p", E, d(i.value), 1)) : c("", !0),
70
+ l.value ? (n(), r("p", q, d(l.value), 1)) : c("", !0)
68
71
  ])
69
72
  ], 2));
70
73
  }
@@ -1,7 +1,7 @@
1
- import a from "./ImageMessage.vue2.js";
1
+ import o from "./ImageMessage.vue2.js";
2
2
  /* empty css */
3
- import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(a, [["__scopeId", "data-v-3bc133aa"]]);
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-54182b88"]]);
5
5
  export {
6
6
  r as default
7
7
  };