@embedpdf/plugin-selection 1.3.16 → 1.4.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.
@@ -0,0 +1 @@
1
+ export declare function CopyToClipboard(): null;
@@ -0,0 +1,2 @@
1
+ export * from './selection-layer';
2
+ export * from './copy-to-clipboard';
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ pageIndex: number;
3
+ scale: number;
4
+ background?: string;
5
+ };
6
+ export declare function SelectionLayer({ pageIndex, scale, background }: Props): import("react/jsx-runtime").JSX.Element | null;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from './use-selection';
@@ -0,0 +1,11 @@
1
+ import { SelectionPlugin } from '../../index.ts';
2
+ export declare const useSelectionCapability: () => {
3
+ provides: Readonly<import('../../index.ts').SelectionCapability> | null;
4
+ isLoading: boolean;
5
+ ready: Promise<void>;
6
+ };
7
+ export declare const useSelectionPlugin: () => {
8
+ plugin: SelectionPlugin | null;
9
+ isLoading: boolean;
10
+ ready: Promise<void>;
11
+ };
@@ -0,0 +1,4 @@
1
+ export * from './hooks';
2
+ export * from './components';
3
+ export * from '../index.ts';
4
+ export declare const SelectionPluginPackage: import('@embedpdf/core').WithAutoMount<import('@embedpdf/core').PluginPackage<import('../index.ts').SelectionPlugin, import('../index.ts').SelectionPluginConfig, import('../index.ts').SelectionState, import('../lib/actions').SelectionAction>>;
@@ -0,0 +1,3 @@
1
+ declare const CopyToClipboard: import('svelte', { with: { "resolution-mode": "import" } }).Component<Record<string, never>, {}, "">;
2
+ type CopyToClipboard = ReturnType<typeof CopyToClipboard>;
3
+ export default CopyToClipboard;
@@ -0,0 +1,11 @@
1
+ interface SelectionLayerProps {
2
+ /** Index of the page this layer lives on */
3
+ pageIndex: number;
4
+ /** Scale of the page */
5
+ scale: number;
6
+ /** Background color for selection rectangles */
7
+ background?: string;
8
+ }
9
+ declare const SelectionLayer: import('svelte', { with: { "resolution-mode": "import" } }).Component<SelectionLayerProps, {}, "">;
10
+ type SelectionLayer = ReturnType<typeof SelectionLayer>;
11
+ export default SelectionLayer;
@@ -0,0 +1,2 @@
1
+ export { default as SelectionLayer } from './SelectionLayer.svelte';
2
+ export { default as CopyToClipboard } from './CopyToClipboard.svelte';
@@ -0,0 +1 @@
1
+ export * from './use-selection.svelte';
@@ -0,0 +1,19 @@
1
+ import { SelectionPlugin } from '../../lib/index.ts';
2
+ /**
3
+ * Hook to get the selection plugin's capability API.
4
+ * This provides methods for controlling and listening to selection events.
5
+ */
6
+ export declare const useSelectionCapability: () => {
7
+ provides: Readonly<import('../../lib/index.ts').SelectionCapability> | null;
8
+ isLoading: boolean;
9
+ ready: Promise<void>;
10
+ };
11
+ /**
12
+ * Hook to get the raw selection plugin instance.
13
+ * Useful for accessing plugin-specific properties or methods not exposed in the capability.
14
+ */
15
+ export declare const useSelectionPlugin: () => {
16
+ plugin: SelectionPlugin | null;
17
+ isLoading: boolean;
18
+ ready: Promise<void>;
19
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core"),t=require("@embedpdf/plugin-selection");require("svelte/internal/disclose-version");const i=require("svelte/internal/client"),o=require("@embedpdf/core/svelte");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const i in e)if("default"!==i){const o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>e[i]})}return t.default=e,Object.freeze(t)}const r=n(i),l=()=>o.useCapability(t.SelectionPlugin.id),s=()=>o.usePlugin(t.SelectionPlugin.id);var c=r.from_html("<div></div>"),a=r.from_html("<div></div>");function p(e,t){r.push(t,!0);const i=l();r.user_effect((()=>{if(i.provides)return i.provides.onCopyToClipboard((e=>{navigator.clipboard.writeText(e).catch((e=>{console.error("Failed to copy text to clipboard:",e)}))}))})),r.pop()}const g=e.createPluginPackage(t.SelectionPluginPackage).addUtility(p).build();exports.CopyToClipboard=p,exports.SelectionLayer=function(e,t){r.push(t,!0);let i=r.prop(t,"background",3,"rgba(33, 150, 243, 0.4)");const o=s();let n=r.state(r.proxy([])),l=r.state(null);r.user_effect((()=>{const e=t.pageIndex;if(o.plugin)return o.plugin.registerSelectionOnPage({pageIndex:e,onRectsChange:({rects:e,boundingRect:t})=>{r.set(n,e,!0),r.set(l,t,!0)}})}));var p=r.comment(),g=r.first_child(p),u=e=>{var o=a();let s;r.each(o,21,(()=>r.get(n)),r.index,((e,o)=>{var n=c();let s;r.template_effect((e=>s=r.set_style(n,"",s,e)),[()=>({position:"absolute",left:(r.get(o).origin.x-r.get(l).origin.x)*t.scale+"px",top:(r.get(o).origin.y-r.get(l).origin.y)*t.scale+"px",width:r.get(o).size.width*t.scale+"px",height:r.get(o).size.height*t.scale+"px",background:i(),"pointer-events":"none"})]),r.append(e,n)})),r.reset(o),r.template_effect((e=>s=r.set_style(o,"",s,e)),[()=>({position:"absolute",left:r.get(l).origin.x*t.scale+"px",top:r.get(l).origin.y*t.scale+"px",width:r.get(l).size.width*t.scale+"px",height:r.get(l).size.height*t.scale+"px","mix-blend-mode":"multiply",isolation:"isolate","pointer-events":"none"})]),r.append(e,o)};r.if(g,(e=>{r.get(l)&&e(u)})),r.append(e,p),r.pop()},exports.SelectionPluginPackage=g,exports.useSelectionCapability=l,exports.useSelectionPlugin=s,Object.keys(t).forEach((e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})}));
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../src/svelte/hooks/use-selection.svelte.ts","../../src/svelte/components/CopyToClipboard.svelte","../../src/svelte/index.ts","../../src/svelte/components/SelectionLayer.svelte"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/svelte';\nimport { SelectionPlugin } from '@embedpdf/plugin-selection';\n\n/**\n * Hook to get the selection plugin's capability API.\n * This provides methods for controlling and listening to selection events.\n */\nexport const useSelectionCapability = () => useCapability<SelectionPlugin>(SelectionPlugin.id);\n\n/**\n * Hook to get the raw selection plugin instance.\n * Useful for accessing plugin-specific properties or methods not exposed in the capability.\n */\nexport const useSelectionPlugin = () => usePlugin<SelectionPlugin>(SelectionPlugin.id);\n","<script lang=\"ts\">\n import { useSelectionCapability } from '../hooks/use-selection.svelte';\n\n const selectionCapability = useSelectionCapability();\n\n $effect(() => {\n if (!selectionCapability.provides) return;\n\n return selectionCapability.provides.onCopyToClipboard((text) => {\n navigator.clipboard.writeText(text).catch((err) => {\n console.error('Failed to copy text to clipboard:', err);\n });\n });\n });\n</script>\n\n<!-- This component renders nothing to the DOM -->\n","import { createPluginPackage } from '@embedpdf/core';\nimport { SelectionPluginPackage as BaseSelectionPluginPackage } from '@embedpdf/plugin-selection';\n\nimport { CopyToClipboard } from './components';\n\nexport * from './hooks';\nexport * from './components';\nexport * from '@embedpdf/plugin-selection';\n\nexport const SelectionPluginPackage = createPluginPackage(BaseSelectionPluginPackage)\n .addUtility(CopyToClipboard)\n .build();\n","<script lang=\"ts\">\n import type { Rect } from '@embedpdf/models';\n import { useSelectionPlugin } from '../hooks/use-selection.svelte';\n\n interface SelectionLayerProps {\n /** Index of the page this layer lives on */\n pageIndex: number;\n /** Scale of the page */\n scale: number;\n /** Background color for selection rectangles */\n background?: string;\n }\n\n let { pageIndex, scale, background = 'rgba(33, 150, 243, 0.4)' }: SelectionLayerProps = $props();\n\n const selectionPlugin = useSelectionPlugin();\n let rects = $state<Rect[]>([]);\n let boundingRect = $state<Rect | null>(null);\n\n $effect(() => {\n // Track pageIndex as dependency\n const _pageIndex = pageIndex;\n\n if (!selectionPlugin.plugin) return;\n\n return selectionPlugin.plugin.registerSelectionOnPage({\n pageIndex: _pageIndex,\n onRectsChange: ({ rects: newRects, boundingRect: newBoundingRect }) => {\n rects = newRects;\n boundingRect = newBoundingRect;\n },\n });\n });\n</script>\n\n{#if boundingRect}\n <div\n style:position=\"absolute\"\n style:left={`${boundingRect.origin.x * scale}px`}\n style:top={`${boundingRect.origin.y * scale}px`}\n style:width={`${boundingRect.size.width * scale}px`}\n style:height={`${boundingRect.size.height * scale}px`}\n style:mix-blend-mode=\"multiply\"\n style:isolation=\"isolate\"\n style:pointer-events=\"none\"\n >\n {#each rects as rect, i (i)}\n <div\n style:position=\"absolute\"\n style:left={`${(rect.origin.x - boundingRect.origin.x) * scale}px`}\n style:top={`${(rect.origin.y - boundingRect.origin.y) * scale}px`}\n style:width={`${rect.size.width * scale}px`}\n style:height={`${rect.size.height * scale}px`}\n style:background\n style:pointer-events=\"none\"\n ></div>\n {/each}\n </div>\n{/if}\n"],"names":["useSelectionCapability","useCapability","SelectionPlugin","id","useSelectionPlugin","usePlugin","selectionCapability","$","user_effect","provides","onCopyToClipboard","text","navigator","clipboard","writeText","catch","err","console","error","SelectionPluginPackage","createPluginPackage","BaseSelectionPluginPackage","addUtility","CopyToClipboard","build","background","selectionPlugin","rects","state","proxy","boundingRect","_pageIndex","$$props","pageIndex","plugin","registerSelectionOnPage","onRectsChange","newRects","newBoundingRect","$__namespace","set","each","div","get","rect","origin","x","scale","y","size","width","height","consequent"],"mappings":"2iBAOaA,EAA+B,IAAAC,gBAA+BC,EAAAA,gBAAgBC,IAM9EC,EAA2B,IAAAC,YAA2BH,EAAAA,gBAAgBC,+FCV3E,MAAAG,EAAsBN,IAE5BO,EAAAC,aAAc,KACP,GAAAF,EAAoBG,SAElB,OAAAH,EAAoBG,SAASC,mBAAmBC,IACrDC,UAAUC,UAAUC,UAAUH,GAAMI,OAAOC,IACjCC,QAAAC,MAAM,oCAAqCF,EAAG,GACvD,GACF,WAEL,CCLO,MAAMG,EAAyBC,EAAoBA,oBAAAC,EAA0BF,wBACjFG,WAAWC,GACXC,oFCEuB,IAAAC,0BAAa,2BAE/B,MAAAC,EAAkBtB,QACpBuB,EAAKpB,EAAAqB,MAAArB,EAAAsB,MAAA,KACLC,UAAmC,MAEvCvB,EAAAC,aAAc,WAENuB,EAAUC,EAAAC,UAEX,GAAAP,EAAgBQ,OAEd,OAAAR,EAAgBQ,OAAOC,wBAAuB,CACnDF,UAAWF,EACXK,cAAa,EAAKT,MAAOU,EAAUP,aAAcQ,MAC/CC,EAAAC,IAAAb,EAAQU,GAAQ,GAChBE,EAAAC,IAAAV,EAAeQ,GAAe,EAAA,kEAiB3B/B,EAAAkC,KAAAC,EAAA,IAAA,IAAAnC,EAAAoC,IAAAhB,gBAASiB,2GAGIA,GAAKC,OAAOC,QAAIhB,GAAae,OAAOC,GAACd,EAAAe,sBACtCH,GAAKC,OAAOG,QAAIlB,GAAae,OAAOG,GAAChB,EAAAe,uBACpCH,GAAKK,KAAKC,MAAKlB,EAAAe,wBACdH,GAAKK,KAAKE,OAAMnB,EAAAe,uKAdtBjB,GAAae,OAAOC,EAACd,EAAAe,qBACtBjB,GAAae,OAAOG,EAAChB,EAAAe,uBACnBjB,GAAamB,KAAKC,MAAKlB,EAAAe,wBACtBjB,GAAamB,KAAKE,OAAMnB,EAAAe,wHANxCjB,MAAYsB,EAAA,yBAFjB"}
@@ -0,0 +1,4 @@
1
+ export * from './hooks';
2
+ export * from './components';
3
+ export * from '../lib/index.ts';
4
+ export declare const SelectionPluginPackage: import('@embedpdf/core').WithAutoMount<import('@embedpdf/core').PluginPackage<import('../lib/index.ts').SelectionPlugin, import('../lib/index.ts').SelectionPluginConfig, import('../lib/index.ts').SelectionState, import('src/lib/actions').SelectionAction>>;
@@ -0,0 +1,93 @@
1
+ import { createPluginPackage } from "@embedpdf/core";
2
+ import { SelectionPlugin, SelectionPluginPackage as SelectionPluginPackage$1 } from "@embedpdf/plugin-selection";
3
+ export * from "@embedpdf/plugin-selection";
4
+ import "svelte/internal/disclose-version";
5
+ import * as $ from "svelte/internal/client";
6
+ import { useCapability, usePlugin } from "@embedpdf/core/svelte";
7
+ const useSelectionCapability = () => useCapability(SelectionPlugin.id);
8
+ const useSelectionPlugin = () => usePlugin(SelectionPlugin.id);
9
+ var root_2 = $.from_html(`<div></div>`);
10
+ var root_1 = $.from_html(`<div></div>`);
11
+ function SelectionLayer($$anchor, $$props) {
12
+ $.push($$props, true);
13
+ let background = $.prop($$props, "background", 3, "rgba(33, 150, 243, 0.4)");
14
+ const selectionPlugin = useSelectionPlugin();
15
+ let rects = $.state($.proxy([]));
16
+ let boundingRect = $.state(null);
17
+ $.user_effect(() => {
18
+ const _pageIndex = $$props.pageIndex;
19
+ if (!selectionPlugin.plugin) return;
20
+ return selectionPlugin.plugin.registerSelectionOnPage({
21
+ pageIndex: _pageIndex,
22
+ onRectsChange: ({ rects: newRects, boundingRect: newBoundingRect }) => {
23
+ $.set(rects, newRects, true);
24
+ $.set(boundingRect, newBoundingRect, true);
25
+ }
26
+ });
27
+ });
28
+ var fragment = $.comment();
29
+ var node = $.first_child(fragment);
30
+ {
31
+ var consequent = ($$anchor2) => {
32
+ var div = root_1();
33
+ let styles;
34
+ $.each(div, 21, () => $.get(rects), $.index, ($$anchor3, rect) => {
35
+ var div_1 = root_2();
36
+ let styles_1;
37
+ $.template_effect(($0) => styles_1 = $.set_style(div_1, "", styles_1, $0), [
38
+ () => ({
39
+ position: "absolute",
40
+ left: `${($.get(rect).origin.x - $.get(boundingRect).origin.x) * $$props.scale}px`,
41
+ top: `${($.get(rect).origin.y - $.get(boundingRect).origin.y) * $$props.scale}px`,
42
+ width: `${$.get(rect).size.width * $$props.scale}px`,
43
+ height: `${$.get(rect).size.height * $$props.scale}px`,
44
+ background: background(),
45
+ "pointer-events": "none"
46
+ })
47
+ ]);
48
+ $.append($$anchor3, div_1);
49
+ });
50
+ $.reset(div);
51
+ $.template_effect(($0) => styles = $.set_style(div, "", styles, $0), [
52
+ () => ({
53
+ position: "absolute",
54
+ left: `${$.get(boundingRect).origin.x * $$props.scale}px`,
55
+ top: `${$.get(boundingRect).origin.y * $$props.scale}px`,
56
+ width: `${$.get(boundingRect).size.width * $$props.scale}px`,
57
+ height: `${$.get(boundingRect).size.height * $$props.scale}px`,
58
+ "mix-blend-mode": "multiply",
59
+ isolation: "isolate",
60
+ "pointer-events": "none"
61
+ })
62
+ ]);
63
+ $.append($$anchor2, div);
64
+ };
65
+ $.if(node, ($$render) => {
66
+ if ($.get(boundingRect)) $$render(consequent);
67
+ });
68
+ }
69
+ $.append($$anchor, fragment);
70
+ $.pop();
71
+ }
72
+ function CopyToClipboard($$anchor, $$props) {
73
+ $.push($$props, true);
74
+ const selectionCapability = useSelectionCapability();
75
+ $.user_effect(() => {
76
+ if (!selectionCapability.provides) return;
77
+ return selectionCapability.provides.onCopyToClipboard((text) => {
78
+ navigator.clipboard.writeText(text).catch((err) => {
79
+ console.error("Failed to copy text to clipboard:", err);
80
+ });
81
+ });
82
+ });
83
+ $.pop();
84
+ }
85
+ const SelectionPluginPackage = createPluginPackage(SelectionPluginPackage$1).addUtility(CopyToClipboard).build();
86
+ export {
87
+ CopyToClipboard,
88
+ SelectionLayer,
89
+ SelectionPluginPackage,
90
+ useSelectionCapability,
91
+ useSelectionPlugin
92
+ };
93
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/svelte/hooks/use-selection.svelte.ts","../../src/svelte/components/SelectionLayer.svelte","../../src/svelte/components/CopyToClipboard.svelte","../../src/svelte/index.ts"],"sourcesContent":["import { useCapability, usePlugin } from '@embedpdf/core/svelte';\nimport { SelectionPlugin } from '@embedpdf/plugin-selection';\n\n/**\n * Hook to get the selection plugin's capability API.\n * This provides methods for controlling and listening to selection events.\n */\nexport const useSelectionCapability = () => useCapability<SelectionPlugin>(SelectionPlugin.id);\n\n/**\n * Hook to get the raw selection plugin instance.\n * Useful for accessing plugin-specific properties or methods not exposed in the capability.\n */\nexport const useSelectionPlugin = () => usePlugin<SelectionPlugin>(SelectionPlugin.id);\n","<script lang=\"ts\">\n import type { Rect } from '@embedpdf/models';\n import { useSelectionPlugin } from '../hooks/use-selection.svelte';\n\n interface SelectionLayerProps {\n /** Index of the page this layer lives on */\n pageIndex: number;\n /** Scale of the page */\n scale: number;\n /** Background color for selection rectangles */\n background?: string;\n }\n\n let { pageIndex, scale, background = 'rgba(33, 150, 243, 0.4)' }: SelectionLayerProps = $props();\n\n const selectionPlugin = useSelectionPlugin();\n let rects = $state<Rect[]>([]);\n let boundingRect = $state<Rect | null>(null);\n\n $effect(() => {\n // Track pageIndex as dependency\n const _pageIndex = pageIndex;\n\n if (!selectionPlugin.plugin) return;\n\n return selectionPlugin.plugin.registerSelectionOnPage({\n pageIndex: _pageIndex,\n onRectsChange: ({ rects: newRects, boundingRect: newBoundingRect }) => {\n rects = newRects;\n boundingRect = newBoundingRect;\n },\n });\n });\n</script>\n\n{#if boundingRect}\n <div\n style:position=\"absolute\"\n style:left={`${boundingRect.origin.x * scale}px`}\n style:top={`${boundingRect.origin.y * scale}px`}\n style:width={`${boundingRect.size.width * scale}px`}\n style:height={`${boundingRect.size.height * scale}px`}\n style:mix-blend-mode=\"multiply\"\n style:isolation=\"isolate\"\n style:pointer-events=\"none\"\n >\n {#each rects as rect, i (i)}\n <div\n style:position=\"absolute\"\n style:left={`${(rect.origin.x - boundingRect.origin.x) * scale}px`}\n style:top={`${(rect.origin.y - boundingRect.origin.y) * scale}px`}\n style:width={`${rect.size.width * scale}px`}\n style:height={`${rect.size.height * scale}px`}\n style:background\n style:pointer-events=\"none\"\n ></div>\n {/each}\n </div>\n{/if}\n","<script lang=\"ts\">\n import { useSelectionCapability } from '../hooks/use-selection.svelte';\n\n const selectionCapability = useSelectionCapability();\n\n $effect(() => {\n if (!selectionCapability.provides) return;\n\n return selectionCapability.provides.onCopyToClipboard((text) => {\n navigator.clipboard.writeText(text).catch((err) => {\n console.error('Failed to copy text to clipboard:', err);\n });\n });\n });\n</script>\n\n<!-- This component renders nothing to the DOM -->\n","import { createPluginPackage } from '@embedpdf/core';\nimport { SelectionPluginPackage as BaseSelectionPluginPackage } from '@embedpdf/plugin-selection';\n\nimport { CopyToClipboard } from './components';\n\nexport * from './hooks';\nexport * from './components';\nexport * from '@embedpdf/plugin-selection';\n\nexport const SelectionPluginPackage = createPluginPackage(BaseSelectionPluginPackage)\n .addUtility(CopyToClipboard)\n .build();\n"],"names":["BaseSelectionPluginPackage"],"mappings":";;;;;;AAOa,MAAA,yBAA+B,MAAA,cAA+B,gBAAgB,EAAE;AAMhF,MAAA,qBAA2B,MAAA,UAA2B,gBAAgB,EAAE;;;2CCbrF;;AAa0B,MAAA,8CAAa,yBAAyB;AAExD,QAAA,kBAAkB,mBAAkB;MACtC,QAAK,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA,CAAA;AACL,MAAA,uBAAmC,IAAI;AAE3C,IAAA,YAAc,MAAA;UAEN,aAAU,QAAA;AAEX,QAAA,CAAA,gBAAgB,OAAM;WAEpB,gBAAgB,OAAO,wBAAuB;AAAA,MACnD,WAAW;AAAA,MACX,eAAa,CAAA,EAAK,OAAO,UAAU,cAAc,gBAAe,MAAO;AACrE,UAAA,IAAA,OAAQ,UAAQ,IAAA;AAChB,UAAA,IAAA,cAAe,iBAAe,IAAA;AAAA;;GAGnC;;;;;;;AAcQ,QAAA,KAAA,KAAA,IAAA,MAAA,EAAA,IAAA,KAAK,wBAAI,SAAI;;;;;;4BAGA,IAAI,EAAC,OAAO,UAAI,YAAY,EAAC,OAAO,KAAC,QAAA,KAAA;AAAA,2BACtC,IAAI,EAAC,OAAO,UAAI,YAAY,EAAC,OAAO,KAAC,QAAA,KAAA;AAAA,4BACpC,IAAI,EAAC,KAAK,QAAK,QAAA,KAAA;AAAA,6BACd,IAAI,EAAC,KAAK,SAAM,QAAA,KAAA;AAAA;;;;;;;;;;yBAdtB,YAAY,EAAC,OAAO,IAAC,QAAA,KAAA;AAAA,wBACtB,YAAY,EAAC,OAAO,IAAC,QAAA,KAAA;AAAA,0BACnB,YAAY,EAAC,KAAK,QAAK,QAAA,KAAA;AAAA,2BACtB,YAAY,EAAC,KAAK,SAAM,QAAA,KAAA;AAAA;;;;;;;;gBANxC,YAAY,EAAA,UAAA,UAAA;AAAA;;;;AAFjB;4CCjCA;;AAGQ,QAAA,sBAAsB,uBAAsB;AAElD,IAAA,YAAc,MAAA;AACP,QAAA,CAAA,oBAAoB,SAAQ;AAE1B,WAAA,oBAAoB,SAAS,kBAAiB,CAAE,SAAS;AAC9D,gBAAU,UAAU,UAAU,IAAI,EAAE,MAAO,CAAA,QAAQ;AACjD,gBAAQ,MAAM,qCAAqC,GAAG;AAAA,OACvD;AAAA,KACF;AAAA,GACF;;AACH;ACLO,MAAM,yBAAyB,oBAAoBA,wBAA0B,EACjF,WAAW,eAAe,EAC1B,MAAM;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/plugin-selection",
3
- "version": "1.3.16",
3
+ "version": "1.4.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.cjs",
@@ -26,27 +26,33 @@
26
26
  "types": "./dist/vue/index.d.ts",
