New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-image-pointer

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-image-pointer - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
+1
-2
dist/components/ImagenConInfo.d.ts

@@ -7,3 +7,2 @@ export default ImagenConInfo;

isDarkMode?: boolean | undefined;
}): React.JSX.Element;
import React from "react";
}): import("react/jsx-runtime").JSX.Element;

@@ -5,3 +5,2 @@ export default Modal;

onClose: any;
}): React.JSX.Element;
import React from "react";
}): import("react/jsx-runtime").JSX.Element;
import e,{useState as t,useRef as r,useEffect as i}from"react";import{jsx as l,jsxs as n}from"react/jsx-runtime";var o={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},a=e.createContext&&e.createContext(o),s=["attr","size","title"];function c(e,t){if(null==e)return{};var r,i,l=function(e,t){if(null==e)return{};var r={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)r=n[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},d.apply(this,arguments)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function h(e,t,r){var i;return(t="symbol"==typeof(i=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?i:i+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(t){return t&&t.map((t,r)=>e.createElement(t.tag,u({key:r},t.attr),m(t.child)))}function p(t){return r=>e.createElement(g,d({attr:u({},t.attr)},r),m(t.child))}function g(t){var r=r=>{var i,{attr:l,size:n,title:o}=t,a=c(t,s),f=n||r.size||"1em";return r.className&&(i=r.className),t.className&&(i=(i?i+" ":"")+t.className),e.createElement("svg",d({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,l,a,{className:i,style:u(u({color:t.color||r.color},r.style),t.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),o&&e.createElement("title",null,o),t.children)};return void 0!==a?e.createElement(a.Consumer,null,e=>r(e)):r(o)}function x(e){return p({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m21 21-6-6m6 6v-4.8m0 4.8h-4.8"},child:[]},{tag:"path",attr:{d:"M3 16.2V21m0 0h4.8M3 21l6-6"},child:[]},{tag:"path",attr:{d:"M21 7.8V3m0 0h-4.8M21 3l-6 6"},child:[]},{tag:"path",attr:{d:"M3 7.8V3m0 0h4.8M3 3l6 6"},child:[]}]})(e)}function v(e){return p({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 3h6v6"},child:[]},{tag:"path",attr:{d:"M10 14 21 3"},child:[]},{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]}]})(e)}function b(e){return p({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(e)}const y=({src:e,onClose:t})=>l("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-opacity-50",children:n("div",{className:"relative max-w-screen-lg max-h-screen overflow-auto rounded-xl bg-black",children:[l("button",{className:"absolute top-0 right-0 text-white bg-black rounded-bl-lg text-2xl font-bold z-10 cursor-pointer",onClick:t,children:l(b,{size:32})}),l("img",{src:e,alt:"Full size",className:"block w-full h-auto"})]})}),w=({src:e,maxHeight:o="600px",itemData:a,isDarkMode:s=!1})=>{const[c,d]=t({width:0,height:0}),[f,u]=t({}),[h,m]=t(!1),[p,g]=t(!1),[b,w]=t(""),N=r(null),k=r(null),j=r({}),O=(e,t,r)=>{if(!t||!k.current||!N.current||0===r.width)return null;const i=t.getBoundingClientRect(),l=k.current.getBoundingClientRect(),n=N.current.getBoundingClientRect(),o=e.x/100*r.width+(n.left-l.left),s=e.y/100*r.height+(n.top-l.top);let c,d;d=i.top+i.height/2-l.top;return c=a.points.indexOf(e)%2==0?i.left-l.left:i.right-l.left,{start:{x:o,y:s},end:{x:c,y:d}}};i(()=>{const e=N.current;if(e){const t=()=>{d({width:e.offsetWidth,height:e.offsetHeight})};return e.addEventListener("load",t),e.complete&&t(),()=>e.removeEventListener("load",t)}},[e]),i(()=>{if(c.width>0&&c.height>0&&Object.keys(j.current).length===a.points.length){const e={};a.points.forEach(t=>{if(void 0!==t.x&&void 0!==t.y){const r=j.current[t.id],i=O(t,r,c);null!==i&&(e[t.id]=i)}}),u(e)}},[c,a.points]),i(()=>{const e=()=>{if(Object.keys(f).length>0&&N.current){const e={width:N.current.offsetWidth,height:N.current.offsetHeight},t={};a.points.forEach(r=>{if(void 0!==r.x&&void 0!==r.y){const i=j.current[r.id],l=O(r,i,e);null!==l&&(t[r.id]=l)}}),u(t)}};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[a.points,f]);const z=()=>{w(""),m(!1),g(!1)},C=e=>{w(e),g(!0)};return n("div",{className:"relative flex flex-col items-start justify-center gap-5 font-sans",children:[n("div",{className:"flex flex-col gap-2",children:[l("p",{className:"w-fit py-2 px-4 rounded-xl font-semibold text-xl text-white "+(s?"dark:bg-gray-700":"bg-gray-700 "),children:a.details.title}),a.details.description&&l("div",{className:"relative z-20 w-full rounded-l-md items-baseline p-2 text-gray-300 flex flex-row",children:l("p",{className:"px-1 font-light text-1xl "+(s?"text-gray-300":"text-gray-700 "),children:a.details.description})})]}),n("div",{ref:k,className:"relative flex flex-col md:flex-row items-start justify-center",children:[n("div",{className:"flex flex-col items-end gap-5 pr-5 md:pr-5 order-2 md:order-1",children:[l("div",{className:"flex flex-col gap-2"}),a.points.map((e,t)=>t%2==0?null:n("div",{id:`info-div-${e.id}`,ref:t=>j.current[e.id]=t,className:"relative z-20 w-full md:w-[300px] rounded-l-md border-r-2 border-[#717171] p-2 shadow text-gray-400 text-start "+(s?"bg-[rgba(255,255,255,0.1)]":"bg-[rgba(94,75,75,0.1)]"),children:[l("h3",{className:"text-lg font-semibold p-1 "+(s?"text-white":"text-gray-800"),children:e.info.title}),l("p",{className:"\ttext-sm p-1.5 "+(s?"text-gray-400":"text-gray-600"),children:e.info.description}),e.link&&l("div",{className:"p-1.5 w-full flex justify-end",children:n("a",{target:"_blank",rel:"noopener noreferrer",href:e.link.url,className:" hover:text-white flex items-center gap-1 "+(s?"text-gray-300 ":"text-black "),children:[l(v,{size:18,color:"#717171"}),e.link.title]})}),e.image&&n("div",{className:"relative p-1.5 w-full flex justify-end items-baseline gap-1 ",children:[l(x,{size:18,color:"#717171",className:"cursor-pointer ",onClick:()=>C(e.image.src)}),l("img",{src:e.image.src,alt:e.image.alt,className:" rounded-md w-16 h-16 object-cover cursor-pointer",onClick:()=>C(e.image.src)})]})]},`info-${e.id}`))]}),n("div",{className:"relative flex-shrink-0 order-1 md:order-2",children:[l("img",{ref:N,src:e,alt:"Interactive image",style:{maxHeight:o,cursor:"pointer"},className:"block h-auto w-auto rounded-b-xl rounded-t-xl",onClick:()=>{m(!0)}}),a.points.map(e=>void 0!==e.x&&void 0!==e.y&&l("div",{id:`point-${e.id}`,style:{left:`${e.x}%`,top:`${e.y}%`},className:"absolute z-30 h-2 w-2 border-4 border-gray-200 rounded-full bg-red-100 -translate-x-1/2 -translate-y-1/2"},e.id))]}),l("div",{className:"flex flex-col gap-5 pl-5 order-3 mt-5 md:mt-0",children:a.points.map((e,t)=>t%2==0?n("div",{id:`info-div-${e.id}`,ref:t=>j.current[e.id]=t,className:"relative z-20 w-full md:w-[300px] rounded-r-md border-l-2 border-[#717171] p-2 shadow text-gray-400 text-start "+(s?"bg-[rgba(255,255,255,0.1)]":"bg-[rgba(94,75,75,0.1)]"),children:[l("h3",{className:"text-lg font-semibold p-1 "+(s?"text-white":"text-gray-800"),children:e.info.title}),l("p",{className:"\ttext-sm p-1.5 "+(s?"text-gray-400":"text-gray-600"),children:e.info.description}),e.link&&l("div",{className:"p-1.5 w-full flex justify-end",children:n("a",{target:"_blank",rel:"noopener noreferrer",href:e.link.url,className:" hover:text-white flex items-center gap-1 "+(s?"text-gray-300 ":"text-black "),children:[l(v,{size:18,color:"#717171"}),e.link.title]})}),e.image&&n("div",{className:"relative p-1.5 w-full flex justify-end items-baseline gap-1 ",children:[l(x,{size:18,color:"#717171",className:"cursor-pointer ",onClick:()=>C(e.image.src)}),l("img",{src:e.image.src,alt:e.image.alt,className:" rounded-md w-16 h-16 object-cover cursor-pointer",onClick:()=>C(e.image.src)})]})]},`info-${e.id}`):null)}),a.points.map(e=>{const t=f[e.id];return t?l("svg",{style:{width:`${k.current?.offsetWidth||"100%"}`,height:`${k.current?.offsetHeight||"100%"}`},className:"pointer-events-none absolute left-0 top-0 z-0",children:l("line",{x1:`${t.start.x}`,y1:`${t.start.y}`,x2:`${t.end.x}`,y2:`${t.end.y}`,stroke:"#eae8e8",strokeWidth:"1.5"})},`line-${e.id}`):null})]}),h&&l(y,{src:e,onClose:z}),p&&l(y,{src:b,onClose:z})]})};export{w as ImagenConInfo,y as Modal};
//# sourceMappingURL=index.esm.js.map
"use strict";var e=require("react"),t=require("react/jsx-runtime"),r={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i=e.createContext&&e.createContext(r),l=["attr","size","title"];function n(e,t){if(null==e)return{};var r,i,l=function(e,t){if(null==e)return{};var r={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){if(t.indexOf(i)>=0)continue;r[i]=e[i]}return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(i=0;i<n.length;i++)r=n[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},s.apply(this,arguments)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){c(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function c(e,t,r){var i;return(t="symbol"==typeof(i=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?i:i+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(t){return t&&t.map((t,r)=>e.createElement(t.tag,a({key:r},t.attr),d(t.child)))}function u(t){return r=>e.createElement(f,s({attr:a({},t.attr)},r),d(t.child))}function f(t){var o=r=>{var i,{attr:o,size:c,title:d}=t,u=n(t,l),f=c||r.size||"1em";return r.className&&(i=r.className),t.className&&(i=(i?i+" ":"")+t.className),e.createElement("svg",s({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,o,u,{className:i,style:a(a({color:t.color||r.color},r.style),t.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),d&&e.createElement("title",null,d),t.children)};return void 0!==i?e.createElement(i.Consumer,null,e=>o(e)):o(r)}function x(e){return u({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m21 21-6-6m6 6v-4.8m0 4.8h-4.8"},child:[]},{tag:"path",attr:{d:"M3 16.2V21m0 0h4.8M3 21l6-6"},child:[]},{tag:"path",attr:{d:"M21 7.8V3m0 0h-4.8M21 3l-6 6"},child:[]},{tag:"path",attr:{d:"M3 7.8V3m0 0h4.8M3 3l6 6"},child:[]}]})(e)}function h(e){return u({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 3h6v6"},child:[]},{tag:"path",attr:{d:"M10 14 21 3"},child:[]},{tag:"path",attr:{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"},child:[]}]})(e)}function m(e){return u({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(e)}const p=({src:e,onClose:r})=>t.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-opacity-50",children:t.jsxs("div",{className:"relative max-w-screen-lg max-h-screen overflow-auto rounded-xl bg-black",children:[t.jsx("button",{className:"absolute top-0 right-0 text-white bg-black rounded-bl-lg text-2xl font-bold z-10 cursor-pointer",onClick:r,children:t.jsx(m,{size:32})}),t.jsx("img",{src:e,alt:"Full size",className:"block w-full h-auto"})]})});exports.ImagenConInfo=({src:r,maxHeight:i="600px",itemData:l,isDarkMode:n=!1})=>{const[s,o]=e.useState({width:0,height:0}),[a,c]=e.useState({}),[d,u]=e.useState(!1),[f,m]=e.useState(!1),[g,v]=e.useState(""),b=e.useRef(null),y=e.useRef(null),j=e.useRef({}),w=(e,t,r)=>{if(!t||!y.current||!b.current||0===r.width)return null;const i=t.getBoundingClientRect(),n=y.current.getBoundingClientRect(),s=b.current.getBoundingClientRect(),o=e.x/100*r.width+(s.left-n.left),a=e.y/100*r.height+(s.top-n.top);let c,d;d=i.top+i.height/2-n.top;return c=l.points.indexOf(e)%2==0?i.left-n.left:i.right-n.left,{start:{x:o,y:a},end:{x:c,y:d}}};e.useEffect(()=>{const e=b.current;if(e){const t=()=>{o({width:e.offsetWidth,height:e.offsetHeight})};return e.addEventListener("load",t),e.complete&&t(),()=>e.removeEventListener("load",t)}},[r]),e.useEffect(()=>{if(s.width>0&&s.height>0&&Object.keys(j.current).length===l.points.length){const e={};l.points.forEach(t=>{if(void 0!==t.x&&void 0!==t.y){const r=j.current[t.id],i=w(t,r,s);null!==i&&(e[t.id]=i)}}),c(e)}},[s,l.points]),e.useEffect(()=>{const e=()=>{if(Object.keys(a).length>0&&b.current){const e={width:b.current.offsetWidth,height:b.current.offsetHeight},t={};l.points.forEach(r=>{if(void 0!==r.x&&void 0!==r.y){const i=j.current[r.id],l=w(r,i,e);null!==l&&(t[r.id]=l)}}),c(t)}};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[l.points,a]);const N=()=>{v(""),u(!1),m(!1)},k=e=>{v(e),m(!0)};return t.jsxs("div",{className:"relative flex flex-col items-start justify-center gap-5 font-sans",children:[t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("p",{className:"w-fit py-2 px-4 rounded-xl font-semibold text-xl text-white "+(n?"dark:bg-gray-700":"bg-gray-700 "),children:l.details.title}),l.details.description&&t.jsx("div",{className:"relative z-20 w-full rounded-l-md items-baseline p-2 text-gray-300 flex flex-row",children:t.jsx("p",{className:"px-1 font-light text-1xl "+(n?"text-gray-300":"text-gray-700 "),children:l.details.description})})]}),t.jsxs("div",{ref:y,className:"relative flex flex-col md:flex-row items-start justify-center",children:[t.jsxs("div",{className:"flex flex-col items-end gap-5 pr-5 md:pr-5 order-2 md:order-1",children:[t.jsx("div",{className:"flex flex-col gap-2"}),l.points.map((e,r)=>r%2==0?null:t.jsxs("div",{id:`info-div-${e.id}`,ref:t=>j.current[e.id]=t,className:"relative z-20 w-full md:w-[300px] rounded-l-md border-r-2 border-[#717171] p-2 shadow text-gray-400 text-start "+(n?"bg-[rgba(255,255,255,0.1)]":"bg-[rgba(94,75,75,0.1)]"),children:[t.jsx("h3",{className:"text-lg font-semibold p-1 "+(n?"text-white":"text-gray-800"),children:e.info.title}),t.jsx("p",{className:"\ttext-sm p-1.5 "+(n?"text-gray-400":"text-gray-600"),children:e.info.description}),e.link&&t.jsx("div",{className:"p-1.5 w-full flex justify-end",children:t.jsxs("a",{target:"_blank",rel:"noopener noreferrer",href:e.link.url,className:" hover:text-white flex items-center gap-1 "+(n?"text-gray-300 ":"text-black "),children:[t.jsx(h,{size:18,color:"#717171"}),e.link.title]})}),e.image&&t.jsxs("div",{className:"relative p-1.5 w-full flex justify-end items-baseline gap-1 ",children:[t.jsx(x,{size:18,color:"#717171",className:"cursor-pointer ",onClick:()=>k(e.image.src)}),t.jsx("img",{src:e.image.src,alt:e.image.alt,className:" rounded-md w-16 h-16 object-cover cursor-pointer",onClick:()=>k(e.image.src)})]})]},`info-${e.id}`))]}),t.jsxs("div",{className:"relative flex-shrink-0 order-1 md:order-2",children:[t.jsx("img",{ref:b,src:r,alt:"Interactive image",style:{maxHeight:i,cursor:"pointer"},className:"block h-auto w-auto rounded-b-xl rounded-t-xl",onClick:()=>{u(!0)}}),l.points.map(e=>void 0!==e.x&&void 0!==e.y&&t.jsx("div",{id:`point-${e.id}`,style:{left:`${e.x}%`,top:`${e.y}%`},className:"absolute z-30 h-2 w-2 border-4 border-gray-200 rounded-full bg-red-100 -translate-x-1/2 -translate-y-1/2"},e.id))]}),t.jsx("div",{className:"flex flex-col gap-5 pl-5 order-3 mt-5 md:mt-0",children:l.points.map((e,r)=>r%2==0?t.jsxs("div",{id:`info-div-${e.id}`,ref:t=>j.current[e.id]=t,className:"relative z-20 w-full md:w-[300px] rounded-r-md border-l-2 border-[#717171] p-2 shadow text-gray-400 text-start "+(n?"bg-[rgba(255,255,255,0.1)]":"bg-[rgba(94,75,75,0.1)]"),children:[t.jsx("h3",{className:"text-lg font-semibold p-1 "+(n?"text-white":"text-gray-800"),children:e.info.title}),t.jsx("p",{className:"\ttext-sm p-1.5 "+(n?"text-gray-400":"text-gray-600"),children:e.info.description}),e.link&&t.jsx("div",{className:"p-1.5 w-full flex justify-end",children:t.jsxs("a",{target:"_blank",rel:"noopener noreferrer",href:e.link.url,className:" hover:text-white flex items-center gap-1 "+(n?"text-gray-300 ":"text-black "),children:[t.jsx(h,{size:18,color:"#717171"}),e.link.title]})}),e.image&&t.jsxs("div",{className:"relative p-1.5 w-full flex justify-end items-baseline gap-1 ",children:[t.jsx(x,{size:18,color:"#717171",className:"cursor-pointer ",onClick:()=>k(e.image.src)}),t.jsx("img",{src:e.image.src,alt:e.image.alt,className:" rounded-md w-16 h-16 object-cover cursor-pointer",onClick:()=>k(e.image.src)})]})]},`info-${e.id}`):null)}),l.points.map(e=>{const r=a[e.id];return r?t.jsx("svg",{style:{width:`${y.current?.offsetWidth||"100%"}`,height:`${y.current?.offsetHeight||"100%"}`},className:"pointer-events-none absolute left-0 top-0 z-0",children:t.jsx("line",{x1:`${r.start.x}`,y1:`${r.start.y}`,x2:`${r.end.x}`,y2:`${r.end.y}`,stroke:"#eae8e8",strokeWidth:"1.5"})},`line-${e.id}`):null})]}),d&&t.jsx(p,{src:r,onClose:N}),f&&t.jsx(p,{src:g,onClose:N})]})},exports.Modal=p;
//# sourceMappingURL=index.js.map
{
"type": "module",
"name": "react-image-pointer",
"version": "1.0.1",
"version": "1.0.2",
"description": "A React component for creating interactive images with clickable points and information cards connected by lines",

@@ -14,2 +14,5 @@ "main": "dist/index.js",

],
"publishConfig": {
"access": "public"
},
"scripts": {

@@ -16,0 +19,0 @@ "dev": "next dev",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display