@ngxi/vscode-icons 0.12.0-beta.2 → 0.12.0-beta.5
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 +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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 vscodeIconsDefaultFile = {
|
|
5
4
|
"body": '<path fill="#c5c5c5" d="M20.414 2H5v28h22V8.586ZM7 28V4h12v6h6v18Z"/>',
|
|
6
5
|
"width": 32,
|
|
@@ -8371,7 +8370,8 @@ typeof SuppressedError === "function" ? SuppressedError : function(error, suppre
|
|
|
8371
8370
|
};
|
|
8372
8371
|
class Ngxi {
|
|
8373
8372
|
constructor() {
|
|
8374
|
-
this.
|
|
8373
|
+
this.el = inject(ElementRef);
|
|
8374
|
+
this.renderer = inject(Renderer2);
|
|
8375
8375
|
this.icon = input(null);
|
|
8376
8376
|
this.width = input();
|
|
8377
8377
|
this.height = input();
|
|
@@ -8379,13 +8379,16 @@ class Ngxi {
|
|
|
8379
8379
|
this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width);
|
|
8380
8380
|
this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height);
|
|
8381
8381
|
this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox);
|
|
8382
|
-
this.
|
|
8382
|
+
this.setBody = effect(() => {
|
|
8383
|
+
const icon = this.icon();
|
|
8384
|
+
this.renderer.setProperty(this.el.nativeElement, "innerHTML", icon?.body ?? "");
|
|
8385
|
+
});
|
|
8383
8386
|
}
|
|
8384
8387
|
static {
|
|
8385
8388
|
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8386
8389
|
}
|
|
8387
8390
|
static {
|
|
8388
|
-
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()"
|
|
8391
|
+
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 });
|
|
8389
8392
|
}
|
|
8390
8393
|
}
|
|
8391
8394
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, decorators: [{
|
|
@@ -8397,8 +8400,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
8397
8400
|
"role": "img",
|
|
8398
8401
|
"[attr.width]": "resolvedWidth()",
|
|
8399
8402
|
"[attr.height]": "resolvedHeight()",
|
|
8400
|
-
"[attr.viewBox]": "resolvedViewBox()"
|
|
8401
|
-
"[innerHTML]": "resolvedBody()"
|
|
8403
|
+
"[attr.viewBox]": "resolvedViewBox()"
|
|
8402
8404
|
}
|
|
8403
8405
|
}]
|
|
8404
8406
|
}] });
|