@edgepdf/viewer-react 0.0.25 → 0.0.26

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 CHANGED
@@ -19,51 +19,123 @@ yarn add @edgepdf/viewer-react @edgepdf/viewer-js
19
19
  In your Next.js application, you need to import the CSS file manually:
20
20
 
21
21
  **App Router (app directory):**
22
+
22
23
  ```tsx
23
- // app/layout.tsx or app/page.tsx
24
+ // app/layout.tsx
24
25
  import '@edgepdf/viewer-react/styles.css';
25
- import { EdgePDFViewer } from '@edgepdf/viewer-react';
26
+ import { ViewerProvider } from '@edgepdf/viewer-react';
27
+
28
+ export default function RootLayout({
29
+ children,
30
+ }: {
31
+ children: React.ReactNode;
32
+ }) {
33
+ return (
34
+ <html lang="en">
35
+ <body>
36
+ <ViewerProvider>{children}</ViewerProvider>
37
+ </body>
38
+ </html>
39
+ );
40
+ }
26
41
  ```
27
42
 
28
- **Pages Router:**
29
43
  ```tsx
30
- // pages/_app.tsx
31
- import '@edgepdf/viewer-react/styles.css';
32
-
33
- export default function App({ Component, pageProps }) {
34
- return <Component {...pageProps} />;
44
+ // app/page.tsx
45
+ import { EdgePDFViewer } from '@edgepdf/viewer-react';
46
+ import type { ViewerConfig } from '@edgepdf/types';
47
+
48
+ const config: ViewerConfig = {
49
+ tileUrl: 'https://example.com/tiles/{z}/{x}/{y}.png',
50
+ imageInfo: {
51
+ width: 2000,
52
+ height: 3000,
53
+ tileSize: 256,
54
+ maxZoom: 5,
55
+ minZoom: 0,
56
+ },
57
+ };
58
+
59
+ export default function Page() {
60
+ return <EdgePDFViewer config={config} />;
35
61
  }
36
62
  ```
37
63
 
38
- **Or in a specific page:**
64
+ **Pages Router:**
65
+
39
66
  ```tsx
40
67
  // pages/your-page.tsx
41
68
  import '@edgepdf/viewer-react/styles.css';
42
- import { EdgePDFViewer } from '@edgepdf/viewer-react';
69
+ import { ViewerProvider, EdgePDFViewer } from '@edgepdf/viewer-react';
70
+ import type { ViewerConfig } from '@edgepdf/types';
71
+
72
+ const config: ViewerConfig = {
73
+ tileUrl: 'https://example.com/tiles/{z}/{x}/{y}.png',
74
+ imageInfo: {
75
+ width: 2000,
76
+ height: 3000,
77
+ tileSize: 256,
78
+ maxZoom: 5,
79
+ minZoom: 0,
80
+ },
81
+ };
82
+
83
+ export default function Page() {
84
+ return (
85
+ <ViewerProvider>
86
+ <EdgePDFViewer config={config} />
87
+ </ViewerProvider>
88
+ );
89
+ }
43
90
  ```
44
91
 
45
92
  ### Other React Applications
46
93
 
47
94
  ```tsx
48
95
  import '@edgepdf/viewer-react/styles.css';
49
- import { EdgePDFViewer } from '@edgepdf/viewer-react';
96
+ import {
97
+ ViewerProvider,
98
+ EdgePDFViewer,
99
+ useMarkers,
100
+ useViewer,
101
+ } from '@edgepdf/viewer-react';
102
+ import type { ViewerConfig } from '@edgepdf/types';
103
+
104
+ const config: ViewerConfig = {
105
+ tileUrl: 'https://example.com/tiles/{z}/{x}/{y}.png',
106
+ imageInfo: {
107
+ width: 2000,
108
+ height: 3000,
109
+ tileSize: 256,
110
+ maxZoom: 5,
111
+ minZoom: 0,
112
+ },
113
+ };
114
+
115
+ function MarkerPanel() {
116
+ const { markers } = useMarkers();
117
+ const { viewer, isInitialized } = useViewer();
118
+
119
+ // You can interact with viewer + markers here,
120
+ // independent of where <EdgePDFViewer /> is rendered.
50
121
 
51
- function App() {
52
- const config = {
53
- tileUrl: 'https://example.com/tiles/{z}/{x}/{y}.png',
54
- imageInfo: {
55
- width: 2000,
56
- height: 3000,
57
- tileSize: 256,
58
- maxZoom: 5,
59
- minZoom: 0
60
- }
61
- };
122
+ return (
123
+ <div>
124
+ <div>Initialized: {isInitialized ? 'yes' : 'no'}</div>
125
+ <div>Total markers: {markers.length}</div>
126
+ </div>
127
+ );
128
+ }
62
129
 
130
+ function App() {
63
131
  return (
64
- <EdgePDFViewer config={config}>
65
- {/* Your components */}
66
- </EdgePDFViewer>
132
+ <ViewerProvider>
133
+ {/* This can be on one route/screen */}
134
+ <MarkerPanel />
135
+
136
+ {/* And EdgePDFViewer can be on another */}
137
+ <EdgePDFViewer config={config} />
138
+ </ViewerProvider>
67
139
  );
68
140
  }
69
141
  ```
