@edgepdf/viewer-react 0.0.24 → 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,56 +12391,158 @@ 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,
12411
12495
  onMarkerDelete,
12496
+ onMarkerAdd,
12412
12497
  defaultPins,
12413
12498
  children
12414
12499
  }) {
12415
- const [viewer, setViewer] = useState(null);
12416
- const [isInitialized, setIsInitialized] = useState(false);
12417
- const [markers, setMarkers] = useState([]);
12418
- const [zoomState, setZoomState] = useState(null);
12419
- const containerRef = useRef(null);
12420
- const onPinsUpdateRef = useRef(onPinsUpdate);
12421
- const onMarkerClickRef = useRef(onMarkerClick);
12422
- const onMarkerUpdateRef = useRef(onMarkerUpdate);
12423
- const onMarkerDeleteRef = useRef(onMarkerDelete);
12424
- 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(() => {
12425
12509
  onPinsUpdateRef.current = onPinsUpdate;
12426
12510
  }, [onPinsUpdate]);
12427
- useEffect(() => {
12511
+ useEffect2(() => {
12428
12512
  onMarkerClickRef.current = onMarkerClick;
12429
12513
  }, [onMarkerClick]);
12430
- useEffect(() => {
12514
+ useEffect2(() => {
12431
12515
  onMarkerUpdateRef.current = onMarkerUpdate;
12432
12516
  }, [onMarkerUpdate]);
12433
- useEffect(() => {
12517
+ useEffect2(() => {
12434
12518
  onMarkerDeleteRef.current = onMarkerDelete;
12435
12519
  }, [onMarkerDelete]);
12436
- useEffect(() => {
12437
- if (!containerRef.current || viewer) {
12520
+ useEffect2(() => {
12521
+ onMarkerAddRef.current = onMarkerAdd;
12522
+ }, [onMarkerAdd]);
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) {
12438
12531
  return;
12439
12532
  }
12440
12533
  let viewerInstance = null;
12441
12534
  try {
12442
12535
  viewerInstance = new EdgePdfViewer({
12443
12536
  container: containerRef.current,
12444
- config,
12445
- mapOptions
12537
+ config: finalConfig,
12538
+ mapOptions: finalMapOptions
12446
12539
  });
12447
12540
  viewerInstance.initialize();
12448
- setViewer(viewerInstance);
12449
- setIsInitialized(true);
12541
+ viewerRef.current = viewerInstance;
12542
+ setContextValue({
12543
+ viewer: viewerInstance,
12544
+ isInitialized: true
12545
+ });
12450
12546
  const markerManager = viewerInstance.getMarkerManager();
12451
12547
  if (markerManager) {
12452
12548
  markerManager.setIconBasePath("/");
@@ -12479,14 +12575,15 @@ function ViewerProvider({
12479
12575
  }
12480
12576
  }
12481
12577
  const allMarkers = markerManager.getAllMarkers();
12482
- setMarkers(allMarkers);
12578
+ setContextValue({ markers: allMarkers });
12483
12579
  if (onPinsUpdateRef.current) {
12484
12580
  onPinsUpdateRef.current(allMarkers);
12485
12581
  }
12486
12582
  }
12487
12583
  const zoomController = viewerInstance.getZoomController();
12488
12584
  if (zoomController) {
12489
- setZoomState(zoomController.getZoomState());
12585
+ const zoomState = zoomController.getZoomState();
12586
+ setContextValue({ zoomState });
12490
12587
  }
12491
12588
  } catch (error) {
12492
12589
  console.error("Failed to initialize viewer:", error);
@@ -12495,14 +12592,21 @@ function ViewerProvider({
12495
12592
  if (viewerInstance) {
12496
12593
  viewerInstance.dispose();
12497
12594
  viewerInstance = null;
12595
+ viewerRef.current = null;
12596
+ setContextValue({
12597
+ viewer: null,
12598
+ isInitialized: false,
12599
+ markers: [],
12600
+ zoomState: null
12601
+ });
12498
12602
  }
12499
12603
  };
12500
12604
  }, []);
12501
- useEffect(() => {
12502
- if (!viewer || !isInitialized) {
12605
+ useEffect2(() => {
12606
+ if (!viewerRef.current) {
12503
12607
  return;
12504
12608
  }
12505
- const markerManager = viewer.getMarkerManager();
12609
+ const markerManager = viewerRef.current.getMarkerManager();
12506
12610
  if (markerManager) {
12507
12611
  markerManager.setInteractionConfig({
12508
12612
  draggable: enableAnnotation,
@@ -12517,16 +12621,16 @@ function ViewerProvider({
12517
12621
  // Show delete only if both enabled
12518
12622
  });
12519
12623
  }
12520
- }, [viewer, isInitialized, enableAnnotation, showEditButton, showDeleteButton]);
12521
- useEffect(() => {
12522
- if (!viewer || !isInitialized) {
12624
+ }, [enableAnnotation, showEditButton, showDeleteButton, setContextValue]);
12625
+ useEffect2(() => {
12626
+ if (!viewerRef.current) {
12523
12627
  return;
12524
12628
  }
12525
- const map = viewer.getMap();
12629
+ const map = viewerRef.current.getMap();
12526
12630
  if (!map) {
12527
12631
  return;
12528
12632
  }
12529
- const markerManager = viewer.getMarkerManager();
12633
+ const markerManager = viewerRef.current.getMarkerManager();
12530
12634
  if (!markerManager) {
12531
12635
  return;
12532
12636
  }
@@ -12536,12 +12640,15 @@ function ViewerProvider({
12536
12640
  }
12537
12641
  try {
12538
12642
  const leafletCoords = [e.latlng.lat, e.latlng.lng];
12539
- markerManager.createMarker({
12643
+ const newMarker = markerManager.createMarker({
12540
12644
  position: leafletCoords,
12541
12645
  label: `Marker ${markerManager.getMarkerCount() + 1}`
12542
12646
  });
12543
12647
  const allMarkers = markerManager.getAllMarkers();
12544
- setMarkers(allMarkers);
12648
+ setContextValue({ markers: allMarkers });
12649
+ if (onMarkerAddRef.current) {
12650
+ onMarkerAddRef.current(newMarker);
12651
+ }
12545
12652
  if (onPinsUpdateRef.current) {
12546
12653
  onPinsUpdateRef.current(allMarkers);
12547
12654
  }
@@ -12554,12 +12661,12 @@ function ViewerProvider({
12554
12661
  return () => {
12555
12662
  map.off("click", handleMapClick);
12556
12663
  };
12557
- }, [viewer, isInitialized, enableAnnotation]);
12558
- useEffect(() => {
12559
- if (!viewer || !isInitialized) {
12664
+ }, [enableAnnotation, setContextValue]);
12665
+ useEffect2(() => {
12666
+ if (!viewerRef.current) {
12560
12667
  return;
12561
12668
  }
12562
- const markerManager = viewer.getMarkerManager();
12669
+ const markerManager = viewerRef.current.getMarkerManager();
12563
12670
  if (!markerManager) {
12564
12671
  return;
12565
12672
  }
@@ -12571,12 +12678,12 @@ function ViewerProvider({
12571
12678
  return () => {
12572
12679
  unsubscribeClick();
12573
12680
  };
12574
- }, [viewer, isInitialized]);
12575
- useEffect(() => {
12576
- if (!viewer || !isInitialized) {
12681
+ }, [setContextValue]);
12682
+ useEffect2(() => {
12683
+ if (!viewerRef.current) {
12577
12684
  return;
12578
12685
  }
12579
- const markerManager = viewer.getMarkerManager();
12686
+ const markerManager = viewerRef.current.getMarkerManager();
12580
12687
  if (!markerManager) {
12581
12688
  return;
12582
12689
  }
@@ -12588,12 +12695,12 @@ function ViewerProvider({
12588
12695
  return () => {
12589
12696
  unsubscribeEdit();
12590
12697
  };
12591
- }, [viewer, isInitialized]);
12592
- useEffect(() => {
12593
- if (!viewer || !isInitialized) {
12698
+ }, [setContextValue]);
12699
+ useEffect2(() => {
12700
+ if (!viewerRef.current) {
12594
12701
  return;
12595
12702
  }
12596
- const markerManager = viewer.getMarkerManager();
12703
+ const markerManager = viewerRef.current.getMarkerManager();
12597
12704
  if (!markerManager) {
12598
12705
  return;
12599
12706
  }
@@ -12605,26 +12712,21 @@ function ViewerProvider({
12605
12712
  return () => {
12606
12713
  unsubscribeDelete();
12607
12714
  };
12608
- }, [viewer, isInitialized]);
12609
- useEffect(() => {
12610
- if (!viewer || !isInitialized) {
12715
+ }, [setContextValue]);
12716
+ useEffect2(() => {
12717
+ if (!viewerRef.current) {
12611
12718
  return;
12612
12719
  }
12613
- const markerManager = viewer.getMarkerManager();
12720
+ const markerManager = viewerRef.current.getMarkerManager();
12614
12721
  if (!markerManager) {
12615
12722
  return;
12616
12723
  }
12617
12724
  const updateMarkers = () => {
12618
12725
  const allMarkers = markerManager.getAllMarkers();
12619
- setMarkers((prevMarkers) => {
12620
- const hasChanged = allMarkers.length !== prevMarkers.length || allMarkers.some((m, i) => m.id !== prevMarkers[i]?.id) || allMarkers.some(
12621
- (m) => JSON.stringify(m) !== JSON.stringify(prevMarkers.find((pm) => pm.id === m.id))
12622
- );
12623
- if (hasChanged && onPinsUpdateRef.current) {
12624
- onPinsUpdateRef.current(allMarkers);
12625
- }
12626
- return hasChanged ? allMarkers : prevMarkers;
12627
- });
12726
+ setContextValue({ markers: allMarkers });
12727
+ if (onPinsUpdateRef.current) {
12728
+ onPinsUpdateRef.current(allMarkers);
12729
+ }
12628
12730
  };
12629
12731
  const unsubscribeDelete = markerManager.on("delete", updateMarkers);
12630
12732
  const unsubscribeDragend = markerManager.on("dragend", updateMarkers);
@@ -12636,91 +12738,28 @@ function ViewerProvider({
12636
12738
  unsubscribeEdit();
12637
12739
  clearInterval(interval);
12638
12740
  };
12639
- }, [viewer, isInitialized]);
12640
- const contextValue = {
12641
- viewer,
12642
- isInitialized,
12643
- markers,
12644
- zoomState
12645
- };
12646
- return /* @__PURE__ */ jsx(ViewerContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs("div", { style: { width: "100%", height: "100%", position: "relative" }, children: [
12647
- /* @__PURE__ */ jsx("div", { ref: containerRef, style: { width: "100%", height: "100%" } }),
12648
- children
12649
- ] }) });
12650
- }
12651
- function useViewerContext() {
12652
- const context = useContext(ViewerContext);
12653
- if (!context) {
12654
- throw new Error("useViewerContext must be used within ViewerProvider");
12655
- }
12656
- return context;
12657
- }
12658
-
12659
- // packages/viewer-react/src/lib/zoom-controls.tsx
12660
- import { useEffect as useEffect2, useRef as useRef2 } from "react";
12661
- function ZoomControls({
12662
- className,
12663
- style,
12664
- position = "top-right",
12665
- showZoomLevel = true
12666
- }) {
12667
- const { viewer, isInitialized } = useViewerContext();
12668
- const controlsRef = useRef2(null);
12741
+ }, [setContextValue]);
12669
12742
  useEffect2(() => {
12670
- if (!viewer || !isInitialized) {
12743
+ if (!viewerRef.current) {
12671
12744
  return;
12672
12745
  }
12673
- const map = viewer.getMap();
12674
- const zoomController = viewer.getZoomController();
12675
- if (!map || !zoomController) {
12746
+ const map = viewerRef.current.getMap();
12747
+ if (!map) {
12676
12748
  return;
12677
12749
  }
12678
- const container = map.getContainer();
12679
- const controlsElement = createZoomControls(container, zoomController, {
12680
- position
12681
- });
12682
- controlsRef.current = controlsElement;
12683
- if (className) {
12684
- controlsElement.className = `${controlsElement.className} ${className}`;
12685
- }
12686
- if (style) {
12687
- Object.assign(controlsElement.style, style);
12688
- }
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);
12689
12758
  return () => {
12690
- controlsRef.current = null;
12759
+ map.off("zoomend", updateZoomState);
12691
12760
  };
12692
- }, [viewer, isInitialized, className, style, position]);
12693
- return null;
12694
- }
12695
-
12696
- // packages/viewer-react/src/lib/pdf-viewer.tsx
12697
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
12698
- function EdgePDFViewer({
12699
- config,
12700
- mapOptions,
12701
- className,
12702
- style,
12703
- showZoomControls = true,
12704
- zoomControlsPosition = "top-right",
12705
- showZoomLevel = true,
12706
- enableAnnotation = true,
12707
- showEditButton = true,
12708
- showDeleteButton = true,
12709
- defaultZoomLevel,
12710
- onPinsUpdate,
12711
- onMarkerClick,
12712
- onMarkerUpdate,
12713
- onMarkerDelete,
12714
- defaultPins,
12715
- children
12716
- }) {
12717
- const finalConfig = {
12718
- ...config,
12719
- // Remove onPinsUpdate from config if it exists, as it will be handled at prop level
12720
- onPinsUpdate: void 0
12721
- };
12722
- const finalMapOptions = defaultZoomLevel ? { ...mapOptions, zoom: defaultZoomLevel } : mapOptions;
12723
- return /* @__PURE__ */ jsx2(
12761
+ }, [setContextValue]);
12762
+ return /* @__PURE__ */ jsxs(
12724
12763
  "div",
12725
12764
  {
12726
12765
  className,
@@ -12730,43 +12769,29 @@ function EdgePDFViewer({
12730
12769
  position: "relative",
12731
12770
  ...style
12732
12771
  },
12733
- children: /* @__PURE__ */ jsxs2(
12734
- ViewerProvider,
12735
- {
12736
- config: finalConfig,
12737
- mapOptions: finalMapOptions,
12738
- enableAnnotation,
12739
- showEditButton,
12740
- showDeleteButton,
12741
- onPinsUpdate,
12742
- onMarkerClick,
12743
- onMarkerUpdate,
12744
- onMarkerDelete,
12745
- defaultPins,
12746
- children: [
12747
- showZoomControls && /* @__PURE__ */ jsx2(
12748
- ZoomControls,
12749
- {
12750
- position: zoomControlsPosition,
12751
- showZoomLevel
12752
- }
12753
- ),
12754
- children
12755
- ]
12756
- }
12757
- )
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
+ ]
12758
12783
  }
12759
12784
  );
12760
12785
  }
12761
12786
 
12762
12787
  // packages/viewer-react/src/lib/use-viewer.ts
12763
- import { useCallback } from "react";
12788
+ import { useCallback as useCallback2 } from "react";
12764
12789
  function useViewer() {
12765
12790
  const { viewer, isInitialized } = useViewerContext();
12766
- const getMap = useCallback(() => {
12791
+ const getMap = useCallback2(() => {
12767
12792
  return viewer?.getMap() ?? null;
12768
12793
  }, [viewer]);
12769
- const checkInitialized = useCallback(() => {
12794
+ const checkInitialized = useCallback2(() => {
12770
12795
  return viewer?.isInitialized() ?? false;
12771
12796
  }, [viewer]);
12772
12797
  return {
@@ -12778,7 +12803,7 @@ function useViewer() {
12778
12803
  }
12779
12804
 
12780
12805
  // packages/viewer-react/src/lib/use-markers.ts
12781
- 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";
12782
12807
  function useMarkers() {
12783
12808
  const { viewer, isInitialized, markers: contextMarkers } = useViewerContext();
12784
12809
  const [markers, setMarkers] = useState2(contextMarkers);
@@ -12795,7 +12820,7 @@ function useMarkers() {
12795
12820
  setMarkers(allMarkers);
12796
12821
  }
12797
12822
  }, [viewer, isInitialized]);
12798
- const addMarker = useCallback2(
12823
+ const addMarker = useCallback3(
12799
12824
  (options) => {
12800
12825
  if (!viewer || !isInitialized) {
12801
12826
  console.warn("Viewer not initialized");
@@ -12818,7 +12843,7 @@ function useMarkers() {
12818
12843
  },
12819
12844
  [viewer, isInitialized]
12820
12845
  );
12821
- const removeMarker = useCallback2(
12846
+ const removeMarker = useCallback3(
12822
12847
  (id) => {
12823
12848
  if (!viewer || !isInitialized) {
12824
12849
  console.warn("Viewer not initialized");
@@ -12843,7 +12868,7 @@ function useMarkers() {
12843
12868
  },
12844
12869
  [viewer, isInitialized]
12845
12870
  );
12846
- const updateMarker = useCallback2(
12871
+ const updateMarker = useCallback3(
12847
12872
  (id, updates) => {
12848
12873
  if (!viewer || !isInitialized) {
12849
12874
  console.warn("Viewer not initialized");
@@ -12873,7 +12898,7 @@ function useMarkers() {
12873
12898
  },
12874
12899
  [viewer, isInitialized]
12875
12900
  );
12876
- const getMarker = useCallback2(
12901
+ const getMarker = useCallback3(
12877
12902
  (id) => {
12878
12903
  if (!viewer || !isInitialized) {
12879
12904
  return null;
@@ -12886,10 +12911,10 @@ function useMarkers() {
12886
12911
  },
12887
12912
  [viewer, isInitialized]
12888
12913
  );
12889
- const getAllMarkers = useCallback2(() => {
12914
+ const getAllMarkers = useCallback3(() => {
12890
12915
  return markers;
12891
12916
  }, [markers]);
12892
- const exportMarkers = useCallback2(() => {
12917
+ const exportMarkers = useCallback3(() => {
12893
12918
  if (!viewer || !isInitialized) {
12894
12919
  return { markers: [], version: "1.0" };
12895
12920
  }
@@ -12904,7 +12929,7 @@ function useMarkers() {
12904
12929
  return { markers: [], version: "1.0" };
12905
12930
  }
12906
12931
  }, [viewer, isInitialized]);
12907
- const importMarkers = useCallback2(
12932
+ const importMarkers = useCallback3(
12908
12933
  (data) => {
12909
12934
  if (!viewer || !isInitialized) {
12910
12935
  console.warn("Viewer not initialized");
@@ -12929,7 +12954,7 @@ function useMarkers() {
12929
12954
  },
12930
12955
  [viewer, isInitialized]
12931
12956
  );
12932
- const clearMarkers = useCallback2(() => {
12957
+ const clearMarkers = useCallback3(() => {
12933
12958
  if (!viewer || !isInitialized) {
12934
12959
  console.warn("Viewer not initialized");
12935
12960
  return;
@@ -12963,7 +12988,7 @@ function useMarkers() {
12963
12988
  }
12964
12989
 
12965
12990
  // packages/viewer-react/src/lib/use-zoom.ts
12966
- 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";
12967
12992
  function useZoom() {
12968
12993
  const { viewer, isInitialized, zoomState: contextZoomState } = useViewerContext();
12969
12994
  const [zoomState, setZoomState] = useState3(contextZoomState);
@@ -13000,7 +13025,7 @@ function useZoom() {
13000
13025
  map.off("zoomend", updateZoomState);
13001
13026
  };
13002
13027
  }, [viewer, isInitialized]);
13003
- const zoomIn = useCallback3(() => {
13028
+ const zoomIn = useCallback4(() => {
13004
13029
  if (!viewer || !isInitialized) {
13005
13030
  console.warn("Viewer not initialized");
13006
13031
  return;
@@ -13018,7 +13043,7 @@ function useZoom() {
13018
13043
  console.error("Failed to zoom in:", error);
13019
13044
  }
13020
13045
  }, [viewer, isInitialized]);
13021
- const zoomOut = useCallback3(() => {
13046
+ const zoomOut = useCallback4(() => {
13022
13047
  if (!viewer || !isInitialized) {
13023
13048
  console.warn("Viewer not initialized");
13024
13049
  return;
@@ -13036,7 +13061,7 @@ function useZoom() {
13036
13061
  console.error("Failed to zoom out:", error);
13037
13062
  }
13038
13063
  }, [viewer, isInitialized]);
13039
- const setZoom = useCallback3(
13064
+ const setZoom = useCallback4(
13040
13065
  (zoom) => {
13041
13066
  if (!viewer || !isInitialized) {
13042
13067
  console.warn("Viewer not initialized");
@@ -13057,13 +13082,13 @@ function useZoom() {
13057
13082
  },
13058
13083
  [viewer, isInitialized]
13059
13084
  );
13060
- const canZoomIn = useCallback3(() => {
13085
+ const canZoomIn = useCallback4(() => {
13061
13086
  if (!zoomState) {
13062
13087
  return false;
13063
13088
  }
13064
13089
  return zoomState.currentZoom < zoomState.maxZoom;
13065
13090
  }, [zoomState]);
13066
- const canZoomOut = useCallback3(() => {
13091
+ const canZoomOut = useCallback4(() => {
13067
13092
  if (!zoomState) {
13068
13093
  return false;
13069
13094
  }
@@ -35,6 +35,8 @@ export interface EdgePDFViewerProps {
35
35
  onMarkerUpdate?: (marker: Marker) => void;
36
36
  /** Callback when a marker is deleted */
37
37
  onMarkerDelete?: (marker: Marker) => void;
38
+ /** Callback when a marker is added (created by user tap/click) */
39
+ onMarkerAdd?: (marker: Marker) => void;
38
40
  /** Default pins to preload (uses internal import) */
39
41
  defaultPins?: Marker[] | MarkerData;
40
42
  /** Children components */
@@ -43,34 +45,20 @@ export interface EdgePDFViewerProps {
43
45
  /**
44
46
  * EdgePDFViewer - Main React component for the EdgePDF viewer
45
47
  *
46
- * This component wraps the viewer functionality in a React component,
47
- * providing the ViewerProvider context to child components.
48
+ * This component initializes the viewer and updates the context.
49
+ * Must be used within a ViewerProvider.
48
50
  *
49
51
  * @example
50
52
  * ```tsx
51
- * function App() {
52
- * const config: ViewerConfig = {
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
- * };
62
- *
63
- * return (
64
- * <EdgePDFViewer
65
- * config={config}
66
- * showZoomControls={true}
67
- * zoomControlsPosition="top-right"
68
- * >
69
- * <MarkerControls />
70
- * </EdgePDFViewer>
71
- * );
72
- * }
53
+ * <ViewerProvider>
54
+ * <App />
55
+ * <EdgePDFViewer
56
+ * config={config}
57
+ * showZoomControls={true}
58
+ * zoomControlsPosition="top-right"
59
+ * />
60
+ * </ViewerProvider>
73
61
  * ```
74
62
  */
75
- export declare function EdgePDFViewer({ config, mapOptions, className, style, showZoomControls, zoomControlsPosition, showZoomLevel, enableAnnotation, showEditButton, showDeleteButton, defaultZoomLevel, onPinsUpdate, onMarkerClick, onMarkerUpdate, onMarkerDelete, defaultPins, children, }: EdgePDFViewerProps): JSX.Element;
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;
76
64
  //# sourceMappingURL=pdf-viewer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pdf-viewer.d.ts","sourceRoot":"","sources":["../../src/lib/pdf-viewer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,MAAM,EACN,UAAU,EACX,MAAM,gBAAgB,CAAC;AAGxB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,MAAM,EAAE,YAAY,CAAC;IACrB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,yCAAyC;IACzC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,qEAAqE;IACrE,oBAAoB,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACrD,+EAA+E;IAC/E,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,OAAO,CAAC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;;;;;;;;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,48 +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
- /** Default pins to preload (uses internal import) */
40
- defaultPins?: Marker[] | MarkerData;
41
23
  /** Children components */
42
24
  children: ReactNode;
43
25
  }
44
26
  /**
45
27
  * ViewerProvider - Provides viewer context to child components
46
28
  *
47
- * Manages the lifecycle of the EdgePdfViewer instance and provides it
48
- * 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.
49
31
  *
50
32
  * @example
51
33
  * ```tsx
52
- * <ViewerProvider config={viewerConfig}>
53
- * <EdgePDFViewer />
34
+ * <ViewerProvider>
35
+ * <App />
54
36
  * </ViewerProvider>
55
37
  * ```
56
38
  */
57
- export declare function ViewerProvider({ config, mapOptions, enableAnnotation, showEditButton, showDeleteButton, onPinsUpdate, onMarkerClick, onMarkerUpdate, onMarkerDelete, defaultPins, children, }: ViewerProviderProps): JSX.Element;
39
+ export declare function ViewerProvider({ children }: ViewerProviderProps): JSX.Element;
58
40
  /**
59
41
  * Hook to access viewer context
60
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,CA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;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;IAC5B,yEAAyE;IACzE,eAAe,EAAE,CACf,OAAO,EAAE,OAAO,CAAC,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.24",
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",