@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,7 @@
1
+ export interface DirectTradeRiskInfoBottomSheetProps {
2
+ open: boolean;
3
+ onClose: () => void;
4
+ onInquire: () => void;
5
+ }
6
+ declare function DirectTradeRiskInfoBottomSheet({ open, onClose, onInquire }: DirectTradeRiskInfoBottomSheetProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export default DirectTradeRiskInfoBottomSheet;
@@ -0,0 +1,120 @@
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
+ import { BottomSheet as h, BottomSheetTitle as m, BottomSheetContent as s, Typography as t, Flexbox as o, Icon as a, Button as l, BottomSheetAction as p } from "@dotss/ui";
3
+ import S from "@dotss/ui/core/useTheme";
4
+ function x({
5
+ open: c,
6
+ onClose: i,
7
+ onInquire: d
8
+ }) {
9
+ const {
10
+ palette: { background: g },
11
+ spacing: r
12
+ } = S();
13
+ return /* @__PURE__ */ n(h, { id: "system-message-action", open: c, onClose: i, children: [
14
+ /* @__PURE__ */ e(m, { onClose: i, children: "직거래는 왜 하면 안되나요?" }),
15
+ /* @__PURE__ */ n(s, { children: [
16
+ /* @__PURE__ */ n(t, { tag: "p", variant: "h3R", textAlign: "center", children: [
17
+ /* @__PURE__ */ e(t, { tag: "strong", variant: "h3B", color: "etc.red", children: "직거래" }),
18
+ ", 선생님에게 더 불리한 선택이에요."
19
+ ] }),
20
+ /* @__PURE__ */ e(
21
+ o,
22
+ {
23
+ tag: "aside",
24
+ role: "note",
25
+ mt: 3,
26
+ pt: 4,
27
+ pb: 4,
28
+ pl: 3,
29
+ pr: 3,
30
+ inlineCSS: {
31
+ borderRadius: 12,
32
+ backgroundColor: g.primary
33
+ },
34
+ children: /* @__PURE__ */ n(
35
+ o,
36
+ {
37
+ tag: "ul",
38
+ flexDirection: "column",
39
+ gap: 1,
40
+ inlineCSS: {
41
+ listStyle: "none",
42
+ padding: 0,
43
+ paddingLeft: r.content(2),
44
+ "& li:before": {
45
+ content: '"•"',
46
+ display: "inline-block",
47
+ maxWidth: 4,
48
+ fontSize: 18,
49
+ marginRight: r.content(2)
50
+ }
51
+ },
52
+ children: [
53
+ /* @__PURE__ */ e(t, { tag: "li", variant: "b4R", color: "grey.70", children: "부모님과의 갈등, 수업 취소, 아이 안전사고 발생 시 째깍악어로부터 어떠한 도움도 받을 수 없으며" }),
54
+ /* @__PURE__ */ e(t, { tag: "li", variant: "b4R", color: "grey.70", children: "직거래가 적발될 경우 경고 없이 활동이 어렵고 바로 계약이 해지돼요" }),
55
+ /* @__PURE__ */ e(t, { tag: "li", variant: "b4R", color: "grey.70", children: "또한, 영업 방해로 간주되어 법적 조치가 진행될 수 있어요" })
56
+ ]
57
+ }
58
+ )
59
+ }
60
+ ),
61
+ /* @__PURE__ */ n(
62
+ o,
63
+ {
64
+ tag: "section",
65
+ alignItems: "flex-start",
66
+ gap: 2,
67
+ mt: 3,
68
+ inlineCSS: {
69
+ position: "relative"
70
+ },
71
+ children: [
72
+ /* @__PURE__ */ e(
73
+ a,
74
+ {
75
+ name: "InformationLine",
76
+ color: "etc.orange",
77
+ size: "small",
78
+ inlineCSS: { flexShrink: 0 }
79
+ }
80
+ ),
81
+ /* @__PURE__ */ n(t, { tag: "p", variant: "b4R", color: "etc.orange", children: [
82
+ "부모님의 직거래 제안이 왔나요? 당황하지 마시고 째깍악어 운영본부에 알려주세요.",
83
+ /* @__PURE__ */ e(
84
+ t,
85
+ {
86
+ tag: "span",
87
+ "aria-hidden": !0,
88
+ inlineCSS: {
89
+ display: "inline-block",
90
+ minWidth: 70
91
+ }
92
+ }
93
+ )
94
+ ] }),
95
+ /* @__PURE__ */ e(
96
+ l,
97
+ {
98
+ variant: "text",
99
+ size: "xSmall",
100
+ color: "secondary",
101
+ endAdornment: /* @__PURE__ */ e(a, { name: "ChevronRightLine" }),
102
+ onClick: d,
103
+ inlineCSS: {
104
+ position: "absolute",
105
+ right: 0,
106
+ bottom: -2
107
+ },
108
+ children: "1:1 문의"
109
+ }
110
+ )
111
+ ]
112
+ }
113
+ )
114
+ ] }),
115
+ /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(l, { size: "large", onClick: i, children: "이해했어요" }) })
116
+ ] });
117
+ }
118
+ export {
119
+ x as default
120
+ };
@@ -0,0 +1,15 @@
1
+ import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
+ export type SystemMessageType = 'NEW_CHAT_ROOM_CREATED' | 'DIRECT_TRADE_WORD_DETECTED' | 'OTHER_ACCOUNT_NOT_NORMAL' | 'PARENT_BLOCKED_TEACHER';
3
+ export type SystemMessageCtaType = 'DIRECT_TRADE_WARNING';
4
+ export interface SystemMessageProps extends Omit<FlexboxProps, 'id'> {
5
+ id: string | number;
6
+ systemMessageType: SystemMessageType;
7
+ ctaType?: SystemMessageCtaType | null;
8
+ ctaTargetTable?: string | null;
9
+ ctaTargetId?: number | null;
10
+ content: string;
11
+ onAction?: (systemMessageType: SystemMessageType, ctaType?: SystemMessageCtaType | null, ctaTargetId?: number | null) => void;
12
+ onView?: () => void;
13
+ }
14
+ declare function SystemMessage({ children, ref, id, systemMessageType, content, ctaType, ctaTargetId, onAction, onView, inlineCSS, ...props }: SystemMessageProps): import("@emotion/react/jsx-runtime").JSX.Element;
15
+ export default SystemMessage;
@@ -0,0 +1,107 @@
1
+ import { jsx as e, jsxs as c, Fragment as b } from "react/jsx-runtime";
2
+ import { useRef as x, useImperativeHandle as R, useEffect as v } from "react";
3
+ import { Flexbox as d, Typography as o, Button as D, Icon as k } from "@dotss/ui";
4
+ import y from "@dotss/ui/core/useTheme";
5
+ import E from "../../../hooks/useInView/useInView.mjs";
6
+ function z({
7
+ children: I,
8
+ ref: m,
9
+ id: T,
10
+ systemMessageType: a,
11
+ content: p,
12
+ ctaType: l,
13
+ ctaTargetId: h,
14
+ onAction: i,
15
+ onView: n,
16
+ inlineCSS: u,
17
+ ...f
18
+ }) {
19
+ const {
20
+ palette: { grey: g, pink: S }
21
+ } = y(), r = x(null);
22
+ R(m, () => r.current);
23
+ const { isInView: s } = E(r), t = ["DIRECT_TRADE_WORD_DETECTED"].includes(a), C = () => i == null ? void 0 : i(a, l, h);
24
+ return v(() => {
25
+ s && (n == null || n());
26
+ }, [s, n]), /* @__PURE__ */ e(
27
+ d,
28
+ {
29
+ ref: r,
30
+ ml: 4,
31
+ mr: 4,
32
+ pt: 1,
33
+ pb: 1,
34
+ ...f,
35
+ inlineCSS: {
36
+ overflowAnchor: "none",
37
+ ...u
38
+ },
39
+ children: /* @__PURE__ */ e(
40
+ d,
41
+ {
42
+ flexDirection: "column",
43
+ p: 3,
44
+ inlineCSS: {
45
+ width: "100%",
46
+ backgroundColor: t ? S[10] : g[10],
47
+ borderRadius: 8
48
+ },
49
+ children: /* @__PURE__ */ c(
50
+ o,
51
+ {
52
+ tag: "p",
53
+ variant: "b4R",
54
+ color: t ? "pink.80" : "grey.60",
55
+ inlineCSS: {
56
+ position: "relative",
57
+ "& > span": {
58
+ fontWeight: 700
59
+ }
60
+ },
61
+ children: [
62
+ /* @__PURE__ */ e(o, { tag: "span", variant: "h5B", color: t ? "pink.80" : "grey.60", children: "알림" }),
63
+ " ",
64
+ p,
65
+ l && /* @__PURE__ */ c(b, { children: [
66
+ /* @__PURE__ */ e(
67
+ o,
68
+ {
69
+ tag: "span",
70
+ "aria-hidden": !0,
71
+ inlineCSS: {
72
+ display: "inline-block",
73
+ minWidth: 87
74
+ }
75
+ }
76
+ ),
77
+ /* @__PURE__ */ e(
78
+ D,
79
+ {
80
+ variant: "text",
81
+ size: "xSmall",
82
+ color: "secondary",
83
+ endAdornment: /* @__PURE__ */ e(k, { name: "ChevronRightLine" }),
84
+ onClick: C,
85
+ "aria-haspopup": "dialog",
86
+ "aria-controls": "system-message-action",
87
+ inlineCSS: {
88
+ position: "absolute",
89
+ right: 0,
90
+ bottom: -2,
91
+ fontWeight: 700
92
+ },
93
+ children: "더 알아보기"
94
+ }
95
+ )
96
+ ] })
97
+ ]
98
+ }
99
+ )
100
+ }
101
+ )
102
+ }
103
+ );
104
+ }
105
+ export {
106
+ z as default
107
+ };
@@ -0,0 +1,2 @@
1
+ import { SystemMessageProps } from '.';
2
+ export declare function getSystemMessageLabel({ content }: Pick<SystemMessageProps, 'content'>): string;
@@ -0,0 +1,6 @@
1
+ function t({ content: e }) {
2
+ return `알림, ${e}`;
3
+ }
4
+ export {
5
+ t as getSystemMessageLabel
6
+ };
@@ -0,0 +1,5 @@
1
+ import { default as SystemMessage, SystemMessageCtaType, SystemMessageProps, SystemMessageType } from './SystemMessage';
2
+ export { default as DirectTradeRiskInfoBottomSheet, type DirectTradeRiskInfoBottomSheetProps } from './(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet';
3
+ export { getSystemMessageLabel } from './SystemMessage.utils';
4
+ export type { SystemMessageProps, SystemMessageCtaType, SystemMessageType };
5
+ export default SystemMessage;
@@ -0,0 +1,8 @@
1
+ import t from "./SystemMessage.mjs";
2
+ import { default as s } from "./(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs";
3
+ import { getSystemMessageLabel as m } from "./SystemMessage.utils.mjs";
4
+ export {
5
+ s as DirectTradeRiskInfoBottomSheet,
6
+ t as default,
7
+ m as getSystemMessageLabel
8
+ };
@@ -0,0 +1,7 @@
1
+ import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
+ export interface UnreadMessagePillProps extends FlexboxProps {
3
+ onClick: () => void;
4
+ count: number;
5
+ }
6
+ declare function UnreadMessagePill({ onClick, count, inlineCSS, ...props }: UnreadMessagePillProps): import("@emotion/react/jsx-runtime").JSX.Element;
7
+ export default UnreadMessagePill;
@@ -0,0 +1,55 @@
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
+ import { useState as p, useEffect as f } from "react";
3
+ import { Chip as h, Typography as a, Icon as b } from "@dotss/ui";
4
+ import u from "@dotss/ui/core/useTheme";
5
+ function x({ onClick: t, count: e, inlineCSS: o, ...l }) {
6
+ const {
7
+ palette: { brand: d },
8
+ elevation: s
9
+ } = u(), [i, m] = p(e);
10
+ return f(() => {
11
+ e > 0 && m(e);
12
+ }, [e]), /* @__PURE__ */ r(
13
+ h,
14
+ {
15
+ tag: "button",
16
+ variant: "outlined",
17
+ endAdornment: /* @__PURE__ */ n(b, { name: "ArrowDownFill" }),
18
+ onClick: t,
19
+ disabled: e < 1,
20
+ "aria-disabled": e < 1,
21
+ "aria-hidden": e < 1,
22
+ ...l,
23
+ inlineCSS: {
24
+ boxShadow: s[1],
25
+ ...o
26
+ },
27
+ children: [
28
+ /* @__PURE__ */ r(a, { tag: "p", variant: "b4M", color: "grey.70", children: [
29
+ "읽지 않은 메세지",
30
+ " ",
31
+ /* @__PURE__ */ n(
32
+ a,
33
+ {
34
+ tag: "span",
35
+ variant: "b4M",
36
+ inlineCSS: {
37
+ color: d.primary.text
38
+ },
39
+ children: i
40
+ }
41
+ ),
42
+ "개"
43
+ ] }),
44
+ /* @__PURE__ */ r(a, { visuallyHidden: !0, role: "alert", children: [
45
+ "새 메시지 ",
46
+ i,
47
+ "개 도착"
48
+ ] })
49
+ ]
50
+ }
51
+ );
52
+ }
53
+ export {
54
+ x as default
55
+ };
@@ -0,0 +1,3 @@
1
+ import { default as UnreadMessagePill, UnreadMessagePillProps } from './UnreadMessagePill';
2
+ export type { UnreadMessagePillProps };
3
+ export default UnreadMessagePill;
@@ -0,0 +1,4 @@
1
+ import a from "./UnreadMessagePill.mjs";
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1,12 @@
1
+ export { default as Message } from './Message';
2
+ export { default as SystemMessage } from './SystemMessage';
3
+ export { default as BotMessage } from './BotMessage';
4
+ export { default as InputBar } from './InputBar';
5
+ export { default as Seperator } from './Seperator';
6
+ export { default as UnreadMessagePill } from './UnreadMessagePill';
7
+ export * from './Message';
8
+ export * from './SystemMessage';
9
+ export * from './BotMessage';
10
+ export * from './InputBar';
11
+ export * from './Seperator';
12
+ export * from './UnreadMessagePill';
@@ -0,0 +1,29 @@
1
+ import { default as t } from "./Message/Message.mjs";
2
+ import { default as r } from "./Message/Message.fallback.mjs";
3
+ import { getMessageLabel as f, markMessageGroupBoundaries as l } from "./Message/Message.utils.mjs";
4
+ import { default as p } from "./SystemMessage/SystemMessage.mjs";
5
+ import { default as u } from "./SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs";
6
+ import { getSystemMessageLabel as d } from "./SystemMessage/SystemMessage.utils.mjs";
7
+ import { default as n } from "./BotMessage/BotMessage.mjs";
8
+ import { getBotMessageLabel as b, getClassInfo as i, getCtaButtonText as k } from "./BotMessage/BotMessage.utils.mjs";
9
+ import { default as S } from "./InputBar/InputBar.mjs";
10
+ import { default as L } from "./InputBar/InputBar.fallback.mjs";
11
+ import { default as C } from "./Seperator/Seperator.mjs";
12
+ import { default as T } from "./UnreadMessagePill/UnreadMessagePill.mjs";
13
+ export {
14
+ n as BotMessage,
15
+ u as DirectTradeRiskInfoBottomSheet,
16
+ S as InputBar,
17
+ L as InputBarFallback,
18
+ t as Message,
19
+ r as MessageFallback,
20
+ C as Seperator,
21
+ p as SystemMessage,
22
+ T as UnreadMessagePill,
23
+ b as getBotMessageLabel,
24
+ i as getClassInfo,
25
+ k as getCtaButtonText,
26
+ f as getMessageLabel,
27
+ d as getSystemMessageLabel,
28
+ l as markMessageGroupBoundaries
29
+ };
@@ -1,69 +1,71 @@
1
- import { jsxs as g, jsx as d, Fragment as Z } from "react/jsx-runtime";
2
- import { forwardRef as r, useRef as L, useImperativeHandle as w, useState as h, useEffect as M } from "react";
3
- import { Flexbox as U, Skeleton as V } from "@dotss/ui";
1
+ import { jsxs as L, jsx as d, Fragment as Y } from "react/jsx-runtime";
2
+ import { forwardRef as Z, useRef as h, useImperativeHandle as w, useState as C, useEffect as R } from "react";
3
+ import { Flexbox as M, Skeleton as U } from "@dotss/ui";
4
4
  import F from "../../hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
