@cecee/document-flip-book 1.0.17 → 1.0.19

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 (75) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +83 -0
  3. package/dist/cjs/AccountingBook/index.d.ts +3 -0
  4. package/dist/cjs/AccountingBook/index.js +19 -0
  5. package/dist/cjs/{ArchiveCover.js → DocumentFlipBook/ArchiveCover.js} +23 -3
  6. package/dist/cjs/{ExportModal.js → DocumentFlipBook/ExportModal.js} +1 -1
  7. package/dist/cjs/{ProjectCover.js → DocumentFlipBook/ProjectCover.js} +23 -3
  8. package/dist/cjs/{exportHtml.d.ts → DocumentFlipBook/exportHtml.d.ts} +3 -3
  9. package/dist/cjs/{exportHtml.js → DocumentFlipBook/exportHtml.js} +104 -48
  10. package/dist/cjs/{exportPdf.d.ts → DocumentFlipBook/exportPdf.d.ts} +2 -0
  11. package/dist/cjs/{exportPdf.js → DocumentFlipBook/exportPdf.js} +17 -6
  12. package/dist/cjs/{globalCache.d.ts → DocumentFlipBook/globalCache.d.ts} +2 -1
  13. package/dist/cjs/DocumentFlipBook/images/Clip_1.svg +97 -0
  14. package/dist/cjs/DocumentFlipBook/images/Clip_2.svg +1114 -0
  15. package/dist/cjs/DocumentFlipBook/images/Inside.svg +10 -0
  16. package/dist/cjs/DocumentFlipBook/images/book.svg +1 -0
  17. package/dist/cjs/DocumentFlipBook/images/coverSpine.svg +4 -0
  18. package/dist/{esm/DocumentFlipBook.d.ts → cjs/DocumentFlipBook/index.d.ts} +2 -0
  19. package/dist/cjs/{DocumentFlipBook.js → DocumentFlipBook/index.js} +119 -25
  20. package/dist/cjs/{index.less → DocumentFlipBook/index.less} +194 -78
  21. package/dist/cjs/{printPdf.d.ts → DocumentFlipBook/printPdf.d.ts} +1 -0
  22. package/dist/cjs/{utils.d.ts → DocumentFlipBook/utils.d.ts} +2 -1
  23. package/dist/cjs/{utils.js → DocumentFlipBook/utils.js} +4 -1
  24. package/dist/cjs/index.d.ts +3 -3
  25. package/dist/cjs/index.js +10 -3
  26. package/dist/esm/AccountingBook/index.d.ts +3 -0
  27. package/dist/esm/AccountingBook/index.js +13 -0
  28. package/dist/esm/{ArchiveCover.js → DocumentFlipBook/ArchiveCover.js} +23 -3
  29. package/dist/esm/{ExportModal.js → DocumentFlipBook/ExportModal.js} +1 -1
  30. package/dist/esm/{ProjectCover.js → DocumentFlipBook/ProjectCover.js} +23 -3
  31. package/dist/esm/{exportHtml.d.ts → DocumentFlipBook/exportHtml.d.ts} +3 -3
  32. package/dist/esm/{exportHtml.js → DocumentFlipBook/exportHtml.js} +103 -47
  33. package/dist/esm/{exportPdf.d.ts → DocumentFlipBook/exportPdf.d.ts} +2 -0
  34. package/dist/esm/{exportPdf.js → DocumentFlipBook/exportPdf.js} +17 -6
  35. package/dist/esm/{globalCache.d.ts → DocumentFlipBook/globalCache.d.ts} +2 -1
  36. package/dist/esm/DocumentFlipBook/images/Clip_1.svg +97 -0
  37. package/dist/esm/DocumentFlipBook/images/Clip_2.svg +1114 -0
  38. package/dist/esm/DocumentFlipBook/images/Inside.svg +10 -0
  39. package/dist/esm/DocumentFlipBook/images/book.svg +1 -0
  40. package/dist/esm/DocumentFlipBook/images/coverSpine.svg +4 -0
  41. package/dist/{cjs/DocumentFlipBook.d.ts → esm/DocumentFlipBook/index.d.ts} +2 -0
  42. package/dist/esm/{DocumentFlipBook.js → DocumentFlipBook/index.js} +119 -25
  43. package/dist/esm/{index.less → DocumentFlipBook/index.less} +194 -78
  44. package/dist/esm/{printPdf.d.ts → DocumentFlipBook/printPdf.d.ts} +1 -0
  45. package/dist/esm/{utils.d.ts → DocumentFlipBook/utils.d.ts} +2 -1
  46. package/dist/esm/{utils.js → DocumentFlipBook/utils.js} +4 -1
  47. package/dist/esm/index.d.ts +3 -3
  48. package/dist/esm/index.js +5 -3
  49. package/package.json +6 -1
  50. /package/dist/cjs/{ArchiveCover.d.ts → DocumentFlipBook/ArchiveCover.d.ts} +0 -0
  51. /package/dist/cjs/{ExportModal.d.ts → DocumentFlipBook/ExportModal.d.ts} +0 -0
  52. /package/dist/cjs/{HeaderBar.d.ts → DocumentFlipBook/HeaderBar.d.ts} +0 -0
  53. /package/dist/cjs/{HeaderBar.js → DocumentFlipBook/HeaderBar.js} +0 -0
  54. /package/dist/cjs/{PdfPage.d.ts → DocumentFlipBook/PdfPage.d.ts} +0 -0
  55. /package/dist/cjs/{PdfPage.js → DocumentFlipBook/PdfPage.js} +0 -0
  56. /package/dist/cjs/{ProjectCover.d.ts → DocumentFlipBook/ProjectCover.d.ts} +0 -0
  57. /package/dist/cjs/{SideTabs.d.ts → DocumentFlipBook/SideTabs.d.ts} +0 -0
  58. /package/dist/cjs/{SideTabs.js → DocumentFlipBook/SideTabs.js} +0 -0
  59. /package/dist/cjs/{globalCache.js → DocumentFlipBook/globalCache.js} +0 -0
  60. /package/dist/cjs/{printPdf.js → DocumentFlipBook/printPdf.js} +0 -0
  61. /package/dist/cjs/{types.d.ts → DocumentFlipBook/types.d.ts} +0 -0
  62. /package/dist/cjs/{types.js → DocumentFlipBook/types.js} +0 -0
  63. /package/dist/esm/{ArchiveCover.d.ts → DocumentFlipBook/ArchiveCover.d.ts} +0 -0
  64. /package/dist/esm/{ExportModal.d.ts → DocumentFlipBook/ExportModal.d.ts} +0 -0
  65. /package/dist/esm/{HeaderBar.d.ts → DocumentFlipBook/HeaderBar.d.ts} +0 -0
  66. /package/dist/esm/{HeaderBar.js → DocumentFlipBook/HeaderBar.js} +0 -0
  67. /package/dist/esm/{PdfPage.d.ts → DocumentFlipBook/PdfPage.d.ts} +0 -0
  68. /package/dist/esm/{PdfPage.js → DocumentFlipBook/PdfPage.js} +0 -0
  69. /package/dist/esm/{ProjectCover.d.ts → DocumentFlipBook/ProjectCover.d.ts} +0 -0
  70. /package/dist/esm/{SideTabs.d.ts → DocumentFlipBook/SideTabs.d.ts} +0 -0
  71. /package/dist/esm/{SideTabs.js → DocumentFlipBook/SideTabs.js} +0 -0
  72. /package/dist/esm/{globalCache.js → DocumentFlipBook/globalCache.js} +0 -0
  73. /package/dist/esm/{printPdf.js → DocumentFlipBook/printPdf.js} +0 -0
  74. /package/dist/esm/{types.d.ts → DocumentFlipBook/types.d.ts} +0 -0
  75. /package/dist/esm/{types.js → DocumentFlipBook/types.js} +0 -0
