@eternalheart/react-file-preview 1.0.3 → 1.0.4

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/lib/index.mjs CHANGED
@@ -12,7 +12,7 @@ import Se from "video.js";
12
12
  import Le from "react-markdown";
13
13
  import Pe from "remark-gfm";
14
14
  import { Prism as J } from "react-syntax-highlighter";
15
- const Re = "1.0.3", Ee = {
15
+ const Re = "1.0.4", Ee = {
16
16
  version: Re
17
17
  };
18
18
  function De(r) {
@@ -138,7 +138,7 @@ const $e = ({
138
138
  T.preventDefault(), T.stopPropagation();
139
139
  const z = T.deltaY > 0 ? -0.1 : 0.1;
140
140
  p((D) => {
141
- const H = Math.max(0.5, Math.min(5, D + z));
141
+ const H = Math.max(0.01, Math.min(10, D + z));
142
142
  return a && a(H), H;
143
143
  });
144
144
  }, [a]), C = M((T) => {
@@ -1258,9 +1258,9 @@ const Be = ({
1258
1258
  return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
1259
1259
  }, [l, t, j.length, a, n]);
1260
1260
  const g = M(() => {
1261
- o((v) => Math.min(v + 0.25, 5));
1261
+ o((v) => Math.min(v + 0.25, 10));
1262
1262
  }, []), S = M(() => {
1263
- o((v) => Math.max(v - 0.25, 0.5));
1263
+ o((v) => Math.max(v - 0.25, 0.01));
1264
1264
  }, []), T = M(() => {
1265
1265
  w((v) => v + 90);
1266
1266
  }, []), z = M(() => {
@@ -1336,7 +1336,7 @@ const Be = ({
1336
1336
  icon: /* @__PURE__ */ e(xe, { className: "w-5 h-5" }),
1337
1337
  label: "缩小",
1338
1338
  onClick: S,
1339
- disabled: i <= 0.5
1339
+ disabled: i <= 0.01
1340
1340
  }
1341
1341
  ),
1342
1342
  /* @__PURE__ */ d("span", { className: "text-white/70 text-sm min-w-[4rem] text-center font-medium", children: [
@@ -1349,7 +1349,7 @@ const Be = ({
1349
1349
  icon: /* @__PURE__ */ e(we, { className: "w-5 h-5" }),
1350
1350
  label: "放大",
1351
1351
  onClick: g,
1352
- disabled: i >= 5
1352
+ disabled: i >= 10
1353
1353
  }
1354
1354
  ),
1355
1355
  /* @__PURE__ */ e("div", { className: "w-px h-6 bg-white/20 mx-2" }),