
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
map-svg-selector
Advanced tools
This package uses by default the world map svg from [mapsvg](http://mapsvg.com)
This package uses by default the world map svg from mapsvg
Create a modal that can listen for any selected path as you see in the following examples:
By default this plugin select the id value of the path inside the inserted SVG.
That ID should match with the id inside the json, to be able to return the entire object.
In this example the default JSON has the following structure, so, when we press the Chilean map we will return the following object.
{ "name": "Chile", "dialCode": "+56", "id": "CL", "flag": "https://www.countryflags.io/CL/flat/64.png" },
You could pass virtually any SVG that you want (with the acepted format) and by default this pluging will recognized each path, then search the id attribute and return it, so here you can create and pass a mapJson that match that criteria to return the desire result.
As mention early by default this package come with the world-map configuration but you can customized to any other SVG.
This package work great with the mapsvg maps.
<template>
<path id="1" />
<path id="2" />
<path id="3" />
// ...
</template>
<template>
<map-svg >
<template #map >
<my-super-map />
</template>
</template>
Create and pass the respective JSON that match your IDs and insert it with the mapJson prop
The event will be listened with the "selectedPath" function so from here you can listen this event and/or pass props
<template>
<map-svg @selectedPath="(path) => MYFUNC(path)" hoverColor="red" mapJson="MYJSON" >
<template #map >
<my-super-map />
</template>
</template>
we have available 3 slots one for the SVG and two for stylized
You could pass the content of the close button
You could pass the content of the open modal button
Props | Description | Default |
---|---|---|
mapJson | Json to map in every path available on the svg | world-map |
viewBox | Custom viewBox values for an svg | "0 0 1025 650" |
mapColor | Color of the map | "#333" |
hoverColor | Color of the map on hover state | "#c7c7c7" |
hiddenCloseButton | To hidden the close button | false |
width | width of the viewPort of the svg | "100%" |
height | height of the viewPort of the svg | "75vh" |
FAQs
This package uses by default the world map svg from [mapsvg](http://mapsvg.com)
We found that map-svg-selector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.