@papyrus-sdk/ui-react 0.2.8 → 0.2.10
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/README.md +3 -1
- package/base.css +34 -0
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +30351 -236
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30370 -236
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -86,10 +86,12 @@ Props:
|
|
|
86
86
|
| `showBrand` | `boolean` | `true` | Show the PapyrusCore brand. |
|
|
87
87
|
| `brand` | `ReactNode` | `undefined` | Replace the brand area with custom content. |
|
|
88
88
|
| `title` | `ReactNode` | `undefined` | Optional document title shown in the header. |
|
|
89
|
-
| `showSidebarLeftToggle` | `boolean` | `true` | Show the left sidebar toggle button. |
|
|
89
|
+
| `showSidebarLeftToggle` | `boolean` | `true` | Show the left sidebar (thumbnails/outline) toggle button. |
|
|
90
90
|
| `showPageControls` | `boolean` | `true` | Show page navigation controls. |
|
|
91
91
|
| `showZoomControls` | `boolean` | `true` | Show zoom controls. |
|
|
92
92
|
| `showPageThemeSelector` | `boolean` | `true` | Show page theme selector (normal/sepia/dark/contrast). |
|
|
93
93
|
| `showUIToggle` | `boolean` | `true` | Show light/dark toggle. |
|
|
94
94
|
| `showUpload` | `boolean` | `true` | Show upload button. |
|
|
95
95
|
| `showSearch` | `boolean` | `true` | Show search button. |
|
|
96
|
+
|
|
97
|
+
Tip: use `sidebarLeftOpen` in `PapyrusConfig` to set whether the thumbnails/outline sidebar starts open. The Topbar toggle (`showSidebarLeftToggle`) and `useViewerStore.getState().toggleSidebarLeft()` let you open/close it from UI controls.
|
package/base.css
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
--papyrus-hover: #e5e7eb;
|
|
13
13
|
--papyrus-popover: #ffffff;
|
|
14
14
|
--papyrus-shadow: rgba(15, 23, 42, 0.08);
|
|
15
|
+
--papyrus-selection-bg: rgba(30, 64, 175, 0.5);
|
|
15
16
|
color: var(--papyrus-text);
|
|
16
17
|
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
17
18
|
}
|
|
@@ -30,6 +31,7 @@
|
|
|
30
31
|
--papyrus-hover: rgba(255, 255, 255, 0.08);
|
|
31
32
|
--papyrus-popover: #1f1f1f;
|
|
32
33
|
--papyrus-shadow: rgba(0, 0, 0, 0.4);
|
|
34
|
+
--papyrus-selection-bg: rgba(96, 165, 250, 0.5);
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
.papyrus-topbar,
|
|
@@ -52,6 +54,16 @@
|
|
|
52
54
|
font-size: 14px;
|
|
53
55
|
}
|
|
54
56
|
|
|
57
|
+
@media (max-width: 720px) {
|
|
58
|
+
.papyrus-topbar {
|
|
59
|
+
flex-wrap: wrap;
|
|
60
|
+
height: auto;
|
|
61
|
+
min-height: 56px;
|
|
62
|
+
padding: 8px 12px;
|
|
63
|
+
row-gap: 8px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
55
67
|
.papyrus-sidebar-left,
|
|
56
68
|
.papyrus-sidebar-right {
|
|
57
69
|
display: flex;
|
|
@@ -93,6 +105,12 @@
|
|
|
93
105
|
transition: background 0.15s ease, border-color 0.15s ease;
|
|
94
106
|
}
|
|
95
107
|
|
|
108
|
+
.papyrus-unstyled-button {
|
|
109
|
+
background: transparent !important;
|
|
110
|
+
border: 0 !important;
|
|
111
|
+
padding: 0 !important;
|
|
112
|
+
}
|
|
113
|
+
|
|
96
114
|
.papyrus-topbar input,
|
|
97
115
|
.papyrus-sidebar-left input,
|
|
98
116
|
.papyrus-sidebar-right input,
|
|
@@ -141,3 +159,19 @@
|
|
|
141
159
|
display: flex;
|
|
142
160
|
justify-content: center;
|
|
143
161
|
}
|
|
162
|
+
|
|
163
|
+
.papyrus-viewer .textLayer ::selection {
|
|
164
|
+
background: var(--papyrus-selection-bg);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.papyrus-viewer .textLayer {
|
|
168
|
+
opacity: 1 !important;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.papyrus-viewer .textLayer mark.papyrus-search-hit {
|
|
172
|
+
background: rgba(250, 204, 21, 0.55);
|
|
173
|
+
box-shadow: 0 0 0 1px rgba(234, 179, 8, 0.35);
|
|
174
|
+
border-radius: 2px;
|
|
175
|
+
color: transparent;
|
|
176
|
+
padding: 0;
|
|
177
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -35,6 +35,10 @@ interface PageRendererProps {
|
|
|
35
35
|
engine: DocumentEngine;
|
|
36
36
|
pageIndex: number;
|
|
37
37
|
availableWidth?: number;
|
|
38
|
+
onMeasuredSize?: (pageIndex: number, size: {
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
}) => void;
|
|
38
42
|
}
|
|
39
43
|
declare const PageRenderer: React.FC<PageRendererProps>;
|
|
40
44
|
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,10 @@ interface PageRendererProps {
|
|
|
35
35
|
engine: DocumentEngine;
|
|
36
36
|
pageIndex: number;
|
|
37
37
|
availableWidth?: number;
|
|
38
|
+
onMeasuredSize?: (pageIndex: number, size: {
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
}) => void;
|
|
38
42
|
}
|
|
39
43
|
declare const PageRenderer: React.FC<PageRendererProps>;
|
|
40
44
|
|