@embedpdf/plugin-capture 2.0.0-next.3 → 2.0.1

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.
@@ -1 +1 @@
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"}
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","$","state","actualScale","derived","scale","_a","current","user_effect","set","provides","registerMarqueeOnPage","pageIndex","callback","onPreview","newRect","div","root_1","clsx","class","styles","left","get","origin","x","top","y","width","size","height","consequent","getDocumentId","capability","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,gBAElCC,EAAOC,EAAAC,MAAoB,YAEzBC,EAAWF,EAAAG,QAAA,WAAA,YACG,IADHN,EAAAO,MACYP,EAAAO,OAAoB,OAAAC,EAAAV,EAAcW,kBAASF,QAAS,IAGjFJ,EAAAO,YAAO,QACLP,EAAAQ,IAAAT,EAAO,MAEFL,EAAkBe,gBAIhBf,EAAkBe,SAASC,sBAAqB,CACrDZ,WAAUD,EAAAC,WACVa,UAASd,EAAAc,UACTP,YAAOF,GACPU,SAAQ,CACNC,UAAYC,IACVd,EAAAQ,IAAAT,EAAOe,GAAO,wDAQrBC,EAAEC,6CAAFD,EAAE,EAAAf,EAAAiB,KAAApB,EAAAqB,sBAAFH,EAAE,GAAAI,EAAA,6CAGcC,KAAApB,EAAAqB,IAAAtB,GAAKuB,OAAOC,QAAIrB,GAAhB,KACDsB,IAAAxB,EAAAqB,IAAAtB,GAAKuB,OAAOG,QAAIvB,GAAhB,KACEwB,MAAA1B,EAAAqB,IAAAtB,GAAK4B,KAAKD,YAAQxB,GAAlB,KACC0B,OAAA5B,EAAAqB,IAAAtB,GAAK4B,KAAKC,aAAS1B,GAAnB,yBACUV,iBACTC,6CARnBsB,qBADEhB,MAAI8B,0BAFT,qBDlC2BC,IACnB,MAAAC,EAAa3C,QAEfa,EAAQD,EAAAC,cAA6B+B,EAAAA,uBAGnC,MAAAlC,YAAsBgC,GAGtBG,EAAAjC,EAAAG,QAAA,IACJ4B,EAAWtB,gBAAYX,GAAaiC,EAAWtB,SAASyB,kBAAYpC,IAAc,aAGpFE,EAAAO,uBACQE,EAAWsB,EAAWtB,SACtB0B,QAAQrC,OAETW,IAAa0B,cAChBnC,EAAAQ,IAAAP,EAAQ+B,EAAAA,sBAAA,GAIJ,MAAAI,EAAQ3B,EAASyB,YAAYC,GAM5B,aAHPlC,EAAQmC,EAAMC,YAAA,GAGPD,EAAME,cAAeC,IAC1BvC,EAAAQ,IAAAP,EAAQsC,GAAA,QAKN,YAAA9B,gBACKwB,EACT,EACI,SAAAhC,gBACKA,EACT,4DAnDS,IAAyBuC,YAAyBlD,EAAAA,cAAcC"}
@@ -1 +1 @@
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
+ {"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;MAEf,QAAQ,EAAA,cAA6B,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;MAElC,OAAO,EAAA,MAAoB,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;;;;;UAIA,MAAE,OAAA;;;oBAAF,KAAE,GAAA,EAAA,KAAA,QAAA,KAAA,CAAA;6BAAF,KAAE,IAAA,QAAA;AAAA;;UAGc,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;;;0BARvB,GAAE;AAAA;;gBADA,IAAI,EAAA,UAAA,UAAA;AAAA;;;;AAFT;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/plugin-capture",
3
- "version": "2.0.0-next.3",
3
+ "version": "2.0.1",
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": "2.0.0-next.3"
37
+ "@embedpdf/models": "2.0.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/react": "^18.2.0",
41
41
  "typescript": "^5.0.0",
42
- "@embedpdf/core": "2.0.0-next.3",
43
42
  "@embedpdf/build": "1.1.0",
44
- "@embedpdf/plugin-interaction-manager": "2.0.0-next.3",
45
- "@embedpdf/plugin-render": "2.0.0-next.3"
43
+ "@embedpdf/core": "2.0.1",
44
+ "@embedpdf/plugin-render": "2.0.1",
45
+ "@embedpdf/plugin-interaction-manager": "2.0.1"
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/core": "2.0.0-next.3",
54
- "@embedpdf/plugin-interaction-manager": "2.0.0-next.3",
55
- "@embedpdf/plugin-render": "2.0.0-next.3"
53
+ "@embedpdf/plugin-render": "2.0.1",
54
+ "@embedpdf/core": "2.0.1",
55
+ "@embedpdf/plugin-interaction-manager": "2.0.1"
56
56
  },
57
57
  "files": [
58
58
  "dist",