@vlprojects-chat/chat 0.9.8 → 0.10.0
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/index.mjs +45 -47
- package/package.json +12 -8
package/dist/index.mjs
CHANGED
|
@@ -35394,14 +35394,13 @@ const qA = {
|
|
|
35394
35394
|
}, _se = () => {
|
|
35395
35395
|
const e = te.useContext(yS);
|
|
35396
35396
|
return e ? e.chatSnackbarContainer : null;
|
|
35397
|
-
}, Fse = "@vlprojects-chat/chat", Lse = "vlprojects", Vse = "0.
|
|
35397
|
+
}, Fse = "@vlprojects-chat/chat", Lse = "vlprojects", Vse = "0.10.0", Bse = "vlprojects chat", Use = "ISC", Wse = "dist/index.d.ts", Hse = "./dist/index.mjs", Gse = "./dist/index.mjs", qse = [
|
|
35398
35398
|
"dist"
|
|
35399
35399
|
], zse = {
|
|
35400
35400
|
type: "git",
|
|
35401
|
-
url: "
|
|
35401
|
+
url: "https://github.com/VLprojects/lsd-chat-react.git"
|
|
35402
35402
|
}, Yse = {
|
|
35403
35403
|
start: "vite",
|
|
35404
|
-
"lint:js": "eslint ./src --ext .ts,.tsx",
|
|
35405
35404
|
build: "tsc --noEmit && vite build --mode production"
|
|
35406
35405
|
}, Kse = {
|
|
35407
35406
|
production: [
|
|
@@ -35461,6 +35460,11 @@ const qA = {
|
|
|
35461
35460
|
"@babel/preset-react": "^7.16.7",
|
|
35462
35461
|
"@babel/preset-typescript": "^7.16.7",
|
|
35463
35462
|
"@babel/runtime": "^7.16.7",
|
|
35463
|
+
"@semantic-release/commit-analyzer": "^9.0.1",
|
|
35464
|
+
"@semantic-release/git": "^10.0.0",
|
|
35465
|
+
"@semantic-release/github": "^8.0.1",
|
|
35466
|
+
"@semantic-release/npm": "^8.0.0",
|
|
35467
|
+
"@semantic-release/release-notes-generator": "^10.0.2",
|
|
35464
35468
|
"@types/events": "^3.0.3",
|
|
35465
35469
|
"@types/flat": "^5.0.2",
|
|
35466
35470
|
"@types/js-cookie": "^2.2.7",
|
|
@@ -35502,12 +35506,12 @@ const qA = {
|
|
|
35502
35506
|
}, Zse = {
|
|
35503
35507
|
"@emotion/react": "^11.x.x",
|
|
35504
35508
|
"@emotion/styled": "^11.x.x",
|
|
35509
|
+
"mobx-event-bus2": "^2.0.0",
|
|
35505
35510
|
react: "^17.0.2",
|
|
35506
|
-
"react-dom": "^17.0.2"
|
|
35507
|
-
"mobx-event-bus2": "^2.0.0"
|
|
35511
|
+
"react-dom": "^17.0.2"
|
|
35508
35512
|
}, Qse = {
|
|
35509
|
-
url: "https://github.com/VLprojects/chat/issues"
|
|
35510
|
-
}, $se = "https://github.com/VLprojects/chat#readme", eae = [
|
|
35513
|
+
url: "https://github.com/VLprojects/lsd-chat-react/issues"
|
|
35514
|
+
}, $se = "https://github.com/VLprojects/lsd-chat-react#readme", eae = [
|
|
35511
35515
|
"chat"
|
|
35512
35516
|
], l9 = {
|
|
35513
35517
|
name: Fse,
|
|
@@ -56818,10 +56822,7 @@ const gye = (e) => {
|
|
|
56818
56822
|
const { poll: t, voteHandler: n } = e, [r, o] = Be(
|
|
56819
56823
|
t.options.reduce((a, c) => ({ ...a, [c.id]: !1 }), {})
|
|
56820
56824
|
), i = !Object.values(r).find((a) => a), s = (a) => () => {
|
|
56821
|
-
o((c) => ({
|
|
56822
|
-
...t.options.reduce((u, l) => ({ ...u, [l.id]: !1 }), {}),
|
|
56823
|
-
[a]: !c[a]
|
|
56824
|
-
}));
|
|
56825
|
+
!r[a] && !t.isMultiselect && Object.values(r).filter(Boolean).length > 0 || o((c) => ({ ...c, [a]: !c[a] }));
|
|
56825
56826
|
};
|
|
56826
56827
|
return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
|
|
56827
56828
|
/* @__PURE__ */ h.jsx(ye, { container: !0, direction: "column", rowGap: 2, children: t.options.map((a) => /* @__PURE__ */ h.jsx(
|
|
@@ -57040,49 +57041,46 @@ const gye = (e) => {
|
|
|
57040
57041
|
{
|
|
57041
57042
|
name: "PollPortal"
|
|
57042
57043
|
}
|
|
57043
|
-
), Jye = (e
|
|
57044
|
-
const
|
|
57045
|
-
var
|
|
57046
|
-
|
|
57047
|
-
|
|
57048
|
-
|
|
57049
|
-
|
|
57050
|
-
|
|
57051
|
-
|
|
57052
|
-
|
|
57053
|
-
|
|
57054
|
-
|
|
57055
|
-
var b;
|
|
57056
|
-
(b = n.current) == null || b.removeEventListener("transitionend", g), e == null || e();
|
|
57044
|
+
), Jye = (e) => {
|
|
57045
|
+
const t = Sn(null), [n, r] = Be(null), o = Sn(0), i = Sn(100), s = Sn(void 0), a = (m) => {
|
|
57046
|
+
var g;
|
|
57047
|
+
t.current || (t.current = m);
|
|
57048
|
+
const v = (g = t.current) == null ? void 0 : g.getBoundingClientRect().height;
|
|
57049
|
+
v && (o.current = v / window.innerHeight * 100, c(o.current));
|
|
57050
|
+
}, c = (m) => {
|
|
57051
|
+
if (t.current && (i.current = Math.max(0, Math.min(100, m)), t.current.style.height = `${i.current}vh`, i.current === 0)) {
|
|
57052
|
+
t.current.style.transform = "translateY(100%)";
|
|
57053
|
+
const v = () => {
|
|
57054
|
+
var g;
|
|
57055
|
+
(g = t.current) == null || g.removeEventListener("transitionend", v), e == null || e();
|
|
57057
57056
|
};
|
|
57058
|
-
|
|
57057
|
+
t.current.addEventListener("transitionend", v);
|
|
57059
57058
|
}
|
|
57060
|
-
},
|
|
57061
|
-
|
|
57062
|
-
},
|
|
57063
|
-
if (!
|
|
57059
|
+
}, u = (m) => m instanceof TouchEvent ? m.touches[0].pageY : m.pageY, l = (m) => {
|
|
57060
|
+
s.current = u(m), t.current && t.current.classList.add("dragging");
|
|
57061
|
+
}, f = (m) => {
|
|
57062
|
+
if (!s.current)
|
|
57064
57063
|
return;
|
|
57065
|
-
const
|
|
57066
|
-
|
|
57067
|
-
},
|
|
57068
|
-
if (
|
|
57069
|
-
if (
|
|
57070
|
-
|
|
57064
|
+
const v = u(m), b = (s.current - v) / window.innerHeight * 100;
|
|
57065
|
+
s.current = v, c(i.current + b);
|
|
57066
|
+
}, p = () => {
|
|
57067
|
+
if (o.current && s.current !== void 0) {
|
|
57068
|
+
if (s.current = void 0, t.current && t.current.classList.remove("dragging"), i.current > 75) {
|
|
57069
|
+
c(100);
|
|
57071
57070
|
return;
|
|
57072
57071
|
}
|
|
57073
|
-
if (
|
|
57074
|
-
|
|
57072
|
+
if (i.current < 50) {
|
|
57073
|
+
c(0);
|
|
57075
57074
|
return;
|
|
57076
57075
|
}
|
|
57077
|
-
|
|
57076
|
+
c(o.current);
|
|
57078
57077
|
}
|
|
57079
57078
|
};
|
|
57080
|
-
return bt(() =>
|
|
57081
|
-
|
|
57082
|
-
})
|
|
57083
|
-
|
|
57084
|
-
|
|
57085
|
-
setInitialHeight: c
|
|
57079
|
+
return bt(() => (n == null || n.addEventListener("mousedown", l), n == null || n.addEventListener("touchstart", l), window.addEventListener("mousemove", f), window.addEventListener("touchmove", f), window.addEventListener("mouseup", p), window.addEventListener("touchend", p), () => {
|
|
57080
|
+
n == null || n.addEventListener("mousedown", l), n == null || n.addEventListener("touchstart", l), window.addEventListener("mousemove", f), window.addEventListener("touchmove", f), window.addEventListener("mouseup", p), window.addEventListener("touchend", p);
|
|
57081
|
+
}), [n]), {
|
|
57082
|
+
dragRef: r,
|
|
57083
|
+
setInitialHeight: a
|
|
57086
57084
|
};
|
|
57087
57085
|
}, Zye = () => {
|
|
57088
57086
|
let e = document.getElementById(ZO);
|
|
@@ -57093,7 +57091,7 @@ const gye = (e) => {
|
|
|
57093
57091
|
ui: { isMobile: r }
|
|
57094
57092
|
} = Ge(), o = Xye(), i = rn(() => {
|
|
57095
57093
|
e.closePollPortal();
|
|
57096
|
-
}, [e]), { dragRef: s, setInitialHeight: a } = Jye(i
|
|
57094
|
+
}, [e]), { dragRef: s, setInitialHeight: a } = Jye(i), c = (t == null ? void 0 : t.options.find((u) => u.isVoted)) || (t == null ? void 0 : t.isVoted);
|
|
57097
57095
|
return /* @__PURE__ */ h.jsxs(pv, { container: Zye(), children: [
|
|
57098
57096
|
r && /* @__PURE__ */ h.jsx(
|
|
57099
57097
|
"div",
|
|
@@ -57184,7 +57182,7 @@ const gye = (e) => {
|
|
|
57184
57182
|
/* @__PURE__ */ h.jsx(t1e, {})
|
|
57185
57183
|
] });
|
|
57186
57184
|
};
|
|
57187
|
-
var uu = { VITE_APP_VERSION: "0.
|
|
57185
|
+
var uu = { VITE_APP_VERSION: "0.10.0", VITE_APP_API_BASEURL: "https://api.livedigital.chat", VITE_APP_SENTRY_DSN: "https://445426b388f045748970982694bb1520@o1158674.ingest.sentry.io/6242013", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
57188
57186
|
const zD = (e) => {
|
|
57189
57187
|
$e.error("Chat init error", { case: "handleInitError", errorInfo: e }), Do.emit(so.App, {
|
|
57190
57188
|
event: Po.ChatInitError,
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vlprojects-chat/chat",
|
|
3
3
|
"author": "vlprojects",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "0.10.0",
|
|
5
|
+
"description": "vlprojects chat",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"main": "./dist/index.mjs",
|
|
@@ -12,11 +12,10 @@
|
|
|
12
12
|
],
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "
|
|
15
|
+
"url": "https://github.com/VLprojects/lsd-chat-react.git"
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"start": "vite",
|
|
19
|
-
"lint:js": "eslint ./src --ext .ts,.tsx",
|
|
20
19
|
"build": "tsc --noEmit && vite build --mode production"
|
|
21
20
|
},
|
|
22
21
|
"browserslist": {
|
|
@@ -82,6 +81,11 @@
|
|
|
82
81
|
"@babel/preset-react": "^7.16.7",
|
|
83
82
|
"@babel/preset-typescript": "^7.16.7",
|
|
84
83
|
"@babel/runtime": "^7.16.7",
|
|
84
|
+
"@semantic-release/commit-analyzer": "^9.0.1",
|
|
85
|
+
"@semantic-release/git": "^10.0.0",
|
|
86
|
+
"@semantic-release/github": "^8.0.1",
|
|
87
|
+
"@semantic-release/npm": "^8.0.0",
|
|
88
|
+
"@semantic-release/release-notes-generator": "^10.0.2",
|
|
85
89
|
"@types/events": "^3.0.3",
|
|
86
90
|
"@types/flat": "^5.0.2",
|
|
87
91
|
"@types/js-cookie": "^2.2.7",
|
|
@@ -124,14 +128,14 @@
|
|
|
124
128
|
"peerDependencies": {
|
|
125
129
|
"@emotion/react": "^11.x.x",
|
|
126
130
|
"@emotion/styled": "^11.x.x",
|
|
131
|
+
"mobx-event-bus2": "^2.0.0",
|
|
127
132
|
"react": "^17.0.2",
|
|
128
|
-
"react-dom": "^17.0.2"
|
|
129
|
-
"mobx-event-bus2": "^2.0.0"
|
|
133
|
+
"react-dom": "^17.0.2"
|
|
130
134
|
},
|
|
131
135
|
"bugs": {
|
|
132
|
-
"url": "https://github.com/VLprojects/chat/issues"
|
|
136
|
+
"url": "https://github.com/VLprojects/lsd-chat-react/issues"
|
|
133
137
|
},
|
|
134
|
-
"homepage": "https://github.com/VLprojects/chat#readme",
|
|
138
|
+
"homepage": "https://github.com/VLprojects/lsd-chat-react#readme",
|
|
135
139
|
"keywords": [
|
|
136
140
|
"chat"
|
|
137
141
|
]
|