package/dist/index.js CHANGED
@@ -1,11 +1,5 @@
1
- // packages/viewer-react/src/lib/viewer-context.tsx
2
- import {
3
- createContext,
4
- useContext,
5
- useEffect,
6
- useRef,
7
- useState
8
- } from "react";
1
+ // packages/viewer-react/src/lib/pdf-viewer.tsx
2
+ import { useEffect as useEffect2, useRef as useRef2 } from "react";
9
3
 
10
4
  // packages/viewer-js/dist/index.js
11
5
  var __create = Object.create;
@@ -12397,14 +12391,104 @@ var EdgePdfViewer = class {
12397
12391
  };
12398
12392
 
12399
12393
  // packages/viewer-react/src/lib/viewer-context.tsx
12400
- import { jsx, jsxs } from "react/jsx-runtime";
12394
+ import {
12395
+ createContext,
12396
+ useCallback,
12397
+ useContext,
12398
+ useState
12399
+ } from "react";
12400
+ import { jsx } from "react/jsx-runtime";
12401
12401
  var ViewerContext = createContext(null);
12402
- function ViewerProvider({
12402
+ function ViewerProvider({ children }) {
12403
+ const [viewer, setViewer] = useState(null);
12404
+ const [isInitialized, setIsInitialized] = useState(false);
12405
+ const [markers, setMarkers] = useState([]);
12406
+ const [zoomState, setZoomState] = useState(null);
12407
+ const setContextValue = useCallback(
12408
+ (updates) => {
12409
+ if (updates.viewer !== void 0) {
12410
+ setViewer(updates.viewer);
12411
+ }
12412
+ if (updates.isInitialized !== void 0) {
12413
+ setIsInitialized(updates.isInitialized);
12414
+ }
12415
+ if (updates.markers !== void 0) {
12416
+ setMarkers(updates.markers);
12417
+ }
12418
+ if (updates.zoomState !== void 0) {
12419
+ setZoomState(updates.zoomState);
12420
+ }
12421
+ },
12422
+ []
12423
+ );
12424
+ const contextValue = {
12425
+ viewer,
12426
+ isInitialized,
12427
+ markers,
12428
+ zoomState,
12429
+ setContextValue
12430
+ };
12431
+ return /* @__PURE__ */ jsx(ViewerContext.Provider, { value: contextValue, children });
12432
+ }
12433
+ function useViewerContext() {
12434
+ const context = useContext(ViewerContext);
12435
+ if (!context) {
12436
+ throw new Error("useViewerContext must be used within ViewerProvider");
12437
+ }
12438
+ return context;
12439
+ }
12440
+
12441
+ // packages/viewer-react/src/lib/zoom-controls.tsx
12442
+ import { useEffect, useRef } from "react";
12443
+ function ZoomControls({
12444
+ className,
12445
+ style,
12446
+ position = "top-right",
12447
+ showZoomLevel = true
12448
+ }) {
12449
+ const { viewer, isInitialized } = useViewerContext();
12450
+ const controlsRef = useRef(null);
12451
+ useEffect(() => {
12452
+ if (!viewer || !isInitialized) {
12453
+ return;
12454
+ }
12455
+ const map = viewer.getMap();
12456
+ const zoomController = viewer.getZoomController();
12457
+ if (!map || !zoomController) {
12458
+ return;
12459
+ }
12460
+ const container = map.getContainer();
12461
+ const controlsElement = createZoomControls(container, zoomController, {
12462
+ position
12463
+ });
12464
+ controlsRef.current = controlsElement;
12465
+ if (className) {
12466
+ controlsElement.className = `${controlsElement.className} ${className}`;
12467
+ }
12468
+ if (style) {
12469
+ Object.assign(controlsElement.style, style);
12470
+ }
12471
+ return () => {
12472
+ controlsRef.current = null;
12473
+ };
12474
+ }, [viewer, isInitialized, className, style, position]);
12475
+ return null;
12476
+ }
12477
+
12478
+ // packages/viewer-react/src/lib/pdf-viewer.tsx
12479
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
12480
+ function EdgePDFViewer({
12403
12481
  config,
12404
12482
  mapOptions,
12483
+ className,
12484
+ style,
12485
+ showZoomControls = true,
12486
+ zoomControlsPosition = "top-right",
12487
+ showZoomLevel = true,
12405
12488
  enableAnnotation = true,
12406
12489
  showEditButton = true,
12407
12490
  showDeleteButton = true,
12491
+ defaultZoomLevel,
12408
12492
  onPinsUpdate,
12409
12493
  onMarkerClick,
12410
12494
  onMarkerUpdate,
@@ -12413,45 +12497,52 @@ function ViewerProvider({
12413
12497
  defaultPins,
12414
12498
  children
12415
12499
  }) {
12416
- const [viewer, setViewer] = useState(null);
12417
- const [isInitialized, setIsInitialized] = useState(false);
12418
- const [markers, setMarkers] = useState([]);
12419
- const [zoomState, setZoomState] = useState(null);
12420
- const containerRef = useRef(null);
12421
- const onPinsUpdateRef = useRef(onPinsUpdate);
12422
- const onMarkerClickRef = useRef(onMarkerClick);
12423
- const onMarkerUpdateRef = useRef(onMarkerUpdate);
12424
- const onMarkerDeleteRef = useRef(onMarkerDelete);
12425
- const onMarkerAddRef = useRef(onMarkerAdd);
12426
- useEffect(() => {
12500
+ const { setContextValue } = useViewerContext();
12501
+ const containerRef = useRef2(null);
12502
+ const viewerRef = useRef2(null);
12503
+ const onPinsUpdateRef = useRef2(onPinsUpdate);
12504
+ const onMarkerClickRef = useRef2(onMarkerClick);
12505
+ const onMarkerUpdateRef = useRef2(onMarkerUpdate);
12506
+ const onMarkerDeleteRef = useRef2(onMarkerDelete);
12507
+ const onMarkerAddRef = useRef2(onMarkerAdd);
12508
+ useEffect2(() => {
12427
12509
  onPinsUpdateRef.current = onPinsUpdate;
12428
12510
  }, [onPinsUpdate]);
12429
- useEffect(() => {
12511
+ useEffect2(() => {
12430
12512
  onMarkerClickRef.current = onMarkerClick;
12431
12513
  }, [onMarkerClick]);
12432
- useEffect(() => {
12514
+ useEffect2(() => {
12433
12515
  onMarkerUpdateRef.current = onMarkerUpdate;
12434
12516
  }, [onMarkerUpdate]);
12435
- useEffect(() => {
12517
+ useEffect2(() => {
12436
12518
  onMarkerDeleteRef.current = onMarkerDelete;
12437
12519
  }, [onMarkerDelete]);
12438
- useEffect(() => {
12520
+ useEffect2(() => {
12439
12521
  onMarkerAddRef.current = onMarkerAdd;
12440
12522
  }, [onMarkerAdd]);
12441
- useEffect(() => {
12442
- if (!containerRef.current || viewer) {
12523
+ const finalConfig = {
12524
+ ...config,
12525
+ // Remove onPinsUpdate from config if it exists, as it will be handled at prop level
12526
+ onPinsUpdate: void 0
12527
+ };
12528
+ const finalMapOptions = defaultZoomLevel ? { ...mapOptions, zoom: defaultZoomLevel } : mapOptions;
12529
+ useEffect2(() => {
12530
+ if (!containerRef.current || viewerRef.current) {
12443
12531
  return;
12444
12532
  }
12445
12533
  let viewerInstance = null;
12446
12534
  try {
12447
12535
  viewerInstance = new EdgePdfViewer({
12448
12536
  container: containerRef.current,
12449
- config,
12450
- mapOptions
12537
+ config: finalConfig,
12538
+ mapOptions: finalMapOptions
12451
12539
  });
12452
12540
  viewerInstance.initialize();
12453
- setViewer(viewerInstance);
12454
- setIsInitialized(true);
12541
+ viewerRef.current = viewerInstance;
12542
+ setContextValue({
12543
+ viewer: viewerInstance,
12544
+ isInitialized: true
12545
+ });
12455
12546
  const markerManager = viewerInstance.getMarkerManager();
12456
12547
  if (markerManager) {
12457
12548
  markerManager.setIconBasePath("/");
@@ -12484,14 +12575,15 @@ function ViewerProvider({
12484
12575
  }
12485
12576
  }
12486
12577
  const allMarkers = markerManager.getAllMarkers();
12487
- setMarkers(allMarkers);
12578
+ setContextValue({ markers: allMarkers });
12488
12579
  if (onPinsUpdateRef.current) {
12489
12580
  onPinsUpdateRef.current(allMarkers);
12490
12581
  }
12491
12582
  }
12492
12583
  const zoomController = viewerInstance.getZoomController();
12493
12584
  if (zoomController) {
12494
- setZoomState(zoomController.getZoomState());
12585
+ const zoomState = zoomController.getZoomState();
12586
+ setContextValue({ zoomState });
12495
12587
  }
12496
12588
  } catch (error) {
12497
12589
  console.error("Failed to initialize viewer:", error);
@@ -12500,14 +12592,21 @@ function ViewerProvider({
12500
12592
  if (viewerInstance) {
12501
12593
  viewerInstance.dispose();
12502
12594
  viewerInstance = null;
12595
+ viewerRef.current = null;
12596
+ setContextValue({
12597
+ viewer: null,
12598
+ isInitialized: false,
12599
+ markers: [],
12600
+ zoomState: null
12601
+ });
12503
12602
  }
12504
12603
  };
12505
12604
  }, []);
12506
- useEffect(() => {
12507
- if (!viewer || !isInitialized) {
12605
+ useEffect2(() => {
12606
+ if (!viewerRef.current) {
12508
12607
  return;
12509
12608
  }
12510
- const markerManager = viewer.getMarkerManager();
12609
+ const markerManager = viewerRef.current.getMarkerManager();
12511
12610
  if (markerManager) {
12512
12611
  markerManager.setInteractionConfig({
12513
12612
  draggable: enableAnnotation,
@@ -12522,22 +12621,16 @@ function ViewerProvider({
12522
12621
  // Show delete only if both enabled
12523
12622
  });
12524
12623
  }
12525
- }, [
12526
- viewer,
12527
- isInitialized,
12528
- enableAnnotation,
12529
- showEditButton,
12530
- showDeleteButton
12531
- ]);
12532
- useEffect(() => {
12533
- if (!viewer || !isInitialized) {
12624
+ }, [enableAnnotation, showEditButton, showDeleteButton, setContextValue]);
12625
+ useEffect2(() => {
12626
+ if (!viewerRef.current) {
12534
12627
  return;
12535
12628
  }
12536
- const map = viewer.getMap();
12629
+ const map = viewerRef.current.getMap();
12537
12630
  if (!map) {
12538
12631
  return;
12539
12632
  }
12540
- const markerManager = viewer.getMarkerManager();
12633
+ const markerManager = viewerRef.current.getMarkerManager();
12541
12634
  if (!markerManager) {
12542
12635
  return;
12543
12636
  }
@@ -12552,7 +12645,7 @@ function ViewerProvider({
12552
12645
  label: `Marker ${markerManager.getMarkerCount() + 1}`
12553
12646
  });
12554
12647
  const allMarkers = markerManager.getAllMarkers();
12555
- setMarkers(allMarkers);
12648
+ setContextValue({ markers: allMarkers });
12556
12649
  if (onMarkerAddRef.current) {
12557
12650
  onMarkerAddRef.current(newMarker);
12558
12651
  }
@@ -12568,12 +12661,12 @@ function ViewerProvider({
12568
12661
  return () => {
12569
12662
  map.off("click", handleMapClick);
12570
12663
  };
12571
- }, [viewer, isInitialized, enableAnnotation]);
12572
- useEffect(() => {
12573
- if (!viewer || !isInitialized) {
12664
+ }, [enableAnnotation, setContextValue]);
12665
+ useEffect2(() => {
12666
+ if (!viewerRef.current) {
12574
12667
  return;
12575
12668
  }
12576
- const markerManager = viewer.getMarkerManager();
12669
+ const markerManager = viewerRef.current.getMarkerManager();
12577
12670
  if (!markerManager) {
12578
12671
  return;
12579
12672
  }
@@ -12585,12 +12678,12 @@ function ViewerProvider({
12585
12678
  return () => {
12586
12679
  unsubscribeClick();
12587
12680
  };
12588
- }, [viewer, isInitialized]);
12589
- useEffect(() => {
12590
- if (!viewer || !isInitialized) {
12681
+ }, [setContextValue]);
12682
+ useEffect2(() => {
12683
+ if (!viewerRef.current) {
12591
12684
  return;
12592
12685
  }
12593
- const markerManager = viewer.getMarkerManager();
12686
+ const markerManager = viewerRef.current.getMarkerManager();
12594
12687
  if (!markerManager) {
12595
12688
  return;
12596
12689
  }
@@ -12602,12 +12695,12 @@ function ViewerProvider({
12602
12695
  return () => {
12603
12696
  unsubscribeEdit();
12604
12697
  };
12605
- }, [viewer, isInitialized]);
12606
- useEffect(() => {
12607
- if (!viewer || !isInitialized) {
12698
+ }, [setContextValue]);
12699
+ useEffect2(() => {
12700
+ if (!viewerRef.current) {
12608
12701
  return;
12609
12702
  }
12610
- const markerManager = viewer.getMarkerManager();
12703
+ const markerManager = viewerRef.current.getMarkerManager();
12611
12704
  if (!markerManager) {
12612
12705
  return;
12613
12706
  }
@@ -12619,26 +12712,21 @@ function ViewerProvider({
12619
12712
  return () => {
12620
12713
  unsubscribeDelete();
12621
12714
  };
12622
- }, [viewer, isInitialized]);
12623
- useEffect(() => {
12624
- if (!viewer || !isInitialized) {
12715
+ }, [setContextValue]);
12716
+ useEffect2(() => {
12717
+ if (!viewerRef.current) {
12625
12718
  return;
12626
12719
  }
12627
- const markerManager = viewer.getMarkerManager();
12720
+ const markerManager = viewerRef.current.getMarkerManager();
12628
12721
  if (!markerManager) {
12629
12722
  return;
12630
12723
  }
12631
12724
  const updateMarkers = () => {
12632
12725
  const allMarkers = markerManager.getAllMarkers();
12633
- setMarkers((prevMarkers) => {
12634
- const hasChanged = allMarkers.length !== prevMarkers.length || allMarkers.some((m, i) => m.id !== prevMarkers[i]?.id) || allMarkers.some(
12635
- (m) => JSON.stringify(m) !== JSON.stringify(prevMarkers.find((pm) => pm.id === m.id))
12636
- );
12637
- if (hasChanged && onPinsUpdateRef.current) {
12638
- onPinsUpdateRef.current(allMarkers);
12639
- }
12640
- return hasChanged ? allMarkers : prevMarkers;
12641
- });
12726
+ setContextValue({ markers: allMarkers });
12727
+ if (onPinsUpdateRef.current) {
12728
+ onPinsUpdateRef.current(allMarkers);
12729
+ }
12642
12730
  };
12643
12731
  const unsubscribeDelete = markerManager.on("delete", updateMarkers);
12644
12732
  const unsubscribeDragend = markerManager.on("dragend", updateMarkers);
@@ -12650,92 +12738,28 @@ function ViewerProvider({
12650
12738
  unsubscribeEdit();
12651
12739
  clearInterval(interval);
12652
12740
  };
12653
- }, [viewer, isInitialized]);
12654
- const contextValue = {
12655
- viewer,
12656
- isInitialized,
12657
- markers,
12658
- zoomState
12659
- };
12660
- return /* @__PURE__ */ jsx(ViewerContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs("div", { style: { width: "100%", height: "100%", position: "relative" }, children: [
12661
- /* @__PURE__ */ jsx("div", { ref: containerRef, style: { width: "100%", height: "100%" } }),
12662
- children
12663
- ] }) });
12664
- }
12665
- function useViewerContext() {
12666
- const context = useContext(ViewerContext);
12667
- if (!context) {
12668
- throw new Error("useViewerContext must be used within ViewerProvider");
12669
- }
12670
- return context;
12671
- }
12672
-
12673
- // packages/viewer-react/src/lib/zoom-controls.tsx
12674
- import { useEffect as useEffect2, useRef as useRef2 } from "react";
12675
- function ZoomControls({
12676
- className,
12677
- style,
12678
- position = "top-right",
12679
- showZoomLevel = true
12680
- }) {
12681
- const { viewer, isInitialized } = useViewerContext();
12682
- const controlsRef = useRef2(null);
12741
+ }, [setContextValue]);
12683
12742
  useEffect2(() => {
12684
- if (!viewer || !isInitialized) {
12743
+ if (!viewerRef.current) {
12685
12744
  return;
12686
12745
  }
12687
- const map = viewer.getMap();
12688
- const zoomController = viewer.getZoomController();
12689
- if (!map || !zoomController) {
12746
+ const map = viewerRef.current.getMap();
12747
+ if (!map) {
12690
12748
  return;
12691
12749
  }
12692
- const container = map.getContainer();
12693
- const controlsElement = createZoomControls(container, zoomController, {
12694
- position
12695
- });
12696
- controlsRef.current = controlsElement;
12697
- if (className) {
12698
- controlsElement.className = `${controlsElement.className} ${className}`;
12699
- }
12700
- if (style) {
12701
- Object.assign(controlsElement.style, style);
12702
- }
12750
+ const updateZoomState = () => {
12751
+ const zoomController = viewerRef.current?.getZoomController();
12752
+ if (zoomController) {
12753
+ const zoomState = zoomController.getZoomState();
12754
+ setContextValue({ zoomState });
12755
+ }
12756
+ };
12757
+ map.on("zoomend", updateZoomState);
12703
12758
  return () => {
12704
- controlsRef.current = null;
12759
+ map.off("zoomend", updateZoomState);
12705
12760
  };
12706
- }, [viewer, isInitialized, className, style, position]);
12707
- return null;
12708
- }
12709
-
12710
- // packages/viewer-react/src/lib/pdf-viewer.tsx
12711
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
12712
- function EdgePDFViewer({
12713
- config,
12714
- mapOptions,
12715
- className,
12716
- style,
12717
- showZoomControls = true,
12718
- zoomControlsPosition = "top-right",
12719
- showZoomLevel = true,
12720
- enableAnnotation = true,
12721
- showEditButton = true,
12722
- showDeleteButton = true,
12723
- defaultZoomLevel,
12724
- onPinsUpdate,
12725
- onMarkerClick,
12726
- onMarkerUpdate,
12727
- onMarkerDelete,
12728
- onMarkerAdd,
12729
- defaultPins,
12730
- children
12731
- }) {
12732
- const finalConfig = {
12733
- ...config,
12734
- // Remove onPinsUpdate from config if it exists, as it will be handled at prop level
12735
- onPinsUpdate: void 0
12736
- };
12737
- const finalMapOptions = defaultZoomLevel ? { ...mapOptions, zoom: defaultZoomLevel } : mapOptions;
12738
- return /* @__PURE__ */ jsx2(
12761
+ }, [setContextValue]);
12762
+ return /* @__PURE__ */ jsxs(
12739
12763
  "div",
12740
12764
  {
12741
12765
  className,
@@ -12745,44 +12769,29 @@ function EdgePDFViewer({
12745
12769
  position: "relative",
12746
12770
  ...style
12747
12771
  },
12748
- children: /* @__PURE__ */ jsxs2(
12749
- ViewerProvider,
12750
- {
12751
- config: finalConfig,
12752
- mapOptions: finalMapOptions,
12753
- enableAnnotation,
12754
- showEditButton,
12755
- showDeleteButton,
12756
- onPinsUpdate,
12757
- onMarkerClick,
12758
- onMarkerUpdate,
12759
- onMarkerDelete,
12760
- onMarkerAdd,
12761
- defaultPins,
12762
- children: [
12763
- showZoomControls && /* @__PURE__ */ jsx2(
12764
- ZoomControls,
12765
- {
12766
- position: zoomControlsPosition,
12767
- showZoomLevel
12768
- }
12769
- ),
12770
- children
12771
- ]
12772
- }
12773
- )
12772
+ children: [
12773
+ /* @__PURE__ */ jsx2("div", { ref: containerRef, style: { width: "100%", height: "100%" } }),
12774
+ showZoomControls && /* @__PURE__ */ jsx2(
12775
+ ZoomControls,
12776
+ {
12777
+ position: zoomControlsPosition,
12778
+ showZoomLevel
12779
+ }
12780
+ ),
12781
+ children
12782
+ ]
12774
12783
  }
12775
12784
  );
12776
12785
  }
12777
12786
 
12778
12787
  // packages/viewer-react/src/lib/use-viewer.ts
12779
- import { useCallback } from "react";
12788
+ import { useCallback as useCallback2 } from "react";
12780
12789
  function useViewer() {
12781
12790
  const { viewer, isInitialized } = useViewerContext();
12782
- const getMap = useCallback(() => {
12791
+ const getMap = useCallback2(() => {
12783
12792
  return viewer?.getMap() ?? null;
12784
12793
  }, [viewer]);
12785
- const checkInitialized = useCallback(() => {
12794
+ const checkInitialized = useCallback2(() => {
12786
12795
  return viewer?.isInitialized() ?? false;
12787
12796
  }, [viewer]);
12788
12797
  return {
@@ -12794,7 +12803,7 @@ function useViewer() {
12794
12803
  }
12795
12804
 
12796
12805
  // packages/viewer-react/src/lib/use-markers.ts
12797
- import { useCallback as useCallback2, useEffect as useEffect3, useState as useState2 } from "react";
12806
+ import { useCallback as useCallback3, useEffect as useEffect3, useState as useState2 } from "react";
12798
12807
  function useMarkers() {
12799
12808
  const { viewer, isInitialized, markers: contextMarkers } = useViewerContext();
12800
12809
  const [markers, setMarkers] = useState2(contextMarkers);
@@ -12811,7 +12820,7 @@ function useMarkers() {
12811
12820
  setMarkers(allMarkers);
12812
12821
  }
12813
12822
  }, [viewer, isInitialized]);
12814
- const addMarker = useCallback2(
12823
+ const addMarker = useCallback3(
12815
12824
  (options) => {
12816
12825
  if (!viewer || !isInitialized) {
12817
12826
  console.warn("Viewer not initialized");
@@ -12834,7 +12843,7 @@ function useMarkers() {
12834
12843
  },
12835
12844
  [viewer, isInitialized]
12836
12845
  );
12837
- const removeMarker = useCallback2(
12846
+ const removeMarker = useCallback3(
12838
12847
  (id) => {
12839
12848
  if (!viewer || !isInitialized) {
12840
12849
  console.warn("Viewer not initialized");
@@ -12859,7 +12868,7 @@ function useMarkers() {
12859
12868
  },
12860
12869
  [viewer, isInitialized]
12861
12870
  );
12862
- const updateMarker = useCallback2(
12871
+ const updateMarker = useCallback3(
12863
12872
  (id, updates) => {
12864
12873
  if (!viewer || !isInitialized) {
12865
12874
  console.warn("Viewer not initialized");
@@ -12889,7 +12898,7 @@ function useMarkers() {
12889
12898
  },
12890
12899
  [viewer, isInitialized]
12891
12900
  );
12892
- const getMarker = useCallback2(
12901
+ const getMarker = useCallback3(
12893
12902
  (id) => {
12894
12903
  if (!viewer || !isInitialized) {
12895
12904
  return null;
@@ -12902,10 +12911,10 @@ function useMarkers() {
12902
12911
  },
12903
12912
  [viewer, isInitialized]
12904
12913
  );
12905
- const getAllMarkers = useCallback2(() => {
12914
+ const getAllMarkers = useCallback3(() => {
12906
12915
  return markers;
12907
12916
  }, [markers]);
12908
- const exportMarkers = useCallback2(() => {
12917
+ const exportMarkers = useCallback3(() => {
12909
12918
  if (!viewer || !isInitialized) {
12910
12919
  return { markers: [], version: "1.0" };
12911
12920
  }
@@ -12920,7 +12929,7 @@ function useMarkers() {
12920
12929
  return { markers: [], version: "1.0" };
12921
12930
  }
12922
12931
  }, [viewer, isInitialized]);
12923
- const importMarkers = useCallback2(
12932
+ const importMarkers = useCallback3(
12924
12933
  (data) => {
12925
12934
  if (!viewer || !isInitialized) {
12926
12935
  console.warn("Viewer not initialized");
@@ -12945,7 +12954,7 @@ function useMarkers() {
12945
12954
  },
12946
12955
  [viewer, isInitialized]
12947
12956
  );
12948
- const clearMarkers = useCallback2(() => {
12957
+ const clearMarkers = useCallback3(() => {
12949
12958
  if (!viewer || !isInitialized) {
12950
12959
  console.warn("Viewer not initialized");
12951
12960
  return;
@@ -12979,7 +12988,7 @@ function useMarkers() {
12979
12988
  }
12980
12989
 
12981
12990
  // packages/viewer-react/src/lib/use-zoom.ts
12982
- import { useCallback as useCallback3, useEffect as useEffect4, useState as useState3 } from "react";
12991
+ import { useCallback as useCallback4, useEffect as useEffect4, useState as useState3 } from "react";
12983
12992
  function useZoom() {
12984
12993
  const { viewer, isInitialized, zoomState: contextZoomState } = useViewerContext();
12985
12994
  const [zoomState, setZoomState] = useState3(contextZoomState);
@@ -13016,7 +13025,7 @@ function useZoom() {
13016
13025
  map.off("zoomend", updateZoomState);
13017
13026
  };
13018
13027
  }, [viewer, isInitialized]);
13019
- const zoomIn = useCallback3(() => {
13028
+ const zoomIn = useCallback4(() => {
13020
13029
  if (!viewer || !isInitialized) {
13021
13030
  console.warn("Viewer not initialized");
13022
13031
  return;
@@ -13034,7 +13043,7 @@ function useZoom() {
13034
13043
  console.error("Failed to zoom in:", error);
13035
13044
  }
13036
13045
  }, [viewer, isInitialized]);
13037
- const zoomOut = useCallback3(() => {
13046
+ const zoomOut = useCallback4(() => {
13038
13047
  if (!viewer || !isInitialized) {
13039
13048
  console.warn("Viewer not initialized");
13040
13049
  return;
@@ -13052,7 +13061,7 @@ function useZoom() {
13052
13061
  console.error("Failed to zoom out:", error);
13053
13062
  }
13054
13063
  }, [viewer, isInitialized]);
13055
- const setZoom = useCallback3(
13064
+ const setZoom = useCallback4(
13056
13065
  (zoom) => {
13057
13066
  if (!viewer || !isInitialized) {
13058
13067
  console.warn("Viewer not initialized");
@@ -13073,13 +13082,13 @@ function useZoom() {
13073
13082
  },
13074
13083
  [viewer, isInitialized]
13075
13084
  );
13076
- const canZoomIn = useCallback3(() => {
13085
+ const canZoomIn = useCallback4(() => {
13077
13086
  if (!zoomState) {
13078
13087
  return false;
13079
13088
  }
13080
13089
  return zoomState.currentZoom < zoomState.maxZoom;
13081
13090
  }, [zoomState]);
13082
- const canZoomOut = useCallback3(() => {
13091
+ const canZoomOut = useCallback4(() => {
13083
13092
  if (!zoomState) {
13084
13093
  return false;
13085
13094
  }
@@ -45,33 +45,19 @@ export interface EdgePDFViewerProps {
45
45
  /**
46
46
  * EdgePDFViewer - Main React component for the EdgePDF viewer
47
47
  *
48
- * This component wraps the viewer functionality in a React component,
49
- * providing the ViewerProvider context to child components.
48
+ * This component initializes the viewer and updates the context.
49
+ * Must be used within a ViewerProvider.
50
50
  *
51
51
  * @example
52
52
  * ```tsx
53
- * function App() {
54
- * const config: ViewerConfig = {
55
- * tileUrl: 'https://example.com/tiles/{z}/{x}/{y}.png',
56
- * imageInfo: {
57
- * width: 2000,
58
- * height: 3000,
59
- * tileSize: 256,
60
- * maxZoom: 5,
61
- * minZoom: 0
62
- * }
63
- * };
64
- *
65
- * return (
66
- * <EdgePDFViewer
67
- * config={config}
68
- * showZoomControls={true}
69
- * zoomControlsPosition="top-right"
70
- * >
71
- * <MarkerControls />
72
- * </EdgePDFViewer>
73
- * );
74
- * }
53
+ * <ViewerProvider>
54
+ * <App />
55
+ * <EdgePDFViewer
56
+ * config={config}
57
+ * showZoomControls={true}
58
+ * zoomControlsPosition="top-right"
59
+ * />
60
+ * </ViewerProvider>
75
61
  * ```
76
62
  */
77
63
  export declare function EdgePDFViewer({ config, mapOptions, className, style, showZoomControls, zoomControlsPosition, showZoomLevel, enableAnnotation, showEditButton, showDeleteButton, defaultZoomLevel, onPinsUpdate, onMarkerClick, onMarkerUpdate, onMarkerDelete, onMarkerAdd, defaultPins, children, }: EdgePDFViewerProps): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"pdf-viewer.d.ts","sourceRoot":"","sources":["../../src/lib/pdf-viewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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xB,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iEAAiE;IACjE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,6CAA6C;IAC7C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,wCAAwC;IACxC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,wCAAwC;IACxC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,wCAAwC;IACxC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,kEAAkE;IAClE,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC;IACpC,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,UAAU,EACV,SAAS,EACT,KAAK,EACL,gBAAuB,EACvB,oBAAkC,EAClC,aAAoB,EACpB,gBAAuB,EACvB,cAAqB,EACrB,gBAAuB,EACvB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,WAAW,EACX,QAAQ,GACT,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CA6XlC"}
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import { EdgePdfViewer } from '@edgepdf/viewer-js';
3
- import type { ViewerConfig, MapOptions, Marker, MarkerData, ZoomState } from '@edgepdf/types';
3
+ import type { Marker, ZoomState } from '@edgepdf/types';
4
4
  /**
5
5
  * Viewer context value containing viewer instance and state
6
6
  */
@@ -13,50 +13,30 @@ export interface ViewerContextValue {
13
13
  markers: Marker[];
14
14
  /** Current zoom state */
15
15
  zoomState: ZoomState | null;
16
+ /** Internal: Function to update context value (used by EdgePDFViewer) */
17
+ setContextValue: (updates: Partial<Omit<ViewerContextValue, 'setContextValue'>>) => void;
16
18
  }
17
19
  /**
18
20
  * Props for ViewerProvider
19
21
  */
20
22
  export interface ViewerProviderProps {
21
- /** Viewer configuration */
22
- config: ViewerConfig;
23
- /** Optional map options */
24
- mapOptions?: MapOptions;
25
- /** Enable annotation functionality (default: true) */
26
- enableAnnotation?: boolean;
27
- /** Show edit button in marker action controls (default: true) */
28
- showEditButton?: boolean;
29
- /** Show delete button in marker action controls (default: true) */
30
- showDeleteButton?: boolean;
31
- /** Callback when markers/pins are updated */
32
- onPinsUpdate?: (pins: Marker[]) => void;
33
- /** Callback when a marker is clicked */
34
- onMarkerClick?: (marker: Marker) => void;
35
- /** Callback when a marker is updated */
36
- onMarkerUpdate?: (marker: Marker) => void;
37
- /** Callback when a marker is deleted */
38
- onMarkerDelete?: (marker: Marker) => void;
39
- /** Callback when a marker is added (created by user tap/click) */
40
- onMarkerAdd?: (marker: Marker) => void;
41
- /** Default pins to preload (uses internal import) */
42
- defaultPins?: Marker[] | MarkerData;
43
23
  /** Children components */
44
24
  children: ReactNode;
45
25
  }
46
26
  /**
47
27
  * ViewerProvider - Provides viewer context to child components
48
28
  *
49
- * Manages the lifecycle of the EdgePdfViewer instance and provides it
50
- * to child components through React context.
29
+ * Provides an empty context that can be updated by EdgePDFViewer.
30
+ * This allows hooks to be used anywhere within the provider tree.
51
31
  *
52
32
  * @example
53
33
  * ```tsx
54
- * <ViewerProvider config={viewerConfig}>
55
- * <EdgePDFViewer />
34
+ * <ViewerProvider>
35
+ * <App />
56
36
  * </ViewerProvider>
57
37
  * ```
58
38
  */
59
- export declare function ViewerProvider({ config, mapOptions, enableAnnotation, showEditButton, showDeleteButton, onPinsUpdate, onMarkerClick, onMarkerUpdate, onMarkerDelete, onMarkerAdd, defaultPins, children, }: ViewerProviderProps): JSX.Element;
39
+ export declare function ViewerProvider({ children }: ViewerProviderProps): JSX.Element;
60
40
  /**
61
41
  * Hook to access viewer context
62
42
  *
@@ -1 +1 @@
1
- {"version":3,"file":"viewer-context.d.ts","sourceRoot":"","sources":["../../src/lib/viewer-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,MAAM,EACN,UAAU,EACV,SAAS,EACV,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,sBAAsB;IACtB,MAAM,EAAE,aAAa,GAAG,IAAI,CAAC;IAC7B,oCAAoC;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,sBAAsB;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,yBAAyB;IACzB,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC7B;AAOD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,2BAA2B;IAC3B,MAAM,EAAE,YAAY,CAAC;IACrB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iEAAiE;IACjE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,6CAA6C;IAC7C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,wCAAwC;IACxC,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,wCAAw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,IAAI,CAAC,kBAAkB,EAAE,iBAAiB,CAAC,CAAC,KAC1D,IAAI,CAAC;CACX;AAOD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,0BAA0B;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAsC7E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,CAMrD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgepdf/viewer-react",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "EdgePDF Viewer - React components for viewing PDF documents with interactive markers and zoom controls",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",