@ngxi/simple-icons 0.12.0-beta.3 → 0.12.0-beta.7
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/dist/index.js +22 -23
- package/dist/index.js.map +1 -1
- package/dist/lib/simple-icons.d.ts +5 -0
- package/package.json +16 -6
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { inject, input, computed, Directive } from "@angular/core";
|
|
3
|
-
import { DomSanitizer } from "@angular/platform-browser";
|
|
2
|
+
import { inject, ElementRef, Renderer2, input, computed, effect, Directive } from "@angular/core";
|
|
4
3
|
const simpleIcons42 = {
|
|
5
4
|
"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"/>',
|
|
6
5
|
"width": 24,
|
|
@@ -21373,19 +21372,10 @@ const simpleIconsWindows11 = {
|
|
|
21373
21372
|
"height": 24,
|
|
21374
21373
|
"viewBox": "0 0 24 24"
|
|
21375
21374
|
};
|
|
21376
|
-
function __decorate(decorators, target, key, desc) {
|
|
21377
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
21378
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21379
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21380
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
21381
|
-
}
|
|
21382
|
-
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
21383
|
-
var e = new Error(message);
|
|
21384
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
21385
|
-
};
|
|
21386
21375
|
class Ngxi {
|
|
21387
21376
|
constructor() {
|
|
21388
|
-
this.
|
|
21377
|
+
this.el = inject(ElementRef);
|
|
21378
|
+
this.renderer = inject(Renderer2);
|
|
21389
21379
|
this.icon = input(null);
|
|
21390
21380
|
this.width = input();
|
|
21391
21381
|
this.height = input();
|
|
@@ -21393,13 +21383,16 @@ class Ngxi {
|
|
|
21393
21383
|
this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width);
|
|
21394
21384
|
this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height);
|
|
21395
21385
|
this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox);
|
|
21396
|
-
this.
|
|
21386
|
+
this.setBody = effect(() => {
|
|
21387
|
+
const icon = this.icon();
|
|
21388
|
+
this.renderer.setProperty(this.el.nativeElement, "innerHTML", icon?.body ?? "");
|
|
21389
|
+
});
|
|
21397
21390
|
}
|
|
21398
21391
|
static {
|
|
21399
21392
|
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
21400
21393
|
}
|
|
21401
21394
|
static {
|
|
21402
|
-
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", 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()"
|
|
21395
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", 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 });
|
|
21403
21396
|
}
|
|
21404
21397
|
}
|
|
21405
21398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, decorators: [{
|
|
@@ -21411,18 +21404,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
21411
21404
|
"role": "img",
|
|
21412
21405
|
"[attr.width]": "resolvedWidth()",
|
|
21413
21406
|
"[attr.height]": "resolvedHeight()",
|
|
21414
|
-
"[attr.viewBox]": "resolvedViewBox()"
|
|
21415
|
-
"[innerHTML]": "resolvedBody()"
|
|
21407
|
+
"[attr.viewBox]": "resolvedViewBox()"
|
|
21416
21408
|
}
|
|
21417
21409
|
}]
|
|
21418
21410
|
}] });
|
|
21419
|
-
|
|
21411
|
+
class NgxiSimpleIcons {
|
|
21420
21412
|
constructor() {
|
|
21421
21413
|
this.ngxiSimpleIcons = input.required();
|
|
21422
21414
|
}
|
|
21423
|
-
|
|
21424
|
-
|
|
21425
|
-
|
|
21415
|
+
static {
|
|
21416
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxiSimpleIcons, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
21417
|
+
}
|
|
21418
|
+
static {
|
|
21419
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: NgxiSimpleIcons, isStandalone: true, selector: "svg[ngxiSimpleIcons]", inputs: { ngxiSimpleIcons: { classPropertyName: "ngxiSimpleIcons", publicName: "ngxiSimpleIcons", isSignal: true, isRequired: true, transformFunction: null } }, hostDirectives: [{ directive: Ngxi, inputs: ["icon", "ngxiSimpleIcons", "width", "width", "height", "height", "viewBox", "viewBox"] }], ngImport: i0 });
|
|
21420
|
+
}
|
|
21421
|
+
}
|
|
21422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxiSimpleIcons, decorators: [{
|
|
21423
|
+
type: Directive,
|
|
21424
|
+
args: [{
|
|
21426
21425
|
standalone: true,
|
|
21427
21426
|
selector: "svg[ngxiSimpleIcons]",
|
|
21428
21427
|
hostDirectives: [
|
|
@@ -21431,8 +21430,8 @@ NgxiSimpleIcons = __decorate([
|
|
|
21431
21430
|
inputs: ["icon:ngxiSimpleIcons", "width", "height", "viewBox"]
|
|
21432
21431
|
}
|
|
21433
21432
|
]
|
|
21434
|
-
}
|
|
21435
|
-
]
|
|
21433
|
+
}]
|
|
21434
|
+
}] });
|
|
21436
21435
|
export {
|
|
21437
21436
|
NgxiSimpleIcons,
|
|
21438
21437
|
simpleIcons1001tracklists,
|