@embedpdf/plugin-zoom 1.0.11 → 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.
- package/dist/hammer-Bs-QCG8V.cjs +7 -0
- package/dist/hammer-Bs-QCG8V.cjs.map +1 -0
- package/dist/hammer-e1aXHboh.js +1810 -0
- package/dist/hammer-e1aXHboh.js.map +1 -0
- package/dist/index.cjs +2 -481
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -147
- package/dist/index.js +43 -59
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +20 -0
- package/dist/lib/index.d.ts +10 -0
- package/dist/lib/manifest.d.ts +4 -0
- package/dist/lib/reducer.d.ts +5 -0
- package/dist/lib/types.d.ts +84 -0
- package/dist/lib/zoom-plugin.d.ts +38 -0
- package/dist/preact/adapter.d.ts +5 -0
- package/dist/preact/core.d.ts +1 -0
- package/dist/preact/index.cjs +2 -262
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.d.ts +1 -54
- package/dist/preact/index.js +29 -34
- package/dist/preact/index.js.map +1 -1
- package/dist/preact/interaction-manager.d.ts +1 -0
- package/dist/react/adapter.d.ts +2 -0
- package/dist/react/core.d.ts +1 -0
- package/dist/react/index.cjs +2 -262
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +1 -53
- package/dist/react/index.js +28 -34
- package/dist/react/index.js.map +1 -1
- package/dist/react/interaction-manager.d.ts +1 -0
- package/dist/shared-preact/components/index.d.ts +2 -0
- package/dist/shared-preact/components/marquee-zoom.d.ts +21 -0
- package/dist/shared-preact/components/pinch-wrapper.d.ts +7 -0
- package/dist/shared-preact/hooks/index.d.ts +2 -0
- package/dist/shared-preact/hooks/use-pinch-zoom.d.ts +3 -0
- package/dist/shared-preact/hooks/use-zoom.d.ts +15 -0
- package/dist/shared-preact/index.d.ts +2 -0
- package/dist/shared-react/components/index.d.ts +2 -0
- package/dist/shared-react/components/marquee-zoom.d.ts +21 -0
- package/dist/shared-react/components/pinch-wrapper.d.ts +7 -0
- package/dist/shared-react/hooks/index.d.ts +2 -0
- package/dist/shared-react/hooks/use-pinch-zoom.d.ts +3 -0
- package/dist/shared-react/hooks/use-zoom.d.ts +15 -0
- package/dist/shared-react/index.d.ts +2 -0
- package/package.json +18 -17
- package/dist/index.d.cts +0 -147
- package/dist/preact/index.d.cts +0 -54
- package/dist/react/index.d.cts +0 -53
package/dist/preact/index.d.cts
DELETED
|
@@ -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 };
|
package/dist/react/index.d.cts
DELETED
|
@@ -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 };
|