reykit 1.0.208 → 1.0.210
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.js +28 -19
- package/dist/src/component/Media.d.ts +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49136,8 +49136,14 @@ function K4({
|
|
|
49136
49136
|
Lw,
|
|
49137
49137
|
{
|
|
49138
49138
|
className: "size-full block",
|
|
49139
|
-
render: /* @__PURE__ */ x.jsx(
|
|
49140
|
-
|
|
49139
|
+
render: /* @__PURE__ */ x.jsx(
|
|
49140
|
+
"img",
|
|
49141
|
+
{
|
|
49142
|
+
src: a
|
|
49143
|
+
}
|
|
49144
|
+
),
|
|
49145
|
+
...i,
|
|
49146
|
+
nativeButton: !1
|
|
49141
49147
|
}
|
|
49142
49148
|
),
|
|
49143
49149
|
/* @__PURE__ */ x.jsx(
|
|
@@ -49148,6 +49154,7 @@ function K4({
|
|
|
49148
49154
|
"img",
|
|
49149
49155
|
{
|
|
49150
49156
|
src: a,
|
|
49157
|
+
loading: "lazy",
|
|
49151
49158
|
className: "block max-w-[90vw] max-h-[90vh] w-auto h-auto object-contain"
|
|
49152
49159
|
}
|
|
49153
49160
|
)
|
|
@@ -49172,7 +49179,8 @@ function $4({
|
|
|
49172
49179
|
playsInline: !0
|
|
49173
49180
|
}
|
|
49174
49181
|
),
|
|
49175
|
-
...i
|
|
49182
|
+
...i,
|
|
49183
|
+
nativeButton: !1
|
|
49176
49184
|
}
|
|
49177
49185
|
),
|
|
49178
49186
|
/* @__PURE__ */ x.jsx(
|
|
@@ -49197,22 +49205,23 @@ function $4({
|
|
|
49197
49205
|
function vk({
|
|
49198
49206
|
data: a,
|
|
49199
49207
|
orientation: i = "auto",
|
|
49200
|
-
|
|
49208
|
+
showCount: u = !0,
|
|
49209
|
+
language: d = "en"
|
|
49201
49210
|
}) {
|
|
49202
49211
|
i === "auto" && (i = PC(
|
|
49203
49212
|
"horizontal",
|
|
49204
49213
|
"vertical"
|
|
49205
49214
|
));
|
|
49206
|
-
const [
|
|
49215
|
+
const [m, g] = Zo(1), [v, b] = Zo(), C = Dj(!1);
|
|
49207
49216
|
return wE(() => {
|
|
49208
|
-
if (!
|
|
49209
|
-
const
|
|
49210
|
-
|
|
49217
|
+
if (!v) return;
|
|
49218
|
+
const T = () => {
|
|
49219
|
+
g(v.selectedScrollSnap() + 1);
|
|
49211
49220
|
};
|
|
49212
|
-
return
|
|
49213
|
-
|
|
49221
|
+
return T(), v.on("select", T), () => {
|
|
49222
|
+
v.off("select", T);
|
|
49214
49223
|
};
|
|
49215
|
-
}, [
|
|
49224
|
+
}, [v]), /* @__PURE__ */ x.jsxs("div", { className: "flex flex-col place-items-center gap-4", children: [
|
|
49216
49225
|
/* @__PURE__ */ x.jsxs(
|
|
49217
49226
|
O_,
|
|
49218
49227
|
{
|
|
@@ -49220,32 +49229,32 @@ function vk({
|
|
|
49220
49229
|
align: "center",
|
|
49221
49230
|
loop: !0
|
|
49222
49231
|
},
|
|
49223
|
-
setApi:
|
|
49224
|
-
onWheel: (
|
|
49225
|
-
|
|
49226
|
-
|
|
49232
|
+
setApi: b,
|
|
49233
|
+
onWheel: (T) => {
|
|
49234
|
+
C.current || (C.current = !0, T.deltaY > 0 ? v?.scrollNext() : v?.scrollPrev(), setTimeout(() => {
|
|
49235
|
+
C.current = !1;
|
|
49227
49236
|
}, 300));
|
|
49228
49237
|
},
|
|
49229
49238
|
orientation: i,
|
|
49230
49239
|
className: "w-3/4",
|
|
49231
49240
|
children: [
|
|
49232
49241
|
/* @__PURE__ */ x.jsx(A_, { size: "icon" }),
|
|
49233
|
-
/* @__PURE__ */ x.jsx(N_, { className: "place-items-center m-1 md:m-2 max-h-[70vh]", children: a.map(({ type:
|
|
49242
|
+
/* @__PURE__ */ x.jsx(N_, { className: "place-items-center m-1 md:m-2 max-h-[70vh]", children: a.map(({ type: T, path: R }, N) => /* @__PURE__ */ x.jsx(
|
|
49234
49243
|
M_,
|
|
49235
49244
|
{
|
|
49236
49245
|
className: ie(
|
|
49237
49246
|
"basis-1/2 overflow-hidden border max-h-[50vh] place-items-center flex p-0 rounded-2xl shadow-md",
|
|
49238
49247
|
"my-1 md:mx-2"
|
|
49239
49248
|
),
|
|
49240
|
-
children:
|
|
49249
|
+
children: T === "image" ? /* @__PURE__ */ x.jsx(K4, { path: R }) : T === "video" ? /* @__PURE__ */ x.jsx($4, { path: R }) : void 0
|
|
49241
49250
|
},
|
|
49242
|
-
|
|
49251
|
+
N
|
|
49243
49252
|
)) }),
|
|
49244
49253
|
/* @__PURE__ */ x.jsx(D_, { size: "icon" })
|
|
49245
49254
|
]
|
|
49246
49255
|
}
|
|
49247
49256
|
),
|
|
49248
|
-
/* @__PURE__ */ x.jsx("div", { className: "flex-1 text-sm text-muted-foreground hidden md:flex", children: { en: `${
|
|
49257
|
+
/* @__PURE__ */ x.jsx("div", { className: "flex-1 text-sm text-muted-foreground hidden md:flex", children: { en: `${m} / ${a.length} item(s)`, zh: `第 ${m} / ${a.length} 个` }[d] })
|
|
49249
49258
|
] });
|
|
49250
49259
|
}
|
|
49251
49260
|
function yk({
|
|
@@ -24,11 +24,12 @@ export declare function PopupVideo({ path, ...args }: {
|
|
|
24
24
|
* - `auto` : Automatic set, when is mobile, then is `vertical`, otherwise is `horizontal`.
|
|
25
25
|
* @param language - Language type.
|
|
26
26
|
*/
|
|
27
|
-
export declare function CarouselMedia({ data, orientation, language }: {
|
|
27
|
+
export declare function CarouselMedia({ data, orientation, showCount, language }: {
|
|
28
28
|
data: {
|
|
29
29
|
type: 'image' | 'video';
|
|
30
30
|
path: string;
|
|
31
31
|
}[];
|
|
32
32
|
orientation?: 'auto' | 'horizontal' | 'vertical';
|
|
33
|
-
|
|
33
|
+
showCount?: boolean;
|
|
34
|
+
language?: 'en' | 'zh';
|
|
34
35
|
}): import("react/jsx-runtime").JSX.Element;
|