@ngxi/lucide 0.12.19 → 0.12.20

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 CHANGED
@@ -10,7 +10,7 @@
10
10
 
11
11
  - **Name**: Lucide
12
12
  - **Prefix**: `lucide`
13
- - **Icons**: 1633
13
+ - **Icons**: 1634
14
14
  - **License**: [ISC](https://github.com/lucide-icons/lucide/blob/main/LICENSE)
15
15
  - **Author**: [Lucide Contributors](https://github.com/lucide-icons/lucide)
16
16
  - **Website**: [https://github.com/lucide-icons/lucide](https://github.com/lucide-icons/lucide)
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
- import { inject, PLATFORM_ID, ElementRef, Renderer2, input, computed, effect, Directive } from "@angular/core";
2
+ import { inject, PLATFORM_ID, ElementRef, Renderer2, input, computed, effect, SecurityContext, Directive } from "@angular/core";
3
3
  import { isPlatformServer } from "@angular/common";
4
+ import { DomSanitizer } from "@angular/platform-browser";
4
5
  const lucideAArrowDown = {
5
6
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m14 12l4 4l4-4m-4 4V7M2 16l4.039-9.69a.5.5 0 0 1 .923 0L11 16m-7.696-3h6.392"/>',
6
7
  "width": 24,
@@ -5329,6 +5330,12 @@ const lucideListChecks = {
5329
5330
  "height": 24,
5330
5331
  "viewBox": "0 0 24 24"
5331
5332
  };
5333
+ const lucideListChevronsDownUp = {
5334
+ "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 18l3-3l3 3M15 6l3 3l3-3M3 12h8m-8 6h8M3 6h8"/>',
5335
+ "width": 24,
5336
+ "height": 24,
5337
+ "viewBox": "0 0 24 24"
5338
+ };
5332
5339
  const lucideListCollapse = {
5333
5340
  "body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 12h11m-11 6h11M10 6h11M3 10l3-3l-3-3m0 16l3-3l-3-3"/>',
5334
5341
  "width": 24,
@@ -11169,44 +11176,47 @@ const lucideXSquare = {
11169
11176
  };
11170
11177
  class Ngxi {
11171
11178
  constructor() {
11172
- this.platform = inject(PLATFORM_ID);
11179
+ this.platformId = inject(PLATFORM_ID);
11173
11180
  this.el = inject(ElementRef);
11174
11181
  this.renderer = inject(Renderer2);
11175
- this.icon = input(null);
11176
- this.width = input();
11177
- this.height = input();
11178
- this.viewBox = input();
11179
- this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width);
11180
- this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height);
11181
- this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox);
11182
+ this.sanitizer = inject(DomSanitizer);
11183
+ this.icon = input(null, ...[]);
11184
+ this.width = input(...[]);
11185
+ this.height = input(...[]);
11186
+ this.viewBox = input(...[]);
11187
+ this.resolvedWidth = computed(() => this.width() ?? this.icon()?.width, ...[]);
11188
+ this.resolvedHeight = computed(() => this.height() ?? this.icon()?.height, ...[]);
11189
+ this.resolvedViewBox = computed(() => this.viewBox() ?? this.icon()?.viewBox, ...[]);
11182
11190
  this.setBody = effect(() => {
11183
11191
  const icon = this.icon();
11184
11192
  if (!icon) {
11185
11193
  this.renderer.setProperty(this.el.nativeElement, "innerHTML", "");
11186
11194
  return;
11187
11195
  }
11188
- if (isPlatformServer(this.platform)) {
11189
- this.el.nativeElement.innerHTML = icon.body;
11190
- this.el.nativeElement.setAttribute("data-ngxi-ssr", "");
11196
+ const sanitizedBody = this.sanitizer.sanitize(SecurityContext.HTML, icon.body);
11197
+ if (isPlatformServer(this.platformId)) {
11198
+ this.renderer.setProperty(this.el.nativeElement, "innerHTML", sanitizedBody);
11199
+ this.renderer.setAttribute(this.el.nativeElement, "data-ngxi-ssr", "");
11191
11200
  return;
11192
11201
  }
11193
11202
  if (this.el.nativeElement.hasAttribute("data-ngxi-ssr")) {
11194
- this.el.nativeElement.removeAttribute("data-ngxi-ssr");
11195
- if (this.el.nativeElement.innerHTML === icon.body) {
11203
+ if (this.el.nativeElement.innerHTML.trim() === sanitizedBody?.trim()) {
11204
+ this.renderer.removeAttribute(this.el.nativeElement, "data-ngxi-ssr");
11196
11205
  return;
11197
11206
  }
11207
+ this.renderer.removeAttribute(this.el.nativeElement, "data-ngxi-ssr");
11198
11208
  }
11199
- this.renderer.setProperty(this.el.nativeElement, "innerHTML", icon.body);
11200
- });
11209
+ this.renderer.setProperty(this.el.nativeElement, "innerHTML", sanitizedBody);
11210
+ }, ...[]);
11201
11211
  }
11202
11212
  static {
11203
- this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11213
+ this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: Ngxi, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11204
11214
  }
11205
11215
  static {
11206
- this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", 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 });
11216
+ 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 });
11207
11217
  }
11208
11218
  }
11209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: Ngxi, decorators: [{
11219
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: Ngxi, decorators: [{
11210
11220
  type: Directive,
11211
11221
  args: [{
11212
11222
  standalone: true,
@@ -11221,16 +11231,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
11221
11231
  }] });
11222
11232
  class NgxiLucide {
11223
11233
  constructor() {
11224
- this.ngxiLucide = input.required();
11234
+ this.ngxiLucide = input.required(...[]);
11225
11235
  }
11226
11236
  static {
11227
- this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NgxiLucide, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11237
+ this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NgxiLucide, deps: [], target: i0.ɵɵFactoryTarget.Directive });
11228
11238
  }
11229
11239
  static {
11230
- this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.13", type: NgxiLucide, isStandalone: true, selector: "svg[ngxiLucide]", inputs: { ngxiLucide: { classPropertyName: "ngxiLucide", publicName: "ngxiLucide", isSignal: true, isRequired: true, transformFunction: null } }, hostDirectives: [{ directive: Ngxi, inputs: ["icon", "ngxiLucide", "width", "width", "height", "height", "viewBox", "viewBox"] }], ngImport: i0 });
11240
+ this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.2.2", type: NgxiLucide, isStandalone: true, selector: "svg[ngxiLucide]", inputs: { ngxiLucide: { classPropertyName: "ngxiLucide", publicName: "ngxiLucide", isSignal: true, isRequired: true, transformFunction: null } }, hostDirectives: [{ directive: Ngxi, inputs: ["icon", "ngxiLucide", "width", "width", "height", "height", "viewBox", "viewBox"] }], ngImport: i0 });
11231
11241
  }
11232
11242
  }
11233
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NgxiLucide, decorators: [{
11243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.2", ngImport: i0, type: NgxiLucide, decorators: [{
11234
11244
  type: Directive,
11235
11245
  args: [{
11236
11246
  standalone: true,
@@ -12251,6 +12261,7 @@ export {
12251
12261
  lucideList,
12252
12262
  lucideListCheck,
12253
12263
  lucideListChecks,
12264
+ lucideListChevronsDownUp,
12254
12265
  lucideListCollapse,
12255
12266
  lucideListEnd,
12256
12267
  lucideListFilter,