@embedpdf/plugin-redaction 1.5.0 → 2.0.0-next.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.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +573 -207
- package/dist/index.js.map +1 -1
- package/dist/lib/actions.d.ts +48 -13
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/redaction-plugin.d.ts +22 -8
- package/dist/lib/reducer.d.ts +4 -2
- package/dist/lib/selectors.d.ts +5 -3
- package/dist/lib/types.d.ts +68 -20
- package/dist/preact/index.cjs +1 -1
- package/dist/preact/index.cjs.map +1 -1
- package/dist/preact/index.js +86 -37
- 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 +86 -37
- package/dist/react/index.js.map +1 -1
- package/dist/shared/components/marquee-redact.d.ts +4 -2
- package/dist/shared/components/pending-redactions.d.ts +4 -3
- package/dist/shared/components/redaction-layer.d.ts +11 -5
- package/dist/shared/components/selection-redact.d.ts +2 -1
- package/dist/shared/components/types.d.ts +6 -7
- package/dist/shared/hooks/use-redaction.d.ts +4 -4
- package/dist/shared-preact/components/marquee-redact.d.ts +4 -2
- package/dist/shared-preact/components/pending-redactions.d.ts +4 -3
- package/dist/shared-preact/components/redaction-layer.d.ts +11 -5
- package/dist/shared-preact/components/selection-redact.d.ts +2 -1
- package/dist/shared-preact/components/types.d.ts +6 -7
- package/dist/shared-preact/hooks/use-redaction.d.ts +4 -4
- package/dist/shared-react/components/marquee-redact.d.ts +4 -2
- package/dist/shared-react/components/pending-redactions.d.ts +4 -3
- package/dist/shared-react/components/redaction-layer.d.ts +11 -5
- package/dist/shared-react/components/selection-redact.d.ts +2 -1
- package/dist/shared-react/components/types.d.ts +6 -7
- package/dist/shared-react/hooks/use-redaction.d.ts +4 -4
- package/dist/svelte/components/highlight.svelte.d.ts +14 -0
- package/dist/svelte/components/index.d.ts +5 -0
- package/dist/svelte/components/marquee-redact.svelte.d.ts +16 -0
- package/dist/svelte/components/pending-redactions.svelte.d.ts +15 -0
- package/dist/svelte/components/redaction-layer.svelte.d.ts +20 -0
- package/dist/svelte/components/selection-redact.svelte.d.ts +8 -0
- package/dist/svelte/hooks/index.d.ts +1 -0
- package/dist/svelte/hooks/use-redaction.svelte.d.ts +21 -0
- package/dist/svelte/index.cjs +2 -0
- package/dist/svelte/index.cjs.map +1 -0
- package/dist/svelte/index.d.ts +4 -0
- package/dist/svelte/index.js +554 -0
- package/dist/svelte/index.js.map +1 -0
- package/dist/svelte/types.d.ts +10 -0
- package/dist/vue/components/highlight.vue.d.ts +2 -1
- package/dist/vue/components/marquee-redact.vue.d.ts +5 -2
- package/dist/vue/components/pending-redactions.vue.d.ts +18 -13
- package/dist/vue/components/redaction-layer.vue.d.ts +13 -4
- package/dist/vue/components/selection-redact.vue.d.ts +3 -1
- package/dist/vue/components/types.d.ts +9 -0
- package/dist/vue/hooks/use-redaction.d.ts +9 -102
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.cjs.map +1 -1
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +219 -125
- package/dist/vue/index.js.map +1 -1
- package/package.json +18 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RedactionPlugin,
|
|
1
|
+
import { RedactionPlugin, RedactionDocumentState, RedactionScope } from '../../lib/index.ts';
|
|
2
2
|
export declare const useRedactionPlugin: () => {
|
|
3
3
|
plugin: RedactionPlugin | null;
|
|
4
4
|
isLoading: boolean;
|
|
@@ -9,7 +9,7 @@ export declare const useRedactionCapability: () => {
|
|
|
9
9
|
isLoading: boolean;
|
|
10
10
|
ready: Promise<void>;
|
|
11
11
|
};
|
|
12
|
-
export declare const useRedaction: () => {
|
|
13
|
-
state:
|
|
14
|
-
provides:
|
|
12
|
+
export declare const useRedaction: (documentId: string) => {
|
|
13
|
+
state: RedactionDocumentState;
|
|
14
|
+
provides: RedactionScope | null;
|
|
15
15
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Rect } from '@embedpdf/models';
|
|
2
|
+
interface HighlightProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
opacity?: number;
|
|
5
|
+
border?: string;
|
|
6
|
+
rects: Rect[];
|
|
7
|
+
rect?: Rect;
|
|
8
|
+
scale: number;
|
|
9
|
+
onClick?: (e: MouseEvent | TouchEvent) => void;
|
|
10
|
+
style?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Highlight: import('svelte', { with: { "resolution-mode": "import" } }).Component<HighlightProps, {}, "">;
|
|
13
|
+
type Highlight = ReturnType<typeof Highlight>;
|
|
14
|
+
export default Highlight;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as Highlight } from './highlight.svelte';
|
|
2
|
+
export { default as MarqueeRedact } from './marquee-redact.svelte';
|
|
3
|
+
export { default as PendingRedactions } from './pending-redactions.svelte';
|
|
4
|
+
export { default as RedactionLayer } from './redaction-layer.svelte';
|
|
5
|
+
export { default as SelectionRedact } from './selection-redact.svelte';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface MarqueeRedactProps {
|
|
2
|
+
/** The ID of the document */
|
|
3
|
+
documentId: string;
|
|
4
|
+
/** Index of the page this layer lives on */
|
|
5
|
+
pageIndex: number;
|
|
6
|
+
/** Scale of the page */
|
|
7
|
+
scale?: number;
|
|
8
|
+
/** Optional CSS class applied to the marquee rectangle */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Stroke / fill colours (defaults below) */
|
|
11
|
+
stroke?: string;
|
|
12
|
+
fill?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const MarqueeRedact: import('svelte', { with: { "resolution-mode": "import" } }).Component<MarqueeRedactProps, {}, "">;
|
|
15
|
+
type MarqueeRedact = ReturnType<typeof MarqueeRedact>;
|
|
16
|
+
export default MarqueeRedact;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Snippet } from 'svelte';
|
|
2
|
+
import { Rotation } from '@embedpdf/models';
|
|
3
|
+
import { RedactionSelectionMenuRenderFn, RedactionSelectionMenuProps } from '../types';
|
|
4
|
+
interface Props {
|
|
5
|
+
documentId: string;
|
|
6
|
+
pageIndex: number;
|
|
7
|
+
scale: number;
|
|
8
|
+
rotation?: Rotation;
|
|
9
|
+
bboxStroke?: string;
|
|
10
|
+
selectionMenu?: RedactionSelectionMenuRenderFn;
|
|
11
|
+
selectionMenuSnippet?: Snippet<[RedactionSelectionMenuProps]>;
|
|
12
|
+
}
|
|
13
|
+
declare const PendingRedactions: import('svelte', { with: { "resolution-mode": "import" } }).Component<Props, {}, "">;
|
|
14
|
+
type PendingRedactions = ReturnType<typeof PendingRedactions>;
|
|
15
|
+
export default PendingRedactions;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Snippet } from 'svelte';
|
|
2
|
+
import { Rotation } from '@embedpdf/models';
|
|
3
|
+
import { RedactionSelectionMenuRenderFn, RedactionSelectionMenuProps } from '../types';
|
|
4
|
+
interface RedactionLayerProps {
|
|
5
|
+
/** The ID of the document this layer belongs to */
|
|
6
|
+
documentId: string;
|
|
7
|
+
/** Index of the page this layer lives on */
|
|
8
|
+
pageIndex: number;
|
|
9
|
+
/** Current render scale for this page */
|
|
10
|
+
scale?: number;
|
|
11
|
+
/** Page rotation (for counter-rotating menus, etc.) */
|
|
12
|
+
rotation?: Rotation;
|
|
13
|
+
/** Render function for selection menu (schema-driven approach) */
|
|
14
|
+
selectionMenu?: RedactionSelectionMenuRenderFn;
|
|
15
|
+
/** Snippet for custom selection menu (slot-based approach) */
|
|
16
|
+
selectionMenuSnippet?: Snippet<[RedactionSelectionMenuProps]>;
|
|
17
|
+
}
|
|
18
|
+
declare const RedactionLayer: import('svelte', { with: { "resolution-mode": "import" } }).Component<RedactionLayerProps, {}, "">;
|
|
19
|
+
type RedactionLayer = ReturnType<typeof RedactionLayer>;
|
|
20
|
+
export default RedactionLayer;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface SelectionRedactProps {
|
|
2
|
+
documentId: string;
|
|
3
|
+
pageIndex: number;
|
|
4
|
+
scale: number;
|
|
5
|
+
}
|
|
6
|
+
declare const SelectionRedact: import('svelte', { with: { "resolution-mode": "import" } }).Component<SelectionRedactProps, {}, "">;
|
|
7
|
+
type SelectionRedact = ReturnType<typeof SelectionRedact>;
|
|
8
|
+
export default SelectionRedact;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-redaction.svelte';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { RedactionPlugin, RedactionDocumentState, RedactionScope } from '../../lib/index.ts';
|
|
2
|
+
export declare const useRedactionPlugin: () => {
|
|
3
|
+
plugin: RedactionPlugin | null;
|
|
4
|
+
isLoading: boolean;
|
|
5
|
+
ready: Promise<void>;
|
|
6
|
+
};
|
|
7
|
+
export declare const useRedactionCapability: () => {
|
|
8
|
+
provides: Readonly<import('../../lib/index.ts').RedactionCapability> | null;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
ready: Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
interface UseRedactionReturn {
|
|
13
|
+
provides: RedactionScope | null;
|
|
14
|
+
state: RedactionDocumentState;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Hook for redaction state for a specific document
|
|
18
|
+
* @param getDocumentId Document ID getter function
|
|
19
|
+
*/
|
|
20
|
+
export declare const useRedaction: (getDocumentId: () => string | null) => UseRedactionReturn;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("svelte/internal/client"),t=require("@embedpdf/plugin-redaction"),n=require("@embedpdf/core/svelte");require("svelte/internal/disclose-version");const r=require("@embedpdf/models"),i=require("@embedpdf/utils/svelte");function o(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const s=o(e),c=()=>n.usePlugin(t.RedactionPlugin.id),d=()=>n.useCapability(t.RedactionPlugin.id);var l=s.from_html("<div></div>");function p(e,t){let n=s.prop(t,"color",3,"#FFFF00"),r=s.prop(t,"opacity",3,1),i=s.prop(t,"border",3,"1px solid red"),o=s.prop(t,"style",3,"");const c=t.rect;var d=s.comment(),p=s.first_child(d);s.each(p,17,()=>t.rects,s.index,(e,d)=>{var p=l();let a;p.__pointerdown=function(...e){var n;null==(n=t.onClick)||n.apply(this,e)},p.__touchstart=function(...e){var n;null==(n=t.onClick)||n.apply(this,e)},s.template_effect(()=>a=s.set_style(p,o(),a,{position:"absolute",border:i(),left:(c?s.get(d).origin.x-c.origin.x:s.get(d).origin.x)*t.scale+"px",top:(c?s.get(d).origin.y-c.origin.y:s.get(d).origin.y)*t.scale+"px",width:s.get(d).size.width*t.scale+"px",height:s.get(d).size.height*t.scale+"px",background:n(),opacity:r(),"pointer-events":t.onClick?"auto":"none",cursor:t.onClick?"pointer":"default","z-index":t.onClick?"1":void 0})),s.append(e,p)}),s.append(e,d)}s.delegate(["pointerdown","touchstart"]);var a=s.from_html("<div></div>");function g(e,t){s.push(t,!0);let r=s.prop(t,"className",3,""),i=s.prop(t,"stroke",3,"red"),o=s.prop(t,"fill",3,"transparent");const d=c(),l=n.useDocumentState(()=>t.documentId);let p=s.state(null);const g=s.derived(()=>{var e;return void 0!==t.scale?t.scale:(null==(e=l.current)?void 0:e.scale)??1});s.user_effect(()=>{if(d.plugin&&t.documentId)return d.plugin.registerMarqueeOnPage({documentId:t.documentId,pageIndex:t.pageIndex,scale:s.get(g),callback:{onPreview:e=>{s.set(p,e,!0)}}});s.set(p,null)});var u=s.comment(),f=s.first_child(u),v=e=>{var t=a();let n;s.template_effect(()=>{s.set_class(t,1,s.clsx(r())),n=s.set_style(t,"",n,{position:"absolute","pointer-events":"none",left:s.get(p).origin.x*s.get(g)+"px",top:s.get(p).origin.y*s.get(g)+"px",width:s.get(p).size.width*s.get(g)+"px",height:s.get(p).size.height*s.get(g)+"px",border:`1px solid ${i()}`,background:o(),"box-sizing":"border-box"})}),s.append(e,t)};s.if(f,e=>{s.get(p)&&e(v)}),s.append(e,u),s.pop()}var u=s.from_html("<div></div> <!>",1),f=s.from_html("<div><!></div> <!>",1),v=s.from_html('<div style="position: absolute; inset: 0; pointer-events: none;"></div>');function m(e,t){s.push(t,!0);let n=s.prop(t,"rotation",19,()=>r.Rotation.Degree0),o=s.prop(t,"bboxStroke",3,"rgba(0,0,0,0.8)");const c=d();let l=s.state(s.proxy([])),a=s.state(null);function g(e,n){e.stopPropagation(),c.provides&&c.provides.forDocument(t.documentId).selectPending(t.pageIndex,n)}function m(e){return s.get(a)===e&&(!!t.selectionMenu||!!t.selectionMenuSnippet)}function h(e){return{type:"redaction",item:e,pageIndex:t.pageIndex}}s.user_effect(()=>{var e;const n=c.provides;if(!n)return s.set(l,[],!0),void s.set(a,null);const r=n.forDocument(t.documentId),i=r.getState();s.set(l,i.pending[t.pageIndex]??[],!0),s.set(a,(null==(e=i.selected)?void 0:e.page)===t.pageIndex?i.selected.id:null,!0);const o=r.onPendingChange(e=>{s.set(l,e[t.pageIndex]??[],!0)}),d=r.onSelectedChange(e=>{s.set(a,(null==e?void 0:e.page)===t.pageIndex?e.id:null,!0)});return()=>{null==o||o(),null==d||d()}});const x={suggestTop:!1,spaceAbove:0,spaceBelow:0};function _(e,t,n){return{context:h(e),selected:s.get(a)===e.id,rect:t,placement:x,menuWrapperProps:n}}var b=s.comment(),y=s.first_child(b),I=e=>{var r=v();s.each(r,21,()=>s.get(l),e=>e.id,(e,r)=>{var c=s.comment(),d=s.first_child(c),l=e=>{var c=u(),d=s.first_child(c);d.__pointerdown=e=>g(e,s.get(r).id),d.__touchstart=e=>g(e,s.get(r).id);var l=s.sibling(d,2),p=e=>{{const o=(e,n)=>{const i=s.derived(()=>_(s.get(r),null==n?void 0:n().rect,null==n?void 0:n().menuWrapperProps));var o=s.comment(),c=s.first_child(o),d=e=>{const n=s.derived(()=>t.selectionMenu(s.get(i)));var r=s.comment(),o=s.first_child(r),c=e=>{var t=s.comment(),r=s.first_child(t);s.component(r,()=>s.get(n).component,(e,t)=>{t(e,s.spread_props(()=>s.get(n).props))}),s.append(e,t)};s.if(o,e=>{s.get(n)&&e(c)}),s.append(e,r)},l=e=>{var n=s.comment(),r=s.first_child(n),o=e=>{var n=s.comment(),r=s.first_child(n);s.snippet(r,()=>t.selectionMenuSnippet,()=>s.get(i)),s.append(e,n)};s.if(r,e=>{t.selectionMenuSnippet&&e(o)},!0),s.append(e,n)};s.if(c,e=>{t.selectionMenu?e(d):e(l,!1)}),s.append(e,o)};let c=s.derived(()=>({origin:{x:s.get(r).rect.origin.x*t.scale,y:s.get(r).rect.origin.y*t.scale},size:{width:s.get(r).rect.size.width*t.scale,height:s.get(r).rect.size.height*t.scale}}));i.CounterRotate(e,{get rect(){return s.get(c)},get rotation(){return n()},children:o,$$slots:{default:!0}})}};s.if(l,e=>{m(s.get(r).id)&&e(p)}),s.template_effect(()=>s.set_style(d,`\n position: absolute;\n left: ${s.get(r).rect.origin.x*t.scale}px;\n top: ${s.get(r).rect.origin.y*t.scale}px;\n width: ${s.get(r).rect.size.width*t.scale}px;\n height: ${s.get(r).rect.size.height*t.scale}px;\n background: transparent;\n outline: ${s.get(a)===s.get(r).id?`1px solid ${o()}`:"none"};\n outline-offset: 2px;\n border: 1px solid red;\n pointer-events: auto;\n cursor: pointer;\n `)),s.append(e,c)},v=e=>{var c=f(),d=s.first_child(c);p(s.child(d),{get rect(){return s.get(r).rect},get rects(){return s.get(r).rects},color:"transparent",border:"1px solid red",get scale(){return t.scale},onClick:e=>g(e,s.get(r).id)}),s.reset(d);var l=s.sibling(d,2),u=e=>{{const o=(e,n)=>{const i=s.derived(()=>_(s.get(r),null==n?void 0:n().rect,null==n?void 0:n().menuWrapperProps));var o=s.comment(),c=s.first_child(o),d=e=>{const n=s.derived(()=>t.selectionMenu(s.get(i)));var r=s.comment(),o=s.first_child(r),c=e=>{var t=s.comment(),r=s.first_child(t);s.component(r,()=>s.get(n).component,(e,t)=>{t(e,s.spread_props(()=>s.get(n).props))}),s.append(e,t)};s.if(o,e=>{s.get(n)&&e(c)}),s.append(e,r)},l=e=>{var n=s.comment(),r=s.first_child(n),o=e=>{var n=s.comment(),r=s.first_child(n);s.snippet(r,()=>t.selectionMenuSnippet,()=>s.get(i)),s.append(e,n)};s.if(r,e=>{t.selectionMenuSnippet&&e(o)},!0),s.append(e,n)};s.if(c,e=>{t.selectionMenu?e(d):e(l,!1)}),s.append(e,o)};let c=s.derived(()=>({origin:{x:s.get(r).rect.origin.x*t.scale,y:s.get(r).rect.origin.y*t.scale},size:{width:s.get(r).rect.size.width*t.scale,height:s.get(r).rect.size.height*t.scale}}));i.CounterRotate(e,{get rect(){return s.get(c)},get rotation(){return n()},children:o,$$slots:{default:!0}})}};s.if(l,e=>{m(s.get(r).id)&&e(u)}),s.template_effect(()=>s.set_style(d,`\n position: absolute;\n left: ${s.get(r).rect.origin.x*t.scale}px;\n top: ${s.get(r).rect.origin.y*t.scale}px;\n width: ${s.get(r).rect.size.width*t.scale}px;\n height: ${s.get(r).rect.size.height*t.scale}px;\n background: transparent;\n outline: ${s.get(a)===s.get(r).id?`1px solid ${o()}`:"none"};\n outline-offset: 2px;\n pointer-events: auto;\n cursor: ${s.get(a)===s.get(r).id?"pointer":"default"};\n `)),s.append(e,c)};s.if(d,e=>{"area"===s.get(r).kind?e(l):e(v,!1)}),s.append(e,c)}),s.reset(r),s.append(e,r)};s.if(y,e=>{s.get(l).length&&e(I)}),s.append(e,b),s.pop()}s.delegate(["pointerdown","touchstart"]);var h=s.from_html("<div><!></div>");function x(e,t){s.push(t,!0);const n=c();let r=s.state(s.proxy([])),i=s.state(null);s.user_effect(()=>n.plugin?n.plugin.onRedactionSelectionChange(t.documentId,e=>{const n=e.find(e=>e.pageIndex===t.pageIndex);s.set(r,(null==n?void 0:n.segmentRects)??[],!0),s.set(i,(null==n?void 0:n.rect)??null,!0)}):(s.set(r,[],!0),void s.set(i,null)));var o=s.comment(),d=s.first_child(o),l=e=>{var n=h();s.set_style(n,"",{},{"mix-blend-mode":"normal","pointer-events":"none",position:"absolute",inset:"0"}),p(s.child(n),{color:"transparent",opacity:1,get rects(){return s.get(r)},get scale(){return t.scale},border:"1px solid red"}),s.reset(n),s.append(e,n)};s.if(d,e=>{s.get(i)&&e(l)}),s.append(e,o),s.pop()}var _=s.from_html("<!> <!> <!>",1);exports.Highlight=p,exports.MarqueeRedact=g,exports.PendingRedactions=m,exports.RedactionLayer=function(e,t){s.push(t,!0);const i=n.useDocumentState(()=>t.documentId),o=s.derived(()=>{var e;return void 0!==t.scale?t.scale:(null==(e=i.current)?void 0:e.scale)??1}),c=s.derived(()=>{var e;return void 0!==t.rotation?t.rotation:(null==(e=i.current)?void 0:e.rotation)??r.Rotation.Degree0});var d=_(),l=s.first_child(d);m(l,{get documentId(){return t.documentId},get pageIndex(){return t.pageIndex},get scale(){return s.get(o)},get rotation(){return s.get(c)},get selectionMenu(){return t.selectionMenu},get selectionMenuSnippet(){return t.selectionMenuSnippet}});var p=s.sibling(l,2);g(p,{get documentId(){return t.documentId},get pageIndex(){return t.pageIndex},get scale(){return s.get(o)}}),x(s.sibling(p,2),{get documentId(){return t.documentId},get pageIndex(){return t.pageIndex},get scale(){return s.get(o)}}),s.append(e,d),s.pop()},exports.SelectionRedact=x,exports.useRedaction=e=>{const n=d();let r=s.state(s.proxy(t.initialDocumentState));const i=s.derived(e),o=s.derived(()=>n.provides&&s.get(i)?n.provides.forDocument(s.get(i)):null);return s.user_effect(()=>{const e=n.provides,o=s.get(i);if(!e||!o)return void s.set(r,t.initialDocumentState,!0);const c=e.forDocument(o);try{s.set(r,c.getState(),!0)}catch(d){s.set(r,t.initialDocumentState,!0)}return c.onStateChange(e=>{s.set(r,e,!0)})}),{get provides(){return s.get(o)},get state(){return s.get(r)}}},exports.useRedactionCapability=d,exports.useRedactionPlugin=c,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-redaction.svelte.ts","../../src/svelte/components/highlight.svelte","../../src/svelte/components/marquee-redact.svelte","../../src/svelte/components/pending-redactions.svelte","../../src/svelte/components/selection-redact.svelte","../../src/svelte/components/redaction-layer.svelte"],"sourcesContent":["import {\n RedactionPlugin,\n initialDocumentState,\n RedactionDocumentState,\n RedactionScope,\n} from '@embedpdf/plugin-redaction';\nimport { useCapability, usePlugin } from '@embedpdf/core/svelte';\n\nexport const useRedactionPlugin = () => usePlugin<RedactionPlugin>(RedactionPlugin.id);\nexport const useRedactionCapability = () => useCapability<RedactionPlugin>(RedactionPlugin.id);\n\n// Define the return type explicitly to maintain type safety\ninterface UseRedactionReturn {\n provides: RedactionScope | null;\n state: RedactionDocumentState;\n}\n\n/**\n * Hook for redaction state for a specific document\n * @param getDocumentId Document ID getter function\n */\nexport const useRedaction = (getDocumentId: () => string | null): UseRedactionReturn => {\n const capability = useRedactionCapability();\n\n let state = $state<RedactionDocumentState>(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 try {\n state = scope.getState();\n } catch (e) {\n // Handle case where state might not be ready\n state = initialDocumentState;\n }\n\n // Subscribe to state changes for THIS docId\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\n interface HighlightProps {\n color?: string;\n opacity?: number;\n border?: string;\n rects: Rect[];\n rect?: Rect;\n scale: number;\n onClick?: (e: MouseEvent | TouchEvent) => void;\n style?: string;\n }\n\n let {\n color = '#FFFF00',\n opacity = 1,\n border = '1px solid red',\n rects,\n rect,\n scale,\n onClick,\n style = '',\n }: HighlightProps = $props();\n\n // Rename rect to boundingRect for clarity\n const boundingRect = rect;\n</script>\n\n{#each rects as b, i (i)}\n <div\n onpointerdown={onClick}\n ontouchstart={onClick}\n style:position=\"absolute\"\n style:border\n style:left={`${(boundingRect ? b.origin.x - boundingRect.origin.x : b.origin.x) * scale}px`}\n style:top={`${(boundingRect ? b.origin.y - boundingRect.origin.y : b.origin.y) * scale}px`}\n style:width={`${b.size.width * scale}px`}\n style:height={`${b.size.height * scale}px`}\n style:background={color}\n style:opacity\n style:pointer-events={onClick ? 'auto' : 'none'}\n style:cursor={onClick ? 'pointer' : 'default'}\n style:z-index={onClick ? '1' : undefined}\n {style}\n ></div>\n{/each}\n","<script lang=\"ts\">\n import { useDocumentState } from '@embedpdf/core/svelte';\n import type { Rect } from '@embedpdf/models';\n import { useRedactionPlugin } from '../hooks/use-redaction.svelte';\n\n interface MarqueeRedactProps {\n /** The ID of the document */\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\n let {\n documentId,\n pageIndex,\n scale: scaleOverride,\n className = '',\n stroke = 'red',\n fill = 'transparent',\n }: MarqueeRedactProps = $props();\n\n const redactionPlugin = useRedactionPlugin();\n const documentState = useDocumentState(() => documentId);\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 if (!redactionPlugin.plugin || !documentId) {\n rect = null;\n return;\n }\n\n return redactionPlugin.plugin.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 class={className}\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 ></div>\n{/if}\n","<script lang=\"ts\">\n import type { Snippet } from 'svelte';\n import type { Rect } from '@embedpdf/models';\n import { Rotation } from '@embedpdf/models';\n import { CounterRotate } from '@embedpdf/utils/svelte';\n import type { MenuWrapperProps, SelectionMenuPlacement } from '@embedpdf/utils/svelte';\n import type { RedactionItem } from '@embedpdf/plugin-redaction';\n import { useRedactionCapability } from '../hooks/use-redaction.svelte';\n import Highlight from './highlight.svelte';\n import type {\n RedactionSelectionContext,\n RedactionSelectionMenuRenderFn,\n RedactionSelectionMenuProps,\n } from '../types';\n\n interface Props {\n documentId: string;\n pageIndex: number;\n scale: number;\n rotation?: Rotation;\n bboxStroke?: string;\n selectionMenu?: RedactionSelectionMenuRenderFn;\n selectionMenuSnippet?: Snippet<[RedactionSelectionMenuProps]>;\n }\n\n let {\n documentId,\n pageIndex,\n scale,\n rotation = Rotation.Degree0,\n bboxStroke = 'rgba(0,0,0,0.8)',\n selectionMenu,\n selectionMenuSnippet,\n }: Props = $props();\n\n const redactionCapability = useRedactionCapability();\n\n let items = $state<RedactionItem[]>([]);\n let selectedId = $state<string | null>(null);\n\n $effect(() => {\n const redactionValue = redactionCapability.provides;\n if (!redactionValue) {\n items = [];\n selectedId = null;\n return;\n }\n\n const scoped = redactionValue.forDocument(documentId);\n const currentState = scoped.getState();\n items = currentState.pending[pageIndex] ?? [];\n selectedId = currentState.selected?.page === pageIndex ? currentState.selected.id : null;\n\n const off1 = scoped.onPendingChange((map) => {\n items = map[pageIndex] ?? [];\n });\n\n const off2 = scoped.onSelectedChange((sel) => {\n selectedId = sel?.page === pageIndex ? sel.id : null;\n });\n\n return () => {\n off1?.();\n off2?.();\n };\n });\n\n function select(e: MouseEvent | TouchEvent, id: string) {\n e.stopPropagation();\n if (!redactionCapability.provides) return;\n redactionCapability.provides.forDocument(documentId).selectPending(pageIndex, id);\n }\n\n function shouldShowMenu(itemId: string): boolean {\n const isSelected = selectedId === itemId;\n return isSelected && (!!selectionMenu || !!selectionMenuSnippet);\n }\n\n function buildContext(item: RedactionItem): RedactionSelectionContext {\n return { type: 'redaction', item, pageIndex };\n }\n\n const menuPlacement: SelectionMenuPlacement = {\n suggestTop: false,\n spaceAbove: 0,\n spaceBelow: 0,\n };\n\n function buildMenuProps(\n item: RedactionItem,\n rect: Rect,\n menuWrapperProps: MenuWrapperProps,\n ): RedactionSelectionMenuProps {\n return {\n context: buildContext(item),\n selected: selectedId === item.id,\n rect,\n placement: menuPlacement,\n menuWrapperProps,\n };\n }\n</script>\n\n{#if items.length}\n <div style=\"position: absolute; inset: 0; pointer-events: none;\">\n {#each items as item (item.id)}\n {#if item.kind === 'area'}\n <div\n style=\"\n position: absolute;\n left: {item.rect.origin.x * scale}px;\n top: {item.rect.origin.y * scale}px;\n width: {item.rect.size.width * scale}px;\n height: {item.rect.size.height * scale}px;\n background: transparent;\n outline: {selectedId === item.id ? `1px solid ${bboxStroke}` : 'none'};\n outline-offset: 2px;\n border: 1px solid red;\n pointer-events: auto;\n cursor: pointer;\n \"\n onpointerdown={(e) => select(e, item.id)}\n ontouchstart={(e) => select(e, item.id)}\n ></div>\n\n {#if shouldShowMenu(item.id)}\n <CounterRotate\n rect={{\n origin: { x: item.rect.origin.x * scale, y: item.rect.origin.y * scale },\n size: { width: item.rect.size.width * scale, height: item.rect.size.height * scale },\n }}\n {rotation}\n >\n {#snippet children({ rect, menuWrapperProps })}\n {@const menuProps = buildMenuProps(item, rect, menuWrapperProps)}\n {#if selectionMenu}\n {@const result = selectionMenu(menuProps)}\n {#if result}\n <result.component {...result.props} />\n {/if}\n {:else if selectionMenuSnippet}\n {@render selectionMenuSnippet(menuProps)}\n {/if}\n {/snippet}\n </CounterRotate>\n {/if}\n {:else}\n <div\n style=\"\n position: absolute;\n left: {item.rect.origin.x * scale}px;\n top: {item.rect.origin.y * scale}px;\n width: {item.rect.size.width * scale}px;\n height: {item.rect.size.height * scale}px;\n background: transparent;\n outline: {selectedId === item.id ? `1px solid ${bboxStroke}` : 'none'};\n outline-offset: 2px;\n pointer-events: auto;\n cursor: {selectedId === item.id ? 'pointer' : 'default'};\n \"\n >\n <Highlight\n rect={item.rect}\n rects={item.rects}\n color=\"transparent\"\n border=\"1px solid red\"\n {scale}\n onClick={(e) => select(e, item.id)}\n />\n </div>\n\n {#if shouldShowMenu(item.id)}\n <CounterRotate\n rect={{\n origin: { x: item.rect.origin.x * scale, y: item.rect.origin.y * scale },\n size: { width: item.rect.size.width * scale, height: item.rect.size.height * scale },\n }}\n {rotation}\n >\n {#snippet children({ rect, menuWrapperProps })}\n {@const menuProps = buildMenuProps(item, rect, menuWrapperProps)}\n {#if selectionMenu}\n {@const result = selectionMenu(menuProps)}\n {#if result}\n <result.component {...result.props} />\n {/if}\n {:else if selectionMenuSnippet}\n {@render selectionMenuSnippet(menuProps)}\n {/if}\n {/snippet}\n </CounterRotate>\n {/if}\n {/if}\n {/each}\n </div>\n{/if}\n","<script lang=\"ts\">\n import type { Rect } from '@embedpdf/models';\n import { useRedactionPlugin } from '../hooks/use-redaction.svelte';\n import Highlight from './highlight.svelte';\n\n interface SelectionRedactProps {\n documentId: string;\n pageIndex: number;\n scale: number;\n }\n\n let { documentId, pageIndex, scale }: SelectionRedactProps = $props();\n\n const redactionPlugin = useRedactionPlugin();\n let rects = $state<Rect[]>([]);\n let boundingRect = $state<Rect | null>(null);\n\n $effect(() => {\n if (!redactionPlugin.plugin) {\n rects = [];\n boundingRect = null;\n return;\n }\n\n return redactionPlugin.plugin.onRedactionSelectionChange(documentId, (formattedSelection) => {\n const selection = formattedSelection.find((s) => s.pageIndex === pageIndex);\n rects = selection?.segmentRects ?? [];\n boundingRect = selection?.rect ?? null;\n });\n });\n</script>\n\n{#if boundingRect}\n <div\n style:mix-blend-mode=\"normal\"\n style:pointer-events=\"none\"\n style:position=\"absolute\"\n style:inset=\"0\"\n >\n <Highlight color=\"transparent\" opacity={1} {rects} {scale} border=\"1px solid red\" />\n </div>\n{/if}\n","<script lang=\"ts\">\n import type { Snippet } from 'svelte';\n import { useDocumentState } from '@embedpdf/core/svelte';\n import { Rotation } from '@embedpdf/models';\n import PendingRedactions from './pending-redactions.svelte';\n import MarqueeRedact from './marquee-redact.svelte';\n import SelectionRedact from './selection-redact.svelte';\n import type { RedactionSelectionMenuRenderFn, RedactionSelectionMenuProps } from '../types';\n\n interface RedactionLayerProps {\n /** The ID of the document this layer belongs to */\n documentId: string;\n /** Index of the page this layer lives on */\n pageIndex: number;\n /** Current render scale for this page */\n scale?: number;\n /** Page rotation (for counter-rotating menus, etc.) */\n rotation?: Rotation;\n /** Render function for selection menu (schema-driven approach) */\n selectionMenu?: RedactionSelectionMenuRenderFn;\n /** Snippet for custom selection menu (slot-based approach) */\n selectionMenuSnippet?: Snippet<[RedactionSelectionMenuProps]>;\n }\n\n let {\n documentId,\n pageIndex,\n scale,\n rotation,\n selectionMenu,\n selectionMenuSnippet,\n }: RedactionLayerProps = $props();\n\n const documentState = useDocumentState(() => documentId);\n\n const actualScale = $derived(scale !== undefined ? scale : (documentState.current?.scale ?? 1));\n\n const actualRotation = $derived(\n rotation !== undefined ? rotation : (documentState.current?.rotation ?? Rotation.Degree0),\n );\n</script>\n\n<PendingRedactions\n {documentId}\n {pageIndex}\n scale={actualScale}\n rotation={actualRotation}\n {selectionMenu}\n {selectionMenuSnippet}\n/>\n<MarqueeRedact {documentId} {pageIndex} scale={actualScale} />\n<SelectionRedact {documentId} {pageIndex} scale={actualScale} />\n"],"names":["useRedactionPlugin","usePlugin","RedactionPlugin","id","useRedactionCapability","useCapability","color","opacity","border","style","boundingRect","$$props","rect","b","origin","x","scale","y","size","width","height","onClick","cursor","className","stroke","fill","redactionPlugin","documentState","useDocumentState","documentId","actualScale","$","derived","_a","current","user_effect","plugin","registerMarqueeOnPage","pageIndex","callback","onPreview","newRect","set","left","get","top","consequent","rotation","prop","Rotation","Degree0","bboxStroke","redactionCapability","items","state","proxy","selectedId","select","e","stopPropagation","provides","forDocument","selectPending","shouldShowMenu","itemId","selectionMenu","selectionMenuSnippet","buildContext","item","type","redactionValue","scoped","currentState","getState","pending","selected","page","off1","onPendingChange","map","off2","onSelectedChange","sel","menuPlacement","suggestTop","spaceAbove","spaceBelow","buildMenuProps","menuWrapperProps","context","placement","each","div","div_1","__pointerdown","__touchstart","menuProps","result","result_component","$$anchor","spread_props","props","consequent_3","rects","result_component_1","consequent_5","consequent_8","kind","consequent_4","$$render","alternate_2","length","consequent_9","onRedactionSelectionChange","formattedSelection","selection","find","s","segmentRects","actualRotation","getDocumentId","capability","initialDocumentState","scopedProvides","docId","scope","onStateChange","newState"],"mappings":"ilBAQaA,EAAA,IAA2BC,YAA2BC,EAAAA,gBAAgBC,IACtEC,EAAA,IAA+BC,gBAA+BH,EAAAA,gBAAgBC,qDCMvF,IAAAG,qBAAQ,WACRC,uBAAU,GACVC,sBAAS,iBAKTC,qBAAQ,UAIJC,EAAYC,EAAAC,6EAGJC,4PAMIH,QAAeG,GAAEC,OAAOC,EAAIL,EAAaI,OAAOC,QAAIF,GAAEC,OAAOC,GAACJ,EAAAK,gBAC/DN,QAAeG,GAAEC,OAAOG,EAAIP,EAAaI,OAAOG,QAAIJ,GAAEC,OAAOG,GAACN,EAAAK,uBAC7DH,GAAEK,KAAKC,MAAKR,EAAAK,wBACXH,GAAEK,KAAKE,OAAMT,EAAAK,sBACZV,gBAEc,iBAAAK,EAA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