@embedpdf/plugin-zoom 1.0.10 → 1.0.12

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.
Files changed (49) hide show
  1. package/dist/hammer-Bs-QCG8V.cjs +7 -0
  2. package/dist/hammer-Bs-QCG8V.cjs.map +1 -0
  3. package/dist/hammer-e1aXHboh.js +1810 -0
  4. package/dist/hammer-e1aXHboh.js.map +1 -0
  5. package/dist/index.cjs +2 -481
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.ts +1 -147
  8. package/dist/index.js +43 -59
  9. package/dist/index.js.map +1 -1
  10. package/dist/lib/actions.d.ts +20 -0
  11. package/dist/lib/index.d.ts +10 -0
  12. package/dist/lib/manifest.d.ts +4 -0
  13. package/dist/lib/reducer.d.ts +5 -0
  14. package/dist/lib/types.d.ts +84 -0
  15. package/dist/lib/zoom-plugin.d.ts +38 -0
  16. package/dist/preact/adapter.d.ts +5 -0
  17. package/dist/preact/core.d.ts +1 -0
  18. package/dist/preact/index.cjs +2 -262
  19. package/dist/preact/index.cjs.map +1 -1
  20. package/dist/preact/index.d.ts +1 -54
  21. package/dist/preact/index.js +29 -34
  22. package/dist/preact/index.js.map +1 -1
  23. package/dist/preact/interaction-manager.d.ts +1 -0
  24. package/dist/react/adapter.d.ts +2 -0
  25. package/dist/react/core.d.ts +1 -0
  26. package/dist/react/index.cjs +2 -262
  27. package/dist/react/index.cjs.map +1 -1
  28. package/dist/react/index.d.ts +1 -53
  29. package/dist/react/index.js +28 -34
  30. package/dist/react/index.js.map +1 -1
  31. package/dist/react/interaction-manager.d.ts +1 -0
  32. package/dist/shared-preact/components/index.d.ts +2 -0
  33. package/dist/shared-preact/components/marquee-zoom.d.ts +21 -0
  34. package/dist/shared-preact/components/pinch-wrapper.d.ts +7 -0
  35. package/dist/shared-preact/hooks/index.d.ts +2 -0
  36. package/dist/shared-preact/hooks/use-pinch-zoom.d.ts +3 -0
  37. package/dist/shared-preact/hooks/use-zoom.d.ts +15 -0
  38. package/dist/shared-preact/index.d.ts +2 -0
  39. package/dist/shared-react/components/index.d.ts +2 -0
  40. package/dist/shared-react/components/marquee-zoom.d.ts +21 -0
  41. package/dist/shared-react/components/pinch-wrapper.d.ts +7 -0
  42. package/dist/shared-react/hooks/index.d.ts +2 -0
  43. package/dist/shared-react/hooks/use-pinch-zoom.d.ts +3 -0
  44. package/dist/shared-react/hooks/use-zoom.d.ts +15 -0
  45. package/dist/shared-react/index.d.ts +2 -0
  46. package/package.json +18 -17
  47. package/dist/index.d.cts +0 -147
  48. package/dist/preact/index.d.cts +0 -54
  49. package/dist/react/index.d.cts +0 -53
