@embedpdf/plugin-capture 1.5.0 → 2.0.0-next.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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +215 -35
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +33 -0
- package/dist/lib/capture-plugin.d.ts +12 -3
- package/dist/lib/index.d.ts +5 -2
- package/dist/lib/reducer.d.ts +6 -0
- package/dist/lib/types.d.ts +27 -2
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +25 -16
- package/dist/preact/index.js.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +25 -16
- package/dist/react/index.js.map +1 -1
- package/dist/shared/components/marquee-capture.d.ts +4 -2
- package/dist/shared/hooks/use-capture.d.ts +8 -4
- package/dist/shared-preact/components/marquee-capture.d.ts +4 -2
- package/dist/shared-preact/hooks/use-capture.d.ts +8 -4
- package/dist/shared-react/components/marquee-capture.d.ts +4 -2
- package/dist/shared-react/hooks/use-capture.d.ts +8 -4
- package/dist/svelte/components/MarqueeCapture.svelte.d.ts +3 -1
- package/dist/svelte/hooks/use-capture.svelte.d.ts +11 -5
- package/dist/svelte/index.cjs +1 -1
- package/dist/svelte/index.cjs.map +1 -1
- package/dist/svelte/index.js +54 -35
- package/dist/svelte/index.js.map +1 -1
- package/dist/vue/components/marquee-capture.vue.d.ts +5 -2
- package/dist/vue/hooks/use-capture.d.ts +13 -4
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.js +53 -34
- package/dist/vue/index.js.map +1 -1
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/svelte/hooks/use-capture.svelte.ts","../../src/svelte/components/MarqueeCapture.svelte"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/svelte/hooks/use-capture.svelte.ts","../../src/svelte/components/MarqueeCapture.svelte"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/svelte';\nimport {\n CapturePlugin,\n CaptureDocumentState,\n initialDocumentState,\n CaptureScope,\n} from '@embedpdf/plugin-capture';\n\nexport const useCaptureCapability = () => useCapability<CapturePlugin>(CapturePlugin.id);\nexport const useCapturePlugin = () => usePlugin<CapturePlugin>(CapturePlugin.id);\n\n// Define the return type explicitly to maintain type safety\ninterface UseCaptureReturn {\n provides: CaptureScope | null;\n state: CaptureDocumentState;\n}\n\n/**\n * Hook for capture state for a specific document\n * @param getDocumentId Function that returns the document ID\n */\nexport const useCapture = (getDocumentId: () => string | null): UseCaptureReturn => {\n const capability = useCaptureCapability();\n\n let state = $state<CaptureDocumentState>(initialDocumentState);\n\n // Reactive documentId\n const documentId = $derived(getDocumentId());\n\n // Scoped capability for current docId\n const scopedProvides = $derived(\n capability.provides && documentId ? capability.provides.forDocument(documentId) : null,\n );\n\n $effect(() => {\n const provides = capability.provides;\n const docId = documentId;\n\n if (!provides || !docId) {\n state = initialDocumentState;\n return;\n }\n\n const scope = provides.forDocument(docId);\n\n // Get initial state\n state = scope.getState();\n\n // Subscribe to state changes for this document\n return scope.onStateChange((newState) => {\n state = newState;\n });\n });\n\n return {\n get provides() {\n return scopedProvides;\n },\n get state() {\n return state;\n },\n };\n};\n","<script lang=\"ts\">\n import type { Rect } from '@embedpdf/models';\n import { useDocumentState } from '@embedpdf/core/svelte';\n import { useCaptureCapability } from '../hooks/use-capture.svelte';\n\n interface MarqueeCaptureProps {\n /** Document ID */\n documentId: string;\n /** Index of the page this layer lives on */\n pageIndex: number;\n /** Scale of the page */\n scale?: number;\n /** Optional CSS class applied to the marquee rectangle */\n class?: string;\n /** Stroke / fill colours (defaults below) */\n stroke?: string;\n fill?: string;\n }\n\n let {\n documentId,\n pageIndex,\n scale: scaleOverride,\n class: propsClass,\n stroke = 'rgba(33,150,243,0.8)',\n fill = 'rgba(33,150,243,0.15)',\n }: MarqueeCaptureProps = $props();\n\n const captureCapability = useCaptureCapability();\n const documentState = useDocumentState(() => documentId);\n\n let rect = $state<Rect | null>(null);\n\n const actualScale = $derived(\n scaleOverride !== undefined ? scaleOverride : (documentState.current?.scale ?? 1),\n );\n\n $effect(() => {\n rect = null;\n\n if (!captureCapability.provides) {\n return;\n }\n\n return captureCapability.provides.registerMarqueeOnPage({\n documentId,\n pageIndex,\n scale: actualScale,\n callback: {\n onPreview: (newRect) => {\n rect = newRect;\n },\n },\n });\n });\n</script>\n\n{#if rect}\n <div\n style:position=\"absolute\"\n style:pointer-events=\"none\"\n style:left={`${rect.origin.x * actualScale}px`}\n style:top={`${rect.origin.y * actualScale}px`}\n style:width={`${rect.size.width * actualScale}px`}\n style:height={`${rect.size.height * actualScale}px`}\n style:border={`1px solid ${stroke}`}\n style:background={fill}\n style:box-sizing=\"border-box\"\n class={propsClass}\n ></div>\n{/if}\n"],"names":["useCaptureCapability","useCapability","CapturePlugin","id","stroke","fill","captureCapability","documentState","useDocumentState","$$props","documentId","rect","actualScale","$","derived","scale","_a","current","user_effect","set","provides","registerMarqueeOnPage","pageIndex","callback","onPreview","newRect","left","get","origin","x","top","y","width","size","height","consequent","getDocumentId","capability","state","initialDocumentState","scopedProvides","forDocument","docId","scope","getState","onStateChange","newState","usePlugin"],"mappings":"ugBAQaA,EAAA,IAA6BC,gBAA6BC,EAAAA,cAAcC,uFCgBjF,IAAAC,sBAAS,wBACTC,oBAAO,yBAGH,MAAAC,EAAoBN,IACpBO,EAAgBC,EAAAA,iBAAgB,IAAAC,EAAAC,YAElC,IAAAC,UAA2B,YAEzBC,EAAWC,EAAAC,QAAA,WAAA,YACG,IADHL,EAAAM,MACYN,EAAAM,OAAoB,OAAAC,EAAAT,EAAcU,kBAASF,QAAS,IAGjFF,EAAAK,YAAO,QACLL,EAAAM,IAAAR,EAAO,MAEFL,EAAkBc,gBAIhBd,EAAkBc,SAASC,sBAAqB,CACrDX,WAAUD,EAAAC,WACVY,UAASb,EAAAa,UACTP,YAAOH,GACPW,SAAQ,CACNC,UAAYC,IACVZ,EAAAM,IAAAR,EAAOc,GAAO,8LAWLC,KAAAb,EAAAc,IAAAhB,GAAKiB,OAAOC,QAAIjB,GAAhB,KACDkB,IAAAjB,EAAAc,IAAAhB,GAAKiB,OAAOG,QAAInB,GAAhB,KACEoB,MAAAnB,EAAAc,IAAAhB,GAAKsB,KAAKD,YAAQpB,GAAlB,KACCsB,OAAArB,EAAAc,IAAAhB,GAAKsB,KAAKC,aAAStB,GAAnB,yBACUR,iBACTC,kEATjBM,MAAIwB,0BAFT,qBDlC2BC,IACnB,MAAAC,EAAarC,IAEf,IAAAsC,kBAAqCC,EAAAA,uBAGnC,MAAA7B,YAAsB0B,GAGtBI,EAAA3B,EAAAC,QAAA,IACJuB,EAAWjB,gBAAYV,GAAa2B,EAAWjB,SAASqB,kBAAY/B,IAAc,aAGpFG,EAAAK,uBACQE,EAAWiB,EAAWjB,SACtBsB,QAAQhC,OAETU,IAAasB,cAChB7B,EAAAM,IAAAmB,EAAQC,EAAAA,sBAAA,GAIJ,MAAAI,EAAQvB,EAASqB,YAAYC,GAM5B,aAHPJ,EAAQK,EAAMC,YAAA,GAGPD,EAAME,cAAeC,IAC1BjC,EAAAM,IAAAmB,EAAQQ,GAAA,QAKN,YAAA1B,gBACKoB,EACT,EACI,SAAAF,gBACKA,EACT,4DAnDS,IAAyBS,YAAyB7C,EAAAA,cAAcC"}
|
package/dist/svelte/index.js
CHANGED
|
@@ -1,38 +1,62 @@
|
|
|
1
1
|
import * as $ from "svelte/internal/client";
|
|
2
|
-
import {
|
|
2
|
+
import { useCapability, usePlugin, useDocumentState } from "@embedpdf/core/svelte";
|
|
3
|
+
import { CapturePlugin, initialDocumentState } from "@embedpdf/plugin-capture";
|
|
3
4
|
export * from "@embedpdf/plugin-capture";
|
|
4
|
-
import { useCapability, usePlugin } from "@embedpdf/core/svelte";
|
|
5
5
|
import "svelte/internal/disclose-version";
|
|
6
6
|
const useCaptureCapability = () => useCapability(CapturePlugin.id);
|
|
7
7
|
const useCapturePlugin = () => usePlugin(CapturePlugin.id);
|
|
8
|
-
const useCapture = () => {
|
|
8
|
+
const useCapture = (getDocumentId) => {
|
|
9
9
|
const capability = useCaptureCapability();
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
isMarqueeCaptureActive: false
|
|
15
|
-
});
|
|
10
|
+
let state = $.state($.proxy(initialDocumentState));
|
|
11
|
+
const documentId = $.derived(getDocumentId);
|
|
12
|
+
const scopedProvides = $.derived(() => capability.provides && $.get(documentId) ? capability.provides.forDocument($.get(documentId)) : null);
|
|
16
13
|
$.user_effect(() => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
const provides = capability.provides;
|
|
15
|
+
const docId = $.get(documentId);
|
|
16
|
+
if (!provides || !docId) {
|
|
17
|
+
$.set(state, initialDocumentState, true);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const scope = provides.forDocument(docId);
|
|
21
|
+
$.set(state, scope.getState(), true);
|
|
22
|
+
return scope.onStateChange((newState) => {
|
|
23
|
+
$.set(state, newState, true);
|
|
20
24
|
});
|
|
21
25
|
});
|
|
22
|
-
return
|
|
26
|
+
return {
|
|
27
|
+
get provides() {
|
|
28
|
+
return $.get(scopedProvides);
|
|
29
|
+
},
|
|
30
|
+
get state() {
|
|
31
|
+
return $.get(state);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
23
34
|
};
|
|
24
35
|
var root_1 = $.from_html(`<div></div>`);
|
|
25
36
|
function MarqueeCapture($$anchor, $$props) {
|
|
26
37
|
$.push($$props, true);
|
|
27
38
|
let stroke = $.prop($$props, "stroke", 3, "rgba(33,150,243,0.8)"), fill = $.prop($$props, "fill", 3, "rgba(33,150,243,0.15)");
|
|
28
39
|
const captureCapability = useCaptureCapability();
|
|
40
|
+
const documentState = useDocumentState(() => $$props.documentId);
|
|
29
41
|
let rect = $.state(null);
|
|
42
|
+
const actualScale = $.derived(() => {
|
|
43
|
+
var _a;
|
|
44
|
+
return $$props.scale !== void 0 ? $$props.scale : ((_a = documentState.current) == null ? void 0 : _a.scale) ?? 1;
|
|
45
|
+
});
|
|
30
46
|
$.user_effect(() => {
|
|
31
|
-
|
|
47
|
+
$.set(rect, null);
|
|
48
|
+
if (!captureCapability.provides) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
32
51
|
return captureCapability.provides.registerMarqueeOnPage({
|
|
52
|
+
documentId: $$props.documentId,
|
|
33
53
|
pageIndex: $$props.pageIndex,
|
|
34
|
-
scale:
|
|
35
|
-
callback: {
|
|
54
|
+
scale: $.get(actualScale),
|
|
55
|
+
callback: {
|
|
56
|
+
onPreview: (newRect) => {
|
|
57
|
+
$.set(rect, newRect, true);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
36
60
|
});
|
|
37
61
|
});
|
|
38
62
|
var fragment = $.comment();
|
|
@@ -41,25 +65,20 @@ function MarqueeCapture($$anchor, $$props) {
|
|
|
41
65
|
var consequent = ($$anchor2) => {
|
|
42
66
|
var div = root_1();
|
|
43
67
|
let styles;
|
|
44
|
-
$.template_effect(
|
|
45
|
-
(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
()
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
background: fill(),
|
|
59
|
-
"box-sizing": "border-box"
|
|
60
|
-
})
|
|
61
|
-
]
|
|
62
|
-
);
|
|
68
|
+
$.template_effect(() => {
|
|
69
|
+
$.set_class(div, 1, $.clsx($$props.class));
|
|
70
|
+
styles = $.set_style(div, "", styles, {
|
|
71
|
+
position: "absolute",
|
|
72
|
+
"pointer-events": "none",
|
|
73
|
+
left: `${$.get(rect).origin.x * $.get(actualScale)}px`,
|
|
74
|
+
top: `${$.get(rect).origin.y * $.get(actualScale)}px`,
|
|
75
|
+
width: `${$.get(rect).size.width * $.get(actualScale)}px`,
|
|
76
|
+
height: `${$.get(rect).size.height * $.get(actualScale)}px`,
|
|
77
|
+
border: `1px solid ${stroke()}`,
|
|
78
|
+
background: fill(),
|
|
79
|
+
"box-sizing": "border-box"
|
|
80
|
+
});
|
|
81
|
+
});
|
|
63
82
|
$.append($$anchor2, div);
|
|
64
83
|
};
|
|
65
84
|
$.if(node, ($$render) => {
|
package/dist/svelte/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/svelte/hooks/use-capture.svelte.ts","../../src/svelte/components/MarqueeCapture.svelte"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/svelte/hooks/use-capture.svelte.ts","../../src/svelte/components/MarqueeCapture.svelte"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/svelte';\nimport {\n CapturePlugin,\n CaptureDocumentState,\n initialDocumentState,\n CaptureScope,\n} from '@embedpdf/plugin-capture';\n\nexport const useCaptureCapability = () => useCapability<CapturePlugin>(CapturePlugin.id);\nexport const useCapturePlugin = () => usePlugin<CapturePlugin>(CapturePlugin.id);\n\n// Define the return type explicitly to maintain type safety\ninterface UseCaptureReturn {\n provides: CaptureScope | null;\n state: CaptureDocumentState;\n}\n\n/**\n * Hook for capture state for a specific document\n * @param getDocumentId Function that returns the document ID\n */\nexport const useCapture = (getDocumentId: () => string | null): UseCaptureReturn => {\n const capability = useCaptureCapability();\n\n let state = $state<CaptureDocumentState>(initialDocumentState);\n\n // Reactive documentId\n const documentId = $derived(getDocumentId());\n\n // Scoped capability for current docId\n const scopedProvides = $derived(\n capability.provides && documentId ? capability.provides.forDocument(documentId) : null,\n );\n\n $effect(() => {\n const provides = capability.provides;\n const docId = documentId;\n\n if (!provides || !docId) {\n state = initialDocumentState;\n return;\n }\n\n const scope = provides.forDocument(docId);\n\n // Get initial state\n state = scope.getState();\n\n // Subscribe to state changes for this document\n return scope.onStateChange((newState) => {\n state = newState;\n });\n });\n\n return {\n get provides() {\n return scopedProvides;\n },\n get state() {\n return state;\n },\n };\n};\n","<script lang=\"ts\">\n import type { Rect } from '@embedpdf/models';\n import { useDocumentState } from '@embedpdf/core/svelte';\n import { useCaptureCapability } from '../hooks/use-capture.svelte';\n\n interface MarqueeCaptureProps {\n /** Document ID */\n documentId: string;\n /** Index of the page this layer lives on */\n pageIndex: number;\n /** Scale of the page */\n scale?: number;\n /** Optional CSS class applied to the marquee rectangle */\n class?: string;\n /** Stroke / fill colours (defaults below) */\n stroke?: string;\n fill?: string;\n }\n\n let {\n documentId,\n pageIndex,\n scale: scaleOverride,\n class: propsClass,\n stroke = 'rgba(33,150,243,0.8)',\n fill = 'rgba(33,150,243,0.15)',\n }: MarqueeCaptureProps = $props();\n\n const captureCapability = useCaptureCapability();\n const documentState = useDocumentState(() => documentId);\n\n let rect = $state<Rect | null>(null);\n\n const actualScale = $derived(\n scaleOverride !== undefined ? scaleOverride : (documentState.current?.scale ?? 1),\n );\n\n $effect(() => {\n rect = null;\n\n if (!captureCapability.provides) {\n return;\n }\n\n return captureCapability.provides.registerMarqueeOnPage({\n documentId,\n pageIndex,\n scale: actualScale,\n callback: {\n onPreview: (newRect) => {\n rect = newRect;\n },\n },\n });\n });\n</script>\n\n{#if rect}\n <div\n style:position=\"absolute\"\n style:pointer-events=\"none\"\n style:left={`${rect.origin.x * actualScale}px`}\n style:top={`${rect.origin.y * actualScale}px`}\n style:width={`${rect.size.width * actualScale}px`}\n style:height={`${rect.size.height * actualScale}px`}\n style:border={`1px solid ${stroke}`}\n style:background={fill}\n style:box-sizing=\"border-box\"\n class={propsClass}\n ></div>\n{/if}\n"],"names":[],"mappings":";;;;;AAQa,MAAA,uBAAA,MAA6B,cAA6B,cAAc,EAAE;AAC1E,MAAA,mBAAA,MAAyB,UAAyB,cAAc,EAAE;MAYlE,aAAA,CAAc,kBAAyD;AAC5E,QAAA,aAAa,qBAAA;AAEf,MAAA,wBAAqC,oBAAoB,CAAA;AAGvD,QAAA,uBAAsB,aAAA;AAGtB,QAAA,iBAAA,EAAA,QAAA,MACJ,WAAW,kBAAY,UAAA,IAAa,WAAW,SAAS,kBAAY,UAAU,CAAA,IAAI,IAAA;AAGpF,IAAA,kBAAc;UACN,WAAW,WAAW;AACtB,UAAA,cAAQ,UAAA;SAET,YAAA,CAAa,OAAO;AACvB,QAAA,IAAA,OAAQ,sBAAA,IAAA;;IAEV;AAEM,UAAA,QAAQ,SAAS,YAAY,KAAK;UAGxC,OAAQ,MAAM,SAAA,GAAA,IAAA;AAGP,WAAA,MAAM,cAAA,CAAe,aAAa;AACvC,QAAA,IAAA,OAAQ,UAAA,IAAA;AAAA,IACV,CAAC;AAAA,EACH,CAAC;;IAGK,IAAA,WAAW;mBACN,cAAA;AAAA,IACT;AAAA,IACI,IAAA,QAAQ;mBACH,KAAA;AAAA,IACT;AAAA;AAEJ;;2CC9DA;;AAwBI,MAAA,sCAAS,sBAAsB,GAC/B,kCAAO,uBAAuB;AAG1B,QAAA,oBAAoB,qBAAoB;AACxC,QAAA,gBAAgB,iBAAgB,MAAA,QAAA,UAAA;AAElC,MAAA,eAA2B,IAAI;QAE7B,cAAW,EAAA,QAAA,MAAA;;AAAA,mBAAA,UACG,SAAS,QAAA,UAAoB,mBAAc,YAAd,mBAAuB,UAAS;AAAA,GAAC;AAGlF,IAAA,YAAO,MAAO;AACZ,MAAA,IAAA,MAAO,IAAI;SAEN,kBAAkB,UAAU;;IAEjC;WAEO,kBAAkB,SAAS,sBAAqB;AAAA,MACrD,YAAU,QAAA;AAAA,MACV,WAAS,QAAA;AAAA,MACT,aAAO,WAAW;AAAA,MAClB,UAAQ;AAAA,QACN,WAAS,CAAG,YAAY;AACtB,YAAA,IAAA,MAAO,SAAO,IAAA;AAAA,QAChB;AAAA;;EAGN,CAAC;;;;;;;;;;;;UAOgB,MAAA,GAAA,EAAA,IAAA,IAAI,EAAC,OAAO,UAAI,WAAW,CAAA;AAAA,UAC5B,KAAA,GAAA,EAAA,IAAA,IAAI,EAAC,OAAO,UAAI,WAAW,CAAA;AAAA,UACzB,OAAA,GAAA,EAAA,IAAA,IAAI,EAAC,KAAK,cAAQ,WAAW,CAAA;AAAA,UAC5B,QAAA,GAAA,EAAA,IAAA,IAAI,EAAC,KAAK,eAAS,WAAW,CAAA;AAAA,+BACpB,OAAM,CAAA;AAAA,sBACf,KAAI;AAAA;;;;;;gBATrB,IAAI,EAAA,UAAA,UAAA;AAAA;;;;AAFT;"}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
interface MarqueeCaptureProps {
|
|
2
|
+
/** Document ID */
|
|
3
|
+
documentId: string;
|
|
2
4
|
/** Index of the page this layer lives on */
|
|
3
5
|
pageIndex: number;
|
|
4
6
|
/** Scale of the page */
|
|
5
|
-
scale
|
|
7
|
+
scale?: number;
|
|
6
8
|
/** Optional CSS class applied to the marquee rectangle */
|
|
7
9
|
className?: string;
|
|
8
10
|
/** Stroke / fill colours (defaults below) */
|
|
9
11
|
stroke?: string;
|
|
10
12
|
fill?: string;
|
|
11
13
|
}
|
|
12
|
-
declare const
|
|
14
|
+
declare const __VLS_export: import('vue').DefineComponent<MarqueeCaptureProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MarqueeCaptureProps> & Readonly<{}>, {
|
|
13
15
|
fill: string;
|
|
14
16
|
stroke: string;
|
|
15
17
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
16
19
|
export default _default;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import { CapturePlugin } from '../../lib/index.ts';
|
|
1
|
+
import { CapturePlugin, CaptureDocumentState } from '../../lib/index.ts';
|
|
2
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
3
|
export declare const useCaptureCapability: () => import('@embedpdf/core/vue').CapabilityState<Readonly<import('../../lib/index.ts').CaptureCapability>>;
|
|
3
4
|
export declare const useCapturePlugin: () => import('@embedpdf/core/vue').PluginState<CapturePlugin>;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Hook for capture state for a specific document
|
|
7
|
+
* @param documentId Document ID (can be ref, computed, getter, or plain value)
|
|
8
|
+
*/
|
|
9
|
+
export declare const useCapture: (documentId: MaybeRefOrGetter<string>) => {
|
|
10
|
+
state: import('vue').Ref<{
|
|
11
|
+
isMarqueeCaptureActive: boolean;
|
|
12
|
+
}, CaptureDocumentState | {
|
|
13
|
+
isMarqueeCaptureActive: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
provides: import('vue').ComputedRef<import('../../lib/index.ts').CaptureScope | null>;
|
|
7
16
|
};
|
package/dist/vue/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core/vue"),t=require("@embedpdf/plugin-capture"),a=require("vue"),u=()=>e.useCapability(t.CapturePlugin.id),r=a.defineComponent({__name:"marquee-capture",props:{documentId:{},pageIndex:{},scale:{},className:{},stroke:{default:"rgba(33,150,243,0.8)"},fill:{default:"rgba(33,150,243,0.15)"}},setup(t){const r=t,{provides:l}=u(),o=e.useDocumentState(()=>r.documentId),n=a.ref(null),i=a.computed(()=>{var e;return void 0!==r.scale?r.scale:(null==(e=o.value)?void 0:e.scale)??1});return a.watch([l,()=>r.documentId,()=>r.pageIndex,i],([e,t,a,u],r,l)=>{if(!e)return void(n.value=null);const o=e.registerMarqueeOnPage({documentId:t,pageIndex:a,scale:u,callback:{onPreview:e=>{n.value=e}}});l(()=>{null==o||o()})},{immediate:!0}),(e,u)=>n.value?(a.openBlock(),a.createElementBlock("div",{key:0,style:a.normalizeStyle({position:"absolute",pointerEvents:"none",left:n.value.origin.x*i.value+"px",top:n.value.origin.y*i.value+"px",width:n.value.size.width*i.value+"px",height:n.value.size.height*i.value+"px",border:`1px solid ${t.stroke}`,background:t.fill,boxSizing:"border-box"}),class:a.normalizeClass(t.className)},null,6)):a.createCommentVNode("",!0)}});exports.MarqueeCapture=r,exports.useCapture=e=>{const{provides:r}=u(),l=a.ref(t.initialDocumentState);return a.watch([r,()=>a.toValue(e)],([e,t],a,u)=>{if(e&&t){const a=e.forDocument(t);l.value=a.getState();u(a.onStateChange(e=>{l.value=e}))}},{immediate:!0}),{state:l,provides:a.computed(()=>{var t;return(null==(t=r.value)?void 0:t.forDocument(a.toValue(e)))??null})}},exports.useCaptureCapability=u,exports.useCapturePlugin=()=>e.usePlugin(t.CapturePlugin.id),Object.keys(t).forEach(e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/vue/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/vue/hooks/use-capture.ts","../../src/vue/components/marquee-capture.vue"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/vue';\nimport {
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/vue/hooks/use-capture.ts","../../src/vue/components/marquee-capture.vue"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/vue';\nimport {\n CapturePlugin,\n CaptureDocumentState,\n initialDocumentState,\n} from '@embedpdf/plugin-capture';\nimport { ref, watch, toValue, MaybeRefOrGetter, computed } from 'vue';\n\nexport const useCaptureCapability = () => useCapability<CapturePlugin>(CapturePlugin.id);\nexport const useCapturePlugin = () => usePlugin<CapturePlugin>(CapturePlugin.id);\n\n/**\n * Hook for capture state for a specific document\n * @param documentId Document ID (can be ref, computed, getter, or plain value)\n */\nexport const useCapture = (documentId: MaybeRefOrGetter<string>) => {\n const { provides } = useCaptureCapability();\n const state = ref<CaptureDocumentState>(initialDocumentState);\n\n watch(\n [provides, () => toValue(documentId)],\n ([providesValue, docId], _, onCleanup) => {\n if (providesValue && docId) {\n const scope = providesValue.forDocument(docId);\n state.value = scope.getState();\n\n const unsubscribe = scope.onStateChange((newState) => {\n state.value = newState;\n });\n onCleanup(unsubscribe);\n }\n },\n { immediate: true },\n );\n\n return {\n state,\n provides: computed(() => provides.value?.forDocument(toValue(documentId)) ?? null),\n };\n};\n","<template>\n <div\n v-if=\"rect\"\n :style=\"{\n position: 'absolute',\n pointerEvents: 'none',\n left: `${rect.origin.x * actualScale}px`,\n top: `${rect.origin.y * actualScale}px`,\n width: `${rect.size.width * actualScale}px`,\n height: `${rect.size.height * actualScale}px`,\n border: `1px solid ${stroke}`,\n background: fill,\n boxSizing: 'border-box',\n }\"\n :class=\"className\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, watch } from 'vue';\nimport type { Rect } from '@embedpdf/models';\nimport { useDocumentState } from '@embedpdf/core/vue';\nimport { useCaptureCapability } from '../hooks/use-capture';\n\ninterface MarqueeCaptureProps {\n /** Document ID */\n documentId: string;\n /** Index of the page this layer lives on */\n pageIndex: number;\n /** Scale of the page */\n scale?: number;\n /** Optional CSS class applied to the marquee rectangle */\n className?: string;\n /** Stroke / fill colours (defaults below) */\n stroke?: string;\n fill?: string;\n}\n\nconst props = withDefaults(defineProps<MarqueeCaptureProps>(), {\n stroke: 'rgba(33,150,243,0.8)',\n fill: 'rgba(33,150,243,0.15)',\n});\n\nconst { provides: capturePlugin } = useCaptureCapability();\nconst documentState = useDocumentState(() => props.documentId);\nconst rect = ref<Rect | null>(null);\n\nconst actualScale = computed(() => {\n if (props.scale !== undefined) return props.scale;\n return documentState.value?.scale ?? 1;\n});\n\nwatch(\n [capturePlugin, () => props.documentId, () => props.pageIndex, actualScale],\n ([plugin, docId, pageIdx, scale], _, onCleanup) => {\n if (!plugin) {\n rect.value = null;\n return;\n }\n\n const unregister = plugin.registerMarqueeOnPage({\n documentId: docId,\n pageIndex: pageIdx,\n scale,\n callback: {\n onPreview: (newRect) => {\n rect.value = newRect;\n },\n },\n });\n\n onCleanup(() => {\n unregister?.();\n });\n },\n { immediate: true },\n);\n</script>\n"],"names":["useCaptureCapability","useCapability","CapturePlugin","id","props","__props","provides","capturePlugin","documentState","useDocumentState","documentId","rect","ref","actualScale","computed","scale","_a","value","watch","pageIndex","plugin","docId","pageIdx","_","onCleanup","unregister","registerMarqueeOnPage","callback","onPreview","newRect","immediate","_createElementBlock","style","_normalizeStyle","left","origin","x","top","y","width","size","height","stroke","fill","class","className","state","initialDocumentState","toValue","providesValue","scope","forDocument","getState","onStateChange","newState","usePlugin"],"mappings":"6KAQaA,EAAuB,IAAMC,gBAA6BC,EAAAA,cAAcC,mMC8BrF,MAAMC,EAAQC,GAKNC,SAAUC,GAAkBP,IAC9BQ,EAAgBC,EAAAA,iBAAiB,IAAML,EAAMM,YAC7CC,EAAOC,EAAAA,IAAiB,MAExBC,EAAcC,EAAAA,SAAS,WAC3B,YAAoB,IAAhBV,EAAMW,MAA4BX,EAAMW,OACrC,OAAAC,EAAAR,EAAcS,YAAd,EAAAD,EAAqBD,QAAS,WAGvCG,EAAAA,MACE,CAACX,EAAe,IAAMH,EAAMM,WAAY,IAAMN,EAAMe,UAAWN,GAC/D,EAAEO,EAAQC,EAAOC,EAASP,GAAQQ,EAAGC,KACnC,IAAKJ,EAEH,YADAT,EAAKM,MAAQ,MAIf,MAAMQ,EAAaL,EAAOM,sBAAsB,CAC9ChB,WAAYW,EACZF,UAAWG,EACXP,QACAY,SAAU,CACRC,UAAYC,IACVlB,EAAKM,MAAQY,MAKnBL,EAAU,KACR,MAAAC,GAAAA,OAGJ,CAAEK,WAAW,WAzELnB,EAAAM,qBADRc,EAAAA,mBAcE,MAAA,OAZCC,MAAKC,EAAAA,eAAA,0CAA4EC,KAAAvB,EAAAM,MAAKkB,OAAOC,EAAIvB,EAAAI,MAAhB,KAA+CoB,IAAA1B,EAAAM,MAAKkB,OAAOG,EAAIzB,EAAAI,MAAhB,KAAiDsB,MAAA5B,EAAAM,MAAKuB,KAAKD,MAAQ1B,EAAAI,MAAlB,KAAoDwB,OAAA9B,EAAAM,MAAKuB,KAAKC,OAAS5B,EAAAI,MAAnB,yBAA+DZ,EAAAqC,oBAA4BrC,EAAAsC,8BAWhUC,uBAAOvC,EAAAwC,gGDCenC,IACzB,MAAMJ,SAAEA,GAAaN,IACf8C,EAAQlC,EAAAA,IAA0BmC,wBAkBxC,OAhBA7B,EAAAA,MACE,CAACZ,EAAU,IAAM0C,UAAQtC,IACzB,EAAEuC,EAAe5B,GAAQE,EAAGC,KAC1B,GAAIyB,GAAiB5B,EAAO,CAC1B,MAAM6B,EAAQD,EAAcE,YAAY9B,GACxCyB,EAAM7B,MAAQiC,EAAME,WAKpB5B,EAHoB0B,EAAMG,cAAeC,IACvCR,EAAM7B,MAAQqC,IAGlB,GAEF,CAAExB,WAAW,IAGR,CACLgB,QACAxC,SAAUQ,EAAAA,SAAS,WAAM,OAAA,OAAAE,EAAAV,EAASW,YAAT,EAAAD,EAAgBmC,YAAYH,EAAAA,QAAQtC,MAAgB,iEA5BjD,IAAM6C,YAAyBrD,EAAAA,cAAcC"}
|
package/dist/vue/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { useCapability, usePlugin } from "@embedpdf/core/vue";
|
|
2
|
-
import { CapturePlugin } from "@embedpdf/plugin-capture";
|
|
1
|
+
import { useCapability, usePlugin, useDocumentState } from "@embedpdf/core/vue";
|
|
2
|
+
import { CapturePlugin, initialDocumentState } from "@embedpdf/plugin-capture";
|
|
3
3
|
export * from "@embedpdf/plugin-capture";
|
|
4
|
-
import { ref, watch,
|
|
4
|
+
import { ref, watch, toValue, computed, defineComponent, createElementBlock, createCommentVNode, openBlock, normalizeClass, normalizeStyle } from "vue";
|
|
5
5
|
const useCaptureCapability = () => useCapability(CapturePlugin.id);
|
|
6
6
|
const useCapturePlugin = () => usePlugin(CapturePlugin.id);
|
|
7
|
-
const useCapture = () => {
|
|
7
|
+
const useCapture = (documentId) => {
|
|
8
8
|
const { provides } = useCaptureCapability();
|
|
9
|
-
const
|
|
9
|
+
const state = ref(initialDocumentState);
|
|
10
10
|
watch(
|
|
11
|
-
provides,
|
|
12
|
-
(providesValue, _, onCleanup) => {
|
|
13
|
-
if (providesValue) {
|
|
14
|
-
const
|
|
15
|
-
|
|
11
|
+
[provides, () => toValue(documentId)],
|
|
12
|
+
([providesValue, docId], _, onCleanup) => {
|
|
13
|
+
if (providesValue && docId) {
|
|
14
|
+
const scope = providesValue.forDocument(docId);
|
|
15
|
+
state.value = scope.getState();
|
|
16
|
+
const unsubscribe = scope.onStateChange((newState) => {
|
|
17
|
+
state.value = newState;
|
|
16
18
|
});
|
|
17
19
|
onCleanup(unsubscribe);
|
|
18
20
|
}
|
|
@@ -20,13 +22,17 @@ const useCapture = () => {
|
|
|
20
22
|
{ immediate: true }
|
|
21
23
|
);
|
|
22
24
|
return {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
state,
|
|
26
|
+
provides: computed(() => {
|
|
27
|
+
var _a;
|
|
28
|
+
return ((_a = provides.value) == null ? void 0 : _a.forDocument(toValue(documentId))) ?? null;
|
|
29
|
+
})
|
|
25
30
|
};
|
|
26
31
|
};
|
|
27
32
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
28
33
|
__name: "marquee-capture",
|
|
29
34
|
props: {
|
|
35
|
+
documentId: {},
|
|
30
36
|
pageIndex: {},
|
|
31
37
|
scale: {},
|
|
32
38
|
className: {},
|
|
@@ -36,38 +42,51 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
42
|
setup(__props) {
|
|
37
43
|
const props = __props;
|
|
38
44
|
const { provides: capturePlugin } = useCaptureCapability();
|
|
45
|
+
const documentState = useDocumentState(() => props.documentId);
|
|
39
46
|
const rect = ref(null);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (
|
|
43
|
-
|
|
44
|
-
pageIndex: props.pageIndex,
|
|
45
|
-
scale: props.scale,
|
|
46
|
-
callback: {
|
|
47
|
-
onPreview: (newRect) => {
|
|
48
|
-
rect.value = newRect;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
onUnmounted(() => {
|
|
54
|
-
unregister == null ? void 0 : unregister();
|
|
47
|
+
const actualScale = computed(() => {
|
|
48
|
+
var _a;
|
|
49
|
+
if (props.scale !== void 0) return props.scale;
|
|
50
|
+
return ((_a = documentState.value) == null ? void 0 : _a.scale) ?? 1;
|
|
55
51
|
});
|
|
52
|
+
watch(
|
|
53
|
+
[capturePlugin, () => props.documentId, () => props.pageIndex, actualScale],
|
|
54
|
+
([plugin, docId, pageIdx, scale], _, onCleanup) => {
|
|
55
|
+
if (!plugin) {
|
|
56
|
+
rect.value = null;
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const unregister = plugin.registerMarqueeOnPage({
|
|
60
|
+
documentId: docId,
|
|
61
|
+
pageIndex: pageIdx,
|
|
62
|
+
scale,
|
|
63
|
+
callback: {
|
|
64
|
+
onPreview: (newRect) => {
|
|
65
|
+
rect.value = newRect;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
onCleanup(() => {
|
|
70
|
+
unregister == null ? void 0 : unregister();
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
{ immediate: true }
|
|
74
|
+
);
|
|
56
75
|
return (_ctx, _cache) => {
|
|
57
76
|
return rect.value ? (openBlock(), createElementBlock("div", {
|
|
58
77
|
key: 0,
|
|
59
78
|
style: normalizeStyle({
|
|
60
79
|
position: "absolute",
|
|
61
80
|
pointerEvents: "none",
|
|
62
|
-
left: `${rect.value.origin.x *
|
|
63
|
-
top: `${rect.value.origin.y *
|
|
64
|
-
width: `${rect.value.size.width *
|
|
65
|
-
height: `${rect.value.size.height *
|
|
66
|
-
border: `1px solid ${
|
|
67
|
-
background:
|
|
81
|
+
left: `${rect.value.origin.x * actualScale.value}px`,
|
|
82
|
+
top: `${rect.value.origin.y * actualScale.value}px`,
|
|
83
|
+
width: `${rect.value.size.width * actualScale.value}px`,
|
|
84
|
+
height: `${rect.value.size.height * actualScale.value}px`,
|
|
85
|
+
border: `1px solid ${__props.stroke}`,
|
|
86
|
+
background: __props.fill,
|
|
68
87
|
boxSizing: "border-box"
|
|
69
88
|
}),
|
|
70
|
-
class: normalizeClass(
|
|
89
|
+
class: normalizeClass(__props.className)
|
|
71
90
|
}, null, 6)) : createCommentVNode("", true);
|
|
72
91
|
};
|
|
73
92
|
}
|
package/dist/vue/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/vue/hooks/use-capture.ts","../../src/vue/components/marquee-capture.vue"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/vue';\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/vue/hooks/use-capture.ts","../../src/vue/components/marquee-capture.vue"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/vue';\nimport {\n CapturePlugin,\n CaptureDocumentState,\n initialDocumentState,\n} from '@embedpdf/plugin-capture';\nimport { ref, watch, toValue, MaybeRefOrGetter, computed } from 'vue';\n\nexport const useCaptureCapability = () => useCapability<CapturePlugin>(CapturePlugin.id);\nexport const useCapturePlugin = () => usePlugin<CapturePlugin>(CapturePlugin.id);\n\n/**\n * Hook for capture state for a specific document\n * @param documentId Document ID (can be ref, computed, getter, or plain value)\n */\nexport const useCapture = (documentId: MaybeRefOrGetter<string>) => {\n const { provides } = useCaptureCapability();\n const state = ref<CaptureDocumentState>(initialDocumentState);\n\n watch(\n [provides, () => toValue(documentId)],\n ([providesValue, docId], _, onCleanup) => {\n if (providesValue && docId) {\n const scope = providesValue.forDocument(docId);\n state.value = scope.getState();\n\n const unsubscribe = scope.onStateChange((newState) => {\n state.value = newState;\n });\n onCleanup(unsubscribe);\n }\n },\n { immediate: true },\n );\n\n return {\n state,\n provides: computed(() => provides.value?.forDocument(toValue(documentId)) ?? null),\n };\n};\n","<template>\n <div\n v-if=\"rect\"\n :style=\"{\n position: 'absolute',\n pointerEvents: 'none',\n left: `${rect.origin.x * actualScale}px`,\n top: `${rect.origin.y * actualScale}px`,\n width: `${rect.size.width * actualScale}px`,\n height: `${rect.size.height * actualScale}px`,\n border: `1px solid ${stroke}`,\n background: fill,\n boxSizing: 'border-box',\n }\"\n :class=\"className\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, watch } from 'vue';\nimport type { Rect } from '@embedpdf/models';\nimport { useDocumentState } from '@embedpdf/core/vue';\nimport { useCaptureCapability } from '../hooks/use-capture';\n\ninterface MarqueeCaptureProps {\n /** Document ID */\n documentId: string;\n /** Index of the page this layer lives on */\n pageIndex: number;\n /** Scale of the page */\n scale?: number;\n /** Optional CSS class applied to the marquee rectangle */\n className?: string;\n /** Stroke / fill colours (defaults below) */\n stroke?: string;\n fill?: string;\n}\n\nconst props = withDefaults(defineProps<MarqueeCaptureProps>(), {\n stroke: 'rgba(33,150,243,0.8)',\n fill: 'rgba(33,150,243,0.15)',\n});\n\nconst { provides: capturePlugin } = useCaptureCapability();\nconst documentState = useDocumentState(() => props.documentId);\nconst rect = ref<Rect | null>(null);\n\nconst actualScale = computed(() => {\n if (props.scale !== undefined) return props.scale;\n return documentState.value?.scale ?? 1;\n});\n\nwatch(\n [capturePlugin, () => props.documentId, () => props.pageIndex, actualScale],\n ([plugin, docId, pageIdx, scale], _, onCleanup) => {\n if (!plugin) {\n rect.value = null;\n return;\n }\n\n const unregister = plugin.registerMarqueeOnPage({\n documentId: docId,\n pageIndex: pageIdx,\n scale,\n callback: {\n onPreview: (newRect) => {\n rect.value = newRect;\n },\n },\n });\n\n onCleanup(() => {\n unregister?.();\n });\n },\n { immediate: true },\n);\n</script>\n"],"names":["_createElementBlock","_normalizeStyle"],"mappings":";;;;AAQO,MAAM,uBAAuB,MAAM,cAA6B,cAAc,EAAE;AAChF,MAAM,mBAAmB,MAAM,UAAyB,cAAc,EAAE;AAMxE,MAAM,aAAa,CAAC,eAAyC;AAClE,QAAM,EAAE,SAAA,IAAa,qBAAA;AACrB,QAAM,QAAQ,IAA0B,oBAAoB;AAE5D;AAAA,IACE,CAAC,UAAU,MAAM,QAAQ,UAAU,CAAC;AAAA,IACpC,CAAC,CAAC,eAAe,KAAK,GAAG,GAAG,cAAc;AACxC,UAAI,iBAAiB,OAAO;AAC1B,cAAM,QAAQ,cAAc,YAAY,KAAK;AAC7C,cAAM,QAAQ,MAAM,SAAA;AAEpB,cAAM,cAAc,MAAM,cAAc,CAAC,aAAa;AACpD,gBAAM,QAAQ;AAAA,QAChB,CAAC;AACD,kBAAU,WAAW;AAAA,MACvB;AAAA,IACF;AAAA,IACA,EAAE,WAAW,KAAA;AAAA,EAAK;AAGpB,SAAO;AAAA,IACL;AAAA,IACA,UAAU,SAAS,MAAA;;AAAM,6BAAS,UAAT,mBAAgB,YAAY,QAAQ,UAAU,OAAM;AAAA,KAAI;AAAA,EAAA;AAErF;;;;;;;;;;;;ACDA,UAAM,QAAQ;AAKd,UAAM,EAAE,UAAU,cAAA,IAAkB,qBAAA;AACpC,UAAM,gBAAgB,iBAAiB,MAAM,MAAM,UAAU;AAC7D,UAAM,OAAO,IAAiB,IAAI;AAElC,UAAM,cAAc,SAAS,MAAM;;AACjC,UAAI,MAAM,UAAU,OAAW,QAAO,MAAM;AAC5C,eAAO,mBAAc,UAAd,mBAAqB,UAAS;AAAA,IACvC,CAAC;AAED;AAAA,MACE,CAAC,eAAe,MAAM,MAAM,YAAY,MAAM,MAAM,WAAW,WAAW;AAAA,MAC1E,CAAC,CAAC,QAAQ,OAAO,SAAS,KAAK,GAAG,GAAG,cAAc;AACjD,YAAI,CAAC,QAAQ;AACX,eAAK,QAAQ;AACb;AAAA,QACF;AAEA,cAAM,aAAa,OAAO,sBAAsB;AAAA,UAC9C,YAAY;AAAA,UACZ,WAAW;AAAA,UACX;AAAA,UACA,UAAU;AAAA,YACR,WAAW,CAAC,YAAY;AACtB,mBAAK,QAAQ;AAAA,YACf;AAAA,UAAA;AAAA,QACF,CACD;AAED,kBAAU,MAAM;AACd;AAAA,QACF,CAAC;AAAA,MACH;AAAA,MACA,EAAE,WAAW,KAAA;AAAA,IAAK;;aAzEV,KAAA,sBADRA,mBAcE,OAAA;AAAA;QAZC,OAAKC,eAAA;AAAA;;UAA4E,MAAA,GAAA,KAAA,MAAK,OAAO,IAAI,YAAA,KAAW;AAAA,UAAoB,KAAA,GAAA,KAAA,MAAK,OAAO,IAAI,YAAA,KAAW;AAAA,UAAsB,OAAA,GAAA,KAAA,MAAK,KAAK,QAAQ,YAAA,KAAW;AAAA,UAAuB,QAAA,GAAA,KAAA,MAAK,KAAK,SAAS,YAAA,KAAW;AAAA,+BAAiC,QAAA,MAAM;AAAA,sBAAsB,QAAA;AAAA;;QAWhU,sBAAO,QAAA,SAAS;AAAA,MAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@embedpdf/plugin-capture",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-next.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@embedpdf/models": "
|
|
37
|
+
"@embedpdf/models": "2.0.0-next.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/react": "^18.2.0",
|
|
41
41
|
"typescript": "^5.0.0",
|
|
42
|
-
"@embedpdf/
|
|
43
|
-
"@embedpdf/
|
|
44
|
-
"@embedpdf/plugin-
|
|
45
|
-
"@embedpdf/
|
|
42
|
+
"@embedpdf/core": "2.0.0-next.0",
|
|
43
|
+
"@embedpdf/plugin-render": "2.0.0-next.0",
|
|
44
|
+
"@embedpdf/plugin-interaction-manager": "2.0.0-next.0",
|
|
45
|
+
"@embedpdf/build": "1.1.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": ">=16.8.0",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"preact": "^10.26.4",
|
|
51
51
|
"vue": ">=3.2.0",
|
|
52
52
|
"svelte": ">=5 <6",
|
|
53
|
-
"@embedpdf/
|
|
54
|
-
"@embedpdf/
|
|
55
|
-
"@embedpdf/plugin-
|
|
53
|
+
"@embedpdf/plugin-interaction-manager": "2.0.0-next.0",
|
|
54
|
+
"@embedpdf/core": "2.0.0-next.0",
|
|
55
|
+
"@embedpdf/plugin-render": "2.0.0-next.0"
|
|
56
56
|
},
|
|
57
57
|
"files": [
|
|
58
58
|
"dist",
|