@vlprojects-chat/chat 0.9.9 → 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.
Files changed (2) hide show
  1. package/dist/index.mjs +45 -51
  2. 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.9.9", Bse = "VLprojects chat", Use = "ISC", Wse = "dist/index.d.ts", Hse = "./dist/index.mjs", Gse = "./dist/index.mjs", qse = [
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: "git+ssh://git@github.com/VLprojects/chat.git"
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,14 +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
- if (t.isMultiselect) {
56822
- o((c) => ({ ...c, [a]: !c[a] }));
56823
- return;
56824
- }
56825
- o((c) => ({
56826
- ...t.options.reduce((u, l) => ({ ...u, [l.id]: !1 }), {}),
56827
- [a]: !c[a]
56828
- }));
56825
+ !r[a] && !t.isMultiselect && Object.values(r).filter(Boolean).length > 0 || o((c) => ({ ...c, [a]: !c[a] }));
56829
56826
  };
56830
56827
  return /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
56831
56828
  /* @__PURE__ */ h.jsx(ye, { container: !0, direction: "column", rowGap: 2, children: t.options.map((a) => /* @__PURE__ */ h.jsx(
@@ -57044,49 +57041,46 @@ const gye = (e) => {
57044
57041
  {
57045
57042
  name: "PollPortal"
57046
57043
  }
57047
- ), Jye = (e, t) => {
57048
- const n = Sn(null), [r, o] = Be(null), i = Sn(0), s = Sn(100), a = Sn(void 0), c = (v) => {
57049
- var b;
57050
- if (!t)
57051
- return;
57052
- n.current || (n.current = v);
57053
- const g = (b = n.current) == null ? void 0 : b.getBoundingClientRect().height;
57054
- g && (i.current = g / window.innerHeight * 100, u(i.current));
57055
- }, u = (v) => {
57056
- if (n.current && (s.current = Math.max(0, Math.min(100, v)), n.current.style.height = `${s.current}vh`, s.current === 0)) {
57057
- n.current.style.transform = "translateY(100%)";
57058
- const g = () => {
57059
- var b;
57060
- (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();
57061
57056
  };
57062
- n.current.addEventListener("transitionend", g);
57057
+ t.current.addEventListener("transitionend", v);
57063
57058
  }
57064
- }, l = (v) => v instanceof TouchEvent ? v.touches[0].pageY : v.pageY, f = (v) => {
57065
- a.current = l(v), n.current && n.current.classList.add("dragging");
57066
- }, p = (v) => {
57067
- if (!a.current)
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)
57068
57063
  return;
57069
- const g = l(v), y = (a.current - g) / window.innerHeight * 100;
57070
- a.current = g, u(s.current + y);
57071
- }, m = () => {
57072
- if (i.current && a.current !== void 0) {
57073
- if (a.current = void 0, n.current && n.current.classList.remove("dragging"), s.current > 75) {
57074
- u(100);
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);
57075
57070
  return;
57076
57071
  }
57077
- if (s.current < 50) {
57078
- u(0);
57072
+ if (i.current < 50) {
57073
+ c(0);
57079
57074
  return;
57080
57075
  }
57081
- u(i.current);
57076
+ c(o.current);
57082
57077
  }
57083
57078
  };
57084
- return bt(() => t ? (r == null || r.addEventListener("mousedown", f), r == null || r.addEventListener("touchstart", f), window.addEventListener("mousemove", p), window.addEventListener("touchmove", p), window.addEventListener("mouseup", m), window.addEventListener("touchend", m), () => {
57085
- r == null || r.addEventListener("mousedown", f), r == null || r.addEventListener("touchstart", f), window.addEventListener("mousemove", p), window.addEventListener("touchmove", p), window.addEventListener("mouseup", m), window.addEventListener("touchend", m);
57086
- }) : () => {
57087
- }, [t, r]), {
57088
- dragRef: o,
57089
- 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
57090
57084
  };
57091
57085
  }, Zye = () => {
57092
57086
  let e = document.getElementById(ZO);
@@ -57097,7 +57091,7 @@ const gye = (e) => {
57097
57091
  ui: { isMobile: r }
57098
57092
  } = Ge(), o = Xye(), i = rn(() => {
57099
57093
  e.closePollPortal();
57100
- }, [e]), { dragRef: s, setInitialHeight: a } = Jye(i, r), c = (t == null ? void 0 : t.options.find((u) => u.isVoted)) || (t == null ? void 0 : t.isVoted);
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);
57101
57095
  return /* @__PURE__ */ h.jsxs(pv, { container: Zye(), children: [
57102
57096
  r && /* @__PURE__ */ h.jsx(
57103
57097
  "div",
@@ -57188,7 +57182,7 @@ const gye = (e) => {
57188
57182
  /* @__PURE__ */ h.jsx(t1e, {})
57189
57183
  ] });
57190
57184
  };
57191
- var uu = { VITE_APP_VERSION: "0.9.9", 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 };
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 };
57192
57186
  const zD = (e) => {
57193
57187
  $e.error("Chat init error", { case: "handleInitError", errorInfo: e }), Do.emit(so.App, {
57194
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.9.9",
5
- "description": "VLprojects chat",
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": "git+ssh://git@github.com/VLprojects/chat.git"
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
  ]