@ngxi/vscode-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/vscode-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 vscodeIconsDefaultFile = {
|
|
5
4
|
"body": '<path fill="#c5c5c5" d="M20.414 2H5v28h22V8.586ZM7 28V4h12v6h6v18Z"/>',
|
|
6
5
|
"width": 32,
|
|
@@ -8359,19 +8358,10 @@ const vscodeIconsFileTypeMakefile = {
|
|
|
8359
8358
|
"height": 32,
|
|
8360
8359
|
"viewBox": "0 0 32 32"
|
|
8361
8360
|
};
|
|
8362
|
-
function __decorate(decorators, target, key, desc) {
|
|
8363
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8364
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
8365
|
-
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;
|
|
8366
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8367
|
-
}
|
|
8368
|
-
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
8369
|
-
var e = new Error(message);
|
|
8370
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
8371
|
-
};
|
|
8372
8361
|
class Ngxi {
|
|
8373
8362
|
constructor() {
|
|
8374
|
-
this.
|
|
8363
|
+
this.el = inject(ElementRef);
|
|
8364
|
+
this.renderer = inject(Renderer2);
|
|
8375
8365
|
this.icon = input(null);
|
|
8376
8366
|
this.width = input();
|
|
8377
8367
|
this.height = input();
|
|
@@ -8379,13 +8369,16 @@ class Ngxi {
|
|
|
8379
8369
|
this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width);
|
|
8380
8370
|
this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height);
|
|
8381
8371
|
this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox);
|
|
8382
|
-
this.
|
|
8372
|
+
this.setBody = effect(() => {
|
|
8373
|
+
const icon = this.icon();
|
|
8374
|
+
this.renderer.setProperty(this.el.nativeElement, "innerHTML", icon?.body ?? "");
|
|
8375
|
+
});
|
|
8383
8376
|
}
|
|
8384
8377
|
static {
|
|
8385
8378
|
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8386
8379
|
}
|
|
8387
8380
|
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()"
|
|
8381
|
+
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
8382
|
}
|
|
8390
8383
|
}
|
|
8391
8384
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: Ngxi, decorators: [{
|
|
@@ -8397,18 +8390,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImpor
|
|
|
8397
8390
|
"role": "img",
|
|
8398
8391
|
"[attr.width]": "resolvedWidth()",
|
|
8399
8392
|
"[attr.height]": "resolvedHeight()",
|
|
8400
|
-
"[attr.viewBox]": "resolvedViewBox()"
|
|
8401
|
-
"[innerHTML]": "resolvedBody()"
|
|
8393
|
+
"[attr.viewBox]": "resolvedViewBox()"
|
|
8402
8394
|
}
|
|
8403
8395
|
}]
|
|
8404
8396
|
}] });
|
|
8405
|
-
|
|
8397
|
+
class NgxiVscodeIcons {
|
|
8406
8398
|
constructor() {
|
|
8407
8399
|
this.ngxiVscodeIcons = input.required();
|
|
8408
8400
|
}
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8401
|
+
static {
|
|
8402
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxiVscodeIcons, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
8403
|
+
}
|
|
8404
|
+
static {
|
|
8405
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.0.4", type: NgxiVscodeIcons, isStandalone: true, selector: "svg[ngxiVscodeIcons]", inputs: { ngxiVscodeIcons: { classPropertyName: "ngxiVscodeIcons", publicName: "ngxiVscodeIcons", isSignal: true, isRequired: true, transformFunction: null } }, hostDirectives: [{ directive: Ngxi, inputs: ["icon", "ngxiVscodeIcons", "width", "width", "height", "height", "viewBox", "viewBox"] }], ngImport: i0 });
|
|
8406
|
+
}
|
|
8407
|
+
}
|
|
8408
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.4", ngImport: i0, type: NgxiVscodeIcons, decorators: [{
|
|
8409
|
+
type: Directive,
|
|
8410
|
+
args: [{
|
|
8412
8411
|
standalone: true,
|
|
8413
8412
|
selector: "svg[ngxiVscodeIcons]",
|
|
8414
8413
|
hostDirectives: [
|
|
@@ -8417,8 +8416,8 @@ NgxiVscodeIcons = __decorate([
|
|
|
8417
8416
|
inputs: ["icon:ngxiVscodeIcons", "width", "height", "viewBox"]
|
|
8418
8417
|
}
|
|
8419
8418
|
]
|
|
8420
|
-
}
|
|
8421
|
-
]
|
|
8419
|
+
}]
|
|
8420
|
+
}] });
|
|
8422
8421
|
export {
|
|
8423
8422
|
NgxiVscodeIcons,
|
|
8424
8423
|
vscodeIconsDefaultFile,
|