@@ -31,42 +31,88 @@
31
31
  .book-page {
32
32
  width: 100%;
33
33
  height: 100%;
34
- background: #9F7D4E;
34
+ background: var(--dfb-theme-color, #9F7D4E);
35
35
  padding: 22px;
36
36
  }
37
37
 
38
38
  .book-view {
39
- box-shadow: 0 0 18px rgba(0, 0, 0, 0.18);
40
- position: relative;
41
39
  overflow: hidden;
40
+ position: relative;
41
+ z-index: 10;
42
+ overflow: visible; // 显式设置为 visible 以显示侧边厚度装饰
43
+ background: transparent; // 改为透明,避免遮挡背景层或产生白色边框
42
44
 
43
- // 页面内侧阴影(靠近中缝处的深度感)
44
- &::before {
45
- content: "";
45
+ // 书本左侧厚度 1
46
+ .dfb-book-thickness-left-1 {
47
+ overflow: hidden;
46
48
  position: absolute;
47
49
  top: 0;
48
- bottom: 0;
50
+ left: -4px;
51
+ width: 8px;
52
+ height: 100%;
53
+ background: linear-gradient(to right, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.3));
54
+ border-radius: 2px;
55
+ z-index: 20;
56
+ box-shadow: rgba(255, 255, 255, 0.6) 0px 0px 6px inset;
57
+ pointer-events: none;
58
+ display: none; // 默认隐藏,由 nth-child 控制显示
59
+ }
60
+
61
+ // 书本左侧厚度 2
62
+ .dfb-book-thickness-left-2 {
63
+ position: absolute;
64
+ top: 0;
65
+ left: -10px;
49
66
  width: 20px;
50
- z-index: 5;
67
+ height: 100%;
68
+ background: linear-gradient(to right, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.2));
69
+ z-index: 14;
51
70
  pointer-events: none;
52
- transition: opacity 0.3s ease;
71
+ display: none; // 默认隐藏
53
72
  }
54
73
 
55
- // 偶数页(通常是右页)阴影在左侧
56
- &:nth-child(even)::before {
57
- left: 0;
58
- background: linear-gradient(to right, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.05) 40%, transparent 100%);
74
+ // 书本右侧厚度 1
75
+ .dfb-book-thickness-right-1 {
76
+ position: absolute;
77
+ top: 0;
78
+ right: -4px;
79
+ width: 8px;
80
+ height: 100%;
81
+ background: linear-gradient(to right, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.3));
82
+ border-radius: 2px;
83
+ z-index: 15;
84
+ box-shadow: rgba(255, 255, 255, 0.6) 0px 0px 6px inset;
85
+ pointer-events: none;
86
+ display: none; // 默认隐藏
59
87
  }
60
88
 
61
- // 奇数页(通常是左页)阴影在右侧
62
- &:nth-child(odd)::before {
63
- right: 0;
64
- background: linear-gradient(to left, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.05) 40%, transparent 100%);
89
+ // 书本右侧厚度 2
90
+ .dfb-book-thickness-right-2 {
91
+ position: absolute;
92
+ top: 0;
93
+ right: -10px;
94
+ width: 20px;
95
+ height: 100%;
96
+ background: linear-gradient(to left, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0.2));
97
+ z-index: 14;
98
+ pointer-events: none;
99
+ display: none; // 默认隐藏
100
+ }
101
+
102
+ // 偶数页(第 2, 4, 6... 个子元素,对应 Page 1, 3, 5...)是左页 -> 显示左侧厚度
103
+ &:nth-child(even) {
104
+ .dfb-book-thickness-left-1,
105
+ .dfb-book-thickness-left-2 {
106
+ display: block;
107
+ }
65
108
  }
66
109
 
67
- // 封面页(第一页)通常不需要这种内部阴影,或者阴影较弱
68
- &:first-child::before {
69
- opacity: 0.3;
110
+ // 奇数页(第 1, 3, 5... 个子元素,对应 Page 0, 2, 4...)是右页 -> 显示右侧厚度
111
+ &:nth-child(odd) {
112
+ .dfb-book-thickness-right-1,
113
+ .dfb-book-thickness-right-2 {
114
+ display: block;
115
+ }
70
116
  }
71
117
  }
72
118
 
@@ -75,8 +121,10 @@
75
121
  }
76
122
 
77
123
  .dfb-HTMLFlipBook {
78
- overflow: hidden;
79
- background: #fff;
124
+ position: relative;
125
+ z-index: 10;
126
+ overflow: visible; // 显式设置为 visible 以显示侧边厚度装饰
127
+ background: #fff; // 改为透明,避免遮挡背景层或产生白色边框
80
128
  }
81
129
 