27
27
  "import": "./dist/vue/index.js",
28
28
  "require": "./dist/vue/index.cjs"
29
+ },
30
+ "./svelte": {
31
+ "types": "./dist/svelte/index.d.ts",
32
+ "import": "./dist/svelte/index.js",
33
+ "require": "./dist/svelte/index.cjs"
29
34
  }
30
35
  },
31
36
  "dependencies": {
32
- "@embedpdf/models": "1.3.16"
37
+ "@embedpdf/models": "1.4.1"
33
38
  },
34
39
  "devDependencies": {
35
40
  "@types/react": "^18.2.0",
36
41
  "typescript": "^5.0.0",
37
- "@embedpdf/build": "1.0.1",
38
- "@embedpdf/plugin-viewport": "1.3.16",
39
- "@embedpdf/plugin-interaction-manager": "1.3.16",
40
- "@embedpdf/core": "1.3.16"
42
+ "@embedpdf/build": "1.1.0",
43
+ "@embedpdf/core": "1.4.1",
44
+ "@embedpdf/plugin-interaction-manager": "1.4.1",
45
+ "@embedpdf/plugin-viewport": "1.4.1"
41
46
  },
42
47
  "peerDependencies": {
43
48
  "react": ">=16.8.0",
44
49
  "react-dom": ">=16.8.0",
45
50
  "preact": "^10.26.4",
46
51
  "vue": ">=3.2.0",
47
- "@embedpdf/core": "1.3.16",
48
- "@embedpdf/plugin-viewport": "1.3.16",
49
- "@embedpdf/plugin-interaction-manager": "1.3.16"
52
+ "svelte": ">=5 <6",
53
+ "@embedpdf/core": "1.4.1",
54
+ "@embedpdf/plugin-viewport": "1.4.1",
55
+ "@embedpdf/plugin-interaction-manager": "1.4.1"
50
56
  },
51
57
  "files": [
52
58
  "dist",
@@ -69,7 +75,8 @@
69
75
  "build:react": "vite build --mode react",
70
76
  "build:preact": "vite build --mode preact",
71
77
  "build:vue": "vite build --mode vue",
72
- "build": "pnpm run clean && concurrently -c auto -n base,react,preact,vue \"vite build --mode base\" \"vite build --mode react\" \"vite build --mode preact\" \"vite build --mode vue\"",
78
+ "build:svelte": "vite build --mode svelte",
79
+ "build": "pnpm run clean && concurrently -c auto -n base,react,preact,vue,svelte \"vite build --mode base\" \"vite build --mode react\" \"vite build --mode preact\" \"vite build --mode vue\" \"vite build --mode svelte\"",
73
80
  "clean": "rimraf dist",
74
81
  "lint": "eslint src --color",
75
82
  "lint:fix": "eslint src --color --fix"