@eternalheart/react-file-preview 1.1.3 → 1.2.0

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.
Files changed (64) hide show
  1. package/README.md +6 -6
  2. package/README.zh-CN.md +6 -6
  3. package/lib/FilePreviewContent.d.ts +1 -0
  4. package/lib/FilePreviewContent.d.ts.map +1 -1
  5. package/lib/hooks/useAudioPlayer.d.ts.map +1 -0
  6. package/lib/index.cjs +76 -13
  7. package/lib/index.cjs.map +1 -1
  8. package/lib/index.css +1 -1
  9. package/lib/index.mjs +30359 -7093
  10. package/lib/index.mjs.map +1 -1
  11. package/lib/renderers/{AudioRenderer.d.ts → Audio/index.d.ts} +1 -1
  12. package/lib/renderers/Audio/index.d.ts.map +1 -0
  13. package/lib/renderers/{DocxRenderer.d.ts → Docx/index.d.ts} +1 -1
  14. package/lib/renderers/Docx/index.d.ts.map +1 -0
  15. package/lib/renderers/Epub/index.d.ts +19 -0
  16. package/lib/renderers/Epub/index.d.ts.map +1 -0
  17. package/lib/renderers/Epub/toolbar.d.ts +11 -0
  18. package/lib/renderers/Epub/toolbar.d.ts.map +1 -0
  19. package/lib/renderers/{ImageRenderer.d.ts → Image/index.d.ts} +1 -1
  20. package/lib/renderers/Image/index.d.ts.map +1 -0
  21. package/lib/renderers/Image/toolbar.d.ts +13 -0
  22. package/lib/renderers/Image/toolbar.d.ts.map +1 -0
  23. package/lib/renderers/Json/index.d.ts +7 -0
  24. package/lib/renderers/Json/index.d.ts.map +1 -0
  25. package/lib/renderers/{MarkdownRenderer.d.ts → Markdown/index.d.ts} +1 -1
  26. package/lib/renderers/Markdown/index.d.ts.map +1 -0
  27. package/lib/renderers/{MsgRenderer.d.ts → Msg/index.d.ts} +1 -1
  28. package/lib/renderers/Msg/index.d.ts.map +1 -0
  29. package/lib/renderers/{PdfRenderer.d.ts → Pdf/index.d.ts} +2 -4
  30. package/lib/renderers/Pdf/index.d.ts.map +1 -0
  31. package/lib/renderers/Pdf/toolbar.d.ts +9 -0
  32. package/lib/renderers/Pdf/toolbar.d.ts.map +1 -0
  33. package/lib/renderers/{PptxRenderer.d.ts → Pptx/index.d.ts} +1 -1
  34. package/lib/renderers/Pptx/index.d.ts.map +1 -0
  35. package/lib/renderers/{TextRenderer.d.ts → Text/index.d.ts} +1 -1
  36. package/lib/renderers/Text/index.d.ts.map +1 -0
  37. package/lib/renderers/{UnsupportedRenderer.d.ts → Unsupported/index.d.ts} +1 -1
  38. package/lib/renderers/Unsupported/index.d.ts.map +1 -0
  39. package/lib/renderers/{VideoRenderer.d.ts → Video/index.d.ts} +1 -1
  40. package/lib/renderers/Video/index.d.ts.map +1 -0
  41. package/lib/renderers/{XlsxRenderer.d.ts → Xlsx/index.d.ts} +2 -1
  42. package/lib/renderers/Xlsx/index.d.ts.map +1 -0
  43. package/lib/renderers/toolbar.types.d.ts +17 -0
  44. package/lib/renderers/toolbar.types.d.ts.map +1 -0
  45. package/lib/types.d.ts +2 -22
  46. package/lib/types.d.ts.map +1 -1
  47. package/lib/utils/excelDataConverter.d.ts +1 -45
  48. package/lib/utils/excelDataConverter.d.ts.map +1 -1
  49. package/lib/utils/fileNormalizer.d.ts +1 -17
  50. package/lib/utils/fileNormalizer.d.ts.map +1 -1
  51. package/package.json +8 -6
  52. package/lib/renderers/AudioRenderer.d.ts.map +0 -1
  53. package/lib/renderers/DocxRenderer.d.ts.map +0 -1
  54. package/lib/renderers/ImageRenderer.d.ts.map +0 -1
  55. package/lib/renderers/MarkdownRenderer.d.ts.map +0 -1
  56. package/lib/renderers/MsgRenderer.d.ts.map +0 -1
  57. package/lib/renderers/PdfRenderer.d.ts.map +0 -1
  58. package/lib/renderers/PptxRenderer.d.ts.map +0 -1
  59. package/lib/renderers/TextRenderer.d.ts.map +0 -1
  60. package/lib/renderers/UnsupportedRenderer.d.ts.map +0 -1
  61. package/lib/renderers/VideoRenderer.d.ts.map +0 -1
  62. package/lib/renderers/XlsxRenderer.d.ts.map +0 -1
  63. package/lib/renderers/hooks/useAudioPlayer.d.ts.map +0 -1
  64. /package/lib/{renderers/hooks → hooks}/useAudioPlayer.d.ts +0 -0
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # React File Preview [![npm version](https://img.shields.io/npm/v/@eternalheart/@eternalheart/react-file-preview.svg)](https://www.npmjs.com/package/@eternalheart/react-file-preview)[![license](https://img.shields.io/npm/l/@eternalheart/react-file-preview.svg)](https://github.com/wh131462/react-file-preview/blob/master/LICENSE)[![downloads](https://img.shields.io/npm/dm/@eternalheart/react-file-preview.svg)](https://www.npmjs.com/package/@eternalheart/react-file-preview)
1
+ # React File Preview [![npm version](https://img.shields.io/npm/v/@eternalheart/@eternalheart/react-file-preview.svg)](https://www.npmjs.com/package/@eternalheart/react-file-preview)[![license](https://img.shields.io/npm/l/@eternalheart/react-file-preview.svg)](https://github.com/wh131462/file-preview/blob/master/LICENSE)[![downloads](https://img.shields.io/npm/dm/@eternalheart/react-file-preview.svg)](https://www.npmjs.com/package/@eternalheart/react-file-preview)
2
2
 
