@ngxi/simple-icons 0.12.20 → 0.12.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +13 -29
- package/dist/index.js.map +1 -1
- package/dist/lib/icons.d.ts +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
- **Name**: Simple Icons
|
|
12
12
|
- **Prefix**: `simple-icons`
|
|
13
|
-
- **Icons**:
|
|
13
|
+
- **Icons**: 3354
|
|
14
14
|
- **License**: [CC0 1.0](https://github.com/simple-icons/simple-icons/blob/develop/LICENSE.md)
|
|
15
15
|
- **Author**: [Simple Icons Collaborators](https://github.com/simple-icons/simple-icons)
|
|
16
16
|
- **Website**: [https://github.com/simple-icons/simple-icons](https://github.com/simple-icons/simple-icons)
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { inject,
|
|
3
|
-
import { isPlatformServer } from "@angular/common";
|
|
2
|
+
import { inject, input, computed, Directive } from "@angular/core";
|
|
4
3
|
import { DomSanitizer } from "@angular/platform-browser";
|
|
5
4
|
const simpleIcons42 = {
|
|
6
5
|
"body": '<path fill="currentColor" d="M19.581 16.851H24v-4.439ZM24 3.574h-4.419v4.42l-4.419 4.418v4.44h4.419v-4.44L24 7.993Zm-4.419 0h-4.419v4.42zm-6.324 8.838H4.419l8.838-8.838H8.838L0 12.412v3.595h8.838v4.419h4.419z"/>',
|
|
@@ -20024,6 +20023,12 @@ const simpleIconsVisualbasic = {
|
|
|
20024
20023
|
"height": 24,
|
|
20025
20024
|
"viewBox": "0 0 24 24"
|
|
20026
20025
|
};
|
|
20026
|
+
const simpleIconsVisualparadigm = {
|
|
20027
|
+
"body": '<path fill="currentColor" d="M1.92 10.08c0 .037 9.996 10.052 10.053 10.07c.014.004 3.831-3.797 3.831-3.797S8.138 8.667 8.138 8.642c0-.033 3.806-3.839 3.806-3.839s3.843 3.858 3.843 3.883c0 .017-2.807 2.844-2.807 2.844l3.824 3.824l5.275-5.275S13.674 1.674 11.981 0M3.787 13.036c-.023 0-1.421 1.388-1.421 1.388S11.96 24 11.987 24c.026 0 9.614-9.577 9.614-9.577s-1.401-1.387-1.423-1.387c-.02 0-8.196 8.157-8.196 8.157s-8.177-8.157-8.195-8.157"/>',
|
|
20028
|
+
"width": 24,
|
|
20029
|
+
"height": 24,
|
|
20030
|
+
"viewBox": "0 0 24 24"
|
|
20031
|
+
};
|
|
20027
20032
|
const simpleIconsVisualstudio = {
|
|
20028
20033
|
"body": '<path fill="currentColor" d="M17.583.063a1.5 1.5 0 0 0-1.032.392h-.001L16.5.5L8.528 9.316L3.875 5.5l-.407-.35a1 1 0 0 0-1.024-.154l-.012.005l-1.817.75l-.077.036l-.047.028l-.038.022l-.048.034l-.03.024l-.044.036l-.036.033l-.032.035l-.033.038l-.035.044l-.024.034l-.032.05l-.02.035l-.024.05l-.02.045l-.016.044l-.016.047l-.015.055l-.01.04l-.008.054l-.006.05L0 6.668v10.666a1 1 0 0 0 .615.917l1.817.764a1 1 0 0 0 1.035-.164l.408-.35l4.653-3.815l7.973 8.815l.072.065l.057.05l.058.042l.063.044l.065.038l.065.036l.068.031l.07.03l.073.025l.066.02l.08.02l.068.014l.075.01l.075.008l.073.003h.077l.078-.005l.067-.007l.087-.015l.06-.012l.08-.022l.068-.02l.07-.028l.09-.037l4.944-2.377a1.5 1.5 0 0 0 .476-.362a2 2 0 0 0 .09-.112l.004-.007a2 2 0 0 0 .08-.125a2 2 0 0 0 .062-.12l.009-.017l.04-.108l.015-.037l.03-.107l.009-.037l.017-.1l.008-.05l.006-.09l.004-.08V3.907a2 2 0 0 0-.01-.15a1.5 1.5 0 0 0-.84-1.17L18.206.21a1.5 1.5 0 0 0-.622-.146zM18 6.92v10.163l-6.198-5.08zM3 8.574l3.099 3.427l-3.1 3.426z"/>',
|
|
20029
20034
|
"width": 24,
|
|
@@ -21574,44 +21579,21 @@ const simpleIconsWindows11 = {
|
|
|
21574
21579
|
};
|
|
21575
21580
|
class Ngxi {
|
|
21576
21581
|
constructor() {
|
|
21577
|
-
this.platformId = inject(PLATFORM_ID);
|
|
21578
|
-
this.el = inject(ElementRef);
|
|
21579
|
-
this.renderer = inject(Renderer2);
|
|
21580
21582
|
this.sanitizer = inject(DomSanitizer);
|
|
21581
|
-
this.icon = input(
|
|
21583
|
+
this.icon = input(...[]);
|
|
21582
21584
|
this.width = input(...[]);
|
|
21583
21585
|
this.height = input(...[]);
|
|
21584
21586
|
this.viewBox = input(...[]);
|
|
21585
21587
|
this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width, ...[]);
|
|
21586
21588
|
this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height, ...[]);
|
|
21587
21589
|
this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox, ...[]);
|
|
21588
|
-
this.
|
|
21589
|
-
const icon = this.icon();
|
|
21590
|
-
if (!icon) {
|
|
21591
|
-
this.renderer.setProperty(this.el.nativeElement, "innerHTML", "");
|
|
21592
|
-
return;
|
|
21593
|
-
}
|
|
21594
|
-
const sanitizedBody = this.sanitizer.sanitize(SecurityContext.HTML, icon.body);
|
|
21595
|
-
if (isPlatformServer(this.platformId)) {
|
|
21596
|
-
this.renderer.setProperty(this.el.nativeElement, "innerHTML", sanitizedBody);
|
|
21597
|
-
this.renderer.setAttribute(this.el.nativeElement, "data-ngxi-ssr", "");
|
|
21598
|
-
return;
|
|
21599
|
-
}
|
|
21600
|
-
if (this.el.nativeElement.hasAttribute("data-ngxi-ssr")) {
|
|
21601
|
-
if (this.el.nativeElement.innerHTML.trim() === sanitizedBody?.trim()) {
|
|
21602
|
-
this.renderer.removeAttribute(this.el.nativeElement, "data-ngxi-ssr");
|
|
21603
|
-
return;
|
|
21604
|
-
}
|
|
21605
|
-
this.renderer.removeAttribute(this.el.nativeElement, "data-ngxi-ssr");
|
|
21606
|
-
}
|
|
21607
|
-
this.renderer.setProperty(this.el.nativeElement, "innerHTML", sanitizedBody);
|
|
21608
|
-
}, ...[]);
|
|
21590
|
+
this.safeSVG = computed(() => this.sanitizer.bypassSecurityTrustHtml(this.icon()?.body ?? ""), ...[]);
|
|
21609
21591
|
}
|
|
21610
21592
|
static {
|
|
21611
21593
|
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
21612
21594
|
}
|
|
21613
21595
|
static {
|
|
21614
|
-
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.2", type: Ngxi, isStandalone: true, selector: "svg[ngxi]", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, viewBox: { classPropertyName: "viewBox", publicName: "viewBox", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "img" }, properties: { "attr.width": "resolvedWidth()", "attr.height": "resolvedHeight()", "attr.viewBox": "resolvedViewBox()" } }, ngImport: i0 });
|
|
21596
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.2", type: Ngxi, isStandalone: true, selector: "svg[ngxi]", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, viewBox: { classPropertyName: "viewBox", publicName: "viewBox", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "img" }, properties: { "attr.width": "resolvedWidth()", "attr.height": "resolvedHeight()", "attr.viewBox": "resolvedViewBox()", "innerHTML": "safeSVG()" } }, ngImport: i0 });
|
|
21615
21597
|
}
|
|
21616
21598
|
}
|
|
21617
21599
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: Ngxi, decorators: [{
|
|
@@ -21623,7 +21605,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImpor
|
|
|
21623
21605
|
"role": "img",
|
|
21624
21606
|
"[attr.width]": "resolvedWidth()",
|
|
21625
21607
|
"[attr.height]": "resolvedHeight()",
|
|
21626
|
-
"[attr.viewBox]": "resolvedViewBox()"
|
|
21608
|
+
"[attr.viewBox]": "resolvedViewBox()",
|
|
21609
|
+
"[innerHTML]": "safeSVG()"
|
|
21627
21610
|
}
|
|
21628
21611
|
}]
|
|
21629
21612
|
}] });
|
|
@@ -25001,6 +24984,7 @@ export {
|
|
|
25001
24984
|
simpleIconsVirustotal,
|
|
25002
24985
|
simpleIconsVisa,
|
|
25003
24986
|
simpleIconsVisualbasic,
|
|
24987
|
+
simpleIconsVisualparadigm,
|
|
25004
24988
|
simpleIconsVisualstudio,
|
|
25005
24989
|
simpleIconsVisualstudioappcenter,
|
|
25006
24990
|
simpleIconsVisualstudiocode,
|