@embedpdf/plugin-redaction 2.3.0 → 2.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.
Files changed (66) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.js +748 -105
  4. package/dist/index.js.map +1 -1
  5. package/dist/lib/actions.d.ts +25 -1
  6. package/dist/lib/index.d.ts +1 -0
  7. package/dist/lib/redaction-plugin.d.ts +98 -2
  8. package/dist/lib/tools.d.ts +28 -0
  9. package/dist/lib/types.d.ts +38 -11
  10. package/dist/preact/adapter.d.ts +4 -4
  11. package/dist/preact/annotation.d.ts +1 -0
  12. package/dist/preact/index.cjs +1 -1
  13. package/dist/preact/index.cjs.map +1 -1
  14. package/dist/preact/index.js +187 -11
  15. package/dist/preact/index.js.map +1 -1
  16. package/dist/react/annotation.d.ts +1 -0
  17. package/dist/react/index.cjs +1 -1
  18. package/dist/react/index.cjs.map +1 -1
  19. package/dist/react/index.js +187 -11
  20. package/dist/react/index.js.map +1 -1
  21. package/dist/shared/components/annotations/index.d.ts +2 -0
  22. package/dist/shared/components/annotations/redact-area.d.ts +18 -0
  23. package/dist/shared/components/annotations/redact-highlight.d.ts +18 -0
  24. package/dist/shared/components/index.d.ts +3 -0
  25. package/dist/shared/components/redact-renderer-registration.d.ts +5 -0
  26. package/dist/shared/components/redact-renderers.d.ts +7 -0
  27. package/dist/shared/index.d.ts +1 -0
  28. package/dist/shared-preact/components/annotations/index.d.ts +2 -0
  29. package/dist/shared-preact/components/annotations/redact-area.d.ts +18 -0
  30. package/dist/shared-preact/components/annotations/redact-highlight.d.ts +18 -0
  31. package/dist/shared-preact/components/index.d.ts +3 -0
  32. package/dist/shared-preact/components/redact-renderer-registration.d.ts +5 -0
  33. package/dist/shared-preact/components/redact-renderers.d.ts +7 -0
  34. package/dist/shared-preact/index.d.ts +1 -0
  35. package/dist/shared-react/components/annotations/index.d.ts +2 -0
  36. package/dist/shared-react/components/annotations/redact-area.d.ts +18 -0
  37. package/dist/shared-react/components/annotations/redact-highlight.d.ts +18 -0
  38. package/dist/shared-react/components/index.d.ts +3 -0
  39. package/dist/shared-react/components/redact-renderer-registration.d.ts +5 -0
  40. package/dist/shared-react/components/redact-renderers.d.ts +7 -0
  41. package/dist/shared-react/index.d.ts +1 -0
  42. package/dist/svelte/components/RedactRendererRegistration.svelte.d.ts +7 -0
  43. package/dist/svelte/components/annotations/RedactArea.svelte.d.ts +5 -0
  44. package/dist/svelte/components/annotations/RedactHighlight.svelte.d.ts +5 -0
  45. package/dist/svelte/components/annotations/index.d.ts +2 -0
  46. package/dist/svelte/components/index.d.ts +3 -0
  47. package/dist/svelte/components/redact-renderers.d.ts +7 -0
  48. package/dist/svelte/index.cjs +1 -1
  49. package/dist/svelte/index.cjs.map +1 -1
  50. package/dist/svelte/index.d.ts +1 -0
  51. package/dist/svelte/index.js +270 -22
  52. package/dist/svelte/index.js.map +1 -1
  53. package/dist/vue/components/annotations/index.d.ts +2 -0
  54. package/dist/vue/components/annotations/redact-area.vue.d.ts +6 -0
  55. package/dist/vue/components/annotations/redact-highlight.vue.d.ts +6 -0
  56. package/dist/vue/components/index.d.ts +3 -0
  57. package/dist/vue/components/redact-renderer-registration.vue.d.ts +13 -0
  58. package/dist/vue/components/redact-renderers.d.ts +7 -0
  59. package/dist/vue/components/types.d.ts +1 -1
  60. package/dist/vue/hooks/use-redaction.d.ts +2 -2
  61. package/dist/vue/index.cjs +1 -1
  62. package/dist/vue/index.cjs.map +1 -1
  63. package/dist/vue/index.d.ts +2 -1
  64. package/dist/vue/index.js +264 -59
  65. package/dist/vue/index.js.map +1 -1
  66. package/package.json +13 -9
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),t=require("@embedpdf/core/vue"),o=require("@embedpdf/plugin-redaction"),n=require("@embedpdf/models"),l=require("@embedpdf/utils/vue"),r=()=>t.usePlugin(o.RedactionPlugin.id),a=()=>t.useCapability(o.RedactionPlugin.id),i=e.defineComponent({__name:"highlight",props:{color:{default:"#FFFF00"},opacity:{default:1},border:{default:"1px solid red"},rects:{},rect:{},scale:{},onClick:{}},setup(t){const o=t.rect;return(n,l)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rects,(r,a)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:a,onPointerdown:l[0]||(l[0]=(...e)=>t.onClick&&t.onClick(...e)),onTouchstart:l[1]||(l[1]=(...e)=>t.onClick&&t.onClick(...e)),style:{position:"absolute",border:t.border,left:(e.unref(o)?r.origin.x-e.unref(o).origin.x:r.origin.x)*t.scale+"px",top:(e.unref(o)?r.origin.y-e.unref(o).origin.y:r.origin.y)*t.scale+"px",width:r.size.width*t.scale+"px",height:r.size.height*t.scale+"px",background:t.color,opacity:t.opacity,pointerEvents:t.onClick?"auto":"none",cursor:t.onClick?"pointer":"default",zIndex:t.onClick?1:void 0}},{ref_for:!0},n.$attrs),null,16))),128))}}),c=e.defineComponent({__name:"marquee-redact",props:{documentId:{},pageIndex:{},scale:{},className:{},stroke:{default:"red"},fill:{default:"transparent"}},setup(o){const n=o,{plugin:l}=r(),a=t.useDocumentState(()=>n.documentId),i=e.ref(null),c=e.computed(()=>{var e;return void 0!==n.scale?n.scale:(null==(e=a.value)?void 0:e.scale)??1});return e.watch([l,()=>n.documentId,()=>n.pageIndex,c],([e,t,o,n],l,r)=>{if(!e||!t)return;r(e.registerMarqueeOnPage({documentId:t,pageIndex:o,scale:n,callback:{onPreview:e=>{i.value=e}}}))},{immediate:!0}),(t,n)=>i.value?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle({position:"absolute",pointerEvents:"none",left:i.value.origin.x*c.value+"px",top:i.value.origin.y*c.value+"px",width:i.value.size.width*c.value+"px",height:i.value.size.height*c.value+"px",border:`1px solid ${o.stroke}`,background:o.fill,boxSizing:"border-box"}),class:e.normalizeClass(o.className)},null,6)):e.createCommentVNode("",!0)}}),s={key:0,style:{mixBlendMode:"normal",pointerEvents:"none",position:"absolute",inset:0}},d=e.defineComponent({__name:"selection-redact",props:{documentId:{},pageIndex:{},scale:{}},setup(t){const o=t,{plugin:n}=r(),l=e.ref([]),a=e.ref(null);return e.watch([n,()=>o.documentId,()=>o.pageIndex],([e,t,o],n,r)=>{if(!e)return l.value=[],void(a.value=null);r(e.onRedactionSelectionChange(t,e=>{const t=e.find(e=>e.pageIndex===o);l.value=(null==t?void 0:t.segmentRects)??[],a.value=(null==t?void 0:t.rect)??null}))},{immediate:!0}),(o,n)=>a.value?(e.openBlock(),e.createElementBlock("div",s,[e.createVNode(i,{color:"transparent",opacity:1,rects:l.value,scale:t.scale,border:"1px solid red"},null,8,["rects","scale"])])):e.createCommentVNode("",!0)}}),u={key:0,style:{position:"absolute",inset:0,pointerEvents:"none"}},p=["onPointerdown","onTouchstart"],m=e.defineComponent({__name:"pending-redactions",props:{documentId:{},pageIndex:{},scale:{},rotation:{default:n.Rotation.Degree0},bboxStroke:{default:"rgba(0,0,0,0.8)"},selectionMenu:{}},setup(t){const o=t,n=e.useSlots(),{provides:r}=a(),c=e.ref([]),s=e.ref(null);e.watch([r,()=>o.documentId,()=>o.pageIndex],([e,t,o],n,l)=>{if(!e)return c.value=[],void(s.value=null);const r=e.forDocument(t),a=r.getState();c.value=a.pending[o]??[],s.value=a.selected&&a.selected.page===o?a.selected.id:null;const i=r.onPendingChange(e=>{c.value=e[o]??[]}),d=r.onSelectedChange(e=>{s.value=e&&e.page===o?e.id:null});l(()=>{null==i||i(),null==d||d()})},{immediate:!0});const d=(e,t)=>{e.stopPropagation();const n=r.value;n&&n.forDocument(o.documentId).selectPending(o.pageIndex,t)},m=e=>s.value===e&&(!!o.selectionMenu||!!n["selection-menu"]),g=e=>({type:"redaction",item:e,pageIndex:o.pageIndex}),v={suggestTop:!1,spaceAbove:0,spaceBelow:0},x=(e,t,n)=>o.selectionMenu?o.selectionMenu({rect:t,menuWrapperProps:n,selected:s.value===e.id,placement:v,context:g(e)}):null;return(o,n)=>c.value.length?(e.openBlock(),e.createElementBlock("div",u,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,n=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n.id},["area"===n.kind?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{style:e.normalizeStyle({position:"absolute",left:n.rect.origin.x*t.scale+"px",top:n.rect.origin.y*t.scale+"px",width:n.rect.size.width*t.scale+"px",height:n.rect.size.height*t.scale+"px",background:"transparent",outline:s.value===n.id?`1px solid ${t.bboxStroke}`:"none",outlineOffset:"2px",border:"1px solid red",pointerEvents:"auto",cursor:"pointer"}),onPointerdown:e=>d(e,n.id),onTouchstart:e=>d(e,n.id)},null,44,p),m(n.id)?(e.openBlock(),e.createBlock(e.unref(l.CounterRotate),{key:0,rect:{origin:{x:n.rect.origin.x*t.scale,y:n.rect.origin.y*t.scale},size:{width:n.rect.size.width*t.scale,height:n.rect.size.height*t.scale}},rotation:t.rotation},{default:e.withCtx(({rect:l,menuWrapperProps:r})=>[t.selectionMenu?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x(n,l,r)),{key:0})):e.renderSlot(o.$slots,"selection-menu",{key:1,context:g(n),selected:s.value===n.id,rect:l,placement:v,menuWrapperProps:r})]),_:2},1032,["rect","rotation"])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{style:e.normalizeStyle({position:"absolute",left:n.rect.origin.x*t.scale+"px",top:n.rect.origin.y*t.scale+"px",width:n.rect.size.width*t.scale+"px",height:n.rect.size.height*t.scale+"px",background:"transparent",outline:s.value===n.id?`1px solid ${t.bboxStroke}`:"none",outlineOffset:"2px",pointerEvents:"auto",cursor:s.value===n.id?"pointer":"default"})},[e.createVNode(i,{rect:n.rect,rects:n.rects,color:"transparent",border:"1px solid red",scale:t.scale,"on-click":e=>d(e,n.id)},null,8,["rect","rects","scale","on-click"])],4),m(n.id)?(e.openBlock(),e.createBlock(e.unref(l.CounterRotate),{key:0,rect:{origin:{x:n.rect.origin.x*t.scale,y:n.rect.origin.y*t.scale},size:{width:n.rect.size.width*t.scale,height:n.rect.size.height*t.scale}},rotation:t.rotation},{default:e.withCtx(({rect:l,menuWrapperProps:r})=>[t.selectionMenu?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x(n,l,r)),{key:0})):e.renderSlot(o.$slots,"selection-menu",{key:1,context:g(n),selected:s.value===n.id,rect:l,placement:v,menuWrapperProps:r})]),_:2},1032,["rect","rotation"])):e.createCommentVNode("",!0)],64))],64))),128))])):e.createCommentVNode("",!0)}}),g=e.defineComponent({__name:"redaction-layer",props:{documentId:{},pageIndex:{},scale:{},rotation:{},bboxStroke:{default:"rgba(0,0,0,0.8)"},selectionMenu:{}},setup(o){const l=o,r=t.useDocumentState(()=>l.documentId),a=e.computed(()=>{var e;return void 0!==l.scale?l.scale:(null==(e=r.value)?void 0:e.scale)??1}),i=e.computed(()=>{var e;return void 0!==l.rotation?l.rotation:(null==(e=r.value)?void 0:e.rotation)??n.Rotation.Degree0});return(t,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{"document-id":o.documentId,"page-index":o.pageIndex,scale:a.value,rotation:i.value,"bbox-stroke":o.bboxStroke,"selection-menu":o.selectionMenu},{"selection-menu":e.withCtx(o=>[e.renderSlot(t.$slots,"selection-menu",e.normalizeProps(e.guardReactiveProps(o)))]),_:3},8,["document-id","page-index","scale","rotation","bbox-stroke","selection-menu"]),e.createVNode(c,{"document-id":o.documentId,"page-index":o.pageIndex,scale:a.value},null,8,["document-id","page-index","scale"]),e.createVNode(d,{"document-id":o.documentId,"page-index":o.pageIndex,scale:a.value},null,8,["document-id","page-index","scale"])],64))}});exports.Highlight=i,exports.MarqueeRedact=c,exports.PendingRedactions=m,exports.RedactionLayer=g,exports.SelectionRedact=d,exports.useRedaction=t=>{const{provides:n}=a(),l=e.ref(o.initialDocumentState);e.watch([n,()=>e.toValue(t)],([e,t],n,r)=>{if(!e)return void(l.value=o.initialDocumentState);const a=e.forDocument(t);try{l.value=a.getState()}catch(i){l.value=o.initialDocumentState}r(a.onStateChange(e=>{l.value=e}))},{immediate:!0});const r=e.computed(()=>{var o;const l=e.toValue(t);return(null==(o=n.value)?void 0:o.forDocument(l))??null});return{state:l,provides:r}},exports.useRedactionCapability=a,exports.useRedactionPlugin=r,Object.keys(o).forEach(e=>{"default"===e||Object.prototype.hasOwnProperty.call(exports,e)||Object.defineProperty(exports,e,{enumerable:!0,get:()=>o[e]})});
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@embedpdf/core"),t=require("@embedpdf/plugin-redaction"),o=require("vue"),n=require("@embedpdf/core/vue"),a=require("@embedpdf/models"),l=require("@embedpdf/utils/vue"),r=require("@embedpdf/plugin-annotation/vue"),i=o.defineComponent({__name:"highlight",props:{color:{default:"#FFFF00"},opacity:{default:1},border:{default:"1px solid red"},rects:{},rect:{},scale:{},onClick:{}},setup(e){const t=e.rect;return(n,a)=>(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.rects,(l,r)=>(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:r,onPointerdown:a[0]||(a[0]=(...t)=>e.onClick&&e.onClick(...t)),onTouchstart:a[1]||(a[1]=(...t)=>e.onClick&&e.onClick(...t)),style:{position:"absolute",border:e.border,left:(o.unref(t)?l.origin.x-o.unref(t).origin.x:l.origin.x)*e.scale+"px",top:(o.unref(t)?l.origin.y-o.unref(t).origin.y:l.origin.y)*e.scale+"px",width:l.size.width*e.scale+"px",height:l.size.height*e.scale+"px",background:e.color,opacity:e.opacity,pointerEvents:e.onClick?"auto":"none",cursor:e.onClick?"pointer":"default",zIndex:e.onClick?1:void 0}},{ref_for:!0},n.$attrs),null,16))),128))}}),c=()=>n.usePlugin(t.RedactionPlugin.id),u=()=>n.useCapability(t.RedactionPlugin.id),d=o.defineComponent({__name:"marquee-redact",props:{documentId:{},pageIndex:{},scale:{},className:{},stroke:{default:"red"},fill:{default:"transparent"}},setup(e){const t=e,{plugin:a}=c(),l=n.useDocumentState(()=>t.documentId),r=o.ref(null),i=o.computed(()=>{var e;return void 0!==t.scale?t.scale:(null==(e=l.value)?void 0:e.scale)??1}),u=o.computed(()=>{var e;return t.stroke??(null==(e=a.value)?void 0:e.getPreviewStrokeColor())??"red"});return o.watch([a,()=>t.documentId,()=>t.pageIndex,i],([e,t,o,n],a,l)=>{if(!e||!t)return;l(e.registerMarqueeOnPage({documentId:t,pageIndex:o,scale:n,callback:{onPreview:e=>{r.value=e}}}))},{immediate:!0}),(t,n)=>r.value?(o.openBlock(),o.createElementBlock("div",{key:0,style:o.normalizeStyle({position:"absolute",pointerEvents:"none",left:r.value.origin.x*i.value+"px",top:r.value.origin.y*i.value+"px",width:r.value.size.width*i.value+"px",height:r.value.size.height*i.value+"px",border:`1px solid ${u.value}`,background:e.fill,boxSizing:"border-box"}),class:o.normalizeClass(e.className)},null,6)):o.createCommentVNode("",!0)}}),s={key:0,style:{mixBlendMode:"normal",pointerEvents:"none",position:"absolute",inset:0}},p=o.defineComponent({__name:"selection-redact",props:{documentId:{},pageIndex:{},scale:{}},setup(e){const t=e,{plugin:n}=c(),a=o.ref([]),l=o.ref(null),r=o.computed(()=>{var e;return(null==(e=n.value)?void 0:e.getPreviewStrokeColor())??"red"});return o.watch([n,()=>t.documentId,()=>t.pageIndex],([e,t,o],n,r)=>{if(!e)return a.value=[],void(l.value=null);r(e.onRedactionSelectionChange(t,e=>{const t=e.find(e=>e.pageIndex===o);a.value=(null==t?void 0:t.segmentRects)??[],l.value=(null==t?void 0:t.rect)??null}))},{immediate:!0}),(t,n)=>l.value?(o.openBlock(),o.createElementBlock("div",s,[o.createVNode(i,{color:"transparent",opacity:1,rects:a.value,scale:e.scale,border:`1px solid ${r.value}`},null,8,["rects","scale","border"])])):o.createCommentVNode("",!0)}}),m={key:0,style:{position:"absolute",inset:0,pointerEvents:"none"}},v=["onPointerdown","onTouchstart"],g=o.defineComponent({__name:"pending-redactions",props:{documentId:{},pageIndex:{},scale:{},rotation:{default:a.Rotation.Degree0},bboxStroke:{default:"rgba(0,0,0,0.8)"},selectionMenu:{}},setup(e){const t=e,n=o.useSlots(),{provides:a}=u(),r=o.ref([]),c=o.ref(null);o.watch([a,()=>t.documentId,()=>t.pageIndex],([e,t,o],n,a)=>{if(!e)return r.value=[],void(c.value=null);const l=e.forDocument(t),i=l.getState();r.value=(i.pending[o]??[]).filter(e=>"legacy"===e.source),c.value=i.selected&&i.selected.page===o?i.selected.id:null;const u=l.onPendingChange(e=>{r.value=(e[o]??[]).filter(e=>"legacy"===e.source)}),d=l.onSelectedChange(e=>{c.value=e&&e.page===o?e.id:null});a(()=>{null==u||u(),null==d||d()})},{immediate:!0});const d=(e,o)=>{e.stopPropagation();const n=a.value;n&&n.forDocument(t.documentId).selectPending(t.pageIndex,o)},s=e=>c.value===e&&(!!t.selectionMenu||!!n["selection-menu"]),p=e=>({type:"redaction",item:e,pageIndex:t.pageIndex}),g={suggestTop:!1,spaceAbove:0,spaceBelow:0},x=(e,o,n)=>t.selectionMenu?t.selectionMenu({rect:o,menuWrapperProps:n,selected:c.value===e.id,placement:g,context:p(e)}):null;return(t,n)=>r.value.length?(o.openBlock(),o.createElementBlock("div",m,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,n=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:n.id},["area"===n.kind?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("div",{style:o.normalizeStyle({position:"absolute",left:n.rect.origin.x*e.scale+"px",top:n.rect.origin.y*e.scale+"px",width:n.rect.size.width*e.scale+"px",height:n.rect.size.height*e.scale+"px",background:"transparent",outline:c.value===n.id?`1px solid ${e.bboxStroke}`:"none",outlineOffset:"2px",border:"1px solid red",pointerEvents:"auto",cursor:"pointer"}),onPointerdown:e=>d(e,n.id),onTouchstart:e=>d(e,n.id)},null,44,v),s(n.id)?(o.openBlock(),o.createBlock(o.unref(l.CounterRotate),{key:0,rect:{origin:{x:n.rect.origin.x*e.scale,y:n.rect.origin.y*e.scale},size:{width:n.rect.size.width*e.scale,height:n.rect.size.height*e.scale}},rotation:e.rotation},{default:o.withCtx(({rect:a,menuWrapperProps:l})=>[e.selectionMenu?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(x(n,a,l)),{key:0})):o.renderSlot(t.$slots,"selection-menu",{key:1,context:p(n),selected:c.value===n.id,rect:a,placement:g,menuWrapperProps:l})]),_:2},1032,["rect","rotation"])):o.createCommentVNode("",!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",{style:o.normalizeStyle({position:"absolute",left:n.rect.origin.x*e.scale+"px",top:n.rect.origin.y*e.scale+"px",width:n.rect.size.width*e.scale+"px",height:n.rect.size.height*e.scale+"px",background:"transparent",outline:c.value===n.id?`1px solid ${e.bboxStroke}`:"none",outlineOffset:"2px",pointerEvents:"auto",cursor:c.value===n.id?"pointer":"default"})},[o.createVNode(i,{rect:n.rect,rects:n.rects,color:"transparent",border:"1px solid red",scale:e.scale,"on-click":e=>d(e,n.id)},null,8,["rect","rects","scale","on-click"])],4),s(n.id)?(o.openBlock(),o.createBlock(o.unref(l.CounterRotate),{key:0,rect:{origin:{x:n.rect.origin.x*e.scale,y:n.rect.origin.y*e.scale},size:{width:n.rect.size.width*e.scale,height:n.rect.size.height*e.scale}},rotation:e.rotation},{default:o.withCtx(({rect:a,menuWrapperProps:l})=>[e.selectionMenu?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(x(n,a,l)),{key:0})):o.renderSlot(t.$slots,"selection-menu",{key:1,context:p(n),selected:c.value===n.id,rect:a,placement:g,menuWrapperProps:l})]),_:2},1032,["rect","rotation"])):o.createCommentVNode("",!0)],64))],64))),128))])):o.createCommentVNode("",!0)}}),x=o.defineComponent({__name:"redaction-layer",props:{documentId:{},pageIndex:{},scale:{},rotation:{},bboxStroke:{default:"rgba(0,0,0,0.8)"},selectionMenu:{}},setup(e){const t=e,l=n.useDocumentState(()=>t.documentId),r=o.computed(()=>{var e;return void 0!==t.scale?t.scale:(null==(e=l.value)?void 0:e.scale)??1}),i=o.computed(()=>{var e;return void 0!==t.rotation?t.rotation:(null==(e=l.value)?void 0:e.rotation)??a.Rotation.Degree0});return(t,n)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(g,{"document-id":e.documentId,"page-index":e.pageIndex,scale:r.value,rotation:i.value,"bbox-stroke":e.bboxStroke,"selection-menu":e.selectionMenu},{"selection-menu":o.withCtx(e=>[o.renderSlot(t.$slots,"selection-menu",o.normalizeProps(o.guardReactiveProps(e)))]),_:3},8,["document-id","page-index","scale","rotation","bbox-stroke","selection-menu"]),o.createVNode(d,{"document-id":e.documentId,"page-index":e.pageIndex,scale:r.value},null,8,["document-id","page-index","scale"]),o.createVNode(p,{"document-id":e.documentId,"page-index":e.pageIndex,scale:r.value},null,8,["document-id","page-index","scale"])],64))}}),f=o.defineComponent({__name:"redact-highlight",props:{annotation:{},isSelected:{type:Boolean},scale:{},pageIndex:{},onClick:{type:Function}},setup(e){const t=e,n=o.ref(!1),l=o.computed(()=>t.annotation.object.segmentRects??[]),r=o.computed(()=>t.annotation.object.rect),i=o.computed(()=>t.annotation.object.strokeColor??"#FF0000"),c=o.computed(()=>t.annotation.object.color??"#000000"),u=o.computed(()=>t.annotation.object.opacity??1),d=o.computed(()=>t.annotation.object.fontColor??t.annotation.object.overlayColor??"#FFFFFF"),s=o.computed(()=>t.annotation.object.overlayText),p=o.computed(()=>t.annotation.object.overlayTextRepeat??!1),m=o.computed(()=>t.annotation.object.fontSize??12),v=o.computed(()=>t.annotation.object.fontFamily??a.PdfStandardFont.Helvetica),g=o.computed(()=>t.annotation.object.textAlign??a.PdfTextAlignment.Center),x=o.computed(()=>{if(!s.value)return"";if(!p.value)return s.value;return Array(10).fill(s.value).join(" ")}),f=e=>({position:"absolute",left:(r.value?e.origin.x-r.value.origin.x:e.origin.x)*t.scale+"px",top:(r.value?e.origin.y-r.value.origin.y:e.origin.y)*t.scale+"px",width:e.size.width*t.scale+"px",height:e.size.height*t.scale+"px",background:n.value?c.value:"transparent",border:n.value?"none":`2px solid ${i.value}`,opacity:n.value?u.value:1,boxSizing:"border-box",pointerEvents:"auto",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:g.value===a.PdfTextAlignment.Left?"flex-start":g.value===a.PdfTextAlignment.Right?"flex-end":"center",overflow:"hidden"}),k=e=>({color:d.value,fontSize:`${Math.min(m.value*t.scale,e.size.height*t.scale*.8)}px`,fontFamily:a.standardFontCss(v.value),textAlign:a.textAlignmentToCss(g.value),whiteSpace:p.value?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis",lineHeight:1});return(t,a)=>(o.openBlock(),o.createElementBlock("div",{onMouseenter:a[2]||(a[2]=e=>n.value=!0),onMouseleave:a[3]||(a[3]=e=>n.value=!1),style:{position:"absolute",inset:0}},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.value,(t,l)=>(o.openBlock(),o.createElementBlock("div",{key:l,onPointerdown:a[0]||(a[0]=(...t)=>e.onClick&&e.onClick(...t)),onTouchstart:a[1]||(a[1]=(...t)=>e.onClick&&e.onClick(...t)),style:o.normalizeStyle(f(t))},[n.value&&s.value?(o.openBlock(),o.createElementBlock("span",{key:0,style:o.normalizeStyle(k(t))},o.toDisplayString(x.value),5)):o.createCommentVNode("",!0)],36))),128))],32))}}),k=o.defineComponent({__name:"redact-area",props:{annotation:{},isSelected:{type:Boolean},scale:{},pageIndex:{},onClick:{type:Function}},setup(e){const t=e,n=o.ref(!1),l=o.computed(()=>t.annotation.object.strokeColor??"#FF0000"),r=o.computed(()=>t.annotation.object.color??"#000000"),i=o.computed(()=>t.annotation.object.opacity??1),c=o.computed(()=>t.annotation.object.fontColor??t.annotation.object.overlayColor??"#FFFFFF"),u=o.computed(()=>t.annotation.object.overlayText),d=o.computed(()=>t.annotation.object.overlayTextRepeat??!1),s=o.computed(()=>t.annotation.object.fontSize??12),p=o.computed(()=>t.annotation.object.fontFamily??a.PdfStandardFont.Helvetica),m=o.computed(()=>t.annotation.object.textAlign??a.PdfTextAlignment.Center),v=o.computed(()=>{if(!u.value)return"";if(!d.value)return u.value;return Array(10).fill(u.value).join(" ")}),g=o.computed(()=>({position:"absolute",inset:0,background:n.value?r.value:"transparent",border:n.value?"none":`2px solid ${l.value}`,opacity:n.value?i.value:1,boxSizing:"border-box",pointerEvents:"auto",cursor:t.isSelected?"move":"pointer",display:"flex",alignItems:"center",justifyContent:m.value===a.PdfTextAlignment.Left?"flex-start":m.value===a.PdfTextAlignment.Right?"flex-end":"center",overflow:"hidden"})),x=o.computed(()=>({color:c.value,fontSize:s.value*t.scale+"px",fontFamily:a.standardFontCss(p.value),textAlign:a.textAlignmentToCss(m.value),whiteSpace:d.value?"normal":"nowrap",overflow:"hidden",textOverflow:"ellipsis",padding:"4px"}));return(t,a)=>(o.openBlock(),o.createElementBlock("div",{onPointerdown:a[0]||(a[0]=t=>{e.isSelected||e.onClick(t)}),onTouchstart:a[1]||(a[1]=t=>{e.isSelected||e.onClick(t)}),onMouseenter:a[2]||(a[2]=e=>n.value=!0),onMouseleave:a[3]||(a[3]=e=>n.value=!1),style:o.normalizeStyle(g.value)},[n.value&&u.value?(o.openBlock(),o.createElementBlock("span",{key:0,style:o.normalizeStyle(x.value)},o.toDisplayString(v.value),5)):o.createCommentVNode("",!0)],36))}}),y=[r.createRenderer({id:"redactHighlight",matches:e=>{var t;return e.type===a.PdfAnnotationSubtype.REDACT&&"segmentRects"in e&&((null==(t=e.segmentRects)?void 0:t.length)??0)>0},component:f}),r.createRenderer({id:"redactArea",matches:e=>{var t;return!(e.type!==a.PdfAnnotationSubtype.REDACT||"segmentRects"in e&&(null==(t=e.segmentRects)?void 0:t.length))},component:k})],b=o.defineComponent({__name:"redact-renderer-registration",setup:e=>(r.useRegisterRenderers(y),(e,t)=>o.renderSlot(e.$slots,"default"))}),h=e.createPluginPackage(t.RedactionPluginPackage).addUtility(b).build();exports.Highlight=i,exports.MarqueeRedact=d,exports.PendingRedactions=g,exports.RedactArea=k,exports.RedactHighlight=f,exports.RedactRendererRegistration=b,exports.RedactionLayer=x,exports.RedactionPluginPackage=h,exports.SelectionRedact=p,exports.redactRenderers=y,exports.useRedaction=e=>{const{provides:n}=u(),a=o.ref(t.initialDocumentState);o.watch([n,()=>o.toValue(e)],([e,o],n,l)=>{if(!e)return void(a.value=t.initialDocumentState);const r=e.forDocument(o);try{a.value=r.getState()}catch(i){a.value=t.initialDocumentState}l(r.onStateChange(e=>{a.value=e}))},{immediate:!0});const l=o.computed(()=>{var t;const a=o.toValue(e);return(null==(t=n.value)?void 0:t.forDocument(a))??null});return{state:a,provides:l}},exports.useRedactionCapability=u,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
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../src/vue/hooks/use-redaction.ts","../../src/vue/components/highlight.vue","../../src/vue/components/marquee-redact.vue","../../src/vue/components/selection-redact.vue","../../src/vue/components/pending-redactions.vue","../../src/vue/components/redaction-layer.vue"],"sourcesContent":["import { ref, watch, computed, toValue, type MaybeRefOrGetter, ComputedRef, Ref } from 'vue';\nimport { useCapability, usePlugin } from '@embedpdf/core/vue';\nimport {\n RedactionPlugin,\n initialDocumentState,\n RedactionDocumentState,\n RedactionScope,\n} from '@embedpdf/plugin-redaction';\n\nexport const useRedactionPlugin = () => usePlugin<RedactionPlugin>(RedactionPlugin.id);\nexport const useRedactionCapability = () => useCapability<RedactionPlugin>(RedactionPlugin.id);\n\n/**\n * Hook for redaction state for a specific document\n * @param documentId Document ID (can be ref, computed, getter, or plain value)\n */\nexport const useRedaction = (\n documentId: MaybeRefOrGetter<string>,\n): {\n state: Readonly<Ref<RedactionDocumentState>>;\n provides: ComputedRef<RedactionScope | null>;\n} => {\n const { provides } = useRedactionCapability();\n const state = ref<RedactionDocumentState>(initialDocumentState);\n\n watch(\n [provides, () => toValue(documentId)],\n ([providesValue, docId], _, onCleanup) => {\n if (!providesValue) {\n state.value = initialDocumentState;\n return;\n }\n\n const scope = providesValue.forDocument(docId);\n\n // Set initial state\n try {\n state.value = scope.getState();\n } catch (e) {\n // Handle case where state might not be ready\n state.value = initialDocumentState;\n }\n\n // Subscribe to changes\n const unsubscribe = scope.onStateChange((newState) => {\n state.value = newState;\n });\n\n onCleanup(unsubscribe);\n },\n { immediate: true },\n );\n\n const scopedProvides = computed(() => {\n const docId = toValue(documentId);\n return provides.value?.forDocument(docId) ?? null;\n });\n\n return {\n state,\n provides: scopedProvides,\n };\n};\n","<template>\n <div\n v-for=\"(rect, i) in rects\"\n :key=\"i\"\n @pointerdown=\"onClick\"\n @touchstart=\"onClick\"\n :style=\"{\n position: 'absolute',\n border,\n left: `${(boundingRect ? rect.origin.x - boundingRect.origin.x : rect.origin.x) * scale}px`,\n top: `${(boundingRect ? rect.origin.y - boundingRect.origin.y : rect.origin.y) * scale}px`,\n width: `${rect.size.width * scale}px`,\n height: `${rect.size.height * scale}px`,\n background: color,\n opacity: opacity,\n pointerEvents: onClick ? 'auto' : 'none',\n cursor: onClick ? 'pointer' : 'default',\n zIndex: onClick ? 1 : undefined,\n }\"\n v-bind=\"$attrs\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Rect } from '@embedpdf/models';\n\ninterface HighlightProps {\n color?: string;\n opacity?: number;\n border?: string;\n rects: Rect[];\n rect?: Rect;\n scale: number;\n onClick?: (e: PointerEvent | TouchEvent) => void;\n}\n\nconst props = withDefaults(defineProps<HighlightProps>(), {\n color: '#FFFF00',\n opacity: 1,\n border: '1px solid red',\n});\n\n// Rename rect to boundingRect for clarity in template\nconst boundingRect = props.rect;\n</script>\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, watch, computed } from 'vue';\nimport { useDocumentState } from '@embedpdf/core/vue';\nimport type { Rect } from '@embedpdf/models';\nimport { useRedactionPlugin } from '../hooks/use-redaction';\n\ninterface 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\nconst props = withDefaults(defineProps<MarqueeRedactProps>(), {\n stroke: 'red',\n fill: 'transparent',\n});\n\nconst { plugin: redactionPlugin } = useRedactionPlugin();\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 [redactionPlugin, () => props.documentId, () => props.pageIndex, actualScale],\n ([plugin, docId, pageIdx, scale], _, onCleanup) => {\n if (!plugin || !docId) return;\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(unregister);\n },\n { immediate: true },\n);\n</script>\n","<template>\n <div\n v-if=\"boundingRect\"\n :style=\"{\n mixBlendMode: 'normal',\n pointerEvents: 'none',\n position: 'absolute',\n inset: 0,\n }\"\n >\n <Highlight\n :color=\"'transparent'\"\n :opacity=\"1\"\n :rects=\"rects\"\n :scale=\"scale\"\n border=\"1px solid red\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue';\nimport type { Rect } from '@embedpdf/models';\nimport { useRedactionPlugin } from '../hooks/use-redaction';\nimport Highlight from './highlight.vue';\n\ninterface SelectionRedactProps {\n documentId: string;\n pageIndex: number;\n scale: number;\n}\n\nconst props = defineProps<SelectionRedactProps>();\n\nconst { plugin: redactionPlugin } = useRedactionPlugin();\nconst rects = ref<Rect[]>([]);\nconst boundingRect = ref<Rect | null>(null);\n\nwatch(\n [redactionPlugin, () => props.documentId, () => props.pageIndex],\n ([plugin, docId, pageIdx], _, onCleanup) => {\n if (!plugin) {\n rects.value = [];\n boundingRect.value = null;\n return;\n }\n\n const unsubscribe = plugin.onRedactionSelectionChange(docId, (formattedSelection) => {\n const selection = formattedSelection.find((s) => s.pageIndex === pageIdx);\n rects.value = selection?.segmentRects ?? [];\n boundingRect.value = selection?.rect ?? null;\n });\n\n onCleanup(unsubscribe);\n },\n { immediate: true },\n);\n</script>\n","<template>\n <div v-if=\"items.length\" :style=\"{ position: 'absolute', inset: 0, pointerEvents: 'none' }\">\n <template v-for=\"item in items\" :key=\"item.id\">\n <!-- Area redaction -->\n <template v-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 outlineOffset: '2px',\n border: `1px solid red`,\n pointerEvents: 'auto',\n cursor: 'pointer',\n }\"\n @pointerdown=\"(e: PointerEvent) => select(e, item.id)\"\n @touchstart=\"(e: TouchEvent) => select(e, item.id)\"\n />\n\n <!-- Selection Menu: Supports BOTH render function and slot -->\n <CounterRotate\n v-if=\"shouldShowMenu(item.id)\"\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=\"rotation\"\n >\n <template #default=\"{ rect, menuWrapperProps }\">\n <!-- Priority 1: Render function prop (schema-driven) -->\n <component\n v-if=\"selectionMenu\"\n :is=\"renderSelectionMenu(item, rect, menuWrapperProps)\"\n />\n\n <!-- Priority 2: Slot (manual customization) -->\n <slot\n v-else\n name=\"selection-menu\"\n :context=\"buildContext(item)\"\n :selected=\"selectedId === item.id\"\n :rect=\"rect\"\n :placement=\"menuPlacement\"\n :menuWrapperProps=\"menuWrapperProps\"\n />\n </template>\n </CounterRotate>\n </template>\n\n <!-- Text redaction -->\n <template v-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 outlineOffset: '2px',\n pointerEvents: '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=\"scale\"\n :on-click=\"(e: PointerEvent | TouchEvent) => select(e, item.id)\"\n />\n </div>\n\n <!-- Selection Menu: Supports BOTH render function and slot -->\n <CounterRotate\n v-if=\"shouldShowMenu(item.id)\"\n :rect=\"{\n origin: {\n x: item.rect.origin.x * scale,\n y: item.rect.origin.y * scale,\n },\n size: {\n width: item.rect.size.width * scale,\n height: item.rect.size.height * scale,\n },\n }\"\n :rotation=\"rotation\"\n >\n <template #default=\"{ rect, menuWrapperProps }\">\n <!-- Priority 1: Render function prop (schema-driven) -->\n <component\n v-if=\"selectionMenu\"\n :is=\"renderSelectionMenu(item, rect, menuWrapperProps)\"\n />\n\n <!-- Priority 2: Slot (manual customization) -->\n <slot\n v-else\n name=\"selection-menu\"\n :context=\"buildContext(item)\"\n :selected=\"selectedId === item.id\"\n :rect=\"rect\"\n :placement=\"menuPlacement\"\n :menuWrapperProps=\"menuWrapperProps\"\n />\n </template>\n </CounterRotate>\n </template>\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, useSlots, type VNode } from 'vue';\nimport type { Rect } from '@embedpdf/models';\nimport { Rotation } from '@embedpdf/models';\nimport { CounterRotate } from '@embedpdf/utils/vue';\nimport type { MenuWrapperProps, SelectionMenuPlacement } from '@embedpdf/utils/vue';\nimport type { RedactionItem } from '@embedpdf/plugin-redaction';\nimport { useRedactionCapability } from '../hooks/use-redaction';\nimport Highlight from './highlight.vue';\nimport type { RedactionSelectionContext, RedactionSelectionMenuRenderFn } from './types';\n\ninterface PendingRedactionsProps {\n documentId: string;\n pageIndex: number;\n scale: number;\n rotation: Rotation;\n bboxStroke?: string;\n /** Render function for selection menu (schema-driven approach) */\n selectionMenu?: RedactionSelectionMenuRenderFn;\n}\n\nconst props = withDefaults(defineProps<PendingRedactionsProps>(), {\n rotation: Rotation.Degree0,\n bboxStroke: 'rgba(0,0,0,0.8)',\n});\n\nconst slots = useSlots();\nconst { provides: redaction } = useRedactionCapability();\nconst items = ref<RedactionItem[]>([]);\nconst selectedId = ref<string | null>(null);\n\nwatch(\n [redaction, () => props.documentId, () => props.pageIndex],\n ([redactionValue, docId, pageIdx], _, onCleanup) => {\n if (!redactionValue) {\n items.value = [];\n selectedId.value = null;\n return;\n }\n\n const scoped = redactionValue.forDocument(docId);\n\n // Initialize with current state\n const currentState = scoped.getState();\n items.value = currentState.pending[pageIdx] ?? [];\n selectedId.value =\n currentState.selected && currentState.selected.page === pageIdx\n ? currentState.selected.id\n : null;\n\n // Subscribe to future changes\n const off1 = scoped.onPendingChange((map) => {\n items.value = map[pageIdx] ?? [];\n });\n\n const off2 = scoped.onSelectedChange((sel) => {\n selectedId.value = sel && sel.page === pageIdx ? sel.id : null;\n });\n\n onCleanup(() => {\n off1?.();\n off2?.();\n });\n },\n { immediate: true },\n);\n\nconst select = (e: PointerEvent | TouchEvent, id: string) => {\n e.stopPropagation();\n const redactionValue = redaction.value;\n if (!redactionValue) return;\n redactionValue.forDocument(props.documentId).selectPending(props.pageIndex, id);\n};\n\n// --- Selection Menu Logic ---\n\n// Check if we should show menu for this item\nconst shouldShowMenu = (itemId: string): boolean => {\n const isSelected = selectedId.value === itemId;\n return isSelected && (!!props.selectionMenu || !!slots['selection-menu']);\n};\n\n// Build context object for selection menu\nconst buildContext = (item: RedactionItem): RedactionSelectionContext => ({\n type: 'redaction',\n item,\n pageIndex: props.pageIndex,\n});\n\n// Placement hints (could be computed based on position)\nconst menuPlacement: SelectionMenuPlacement = {\n suggestTop: false,\n spaceAbove: 0,\n spaceBelow: 0,\n};\n\n// Render via function (for schema-driven approach)\nconst renderSelectionMenu = (\n item: RedactionItem,\n rect: Rect,\n menuWrapperProps: MenuWrapperProps,\n): VNode | null => {\n if (!props.selectionMenu) return null;\n\n return props.selectionMenu({\n rect,\n menuWrapperProps,\n selected: selectedId.value === item.id,\n placement: menuPlacement,\n context: buildContext(item),\n });\n};\n</script>\n","<template>\n <PendingRedactions\n :document-id=\"documentId\"\n :page-index=\"pageIndex\"\n :scale=\"actualScale\"\n :rotation=\"actualRotation\"\n :bbox-stroke=\"bboxStroke\"\n :selection-menu=\"selectionMenu\"\n >\n <template #selection-menu=\"slotProps\">\n <slot name=\"selection-menu\" v-bind=\"slotProps\" />\n </template>\n </PendingRedactions>\n <MarqueeRedact :document-id=\"documentId\" :page-index=\"pageIndex\" :scale=\"actualScale\" />\n <SelectionRedact :document-id=\"documentId\" :page-index=\"pageIndex\" :scale=\"actualScale\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { useDocumentState } from '@embedpdf/core/vue';\nimport { Rotation } from '@embedpdf/models';\nimport PendingRedactions from './pending-redactions.vue';\nimport MarqueeRedact from './marquee-redact.vue';\nimport SelectionRedact from './selection-redact.vue';\nimport { RedactionSelectionMenuRenderFn } from './types';\n\ninterface 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 /** Optional bbox stroke color */\n bboxStroke?: string;\n /** Optional menu renderer for a selected redaction */\n selectionMenu?: RedactionSelectionMenuRenderFn;\n}\n\nconst props = withDefaults(defineProps<RedactionLayerProps>(), {\n bboxStroke: 'rgba(0,0,0,0.8)',\n});\n\nconst documentState = useDocumentState(() => props.documentId);\n\nconst actualScale = computed(() => {\n if (props.scale !== undefined) return props.scale;\n return documentState.value?.scale ?? 1;\n});\n\nconst actualRotation = computed(() => {\n if (props.rotation !== undefined) return props.rotation;\n return documentState.value?.rotation ?? Rotation.Degree0;\n});\n</script>\n"],"names":["useRedactionPlugin","usePlugin","RedactionPlugin","id","useRedactionCapability","useCapability","boundingRect","__props","rect","_openBlock","_createElementBlock","_Fragment","_renderList","rects","i","_mergeProps","key","onPointerdown","_cache","onClick","args","onTouchstart","style","border","left","_unref","origin","x","scale","top","y","width","size","height","color","opacity","zIndex","$attrs","props","plugin","redactionPlugin","documentState","useDocumentState","documentId","ref","actualScale","computed","_a","value","watch","pageIndex","docId","pageIdx","_","onCleanup","registerMarqueeOnPage","callback","onPreview","newRect","immediate","_normalizeStyle","stroke","fill","class","className","onRedactionSelectionChange","formattedSelection","selection","find","s","segmentRects","_hoisted_1","_createVNode","Highlight","slots","useSlots","provides","redaction","items","selectedId","redactionValue","scoped","forDocument","currentState","getState","pending","selected","page","off1","onPendingChange","map","off2","onSelectedChange","sel","select","e","stopPropagation","selectPending","shouldShowMenu","itemId","selectionMenu","buildContext","item","type","menuPlacement","suggestTop","spaceAbove","spaceBelow","renderSelectionMenu","menuWrapperProps","placement","context","length","kind","_createElementVNode","outline","bboxStroke","_createBlock","CounterRotate","rotation","default","_withCtx","_resolveDynamicComponent","_renderSlot","_ctx","$slots","actualRotation","Rotation","Degree0","PendingRedactions","slotProps","Marque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AoC,WAAa,aAAYpC,EAAA2C,UAAYtB,MAAOiB,EAAAG,oDACzEwB,EAAAA,YAA0F4D,EAAA,CAAxE,cAAa7H,EAAAoC,WAAa,aAAYpC,EAAA2C,UAAYtB,MAAOiB,EAAAG,6MLG3EL,IAKA,MAAMiC,SAAEA,GAAaxE,IACfiI,EAAQzF,EAAAA,IAA4B0F,wBAE1CrF,EAAAA,MACE,CAAC2B,EAAU,IAAM2D,UAAQ5F,IACzB,EAAE6F,EAAerF,GAAQE,EAAGC,KAC1B,IAAKkF,EAEH,YADAH,EAAMrF,MAAQsF,EAAAA,sBAIhB,MAAMG,EAAQD,EAActD,YAAY/B,GAGxC,IACEkF,EAAMrF,MAAQyF,EAAMrD,UACtB,OAASW,GAEPsC,EAAMrF,MAAQsF,EAAAA,oBAChB,CAOAhF,EAJoBmF,EAAMC,cAAeC,IACvCN,EAAMrF,MAAQ2F,MAKlB,CAAEhF,WAAW,IAGf,MAAMiF,EAAiB9F,EAAAA,SAAS,WAC9B,MAAMK,EAAQoF,EAAAA,QAAQ5F,GACtB,OAAO,OAAAI,EAAA6B,EAAS5B,YAAT,EAAAD,EAAgBmC,YAAY/B,KAAU,OAG/C,MAAO,CACLkF,QACAzD,SAAUgE"}
1
+ {"version":3,"file":"index.cjs","sources":["../../src/vue/components/highlight.vue","../../src/vue/hooks/use-redaction.ts","../../src/vue/components/marquee-redact.vue","../../src/vue/components/selection-redact.vue","../../src/vue/components/pending-redactions.vue","../../src/vue/components/redaction-layer.vue","../../src/vue/components/annotations/redact-highlight.vue","../../src/vue/components/annotations/redact-area.vue","../../src/vue/components/redact-renderers.ts","../../src/vue/components/redact-renderer-registration.vue","../../src/vue/index.ts"],"sourcesContent":["<template>\n <div\n v-for=\"(rect, i) in rects\"\n :key=\"i\"\n @pointerdown=\"onClick\"\n @touchstart=\"onClick\"\n :style=\"{\n position: 'absolute',\n border,\n left: `${(boundingRect ? rect.origin.x - boundingRect.origin.x : rect.origin.x) * scale}px`,\n top: `${(boundingRect ? rect.origin.y - boundingRect.origin.y : rect.origin.y) * scale}px`,\n width: `${rect.size.width * scale}px`,\n height: `${rect.size.height * scale}px`,\n background: color,\n opacity: opacity,\n pointerEvents: onClick ? 'auto' : 'none',\n cursor: onClick ? 'pointer' : 'default',\n zIndex: onClick ? 1 : undefined,\n }\"\n v-bind=\"$attrs\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport type { Rect } from '@embedpdf/models';\n\ninterface HighlightProps {\n color?: string;\n opacity?: number;\n border?: string;\n rects: Rect[];\n rect?: Rect;\n scale: number;\n onClick?: (e: PointerEvent | TouchEvent) => void;\n}\n\nconst props = withDefaults(defineProps<HighlightProps>(), {\n color: '#FFFF00',\n opacity: 1,\n border: '1px solid red',\n});\n\n// Rename rect to boundingRect for clarity in template\nconst boundingRect = props.rect;\n</script>\n","import { ref, watch, computed, toValue, type MaybeRefOrGetter, ComputedRef, Ref } from 'vue';\nimport { useCapability, usePlugin } from '@embedpdf/core/vue';\nimport {\n RedactionPlugin,\n initialDocumentState,\n RedactionDocumentState,\n RedactionScope,\n} from '@embedpdf/plugin-redaction';\n\nexport const useRedactionPlugin = () => usePlugin<RedactionPlugin>(RedactionPlugin.id);\nexport const useRedactionCapability = () => useCapability<RedactionPlugin>(RedactionPlugin.id);\n\n/**\n * Hook for redaction state for a specific document\n * @param documentId Document ID (can be ref, computed, getter, or plain value)\n */\nexport const useRedaction = (\n documentId: MaybeRefOrGetter<string>,\n): {\n state: Readonly<Ref<RedactionDocumentState>>;\n provides: ComputedRef<RedactionScope | null>;\n} => {\n const { provides } = useRedactionCapability();\n const state = ref<RedactionDocumentState>(initialDocumentState);\n\n watch(\n [provides, () => toValue(documentId)],\n ([providesValue, docId], _, onCleanup) => {\n if (!providesValue) {\n state.value = initialDocumentState;\n return;\n }\n\n const scope = providesValue.forDocument(docId);\n\n // Set initial state\n try {\n state.value = scope.getState();\n } catch (e) {\n // Handle case where state might not be ready\n state.value = initialDocumentState;\n }\n\n // Subscribe to changes\n const unsubscribe = scope.onStateChange((newState) => {\n state.value = newState;\n });\n\n onCleanup(unsubscribe);\n },\n { immediate: true },\n );\n\n const scopedProvides = computed(() => {\n const docId = toValue(documentId);\n return provides.value?.forDocument(docId) ?? null;\n });\n\n return {\n state,\n provides: scopedProvides,\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 ${strokeColor}`,\n background: fill,\n boxSizing: 'border-box',\n }\"\n :class=\"className\"\n />\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, computed } from 'vue';\nimport { useDocumentState } from '@embedpdf/core/vue';\nimport type { Rect } from '@embedpdf/models';\nimport { useRedactionPlugin } from '../hooks/use-redaction';\n\ninterface 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\nconst props = withDefaults(defineProps<MarqueeRedactProps>(), {\n stroke: 'red',\n fill: 'transparent',\n});\n\nconst { plugin: redactionPlugin } = useRedactionPlugin();\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\n// Get stroke color from plugin (annotation mode uses tool defaults, legacy uses red)\n// Allow prop override for backwards compatibility\nconst strokeColor = computed(\n () => props.stroke ?? redactionPlugin.value?.getPreviewStrokeColor() ?? 'red',\n);\n\nwatch(\n [redactionPlugin, () => props.documentId, () => props.pageIndex, actualScale],\n ([plugin, docId, pageIdx, scale], _, onCleanup) => {\n if (!plugin || !docId) return;\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(unregister);\n },\n { immediate: true },\n);\n</script>\n","<template>\n <div\n v-if=\"boundingRect\"\n :style=\"{\n mixBlendMode: 'normal',\n pointerEvents: 'none',\n position: 'absolute',\n inset: 0,\n }\"\n >\n <Highlight\n :color=\"'transparent'\"\n :opacity=\"1\"\n :rects=\"rects\"\n :scale=\"scale\"\n :border=\"`1px solid ${strokeColor}`\"\n />\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, computed } from 'vue';\nimport type { Rect } from '@embedpdf/models';\nimport { useRedactionPlugin } from '../hooks/use-redaction';\nimport Highlight from './highlight.vue';\n\ninterface SelectionRedactProps {\n documentId: string;\n pageIndex: number;\n scale: number;\n}\n\nconst props = defineProps<SelectionRedactProps>();\n\nconst { plugin: redactionPlugin } = useRedactionPlugin();\nconst rects = ref<Rect[]>([]);\nconst boundingRect = ref<Rect | null>(null);\n\n// Get stroke color from plugin (annotation mode uses tool defaults, legacy uses red)\nconst strokeColor = computed(() => redactionPlugin.value?.getPreviewStrokeColor() ?? 'red');\n\nwatch(\n [redactionPlugin, () => props.documentId, () => props.pageIndex],\n ([plugin, docId, pageIdx], _, onCleanup) => {\n if (!plugin) {\n rects.value = [];\n boundingRect.value = null;\n return;\n }\n\n const unsubscribe = plugin.onRedactionSelectionChange(docId, (formattedSelection) => {\n const selection = formattedSelection.find((s) => s.pageIndex === pageIdx);\n rects.value = selection?.segmentRects ?? [];\n boundingRect.value = selection?.rect ?? null;\n });\n\n onCleanup(unsubscribe);\n },\n { immediate: true },\n);\n</script>\n","<template>\n <div v-if=\"items.length\" :style=\"{ position: 'absolute', inset: 0, pointerEvents: 'none' }\">\n <template v-for=\"item in items\" :key=\"item.id\">\n <!-- Area redaction -->\n <template v-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 outlineOffset: '2px',\n border: `1px solid red`,\n pointerEvents: 'auto',\n cursor: 'pointer',\n }\"\n @pointerdown=\"(e: PointerEvent) => select(e, item.id)\"\n @touchstart=\"(e: TouchEvent) => select(e, item.id)\"\n />\n\n <!-- Selection Menu: Supports BOTH render function and slot -->\n <CounterRotate\n v-if=\"shouldShowMenu(item.id)\"\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=\"rotation\"\n >\n <template #default=\"{ rect, menuWrapperProps }\">\n <!-- Priority 1: Render function prop (schema-driven) -->\n <component\n v-if=\"selectionMenu\"\n :is=\"renderSelectionMenu(item, rect, menuWrapperProps)\"\n />\n\n <!-- Priority 2: Slot (manual customization) -->\n <slot\n v-else\n name=\"selection-menu\"\n :context=\"buildContext(item)\"\n :selected=\"selectedId === item.id\"\n :rect=\"rect\"\n :placement=\"menuPlacement\"\n :menuWrapperProps=\"menuWrapperProps\"\n />\n </template>\n </CounterRotate>\n </template>\n\n <!-- Text redaction -->\n <template v-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 outlineOffset: '2px',\n pointerEvents: '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=\"scale\"\n :on-click=\"(e: PointerEvent | TouchEvent) => select(e, item.id)\"\n />\n </div>\n\n <!-- Selection Menu: Supports BOTH render function and slot -->\n <CounterRotate\n v-if=\"shouldShowMenu(item.id)\"\n :rect=\"{\n origin: {\n x: item.rect.origin.x * scale,\n y: item.rect.origin.y * scale,\n },\n size: {\n width: item.rect.size.width * scale,\n height: item.rect.size.height * scale,\n },\n }\"\n :rotation=\"rotation\"\n >\n <template #default=\"{ rect, menuWrapperProps }\">\n <!-- Priority 1: Render function prop (schema-driven) -->\n <component\n v-if=\"selectionMenu\"\n :is=\"renderSelectionMenu(item, rect, menuWrapperProps)\"\n />\n\n <!-- Priority 2: Slot (manual customization) -->\n <slot\n v-else\n name=\"selection-menu\"\n :context=\"buildContext(item)\"\n :selected=\"selectedId === item.id\"\n :rect=\"rect\"\n :placement=\"menuPlacement\"\n :menuWrapperProps=\"menuWrapperProps\"\n />\n </template>\n </CounterRotate>\n </template>\n </template>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, useSlots, type VNode } from 'vue';\nimport type { Rect } from '@embedpdf/models';\nimport { Rotation } from '@embedpdf/models';\nimport { CounterRotate } from '@embedpdf/utils/vue';\nimport type { MenuWrapperProps, SelectionMenuPlacement } from '@embedpdf/utils/vue';\nimport type { RedactionItem } from '@embedpdf/plugin-redaction';\nimport { useRedactionCapability } from '../hooks/use-redaction';\nimport Highlight from './highlight.vue';\nimport type { RedactionSelectionContext, RedactionSelectionMenuRenderFn } from './types';\n\ninterface PendingRedactionsProps {\n documentId: string;\n pageIndex: number;\n scale: number;\n rotation: Rotation;\n bboxStroke?: string;\n /** Render function for selection menu (schema-driven approach) */\n selectionMenu?: RedactionSelectionMenuRenderFn;\n}\n\nconst props = withDefaults(defineProps<PendingRedactionsProps>(), {\n rotation: Rotation.Degree0,\n bboxStroke: 'rgba(0,0,0,0.8)',\n});\n\nconst slots = useSlots();\nconst { provides: redaction } = useRedactionCapability();\nconst items = ref<RedactionItem[]>([]);\nconst selectedId = ref<string | null>(null);\n\nwatch(\n [redaction, () => props.documentId, () => props.pageIndex],\n ([redactionValue, docId, pageIdx], _, onCleanup) => {\n if (!redactionValue) {\n items.value = [];\n selectedId.value = null;\n return;\n }\n\n const scoped = redactionValue.forDocument(docId);\n\n // Initialize with current state - only show legacy mode items\n const currentState = scoped.getState();\n items.value = (currentState.pending[pageIdx] ?? []).filter((it) => it.source === 'legacy');\n selectedId.value =\n currentState.selected && currentState.selected.page === pageIdx\n ? currentState.selected.id\n : null;\n\n // Subscribe to future changes - only show legacy mode items\n const off1 = scoped.onPendingChange((map) => {\n items.value = (map[pageIdx] ?? []).filter((it) => it.source === 'legacy');\n });\n\n const off2 = scoped.onSelectedChange((sel) => {\n selectedId.value = sel && sel.page === pageIdx ? sel.id : null;\n });\n\n onCleanup(() => {\n off1?.();\n off2?.();\n });\n },\n { immediate: true },\n);\n\nconst select = (e: PointerEvent | TouchEvent, id: string) => {\n e.stopPropagation();\n const redactionValue = redaction.value;\n if (!redactionValue) return;\n redactionValue.forDocument(props.documentId).selectPending(props.pageIndex, id);\n};\n\n// --- Selection Menu Logic ---\n\n// Check if we should show menu for this item\nconst shouldShowMenu = (itemId: string): boolean => {\n const isSelected = selectedId.value === itemId;\n return isSelected && (!!props.selectionMenu || !!slots['selection-menu']);\n};\n\n// Build context object for selection menu\nconst buildContext = (item: RedactionItem): RedactionSelectionContext => ({\n type: 'redaction',\n item,\n pageIndex: props.pageIndex,\n});\n\n// Placement hints (could be computed based on position)\nconst menuPlacement: SelectionMenuPlacement = {\n suggestTop: false,\n spaceAbove: 0,\n spaceBelow: 0,\n};\n\n// Render via function (for schema-driven approach)\nconst renderSelectionMenu = (\n item: RedactionItem,\n rect: Rect,\n menuWrapperProps: MenuWrapperProps,\n): VNode | null => {\n if (!props.selectionMenu) return null;\n\n return props.selectionMenu({\n rect,\n menuWrapperProps,\n selected: selectedId.value === item.id,\n placement: menuPlacement,\n context: buildContext(item),\n });\n};\n</script>\n","<template>\n <PendingRedactions\n :document-id=\"documentId\"\n :page-index=\"pageIndex\"\n :scale=\"actualScale\"\n :rotation=\"actualRotation\"\n :bbox-stroke=\"bboxStroke\"\n :selection-menu=\"selectionMenu\"\n >\n <template #selection-menu=\"slotProps\">\n <slot name=\"selection-menu\" v-bind=\"slotProps\" />\n </template>\n </PendingRedactions>\n <MarqueeRedact :document-id=\"documentId\" :page-index=\"pageIndex\" :scale=\"actualScale\" />\n <SelectionRedact :document-id=\"documentId\" :page-index=\"pageIndex\" :scale=\"actualScale\" />\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport { useDocumentState } from '@embedpdf/core/vue';\nimport { Rotation } from '@embedpdf/models';\nimport PendingRedactions from './pending-redactions.vue';\nimport MarqueeRedact from './marquee-redact.vue';\nimport SelectionRedact from './selection-redact.vue';\nimport { RedactionSelectionMenuRenderFn } from './types';\n\ninterface 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 /** Optional bbox stroke color */\n bboxStroke?: string;\n /** Optional menu renderer for a selected redaction */\n selectionMenu?: RedactionSelectionMenuRenderFn;\n}\n\nconst props = withDefaults(defineProps<RedactionLayerProps>(), {\n bboxStroke: 'rgba(0,0,0,0.8)',\n});\n\nconst documentState = useDocumentState(() => props.documentId);\n\nconst actualScale = computed(() => {\n if (props.scale !== undefined) return props.scale;\n return documentState.value?.scale ?? 1;\n});\n\nconst actualRotation = computed(() => {\n if (props.rotation !== undefined) return props.rotation;\n return documentState.value?.rotation ?? Rotation.Degree0;\n});\n</script>\n","<template>\n <div\n @mouseenter=\"isHovered = true\"\n @mouseleave=\"isHovered = false\"\n :style=\"{ position: 'absolute', inset: 0 }\"\n >\n <div\n v-for=\"(b, i) in segmentRects\"\n :key=\"i\"\n @pointerdown=\"onClick\"\n @touchstart=\"onClick\"\n :style=\"getSegmentStyle(b)\"\n >\n <span v-if=\"isHovered && overlayText\" :style=\"getTextStyle(b)\">\n {{ renderedOverlayText }}\n </span>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, type CSSProperties } from 'vue';\nimport type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';\nimport type { PdfRedactAnnoObject, Rect } from '@embedpdf/models';\nimport {\n PdfStandardFont,\n PdfTextAlignment,\n standardFontCss,\n textAlignmentToCss,\n} from '@embedpdf/models';\n\nconst props = defineProps<AnnotationRendererProps<PdfRedactAnnoObject>>();\nconst isHovered = ref(false);\n\n// Access props.annotation.object directly in computed to maintain reactivity\nconst segmentRects = computed(() => props.annotation.object.segmentRects ?? []);\nconst rect = computed(() => props.annotation.object.rect);\n\n// C - Border/stroke color\nconst strokeColor = computed(() => props.annotation.object.strokeColor ?? '#FF0000');\n// IC - Interior color (background fill when redaction is applied)\nconst color = computed(() => props.annotation.object.color ?? '#000000');\n// CA - Opacity (0-1)\nconst opacity = computed(() => props.annotation.object.opacity ?? 1);\n// OC - Overlay text color (Adobe extension), fallback to fontColor\nconst textColor = computed(\n () => props.annotation.object.fontColor ?? props.annotation.object.overlayColor ?? '#FFFFFF',\n);\n// Overlay text properties\nconst overlayText = computed(() => props.annotation.object.overlayText);\nconst overlayTextRepeat = computed(() => props.annotation.object.overlayTextRepeat ?? false);\nconst fontSize = computed(() => props.annotation.object.fontSize ?? 12);\nconst fontFamily = computed(() => props.annotation.object.fontFamily ?? PdfStandardFont.Helvetica);\nconst textAlign = computed(() => props.annotation.object.textAlign ?? PdfTextAlignment.Center);\n\n// Calculate how many times to repeat text (approximate)\nconst renderedOverlayText = computed(() => {\n if (!overlayText.value) return '';\n if (!overlayTextRepeat.value) return overlayText.value;\n // Repeat text multiple times to fill the space\n const reps = 10;\n return Array(reps).fill(overlayText.value).join(' ');\n});\n\nconst getSegmentStyle = (b: Rect): CSSProperties => ({\n position: 'absolute',\n left: `${(rect.value ? b.origin.x - rect.value.origin.x : b.origin.x) * props.scale}px`,\n top: `${(rect.value ? b.origin.y - rect.value.origin.y : b.origin.y) * props.scale}px`,\n width: `${b.size.width * props.scale}px`,\n height: `${b.size.height * props.scale}px`,\n // Default: transparent background with strokeColor (C) border\n // Hovered: color (IC) background fill, no border\n background: isHovered.value ? color.value : 'transparent',\n border: !isHovered.value ? `2px solid ${strokeColor.value}` : 'none',\n opacity: isHovered.value ? opacity.value : 1,\n boxSizing: 'border-box',\n pointerEvents: 'auto',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent:\n textAlign.value === PdfTextAlignment.Left\n ? 'flex-start'\n : textAlign.value === PdfTextAlignment.Right\n ? 'flex-end'\n : 'center',\n overflow: 'hidden',\n});\n\nconst getTextStyle = (b: Rect): CSSProperties => ({\n color: textColor.value,\n fontSize: `${Math.min(fontSize.value * props.scale, b.size.height * props.scale * 0.8)}px`,\n fontFamily: standardFontCss(fontFamily.value),\n textAlign: textAlignmentToCss(textAlign.value),\n whiteSpace: overlayTextRepeat.value ? 'normal' : 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n lineHeight: 1,\n});\n</script>\n","<template>\n <div\n @pointerdown=\"\n (e) => {\n if (!isSelected) onClick(e);\n }\n \"\n @touchstart=\"\n (e) => {\n if (!isSelected) onClick(e);\n }\n \"\n @mouseenter=\"isHovered = true\"\n @mouseleave=\"isHovered = false\"\n :style=\"containerStyle\"\n >\n <span v-if=\"isHovered && overlayText\" :style=\"textStyle\">\n {{ renderedOverlayText }}\n </span>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, type CSSProperties } from 'vue';\nimport type { AnnotationRendererProps } from '@embedpdf/plugin-annotation/vue';\nimport type { PdfRedactAnnoObject } from '@embedpdf/models';\nimport {\n PdfStandardFont,\n PdfTextAlignment,\n standardFontCss,\n textAlignmentToCss,\n} from '@embedpdf/models';\n\nconst props = defineProps<AnnotationRendererProps<PdfRedactAnnoObject>>();\nconst isHovered = ref(false);\n\n// Access props.annotation.object directly in computed to maintain reactivity\n// C - Border/stroke color\nconst strokeColor = computed(() => props.annotation.object.strokeColor ?? '#FF0000');\n// IC - Interior color (background fill when redaction is applied)\nconst color = computed(() => props.annotation.object.color ?? '#000000');\n// CA - Opacity (0-1)\nconst opacity = computed(() => props.annotation.object.opacity ?? 1);\n// OC - Overlay text color (Adobe extension), fallback to fontColor\nconst textColor = computed(\n () => props.annotation.object.fontColor ?? props.annotation.object.overlayColor ?? '#FFFFFF',\n);\n// Overlay text properties\nconst overlayText = computed(() => props.annotation.object.overlayText);\nconst overlayTextRepeat = computed(() => props.annotation.object.overlayTextRepeat ?? false);\nconst fontSize = computed(() => props.annotation.object.fontSize ?? 12);\nconst fontFamily = computed(() => props.annotation.object.fontFamily ?? PdfStandardFont.Helvetica);\nconst textAlign = computed(() => props.annotation.object.textAlign ?? PdfTextAlignment.Center);\n\n// Calculate how many times to repeat text (approximate)\nconst renderedOverlayText = computed(() => {\n if (!overlayText.value) return '';\n if (!overlayTextRepeat.value) return overlayText.value;\n // Repeat text multiple times to fill the space\n const reps = 10;\n return Array(reps).fill(overlayText.value).join(' ');\n});\n\nconst containerStyle = computed<CSSProperties>(() => ({\n position: 'absolute',\n inset: 0,\n // Default: transparent background with strokeColor (C) border\n // Hovered: color (IC) background fill, no border\n background: isHovered.value ? color.value : 'transparent',\n border: !isHovered.value ? `2px solid ${strokeColor.value}` : 'none',\n opacity: isHovered.value ? opacity.value : 1,\n boxSizing: 'border-box',\n pointerEvents: 'auto',\n cursor: props.isSelected ? 'move' : 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent:\n textAlign.value === PdfTextAlignment.Left\n ? 'flex-start'\n : textAlign.value === PdfTextAlignment.Right\n ? 'flex-end'\n : 'center',\n overflow: 'hidden',\n}));\n\nconst textStyle = computed<CSSProperties>(() => ({\n color: textColor.value,\n fontSize: `${fontSize.value * props.scale}px`,\n fontFamily: standardFontCss(fontFamily.value),\n textAlign: textAlignmentToCss(textAlign.value),\n whiteSpace: overlayTextRepeat.value ? 'normal' : 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n padding: '4px',\n}));\n</script>\n","import { createRenderer, type BoxedAnnotationRenderer } from '@embedpdf/plugin-annotation/vue';\nimport { PdfAnnotationSubtype, type PdfRedactAnnoObject } from '@embedpdf/models';\nimport RedactHighlight from './annotations/redact-highlight.vue';\nimport RedactArea from './annotations/redact-area.vue';\n\n/**\n * Boxed annotation renderers for Redact annotations.\n * Type safety is enforced at definition time via createRenderer.\n * These are automatically registered with the annotation plugin via context.\n */\nexport const redactRenderers: BoxedAnnotationRenderer[] = [\n createRenderer<PdfRedactAnnoObject>({\n id: 'redactHighlight',\n matches: (a): a is PdfRedactAnnoObject =>\n a.type === PdfAnnotationSubtype.REDACT &&\n 'segmentRects' in a &&\n (a.segmentRects?.length ?? 0) > 0,\n component: RedactHighlight,\n }),\n createRenderer<PdfRedactAnnoObject>({\n id: 'redactArea',\n matches: (a): a is PdfRedactAnnoObject =>\n a.type === PdfAnnotationSubtype.REDACT &&\n (!('segmentRects' in a) || !(a.segmentRects?.length ?? 0)),\n component: RedactArea,\n }),\n];\n","<script setup lang=\"ts\">\nimport { useRegisterRenderers } from '@embedpdf/plugin-annotation/vue';\nimport { redactRenderers } from './redact-renderers';\n\n/**\n * Utility component that registers redact renderers once at app level.\n * Added via addUtility() so it mounts once, not per-page.\n */\nuseRegisterRenderers(redactRenderers);\n</script>\n\n<template>\n <slot />\n</template>\n","import { createPluginPackage } from '@embedpdf/core';\nimport { RedactionPluginPackage as BaseRedactionPackage } from '@embedpdf/plugin-redaction';\nimport { RedactRendererRegistration } from './components';\n\nexport * from './hooks';\nexport * from './components';\nexport * from './components/types';\nexport * from '@embedpdf/plugin-redaction';\n\n// Automatically register redact renderers when plugin is loaded\nexport const RedactionPluginPackage = createPluginPackage(BaseRedactionPackage)\n .addUtility(RedactRendererRegistration)\n .build();\n"],"names":["boundingRect","__props","rect","_openBlock","_createElementBlock","_Fragment","_renderList","rects","i","_mergeProps","key","onPointerdown","_cache","onClick","args","onTouchstart","style","border","left","_unref","origin","x","scale","top","y","width","size","height","color","opacity","zIndex","$attrs","useRedactionPlugin","usePlugin","RedactionPlugin","id","useRedactionCapability","useCapability","props","plugin","redactionPlugin","documentState","useDocumentState","documentId","ref","actualScale","computed","_a","value","strokeColor","stroke","getPreviewStrokeColor","watch","pageIndex","docId","pageIdx","_","onCleanup","registerMarqueeOnPage","callback","onPreview","newRect","immediate","_normalizeStyle","fill","class","className","onRedactionSelectionChange","formattedSelection","selection","find","s","segmentRects","_hoisted_1","_createVNode","Highlight","slots","useSlots","provides","redaction","items","selectedId","redactionValue","scoped","forDocument","currentState","getState","pending","filter","it","source","selected","page","off1","onPendingChange","map","off2","onSelectedChange","sel","select","e","stopPropagation","selectPending","shouldShowMenu","itemId","selectionMenu","buildContext","item","type","menuPlacement","suggestTop","spaceAbove","spaceBelow","renderSelectionMenu","menuWrapperProps","placement","context","length","kind","_createElementVNode","outline","bboxStroke","_createBlock","CounterRotate","rotation","default","_withCtx","_resolveDynamicComponent","_renderSlot","_ctx","$slots","actualRotation","Rotation","Degree0","PendingRedactions","slotProps","MarqueeRedact","SelectionRedact","isHovered","annotation","object","textColor","fontColor","overlayColor","overlayText","overlayTextRepeat","fontSize","fontFamily","PdfStandardFont","Helvetica","textAlign","PdfTextAlignment","Center","renderedOverlayText","Array","join","getSegmentStyle","b","position","background","boxSizing","pointerEvents","cursor","display","alignItems","justifyContent","Left","Right","overflow","getTextStyle","Math","min","standardFontCss","textAlignmentToCss","whiteSpace","textOverflow","lineHeight","onMouseenter","onMouseleave","inset","containerStyle","isSelected","textStyle","padding","redactRenderers","createRenderer","matches","a","PdfAnnotationSubtype","REDACT","component","RedactHighlight","RedactArea","useRegisterRenderers","RedactionPluginPackage","createPluginPackage","BaseRedactionPackage","addUtility","RedactRendererRegistration","build","state","initialDocumentState","toValue","providesValue","scope","onStateChange","newState","scopedProvides"],"mappings":"oeAoCA,MAOMA,EAPQC,EAOaC,mBA1CzBC,aAAA,GAAAC,EAAAA,mBA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';
3
3
  export * from './components/types';
4
- export * from '../lib/index.ts';
4
+ export * from '../lib';
5
+ export declare const RedactionPluginPackage: import('@embedpdf/core').WithAutoMount<import('@embedpdf/core').PluginPackage<import('../lib').RedactionPlugin, import('../lib').RedactionPluginConfig, import('../lib').RedactionState, import('src/lib/actions').RedactionAction>>;