@symbo.ls/atoms
Advanced tools
Comparing version 1.2.14 to 1.2.16
{ | ||
"name": "@symbo.ls/atoms", | ||
"version": "1.2.14", | ||
"version": "1.2.16", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"gitHead": "9103c4984ee5a28b521c35f5b4a9dff58acab495", | ||
"gitHead": "bc1518b87d8089e706a0f0c2df3a0012c0d1c5a3", | ||
"dependencies": { | ||
"@domql/utils": "latest", | ||
"@symbo.ls/create-emotion": "latest", | ||
"@symbo.ls/create-init": "latest", | ||
"@symbo.ls/init": "latest", | ||
"@symbo.ls/scratch": "latest" | ||
@@ -12,0 +12,0 @@ }, |
'use strict' | ||
import { init } from '@symbo.ls/init' | ||
const useSVGSymbol = file => `<use xlink:href="${file}" />` | ||
@@ -19,2 +18,3 @@ // create SVG symbol | ||
const useSvgSprite = props.spriteId || (context.system && context.system.useSvgSprite) | ||
const useSVGSymbol = icon => `<use xlink:href="#${icon}" />` | ||
@@ -24,7 +24,7 @@ if (!useSvgSprite) return props.src | ||
let spriteId = props.spriteId | ||
if (spriteId) return `<use xlink:href="#${spriteId}" />` | ||
if (spriteId) return useSVGSymbol(spriteId) | ||
const symbolId = Symbol.for(props.src) | ||
let SVGKey = SVG[symbolId] | ||
if (SVGKey && SVG[SVGKey]) return `<use xlink:href="#${SVGKey}" />` | ||
if (SVGKey && SVG[SVGKey]) return useSVGSymbol(SVGKey) | ||
@@ -39,4 +39,4 @@ SVGKey = SVG[symbolId] = Math.random() | ||
return `<use xlink:href="#${SVGKey}" />` | ||
return useSVGSymbol(SVGKey) | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39936
+ Added@symbo.ls/init@latest
+ Added@symbo.ls/default-config@2.11.501(transitive)
+ Added@symbo.ls/default-icons@2.11.475(transitive)
+ Added@symbo.ls/emotion@2.11.470(transitive)
+ Added@symbo.ls/init@2.11.501(transitive)
- Removed@symbo.ls/create-init@latest