5
5
  import b from "../../utils/getImageUrl/getImageUrl.mjs";
6
- import _ from "./Image.error.mjs";
7
- const k = 100, ot = r(
6
+ import V from "./Image.error.mjs";
7
+ const k = 100, ot = Z(
8
8
  ({
9
- src: q,
9
+ src: _,
10
10
  width: n,
11
11
  height: o,
12
- fit: A = "cover",
13
- position: D = "center",
14
- alt: C,
15
- scale: G = 2,
12
+ fit: q = "cover",
13
+ position: A = "center",
14
+ alt: r,
15
+ scale: D = 2,
16
16
  onLoad: E,
17
- onLazyLoad: S,
17
+ onLazyLoad: g,
18
18
  lazy: I = !1,
19
19
  borderRadius: l,
20
- disabledResizing: J = !1,
20
+ disabledResizing: G = !1,
21
21
  withIntrinsicRatio: x = !1,
22
22
  enableFallback: T = !1,
23
- enableErrorFallback: H = !0,
23
+ enableErrorFallback: W = !0,
24
24
  renderErrorFallback: c,
25
25
  wrapperProps: e = {},
26
- onError: W,
27
- ...a
28
- }, K) => {
29
- const u = L(null), $ = L(!1), m = L(null);
30
- w(K, () => m.current);
31
- const [y, N] = h(!1), [O, v] = h(!1), [f, j] = h(!1), z = b({ src: q, width: n, height: o, fit: A, position: D, scale: G, disabledResizing: J }), B = (t) => {
32
- v(!0), j(!1), typeof E == "function" && E(t);
33
- }, R = (t) => {
34
- j(!0), v(!1), typeof W == "function" && W(t.nativeEvent);
26
+ onError: H,
27
+ ...u
28
+ }, J) => {
29
+ const a = h(null), $ = h(!1), m = h(null);
30
+ w(J, () => m.current);
31
+ const [y, K] = C(!1), [O, v] = C(!1), [f, S] = C(!1), j = b({ src: _, width: n, height: o, fit: q, position: A, scale: D, disabledResizing: G }), z = (t) => {
32
+ v(!0), S(!1), typeof E == "function" && E(t);
33
+ }, B = (t) => {
34
+ S(!0), v(!1), typeof H == "function" && H(t.nativeEvent);
35
35
  };
36
- return M(() => {
37
- if (I && u.current) {
38
- const t = u.current, Q = () => {
36
+ return R(() => {
37
+ if (I && a.current) {
38
+ const t = a.current, N = () => {
39
39
  if (!t) return !1;
40
40
  const i = t.getBoundingClientRect();
41
41
  return i.bottom >= 0 && i.top <= (window.innerHeight || document.documentElement.clientHeight) + k;
42
42
  }, s = () => {
43
- Q() && N(!0);
44
- }, X = () => {
43
+ N() && K(!0);
44
+ }, Q = () => {
45
45
  var i;
46
46
  (i = window.appScreenContent) == null || i.addEventListener("scroll", s), window.addEventListener("resize", s), window.addEventListener("orientationchange", s);
47
- }, Y = () => {
47
+ }, X = () => {
48
48
  var i;
49
49
  (i = window.appScreenContent) == null || i.removeEventListener("scroll", s), window.removeEventListener("resize", s), window.removeEventListener("orientationchange", s);
50
50
  };
51
- return s(), X(), Y;
51
+ return s(), Q(), X;
52
52
  }
53
- }), M(() => {
54
- typeof S == "function" && y && !$.current && ($.current = !0, S());
55
- }, [S, y]), F(() => {
53
+ }), R(() => {
54
+ typeof g == "function" && y && !$.current && ($.current = !0, g());
55
+ }, [g, y]), F(() => {
56
56
  const t = m.current;
57
- return t != null && t.complete ? (t.style.transition = "none", t.style.opacity = "1", v(!0)) : t && (t.style.transition = "opacity 0.3s", t.style.opacity = "0", t.onload = () => {
57
+ return t != null && t.complete ? t.naturalWidth > 0 ? (t.style.transition = "none", t.style.opacity = "1", v(!0)) : (t.style.opacity = "0", S(!0)) : t && (t.style.transition = "opacity 0.3s", t.style.opacity = "0", t.onload = () => {
58
58
  t.style.opacity = "1", v(!0), t.onload = null;
59
+ }, t.onerror = () => {
60
+ S(!0), t.onerror = null;
59
61
  }), () => {
60
- t && (t.onload = null);
62
+ t && (t.onload = null, t.onerror = null);
61
63
  };
62
- }, [y]), I ? /* @__PURE__ */ g(
63
- U,
64
+ }, [y]), I ? /* @__PURE__ */ L(
65
+ M,
64
66
  {
65
67
  ...e,
66
- ref: u,
68
+ ref: a,
67
69
  inlineCSS: x ? {
68
70
  position: "relative",
69
71
  paddingTop: `calc(100% / ${n} * ${o})`,
@@ -82,7 +84,7 @@ const k = 100, ot = r(
82
84
  },
83
85
  children: [
84
86
  T && /* @__PURE__ */ d(
85
- V,
87
+ U,
86
88
  {
87
89
  width: "100%",
88
90
  height: "100%",
@@ -96,19 +98,19 @@ const k = 100, ot = r(
96
98
  }
97
99
  }
98
100
  ),
99
- y && /* @__PURE__ */ g(Z, { children: [
101
+ y && /* @__PURE__ */ L(Y, { children: [
100
102
  /* @__PURE__ */ d(
101
103
  "img",
102
104
  {
103
105
  ref: m,
104
- src: z,
105
- alt: C,
106
+ src: j,
107
+ alt: r,
106
108
  width: n,
107
109
  height: o,
108
- onLoad: B,
109
- onError: R,
110
+ onLoad: z,
111
+ onError: B,
110
112
  "aria-hidden": f,
111
- ...a,
113
+ ...u,
112
114
  style: {
113
115
  position: "absolute",
114
116
  top: 0,
@@ -116,19 +118,19 @@ const k = 100, ot = r(
116
118
  width: "100%",
117
119
  height: "100%",
118
120
  transition: "opacity 0.3s",
119
- ...a.style
121
+ ...u.style
120
122
  }
121
123
  }
122
124
  ),
123
- H && ((c == null ? void 0 : c(f)) || /* @__PURE__ */ d(_, { style: { opacity: f ? 1 : 0, transition: "opacity 0.3s" } }))
125
+ W && ((c == null ? void 0 : c(f)) || /* @__PURE__ */ d(V, { style: { opacity: f ? 1 : 0, transition: "opacity 0.3s" } }))
124
126
  ] })
125
127
  ]
126
128
  }
127
- ) : /* @__PURE__ */ g(
128
- U,
129
+ ) : /* @__PURE__ */ L(
130
+ M,
129
131
  {
130
132
  ...e,
131
- ref: u,
133
+ ref: a,
132
134
  inlineCSS: x ? {
133
135
  position: "relative",
134
136
  paddingTop: `calc(100% / ${n} * ${o})`,
@@ -148,7 +150,7 @@ const k = 100, ot = r(
148
150
  },
149
151
  children: [
150
152
  T && /* @__PURE__ */ d(
151
- V,
153
+ U,
152
154
  {
153
155
  width: "100%",
154
156
  height: "100%",
@@ -166,14 +168,14 @@ const k = 100, ot = r(
166
168
  "img",
167
169
  {
168
170
  ref: m,
169
- src: z,
170
- alt: C,
171
+ src: j,
172
+ alt: r,
171
173
  width: n,
172
174
  height: o,
173
- onLoad: B,
174
- onError: R,
175
+ onLoad: z,
176
+ onError: B,
175
177
  "aria-hidden": f,
176
- ...a,
178
+ ...u,
177
179
  style: {
178
180
  position: "absolute",
179
181
  top: 0,
@@ -181,11 +183,11 @@ const k = 100, ot = r(
181
183
  width: "100%",
182
184
  height: "100%",
183
185
  transition: "opacity 0.3s",
184
- ...a.style
186
+ ...u.style
185
187
  }
186
188
  }
187
189
  ),
188
- H && ((c == null ? void 0 : c(f)) || /* @__PURE__ */ d(_, { style: { opacity: f ? 1 : 0, transition: "opacity 0.3s" } }))
190
+ W && ((c == null ? void 0 : c(f)) || /* @__PURE__ */ d(V, { style: { opacity: f ? 1 : 0, transition: "opacity 0.3s" } }))
189
191
  ]
190
192
  }
191
193
  );
@@ -1,28 +1,27 @@
1
- import { jsxs as f, jsx as d } from "react/jsx-runtime";
2
- import { useState as S, Children as u, isValidElement as y, cloneElement as c } from "react";
3
- import { Flexbox as x } from "@dotss/ui";
4
- import b from "../../Image/Image.mjs";
1
+ import { jsxs as p, jsx as d } from "react/jsx-runtime";
2
+ import { useState as S, Children as u, isValidElement as y, cloneElement as x } from "react";
3
+ import { Flexbox as b } from "@dotss/ui";
4
+ import c from "../../Image/Image.mjs";
5
5
  import "@dotss/ui/core/useTheme";
6
6
  import w from "../../Swiper/SwiperBlock/SwiperBlock.mjs";
7
- function z({ children: i, fallback: l, imageProps: t, ...n }) {
8
- const [r, s] = S(!1), p = () => s(!0);
9
- return /* @__PURE__ */ f(
7
+ function z({ children: a, fallback: l, imageProps: t, ...n }) {
8
+ const [r, s] = S(!1), f = () => s(!0);
9
+ return /* @__PURE__ */ p(
10
10
  w,
11
11
  {
12
12
  ...n,
13
13
  inlineCSS: {
14
- marginTop: "calc(var(--status-bar-height, 0px) * -1)",
15
14
  "& > div:nth-of-type(1)": {
16
15
  zIndex: 1
17
16
  },
18
17
  ...n == null ? void 0 : n.inlineCSS
19
18
  },
20
19
  children: [
21
- u.toArray(i).filter(y).map((e) => {
22
- var o, a;
23
- return e.type === b || e.type === "img" ? c(e, {
20
+ u.toArray(a).filter(y).map((e) => {
21
+ var o, i;
22
+ return e.type === c || e.type === "img" ? x(e, {
24
23
  ...t,
25
- onLoad: p,
24
+ onLoad: f,
26
25
  disabledResizing: !0,
27
26
  draggable: !1,
28
27
  wrapperProps: {
@@ -32,7 +31,7 @@ function z({ children: i, fallback: l, imageProps: t, ...n }) {
32
31
  overflow: "visible",
33
32
  margin: "0 auto",
34
33
  ...(o = t == null ? void 0 : t.wrapperProps) == null ? void 0 : o.inlineCSS,
35
- ...(a = e.props.wrapperProps) == null ? void 0 : a.inlineCSS
34
+ ...(i = e.props.wrapperProps) == null ? void 0 : i.inlineCSS
36
35
  }
37
36
  },
38
37
  style: {
@@ -48,7 +47,7 @@ function z({ children: i, fallback: l, imageProps: t, ...n }) {
48
47
  }) : e;
49
48
  }),
50
49
  !r && /* @__PURE__ */ d(
51
- x,
50
+ b,
52
51
  {
53
52
  "aria-busy": !0,
54
53
  inlineCSS: {