@dotss/tictoccroc 0.4.1 → 0.5.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 (205) hide show
  1. package/dist/Calendar-BOLCHnjh.js +97 -0
  2. package/dist/TimePicker-BwACyeBR.js +120 -0
  3. package/dist/convertMdToHtml-Bmk0brLK.js +1431 -0
  4. package/dist/index.mjs +105 -200
  5. package/dist/parent/b2b/components/ActionButtons/ActionButtons.mjs +26 -29
  6. package/dist/parent/b2b/components/ActionButtons/index.mjs +5 -4
  7. package/dist/parent/b2b/components/BottomNotes/BottomNotes.mjs +37 -35
  8. package/dist/parent/b2b/components/BottomNotes/index.mjs +5 -4
  9. package/dist/parent/b2b/components/EmployeeNumberField/EmployeeNumberField.mjs +12 -15
  10. package/dist/parent/b2b/components/EmployeeNumberField/index.mjs +5 -4
  11. package/dist/parent/b2b/components/NameField/NameField.mjs +12 -7
  12. package/dist/parent/b2b/components/NameField/index.mjs +5 -4
  13. package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.mjs +27 -30
  14. package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.utils.mjs +7 -8
  15. package/dist/parent/b2b/components/PhoneNumberField/index.mjs +6 -7
  16. package/dist/parent/b2b/components/Title/Title.mjs +22 -16
  17. package/dist/parent/b2b/components/Title/index.mjs +4 -3
  18. package/dist/parent/b2b/components/TopLogo/TopLogo.mjs +55 -93
  19. package/dist/parent/b2b/components/TopLogo/index.mjs +5 -4
  20. package/dist/parent/b2b/components/index.mjs +9 -19
  21. package/dist/parent/b2b/utils/convertMdToHtml/convertMdToHtml.mjs +2 -1143
  22. package/dist/parent/b2b/utils/index.mjs +2 -4
  23. package/dist/parent/notification/components/NotificationCard/NotificationCard.d.ts +3 -1
  24. package/dist/parent/notification/components/NotificationCard/NotificationCard.mjs +90 -105
  25. package/dist/parent/notification/components/NotificationCard/index.mjs +5 -4
  26. package/dist/parent/notification/components/index.mjs +2 -4
  27. package/dist/parent/notification/utils/index.mjs +2 -4
  28. package/dist/parent/notification/utils/sanitize/sanitize.mjs +6 -6
  29. package/dist/purify.es-D3W4zDrg.js +549 -0
  30. package/dist/shared/components/Calendar/Calendar.mjs +2 -80
  31. package/dist/shared/components/Calendar/index.mjs +5 -4
  32. package/dist/shared/components/Carousel/Carousel.mjs +184 -210
  33. package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.mjs +10 -7
  34. package/dist/shared/components/Carousel/CarouselSlide/index.mjs +5 -4
  35. package/dist/shared/components/Carousel/index.mjs +6 -6
  36. package/dist/shared/components/ChatKit/BotMessage/BotMessage.mjs +151 -183
  37. package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.mjs +30 -50
  38. package/dist/shared/components/ChatKit/BotMessage/index.mjs +6 -8
  39. package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.mjs +64 -84
  40. package/dist/shared/components/ChatKit/InputBar/InputBar.mjs +105 -130
  41. package/dist/shared/components/ChatKit/InputBar/index.mjs +6 -6
  42. package/dist/shared/components/ChatKit/Message/Message.fallback.mjs +50 -66
  43. package/dist/shared/components/ChatKit/Message/Message.mjs +178 -276
  44. package/dist/shared/components/ChatKit/Message/Message.utils.mjs +20 -31
  45. package/dist/shared/components/ChatKit/Message/index.mjs +7 -9
  46. package/dist/shared/components/ChatKit/Seperator/Seperator.mjs +31 -27
  47. package/dist/shared/components/ChatKit/Seperator/index.mjs +4 -3
  48. package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs +183 -153
  49. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.mjs +83 -108
  50. package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs +5 -5
  51. package/dist/shared/components/ChatKit/SystemMessage/index.mjs +7 -8
  52. package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.mjs +49 -54
  53. package/dist/shared/components/ChatKit/UnreadMessagePill/index.mjs +5 -4
  54. package/dist/shared/components/ChatKit/index.mjs +13 -29
  55. package/dist/shared/components/Image/Image.d.ts +2 -0
  56. package/dist/shared/components/Image/Image.error.mjs +34 -40
  57. package/dist/shared/components/Image/Image.mjs +247 -289
  58. package/dist/shared/components/Image/index.mjs +6 -6
  59. package/dist/shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs +19 -18
  60. package/dist/shared/components/LoadingAnnouncer/index.mjs +5 -4
  61. package/dist/shared/components/Masonry/Masonry.mjs +240 -276
  62. package/dist/shared/components/Masonry/Masonry.utils.mjs +62 -81
  63. package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +111 -144
  64. package/dist/shared/components/Masonry/MasonryBlock/index.mjs +5 -4
  65. package/dist/shared/components/Masonry/index.mjs +6 -6
  66. package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +54 -69
  67. package/dist/shared/components/MediaDialog/MediaBlock/index.mjs +5 -4
  68. package/dist/shared/components/MediaDialog/MediaDialog.mjs +216 -330
  69. package/dist/shared/components/MediaDialog/MediaDialogContent/MediaDialogContent.mjs +18 -21
  70. package/dist/shared/components/MediaDialog/MediaDialogContent/index.mjs +5 -4
  71. package/dist/shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs +22 -27
  72. package/dist/shared/components/MediaDialog/MediaDialogFooter/index.mjs +5 -4
  73. package/dist/shared/components/MediaDialog/MediaDialogToolbar/MediaDialogToolbar.mjs +15 -21
  74. package/dist/shared/components/MediaDialog/MediaDialogToolbar/index.mjs +5 -4
  75. package/dist/shared/components/MediaDialog/index.mjs +9 -12
  76. package/dist/shared/components/Roller/Roller.mjs +99 -132
  77. package/dist/shared/components/Roller/RollerBlock/RollerBlock.mjs +9 -6
  78. package/dist/shared/components/Roller/RollerBlock/index.mjs +5 -4
  79. package/dist/shared/components/Roller/index.mjs +6 -6
  80. package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs +22 -30
  81. package/dist/shared/components/Scheduler/ScheduleBlock/index.mjs +5 -4
  82. package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +25 -35
  83. package/dist/shared/components/Scheduler/ScheduleEvent/index.mjs +5 -4
  84. package/dist/shared/components/Scheduler/Scheduler.mjs +472 -567
  85. package/dist/shared/components/Scheduler/Scheduler.utils.mjs +78 -101
  86. package/dist/shared/components/Scheduler/index.mjs +8 -10
  87. package/dist/shared/components/Swiper/Swiper.mjs +238 -283
  88. package/dist/shared/components/Swiper/Swiper.utils.mjs +19 -24
  89. package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.mjs +14 -17
  90. package/dist/shared/components/Swiper/SwiperBlock/index.mjs +5 -4
  91. package/dist/shared/components/Swiper/index.mjs +6 -6
  92. package/dist/shared/components/TextField/TextField.mjs +44 -55
  93. package/dist/shared/components/TextField/index.mjs +5 -4
  94. package/dist/shared/components/TimePicker/TimePicker.mjs +2 -120
  95. package/dist/shared/components/TimePicker/index.mjs +5 -4
  96. package/dist/shared/components/index.mjs +36 -75
  97. package/dist/shared/hooks/index.mjs +4 -8
  98. package/dist/shared/hooks/useCombineRef/index.mjs +5 -4
  99. package/dist/shared/hooks/useCombineRef/useCombineRef.mjs +7 -7
  100. package/dist/shared/hooks/useInView/index.mjs +5 -4
  101. package/dist/shared/hooks/useInView/useInView.d.ts +2 -1
  102. package/dist/shared/hooks/useInView/useInView.mjs +37 -47
  103. package/dist/shared/hooks/useIsomorphicLayoutEffect/index.mjs +5 -4
  104. package/dist/shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +6 -6
  105. package/dist/shared/typings/common.mjs +6 -4
  106. package/dist/shared/typings/index.mjs +2 -4
  107. package/dist/shared/utils/ageToBirthDate/ageToBirthDate.mjs +17 -9
  108. package/dist/shared/utils/ageToBirthDate/index.mjs +5 -4
  109. package/dist/shared/utils/birthDateToAge/birthDateToAge.mjs +9 -10
  110. package/dist/shared/utils/birthDateToAge/index.mjs +4 -3
  111. package/dist/shared/utils/combineRef/combineRef.mjs +20 -23
  112. package/dist/shared/utils/combineRef/index.mjs +5 -4
  113. package/dist/shared/utils/dayFlagToDay/dayFlagToDay.mjs +15 -23
  114. package/dist/shared/utils/dayFlagToDay/index.mjs +5 -4
  115. package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.mjs +13 -20
  116. package/dist/shared/utils/getCareTypeLabel/index.mjs +5 -4
  117. package/dist/shared/utils/getDateRange/getDateRange.mjs +15 -20
  118. package/dist/shared/utils/getDateRange/index.mjs +5 -4
  119. package/dist/shared/utils/getImageUrl/getImageUrl.mjs +7 -17
  120. package/dist/shared/utils/getImageUrl/index.mjs +5 -6
  121. package/dist/shared/utils/getTimeRange/getTimeRange.mjs +19 -21
  122. package/dist/shared/utils/getTimeRange/index.mjs +5 -4
  123. package/dist/shared/utils/getVimeoId/getVimeoId.mjs +11 -11
  124. package/dist/shared/utils/getVimeoId/index.mjs +5 -4
  125. package/dist/shared/utils/index.mjs +18 -36
  126. package/dist/shared/utils/isAndroid/index.mjs +5 -4
  127. package/dist/shared/utils/isAndroid/isAndroid.mjs +5 -5
  128. package/dist/shared/utils/isApp/index.mjs +5 -4
  129. package/dist/shared/utils/isApp/isApp.mjs +4 -4
  130. package/dist/shared/utils/isDesktop/index.mjs +5 -4
  131. package/dist/shared/utils/isDesktop/isDesktop.mjs +15 -15
  132. package/dist/shared/utils/isIos/index.mjs +5 -4
  133. package/dist/shared/utils/isIos/isIos.mjs +5 -5
  134. package/dist/shared/utils/isServer/index.mjs +4 -3
  135. package/dist/shared/utils/isServer/isServer.mjs +4 -4
  136. package/dist/shared/utils/objectToQueryString/index.mjs +5 -4
  137. package/dist/shared/utils/objectToQueryString/objectToQueryString.mjs +7 -8
  138. package/dist/shared/utils/parseQueryString/index.mjs +4 -3
  139. package/dist/shared/utils/parseQueryString/parseQueryString.mjs +5 -5
  140. package/dist/shared/utils/share/index.mjs +5 -4
  141. package/dist/shared/utils/share/share.mjs +12 -14
  142. package/dist/teacher/home/components/BannerAccount/BannerAccount.fallback.mjs +19 -11
  143. package/dist/teacher/home/components/BannerAccount/BannerAccount.mjs +83 -99
  144. package/dist/teacher/home/components/BannerAccount/index.mjs +6 -7
  145. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs +127 -67
  146. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +68 -82
  147. package/dist/teacher/home/components/Carousel1Account/index.mjs +6 -7
  148. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs +112 -94
  149. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +79 -85
  150. package/dist/teacher/home/components/Carousel2Account/index.mjs +6 -7
  151. package/dist/teacher/home/components/TextAccount/TextAccount.fallback.mjs +119 -108
  152. package/dist/teacher/home/components/TextAccount/TextAccount.mjs +91 -111
  153. package/dist/teacher/home/components/TextAccount/index.mjs +6 -7
  154. package/dist/teacher/home/components/index.mjs +9 -18
  155. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs +345 -442
  156. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/index.mjs +5 -5
  157. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.mjs +106 -109
  158. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs +54 -58
  159. package/dist/teacher/profile/components/AbilityCollection/index.mjs +7 -8
  160. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +73 -104
  161. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +81 -95
  162. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.mjs +4 -3
  163. package/dist/teacher/profile/components/ActivityGallery/index.mjs +6 -6
  164. package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +148 -194
  165. package/dist/teacher/profile/components/AvailableScheduleSection/index.mjs +5 -4
  166. package/dist/teacher/profile/components/CareNoteSection/CareNote/CareNote.mjs +61 -53
  167. package/dist/teacher/profile/components/CareNoteSection/CareNote/index.mjs +5 -4
  168. package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.mjs +72 -81
  169. package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.utils.mjs +17 -12
  170. package/dist/teacher/profile/components/CareNoteSection/index.mjs +6 -6
  171. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +108 -134
  172. package/dist/teacher/profile/components/CareerSection/CareerItem/index.mjs +5 -4
  173. package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +133 -176
  174. package/dist/teacher/profile/components/CareerSection/index.mjs +6 -6
  175. package/dist/teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs +82 -88
  176. package/dist/teacher/profile/components/CertificateSection/CertificateItem/index.mjs +4 -3
  177. package/dist/teacher/profile/components/CertificateSection/CertificateSection.mjs +112 -141
  178. package/dist/teacher/profile/components/CertificateSection/index.mjs +6 -6
  179. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +96 -111
  180. package/dist/teacher/profile/components/EducationSection/EducationItem/index.mjs +5 -4
  181. package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +112 -141
  182. package/dist/teacher/profile/components/EducationSection/index.mjs +6 -6
  183. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs +107 -102
  184. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/index.mjs +5 -4
  185. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +85 -81
  186. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs +17 -12
  187. package/dist/teacher/profile/components/ParentReviewSection/index.mjs +7 -8
  188. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs +43 -36
  189. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/index.mjs +4 -3
  190. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs +44 -31
  191. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +11 -12
  192. package/dist/teacher/profile/components/PreferredAgeGroup/index.mjs +5 -5
  193. package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.mjs +348 -433
  194. package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.utils.mjs +7 -7
  195. package/dist/teacher/profile/components/ProfileSummary/index.mjs +5 -4
  196. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs +80 -105
  197. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/index.mjs +5 -4
  198. package/dist/teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs +34 -27
  199. package/dist/teacher/profile/components/StatBadgeCollection/index.mjs +6 -6
  200. package/dist/teacher/profile/components/index.mjs +24 -48
  201. package/dist/teacher/profile/utils/index.mjs +2 -4
  202. package/dist/teacher/profile/utils/sortItems/index.mjs +5 -4
  203. package/dist/teacher/profile/utils/sortItems/sortItems.mjs +48 -48
  204. package/package.json +1 -1
  205. package/dist/purify.es-BGaRrCfO.js +0 -553
