@dotss/tictoccroc 0.0.13 → 0.0.15

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 (65) hide show
  1. package/dist/index.mjs +143 -112
  2. package/dist/shared/components/ChatKit/BotMessage/BotMessage.d.ts +29 -0
  3. package/dist/shared/components/ChatKit/BotMessage/BotMessage.mjs +174 -0
  4. package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.d.ts +8 -0
  5. package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.mjs +51 -0
  6. package/dist/shared/components/ChatKit/BotMessage/index.d.ts +4 -0
  7. package/dist/shared/components/ChatKit/BotMessage/index.mjs +8 -0
  8. package/dist/shared/components/ChatKit/InputBar/InputBar.d.ts +9 -0
  9. package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.d.ts +2 -0
  10. package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.mjs +85 -0
  11. package/dist/shared/components/ChatKit/InputBar/InputBar.mjs +130 -0
  12. package/dist/shared/components/ChatKit/InputBar/index.d.ts +4 -0
  13. package/dist/shared/components/ChatKit/InputBar/index.mjs +6 -0
  14. package/dist/shared/components/ChatKit/Message/Message.d.ts +40 -0
  15. package/dist/shared/components/ChatKit/Message/Message.fallback.d.ts +9 -0
  16. package/dist/shared/components/ChatKit/Message/Message.fallback.mjs +59 -0
  17. package/dist/shared/components/ChatKit/Message/Message.mjs +237 -0
  18. package/dist/shared/components/ChatKit/Message/Message.utils.d.ts +16 -0
  19. package/dist/shared/components/ChatKit/Message/Message.utils.mjs +34 -0
  20. package/dist/shared/components/ChatKit/Message/index.d.ts +5 -0
  21. package/dist/shared/components/ChatKit/Message/index.mjs +9 -0
  22. package/dist/shared/components/ChatKit/Seperator/Seperator.d.ts +6 -0
  23. package/dist/shared/components/ChatKit/Seperator/Seperator.mjs +29 -0
  24. package/dist/shared/components/ChatKit/Seperator/index.d.ts +3 -0
  25. package/dist/shared/components/ChatKit/Seperator/index.mjs +4 -0
  26. package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.d.ts +7 -0
  27. package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs +120 -0
  28. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.d.ts +15 -0
  29. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.mjs +107 -0
  30. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.d.ts +2 -0
  31. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs +6 -0
  32. package/dist/shared/components/ChatKit/SystemMessage/index.d.ts +5 -0
  33. package/dist/shared/components/ChatKit/SystemMessage/index.mjs +8 -0
  34. package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.d.ts +7 -0
  35. package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.mjs +55 -0
  36. package/dist/shared/components/ChatKit/UnreadMessagePill/index.d.ts +3 -0
  37. package/dist/shared/components/ChatKit/UnreadMessagePill/index.mjs +4 -0
  38. package/dist/shared/components/ChatKit/index.d.ts +12 -0
  39. package/dist/shared/components/ChatKit/index.mjs +29 -0
  40. package/dist/shared/components/Image/Image.mjs +59 -57
  41. package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +13 -14
  42. package/dist/shared/components/index.d.ts +2 -0
  43. package/dist/shared/components/index.mjs +65 -38
  44. package/dist/shared/hooks/index.d.ts +1 -0
  45. package/dist/shared/hooks/index.mjs +2 -0
  46. package/dist/shared/hooks/useInView/index.d.ts +2 -0
  47. package/dist/shared/hooks/useInView/index.mjs +4 -0
  48. package/dist/shared/hooks/useInView/useInView.d.ts +4 -0
  49. package/dist/shared/hooks/useInView/useInView.mjs +30 -0
  50. package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.d.ts +1 -0
  51. package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.mjs +21 -0
  52. package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.test.d.ts +1 -0
  53. package/dist/shared/utils/getCareTypeLabel/index.d.ts +2 -0
  54. package/dist/shared/utils/getCareTypeLabel/index.mjs +4 -0
  55. package/dist/shared/utils/index.d.ts +1 -0
  56. package/dist/shared/utils/index.mjs +12 -10
  57. package/dist/teacher/home/components/BannerAccount/BannerAccount.d.ts +3 -1
  58. package/dist/teacher/home/components/BannerAccount/BannerAccount.mjs +21 -20
  59. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.d.ts +3 -1
  60. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +22 -14
  61. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.d.ts +3 -1
  62. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +22 -14
  63. package/dist/teacher/home/components/TextAccount/TextAccount.d.ts +3 -1
  64. package/dist/teacher/home/components/TextAccount/TextAccount.mjs +21 -13
  65. package/package.json +1 -1
