reykit 1.0.208 → 1.0.209
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 +27 -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(
|
|
@@ -49172,7 +49178,8 @@ function $4({
|
|
|
49172
49178
|
playsInline: !0
|
|
49173
49179
|
}
|
|
49174
49180
|
),
|
|
49175
|
-
...i
|
|
49181
|
+
...i,
|
|
49182
|
+
nativeButton: !1
|
|
49176
49183
|
}
|
|
49177
49184
|
),
|
|
49178
49185
|
/* @__PURE__ */ x.jsx(
|
|
@@ -49197,22 +49204,23 @@ function $4({
|
|
|
49197
49204
|
function vk({
|
|
49198
49205
|
data: a,
|
|
49199
49206
|
orientation: i = "auto",
|
|
49200
|
-
|
|
49207
|
+
showCount: u = !0,
|
|
49208
|
+
language: d = "en"
|
|
49201
49209
|
}) {
|
|
49202
49210
|
i === "auto" && (i = PC(
|
|
49203
49211
|
"horizontal",
|
|
49204
49212
|
"vertical"
|
|
49205
49213
|
));
|
|
49206
|
-
const [
|
|
49214
|
+
const [m, g] = Zo(1), [v, b] = Zo(), C = Dj(!1);
|
|
49207
49215
|
return wE(() => {
|
|
49208
|
-
if (!
|
|
49209
|
-
const
|
|
49210
|
-
|
|
49216
|
+
if (!v) return;
|
|
49217
|
+
const T = () => {
|
|
49218
|
+
g(v.selectedScrollSnap() + 1);
|
|
49211
49219
|
};
|
|
49212
|
-
return
|
|
49213
|
-
|
|
49220
|
+
return T(), v.on("select", T), () => {
|
|
49221
|
+
v.off("select", T);
|
|
49214
49222
|
};
|
|
49215
|
-
}, [
|
|
49223
|
+
}, [v]), /* @__PURE__ */ x.jsxs("div", { className: "flex flex-col place-items-center gap-4", children: [
|
|
49216
49224
|
/* @__PURE__ */ x.jsxs(
|
|
49217
49225
|
O_,
|
|
49218
49226
|
{
|
|
@@ -49220,32 +49228,32 @@ function vk({
|
|
|
49220
49228
|
align: "center",
|
|
49221
49229
|
loop: !0
|
|
49222
49230
|
},
|
|
49223
|
-
setApi:
|
|
49224
|
-
onWheel: (
|
|
49225
|
-
|
|
49226
|
-
|
|
49231
|
+
setApi: b,
|
|
49232
|
+
onWheel: (T) => {
|
|
49233
|
+
C.current || (C.current = !0, T.deltaY > 0 ? v?.scrollNext() : v?.scrollPrev(), setTimeout(() => {
|
|
49234
|
+
C.current = !1;
|
|
49227
49235
|
}, 300));
|
|
49228
49236
|
},
|
|
49229
49237
|
orientation: i,
|
|
49230
49238
|
className: "w-3/4",
|
|
49231
49239
|
children: [
|
|
49232
49240
|
/* @__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:
|
|
49241
|
+
/* @__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
49242
|
M_,
|
|
49235
49243
|
{
|
|
49236
49244
|
className: ie(
|
|
49237
49245
|
"basis-1/2 overflow-hidden border max-h-[50vh] place-items-center flex p-0 rounded-2xl shadow-md",
|
|
49238
49246
|
"my-1 md:mx-2"
|
|
49239
49247
|
),
|
|
49240
|
-
children:
|
|
49248
|
+
children: T === "image" ? /* @__PURE__ */ x.jsx(K4, { path: R }) : T === "video" ? /* @__PURE__ */ x.jsx($4, { path: R }) : void 0
|
|
49241
49249
|
},
|
|
49242
|
-
|
|
49250
|
+
N
|
|
49243
49251
|
)) }),
|
|
49244
49252
|
/* @__PURE__ */ x.jsx(D_, { size: "icon" })
|
|
49245
49253
|
]
|
|
49246
49254
|
}
|
|
49247
49255
|
),
|
|
49248
|
-
/* @__PURE__ */ x.jsx("div", { className: "flex-1 text-sm text-muted-foreground hidden md:flex", children: { en: `${
|
|
49256
|
+
/* @__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
49257
|
] });
|
|
49250
49258
|
}
|
|
49251
49259
|
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;
|