@@ -1,289 +1,247 @@
1
- import { jsxs as H, jsx as l, Fragment as nt } from "react/jsx-runtime";
2
- import { forwardRef as ot, useRef as U, useImperativeHandle as it, useState as S, useEffect as V } from "react";
3
- import { Flexbox as _, Skeleton as z } from "@dotss/ui";
4
- import st from "../../hooks/useInView/useInView.mjs";
5
- import lt from "../../hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
6
- import O from "../../utils/getImageUrl/getImageUrl.mjs";
7
- import B from "./Image.error.mjs";
8
- const rt = ot(
9
- ({
10
- src: s,
11
- width: e,
12
- height: o,
13
- fit: y = "cover",
14
- position: m = "center",
15
- alt: q,
16
- scale: T = 2,
17
- onLoad: A,
18
- onLazyLoad: $,
19
- lazy: D = !1,
20
- borderRadius: c,
21
- disabledResizing: L = !1,
22
- withIntrinsicRatio: G = !1,
23
- enableBlurPlaceholder: r = !1,
24
- enableFallback: J = !1,
25
- enableErrorFallback: K = !0,
26
- renderErrorFallback: u,
27
- wrapperProps: n = {},
28
- onError: M,
29
- ...g
30
- }, w) => {
31
- const C = U(null), N = U(!1), I = U(null);
32
- it(w, () => I.current);
33
- const { isInView: p } = st(C, {
34
- threshold: 0.4
35
- }), [v, F] = S(!1), [h, d] = S(!1), [x, a] = S(!1), [W, k] = S(!1), [Q, R] = S(
36
- O({
37
- mode: "original",
38
- src: s,
39
- width: e,
40
- height: o,
41
- fit: y,
42
- position: m,
43
- scale: T,
44
- disabledResizing: L
45
- })
46
- ), b = s == null ? void 0 : s.endsWith(".heic"), E = r ? O({
47
- mode: "blur",
48
- src: s,
49
- width: e,
50
- fit: y,
51
- position: m,
52
- scale: 1 / 3,
53
- disabledResizing: L
54
- }) : null, X = (t) => {
55
- d(!0), a(!1), typeof A == "function" && A(t);
56
- }, Y = (t) => {
57
- typeof M == "function" && M(t.nativeEvent), a(!0), d(!1);
58
- }, Z = () => k(!0);
59
- return V(() => {
60
- if (D && C.current) {
61
- const t = () => {
62
- p && F(!0);
63
- }, j = () => {
64
- var f;
65
- (f = window.appScreenContent) == null || f.addEventListener("scroll", t), window.addEventListener("resize", t), window.addEventListener("orientationchange", t);
66
- }, i = () => {
67
- var f;
68
- (f = window.appScreenContent) == null || f.removeEventListener("scroll", t), window.removeEventListener("resize", t), window.removeEventListener("orientationchange", t);
69
- };
70
- return t(), j(), i;
71
- }
72
- }), V(() => {
73
- typeof $ == "function" && v && !N.current && (N.current = !0, $());
74
- }, [$, v]), lt(() => {
75
- const t = I.current, j = (i) => {
76
- window.fetch(s).then(async (f) => {
77
- const P = await f.blob(), tt = (await import("heic2any")).default, et = await tt({ blob: P, toType: "image/png" });
78
- R(URL.createObjectURL(et)), i.onload = () => {
79
- i.style.opacity = "1", d(!0), a(!1), i.onload = null, i.onerror = null;
80
- }, i.onerror = () => {
81
- a(!0), d(!1), i.onload = null, i.onerror = null;
82
- };
83
- });
84
- };
85
- return t != null && t.complete ? b ? t.src.startsWith("blob:") || (t.style.transition = "opacity 0.3s", t.style.opacity = "0", j(t)) : t.naturalWidth > 0 ? (t.style.transition = "none", t.style.opacity = "1", d(!0)) : (t.style.opacity = "0", a(!0)) : t && (t.style.transition = "opacity 0.3s", t.style.opacity = "0", t.onload = () => {
86
- t.style.opacity = "1", d(!0), t.onload = null;
87
- }, t.onerror = () => {
88
- if (!b) {
89
- a(!0), t.onerror = null;
90
- return;
91
- }
92
- a(!1), t.style.transition = "opacity 0.3s", t.style.opacity = "0", j(t);
93
- }), () => {
94
- t && (t.onload = null, t.onerror = null);
95
- };
96
- }, [v, s, b]), V(() => {
97
- R(
98
- O({
99
- mode: "original",
100
- src: s,
101
- width: e,
102
- height: o,
103
- fit: y,
104
- position: m,
105
- scale: T,
106
- disabledResizing: L
107
- })
108
- );
109
- }, [s, e, o, y, m, T, L]), D ? /* @__PURE__ */ H(
110
- _,
111
- {
112
- ...n,
113
- ref: C,
114
- inlineCSS: G ? {
115
- position: "relative",
116
- paddingTop: `calc(100% / ${e} * ${o})`,
117
- minWidth: "100%",
118
- borderRadius: c,
119
- overflow: "hidden",
120
- ...n == null ? void 0 : n.inlineCSS
121
- } : {
122
- position: "relative",
123
- width: e,
124
- minWidth: e,
125
- height: o,
126
- borderRadius: c,
127
- overflow: "hidden",
128
- ...n == null ? void 0 : n.inlineCSS
129
- },
130
- children: [
131
- J && /* @__PURE__ */ l(
132
- z,
133
- {
134
- width: "100%",
135
- height: "100%",
136
- borderRadius: c || 0,
137
- inlineCSS: {
138
- position: "absolute",
139
- top: 0,
140
- left: 0,
141
- opacity: h || r && W ? 0 : 1,
142
- transition: "opacity 0.3s"
143
- }
144
- }
145
- ),
146
- r && E && v && /* @__PURE__ */ l(
147
- "img",
148
- {
149
- src: E,
150
- alt: "",
151
- width: e,
152
- height: o,
153
- onLoad: Z,
154
- draggable: !1,
155
- style: {
156
- position: "absolute",
157
- top: 0,
158
- left: 0,
159
- width: "100%",
160
- height: "100%",
161
- filter: "blur(5px)",
162
- opacity: W && !h ? 1 : 0,
163
- transition: "opacity 0.3s",
164
- objectFit: y,
165
- objectPosition: m
166
- }
167
- }
168
- ),
169
- v && /* @__PURE__ */ H(nt, { children: [
170
- /* @__PURE__ */ l(
171
- "img",
172
- {
173
- ref: I,
174
- src: Q,
175
- alt: q,
176
- width: e,
177
- height: o,
178
- onLoad: X,
179
- onError: Y,
180
- "aria-hidden": x,
181
- draggable: !1,
182
- ...g,
183
- style: {
184
- position: "absolute",
185
- top: 0,
186
- left: 0,
187
- width: "100%",
188
- height: "100%",
189
- transition: "opacity 0.3s",
190
- ...g.style
191
- }
192
- }
193
- ),
194
- K && x && ((u == null ? void 0 : u()) || /* @__PURE__ */ l(B, {}))
195
- ] })
196
- ]
197
- }
198
- ) : /* @__PURE__ */ H(
199
- _,
200
- {
201
- ...n,
202
- ref: C,
203
- inlineCSS: G ? {
204
- position: "relative",
205
- paddingTop: `calc(100% / ${e} * ${o})`,
206
- minWidth: "100%",
207
- transition: "padding-top 0.2s",
208
- borderRadius: c,
209
- overflow: "hidden",
210
- ...n == null ? void 0 : n.inlineCSS
211
- } : {
212
- position: "relative",
213
- width: e,
214
- minWidth: e,
215
- height: o,
216
- borderRadius: c,
217
- overflow: "hidden",
218
- ...n == null ? void 0 : n.inlineCSS
219
- },
220
- children: [
221
- J && /* @__PURE__ */ l(
222
- z,
223
- {
224
- width: "100%",
225
- height: "100%",
226
- borderRadius: c || 0,
227
- inlineCSS: {
228
- position: "absolute",
229
- top: 0,
230
- left: 0,
231
- opacity: h || r && W ? 0 : 1,
232
- transition: "opacity 0.3s"
233
- }
234
- }
235
- ),
236
- r && E && /* @__PURE__ */ l(
237
- "img",
238
- {
239
- src: E,
240
- alt: "",
241
- width: e,
242
- height: o,
243
- onLoad: Z,
244
- draggable: !1,
245
- style: {
246
- position: "absolute",
247
- top: 0,
248
- left: 0,
249
- width: "100%",
250
- height: "100%",
251
- filter: "blur(5px)",
252
- opacity: W && !h ? 1 : 0,
253
- transition: "opacity 0.3s"
254
- }
255
- }
256
- ),
257
- /* @__PURE__ */ l(
258
- "img",
259
- {
260
- ref: I,
261
- src: Q,
262
- alt: q,
263
- width: e,
264
- height: o,
265
- onLoad: X,
266
- onError: Y,
267
- "aria-hidden": x,
268
- draggable: !1,
269
- ...g,
270
- style: {
271
- position: "absolute",
272
- top: 0,
273
- left: 0,
274
- width: "100%",
275
- height: "100%",
276
- transition: "opacity 0.3s",
277
- ...g.style
278
- }
279
- }
280
- ),
281
- K && x && ((u == null ? void 0 : u()) || /* @__PURE__ */ l(B, {}))
282
- ]
283
- }
284
- );
285
- }
286
- );
287
- export {
288
- rt as default
289
- };
1
+ import e from "../../hooks/useInView/index.mjs";
2
+ import t from "../../hooks/useIsomorphicLayoutEffect/index.mjs";
3
+ import n from "../../utils/getImageUrl/index.mjs";
4
+ import r from "./Image.error.mjs";
5
+ import { forwardRef as i, useEffect as a, useImperativeHandle as o, useRef as s, useState as c } from "react";
6
+ import { Flexbox as l, Skeleton as u } from "@dotss/ui";
7
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
8
+ //#region shared/components/Image/Image.tsx
9
+ var m = i(({ src: i, width: m, height: h, fit: g = "cover", position: _ = "center", alt: v, scale: y = 2, onLoad: b, onLazyLoad: x, lazy: S = !1, borderRadius: C, disabledResizing: w = !1, withIntrinsicRatio: T = !1, enableBlurPlaceholder: E = !1, enableFallback: D = !1, enableErrorFallback: O = !0, renderErrorFallback: k, wrapperProps: A = {}, inViewOptions: j = {}, onError: M, ...N }, P) => {
10
+ let F = s(null), I = s(!1), L = s(null);
11
+ o(P, () => L.current);
12
+ let { isInView: R } = e(F, {
13
+ threshold: .4,
14
+ ...j
15
+ }), [z, B] = c(!1), [V, H] = c(!1), [U, W] = c(!1), [G, K] = c(!1), [q, J] = c(n({
16
+ mode: "original",
17
+ src: i,
18
+ width: m,
19
+ height: h,
20
+ fit: g,
21
+ position: _,
22
+ scale: y,
23
+ disabledResizing: w
24
+ })), Y = i?.endsWith(".heic"), X = E ? n({
25
+ mode: "blur",
26
+ src: i,
27
+ width: m,
28
+ fit: g,
29
+ position: _,
30
+ scale: 1 / 3,
31
+ disabledResizing: w
32
+ }) : null, Z = (e) => {
33
+ H(!0), W(!1), typeof b == "function" && b(e);
34
+ }, Q = (e) => {
35
+ typeof M == "function" && M(e.nativeEvent), W(!0), H(!1);
36
+ }, $ = () => K(!0);
37
+ return a(() => {
38
+ if (S && F.current) {
39
+ let e = () => {
40
+ R && B(!0);
41
+ };
42
+ return e(), window.appScreenContent?.addEventListener("scroll", e), window.addEventListener("resize", e), window.addEventListener("orientationchange", e), () => {
43
+ window.appScreenContent?.removeEventListener("scroll", e), window.removeEventListener("resize", e), window.removeEventListener("orientationchange", e);
44
+ };
45
+ }
46
+ }), a(() => {
47
+ typeof x == "function" && z && !I.current && (I.current = !0, x());
48
+ }, [x, z]), t(() => {
49
+ let e = L.current, t = (e) => {
50
+ window.fetch(i).then(async (t) => {
51
+ let n = await t.blob(), r = (await import("heic2any")).default, i = await r({
52
+ blob: n,
53
+ toType: "image/png"
54
+ });
55
+ J(URL.createObjectURL(i)), e.onload = () => {
56
+ e.style.opacity = "1", H(!0), W(!1), e.onload = null, e.onerror = null;
57
+ }, e.onerror = () => {
58
+ W(!0), H(!1), e.onload = null, e.onerror = null;
59
+ };
60
+ });
61
+ };
62
+ return e?.complete ? Y ? e.src.startsWith("blob:") || (e.style.transition = "opacity 0.3s", e.style.opacity = "0", t(e)) : e.naturalWidth > 0 ? (e.style.transition = "none", e.style.opacity = "1", H(!0)) : (e.style.opacity = "0", W(!0)) : e && (e.style.transition = "opacity 0.3s", e.style.opacity = "0", e.onload = () => {
63
+ e.style.opacity = "1", H(!0), e.onload = null;
64
+ }, e.onerror = () => {
65
+ if (!Y) {
66
+ W(!0), e.onerror = null;
67
+ return;
68
+ }
69
+ W(!1), e.style.transition = "opacity 0.3s", e.style.opacity = "0", t(e);
70
+ }), () => {
71
+ e && (e.onload = null, e.onerror = null);
72
+ };
73
+ }, [
74
+ z,
75
+ i,
76
+ Y
77
+ ]), a(() => {
78
+ J(n({
79
+ mode: "original",
80
+ src: i,
81
+ width: m,
82
+ height: h,
83
+ fit: g,
84
+ position: _,
85
+ scale: y,
86
+ disabledResizing: w
87
+ }));
88
+ }, [
89
+ i,
90
+ m,
91
+ h,
92
+ g,
93
+ _,
94
+ y,
95
+ w
96
+ ]), S ? /* @__PURE__ */ p(l, {
97
+ ...A,
98
+ ref: F,
99
+ inlineCSS: T ? {
100
+ position: "relative",
101
+ paddingTop: `calc(100% / ${m} * ${h})`,
102
+ minWidth: "100%",
103
+ borderRadius: C,
104
+ overflow: "hidden",
105
+ ...A?.inlineCSS
106
+ } : {
107
+ position: "relative",
108
+ width: m,
109
+ minWidth: m,
110
+ height: h,
111
+ borderRadius: C,
112
+ overflow: "hidden",
113
+ ...A?.inlineCSS
114
+ },
115
+ children: [
116
+ D && /* @__PURE__ */ f(u, {
117
+ width: "100%",
118
+ height: "100%",
119
+ borderRadius: C || 0,
120
+ inlineCSS: {
121
+ position: "absolute",
122
+ top: 0,
123
+ left: 0,
124
+ opacity: V || E && G ? 0 : 1,
125
+ transition: "opacity 0.3s"
126
+ }
127
+ }),
128
+ E && X && z && /* @__PURE__ */ f("img", {
129
+ src: X,
130
+ alt: "",
131
+ width: m,
132
+ height: h,
133
+ onLoad: $,
134
+ draggable: !1,
135
+ style: {
136
+ position: "absolute",
137
+ top: 0,
138
+ left: 0,
139
+ width: "100%",
140
+ height: "100%",
141
+ filter: "blur(5px)",
142
+ opacity: G && !V ? 1 : 0,
143
+ transition: "opacity 0.3s",
144
+ objectFit: g,
145
+ objectPosition: _
146
+ }
147
+ }),
148
+ z && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("img", {
149
+ ref: L,
150
+ src: q,
151
+ alt: v,
152
+ width: m,
153
+ height: h,
154
+ onLoad: Z,
155
+ onError: Q,
156
+ "aria-hidden": U,
157
+ draggable: !1,
158
+ ...N,
159
+ style: {
160
+ position: "absolute",
161
+ top: 0,
162
+ left: 0,
163
+ width: "100%",
164
+ height: "100%",
165
+ transition: "opacity 0.3s",
166
+ ...N.style
167
+ }
168
+ }), O && U && (k?.() || /* @__PURE__ */ f(r, {}))] })
169
+ ]
170
+ }) : /* @__PURE__ */ p(l, {
171
+ ...A,
172
+ ref: F,
173
+ inlineCSS: T ? {
174
+ position: "relative",
175
+ paddingTop: `calc(100% / ${m} * ${h})`,
176
+ minWidth: "100%",
177
+ transition: "padding-top 0.2s",
178
+ borderRadius: C,
179
+ overflow: "hidden",
180
+ ...A?.inlineCSS
181
+ } : {
182
+ position: "relative",
183
+ width: m,
184
+ minWidth: m,
185
+ height: h,
186
+ borderRadius: C,
187
+ overflow: "hidden",
188
+ ...A?.inlineCSS
189
+ },
190
+ children: [
191
+ D && /* @__PURE__ */ f(u, {
192
+ width: "100%",
193
+ height: "100%",
194
+ borderRadius: C || 0,
195
+ inlineCSS: {
196
+ position: "absolute",
197
+ top: 0,
198
+ left: 0,
199
+ opacity: V || E && G ? 0 : 1,
200
+ transition: "opacity 0.3s"
201
+ }
202
+ }),
203
+ E && X && /* @__PURE__ */ f("img", {
204
+ src: X,
205
+ alt: "",
206
+ width: m,
207
+ height: h,
208
+ onLoad: $,
209
+ draggable: !1,
210
+ style: {
211
+ position: "absolute",
212
+ top: 0,
213
+ left: 0,
214
+ width: "100%",
215
+ height: "100%",
216
+ filter: "blur(5px)",
217
+ opacity: G && !V ? 1 : 0,
218
+ transition: "opacity 0.3s"
219
+ }
220
+ }),
221
+ /* @__PURE__ */ f("img", {
222
+ ref: L,
223
+ src: q,
224
+ alt: v,
225
+ width: m,
226
+ height: h,
227
+ onLoad: Z,
228
+ onError: Q,
229
+ "aria-hidden": U,
230
+ draggable: !1,
231
+ ...N,
232
+ style: {
233
+ position: "absolute",
234
+ top: 0,
235
+ left: 0,
236
+ width: "100%",
237
+ height: "100%",
238
+ transition: "opacity 0.3s",
239
+ ...N.style
240
+ }
241
+ }),
242
+ O && U && (k?.() || /* @__PURE__ */ f(r, {}))
243
+ ]
244
+ });
245
+ });
246
+ //#endregion
247
+ export { m as default };
@@ -1,6 +1,6 @@
1
- import a from "./Image.mjs";
2
- import { default as m } from "./Image.error.mjs";
3
- export {
4
- m as ImageError,
5
- a as default
6
- };
1
+ import e from "./Image.error.mjs";
2
+ import t from "./Image.mjs";
3
+ //#region shared/components/Image/index.ts
4
+ var n = t;
5
+ //#endregion
6
+ export { e as ImageError, n as default };
@@ -1,19 +1,20 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { useState as i, useEffect as l } from "react";
3
- import { Typography as c } from "@dotss/ui";
4
- function d({
5
- delay: e = 1e3,
6
- message: t = "데이터를 불러오는 중입니다.",
7
- ...o
8
- }) {
9
- const [n, r] = i(!1);
10
- return l(() => {
11
- const u = setTimeout(() => {
12
- r(!0);
13
- }, e);
14
- return () => clearTimeout(u);
15
- }, [e]), n ? /* @__PURE__ */ s(c, { role: "status", ...o, visuallyHidden: !0, children: t }) : null;
1
+ import { useEffect as e, useState as t } from "react";
2
+ import { Typography as n } from "@dotss/ui";
3
+ import { jsx as r } from "react/jsx-runtime";
4
+ //#region shared/components/LoadingAnnouncer/LoadingAnnouncer.tsx
5
+ function i({ delay: i = 1e3, message: a = "데이터를 불러오는 중입니다.", ...o }) {
6
+ let [s, c] = t(!1);
7
+ return e(() => {
8
+ let e = setTimeout(() => {
9
+ c(!0);
10
+ }, i);
11
+ return () => clearTimeout(e);
12
+ }, [i]), s ? /* @__PURE__ */ r(n, {
13
+ role: "status",
14
+ ...o,
15
+ visuallyHidden: !0,
16
+ children: a
17
+ }) : null;
16
18
  }
17
- export {
18
- d as default
19
- };
19
+ //#endregion
20
+ export { i as default };
@@ -1,4 +1,5 @@
1
- import n from "./LoadingAnnouncer.mjs";
2
- export {
3
- n as default
4
- };
1
+ import e from "./LoadingAnnouncer.mjs";
2
+ //#region shared/components/LoadingAnnouncer/index.ts
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };