@yudaocode/univer-pdfs-ui 1.6.216 → 1.6.218
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/cjs/index.js +3210 -1934
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/locale/en-US.js +3 -0
- package/lib/cjs/locale/en-US.js.map +1 -1
- package/lib/cjs/locale/zh-CN.js +3 -0
- package/lib/cjs/locale/zh-CN.js.map +1 -1
- package/lib/es/{chunk-6CILUWCE.js → chunk-BGVYO6EP.js} +4 -1
- package/lib/es/chunk-BGVYO6EP.js.map +1 -0
- package/lib/es/{chunk-OZZ4HTI3.js → chunk-TLZPB72N.js} +4 -1
- package/lib/es/chunk-TLZPB72N.js.map +1 -0
- package/lib/es/index.js +2969 -1688
- package/lib/es/index.js.map +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/index.css +290 -5
- package/lib/types/index.d.ts +45 -5
- package/lib/types/locale/zh-CN.d.ts +3 -0
- package/package.json +3 -3
- package/lib/es/chunk-6CILUWCE.js.map +0 -1
- package/lib/es/chunk-OZZ4HTI3.js.map +0 -1
package/lib/es/locale/en-US.js
CHANGED
package/lib/es/locale/zh-CN.js
CHANGED
package/lib/index.css
CHANGED
|
@@ -467,9 +467,9 @@
|
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
.univer-pdf-left-tabs {
|
|
470
|
-
display:
|
|
471
|
-
|
|
472
|
-
padding:
|
|
470
|
+
display: flex;
|
|
471
|
+
flex-wrap: wrap;
|
|
472
|
+
padding: 5px;
|
|
473
473
|
gap: 2px;
|
|
474
474
|
border-bottom: 1px solid #E3E5EA;
|
|
475
475
|
}
|
|
@@ -483,14 +483,18 @@
|
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
.univer-pdf-left-tab {
|
|
486
|
+
flex: 1 1 auto;
|
|
487
|
+
min-width: 0;
|
|
486
488
|
border: none;
|
|
487
489
|
background: transparent;
|
|
488
|
-
padding: 5px
|
|
490
|
+
padding: 5px 4px;
|
|
489
491
|
border-radius: 5px;
|
|
490
|
-
font-size:
|
|
492
|
+
font-size: 11px;
|
|
491
493
|
font-weight: 500;
|
|
492
494
|
color: #4E5565;
|
|
493
495
|
cursor: pointer;
|
|
496
|
+
white-space: nowrap;
|
|
497
|
+
text-align: center;
|
|
494
498
|
transition: all 0.12s ease;
|
|
495
499
|
}
|
|
496
500
|
|
|
@@ -596,6 +600,287 @@
|
|
|
596
600
|
gap: 10px;
|
|
597
601
|
}
|
|
598
602
|
|
|
603
|
+
/* Bookmarks Tree & Layers Panel in Left Sidebar */
|
|
604
|
+
.univer-pdf-bookmarks-panel,
|
|
605
|
+
.univer-pdf-layers-panel {
|
|
606
|
+
flex: 1;
|
|
607
|
+
overflow-y: auto;
|
|
608
|
+
padding: 10px 8px;
|
|
609
|
+
display: flex;
|
|
610
|
+
flex-direction: column;
|
|
611
|
+
gap: 8px;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.univer-pdf-bookmark-tree,
|
|
615
|
+
.univer-pdf-layer-list {
|
|
616
|
+
display: flex;
|
|
617
|
+
flex-direction: column;
|
|
618
|
+
gap: 6px;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.univer-pdf-bookmark-branch {
|
|
622
|
+
display: flex;
|
|
623
|
+
flex-direction: column;
|
|
624
|
+
gap: 3px;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
.univer-pdf-bookmark-row {
|
|
628
|
+
display: flex;
|
|
629
|
+
align-items: center;
|
|
630
|
+
gap: 4px;
|
|
631
|
+
padding: 4px 6px;
|
|
632
|
+
border-radius: 5px;
|
|
633
|
+
border: 1px solid #E3E5EA;
|
|
634
|
+
background: #F9FAFB;
|
|
635
|
+
cursor: pointer;
|
|
636
|
+
transition: border-color 0.12s ease, background-color 0.12s ease;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.univer-pdf-bookmark-row:hover {
|
|
640
|
+
border-color: #D2DAFA;
|
|
641
|
+
background: #FFFFFF;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
.univer-pdf-bookmark-row.is-active {
|
|
645
|
+
border-color: #2C53F1;
|
|
646
|
+
background: #F3F5FF;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
.univer-pdf-bookmark-chevron {
|
|
650
|
+
border: none;
|
|
651
|
+
background: transparent;
|
|
652
|
+
padding: 0;
|
|
653
|
+
width: 14px;
|
|
654
|
+
height: 14px;
|
|
655
|
+
font-size: 10px;
|
|
656
|
+
line-height: 1;
|
|
657
|
+
color: #4E5565;
|
|
658
|
+
cursor: pointer;
|
|
659
|
+
flex-shrink: 0;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.univer-pdf-bookmark-title {
|
|
663
|
+
flex: 1;
|
|
664
|
+
min-width: 0;
|
|
665
|
+
font-size: 11px;
|
|
666
|
+
font-weight: 500;
|
|
667
|
+
color: #1B1C1F;
|
|
668
|
+
overflow: hidden;
|
|
669
|
+
text-overflow: ellipsis;
|
|
670
|
+
white-space: nowrap;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.univer-pdf-bookmark-page-select {
|
|
674
|
+
border: 1px solid #D5D8DF;
|
|
675
|
+
border-radius: 4px;
|
|
676
|
+
background: #FFFFFF;
|
|
677
|
+
color: #2C53F1;
|
|
678
|
+
font-size: 10px;
|
|
679
|
+
font-weight: 600;
|
|
680
|
+
padding: 1px 3px;
|
|
681
|
+
cursor: pointer;
|
|
682
|
+
flex-shrink: 0;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.univer-pdf-bookmark-page-badge {
|
|
686
|
+
font-size: 10px;
|
|
687
|
+
font-weight: 600;
|
|
688
|
+
color: #2C53F1;
|
|
689
|
+
background: #EEF2FF;
|
|
690
|
+
border: 1px solid #D2DAFA;
|
|
691
|
+
border-radius: 3px;
|
|
692
|
+
padding: 0 4px;
|
|
693
|
+
flex-shrink: 0;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
.univer-pdf-bookmark-actions {
|
|
697
|
+
display: flex;
|
|
698
|
+
flex-wrap: wrap;
|
|
699
|
+
gap: 3px;
|
|
700
|
+
padding-left: 16px;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
.univer-pdf-bookmark-children {
|
|
704
|
+
display: flex;
|
|
705
|
+
flex-direction: column;
|
|
706
|
+
gap: 4px;
|
|
707
|
+
margin-top: 2px;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.univer-pdf-inline-rename-input {
|
|
711
|
+
flex: 1;
|
|
712
|
+
min-width: 0;
|
|
713
|
+
border: 1px solid #2C53F1;
|
|
714
|
+
border-radius: 3px;
|
|
715
|
+
padding: 2px 4px;
|
|
716
|
+
font-size: 11px;
|
|
717
|
+
color: #1B1C1F;
|
|
718
|
+
background: #FFFFFF;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.univer-pdf-layer-card {
|
|
722
|
+
display: flex;
|
|
723
|
+
flex-direction: column;
|
|
724
|
+
gap: 5px;
|
|
725
|
+
padding: 6px;
|
|
726
|
+
border-radius: 5px;
|
|
727
|
+
border: 1px solid #E3E5EA;
|
|
728
|
+
background: #F9FAFB;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.univer-pdf-layer-row {
|
|
732
|
+
display: flex;
|
|
733
|
+
align-items: center;
|
|
734
|
+
gap: 3px;
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
.univer-pdf-layer-icon-btn {
|
|
738
|
+
border: 1px solid #E3E5EA;
|
|
739
|
+
background: #FFFFFF;
|
|
740
|
+
color: #4E5565;
|
|
741
|
+
border-radius: 4px;
|
|
742
|
+
width: 22px;
|
|
743
|
+
height: 22px;
|
|
744
|
+
padding: 0;
|
|
745
|
+
display: inline-flex;
|
|
746
|
+
align-items: center;
|
|
747
|
+
justify-content: center;
|
|
748
|
+
cursor: pointer;
|
|
749
|
+
flex-shrink: 0;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.univer-pdf-layer-icon-btn.is-on {
|
|
753
|
+
color: #2C53F1;
|
|
754
|
+
border-color: #D2DAFA;
|
|
755
|
+
background: #F3F5FF;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
.univer-pdf-layer-icon-btn.is-off {
|
|
759
|
+
color: #9CA3AF;
|
|
760
|
+
opacity: 0.75;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
.univer-pdf-layer-icon-btn.is-locked {
|
|
764
|
+
color: #D97706;
|
|
765
|
+
border-color: #FDE68A;
|
|
766
|
+
background: #FFFBEB;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
.univer-pdf-layer-name {
|
|
770
|
+
flex: 1;
|
|
771
|
+
min-width: 0;
|
|
772
|
+
font-size: 11px;
|
|
773
|
+
font-weight: 500;
|
|
774
|
+
color: #1B1C1F;
|
|
775
|
+
overflow: hidden;
|
|
776
|
+
text-overflow: ellipsis;
|
|
777
|
+
white-space: nowrap;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
.univer-pdf-layer-name.is-muted {
|
|
781
|
+
color: #9CA3AF;
|
|
782
|
+
text-decoration: line-through;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/* Floating Find & Replace Bar & Canvas Match Highlight */
|
|
786
|
+
.univer-pdf-find-replace-bar {
|
|
787
|
+
position: absolute;
|
|
788
|
+
top: 10px;
|
|
789
|
+
right: 14px;
|
|
790
|
+
z-index: 68;
|
|
791
|
+
background: #FFFFFF;
|
|
792
|
+
border: 1px solid #D5D8DF;
|
|
793
|
+
border-radius: 8px;
|
|
794
|
+
padding: 6px 8px;
|
|
795
|
+
box-shadow: 0 6px 20px rgba(27, 28, 31, 0.14);
|
|
796
|
+
display: flex;
|
|
797
|
+
flex-direction: column;
|
|
798
|
+
gap: 6px;
|
|
799
|
+
min-width: 320px;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
.univer-pdf-find-row,
|
|
803
|
+
.univer-pdf-replace-row {
|
|
804
|
+
display: flex;
|
|
805
|
+
align-items: center;
|
|
806
|
+
gap: 4px;
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.univer-pdf-find-input {
|
|
810
|
+
flex: 1;
|
|
811
|
+
min-width: 110px;
|
|
812
|
+
border: 1px solid #D5D8DF;
|
|
813
|
+
border-radius: 4px;
|
|
814
|
+
padding: 4px 7px;
|
|
815
|
+
font-size: 11.5px;
|
|
816
|
+
color: #1B1C1F;
|
|
817
|
+
background: #FFFFFF;
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
.univer-pdf-find-input:focus {
|
|
821
|
+
outline: none;
|
|
822
|
+
border-color: #2C53F1;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.univer-pdf-find-icon-btn {
|
|
826
|
+
border: 1px solid #E3E5EA;
|
|
827
|
+
background: #FFFFFF;
|
|
828
|
+
color: #4E5565;
|
|
829
|
+
border-radius: 4px;
|
|
830
|
+
min-width: 24px;
|
|
831
|
+
height: 24px;
|
|
832
|
+
padding: 0 5px;
|
|
833
|
+
font-size: 11px;
|
|
834
|
+
font-weight: 600;
|
|
835
|
+
cursor: pointer;
|
|
836
|
+
display: inline-flex;
|
|
837
|
+
align-items: center;
|
|
838
|
+
justify-content: center;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
.univer-pdf-find-icon-btn:hover:not(:disabled) {
|
|
842
|
+
border-color: #D2DAFA;
|
|
843
|
+
color: #2C53F1;
|
|
844
|
+
background: #F3F5FF;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
.univer-pdf-find-icon-btn.is-active {
|
|
848
|
+
border-color: #2C53F1;
|
|
849
|
+
background: #F3F5FF;
|
|
850
|
+
color: #2C53F1;
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
.univer-pdf-find-icon-btn:disabled {
|
|
854
|
+
opacity: 0.42;
|
|
855
|
+
cursor: not-allowed;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
.univer-pdf-find-counter {
|
|
859
|
+
font-size: 11px;
|
|
860
|
+
color: #4E5565;
|
|
861
|
+
white-space: nowrap;
|
|
862
|
+
padding: 0 4px;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.univer-pdf-find-feedback {
|
|
866
|
+
font-size: 10.5px;
|
|
867
|
+
color: #2C53F1;
|
|
868
|
+
background: #F3F5FF;
|
|
869
|
+
border-radius: 4px;
|
|
870
|
+
padding: 3px 6px;
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
.univer-pdf-search-highlight-box {
|
|
874
|
+
position: absolute;
|
|
875
|
+
border: 2px solid #F59E0B;
|
|
876
|
+
background: rgba(250, 204, 21, 0.34);
|
|
877
|
+
box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18);
|
|
878
|
+
border-radius: 3px;
|
|
879
|
+
pointer-events: none;
|
|
880
|
+
z-index: 42;
|
|
881
|
+
box-sizing: border-box;
|
|
882
|
+
}
|
|
883
|
+
|
|
599
884
|
.univer-pdf-dataset-tip {
|
|
600
885
|
font-size: 11px;
|
|
601
886
|
color: #4E5565;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _univerjs_core from '@univerjs/core';
|
|
2
2
|
import { Disposable, ICommandService, IOperation, Plugin, Injector, UniverInstanceType } from '@univerjs/core';
|
|
3
3
|
import { IMenuManagerService, IUIPartsService, ISidebarService, ComponentManager, IconManager } from '@univerjs/ui';
|
|
4
|
-
import { PdfElementType, IPdfjsAssetsConfig, IPdfExportOptions, PdfIoTarget, PdfInteractionMode, PdfDisplayUnit, IPdfImportOutcome, IPdfPageSize, IPdfImportOutcomeReport, IPdfIoService, IPdfIoCapabilities } from '@yudaocode/univer-pdfs';
|
|
4
|
+
import { PdfElementType, IPdfjsAssetsConfig, IPdfExportOptions, PdfIoTarget, PdfInteractionMode, PdfDisplayUnit, IPdfImportOutcome, IPdfPageSize, IPdfUnitData, IPdfBookmarkItem, IPdfImportOutcomeReport, IPdfIoService, IPdfIoCapabilities } from '@yudaocode/univer-pdfs';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
export { default as PdfsUIEnUS } from './locale/en-US.js';
|
|
7
7
|
export { IPdfsUILocale, default as PdfsUIZhCN } from './locale/zh-CN.js';
|
|
@@ -221,9 +221,15 @@ declare const PrintPdfOperation: IOperation<IPrintPdfOperationParams, Promise<bo
|
|
|
221
221
|
declare const SetPdfInteractionModeOperation: IOperation<{
|
|
222
222
|
mode: PdfInteractionMode;
|
|
223
223
|
}>;
|
|
224
|
-
|
|
224
|
+
interface ISelectActivePdfPageOperationParams {
|
|
225
225
|
pageId: string;
|
|
226
|
-
|
|
226
|
+
topPt?: number;
|
|
227
|
+
}
|
|
228
|
+
declare const SelectActivePdfPageOperation: IOperation<ISelectActivePdfPageOperationParams>;
|
|
229
|
+
interface ITogglePdfFindReplaceOperationParams {
|
|
230
|
+
open?: boolean;
|
|
231
|
+
}
|
|
232
|
+
declare const TogglePdfFindReplaceOperation: IOperation<ITogglePdfFindReplaceOperationParams>;
|
|
227
233
|
declare const SetPdfInkColorOperation: IOperation<{
|
|
228
234
|
color: string;
|
|
229
235
|
}>;
|
|
@@ -273,17 +279,47 @@ declare function renderSourcePdfPageToCanvas(canvas: HTMLCanvasElement, dataUri:
|
|
|
273
279
|
|
|
274
280
|
declare const PdfCanvasView: React.FC;
|
|
275
281
|
|
|
282
|
+
interface IPdfFindMatchItem {
|
|
283
|
+
key: string;
|
|
284
|
+
kind: 'element' | 'nativeSpan';
|
|
285
|
+
pageId: string;
|
|
286
|
+
pageIndex: number;
|
|
287
|
+
id: string;
|
|
288
|
+
occurrenceIndex: number;
|
|
289
|
+
matchedText: string;
|
|
290
|
+
left: number;
|
|
291
|
+
top: number;
|
|
292
|
+
width: number;
|
|
293
|
+
height: number;
|
|
294
|
+
replaceable: boolean;
|
|
295
|
+
}
|
|
296
|
+
declare function collectPdfFindMatches(snapshot: IPdfUnitData | null | undefined, query: string, matchCase: boolean): IPdfFindMatchItem[];
|
|
297
|
+
interface IPdfFindReplaceBarProps {
|
|
298
|
+
defaultExpandReplace?: boolean;
|
|
299
|
+
}
|
|
300
|
+
declare const PdfFindReplaceBar: React.FC<IPdfFindReplaceBarProps>;
|
|
301
|
+
|
|
276
302
|
declare const PdfStatusBar: React.FC;
|
|
277
303
|
|
|
278
304
|
declare const PdfInspectorPanel: React.FC;
|
|
279
305
|
|
|
280
|
-
|
|
306
|
+
type PdfLeftSidebarTab = 'pages' | 'bookmarks' | 'layers' | 'datasets';
|
|
307
|
+
declare function countBookmarkTreeItems(items: IPdfBookmarkItem[]): number;
|
|
308
|
+
declare function appendChildBookmarkToTree(tree: IPdfBookmarkItem[], parentId: string, child: IPdfBookmarkItem): IPdfBookmarkItem[];
|
|
309
|
+
declare function patchBookmarkInTree(tree: IPdfBookmarkItem[], targetId: string, patch: Partial<Omit<IPdfBookmarkItem, 'id' | 'children'>>): IPdfBookmarkItem[];
|
|
310
|
+
declare function reorderBookmarkInTree(tree: IPdfBookmarkItem[], targetId: string, delta: -1 | 1): IPdfBookmarkItem[];
|
|
311
|
+
declare function deleteBookmarkFromTree(tree: IPdfBookmarkItem[], targetId: string): IPdfBookmarkItem[];
|
|
312
|
+
interface IPdfLeftSidebarProps {
|
|
313
|
+
initialTab?: PdfLeftSidebarTab;
|
|
314
|
+
}
|
|
315
|
+
declare const PdfLeftSidebar: React.FC<IPdfLeftSidebarProps>;
|
|
281
316
|
|
|
282
317
|
interface IPdfModalIoErrorState {
|
|
283
318
|
operation: 'import' | 'export' | 'preview';
|
|
284
319
|
message: string;
|
|
285
320
|
failedTarget: 'browser' | 'server';
|
|
286
321
|
fallbackTarget: 'browser' | 'server';
|
|
322
|
+
requiresPassword?: boolean;
|
|
287
323
|
}
|
|
288
324
|
declare function resolveInitialModalIoTarget(caps: IPdfIoCapabilities, tab?: PdfModalTabMode): 'browser' | 'server';
|
|
289
325
|
interface IStagedImportSeqRef {
|
|
@@ -293,6 +329,7 @@ declare function executeGuardedStagedImport(params: {
|
|
|
293
329
|
file: File;
|
|
294
330
|
unitId: string;
|
|
295
331
|
target: 'browser' | 'server';
|
|
332
|
+
password?: string;
|
|
296
333
|
ioService: IPdfIoService;
|
|
297
334
|
importReqSeqRef: IStagedImportSeqRef;
|
|
298
335
|
importAbortRef?: {
|
|
@@ -319,6 +356,7 @@ interface IPdfUnifiedIoSectionProps {
|
|
|
319
356
|
selectedFileName?: string;
|
|
320
357
|
pendingImport: IPdfImportOutcomeReport | null;
|
|
321
358
|
ioError: IPdfModalIoErrorState | null;
|
|
359
|
+
importPassword?: string;
|
|
322
360
|
fileInputRef: React.RefObject<HTMLInputElement | null>;
|
|
323
361
|
onSelectTarget: (target: 'browser' | 'server') => void;
|
|
324
362
|
onFileInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -326,8 +364,10 @@ interface IPdfUnifiedIoSectionProps {
|
|
|
326
364
|
onConfirmImport: () => void;
|
|
327
365
|
onCancelImport: () => void;
|
|
328
366
|
onSwitchAndRetry: () => void;
|
|
367
|
+
onImportPasswordChange?: (password: string) => void;
|
|
368
|
+
onUnlockAndRetry?: () => void;
|
|
329
369
|
}
|
|
330
370
|
declare const PdfUnifiedIoSection: React.FC<IPdfUnifiedIoSectionProps>;
|
|
331
371
|
declare const PdfPreviewModal: React.FC;
|
|
332
372
|
|
|
333
|
-
export { ALL_PDF_IO_MODAL_TABS, AdjustPdfZoomOperation, type IOpenPdfPreviewOperationParams, type IPdfIoModalConfig, type IPdfModalIoErrorState, type IPdfUnifiedIoSectionProps, IPdfsUIFeatureService, type IPrintPdfOperationParams, type IReportWidgetsConfig, type IResolvedPdfIoModalConfig, type IResolvedPdfsUIFeatures, type IStagedImportSeqRef, type IUniverPdfsUIConfig, type IUniverPdfsUIEditorConfig, type IUniverPdfsUIFeatures, type IUploadBasePdfOperationParams, InsertPdfPresetElementOperation, OpenPdfPreviewOperation, PDF_INSPECTOR_COMPONENT_KEY, PDF_INSPECTOR_SIDEBAR_ID, PdfCanvasView, PdfInspectorPanel, PdfInspectorPanel as PdfInspectorSidebar, PdfLeftSidebar, type PdfModalTabMode, PdfPreviewModal, type PdfShapeKind, PdfStatusBar, PdfUnifiedIoSection, PdfsUIController, PdfsUIFeatureService, PrintPdfOperation, SavePdfToHostOperation, SelectActivePdfPageOperation, SetPdfInkColorOperation, SetPdfInteractionModeOperation, SwitchPdfDisplayUnitOperation, TogglePdfCalibrationGridOperation, TogglePdfGridOperation, TogglePdfInspectorOperation, TogglePdfMarginsOperation, TogglePdfRulerOperation, TogglePdfSnapOperation, UNIVER_PDFS_UI_PLUGIN_NAME, UniverPdfsUIPlugin, UpdatePdfUIFeaturesOperation, UploadBasePdfOperation, applyStagedPdfImportToUnit, clampPdfModalTab, clearPdfDocumentCache, computePdfDocumentCacheKey, configurePdfjsAssets, executeGuardedStagedImport, getPdfjsAssetsConfig, inspectSourcePdfPages, isPdfElementTypeAllowed, isPdfShapeTypeAllowed, openPdfInspectorSidebar, readBrowserFileAsOverlayOutcome, renderSourcePdfPageToCanvas, resolveInitialModalIoTarget, resolvePdfIoModalConfig, resolvePdfsUIFeatures };
|
|
373
|
+
export { ALL_PDF_IO_MODAL_TABS, AdjustPdfZoomOperation, type IOpenPdfPreviewOperationParams, type IPdfFindMatchItem, type IPdfFindReplaceBarProps, type IPdfIoModalConfig, type IPdfLeftSidebarProps, type IPdfModalIoErrorState, type IPdfUnifiedIoSectionProps, IPdfsUIFeatureService, type IPrintPdfOperationParams, type IReportWidgetsConfig, type IResolvedPdfIoModalConfig, type IResolvedPdfsUIFeatures, type ISelectActivePdfPageOperationParams, type IStagedImportSeqRef, type ITogglePdfFindReplaceOperationParams, type IUniverPdfsUIConfig, type IUniverPdfsUIEditorConfig, type IUniverPdfsUIFeatures, type IUploadBasePdfOperationParams, InsertPdfPresetElementOperation, OpenPdfPreviewOperation, PDF_INSPECTOR_COMPONENT_KEY, PDF_INSPECTOR_SIDEBAR_ID, PdfCanvasView, PdfFindReplaceBar, PdfInspectorPanel, PdfInspectorPanel as PdfInspectorSidebar, PdfLeftSidebar, type PdfLeftSidebarTab, type PdfModalTabMode, PdfPreviewModal, type PdfShapeKind, PdfStatusBar, PdfUnifiedIoSection, PdfsUIController, PdfsUIFeatureService, PrintPdfOperation, SavePdfToHostOperation, SelectActivePdfPageOperation, SetPdfInkColorOperation, SetPdfInteractionModeOperation, SwitchPdfDisplayUnitOperation, TogglePdfCalibrationGridOperation, TogglePdfFindReplaceOperation, TogglePdfGridOperation, TogglePdfInspectorOperation, TogglePdfMarginsOperation, TogglePdfRulerOperation, TogglePdfSnapOperation, UNIVER_PDFS_UI_PLUGIN_NAME, UniverPdfsUIPlugin, UpdatePdfUIFeaturesOperation, UploadBasePdfOperation, appendChildBookmarkToTree, applyStagedPdfImportToUnit, clampPdfModalTab, clearPdfDocumentCache, collectPdfFindMatches, computePdfDocumentCacheKey, configurePdfjsAssets, countBookmarkTreeItems, deleteBookmarkFromTree, executeGuardedStagedImport, getPdfjsAssetsConfig, inspectSourcePdfPages, isPdfElementTypeAllowed, isPdfShapeTypeAllowed, openPdfInspectorSidebar, patchBookmarkInTree, readBrowserFileAsOverlayOutcome, renderSourcePdfPageToCanvas, reorderBookmarkInTree, resolveInitialModalIoTarget, resolvePdfIoModalConfig, resolvePdfsUIFeatures };
|
|
@@ -33,6 +33,7 @@ declare const locale: {
|
|
|
33
33
|
importPdf: string;
|
|
34
34
|
jsonExchange: string;
|
|
35
35
|
inspector: string;
|
|
36
|
+
findReplace: string;
|
|
36
37
|
previewPdf: string;
|
|
37
38
|
printPdf: string;
|
|
38
39
|
toggleRuler: string;
|
|
@@ -46,6 +47,8 @@ declare const locale: {
|
|
|
46
47
|
};
|
|
47
48
|
sidebar: {
|
|
48
49
|
pagesTab: string;
|
|
50
|
+
bookmarksTab: string;
|
|
51
|
+
layersTab: string;
|
|
49
52
|
datasetsTab: string;
|
|
50
53
|
addPage: string;
|
|
51
54
|
deletePage: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yudaocode/univer-pdfs-ui",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.218",
|
|
4
4
|
"description": "Univer PDFs UI plugin with native Univer Ribbon, Left Thumbnail Sidebar, Canvas Designer, and Inspector Sidebar",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/yudaocode/yudao-univer#readme",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"react": ">=18.0.0",
|
|
62
62
|
"react-dom": ">=18.0.0",
|
|
63
63
|
"rxjs": ">=7.0.0",
|
|
64
|
-
"@yudaocode/univer-pdfs": "^1.6.
|
|
64
|
+
"@yudaocode/univer-pdfs": "^1.6.218"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@univerjs/core": "1.6.2",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"react": "^18.3.1",
|
|
73
73
|
"react-dom": "^18.3.1",
|
|
74
74
|
"rxjs": "^7.8.1",
|
|
75
|
-
"@yudaocode/univer-pdfs": "1.6.
|
|
75
|
+
"@yudaocode/univer-pdfs": "1.6.218"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"build": "tsup",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/locale/zh-CN.ts"],"sourcesContent":["const locale = {\n pdfs: {\n ribbon: {\n annotateTab: '批注',\n selectMode: '选择模式',\n panMode: '抓手平移',\n inkMode: '自由画笔',\n highlight: '荧光高亮',\n underlineMark: '下划线标记',\n strikeMark: '删除线标记',\n insertText: '文本框',\n insertParagraph: '多行段落',\n insertList: '项目列表',\n insertDivider: '分割线',\n insertImage: '图片',\n insertStaticTable: '表格',\n insertTable: '动态表格',\n insertQrCode: '二维码',\n insertBarcode: '条形码',\n insertShape: '矩形/椭圆',\n insertStamp: '电子签章',\n addPage: '新建页面',\n alignLeft: '左对齐',\n alignCenter: '水平居中',\n alignRight: '右对齐',\n alignTop: '顶对齐',\n alignMiddle: '垂直居中',\n alignBottom: '底对齐',\n distributeH: '水平等距分布',\n distributeV: '垂直等距分布',\n duplicate: '复制元素',\n delete: '删除元素',\n importPdf: '导入PDF底图',\n jsonExchange: 'JSON / pdfme',\n inspector: '属性与绑定',\n previewPdf: '预览/导出PDF',\n printPdf: '打印PDF',\n toggleRuler: '标尺',\n toggleGrid: '网格',\n toggleMargins: '页边距线',\n toggleSnap: '磁吸对齐',\n switchUnit: '切换 mm/pt',\n zoomIn: '放大',\n zoomOut: '缩小',\n zoomReset: '100%',\n },\n sidebar: {\n pagesTab: '页面',\n datasetsTab: '数据集',\n addPage: '新增页',\n deletePage: '删除页',\n inspectorTitle: 'PDF 属性与数据绑定',\n docProps: '文档与纸张设置',\n elementProps: '元素样式与数据绑定',\n },\n statusbar: {\n page: '页码',\n elements: '元素',\n ruler: '标尺',\n grid: '网格',\n margins: '边距',\n snap: '磁吸',\n fitWidth: '100%',\n },\n },\n};\n\nexport default locale;\nexport type IPdfsUILocale = typeof locale;\n"],"mappings":";AAAA,IAAM,SAAS;AAAA,EACb,MAAM;AAAA,IACJ,QAAQ;AAAA,MACN,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,SAAS;AAAA,MACT,WAAW;AAAA,MACX,eAAe;AAAA,MACf,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,aAAa;AAAA,MACb,mBAAmB;AAAA,MACnB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,eAAe;AAAA,MACf,aAAa;AAAA,MACb,aAAa;AAAA,MACb,SAAS;AAAA,MACT,WAAW;AAAA,MACX,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,aAAa;AAAA,MACb,aAAa;AAAA,MACb,aAAa;AAAA,MACb,aAAa;AAAA,MACb,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,cAAc;AAAA,MACd,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,WAAW;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACP,UAAU;AAAA,MACV,aAAa;AAAA,MACb,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,cAAc;AAAA,IAChB;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,IACZ;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/locale/en-US.ts"],"sourcesContent":["import type { IPdfsUILocale } from './zh-CN';\n\nconst locale: IPdfsUILocale = {\n pdfs: {\n ribbon: {\n annotateTab: 'Annotate',\n selectMode: 'Select Mode',\n panMode: 'Hand Pan',\n inkMode: 'Freehand Ink',\n highlight: 'Highlight',\n underlineMark: 'Underline Markup',\n strikeMark: 'Strikethrough',\n insertText: 'Text Box',\n insertParagraph: 'Paragraph',\n insertList: 'List',\n insertDivider: 'Divider',\n insertImage: 'Image',\n insertStaticTable: 'Table',\n insertTable: 'Dynamic Table',\n insertQrCode: 'QR Code',\n insertBarcode: 'Barcode',\n insertShape: 'Shape',\n insertStamp: 'Official Stamp',\n addPage: 'New Page',\n alignLeft: 'Align Left',\n alignCenter: 'Align Center',\n alignRight: 'Align Right',\n alignTop: 'Align Top',\n alignMiddle: 'Align Middle',\n alignBottom: 'Align Bottom',\n distributeH: 'Distribute Horizontally',\n distributeV: 'Distribute Vertically',\n duplicate: 'Duplicate',\n delete: 'Delete',\n importPdf: 'Import Base PDF',\n jsonExchange: 'JSON / pdfme',\n inspector: 'Inspector',\n previewPdf: 'Preview / Export PDF',\n printPdf: 'Print PDF',\n toggleRuler: 'Ruler',\n toggleGrid: 'Grid',\n toggleMargins: 'Margins',\n toggleSnap: 'Snap Guides',\n switchUnit: 'Toggle mm/pt',\n zoomIn: 'Zoom In',\n zoomOut: 'Zoom Out',\n zoomReset: '100%',\n },\n sidebar: {\n pagesTab: 'Pages',\n datasetsTab: 'Datasets',\n addPage: 'Add Page',\n deletePage: 'Delete',\n inspectorTitle: 'PDF Properties & Binding',\n docProps: 'Document & Paper Settings',\n elementProps: 'Element Style & Data Binding',\n },\n statusbar: {\n page: 'Page',\n elements: 'Elements',\n ruler: 'Ruler',\n grid: 'Grid',\n margins: 'Margins',\n snap: 'Snap',\n fitWidth: '100%',\n },\n },\n};\n\nexport default locale;\n"],"mappings":";AAEA,IAAM,SAAwB;AAAA,EAC5B,MAAM;AAAA,IACJ,QAAQ;AAAA,MACN,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,SAAS;AAAA,MACT,WAAW;AAAA,MACX,eAAe;AAAA,MACf,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,aAAa;AAAA,MACb,mBAAmB;AAAA,MACnB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,eAAe;AAAA,MACf,aAAa;AAAA,MACb,aAAa;AAAA,MACb,SAAS;AAAA,MACT,WAAW;AAAA,MACX,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,aAAa;AAAA,MACb,aAAa;AAAA,MACb,aAAa;AAAA,MACb,aAAa;AAAA,MACb,WAAW;AAAA,MACX,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,cAAc;AAAA,MACd,WAAW;AAAA,MACX,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,WAAW;AAAA,IACb;AAAA,IACA,SAAS;AAAA,MACP,UAAU;AAAA,MACV,aAAa;AAAA,MACb,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,UAAU;AAAA,MACV,cAAc;AAAA,IAChB;AAAA,IACA,WAAW;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,MACV,OAAO;AAAA,MACP,MAAM;AAAA,MACN,SAAS;AAAA,MACT,MAAM;AAAA,MACN,UAAU;AAAA,IACZ;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":[]}
|