@papyrus-sdk/ui-react 0.2.17 → 0.2.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.
- package/base.css +116 -48
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8,6 +8,7 @@ var Topbar = ({
|
|
|
8
8
|
showBrand = false,
|
|
9
9
|
brand,
|
|
10
10
|
title,
|
|
11
|
+
style,
|
|
11
12
|
showSidebarLeftToggle = true,
|
|
12
13
|
showPageControls = true,
|
|
13
14
|
showZoomControls = true,
|
|
@@ -354,6 +355,7 @@ var Topbar = ({
|
|
|
354
355
|
{
|
|
355
356
|
"data-papyrus-theme": uiTheme,
|
|
356
357
|
className: `papyrus-topbar papyrus-theme relative h-14 border-b flex items-center px-3 sm:px-4 z-50 transition-colors duration-200 ${isDark ? "bg-[#1a1a1a] border-[#333] text-white" : "bg-white border-gray-200 text-gray-800"}`,
|
|
358
|
+
style,
|
|
357
359
|
children: [
|
|
358
360
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0 z-10", children: [
|
|
359
361
|
showSidebarLeftToggle && /* @__PURE__ */ jsx(
|
|
@@ -886,7 +888,7 @@ var OutlineNode = ({ item, engine, isDark, accentColor, depth = 0 }) => {
|
|
|
886
888
|
)) })
|
|
887
889
|
] });
|
|
888
890
|
};
|
|
889
|
-
var SidebarLeft = ({ engine }) => {
|
|
891
|
+
var SidebarLeft = ({ engine, style }) => {
|
|
890
892
|
const {
|
|
891
893
|
pageCount,
|
|
892
894
|
currentPage,
|
|
@@ -908,6 +910,7 @@ var SidebarLeft = ({ engine }) => {
|
|
|
908
910
|
{
|
|
909
911
|
"data-papyrus-theme": uiTheme,
|
|
910
912
|
className: `papyrus-sidebar-left papyrus-theme absolute left-0 top-0 bottom-0 z-[120] w-[85vw] max-w-72 border-r flex flex-col h-full overflow-hidden transition-colors duration-200 ${isDark ? "bg-[#2a2a2a] border-[#3a3a3a]" : "bg-[#fcfcfc] border-gray-200"}`,
|
|
913
|
+
style,
|
|
911
914
|
children: [
|
|
912
915
|
/* @__PURE__ */ jsxs2(
|
|
913
916
|
"div",
|
|
@@ -1048,7 +1051,7 @@ var withAlpha2 = (hex, alpha) => {
|
|
|
1048
1051
|
const b = parseInt(value.slice(4, 6), 16);
|
|
1049
1052
|
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
1050
1053
|
};
|
|
1051
|
-
var SidebarRight = ({ engine }) => {
|
|
1054
|
+
var SidebarRight = ({ engine, style }) => {
|
|
1052
1055
|
const {
|
|
1053
1056
|
sidebarRightOpen,
|
|
1054
1057
|
sidebarRightTab,
|
|
@@ -1085,6 +1088,7 @@ var SidebarRight = ({ engine }) => {
|
|
|
1085
1088
|
{
|
|
1086
1089
|
"data-papyrus-theme": uiTheme,
|
|
1087
1090
|
className: `papyrus-sidebar-right papyrus-theme absolute right-0 top-0 bottom-0 z-[120] w-[88vw] max-w-80 border-l flex flex-col h-full transition-colors duration-200 shadow-2xl ${isDark ? "bg-[#1a1a1a] border-[#333]" : "bg-white border-gray-200"}`,
|
|
1091
|
+
style,
|
|
1088
1092
|
children: [
|
|
1089
1093
|
/* @__PURE__ */ jsxs3(
|
|
1090
1094
|
"div",
|
|
@@ -2079,7 +2083,7 @@ var MIN_ZOOM = 0.2;
|
|
|
2079
2083
|
var MAX_ZOOM = 5;
|
|
2080
2084
|
var WIDTH_SNAP_PX = 4;
|
|
2081
2085
|
var WIDTH_HYSTERESIS_PX = 6;
|
|
2082
|
-
var Viewer = ({ engine }) => {
|
|
2086
|
+
var Viewer = ({ engine, style }) => {
|
|
2083
2087
|
const {
|
|
2084
2088
|
pageCount,
|
|
2085
2089
|
currentPage,
|
|
@@ -2422,6 +2426,7 @@ var Viewer = ({ engine }) => {
|
|
|
2422
2426
|
onTouchEnd: handleTouchEnd,
|
|
2423
2427
|
onTouchCancel: handleTouchEnd,
|
|
2424
2428
|
className: `papyrus-viewer papyrus-theme min-w-0 w-full flex-1 overflow-y-scroll overflow-x-hidden flex flex-col items-center ${paddingY} relative custom-scrollbar scroll-smooth ${isDark ? "bg-[#121212]" : "bg-[#e9ecef]"}`,
|
|
2429
|
+
style,
|
|
2425
2430
|
children: [
|
|
2426
2431
|
/* @__PURE__ */ jsx5("div", { className: "flex flex-col items-center gap-6 w-full min-w-0", children: pages.map((idx) => /* @__PURE__ */ jsx5(
|
|
2427
2432
|
"div",
|