@dotss/tictoccroc 0.0.27 → 0.0.29
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.
- package/dist/index.mjs +82 -80
- package/dist/shared/components/ChatKit/Message/Message.mjs +10 -9
- package/dist/shared/components/Image/Image.mjs +171 -145
- package/dist/shared/utils/index.d.ts +1 -0
- package/dist/shared/utils/index.mjs +20 -18
- package/dist/shared/utils/isIos/index.d.ts +2 -0
- package/dist/shared/utils/isIos/index.mjs +4 -0
- package/dist/shared/utils/isIos/isIos.d.ts +1 -0
- package/dist/shared/utils/isIos/isIos.mjs +6 -0
- package/dist/shared/utils/isIos/isIos.test.d.ts +1 -0
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -39,71 +39,72 @@ import { default as Ie } from "./shared/utils/isServer/isServer.mjs";
|
|
|
39
39
|
import { default as De } from "./shared/utils/getTimeRange/getTimeRange.mjs";
|
|
40
40
|
import { default as ve } from "./shared/utils/getDateRange/getDateRange.mjs";
|
|
41
41
|
import { default as Pe } from "./shared/utils/isAndroid/isAndroid.mjs";
|
|
42
|
-
import { default as we } from "./shared/utils/
|
|
43
|
-
import { default as Ee } from "./shared/utils/
|
|
44
|
-
import { default as Ke } from "./shared/utils/
|
|
45
|
-
import { default as Qe } from "./shared/utils/
|
|
46
|
-
import { default as Ve } from "./shared/utils/
|
|
47
|
-
import { default as qe } from "./shared/utils/
|
|
48
|
-
import { default as He } from "./shared/utils/
|
|
49
|
-
import { default as Oe } from "./shared/utils/
|
|
50
|
-
import { default as Xe } from "./shared/utils/
|
|
51
|
-
import { default as Ze } from "./
|
|
52
|
-
import { default as $e } from "./teacher/profile/components/
|
|
53
|
-
import { default as aa } from "./teacher/profile/components/StatBadgeCollection/
|
|
54
|
-
import { default as oa } from "./teacher/profile/components/
|
|
55
|
-
import { default as fa } from "./teacher/profile/components/ActivityGallery/
|
|
56
|
-
import { default as sa } from "./teacher/profile/components/
|
|
57
|
-
import { default as da } from "./teacher/profile/components/CertificateSection/
|
|
58
|
-
import { default as pa } from "./teacher/profile/components/
|
|
59
|
-
import { default as ia } from "./teacher/profile/components/CareerSection/
|
|
60
|
-
import { default as na } from "./teacher/profile/components/
|
|
61
|
-
import { default as Sa } from "./teacher/profile/components/EducationSection/
|
|
62
|
-
import { default as Ca } from "./teacher/profile/components/
|
|
63
|
-
import { default as ba } from "./teacher/profile/components/
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import { default as Da } from "./teacher/profile/components/AbilityCollection/
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import { default as wa } from "./teacher/profile/components/
|
|
70
|
-
import { default as Ea } from "./teacher/profile/components/CareNoteSection/
|
|
71
|
-
import { default as Ka } from "./teacher/profile/components/
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import { default as qa } from "./teacher/
|
|
75
|
-
import { default as Ha } from "./teacher/home/components/TextAccount/TextAccount.
|
|
76
|
-
import { default as Oa } from "./teacher/home/components/
|
|
77
|
-
import { default as Xa } from "./teacher/home/components/Carousel1Account/Carousel1Account.
|
|
78
|
-
import { default as Za } from "./teacher/home/components/
|
|
79
|
-
import { default as $a } from "./teacher/home/components/Carousel2Account/Carousel2Account.
|
|
80
|
-
import { default as at } from "./teacher/home/components/
|
|
81
|
-
import { default as ot } from "./teacher/home/components/BannerAccount/BannerAccount.
|
|
42
|
+
import { default as we } from "./shared/utils/isIos/isIos.mjs";
|
|
43
|
+
import { default as Ee } from "./shared/utils/isApp/isApp.mjs";
|
|
44
|
+
import { default as Ke } from "./shared/utils/isDesktop/isDesktop.mjs";
|
|
45
|
+
import { default as Qe } from "./shared/utils/birthDateToAge/birthDateToAge.mjs";
|
|
46
|
+
import { default as Ve } from "./shared/utils/objectToQueryString/objectToQueryString.mjs";
|
|
47
|
+
import { default as qe } from "./shared/utils/getVimeoId/getVimeoId.mjs";
|
|
48
|
+
import { default as He } from "./shared/utils/parseQueryString/parseQueryString.mjs";
|
|
49
|
+
import { default as Oe } from "./shared/utils/share/share.mjs";
|
|
50
|
+
import { default as Xe } from "./shared/utils/dayFlagToDay/dayFlagToDay.mjs";
|
|
51
|
+
import { default as Ze } from "./shared/utils/getCareTypeLabel/getCareTypeLabel.mjs";
|
|
52
|
+
import { default as $e } from "./teacher/profile/components/ProfileSummary/ProfileSummary.mjs";
|
|
53
|
+
import { default as aa } from "./teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs";
|
|
54
|
+
import { default as oa } from "./teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs";
|
|
55
|
+
import { default as fa } from "./teacher/profile/components/ActivityGallery/ActivityGallery.mjs";
|
|
56
|
+
import { default as sa } from "./teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs";
|
|
57
|
+
import { default as da } from "./teacher/profile/components/CertificateSection/CertificateSection.mjs";
|
|
58
|
+
import { default as pa } from "./teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs";
|
|
59
|
+
import { default as ia } from "./teacher/profile/components/CareerSection/CareerSection.mjs";
|
|
60
|
+
import { default as na } from "./teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs";
|
|
61
|
+
import { default as Sa } from "./teacher/profile/components/EducationSection/EducationSection.mjs";
|
|
62
|
+
import { default as Ca } from "./teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs";
|
|
63
|
+
import { default as ba } from "./teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs";
|
|
64
|
+
import { default as Ma } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs";
|
|
65
|
+
import { getPreferredAgeKeywords as Ia } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs";
|
|
66
|
+
import { default as Da } from "./teacher/profile/components/AbilityCollection/AbilityCollection.mjs";
|
|
67
|
+
import { default as va } from "./teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs";
|
|
68
|
+
import { getAbilityCollection as Pa } from "./teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs";
|
|
69
|
+
import { default as wa } from "./teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs";
|
|
70
|
+
import { default as Ea } from "./teacher/profile/components/CareNoteSection/CareNoteSection.mjs";
|
|
71
|
+
import { default as Ka } from "./teacher/profile/components/CareNoteSection/CareNote/CareNote.mjs";
|
|
72
|
+
import { default as Qa } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs";
|
|
73
|
+
import { getChildLabel as Va } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs";
|
|
74
|
+
import { default as qa } from "./teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs";
|
|
75
|
+
import { default as Ha } from "./teacher/home/components/TextAccount/TextAccount.mjs";
|
|
76
|
+
import { default as Oa } from "./teacher/home/components/TextAccount/TextAccount.fallback.mjs";
|
|
77
|
+
import { default as Xa } from "./teacher/home/components/Carousel1Account/Carousel1Account.mjs";
|
|
78
|
+
import { default as Za } from "./teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs";
|
|
79
|
+
import { default as $a } from "./teacher/home/components/Carousel2Account/Carousel2Account.mjs";
|
|
80
|
+
import { default as at } from "./teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs";
|
|
81
|
+
import { default as ot } from "./teacher/home/components/BannerAccount/BannerAccount.mjs";
|
|
82
|
+
import { default as ft } from "./teacher/home/components/BannerAccount/BannerAccount.fallback.mjs";
|
|
82
83
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
va as AbilityBadge,
|
|
85
|
+
Da as AbilityCollection,
|
|
86
|
+
fa as ActivityGallery,
|
|
87
|
+
sa as ActivityGalleryItem,
|
|
88
|
+
wa as AvailableScheduleSection,
|
|
89
|
+
ot as BannerAccount,
|
|
90
|
+
ft as BannerAccountFallback,
|
|
90
91
|
fe as BotMessage,
|
|
91
92
|
N as Calendar,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
Ka as CareNote,
|
|
94
|
+
Ea as CareNoteSection,
|
|
95
|
+
na as CareerItem,
|
|
96
|
+
ia as CareerSection,
|
|
96
97
|
k as Carousel,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
Xa as Carousel1Account,
|
|
99
|
+
Za as Carousel1AccountFallback,
|
|
100
|
+
$a as Carousel2Account,
|
|
101
|
+
at as Carousel2AccountFallback,
|
|
101
102
|
T as CarouselSlide,
|
|
102
|
-
|
|
103
|
-
|
|
103
|
+
pa as CertificateItem,
|
|
104
|
+
da as CertificateSection,
|
|
104
105
|
ae as DirectTradeRiskInfoBottomSheet,
|
|
105
|
-
|
|
106
|
-
|
|
106
|
+
Ca as EducationItem,
|
|
107
|
+
Sa as EducationSection,
|
|
107
108
|
L as Image,
|
|
108
109
|
G as ImageError,
|
|
109
110
|
pe as InputBar,
|
|
@@ -118,50 +119,51 @@ export {
|
|
|
118
119
|
A as MediaDialogToolbar,
|
|
119
120
|
J as Message,
|
|
120
121
|
W as MessageFallback,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
qa as ParentReviewCard,
|
|
123
|
+
Qa as ParentReviewSection,
|
|
124
|
+
ba as PreferredActivityKeywordGroup,
|
|
125
|
+
Ma as PreferredAgeGroup,
|
|
126
|
+
$e as ProfileSummary,
|
|
126
127
|
F as Roller,
|
|
127
128
|
R as RollerBlock,
|
|
128
129
|
l as ScheduleBlock,
|
|
129
130
|
r as ScheduleEvent,
|
|
130
131
|
t as Scheduler,
|
|
131
132
|
ne as Seperator,
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
oa as StatBadge,
|
|
134
|
+
aa as StatBadgeCollection,
|
|
134
135
|
y as Swiper,
|
|
135
136
|
B as SwiperBlock,
|
|
136
137
|
$ as SystemMessage,
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
Ha as TextAccount,
|
|
139
|
+
Oa as TextAccountFallback,
|
|
139
140
|
h as TimePicker,
|
|
140
141
|
Se as UnreadMessagePill,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
Qe as birthDateToAge,
|
|
143
|
+
Xe as dayFlagToDay,
|
|
144
|
+
Pa as getAbilityCollection,
|
|
144
145
|
u as getAvailableDateRange,
|
|
145
146
|
se as getBotMessageLabel,
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
Ze as getCareTypeLabel,
|
|
148
|
+
Va as getChildLabel,
|
|
148
149
|
ue as getClassInfo,
|
|
149
150
|
de as getCtaButtonText,
|
|
150
151
|
ve as getDateRange,
|
|
151
152
|
Me as getImageUrl,
|
|
152
153
|
Y as getMessageLabel,
|
|
153
|
-
|
|
154
|
+
Ia as getPreferredAgeKeywords,
|
|
154
155
|
oe as getSystemMessageLabel,
|
|
155
156
|
De as getTimeRange,
|
|
156
|
-
|
|
157
|
+
qe as getVimeoId,
|
|
157
158
|
Pe as isAndroid,
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
Ee as isApp,
|
|
160
|
+
Ke as isDesktop,
|
|
161
|
+
we as isIos,
|
|
160
162
|
Ie as isServer,
|
|
161
163
|
Z as markMessageGroupBoundaries,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
164
|
+
Ve as objectToQueryString,
|
|
165
|
+
He as parseQueryString,
|
|
166
|
+
Oe as share,
|
|
165
167
|
be as useInView,
|
|
166
168
|
Ce as useIsomorphicLayoutEffect
|
|
167
169
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as n, jsx as e, Fragment as
|
|
2
|
-
import { useRef as x, useImperativeHandle as
|
|
3
|
-
import { Flexbox as d, Typography as v, Button as
|
|
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
4
|
import Y from "@dotss/ui/core/useTheme";
|
|
5
5
|
import { useCheckHoverPossible as Z } from "@dotss/ui/hooks";
|
|
6
6
|
import { MenuButton as _ } from "@dotss/ui/Menu";
|
|
@@ -33,14 +33,14 @@ function de({
|
|
|
33
33
|
palette: { brand: k, grey: a, etc: H },
|
|
34
34
|
spacing: E
|
|
35
35
|
} = Y(), { isHoverPossible: K } = Z(), o = x(null), D = x(null), p = x(null);
|
|
36
|
-
|
|
36
|
+
A(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();
|
|
40
40
|
}, 200)) : r === "delete" && (t == null || t(), p.current = setTimeout(() => {
|
|
41
41
|
b == null || b();
|
|
42
42
|
}, 200));
|
|
43
|
-
},
|
|
43
|
+
}, W = (r) => {
|
|
44
44
|
(r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.currentTarget.click());
|
|
45
45
|
};
|
|
46
46
|
return y(() => {
|
|
@@ -74,11 +74,12 @@ function de({
|
|
|
74
74
|
role: typeof c == "function" ? "button" : void 0,
|
|
75
75
|
tabIndex: typeof c == "function" ? 0 : -1,
|
|
76
76
|
onClick: c,
|
|
77
|
-
onKeyDown:
|
|
77
|
+
onKeyDown: W,
|
|
78
78
|
"aria-label": typeof c == "function" ? "선생님 프로필 보기" : void 0,
|
|
79
79
|
inlineCSS: {
|
|
80
80
|
position: "relative",
|
|
81
81
|
overflow: "hidden",
|
|
82
|
+
minWidth: 32,
|
|
82
83
|
cursor: typeof c == "function" ? "pointer" : void 0
|
|
83
84
|
},
|
|
84
85
|
children: /* @__PURE__ */ e(
|
|
@@ -127,7 +128,7 @@ function de({
|
|
|
127
128
|
}
|
|
128
129
|
),
|
|
129
130
|
N && /* @__PURE__ */ e(
|
|
130
|
-
|
|
131
|
+
J,
|
|
131
132
|
{
|
|
132
133
|
variant: "text",
|
|
133
134
|
size: "xSmall",
|
|
@@ -143,7 +144,7 @@ function de({
|
|
|
143
144
|
}
|
|
144
145
|
)
|
|
145
146
|
] }),
|
|
146
|
-
s && /* @__PURE__ */ n(
|
|
147
|
+
s && /* @__PURE__ */ n(q, { children: [
|
|
147
148
|
/* @__PURE__ */ n(
|
|
148
149
|
_,
|
|
149
150
|
{
|
|
@@ -194,7 +195,7 @@ function de({
|
|
|
194
195
|
}
|
|
195
196
|
),
|
|
196
197
|
/* @__PURE__ */ n(
|
|
197
|
-
|
|
198
|
+
Q,
|
|
198
199
|
{
|
|
199
200
|
id: `message-${C}-menu`,
|
|
200
201
|
anchorRef: D,
|
|
@@ -1,129 +1,155 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Flexbox as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
import { jsxs as U, jsx as c, Fragment as tt } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as et, useRef as b, useImperativeHandle as nt, useState as S, useEffect as M } from "react";
|
|
3
|
+
import { Flexbox as z, Skeleton as w } from "@dotss/ui";
|
|
4
|
+
import ot from "../../hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
|
|
5
|
+
import R from "../../utils/getImageUrl/getImageUrl.mjs";
|
|
6
|
+
import F from "./Image.error.mjs";
|
|
7
|
+
const it = 100, dt = et(
|
|
8
8
|
({
|
|
9
|
-
src:
|
|
10
|
-
width:
|
|
11
|
-
height:
|
|
12
|
-
fit:
|
|
13
|
-
position:
|
|
14
|
-
alt:
|
|
15
|
-
scale:
|
|
16
|
-
onLoad:
|
|
17
|
-
onLazyLoad:
|
|
18
|
-
lazy:
|
|
19
|
-
borderRadius:
|
|
20
|
-
disabledResizing:
|
|
21
|
-
withIntrinsicRatio:
|
|
22
|
-
enableBlurPlaceholder:
|
|
23
|
-
enableFallback:
|
|
24
|
-
enableErrorFallback:
|
|
25
|
-
renderErrorFallback:
|
|
26
|
-
wrapperProps:
|
|
27
|
-
onError:
|
|
28
|
-
...
|
|
29
|
-
},
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
const [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
9
|
+
src: l,
|
|
10
|
+
width: e,
|
|
11
|
+
height: o,
|
|
12
|
+
fit: r = "cover",
|
|
13
|
+
position: y = "center",
|
|
14
|
+
alt: V,
|
|
15
|
+
scale: W = 2,
|
|
16
|
+
onLoad: _,
|
|
17
|
+
onLazyLoad: j,
|
|
18
|
+
lazy: q = !1,
|
|
19
|
+
borderRadius: u,
|
|
20
|
+
disabledResizing: L = !1,
|
|
21
|
+
withIntrinsicRatio: A = !1,
|
|
22
|
+
enableBlurPlaceholder: g = !1,
|
|
23
|
+
enableFallback: B = !1,
|
|
24
|
+
enableErrorFallback: D = !0,
|
|
25
|
+
renderErrorFallback: d,
|
|
26
|
+
wrapperProps: n = {},
|
|
27
|
+
onError: G,
|
|
28
|
+
...C
|
|
29
|
+
}, p) => {
|
|
30
|
+
const I = b(null), J = b(!1), i = b(null);
|
|
31
|
+
nt(p, () => i.current);
|
|
32
|
+
const [v, k] = S(!1), [E, m] = S(!1), [h, f] = S(!1), [x, P] = S(!1), [K, N] = S(
|
|
33
|
+
R({
|
|
34
|
+
mode: "original",
|
|
35
|
+
src: l,
|
|
36
|
+
width: e,
|
|
37
|
+
height: o,
|
|
38
|
+
fit: r,
|
|
39
|
+
position: y,
|
|
40
|
+
scale: W,
|
|
41
|
+
disabledResizing: L
|
|
42
|
+
})
|
|
43
|
+
), Q = l == null ? void 0 : l.endsWith(".heic"), T = g ? R({
|
|
42
44
|
mode: "blur",
|
|
43
|
-
src:
|
|
44
|
-
width:
|
|
45
|
-
fit:
|
|
46
|
-
position:
|
|
45
|
+
src: l,
|
|
46
|
+
width: e,
|
|
47
|
+
fit: r,
|
|
48
|
+
position: y,
|
|
47
49
|
scale: 1 / 3,
|
|
48
|
-
disabledResizing:
|
|
49
|
-
}) : null,
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
return
|
|
55
|
-
if (
|
|
56
|
-
const t =
|
|
50
|
+
disabledResizing: L
|
|
51
|
+
}) : null, X = (t) => {
|
|
52
|
+
m(!0), f(!1), typeof _ == "function" && _(t);
|
|
53
|
+
}, Y = (t) => {
|
|
54
|
+
typeof G == "function" && G(t.nativeEvent), f(!0), m(!1);
|
|
55
|
+
}, Z = () => P(!0);
|
|
56
|
+
return M(() => {
|
|
57
|
+
if (q && I.current) {
|
|
58
|
+
const t = I.current, H = () => {
|
|
57
59
|
if (!t) return !1;
|
|
58
|
-
const
|
|
59
|
-
return
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
var
|
|
64
|
-
(
|
|
65
|
-
},
|
|
66
|
-
var
|
|
67
|
-
(
|
|
60
|
+
const a = t.getBoundingClientRect();
|
|
61
|
+
return a.bottom >= 0 && a.top <= (window.innerHeight || document.documentElement.clientHeight) + it;
|
|
62
|
+
}, s = () => {
|
|
63
|
+
H() && k(!0);
|
|
64
|
+
}, O = () => {
|
|
65
|
+
var a;
|
|
66
|
+
(a = window.appScreenContent) == null || a.addEventListener("scroll", s), window.addEventListener("resize", s), window.addEventListener("orientationchange", s);
|
|
67
|
+
}, $ = () => {
|
|
68
|
+
var a;
|
|
69
|
+
(a = window.appScreenContent) == null || a.removeEventListener("scroll", s), window.removeEventListener("resize", s), window.removeEventListener("orientationchange", s);
|
|
68
70
|
};
|
|
69
|
-
return
|
|
71
|
+
return s(), O(), $;
|
|
70
72
|
}
|
|
71
|
-
}),
|
|
72
|
-
typeof
|
|
73
|
-
}, [
|
|
74
|
-
const t =
|
|
75
|
-
return t != null && t.complete ? t.naturalWidth > 0 ? (t.style.transition = "none", t.style.opacity = "1",
|
|
76
|
-
t.style.opacity = "1",
|
|
73
|
+
}), M(() => {
|
|
74
|
+
typeof j == "function" && v && !J.current && (J.current = !0, j());
|
|
75
|
+
}, [j, v]), ot(() => {
|
|
76
|
+
const t = i.current;
|
|
77
|
+
return t != null && t.complete ? t.naturalWidth > 0 ? (t.style.transition = "none", t.style.opacity = "1", m(!0)) : (t.style.opacity = "0", f(!0)) : t && (t.style.transition = "opacity 0.3s", t.style.opacity = "0", t.onload = () => {
|
|
78
|
+
t.style.opacity = "1", m(!0), t.onload = null;
|
|
77
79
|
}, t.onerror = () => {
|
|
78
|
-
|
|
80
|
+
if (!Q) {
|
|
81
|
+
f(!0), t.onerror = null;
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
f(!1), window.fetch(l).then(async (H) => {
|
|
85
|
+
const s = await H.blob(), O = (await import("heic2any")).default, $ = await O({ blob: s, toType: "image/png" });
|
|
86
|
+
N(URL.createObjectURL($)), i.current.onload = () => {
|
|
87
|
+
t.style.opacity = "1", m(!0), f(!1), i.current.onload = null, i.current.onerror = null;
|
|
88
|
+
}, i.current.onerror = () => {
|
|
89
|
+
f(!0), m(!1), i.current.onload = null, i.current.onerror = null;
|
|
90
|
+
};
|
|
91
|
+
});
|
|
79
92
|
}), () => {
|
|
80
93
|
t && (t.onload = null, t.onerror = null);
|
|
81
94
|
};
|
|
82
|
-
}, [
|
|
83
|
-
|
|
95
|
+
}, [v, l, Q]), M(() => {
|
|
96
|
+
N(
|
|
97
|
+
R({
|
|
98
|
+
mode: "original",
|
|
99
|
+
src: l,
|
|
100
|
+
width: e,
|
|
101
|
+
height: o,
|
|
102
|
+
fit: r,
|
|
103
|
+
position: y,
|
|
104
|
+
scale: W,
|
|
105
|
+
disabledResizing: L
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
}, [l, e, o, r, y, W, L]), q ? /* @__PURE__ */ U(
|
|
109
|
+
z,
|
|
84
110
|
{
|
|
85
|
-
...
|
|
86
|
-
ref:
|
|
87
|
-
inlineCSS:
|
|
111
|
+
...n,
|
|
112
|
+
ref: I,
|
|
113
|
+
inlineCSS: A ? {
|
|
88
114
|
position: "relative",
|
|
89
|
-
paddingTop: `calc(100% / ${
|
|
115
|
+
paddingTop: `calc(100% / ${e} * ${o})`,
|
|
90
116
|
minWidth: "100%",
|
|
91
|
-
borderRadius:
|
|
117
|
+
borderRadius: u,
|
|
92
118
|
overflow: "hidden",
|
|
93
|
-
...
|
|
119
|
+
...n == null ? void 0 : n.inlineCSS
|
|
94
120
|
} : {
|
|
95
121
|
position: "relative",
|
|
96
|
-
width:
|
|
97
|
-
minWidth:
|
|
98
|
-
height:
|
|
99
|
-
borderRadius:
|
|
122
|
+
width: e,
|
|
123
|
+
minWidth: e,
|
|
124
|
+
height: o,
|
|
125
|
+
borderRadius: u,
|
|
100
126
|
overflow: "hidden",
|
|
101
|
-
...
|
|
127
|
+
...n == null ? void 0 : n.inlineCSS
|
|
102
128
|
},
|
|
103
129
|
children: [
|
|
104
|
-
|
|
105
|
-
|
|
130
|
+
B && /* @__PURE__ */ c(
|
|
131
|
+
w,
|
|
106
132
|
{
|
|
107
133
|
width: "100%",
|
|
108
134
|
height: "100%",
|
|
109
|
-
borderRadius:
|
|
135
|
+
borderRadius: u || 0,
|
|
110
136
|
inlineCSS: {
|
|
111
137
|
position: "absolute",
|
|
112
138
|
top: 0,
|
|
113
139
|
left: 0,
|
|
114
|
-
opacity:
|
|
140
|
+
opacity: E || g && x ? 0 : 1,
|
|
115
141
|
transition: "opacity 0.3s"
|
|
116
142
|
}
|
|
117
143
|
}
|
|
118
144
|
),
|
|
119
|
-
|
|
145
|
+
g && T && v && /* @__PURE__ */ c(
|
|
120
146
|
"img",
|
|
121
147
|
{
|
|
122
|
-
src:
|
|
148
|
+
src: T,
|
|
123
149
|
alt: "",
|
|
124
|
-
width:
|
|
125
|
-
height:
|
|
126
|
-
onLoad:
|
|
150
|
+
width: e,
|
|
151
|
+
height: o,
|
|
152
|
+
onLoad: Z,
|
|
127
153
|
draggable: !1,
|
|
128
154
|
style: {
|
|
129
155
|
position: "absolute",
|
|
@@ -132,27 +158,27 @@ const nt = 100, ct = P(
|
|
|
132
158
|
width: "100%",
|
|
133
159
|
height: "100%",
|
|
134
160
|
filter: "blur(5px)",
|
|
135
|
-
opacity:
|
|
161
|
+
opacity: x && !E ? 1 : 0,
|
|
136
162
|
transition: "opacity 0.3s",
|
|
137
|
-
objectFit:
|
|
138
|
-
objectPosition:
|
|
163
|
+
objectFit: r,
|
|
164
|
+
objectPosition: y
|
|
139
165
|
}
|
|
140
166
|
}
|
|
141
167
|
),
|
|
142
|
-
|
|
143
|
-
/* @__PURE__ */
|
|
168
|
+
v && /* @__PURE__ */ U(tt, { children: [
|
|
169
|
+
/* @__PURE__ */ c(
|
|
144
170
|
"img",
|
|
145
171
|
{
|
|
146
|
-
ref:
|
|
147
|
-
src:
|
|
148
|
-
alt:
|
|
149
|
-
width:
|
|
150
|
-
height:
|
|
151
|
-
onLoad:
|
|
152
|
-
onError:
|
|
153
|
-
"aria-hidden":
|
|
172
|
+
ref: i,
|
|
173
|
+
src: K,
|
|
174
|
+
alt: V,
|
|
175
|
+
width: e,
|
|
176
|
+
height: o,
|
|
177
|
+
onLoad: X,
|
|
178
|
+
onError: Y,
|
|
179
|
+
"aria-hidden": h,
|
|
154
180
|
draggable: !1,
|
|
155
|
-
...
|
|
181
|
+
...C,
|
|
156
182
|
style: {
|
|
157
183
|
position: "absolute",
|
|
158
184
|
top: 0,
|
|
@@ -160,60 +186,60 @@ const nt = 100, ct = P(
|
|
|
160
186
|
width: "100%",
|
|
161
187
|
height: "100%",
|
|
162
188
|
transition: "opacity 0.3s",
|
|
163
|
-
...
|
|
189
|
+
...C.style
|
|
164
190
|
}
|
|
165
191
|
}
|
|
166
192
|
),
|
|
167
|
-
|
|
193
|
+
D && h && ((d == null ? void 0 : d()) || /* @__PURE__ */ c(F, {}))
|
|
168
194
|
] })
|
|
169
195
|
]
|
|
170
196
|
}
|
|
171
|
-
) : /* @__PURE__ */
|
|
172
|
-
|
|
197
|
+
) : /* @__PURE__ */ U(
|
|
198
|
+
z,
|
|
173
199
|
{
|
|
174
|
-
...
|
|
175
|
-
ref:
|
|
176
|
-
inlineCSS:
|
|
200
|
+
...n,
|
|
201
|
+
ref: I,
|
|
202
|
+
inlineCSS: A ? {
|
|
177
203
|
position: "relative",
|
|
178
|
-
paddingTop: `calc(100% / ${
|
|
204
|
+
paddingTop: `calc(100% / ${e} * ${o})`,
|
|
179
205
|
minWidth: "100%",
|
|
180
206
|
transition: "padding-top 0.2s",
|
|
181
|
-
borderRadius:
|
|
207
|
+
borderRadius: u,
|
|
182
208
|
overflow: "hidden",
|
|
183
|
-
...
|
|
209
|
+
...n == null ? void 0 : n.inlineCSS
|
|
184
210
|
} : {
|
|
185
211
|
position: "relative",
|
|
186
|
-
width:
|
|
187
|
-
minWidth:
|
|
188
|
-
height:
|
|
189
|
-
borderRadius:
|
|
212
|
+
width: e,
|
|
213
|
+
minWidth: e,
|
|
214
|
+
height: o,
|
|
215
|
+
borderRadius: u,
|
|
190
216
|
overflow: "hidden",
|
|
191
|
-
...
|
|
217
|
+
...n == null ? void 0 : n.inlineCSS
|
|
192
218
|
},
|
|
193
219
|
children: [
|
|
194
|
-
|
|
195
|
-
|
|
220
|
+
B && /* @__PURE__ */ c(
|
|
221
|
+
w,
|
|
196
222
|
{
|
|
197
223
|
width: "100%",
|
|
198
224
|
height: "100%",
|
|
199
|
-
borderRadius:
|
|
225
|
+
borderRadius: u || 0,
|
|
200
226
|
inlineCSS: {
|
|
201
227
|
position: "absolute",
|
|
202
228
|
top: 0,
|
|
203
229
|
left: 0,
|
|
204
|
-
opacity:
|
|
230
|
+
opacity: E || g && x ? 0 : 1,
|
|
205
231
|
transition: "opacity 0.3s"
|
|
206
232
|
}
|
|
207
233
|
}
|
|
208
234
|
),
|
|
209
|
-
|
|
235
|
+
g && T && /* @__PURE__ */ c(
|
|
210
236
|
"img",
|
|
211
237
|
{
|
|
212
|
-
src:
|
|
238
|
+
src: T,
|
|
213
239
|
alt: "",
|
|
214
|
-
width:
|
|
215
|
-
height:
|
|
216
|
-
onLoad:
|
|
240
|
+
width: e,
|
|
241
|
+
height: o,
|
|
242
|
+
onLoad: Z,
|
|
217
243
|
draggable: !1,
|
|
218
244
|
style: {
|
|
219
245
|
position: "absolute",
|
|
@@ -222,24 +248,24 @@ const nt = 100, ct = P(
|
|
|
222
248
|
width: "100%",
|
|
223
249
|
height: "100%",
|
|
224
250
|
filter: "blur(5px)",
|
|
225
|
-
opacity:
|
|
251
|
+
opacity: x && !E ? 1 : 0,
|
|
226
252
|
transition: "opacity 0.3s"
|
|
227
253
|
}
|
|
228
254
|
}
|
|
229
255
|
),
|
|
230
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ c(
|
|
231
257
|
"img",
|
|
232
258
|
{
|
|
233
|
-
ref:
|
|
234
|
-
src:
|
|
235
|
-
alt:
|
|
236
|
-
width:
|
|
237
|
-
height:
|
|
238
|
-
onLoad:
|
|
239
|
-
onError:
|
|
240
|
-
"aria-hidden":
|
|
259
|
+
ref: i,
|
|
260
|
+
src: K,
|
|
261
|
+
alt: V,
|
|
262
|
+
width: e,
|
|
263
|
+
height: o,
|
|
264
|
+
onLoad: X,
|
|
265
|
+
onError: Y,
|
|
266
|
+
"aria-hidden": h,
|
|
241
267
|
draggable: !1,
|
|
242
|
-
...
|
|
268
|
+
...C,
|
|
243
269
|
style: {
|
|
244
270
|
position: "absolute",
|
|
245
271
|
top: 0,
|
|
@@ -247,16 +273,16 @@ const nt = 100, ct = P(
|
|
|
247
273
|
width: "100%",
|
|
248
274
|
height: "100%",
|
|
249
275
|
transition: "opacity 0.3s",
|
|
250
|
-
...
|
|
276
|
+
...C.style
|
|
251
277
|
}
|
|
252
278
|
}
|
|
253
279
|
),
|
|
254
|
-
|
|
280
|
+
D && h && ((d == null ? void 0 : d()) || /* @__PURE__ */ c(F, {}))
|
|
255
281
|
]
|
|
256
282
|
}
|
|
257
283
|
);
|
|
258
284
|
}
|
|
259
285
|
);
|
|
260
286
|
export {
|
|
261
|
-
|
|
287
|
+
dt as default
|
|
262
288
|
};
|
|
@@ -3,6 +3,7 @@ export { default as isServer } from './isServer';
|
|
|
3
3
|
export { default as getTimeRange } from './getTimeRange';
|
|
4
4
|
export { default as getDateRange } from './getDateRange';
|
|
5
5
|
export { default as isAndroid } from './isAndroid';
|
|
6
|
+
export { default as isIos } from './isIos';
|
|
6
7
|
export { default as isApp } from './isApp';
|
|
7
8
|
export { default as isDesktop } from './isDesktop';
|
|
8
9
|
export { default as birthDateToAge } from './birthDateToAge';
|
|
@@ -3,28 +3,30 @@ import { default as o } from "./isServer/isServer.mjs";
|
|
|
3
3
|
import { default as s } from "./getTimeRange/getTimeRange.mjs";
|
|
4
4
|
import { default as d } from "./getDateRange/getDateRange.mjs";
|
|
5
5
|
import { default as m } from "./isAndroid/isAndroid.mjs";
|
|
6
|
-
import { default as x } from "./
|
|
7
|
-
import { default as i } from "./
|
|
8
|
-
import { default as y } from "./
|
|
9
|
-
import { default as D } from "./
|
|
10
|
-
import { default as A } from "./
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as Q } from "./
|
|
13
|
-
import { default as c } from "./
|
|
14
|
-
import { default as k } from "./
|
|
6
|
+
import { default as x } from "./isIos/isIos.mjs";
|
|
7
|
+
import { default as i } from "./isApp/isApp.mjs";
|
|
8
|
+
import { default as y } from "./isDesktop/isDesktop.mjs";
|
|
9
|
+
import { default as D } from "./birthDateToAge/birthDateToAge.mjs";
|
|
10
|
+
import { default as A } from "./objectToQueryString/objectToQueryString.mjs";
|
|
11
|
+
import { default as S } from "./getVimeoId/getVimeoId.mjs";
|
|
12
|
+
import { default as Q } from "./parseQueryString/parseQueryString.mjs";
|
|
13
|
+
import { default as c } from "./share/share.mjs";
|
|
14
|
+
import { default as k } from "./dayFlagToDay/dayFlagToDay.mjs";
|
|
15
|
+
import { default as C } from "./getCareTypeLabel/getCareTypeLabel.mjs";
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
D as birthDateToAge,
|
|
18
|
+
k as dayFlagToDay,
|
|
19
|
+
C as getCareTypeLabel,
|
|
19
20
|
d as getDateRange,
|
|
20
21
|
r as getImageUrl,
|
|
21
22
|
s as getTimeRange,
|
|
22
|
-
|
|
23
|
+
S as getVimeoId,
|
|
23
24
|
m as isAndroid,
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
i as isApp,
|
|
26
|
+
y as isDesktop,
|
|
27
|
+
x as isIos,
|
|
26
28
|
o as isServer,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
A as objectToQueryString,
|
|
30
|
+
Q as parseQueryString,
|
|
31
|
+
c as share
|
|
30
32
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isIos(): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dotss/tictoccroc",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.29",
|
|
5
5
|
"description": "Tictoccroc shared components, hooks, utils, and APIs for Dotss",
|
|
6
6
|
"main": "./dist/index.mjs",
|
|
7
7
|
"module": "./dist/index.mjs",
|
|
@@ -107,7 +107,8 @@
|
|
|
107
107
|
"@emotion/styled": "^11.14.0",
|
|
108
108
|
"dayjs": "^1.11.13",
|
|
109
109
|
"react": "^18.0.0 || 19.0.0",
|
|
110
|
-
"react-dom": "^18.0.0 || 19.0.0"
|
|
110
|
+
"react-dom": "^18.0.0 || 19.0.0",
|
|
111
|
+
"heic2any": "^0.0.4"
|
|
111
112
|
},
|
|
112
113
|
"publishConfig": {
|
|
113
114
|
"access": "public"
|