@dotss/tictoccroc 0.0.29 → 0.0.30

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.
@@ -1,9 +1,9 @@
1
1
  import { jsxs as n, jsx as e, Fragment as q } from "react/jsx-runtime";
2
- import { useRef as x, useImperativeHandle as A, useEffect as y } from "react";
3
- import { Flexbox as d, Typography as v, Button as J, Icon as I, Menu as Q, MenuBlock as P, CircularProgressIndicator as X } from "@dotss/ui";
4
- import Y from "@dotss/ui/core/useTheme";
5
- import { useCheckHoverPossible as Z } from "@dotss/ui/hooks";
6
- import { MenuButton as _ } from "@dotss/ui/Menu";
2
+ import { useRef as x, useImperativeHandle as J, useEffect as y } from "react";
3
+ import { Flexbox as d, Typography as v, Button as Q, Icon as I, Menu as X, MenuBlock as P, CircularProgressIndicator as Y } from "@dotss/ui";
4
+ import Z from "@dotss/ui/core/useTheme";
5
+ import { useCheckHoverPossible as _ } from "@dotss/ui/hooks";
6
+ import { MenuButton as A } from "@dotss/ui/Menu";
7
7
  import V from "dayjs";
8
8
  import U from "../../Image/Image.mjs";
9
9
  import M from "../../../hooks/useInView/useInView.mjs";
@@ -32,8 +32,8 @@ function de({
32
32
  const {
33
33
  palette: { brand: k, grey: a, etc: H },
34
34
  spacing: E
35
- } = Y(), { isHoverPossible: K } = Z(), o = x(null), D = x(null), p = x(null);
36
- A(R, () => o.current);
35
+ } = Z(), { isHoverPossible: K } = _(), o = x(null), D = x(null), p = x(null);
36
+ J(R, () => o.current);
37
37
  const F = M(o), L = 300, s = l === "FAILED", N = f.length > L, O = (r) => {
38
38
  r === "resend" ? (t == null || t(), p.current = setTimeout(() => {
39
39
  S == null || S();
@@ -119,7 +119,6 @@ function de({
119
119
  {
120
120
  tag: "p",
121
121
  variant: "b3R",
122
- textAlign: i ? "right" : "left",
123
122
  inlineCSS: {
124
123
  whiteSpace: "pre-wrap",
125
124
  wordBreak: "break-all"
@@ -128,7 +127,7 @@ function de({
128
127
  }
129
128
  ),
130
129
  N && /* @__PURE__ */ e(
131
- J,
130
+ Q,
132
131
  {
133
132
  variant: "text",
134
133
  size: "xSmall",
@@ -146,7 +145,7 @@ function de({
146
145
  ] }),
147
146
  s && /* @__PURE__ */ n(q, { children: [
148
147
  /* @__PURE__ */ n(
149
- _,
148
+ A,
150
149
  {
151
150
  ref: D,
152
151
  isMenuOpen: !!g,
@@ -195,7 +194,7 @@ function de({
195
194
  }
196
195
  ),
197
196
  /* @__PURE__ */ n(
198
- Q,
197
+ X,
199
198
  {
200
199
  id: `message-${C}-menu`,
201
200
  anchorRef: D,
@@ -233,7 +232,7 @@ function de({
233
232
  }
234
233
  ),
235
234
  i && u > 0 && l === "PENDING" && /* @__PURE__ */ e(
236
- X,
235
+ Y,
237
236
  {
238
237
  size: "small",
239
238
  loop: !0,
@@ -1,33 +1,33 @@
1
- import c from "dayjs";
2
- function l(a) {
3
- return a.map(([o, s]) => {
4
- const n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
1
+ import w from "dayjs";
2
+ function h(a) {
3
+ return a.map(([c, s]) => {
4
+ const r = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map();
5
5
  for (let t = 0; t < s.length; t += 1) {
6
- const e = s[t], i = e.senderId;
7
- i == null || e.status === "FAILED" || e.type !== "USER" || (n.has(i) || n.set(i, e.id), r.set(i, e.id));
6
+ const n = s[t], d = n.senderId, i = s[t - 1], o = s[t + 1];
7
+ d == null || n.status === "FAILED" || n.type !== "USER" || (i && (i == null ? void 0 : i.senderId) !== d && u.set(`${d}-${n.id}`, n.id), o && (o == null ? void 0 : o.senderId) !== d && I.set(`${d}-${n.id}`, n.id), r.has(d) || r.set(d, n.id), e.set(d, n.id));
8
8
  }
9
- const d = new Set(n.values()), u = new Set(r.values());
9
+ const f = new Set(r.values()), l = new Set(e.values()), p = new Set(I.values()), $ = new Set(u.values());
10
10
  return [
11
- o,
11
+ c,
12
12
  s.map((t) => ({
13
13
  ...t,
14
14
  // 역방향 스크롤에 따른 역순 처리
15
- isFirstInGroup: u.has(t.id),
16
- isLastInGroup: d.has(t.id)
15
+ isFirstInGroup: l.has(t.id) || p.has(t.id),
16
+ isLastInGroup: f.has(t.id) || $.has(t.id)
17
17
  }))
18
18
  ];
19
19
  });
20
20
  }
21
- function I({
21
+ function E({
22
22
  mine: a,
23
- status: o,
23
+ status: c,
24
24
  unreadUserCount: s,
25
- content: n,
26
- regDatetime: r
25
+ content: r,
26
+ regDatetime: e
27
27
  }) {
28
- return `${a ? "나" : "상대방"}, ${n}, ${s && s > 0 ? "읽지 않음" : "읽음"}, ${o === "SUCCEEDED" ? "전송됨" : "전송 실패"}, ${c(r).format("YYYY년 MM월 DD일 A h:mm")}`;
28
+ return `${a ? "나" : "상대방"}, ${r}, ${s && s > 0 ? "읽지 않음" : "읽음"}, ${c === "SUCCEEDED" ? "전송됨" : "전송 실패"}, ${w(e).format("YYYY년 MM월 DD일 A h:mm")}`;
29
29
  }
30
30
  export {
31
- I as getMessageLabel,
32
- l as markMessageGroupBoundaries
31
+ E as getMessageLabel,
32
+ h as markMessageGroupBoundaries
33
33
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as i, jsxs as e, Fragment as s } from "react/jsx-runtime";
2
- import { Flexbox as a, Label as E, Typography as f, Icon as b } from "@dotss/ui";
3
- import R from "@dotss/ui/core/useTheme";
4
- import { useCheckHoverPossible as p } from "@dotss/ui/hooks";
2
+ import { Flexbox as a, Label as p, Typography as f, Icon as b } from "@dotss/ui";
3
+ import w from "@dotss/ui/core/useTheme";
4
+ import { useCheckHoverPossible as E } from "@dotss/ui/hooks";
5
5
  import c from "dayjs";
6
6
  function T({
7
7
  title: x,
@@ -12,10 +12,10 @@ function T({
12
12
  id: S,
13
13
  ...n
14
14
  }) {
15
- const { isHoverPossible: I } = p(), {
15
+ const { isHoverPossible: I } = E(), {
16
16
  palette: { grey: m },
17
17
  spacing: g
18
- } = R(), l = typeof n.onClick == "function", r = c(Y), u = o ? c(o) : c(), h = u.diff(r, "month"), d = Math.floor(h / 12), C = r.isSame(u, "year") && h % 12 < 1 ? 1 : h % 12;
18
+ } = w(), l = typeof n.onClick == "function", r = c(Y), u = o ? c(o) : c(), h = u.diff(r, "month"), d = Math.floor(h / 12), C = r.isSame(u, "year") && h % 12 < 1 ? 1 : h % 12;
19
19
  return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ e(
20
20
  a,
21
21
  {
@@ -53,12 +53,13 @@ function T({
53
53
  /* @__PURE__ */ e(a, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
54
54
  /* @__PURE__ */ e(a, { alignItems: "center", gap: 1, children: [
55
55
  k && /* @__PURE__ */ i(
56
- E,
56
+ p,
57
57
  {
58
58
  variant: "outlined",
59
59
  size: "small",
60
60
  color: "orange",
61
61
  inlineCSS: {
62
+ whiteSpace: "nowrap",
62
63
  marginRight: g.content(1)
63
64
  },
64
65
  children: "대표"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dotss/tictoccroc",
3
3
  "type": "module",
4
- "version": "0.0.29",
4
+ "version": "0.0.30",
5
5
  "description": "Tictoccroc shared components, hooks, utils, and APIs for Dotss",
6
6
  "main": "./dist/index.mjs",
7
7
  "module": "./dist/index.mjs",
@@ -106,8 +106,8 @@
106
106
  "@emotion/react": "^11.14.0",
107
107
  "@emotion/styled": "^11.14.0",
108
108
  "dayjs": "^1.11.13",
109
- "react": "^18.0.0 || 19.0.0",
110
- "react-dom": "^18.0.0 || 19.0.0",
109
+ "react": "^18.0.0 || ^19.0.0",
110
+ "react-dom": "^18.0.0 || ^19.0.0",
111
111
  "heic2any": "^0.0.4"
112
112
  },
113
113
  "publishConfig": {