pdf-tsx 0.1.6 → 0.2.0
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/LICENSE +21 -21
- package/README.md +263 -212
- package/dist/cjs/components/PDFSidebar.module.cjs +1 -1
- package/dist/cjs/components/PDFViewer.cjs +1 -1
- package/dist/cjs/components/PDFViewer.module.cjs +1 -1
- package/dist/cjs/components/features/PDFAnnotations.module.cjs +1 -1
- package/dist/cjs/components/features/PDFNavigation.module.cjs +1 -1
- package/dist/cjs/components/features/PDFOutline.module.cjs +1 -1
- package/dist/cjs/components/features/PDFSearch.module.cjs +1 -1
- package/dist/cjs/components/features/PDFSignatures.module.cjs +1 -1
- package/dist/cjs/components/features/PDFThumbnails.module.cjs +1 -1
- package/dist/cjs/components/features/PDFZoomControls.module.cjs +1 -1
- package/dist/cjs/components/ui/ToolbarButton.module.cjs +1 -1
- package/dist/cjs/context/ThemeContext.cjs +1 -1
- package/dist/cjs/hooks/useTextLayer.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/pdf-tsx.css +1 -1
- package/dist/components/PDFViewer.d.ts +5 -0
- package/dist/context/ThemeContext.d.ts +7 -2
- package/dist/es/components/PDFSidebar.module.js +7 -7
- package/dist/es/components/PDFViewer.js +165 -162
- package/dist/es/components/PDFViewer.module.js +15 -12
- package/dist/es/components/features/PDFAnnotations.module.js +10 -10
- package/dist/es/components/features/PDFNavigation.module.js +3 -3
- package/dist/es/components/features/PDFOutline.module.js +5 -5
- package/dist/es/components/features/PDFSearch.module.js +4 -4
- package/dist/es/components/features/PDFSignatures.module.js +14 -14
- package/dist/es/components/features/PDFThumbnails.module.js +7 -7
- package/dist/es/components/features/PDFZoomControls.module.js +1 -1
- package/dist/es/components/ui/ToolbarButton.module.js +2 -2
- package/dist/es/context/ThemeContext.js +31 -24
- package/dist/es/hooks/useTextLayer.js +0 -1
- package/dist/es/index.js +17 -16
- package/dist/es/pdf-tsx.css +1 -1
- package/dist/index.d.ts +2 -0
- package/package.json +61 -61
- package/dist/pdf-tsx.cjs.js +0 -5
- package/dist/pdf-tsx.css +0 -2
- package/dist/pdf-tsx.es.js +0 -2637
- package/dist/vite.svg +0 -1
|
@@ -5,31 +5,38 @@ import { jsx as s } from "react/jsx-runtime";
|
|
|
5
5
|
//#region src/context/ThemeContext.tsx
|
|
6
6
|
var c = r(null);
|
|
7
7
|
function l(r) {
|
|
8
|
-
let i = o(
|
|
9
|
-
i[0]
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
let v
|
|
19
|
-
i[6]
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
let i = o(17), { children: l, themeOverrides: d } = r, [f, p] = a(!0), m, h;
|
|
9
|
+
i[0] !== f || i[1] !== d?.dark || i[2] !== d?.light ? (h = f ? {
|
|
10
|
+
...e,
|
|
11
|
+
...d?.dark
|
|
12
|
+
} : {
|
|
13
|
+
...t,
|
|
14
|
+
...d?.light
|
|
15
|
+
}, m = n(h), i[0] = f, i[1] = d?.dark, i[2] = d?.light, i[3] = m, i[4] = h) : (m = i[3], h = i[4]);
|
|
16
|
+
let g = m, _;
|
|
17
|
+
i[5] === Symbol.for("react.memo_cache_sentinel") ? (_ = () => p(u), i[5] = _) : _ = i[5];
|
|
18
|
+
let v;
|
|
19
|
+
i[6] !== f || i[7] !== h ? (v = {
|
|
20
|
+
isDark: f,
|
|
21
|
+
toggleTheme: _,
|
|
22
|
+
theme: h
|
|
23
|
+
}, i[6] = f, i[7] = h, i[8] = v) : v = i[8];
|
|
24
|
+
let y = g, b;
|
|
25
|
+
i[9] === y ? b = i[10] : (b = {
|
|
26
|
+
...y,
|
|
27
|
+
height: "100%",
|
|
28
|
+
width: "100%"
|
|
29
|
+
}, i[9] = y, i[10] = b);
|
|
28
30
|
let x;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
children:
|
|
32
|
-
}), i[11] =
|
|
31
|
+
i[11] !== l || i[12] !== b ? (x = /* @__PURE__ */ s("div", {
|
|
32
|
+
style: b,
|
|
33
|
+
children: l
|
|
34
|
+
}), i[11] = l, i[12] = b, i[13] = x) : x = i[13];
|
|
35
|
+
let S;
|
|
36
|
+
return i[14] !== v || i[15] !== x ? (S = /* @__PURE__ */ s(c.Provider, {
|
|
37
|
+
value: v,
|
|
38
|
+
children: x
|
|
39
|
+
}), i[14] = v, i[15] = x, i[16] = S) : S = i[16], S;
|
|
33
40
|
}
|
|
34
41
|
function u(e) {
|
|
35
42
|
return !e;
|
package/dist/es/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
1
|
+
import { darkTheme as e, lightTheme as t } from "./theme.js";
|
|
2
|
+
import n from "./components/PDFViewer.js";
|
|
3
|
+
import { PDFSidebar as r } from "./components/PDFSidebar.js";
|
|
4
|
+
import { PDFAnnotations as i } from "./components/features/PDFAnnotations.js";
|
|
5
|
+
import { PDFChangeFile as a } from "./components/features/PDFChangeFile.js";
|
|
6
|
+
import { PDFDownloadButton as o } from "./components/features/PDFDownloadButton.js";
|
|
7
|
+
import { PDFNavigation as s } from "./components/features/PDFNavigation.js";
|
|
8
|
+
import { PDFOutline as c } from "./components/features/PDFOutline.js";
|
|
9
|
+
import { PDFPageFit as l } from "./components/features/PDFPageFit.js";
|
|
10
|
+
import { PDFRotationControl as u } from "./components/features/PDFRotationControl.js";
|
|
11
|
+
import { PDFSearch as d } from "./components/features/PDFSearch.js";
|
|
12
|
+
import { PDFSignatures as f } from "./components/features/PDFSignatures.js";
|
|
13
|
+
import { PDFThumbnails as p } from "./components/features/PDFThumbnails.js";
|
|
14
|
+
import { PDFZoomControls as m } from "./components/features/PDFZoomControls.js";
|
|
15
|
+
import { PDFThemeToggle as h } from "./components/features/PDFThemeToggle.js";
|
|
16
|
+
import { PDFPrintButton as g } from "./components/features/PDFPrintButton.js";
|
|
17
|
+
export { i as PDFAnnotations, a as PDFChangeFile, o as PDFDownloadButton, s as PDFNavigation, c as PDFOutline, l as PDFPageFit, g as PDFPrintButton, u as PDFRotationControl, d as PDFSearch, r as PDFSidebar, f as PDFSignatures, h as PDFThemeToggle, p as PDFThumbnails, n as PDFViewer, m as PDFZoomControls, e as darkTheme, t as lightTheme };
|