@hybridcore/ui 1.5.41 → 1.5.42

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.
@@ -1,48 +1,51 @@
1
- import { jsxs as i, jsx as o, Fragment as h } from "react/jsx-runtime";
2
- import { Box as n, AppBar as d, Toolbar as l } from "@mui/material";
3
- import { ActionButtons as c } from "./components/action-buttons/index.js";
1
+ import { jsxs as r, jsx as o, Fragment as h } from "react/jsx-runtime";
2
+ import { Box as t, AppBar as c, Toolbar as l } from "@mui/material";
3
+ import { ActionButtons as d } from "./components/action-buttons/index.js";
4
4
  import m from "./components/viewer/index.js";
5
5
  import { useDocumentViewerLogic as g } from "./logic.js";
6
- import { SidePanelToggleButton as s, SidePanel as f } from "./styled.js";
7
- import { DoubleArrow as u } from "@mui/icons-material";
8
- const S = (r) => {
9
- const { refs: a, state: e, action: t } = g(r);
10
- return /* @__PURE__ */ i(n, { bgcolor: "#ededed", children: [
11
- /* @__PURE__ */ o(d, { color: "inherit", children: /* @__PURE__ */ i(l, { sx: { justifyContent: "space-between" }, children: [
12
- /* @__PURE__ */ o(n, { children: r.logo }),
13
- /* @__PURE__ */ o(n, {}),
14
- /* @__PURE__ */ o(n, { children: /* @__PURE__ */ o(
15
- c,
6
+ import { SidePanelToggleButton as s, SidePanel as u } from "./styled.js";
7
+ import { DoubleArrow as f } from "@mui/icons-material";
8
+ const S = (e) => {
9
+ const { refs: a, state: n, action: i } = g(e);
10
+ return /* @__PURE__ */ r(t, { bgcolor: "#ededed", children: [
11
+ /* @__PURE__ */ o(c, { color: "inherit", children: /* @__PURE__ */ r(l, { sx: { justifyContent: "space-between" }, children: [
12
+ /* @__PURE__ */ o(t, { children: e.logo }),
13
+ /* @__PURE__ */ o(t, {}),
14
+ /* @__PURE__ */ o(t, { children: /* @__PURE__ */ o(
15
+ d,
16
16
  {
17
- onBookmark: r.onBookmark,
18
- onDownload: t.onDownload,
19
- onFullScreen: t.onFullScreen,
20
- onPrint: t.onPrint
17
+ onBookmark: e.onBookmark,
18
+ onDownload: i.onDownload,
19
+ onFullScreen: i.onFullScreen,
20
+ onPrint: i.onPrint
21
21
  }
22
22
  ) })
23
23
  ] }) }),
24
24
  /* @__PURE__ */ o(l, {}),
25
- /* @__PURE__ */ o(n, { mr: `${e.rightPanelWidth}px`, sx: { transition: "all .3s" }, children: e.blob ? /* @__PURE__ */ o(m, { ref: a.viewer, data: e.blob }) : null }),
26
- r.rightPanel ? /* @__PURE__ */ i(h, { children: [
25
+ /* @__PURE__ */ r(t, { mr: `${n.rightPanelWidth}px`, sx: { transition: "all .3s" }, children: [
26
+ n.blob ? /* @__PURE__ */ o(m, { ref: a.viewer, data: n.blob }) : null,
27
+ e.customContent
28
+ ] }),
29
+ e.rightPanel ? /* @__PURE__ */ r(h, { children: [
27
30
  /* @__PURE__ */ o(
28
31
  s,
29
32
  {
30
- sx: { right: e.rightPanelWidth },
31
- onClick: t.toggleRightPanel,
33
+ sx: { right: n.rightPanelWidth },
34
+ onClick: i.toggleRightPanel,
32
35
  children: /* @__PURE__ */ o(
33
- u,
36
+ f,
34
37
  {
35
38
  sx: {
36
39
  fontSize: 14,
37
- transform: `rotate(${e.rightPanelWidth ? 0 : 180}deg)`
40
+ transform: `rotate(${n.rightPanelWidth ? 0 : 180}deg)`
38
41
  }
39
42
  }
40
43
  )
41
44
  }
42
45
  ),
43
- /* @__PURE__ */ i(f, { width: e.rightPanelWidth, right: 0, children: [
46
+ /* @__PURE__ */ r(u, { width: n.rightPanelWidth, right: 0, children: [
44
47
  /* @__PURE__ */ o(l, {}),
45
- r.rightPanel
48
+ e.rightPanel
46
49
  ] })
47
50
  ] }) : null
48
51
  ] });
package/dist/main.d.ts CHANGED
@@ -218,6 +218,7 @@ declare interface DocumentViewerProps {
218
218
  data: string; // Base64
219
219
  logo: default_2.ReactNode;
220
220
  title: string;
221
+ customContent?: default_2.ReactNode;
221
222
  rightPanel?: default_2.ReactNode;
222
223
  rightPanelWidth?: number;
223
224
  onBookmark(): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.5.41",
4
+ "version": "1.5.42",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",