@@ -1,54 +0,0 @@
1
- import * as _embedpdf_plugin_zoom from '@embedpdf/plugin-zoom';
2
- import { ZoomPlugin, ZoomState } from '@embedpdf/plugin-zoom';
3
- import * as preact from 'preact';
4
- import { JSX, ComponentChildren } from 'preact';
5
-
6
- declare const useZoomCapability: () => {
7
- provides: Readonly<_embedpdf_plugin_zoom.ZoomCapability> | null;
8
- isLoading: boolean;
9
- ready: Promise<void>;
10
- };
11
- declare const useZoomPlugin: () => {
12
- plugin: ZoomPlugin | null;
13
- isLoading: boolean;
14
- ready: Promise<void>;
15
- };
16
- declare const useZoom: () => {
17
- state: ZoomState;
18
- provides: Readonly<_embedpdf_plugin_zoom.ZoomCapability> | null;
19
- };
20
-
21
- declare function usePinch(): {
22
- elementRef: preact.RefObject<HTMLDivElement>;
23
- };
24
-
25
- /** @jsxImportSource preact */
26
-
27
- type PinchWrapperProps = Omit<JSX.HTMLAttributes<HTMLDivElement>, 'style'> & {
28
- children: ComponentChildren;
29
- style?: JSX.CSSProperties;
30
- };
31
- declare function PinchWrapper({ children, style, ...props }: PinchWrapperProps): JSX.Element;
32
-
33
- interface MarqueeZoomProps {
34
- /** Index of the page this layer lives on */
35
- pageIndex: number;
36
- /** Scale of the page */
37
- scale: number;
38
- /** Width of the page */
39
- pageWidth: number;
40
- /** Height of the page */
41
- pageHeight: number;
42
- /** Optional CSS class applied to the marquee rectangle */
43
- className?: string;
44
- /** Stroke / fill colours (defaults below) */
45
- stroke?: string;
46
- fill?: string;
47
- }
48
- /**
49
- * Draws a marquee rectangle while the user drags.
50
- * Hook it into the interaction-manager with modeId = 'marqueeZoom'.
51
- */
52
- declare const MarqueeZoom: ({ pageIndex, scale, pageWidth, pageHeight, className, stroke, fill, }: MarqueeZoomProps) => preact.JSX.Element | null;
53
-
54
- export { MarqueeZoom, PinchWrapper, usePinch, useZoom, useZoomCapability, useZoomPlugin };
@@ -1,53 +0,0 @@
1
- import * as _embedpdf_plugin_zoom from '@embedpdf/plugin-zoom';
2
- import { ZoomPlugin, ZoomState } from '@embedpdf/plugin-zoom';
3
- import * as react from 'react';
4
- import { ReactNode } from 'react';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
-
7
- declare const useZoomCapability: () => {
8
- provides: Readonly<_embedpdf_plugin_zoom.ZoomCapability> | null;
9
- isLoading: boolean;
10
- ready: Promise<void>;
11
- };
12
- declare const useZoomPlugin: () => {
13
- plugin: ZoomPlugin | null;
14
- isLoading: boolean;
15
- ready: Promise<void>;
16
- };
17
- declare const useZoom: () => {
18
- state: ZoomState;
19
- provides: Readonly<_embedpdf_plugin_zoom.ZoomCapability> | null;
20
- };
21
-
22
- declare function usePinch(): {
23
- elementRef: react.RefObject<HTMLDivElement>;
24
- };
25
-
26
- type PinchWrapperProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'style'> & {
27
- children: ReactNode;
28
- style?: React.CSSProperties;
29
- };
30
- declare function PinchWrapper({ children, style, ...props }: PinchWrapperProps): react_jsx_runtime.JSX.Element;
31
-
32
- interface MarqueeZoomProps {
33
- /** Index of the page this layer lives on */
34
- pageIndex: number;
35
- /** Scale of the page */
36
- scale: number;
37
- /** Width of the page */
38
- pageWidth: number;
39
- /** Height of the page */
40
- pageHeight: number;
41
- /** Optional CSS class applied to the marquee rectangle */
42
- className?: string;
43
- /** Stroke / fill colours (defaults below) */
44
- stroke?: string;
45
- fill?: string;
46
- }
47
- /**
48
- * Draws a marquee rectangle while the user drags.
49
- * Hook it into the interaction-manager with modeId = 'marqueeZoom'.
50
- */
51
- declare const MarqueeZoom: ({ pageIndex, scale, pageWidth, pageHeight, className, stroke, fill, }: MarqueeZoomProps) => react_jsx_runtime.JSX.Element | null;
52
-
53
- export { MarqueeZoom, PinchWrapper, usePinch, useZoom, useZoomCapability, useZoomPlugin };