@@ -0,0 +1,85 @@
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import { Flexbox as o, IconButton as l } from "@dotss/ui";
3
+ import p from "@dotss/ui/core/useTheme";
4
+ const n = 24;
5
+ function b() {
6
+ const {
7
+ palette: { grey: r, background: t },
8
+ spacing: i
9
+ } = p();
10
+ return /* @__PURE__ */ e(
11
+ o,
12
+ {
13
+ pt: 2,
14
+ pb: 2,
15
+ pl: 4,
16
+ pr: 4,
17
+ gap: 1,
18
+ "aria-busy": !0,
19
+ alignItems: "center",
20
+ inlineCSS: {
21
+ cursor: "wait",
22
+ borderTop: `1px solid ${r[10]}`,
23
+ backgroundColor: r.white
24
+ },
25
+ children: /* @__PURE__ */ a(
26
+ o,
27
+ {
28
+ alignItems: "center",
29
+ pt: 2,
30
+ pb: 2,
31
+ pl: 4,
32
+ flexGrow: 1,
33
+ inlineCSS: {
34
+ position: "relative",
35
+ paddingRight: i.content(12),
36
+ border: `1px solid ${r[10]}`,
37
+ borderRadius: 20,
38
+ backgroundColor: t.primary
39
+ },
40
+ children: [
41
+ /* @__PURE__ */ e(
42
+ o,
43
+ {
44
+ tag: "textarea",
45
+ readOnly: !0,
46
+ flexGrow: 1,
47
+ disabled: !0,
48
+ inlineCSS: {
49
+ cursor: "wait",
50
+ height: n,
51
+ lineHeight: `${n}px`,
52
+ border: "none",
53
+ outline: "none",
54
+ backgroundColor: "transparent",
55
+ resize: "none",
56
+ scrollbarWidth: "none",
57
+ "&::-webkit-scrollbar": {
58
+ display: "none"
59
+ }
60
+ }
61
+ }
62
+ ),
63
+ /* @__PURE__ */ e(
64
+ l,
65
+ {
66
+ name: "ArrowUpwardLine",
67
+ variant: "filled",
68
+ disabled: !0,
69
+ inlineCSS: {
70
+ cursor: "wait !important",
71
+ position: "absolute",
72
+ right: 0,
73
+ bottom: 0
74
+ }
75
+ }
76
+ )
77
+ ]
78
+ }
79
+ )
80
+ }
81
+ );
82
+ }
83
+ export {
84
+ b as default
85
+ };
@@ -0,0 +1,130 @@
1
+ import { jsx as n, jsxs as C } from "react/jsx-runtime";
2
+ import { useState as S, useRef as h, useImperativeHandle as y, useEffect as k } from "react";
3
+ import { Flexbox as l, IconButton as I } from "@dotss/ui";
4
+ import $ from "@dotss/ui/core/useTheme";
5
+ const e = 24;
6
+ function E({ wrapperProps: i, inlineCSS: g, onSend: a, value: t, ref: u, ...c }) {
7
+ const {
8
+ palette: { background: b, grey: s },
9
+ spacing: o
10
+ } = $(), [m, x] = S(e), r = h(null), d = h(null);
11
+ y(u, () => d.current);
12
+ const f = () => {
13
+ !t || c.disabled || a == null || a();
14
+ };
15
+ return k(() => {
16
+ if (r.current) {
17
+ r.current.style.height = `${e}px`;
18
+ const p = r.current.scrollHeight, H = e * 3;
19
+ x(Math.min(p, H));
20
+ }
21
+ }, [t]), /* @__PURE__ */ n(
22
+ l,
23
+ {
24
+ pt: 2,
25
+ pb: 2,
26
+ pl: 4,
27
+ pr: 4,
28
+ gap: 1,
29
+ alignItems: "center",
30
+ ...i,
31
+ inlineCSS: {
32
+ borderTop: `1px solid ${s[10]}`,
33
+ backgroundColor: s.white,
34
+ ...i == null ? void 0 : i.inlineCSS
35
+ },
36
+ children: /* @__PURE__ */ C(
37
+ l,
38
+ {
39
+ alignItems: "center",
40
+ pt: 2,
41
+ pb: 2,
42
+ pl: 4,
43
+ flexGrow: 1,
44
+ inlineCSS: {
45
+ position: "relative",
46
+ paddingRight: o.content(12),
47
+ border: `1px solid ${s[10]}`,
48
+ borderRadius: 20,
49
+ backgroundColor: b.primary
50
+ },
51
+ children: [
52
+ /* @__PURE__ */ n(
53
+ l,
54
+ {
55
+ ref: r,
56
+ tag: "textarea",
57
+ value: t,
58
+ maxLength: c.maxLength,
59
+ readOnly: !0,
60
+ "aria-hidden": !0,
61
+ inlineCSS: {
62
+ width: `calc(100% - ${o.content(16)}px)`,
63
+ minHeight: e,
64
+ maxHeight: e,
65
+ lineHeight: `${e}px`,
66
+ border: "none",
67
+ outline: "none",
68
+ position: "absolute",
69
+ top: o.content(2),
70
+ left: o.content(4),
71
+ visibility: "hidden"
72
+ }
73
+ }
74
+ ),
75
+ /* @__PURE__ */ n(
76
+ l,
77
+ {
78
+ ref: d,
79
+ tag: "textarea",
80
+ flexGrow: 1,
81
+ value: t,
82
+ "aria-label": "메시지 입력",
83
+ ...c,
84
+ inlineCSS: {
85
+ height: m,
86
+ lineHeight: `${e}px`,
87
+ border: "none",
88
+ outline: "none",
89
+ backgroundColor: "transparent",
90
+ resize: "none",
91
+ scrollbarWidth: "none",
92
+ "&::-webkit-scrollbar": {
93
+ display: "none"
94
+ },
95
+ ...g
96
+ }
97
+ }
98
+ ),
99
+ /* @__PURE__ */ n(
100
+ "div",
101
+ {
102
+ onClick: f,
103
+ style: {
104
+ position: "absolute",
105
+ right: 0,
106
+ bottom: 0
107
+ },
108
+ children: /* @__PURE__ */ n(
109
+ I,
110
+ {
111
+ name: "ArrowUpwardLine",
112
+ variant: "filled",
113
+ disabled: !t,
114
+ "aria-label": "전송",
115
+ inlineCSS: {
116
+ pointerEvents: "none"
117
+ }
118
+ }
119
+ )
120
+ }
121
+ )
122
+ ]
123
+ }
124
+ )
125
+ }
126
+ );
127
+ }
128
+ export {
129
+ E as default
130
+ };
@@ -0,0 +1,4 @@
1
+ import { default as InputBar, InputBarProps } from './InputBar';
2
+ export { default as InputBarFallback } from './InputBar.fallback';
3
+ export type { InputBarProps };
4
+ export default InputBar;
@@ -0,0 +1,6 @@
1
+ import r from "./InputBar.mjs";
2
+ import { default as p } from "./InputBar.fallback.mjs";
3
+ export {
4
+ p as InputBarFallback,
5
+ r as default
6
+ };
@@ -0,0 +1,40 @@
1
+ import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
+ export type MessageStatus = 'SUCCEEDED' | 'PENDING' | 'FAILED';
3
+ export type BaseMessageProps = {
4
+ id: string | number;
5
+ mine: boolean;
6
+ avatarUrl?: string;
7
+ unreadUserCount: number;
8
+ content: string;
9
+ status: MessageStatus;
10
+ regDatetime: string;
11
+ showAvatar?: boolean;
12
+ showTime?: boolean;
13
+ openMenu?: never;
14
+ onCloseMenu?: never;
15
+ onClickMenu?: never;
16
+ onView?: () => void;
17
+ onResend?: never;
18
+ onDelete?: never;
19
+ onViewAll?: () => void;
20
+ } | {
21
+ id: string | number;
22
+ mine: boolean;
23
+ avatarUrl?: never;
24
+ unreadUserCount?: never;
25
+ status: Extract<MessageStatus, 'FAILED'>;
26
+ content: string;
27
+ regDatetime?: never;
28
+ showAvatar?: never;
29
+ showTime?: never;
30
+ openMenu?: boolean;
31
+ onCloseMenu?: () => void;
32
+ onClickMenu?: () => void;
33
+ onView?: never;
34
+ onResend?: () => void;
35
+ onDelete?: () => void;
36
+ onViewAll?: () => void;
37
+ };
38
+ export type MessageProps = Omit<FlexboxProps, 'id' | 'title'> & BaseMessageProps;
39
+ declare function Message({ id, content, mine, avatarUrl, unreadUserCount, regDatetime, status, onView, openMenu, onCloseMenu, onClickMenu, onResend, onDelete, onViewAll, showAvatar, showTime, ref, inlineCSS, ...props }: MessageProps): import("@emotion/react/jsx-runtime").JSX.Element;
40
+ export default Message;
@@ -0,0 +1,9 @@
1
+ import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
+ export interface MessageFallbackProps extends FlexboxProps {
3
+ mine: boolean;
4
+ showAvatar?: boolean;
5
+ showTime?: boolean;
6
+ width?: number;
7
+ }
8
+ declare function MessageFallback({ mine, showAvatar, showTime, width, inlineCSS, ...props }: MessageFallbackProps): import("@emotion/react/jsx-runtime").JSX.Element;
9
+ export default MessageFallback;
@@ -0,0 +1,59 @@
1
+ import { jsxs as t, jsx as i } from "react/jsx-runtime";
2
+ import { Flexbox as l, Skeleton as n } from "@dotss/ui";
3
+ import h from "@dotss/ui/core/useTheme";
4
+ function x({
5
+ mine: e = !1,
6
+ showAvatar: r = !1,
7
+ showTime: o = !1,
8
+ width: s = 200,
9
+ inlineCSS: a,
10
+ ...f
11
+ }) {
12
+ const { spacing: d } = h();
13
+ return /* @__PURE__ */ t(
14
+ l,
15
+ {
16
+ alignItems: "flex-end",
17
+ flexDirection: e ? "row-reverse" : "row",
18
+ pl: 4,
19
+ pr: 4,
20
+ gap: 1,
21
+ ...f,
22
+ inlineCSS: {
23
+ overflowAnchor: "none",
24
+ ...a
25
+ },
26
+ children: [
27
+ /* @__PURE__ */ t(l, { alignItems: "flex-start", gap: 2.5, children: [
28
+ !e && r && /* @__PURE__ */ i(n, { width: 32, height: 32, borderRadius: 200 }),
29
+ /* @__PURE__ */ i(
30
+ n,
31
+ {
32
+ width: s,
33
+ height: 38,
34
+ borderRadius: 12,
35
+ inlineCSS: {
36
+ marginLeft: !e && r ? d.content(10.5) : void 0
37
+ }
38
+ }
39
+ )
40
+ ] }),
41
+ /* @__PURE__ */ i(
42
+ l,
43
+ {
44
+ flexDirection: "column",
45
+ alignItems: e ? "flex-end" : "flex-start",
46
+ inlineCSS: {
47
+ visibility: o ? "visible" : "hidden",
48
+ whiteSpace: "nowrap"
49
+ },
50
+ children: /* @__PURE__ */ i(n, { width: 38, height: 12 })
51
+ }
52
+ )
53
+ ]
54
+ }
55
+ );
56
+ }
57
+ export {
58
+ x as default
59
+ };
@@ -0,0 +1,237 @@
1
+ import { jsxs as t, jsx as r, Fragment as O } from "react/jsx-runtime";
2
+ import { useRef as b, useImperativeHandle as q, useEffect as x } from "react";
3
+ import { Flexbox as s, Typography as v, Button as J, Icon as I, Menu as K, MenuBlock as $, CircularProgressIndicator as Q } from "@dotss/ui";
4
+ import W from "@dotss/ui/core/useTheme";
5
+ import { useCheckHoverPossible as X } from "@dotss/ui/hooks";
6
+ import { MenuButton as Y } from "@dotss/ui/Menu";
7
+ import Z from "dayjs";
8
+ import _ from "../../Image/Image.mjs";
9
+ import V from "../../../hooks/useInView/useInView.mjs";
10
+ function ar({
11
+ id: C,
12
+ content: p = "",
13
+ mine: e = !1,
14
+ avatarUrl: h = "",
15
+ unreadUserCount: f = 0,
16
+ regDatetime: z,
17
+ status: n,
18
+ onView: c,
19
+ openMenu: g,
20
+ onCloseMenu: i,
21
+ onClickMenu: B,
22
+ onResend: u,
23
+ onDelete: S,
24
+ onViewAll: D,
25
+ showAvatar: k,
26
+ showTime: F,
27
+ ref: R,
28
+ inlineCSS: T,
29
+ ...j
30
+ }) {
31
+ const {
32
+ palette: { brand: y, grey: o, etc: A },
33
+ spacing: w
34
+ } = W(), { isHoverPossible: G } = X(), l = b(null), E = b(null), m = b(null);
35
+ q(R, () => l.current);
36
+ const L = V(l), N = 300, d = n === "FAILED", P = p.length > N, H = (a) => {
37
+ a === "resend" ? (i == null || i(), m.current = setTimeout(() => {
38
+ u == null || u();
39
+ }, 200)) : a === "delete" && (i == null || i(), m.current = setTimeout(() => {
40
+ S == null || S();
41
+ }, 200));
42
+ };
43
+ return x(() => {
44
+ L && (c == null || c());
45
+ }, [L, c]), x(() => {
46
+ var a;
47
+ d && ((a = l == null ? void 0 : l.current) == null || a.scrollIntoView());
48
+ }, [d]), x(() => () => {
49
+ m.current && clearTimeout(m.current);
50
+ }, []), /* @__PURE__ */ t(
51
+ s,
52
+ {
53
+ ref: l,
54
+ alignItems: "flex-end",
55
+ flexDirection: e ? "row-reverse" : "row",
56
+ pl: 4,
57
+ pr: 4,
58
+ gap: 1,
59
+ "aria-busy": n === "PENDING",
60
+ ...j,
61
+ inlineCSS: {
62
+ cursor: n === "PENDING" ? "wait" : "default",
63
+ overflowAnchor: "none",
64
+ ...T
65
+ },
66
+ children: [
67
+ /* @__PURE__ */ t(s, { alignItems: "flex-start", gap: 2.5, children: [
68
+ !e && k && h && /* @__PURE__ */ r(
69
+ _,
70
+ {
71
+ src: h,
72
+ width: 32,
73
+ height: 32,
74
+ borderRadius: "50%",
75
+ alt: "째깍악어 선생님 심볼",
76
+ role: "presentation",
77
+ style: {
78
+ objectFit: "cover"
79
+ }
80
+ }
81
+ ),
82
+ /* @__PURE__ */ t(
83
+ s,
84
+ {
85
+ pt: 2,
86
+ pb: 2,
87
+ pl: 3,
88
+ pr: 3,
89
+ ml: !e && !k && h ? 10.5 : void 0,
90
+ flexDirection: "column",
91
+ gap: 2.5,
92
+ inlineCSS: {
93
+ borderRadius: 12,
94
+ backgroundColor: e ? y.primary.pageControl : o[10]
95
+ },
96
+ children: [
97
+ /* @__PURE__ */ r(
98
+ v,
99
+ {
100
+ tag: "p",
101
+ variant: "b3R",
102
+ textAlign: e ? "right" : "left",
103
+ inlineCSS: {
104
+ whiteSpace: "pre-wrap",
105
+ wordBreak: "break-all"
106
+ },
107
+ children: P ? p.slice(0, N) + "..." : p
108
+ }
109
+ ),
110
+ P && /* @__PURE__ */ r(
111
+ J,
112
+ {
113
+ variant: "text",
114
+ size: "xSmall",
115
+ endAdornment: /* @__PURE__ */ r(I, { name: "ChevronRightLine" }),
116
+ onClick: D,
117
+ inlineCSS: {
118
+ marginLeft: "auto"
119
+ },
120
+ children: "전체보기"
121
+ }
122
+ )
123
+ ]
124
+ }
125
+ )
126
+ ] }),
127
+ d && /* @__PURE__ */ t(O, { children: [
128
+ /* @__PURE__ */ t(
129
+ Y,
130
+ {
131
+ ref: E,
132
+ isMenuOpen: !!g,
133
+ menuId: `message-${C}-menu`,
134
+ onClick: B,
135
+ size: "xSmall",
136
+ inlineCSS: {
137
+ padding: w.content(0.5),
138
+ gap: w.content(0.5),
139
+ borderRadius: 200,
140
+ backgroundColor: g ? o[10] : "transparent",
141
+ cursor: "pointer",
142
+ ...G && {
143
+ "&:hover": {
144
+ backgroundColor: `${o[10]} !important`
145
+ }
146
+ },
147
+ "&:active": {
148
+ backgroundColor: `${o[10]} !important`
149
+ }
150
+ },
151
+ children: [
152
+ /* @__PURE__ */ r(
153
+ I,
154
+ {
155
+ name: "ResetLine",
156
+ size: "xSmall",
157
+ color: "grey.70",
158
+ inlineCSS: {
159
+ color: `${o[70]} !important`
160
+ }
161
+ }
162
+ ),
163
+ /* @__PURE__ */ r(
164
+ I,
165
+ {
166
+ name: "CloseLine",
167
+ size: "xSmall",
168
+ color: "etc.red",
169
+ inlineCSS: {
170
+ color: `${A.red} !important`
171
+ }
172
+ }
173
+ )
174
+ ]
175
+ }
176
+ ),
177
+ /* @__PURE__ */ t(
178
+ K,
179
+ {
180
+ id: `message-${C}-menu`,
181
+ anchorRef: E,
182
+ open: g,
183
+ onClose: i,
184
+ onChange: H,
185
+ width: 160,
186
+ placement: "bottom-left",
187
+ children: [
188
+ /* @__PURE__ */ r($, { value: "resend", children: "재전송" }),
189
+ /* @__PURE__ */ r($, { value: "delete", children: "삭제" })
190
+ ]
191
+ }
192
+ )
193
+ ] }),
194
+ !d && /* @__PURE__ */ t(
195
+ s,
196
+ {
197
+ flexDirection: "column",
198
+ alignItems: e ? "flex-end" : "flex-start",
199
+ inlineCSS: {
200
+ visibility: F ? "visible" : "hidden",
201
+ whiteSpace: "nowrap"
202
+ },
203
+ children: [
204
+ e && f > 0 && n === "SUCCEEDED" && /* @__PURE__ */ r(
205
+ v,
206
+ {
207
+ tag: "span",
208
+ variant: "c5B",
209
+ "aria-hidden": !0,
210
+ inlineCSS: {
211
+ color: y.primary.text
212
+ },
213
+ children: f
214
+ }
215
+ ),
216
+ e && f > 0 && n === "PENDING" && /* @__PURE__ */ r(
217
+ Q,
218
+ {
219
+ size: "small",
220
+ loop: !0,
221
+ inlineCSS: {
222
+ width: 12,
223
+ height: 12
224
+ }
225
+ }
226
+ ),
227
+ /* @__PURE__ */ r(v, { tag: "span", variant: "c5R", color: "etc.dimmed01", children: Z(z).format("A h:mm") })
228
+ ]
229
+ }
230
+ )
231
+ ]
232
+ }
233
+ );
234
+ }
235
+ export {
236
+ ar as default
237
+ };
@@ -0,0 +1,16 @@
1
+ import { BaseMessageProps, MessageStatus } from '.';
2
+ export declare function markMessageGroupBoundaries<T extends {
3
+ sender?: {
4
+ userId: number;
5
+ } | null;
6
+ id: number;
7
+ status: MessageStatus;
8
+ }>(messages: [string, T[]][]): [
9
+ string,
10
+ (T & {
11
+ isFirstInGroup: boolean;
12
+ isLastInGroup: boolean;
13
+ status: MessageStatus;
14
+ })[]
15
+ ][];
16
+ export declare function getMessageLabel({ mine, status, unreadUserCount, content, regDatetime }: Pick<BaseMessageProps, 'mine' | 'status' | 'unreadUserCount' | 'content' | 'regDatetime'>): string;
@@ -0,0 +1,34 @@
1
+ import f from "dayjs";
2
+ function I(i) {
3
+ return i.map(([a, s]) => {
4
+ var d;
5
+ const n = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map();
6
+ for (let t = 0; t < s.length; t += 1) {
7
+ const o = s[t], r = (d = o.sender) == null ? void 0 : d.userId;
8
+ r != null && (n.has(r) || n.set(r, o.id), e.set(r, o.id));
9
+ }
10
+ const u = new Set(n.values()), c = new Set(e.values());
11
+ return [
12
+ a,
13
+ s.map((t) => ({
14
+ ...t,
15
+ // 역방향 스크롤에 따른 역순 처리
16
+ isFirstInGroup: c.has(t.id),
17
+ isLastInGroup: u.has(t.id)
18
+ }))
19
+ ];
20
+ });
21
+ }
22
+ function m({
23
+ mine: i,
24
+ status: a,
25
+ unreadUserCount: s,
26
+ content: n,
27
+ regDatetime: e
28
+ }) {
29
+ return `${i ? "나" : "상대방"}, ${n}, ${s && s > 0 ? "읽지 않음" : "읽음"}, ${a === "SUCCEEDED" ? "전송됨" : "전송 실패"}, ${f(e).format("YYYY년 MM월 DD일 A h:mm")}`;
30
+ }
31
+ export {
32
+ m as getMessageLabel,
33
+ I as markMessageGroupBoundaries
34
+ };
@@ -0,0 +1,5 @@
1
+ import { default as Message, BaseMessageProps, MessageProps, MessageStatus } from './Message';
2
+ export { default as MessageFallback, type MessageFallbackProps } from './Message.fallback';
3
+ export { markMessageGroupBoundaries, getMessageLabel } from './Message.utils';
4
+ export type { BaseMessageProps, MessageProps, MessageStatus };
5
+ export default Message;
@@ -0,0 +1,9 @@
1
+ import a from "./Message.mjs";
2
+ import { default as o } from "./Message.fallback.mjs";
3
+ import { getMessageLabel as f, markMessageGroupBoundaries as g } from "./Message.utils.mjs";
4
+ export {
5
+ o as MessageFallback,
6
+ a as default,
7
+ f as getMessageLabel,
8
+ g as markMessageGroupBoundaries
9
+ };
@@ -0,0 +1,6 @@
1
+ import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
+ export interface SeperatorProps extends FlexboxProps {
3
+ date: string;
4
+ }
5
+ declare function Seperator({ date, ...props }: SeperatorProps): import("@emotion/react/jsx-runtime").JSX.Element;
6
+ export default Seperator;
@@ -0,0 +1,29 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Flexbox as o, Typography as i } from "@dotss/ui";
3
+ import n from "@dotss/ui/core/useTheme";
4
+ import p from "dayjs";
5
+ function f({ date: t, ...e }) {
6
+ const {
7
+ palette: { grey: a }
8
+ } = n();
9
+ return /* @__PURE__ */ r(o, { role: "separator", ...e, children: /* @__PURE__ */ r(
10
+ o,
11
+ {
12
+ pt: 0.5,
13
+ pb: 0.5,
14
+ pl: 2,
15
+ pr: 2,
16
+ inlineCSS: {
17
+ maxWidth: "fit-content",
18
+ marginLeft: "auto",
19
+ marginRight: "auto",
20
+ borderRadius: 20,
21
+ backgroundColor: a[10]
22
+ },
23
+ children: /* @__PURE__ */ r(i, { tag: "p", variant: "c3M", color: "grey.70", children: p(t).format("YYYY년 M월 D일 dddd") })
24
+ }
25
+ ) });
26
+ }
27
+ export {
28
+ f as default
29
+ };
@@ -0,0 +1,3 @@
1
+ import { default as Seperator, SeperatorProps } from './Seperator';
2
+ export type { SeperatorProps };
3
+ export default Seperator;
@@ -0,0 +1,4 @@
1
+ import e from "./Seperator.mjs";
2
+ export {
3
+ e as default
4
+ };