reykit 1.0.226 → 1.0.227

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 CHANGED
@@ -49275,33 +49275,34 @@ function bk({
49275
49275
  width: u = 2,
49276
49276
  showButton: f = !0,
49277
49277
  showControl: m = !0,
49278
- language: g = "en"
49278
+ language: g = "en",
49279
+ ...v
49279
49280
  }) {
49280
49281
  i === "auto" && (i = C0(
49281
49282
  "vertical",
49282
49283
  "horizontal"
49283
49284
  ));
49284
- const v = C0(
49285
+ const b = C0(
49285
49286
  "icon",
49286
49287
  "icon-lg"
49287
- ), [b, C] = {
49288
+ ), [C, T] = {
49288
49289
  1: ["basis-1/1", 2],
49289
49290
  2: ["basis-1/2", 3],
49290
49291
  3: ["basis-1/3", 3],
49291
49292
  4: ["basis-1/4", 4],
49292
49293
  5: ["basis-1/5", 4],
49293
49294
  6: ["basis-1/6", 5]
49294
- }[u], [T, R] = co(1), [N, A] = co(), M = KA(!1), O = /* @__PURE__ */ x.jsx("div", { className: "flex-1 text-sm md:text-base text-muted-foreground flex absolute max-md:-top-8 md:-bottom-8", children: { en: `${T} / ${a.length} item(s)`, zh: `第 ${T} / ${a.length} 个` }[g] });
49295
+ }[u], [R, N] = co(1), [A, M] = co(), O = KA(!1), z = /* @__PURE__ */ x.jsx("div", { className: "flex-1 text-sm md:text-base text-muted-foreground flex absolute max-md:-top-8 md:-bottom-8", children: { en: `${R} / ${a.length} item(s)`, zh: `第 ${R} / ${a.length} 个` }[g] });
49295
49296
  return OE(() => {
49296
- if (!N) return;
49297
- const z = () => {
49298
- R(N.selectedScrollSnap() + 1);
49297
+ if (!A) return;
49298
+ const D = () => {
49299
+ N(A.selectedScrollSnap() + 1);
49299
49300
  };
49300
- return z(), N.on("select", z), () => {
49301
- N.off("select", z);
49301
+ return D(), A.on("select", D), () => {
49302
+ A.off("select", D);
49302
49303
  };
49303
- }, [N]), /* @__PURE__ */ x.jsxs("div", { className: "relative flex flex-col place-items-center gap-4 size-full", children: [
49304
- m && i == "vertical" && O,
49304
+ }, [A]), /* @__PURE__ */ x.jsx("div", { ...v, children: /* @__PURE__ */ x.jsxs("div", { className: "relative flex flex-col place-items-center gap-4 size-full", children: [
49305
+ m && i == "vertical" && z,
49305
49306
  /* @__PURE__ */ x.jsxs(
49306
49307
  M_,
49307
49308
  {
@@ -49311,10 +49312,10 @@ function bk({
49311
49312
  skipSnaps: !0,
49312
49313
  duration: 25
49313
49314
  },
49314
- setApi: A,
49315
- onWheel: (z) => {
49316
- M.current || (M.current = !0, z.deltaY > 0 ? N?.scrollNext() : N?.scrollPrev(), setTimeout(() => {
49317
- M.current = !1;
49315
+ setApi: M,
49316
+ onWheel: (D) => {
49317
+ O.current || (O.current = !0, D.deltaY > 0 ? A?.scrollNext() : A?.scrollPrev(), setTimeout(() => {
49318
+ O.current = !1;
49318
49319
  }, 300));
49319
49320
  },
49320
49321
  orientation: i,
@@ -49328,33 +49329,33 @@ function bk({
49328
49329
  '[&_[data-slot="carousel-content"]]:place-items-center'
49329
49330
  ),
49330
49331
  children: [
49331
- /* @__PURE__ */ x.jsx(A_, { className: "flex place-items-center m-1 md:m-2 size-full", children: a.map(({ type: z, path: D }, U) => {
49332
- const V = Math.abs(U - T + 1);
49332
+ /* @__PURE__ */ x.jsx(A_, { className: "flex place-items-center m-1 md:m-2 size-full", children: a.map(({ type: D, path: U }, V) => {
49333
+ const _ = Math.abs(V - R + 1);
49333
49334
  return /* @__PURE__ */ x.jsx(
49334
49335
  D_,
49335
49336
  {
49336
49337
  className: ie(
49337
- b,
49338
+ C,
49338
49339
  "overflow-hidden border md:h-[95%] md:max-h-[95%] max-md:w-[95%] max-md:max-w-[95%]",
49339
49340
  "place-items-center flex p-0 rounded-2xl shadow-md my-1 md:mx-2"
49340
49341
  ),
49341
49342
  children: Math.min(
49342
- V,
49343
- a.length - V
49344
- ) > C ? null : z === "image" ? /* @__PURE__ */ x.jsx(F4, { path: D }) : z === "video" ? /* @__PURE__ */ x.jsx(J4, { path: D }) : null
49343
+ _,
49344
+ a.length - _
49345
+ ) > T ? null : D === "image" ? /* @__PURE__ */ x.jsx(F4, { path: U }) : D === "video" ? /* @__PURE__ */ x.jsx(J4, { path: U }) : null
49345
49346
  },
49346
- U
49347
+ V
49347
49348
  );
49348
49349
  }) }),
49349
49350
  f && /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
49350
- /* @__PURE__ */ x.jsx(z_, { size: v, className: "max-md:top-auto max-md:-bottom-12 max-md:left-1/3" }),
49351
- /* @__PURE__ */ x.jsx(__, { size: v, className: "max-md:-bottom-12 max-md:left-2/3" })
49351
+ /* @__PURE__ */ x.jsx(z_, { size: b, className: "max-md:top-auto max-md:-bottom-12 max-md:left-1/3" }),
49352
+ /* @__PURE__ */ x.jsx(__, { size: b, className: "max-md:-bottom-12 max-md:left-2/3" })
49352
49353
  ] })
49353
49354
  ]
49354
49355
  }
49355
49356
  ),
49356
- m && i == "horizontal" && O
49357
- ] });
49357
+ m && i == "horizontal" && z
49358
+ ] }) });
49358
49359
  }
49359
49360
  function xk({
49360
49361
  children: a,
@@ -31,7 +31,7 @@ export declare function PopupVideo({ path, preload, ...args }: {
31
31
  * @param showControl - Whether show controls.
32
32
  * @param language - Language type.
33
33
  */
34
- export declare function CarouselMedia({ data, orientation, width, showButton, showControl, language }: {
34
+ export declare function CarouselMedia({ data, orientation, width, showButton, showControl, language, ...args }: {
35
35
  data: {
36
36
  type: 'image' | 'video';
37
37
  path: string;
@@ -41,4 +41,4 @@ export declare function CarouselMedia({ data, orientation, width, showButton, sh
41
41
  showButton?: boolean;
42
42
  showControl?: boolean;
43
43
  language?: 'en' | 'zh';
44
- }): import("react/jsx-runtime").JSX.Element;
44
+ } & ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reykit",
3
- "version": "1.0.226",
3
+ "version": "1.0.227",
4
4
  "description": "Kit method set.",
5
5
  "author": "reyxbo",
6
6
  "keywords": [