@eternalheart/react-file-preview 1.1.1 → 1.1.2

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.
@@ -2,6 +2,8 @@ interface ImageRendererProps {
2
2
  url: string;
3
3
  zoom: number;
4
4
  rotation: number;
5
+ resetKey?: number;
6
+ fileSize?: number;
5
7
  onZoomChange?: (zoom: number) => void;
6
8
  onNaturalWidthChange?: (width: number) => void;
7
9
  onNaturalHeightChange?: (height: number) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ImageRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/ImageRenderer.tsx"],"names":[],"mappings":"AAGA,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkItD,CAAC"}
1
+ {"version":3,"file":"ImageRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/ImageRenderer.tsx"],"names":[],"mappings":"AAGA,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAClD;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAmLtD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"VideoRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/VideoRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,4BAA4B,CAAC;AAIpC,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;CACb;AAoBD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA0HtD,CAAC"}
1
+ {"version":3,"file":"VideoRenderer.d.ts","sourceRoot":"","sources":["../../src/renderers/VideoRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,4BAA4B,CAAC;AAIpC,UAAU,kBAAkB;IAC1B,GAAG,EAAE,MAAM,CAAC;CACb;AAoBD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+HtD,CAAC"}
@@ -1,4 +1,8 @@
1
1
  import { PreviewFile, PreviewFileInput } from '../types';
2
+ /**
3
+ * 从 URL 字符串中提取文件名
4
+ */
5
+ export declare function getFileNameFromUrl(url: string): string;
2
6
  /**
3
7
  * 标准化文件输入为 PreviewFile 格式
4
8
  * 支持三种输入类型:
@@ -1 +1 @@
1
- {"version":3,"file":"fileNormalizer.d.ts","sourceRoot":"","sources":["../../src/utils/fileNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AA0FzD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW,CA+BrF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,WAAW,EAAE,CAExE"}
1
+ {"version":3,"file":"fileNormalizer.d.ts","sourceRoot":"","sources":["../../src/utils/fileNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEzD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAWtD;AA0ED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,GAAE,MAAU,GAAG,WAAW,CA+BrF;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,WAAW,EAAE,CAExE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eternalheart/react-file-preview",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "A modern, feature-rich file preview component for React with support for images, videos, audio, PDFs, Office documents (Word, Excel, PowerPoint), Markdown, and code files.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.cjs",