3
3
  English | [简体中文](./README.zh-CN.md)
4
4
 
@@ -445,7 +445,7 @@ The component is built with Tailwind CSS. You can customize styles by overriding
445
445
 
446
446
  ## 📚 Documentation
447
447
 
448
- - [Online Demo](https://wh131462.github.io/react-file-preview) - Live demo
448
+ - [Online Demo](https://wh131462.github.io/file-preview) - Live demo
449
449
 
450
450
  ## 🤖 Context7 Support
451
451
 
@@ -491,7 +491,7 @@ This project supports [Context7](https://context7.com) MCP Server. If you are us
491
491
 
492
492
  ```bash
493
493
  # Clone repository
494
- git clone https://github.com/wh131462/react-file-preview.git
494
+ git clone https://github.com/wh131462/file-preview.git
495
495
 
496
496
  # Install dependencies
497
497
  pnpm install
@@ -533,7 +533,7 @@ Issues and Pull Requests are welcome!
533
533
 
534
534
  ## 🔗 Links
535
535
 
536
- - [GitHub](https://github.com/wh131462/react-file-preview)
536
+ - [GitHub](https://github.com/wh131462/file-preview)
537
537
  - [npm](https://www.npmjs.com/package/@eternalheart/react-file-preview)
538
- - [Online Demo](https://wh131462.github.io/react-file-preview)
539
- - [Issue Tracker](https://github.com/wh131462/react-file-preview/issues)
538
+ - [Online Demo](https://wh131462.github.io/file-preview)
539
+ - [Issue Tracker](https://github.com/wh131462/file-preview/issues)
package/README.zh-CN.md CHANGED
@@ -1,4 +1,4 @@
1
- # React File Preview [![npm version](https://img.shields.io/npm/v/@eternalheart/react-file-preview.svg)](https://www.npmjs.com/package/@eternalheart/react-file-preview)[![license](https://img.shields.io/npm/l/@eternalheart/react-file-preview.svg)](https://github.com/wh131462/react-file-preview/blob/master/LICENSE)[![downloads](https://img.shields.io/npm/dm/@eternalheart/react-file-preview.svg)](https://www.npmjs.com/package/@eternalheart/react-file-preview)
1
+ # React File Preview [![npm version](https://img.shields.io/npm/v/@eternalheart/react-file-preview.svg)](https://www.npmjs.com/package/@eternalheart/react-file-preview)[![license](https://img.shields.io/npm/l/@eternalheart/react-file-preview.svg)](https://github.com/wh131462/file-preview/blob/master/LICENSE)[![downloads](https://img.shields.io/npm/dm/@eternalheart/react-file-preview.svg)](https://www.npmjs.com/package/@eternalheart/react-file-preview)
2
2
 
3
3
  [English](./README.md) | 简体中文
4
4
 
@@ -443,7 +443,7 @@ const files = [
443
443
 
444
444
  ## 📚 文档
445
445
 
446
- - [在线演示](https://wh131462.github.io/react-file-preview) - 在线 Demo
446
+ - [在线演示](https://wh131462.github.io/file-preview) - 在线 Demo
447
447
 
448
448
  ## 🤖 Context7 支持
449
449
 
@@ -489,7 +489,7 @@ const files = [
489
489
 
490
490
  ```bash
491
491
  # 克隆仓库
492
- git clone https://github.com/wh131462/react-file-preview.git
492
+ git clone https://github.com/wh131462/file-preview.git
493
493
 
494
494
  # 安装依赖
495
495
  pnpm install
@@ -531,8 +531,8 @@ react-file-preview/
531
531
 
532
532
  ## 🔗 相关链接
533
533
 
534
- - [GitHub](https://github.com/wh131462/react-file-preview)
534
+ - [GitHub](https://github.com/wh131462/file-preview)
535
535
  - [npm](https://www.npmjs.com/package/@eternalheart/react-file-preview)
536
- - [在线演示](https://wh131462.github.io/react-file-preview)
537
- - [问题反馈](https://github.com/wh131462/react-file-preview/issues)
536
+ - [在线演示](https://wh131462.github.io/file-preview)
537
+ - [问题反馈](https://github.com/wh131462/file-preview/issues)
538
538
 
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { PreviewFileInput, CustomRenderer } from './types';
2
3
  export interface FilePreviewContentProps {
3
4
  files: PreviewFileInput[];
@@ -1 +1 @@
1
- {"version":3,"file":"FilePreviewContent.d.ts","sourceRoot":"","sources":["../src/FilePreviewContent.tsx"],"names":[],"mappings":"AAgCA,OAAO,EAAe,gBAAgB,EAAY,cAAc,EAAE,MAAM,SAAS,CAAC;AAclF,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,iCAAiC;IACjC,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AA+CD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAichE,CAAC"}
1
+ {"version":3,"file":"FilePreviewContent.d.ts","sourceRoot":"","sources":["../src/FilePreviewContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAQjF,OAAO,EAAe,gBAAgB,EAAY,cAAc,EAAE,MAAM,SAAS,CAAC;AAiBlF,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,eAAe,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