82
130
  .dfb-root {
@@ -261,7 +309,7 @@
261
309
  display: flex;
262
310
  flex-direction: column;
263
311
  gap: 6px; //
264
- z-index: 10;
312
+ z-index: 20;
265
313
  transition: all 0.3s ease;
266
314
 
267
315
  &.is-on-cover {
@@ -339,57 +387,108 @@
339
387
  margin: auto; // 关键:在 flex 容器中使用 margin: auto 实现完美居中且溢出时可滚动到顶部
340
388
  position: relative;
341
389
  min-width: 300px;
390
+ overflow: hidden;
342
391
  }
343
392
 
344
- .dfb-bookShell1 {
345
- position: relative;
346
- padding: 18px 0 18px 54px;
347
- background: transparent;
348
- transition: background-color 0.3s ease;
393
+ // 方法三:背景层样式
394
+ .dfb-book-background-layer {
395
+ position: absolute;
396
+ top: 0;
397
+ left: 0;
398
+ right: 0;
399
+ bottom: 0;
400
+ padding: 18px 54px;
401
+ z-index: 1;
402
+ transition: all 0.3s ease;
403
+ pointer-events: none;
404
+ overflow: hidden;
405
+ /* 确保伪元素不会超出容器 */
349
406
  }
350
407
 
351
- .dfb-bookShell {
408
+ /* 左侧较高的背景块 */
409
+ .dfb-book-background-layer::before {
410
+ content: "";
411
+ position: absolute;
412
+ top: 2px;
413
+ left: -16px;
414
+ width: 50%;
415
+ /* 占据左半边 */
416
+ height: 100%;
417
+ /* 高度为100%,显得更高 */
418
+ background-color: var(--dfb-theme-color, #9F7D4E);
419
+ transition: all 0.3s ease;
420
+ }
421
+
422
+ /* 右侧较低的背景块 */
423
+ .dfb-book-background-layer::after {
424
+ content: "";
425
+ position: absolute;
426
+ top: 9px;
427
+ right: -16px;
428
+ width: 50%;
429
+ /* 占据右半边 */
430
+ height: calc(100% - 15px);
431
+ /* 高度减去顶部偏移量 */
432
+ background-color: var(--dfb-theme-color, #9F7D4E);
433
+ filter: brightness(0.85); // 自动加深,不再依赖额外的变量
434
+ opacity: 0.9;
435
+ transition: all 0.3s ease;
436
+ }
437
+
438
+ // 方法三:内容层样式
439
+ .dfb-book-content-layer {
352
440
  position: relative;
353
- padding: 18px 54px;
354
- background: #9F7D4E;
355
- transition: background-color 0.3s ease;
441
+ z-index: 10; // 位于背景之上
442
+ padding: 18px 54px; // 保持与背景层一致的内边距
443
+ }
444
+
445
+ // 书脊内侧装饰 (Inside.svg)
446
+ .dfb-inside-spine {
447
+ position: absolute;
448
+ left: 50%;
449
+ top: 2px;
450
+ height: calc(100% - 1px);
451
+ bottom: 18px;
452
+ width: 34px; // 恢复为原始 SVG 宽度
453
+ transform: translateX(-50%);
454
+ z-index: 5; // 提高层级,确保在 .dfb-book-background-layer 的 linear-gradient 之上
455
+ pointer-events: none;
456
+ opacity: 1; // 增加不透明度使其更清晰
457
+ }
356
458
 
357
- &::after {
459
+ // 中缝装饰层(确保在中缝位置且高于内容层)
460
+ // .dfb-spine-decoration-layer {
461
+ // position: absolute;
462
+ // left: 50%;
463
+ // top: 0;
464
+ // bottom: 0;
465
+ // width: 0; // 仅作为定位参考
466
+ // z-index: 20; // 必须高于内容层 (10) 才能看到
467
+ // pointer-events: none;
468
+ // }
469
+
470
+ // 书本中缝分割线
471
+ .dfb-book-spine {
472
+ position: absolute;
473
+ left: 50%;
474
+ top: 17px;
475
+ bottom: 18px;
476
+ width: 2px;
477
+ transform: translateX(-50%);
478
+ background: rgba(0, 0, 0, 0.2);
479
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
480
+ z-index: 20;
481
+ pointer-events: none;
482
+ transition: opacity 0.3s ease;
483
+
484
+ &::before {
358
485
  content: "";
359
486
  position: absolute;
487
+ left: -4px;
360
488
  top: 0;
361
- left: 0;
362
- right: 0;
363
489
  bottom: 0;
364
- background-image: url("https://www.transparenttextures.com/patterns/leather.png");
365
- opacity: 0.1;
366
- pointer-events: none;
367
- border-radius: 8px;
368
- }
369
-
370
- // 书本中缝分割线
371
- .dfb-book-spine {
372
- position: absolute;
373
- left: 50%;
374
- top: 18px;
375
- bottom: 18px;
376
- width: 2px;
377
- transform: translateX(-50%);
378
- background: rgba(0, 0, 0, 0.2);
379
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
380
- z-index: 5;
381
- pointer-events: none;
382
- transition: opacity 0.3s ease;
383
-
384
- &::before {
385
- content: "";
386
- position: absolute;
387
- left: -4px;
388
- top: 0;
389
- bottom: 0;
390
- width: 10px;
391
- background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.15), transparent);
392
- }
490
+ width: 10px;
491
+ background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.15), transparent);
393
492
  }
394
493
  }
395
494
 
@@ -398,7 +497,7 @@
398
497
  height: 100%;
399
498
  display: grid;
400
499
  place-items: center;
401
- background: #9F7D4E;
500
+ background: var(--dfb-theme-color, #9F7D4E);
402
501
  color: #111;
403
502
  font-size: 46px;
404
503
  font-weight: 800;
@@ -425,14 +524,24 @@
425
524
  .archive-cover {
426
525
  width: 100%;
427
526
  height: 100%;
428
- background: #9F7D4E; // 棕黄色背景
429
527
  display: flex;
430
528
  align-items: center;
431
529
  justify-content: center;
432
530
  color: #000;
433
531
  font-family: "SimSun", "STSong", serif;
434
- padding: 40px;
532
+ padding: 40px 40px 40px 57px; // 增加左侧内边距,给背脊留出空间
435
533
  box-sizing: border-box;
534
+ position: relative; // 确保子元素绝对定位
535
+
536
+ .archive-spine {
537
+ background-color: #fff;
538
+ position: absolute;
539
+ left: 0;
540
+ top: 0;
541
+ bottom: 0;
542
+ width: 25px; // 稍微放宽一点,效果更好
543
+ z-index: 10;
544
+ }
436
545
 
437
546
  &__outer-border {
438
547
  border: 5px solid #000;
@@ -459,7 +568,7 @@
459
568
  font-size: 26px;
460
569
  font-weight: bold;
461
570
  margin-top: 10px;
462
- margin-bottom: 30px;
571
+ margin-bottom: 10px;
463
572
  letter-spacing: 4px;
464
573
  text-align: center;
465
574
  }
@@ -533,10 +642,7 @@
533
642
 
534
643
  // 项目模式封面样式
535
644
  .project-cover-container {
536
- // position: absolute;
537
- // left: 15px;
538
- // top: 0px;
539
- // width: calc(100% - 15px);
645
+ position: relative; // 确保子元素绝对定位
540
646
  width: 100%;
541
647
  height: 100%;
542
648
  z-index: 20;
@@ -544,7 +650,17 @@
544
650
  display: flex;
545
651
  flex-direction: column;
546
652
  font-family: "SimSun", "STSong", serif;
547
- padding: 30px;
653
+ padding: 30px 30px 30px 47px; // 增加左侧内边距,给背脊留出空间
654
+
655
+ .archive-spine {
656
+ background-color: #fff;
657
+ position: absolute;
658
+ left: 0;
659
+ top: 0;
660
+ bottom: 0;
661
+ width: 25px;
662
+ z-index: 10;
663
+ }
548
664
 
549
665
  // 移除 react-pageflip 默认添加的样式影响
550
666
  &.stf__item {
@@ -574,7 +690,7 @@
574
690
  box-sizing: border-box;
575
691
  }
576
692
 
577
- .project-cover-header {
693
+ .project-cover-header {
578
694
  text-align: center;
579
695
  color: #000;
580
696
  // padding: 8px 0;
@@ -599,8 +715,8 @@
599
715
  .stat-cell-label {
600
716
  flex: 1;
601
717
  text-align: center;
602
- height: 52px;
603
- line-height: 52px;
718
+ height: 42px;
719
+ line-height: 42px;
604
720
  // padding: 8px;
605
721
  border-right: 1px solid #000;
606
722
  display: flex;
@@ -612,8 +728,8 @@
612
728
  .stat-cell-value {
613
729
  flex: 1;
614
730
  text-align: center;
615
- height: 52px;
616
- line-height: 52px;
731
+ height: 42px;
732
+ line-height: 42px;
617
733
  border-right: 1px solid #000;
618
734
  font-family: "Times New Roman", serif;
619
735
  font-size: 18px;
@@ -3,4 +3,5 @@ export declare function printArchiveAsPdf(params: {
3
3
  pages: BuiltPage[];
4
4
  getDocument: (path: string) => Promise<PdfDocumentLike>;
5
5
  scale?: number;
6
+ printType?: 'A4' | 'A5';
6
7
  }): Promise<void>;
@@ -3,7 +3,7 @@ export declare const setupPdfWorker: (customSrc?: string) => void;
3
3
  export declare const PDF_OPTIONS: {};
4
4
  export declare const PDF_PRELOAD_TIMEOUT = 60000;
5
5
  export declare const VIEWPORT_WIDTH = 580;
6
- export declare const VIEWPORT_HEIGHT = 670;
6
+ export declare const VIEWPORT_HEIGHT = 650;
7
7
  export declare const HEIGHT = "100%";
8
8
  export declare const isPdfFile: (path: string) => boolean;
9
9
  export declare const formatPath: (path: string) => string;
@@ -14,4 +14,5 @@ export declare const createPdfDocumentCache: (loadDocument: (path: string) => Pr
14
14
  getDocument(path: string): Promise<PdfDocumentLike>;
15
15
  getPageCount(path: string): Promise<number>;
16
16
  clear(path: string): void;
17
+ clearAll(): void;
17
18
  };
@@ -22,7 +22,7 @@ setupPdfWorker();
22
22
  export var PDF_OPTIONS = {};
23
23
  export var PDF_PRELOAD_TIMEOUT = 60000; // 增加到 60 秒,适配超大文件或慢速网络
24
24
  export var VIEWPORT_WIDTH = 580;
25
- export var VIEWPORT_HEIGHT = 670;
25
+ export var VIEWPORT_HEIGHT = 650;
26
26
  export var HEIGHT = '100%';
27
27
 
28
28
  // 判断是否为 PDF
@@ -209,6 +209,9 @@ export var createPdfDocumentCache = function createPdfDocumentCache(loadDocument
209
209
  },
210
210
  clear: function clear(path) {
211
211
  cache.delete(path);
212
+ },
213
+ clearAll: function clearAll() {
214
+ cache.clear();
212
215
  }
213
216
  };
214
217
  };
@@ -1,4 +1,4 @@
1
1
  export { default as DocumentFlipBook } from './DocumentFlipBook';
2
- export { setupPdfWorker } from './utils';
3
- export * from './types';
4
- import './index.less';
2
+ export { default as AccountingBook } from './AccountingBook';
3
+ export { setupPdfWorker } from './DocumentFlipBook/utils';
4
+ export * from './DocumentFlipBook/types';
package/dist/esm/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export { default as DocumentFlipBook } from "./DocumentFlipBook";
2
- export { setupPdfWorker } from "./utils";
3
- export * from "./types";
4
- import "./index.less";
2
+ export { default as AccountingBook } from "./AccountingBook";
3
+
4
+ // 导出通用工具和类型
5
+ export { setupPdfWorker } from "./DocumentFlipBook/utils";
6
+ export * from "./DocumentFlipBook/types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cecee/document-flip-book",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "A high-performance document flipbook component based on React and Ant Design.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -26,12 +26,17 @@
26
26
  "html2canvas": ">=1.0.0",
27
27
  "jspdf": ">=2.0.0",
28
28
  "lodash": ">=4.0.0",
29
+ "pdfjs-dist": ">=4.0.0",
29
30
  "react": ">=16.8.0",
30
31
  "react-dom": ">=16.8.0",
31
32
  "react-pageflip": ">=2.0.0",
32
33
  "react-pdf": ">=9.0.0"
33
34
  },
35
+ "dependencies": {
36
+ "jszip": "^3.10.1"
37
+ },
34
38
  "devDependencies": {
39
+ "@types/jszip": "^3.4.1",
35
40
  "@types/lodash": "^4.14.202",
36
41
  "@types/react": "^18.2.48",
37
42
  "@types/react-dom": "^18.2.18",