@skeletonizer/angular 1.1.0 → 1.1.1

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Luka Varga
3
+ Copyright (c) 2024 Luka Varga
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -246,9 +246,9 @@ export class MyComponent extends SkeletonAbstractComponent<TSkeletonizedPart> im
246
246
  ```
247
247
 
248
248
  ### Color Scheme
249
- Generally speaking, you shouldn't need to adjust the color scheme of the skeletonized component in most cases. However, should you need to, the color scheme of the skeletonized views can be customized by providing the `colorScheme` property to the `SkeletonizerSkeletonComponent`.
249
+ Generally speaking, you shouldn't need to adjust the color scheme of the skeletonized component in most cases. However, should you need to, the color scheme of the skeletonized views can be customized by providing the `colorSchema` property to the `SkeletonizerSkeletonComponent`.
250
250
 
251
- For more details about the `colorScheme` property, see the [colorSchema](/packages/utils/README.md#colorschema) section.
251
+ For more details about the `colorSchema` property, see the [colorSchema](/packages/utils/README.md#colorschema) section.
252
252
 
253
253
  ## Contributing
254
254
  For Angular adapter-specific contributions, run the following commands to get started:
@@ -0,0 +1,7 @@
1
+ # @skeletonizer/angular
2
+ This is the Angular adapter for Skeletonizer. It provides a simple way to create skeletonized views for your Angular application.
3
+
4
+ ## Installation
5
+ To install the package, run the following command:
6
+ `npm install @skeletonizer/angular @skeletonizer/utils --save`
7
+
@@ -0,0 +1,24 @@
1
+ import { Directive, Input } from '@angular/core';
2
+ import { SkeletonDirective } from '@skeletonizer/utils';
3
+ import * as i0 from "@angular/core";
4
+ export class SkeletonizeDirective {
5
+ constructor(el) {
6
+ this.el = el;
7
+ }
8
+ ngAfterViewInit() {
9
+ SkeletonDirective.skeletonizeProjectedTemplate(this.el.nativeElement, this.colorSchema);
10
+ }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: SkeletonizeDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
12
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.10", type: SkeletonizeDirective, isStandalone: true, selector: "[skeletonize]", inputs: { colorSchema: ["skeletonize", "colorSchema"] }, ngImport: i0 }); }
13
+ }
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: SkeletonizeDirective, decorators: [{
15
+ type: Directive,
16
+ args: [{
17
+ selector: '[skeletonize]',
18
+ standalone: true,
19
+ }]
20
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { colorSchema: [{
21
+ type: Input,
22
+ args: [{ alias: 'skeletonize' }]
23
+ }] } });
24
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tlbGV0b25pemUuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvc2tlbGV0b25pemVyL3NyYy9saWIvc2tlbGV0b25pemUuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBaUIsU0FBUyxFQUFjLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUM1RSxPQUFPLEVBQTRCLGlCQUFpQixFQUFFLE1BQU0scUJBQXFCLENBQUM7O0FBTWxGLE1BQU0sT0FBTyxvQkFBb0I7SUFHL0IsWUFDbUIsRUFBYztRQUFkLE9BQUUsR0FBRixFQUFFLENBQVk7SUFDOUIsQ0FBQztJQUVHLGVBQWU7UUFDcEIsaUJBQWlCLENBQUMsNEJBQTRCLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQyxhQUFhLEVBQUUsSUFBSSxDQUFDLF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B9XG59XG4iXX0=
@@ -0,0 +1,35 @@
1
+ import { Component, ContentChild, Input, TemplateRef, ViewEncapsulation } from '@angular/core';
2
+ import { SkeletonAdapterComponent } from '@skeletonizer/utils';
3
+ import { SkeletonizeDirective } from './skeletonize.directive';
4
+ import { NgTemplateOutlet } from '@angular/common';
5
+ import * as i0 from "@angular/core";
6
+ export class SkeletonizerSkeletonComponent extends SkeletonAdapterComponent {
7
+ set configInput(config) {
8
+ this.config = config;
9
+ this.setupModels();
10
+ }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: SkeletonizerSkeletonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
12
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.10", type: SkeletonizerSkeletonComponent, isStandalone: true, selector: "skeletonizer-skeleton", inputs: { showSkeleton: "showSkeleton", scope: "scope", colorSchema: "colorSchema", configInput: ["config", "configInput"] }, queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (showSkeleton) {\n @for (model of viewModels; track model.uuid) {\n <div [skeletonize]=\"colorSchema\">\n <ng-container *ngTemplateOutlet=\"templateRef; context: { $implicit: model }\"></ng-container>\n </div>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"templateRef; context: { $implicit: scope }\"></ng-container>\n}\n", styles: ["[data-skeletonizer=wrapper-element]{--skeletonizer-text-background: rgba(0, 0, 0, .2);display:contents;filter:grayscale(100%);pointer-events:none}[data-skeletonizer=wrapper-element] *{pointer-events:none}[data-skeletonizer=wrapper-element] [data-skeletonizer=text]{animation:text-animation 2s infinite ease-in-out;background:var(--skeletonizer-primary-color);border-radius:50px;color:#0000!important}@keyframes text-animation{0%{background:var(--skeletonizer-primary-color)}50%{background:var(--skeletonizer-secondary-color)}to{background:var(--skeletonizer-primary-color)}}skeletonizer-skeleton{display:contents}\n"], dependencies: [{ kind: "directive", type: SkeletonizeDirective, selector: "[skeletonize]", inputs: ["skeletonize"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
13
+ }
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: SkeletonizerSkeletonComponent, decorators: [{
15
+ type: Component,
16
+ args: [{ selector: 'skeletonizer-skeleton', encapsulation: ViewEncapsulation.None, standalone: true, imports: [
17
+ SkeletonizeDirective,
18
+ NgTemplateOutlet,
19
+ ], template: "@if (showSkeleton) {\n @for (model of viewModels; track model.uuid) {\n <div [skeletonize]=\"colorSchema\">\n <ng-container *ngTemplateOutlet=\"templateRef; context: { $implicit: model }\"></ng-container>\n </div>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"templateRef; context: { $implicit: scope }\"></ng-container>\n}\n", styles: ["[data-skeletonizer=wrapper-element]{--skeletonizer-text-background: rgba(0, 0, 0, .2);display:contents;filter:grayscale(100%);pointer-events:none}[data-skeletonizer=wrapper-element] *{pointer-events:none}[data-skeletonizer=wrapper-element] [data-skeletonizer=text]{animation:text-animation 2s infinite ease-in-out;background:var(--skeletonizer-primary-color);border-radius:50px;color:#0000!important}@keyframes text-animation{0%{background:var(--skeletonizer-primary-color)}50%{background:var(--skeletonizer-secondary-color)}to{background:var(--skeletonizer-primary-color)}}skeletonizer-skeleton{display:contents}\n"] }]
20
+ }], propDecorators: { templateRef: [{
21
+ type: ContentChild,
22
+ args: [TemplateRef]
23
+ }], showSkeleton: [{
24
+ type: Input,
25
+ args: [{ required: true }]
26
+ }], scope: [{
27
+ type: Input,
28
+ args: [{ required: true }]
29
+ }], colorSchema: [{
30
+ type: Input
31
+ }], configInput: [{
32
+ type: Input,
33
+ args: [{ alias: 'config', required: true }]
34
+ }] } });
35
+ //# sourceMappingURL=data:application/json;base64,ey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yICpuZ1RlbXBsYXRlT3V0bGV0PVwidGVtcGxhdGVSZWY7IGNvbnRleHQ6IHsgJGltcGxpY2l0OiBtb2RlbCB9XCI+PC9uZy1jb250YWluZXI+XG4gICAgPC9kaXY+XG4gIH1cbn0gQGVsc2Uge1xuICA8bmctY29udGFpbmVyICpuZ1RlbXBsYXRlT3V0bGV0PVwidGVtcGxhdGVSZWY7IGNvbnRleHQ6IHsgJGltcGxpY2l0OiBzY29wZSB9XCI+PC9uZy1jb250YWluZXI+XG59XG4iXX0=
@@ -0,0 +1,5 @@
1
+ /*
2
+ * Public API Surface of skeletonizer
3
+ */
4
+ export * from './lib/skeletonizer.skeleton.component';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL3NrZWxldG9uaXplci9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsdUNBQXVDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogUHVibGljIEFQSSBTdXJmYWNlIG9mIHNrZWxldG9uaXplclxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL3NrZWxldG9uaXplci5za2VsZXRvbi5jb21wb25lbnQnO1xuIl19
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2tlbGV0b25pemVyLWFuZ3VsYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9za2VsZXRvbml6ZXIvc3JjL3NrZWxldG9uaXplci1hbmd1bGFyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0=
@@ -0,0 +1,66 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Directive, Input, TemplateRef, Component, ViewEncapsulation, ContentChild } from '@angular/core';
3
+ import { SkeletonDirective, SkeletonAdapterComponent } from '@skeletonizer/utils';
4
+ import { NgTemplateOutlet } from '@angular/common';
5
+
6
+ class SkeletonizeDirective {
7
+ constructor(el) {
8
+ this.el = el;
9
+ }
10
+ ngAfterViewInit() {
11
+ SkeletonDirective.skeletonizeProjectedTemplate(this.el.nativeElement, this.colorSchema);
12
+ }
13
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: SkeletonizeDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
14
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.10", type: SkeletonizeDirective, isStandalone: true, selector: "[skeletonize]", inputs: { colorSchema: ["skeletonize", "colorSchema"] }, ngImport: i0 }); }
15
+ }
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: SkeletonizeDirective, decorators: [{
17
+ type: Directive,
18
+ args: [{
19
+ selector: '[skeletonize]',
20
+ standalone: true,
21
+ }]
22
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { colorSchema: [{
23
+ type: Input,
24
+ args: [{ alias: 'skeletonize' }]
25
+ }] } });
26
+
27
+ class SkeletonizerSkeletonComponent extends SkeletonAdapterComponent {
28
+ set configInput(config) {
29
+ this.config = config;
30
+ this.setupModels();
31
+ }
32
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: SkeletonizerSkeletonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
33
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.10", type: SkeletonizerSkeletonComponent, isStandalone: true, selector: "skeletonizer-skeleton", inputs: { showSkeleton: "showSkeleton", scope: "scope", colorSchema: "colorSchema", configInput: ["config", "configInput"] }, queries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (showSkeleton) {\n @for (model of viewModels; track model.uuid) {\n <div [skeletonize]=\"colorSchema\">\n <ng-container *ngTemplateOutlet=\"templateRef; context: { $implicit: model }\"></ng-container>\n </div>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"templateRef; context: { $implicit: scope }\"></ng-container>\n}\n", styles: ["[data-skeletonizer=wrapper-element]{--skeletonizer-text-background: rgba(0, 0, 0, .2);display:contents;filter:grayscale(100%);pointer-events:none}[data-skeletonizer=wrapper-element] *{pointer-events:none}[data-skeletonizer=wrapper-element] [data-skeletonizer=text]{animation:text-animation 2s infinite ease-in-out;background:var(--skeletonizer-primary-color);border-radius:50px;color:#0000!important}@keyframes text-animation{0%{background:var(--skeletonizer-primary-color)}50%{background:var(--skeletonizer-secondary-color)}to{background:var(--skeletonizer-primary-color)}}skeletonizer-skeleton{display:contents}\n"], dependencies: [{ kind: "directive", type: SkeletonizeDirective, selector: "[skeletonize]", inputs: ["skeletonize"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
34
+ }
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.10", ngImport: i0, type: SkeletonizerSkeletonComponent, decorators: [{
36
+ type: Component,
37
+ args: [{ selector: 'skeletonizer-skeleton', encapsulation: ViewEncapsulation.None, standalone: true, imports: [
38
+ SkeletonizeDirective,
39
+ NgTemplateOutlet,
40
+ ], template: "@if (showSkeleton) {\n @for (model of viewModels; track model.uuid) {\n <div [skeletonize]=\"colorSchema\">\n <ng-container *ngTemplateOutlet=\"templateRef; context: { $implicit: model }\"></ng-container>\n </div>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"templateRef; context: { $implicit: scope }\"></ng-container>\n}\n", styles: ["[data-skeletonizer=wrapper-element]{--skeletonizer-text-background: rgba(0, 0, 0, .2);display:contents;filter:grayscale(100%);pointer-events:none}[data-skeletonizer=wrapper-element] *{pointer-events:none}[data-skeletonizer=wrapper-element] [data-skeletonizer=text]{animation:text-animation 2s infinite ease-in-out;background:var(--skeletonizer-primary-color);border-radius:50px;color:#0000!important}@keyframes text-animation{0%{background:var(--skeletonizer-primary-color)}50%{background:var(--skeletonizer-secondary-color)}to{background:var(--skeletonizer-primary-color)}}skeletonizer-skeleton{display:contents}\n"] }]
41
+ }], propDecorators: { templateRef: [{
42
+ type: ContentChild,
43
+ args: [TemplateRef]
44
+ }], showSkeleton: [{
45
+ type: Input,
46
+ args: [{ required: true }]
47
+ }], scope: [{
48
+ type: Input,
49
+ args: [{ required: true }]
50
+ }], colorSchema: [{
51
+ type: Input
52
+ }], configInput: [{
53
+ type: Input,
54
+ args: [{ alias: 'config', required: true }]
55
+ }] } });
56
+
57
+ /*
58
+ * Public API Surface of skeletonizer
59
+ */
60
+
61
+ /**
62
+ * Generated bundle index. Do not edit.
63
+ */
64
+
65
+ export { SkeletonizerSkeletonComponent };
66
+ //# sourceMappingURL=skeletonizer-angular.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeletonizer-angular.mjs","sources":["../../../projects/skeletonizer/src/lib/skeletonize.directive.ts","../../../projects/skeletonizer/src/lib/skeletonizer.skeleton.component.ts","../../../projects/skeletonizer/src/lib/skeletonizer.skeleton.component.html","../../../projects/skeletonizer/src/public-api.ts","../../../projects/skeletonizer/src/skeletonizer-angular.ts"],"sourcesContent":["import { AfterViewInit, Directive, ElementRef, Input } from '@angular/core';\nimport { ISkeletonizerColorSchema, SkeletonDirective } from '@skeletonizer/utils';\n\n@Directive({\n selector: '[skeletonize]',\n standalone: true,\n})\nexport class SkeletonizeDirective implements AfterViewInit {\n @Input({ alias: 'skeletonize' }) public colorSchema: ISkeletonizerColorSchema | undefined;\n\n public constructor(\n private readonly el: ElementRef,\n ) {}\n\n public ngAfterViewInit(): void {\n SkeletonDirective.skeletonizeProjectedTemplate(this.el.nativeElement, this.colorSchema);\n }\n}\n","import { Component, ContentChild, Input, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { ISkeletonizerColorSchema, Schema, SkeletonAdapterComponent, TSchemaConfig } from '@skeletonizer/utils';\nimport { SkeletonizeDirective } from './skeletonize.directive';\nimport { NgTemplateOutlet } from '@angular/common';\n\n@Component({\n selector: 'skeletonizer-skeleton',\n templateUrl: './skeletonizer.skeleton.component.html',\n styleUrls: ['./skeletonizer.skeleton.component.scss'],\n encapsulation: ViewEncapsulation.None,\n standalone: true,\n imports: [\n SkeletonizeDirective,\n NgTemplateOutlet,\n ],\n})\nexport class SkeletonizerSkeletonComponent<T extends object, Scope extends T> extends SkeletonAdapterComponent<T> {\n @ContentChild(TemplateRef) public readonly templateRef!: TemplateRef<{ $implicit: Schema<T> | Scope }>;\n\n @Input({ required: true }) public showSkeleton!: boolean;\n @Input({ required: true }) public scope!: Scope;\n @Input() public colorSchema?: ISkeletonizerColorSchema;\n\n @Input({ alias: 'config', required: true }) public set configInput(config: TSchemaConfig<T>) {\n this.config = config;\n\n this.setupModels();\n }\n}\n","@if (showSkeleton) {\n @for (model of viewModels; track model.uuid) {\n <div [skeletonize]=\"colorSchema\">\n <ng-container *ngTemplateOutlet=\"templateRef; context: { $implicit: model }\"></ng-container>\n </div>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"templateRef; context: { $implicit: scope }\"></ng-container>\n}\n","/*\n * Public API Surface of skeletonizer\n */\n\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not edit.
3
+ */
4
+ /// <amd-module name="@skeletonizer/angular" />
5
+ export * from './public-api';
@@ -0,0 +1,11 @@
1
+ import { AfterViewInit, ElementRef } from '@angular/core';
2
+ import { ISkeletonizerColorSchema } from '@skeletonizer/utils';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SkeletonizeDirective implements AfterViewInit {
5
+ private readonly el;
6
+ colorSchema: ISkeletonizerColorSchema | undefined;
7
+ constructor(el: ElementRef);
8
+ ngAfterViewInit(): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonizeDirective, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SkeletonizeDirective, "[skeletonize]", never, { "colorSchema": { "alias": "skeletonize"; "required": false; }; }, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,14 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import { ISkeletonizerColorSchema, Schema, SkeletonAdapterComponent, TSchemaConfig } from '@skeletonizer/utils';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SkeletonizerSkeletonComponent<T extends object, Scope extends T> extends SkeletonAdapterComponent<T> {
5
+ readonly templateRef: TemplateRef<{
6
+ $implicit: Schema<T> | Scope;
7
+ }>;
8
+ showSkeleton: boolean;
9
+ scope: Scope;
10
+ colorSchema?: ISkeletonizerColorSchema;
11
+ set configInput(config: TSchemaConfig<T>);
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkeletonizerSkeletonComponent<any, any>, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<SkeletonizerSkeletonComponent<any, any>, "skeletonizer-skeleton", never, { "showSkeleton": { "alias": "showSkeleton"; "required": true; }; "scope": { "alias": "scope"; "required": true; }; "colorSchema": { "alias": "colorSchema"; "required": false; }; "configInput": { "alias": "config"; "required": true; }; }, {}, ["templateRef"], never, true, never>;
14
+ }
@@ -0,0 +1 @@
1
+ export * from './lib/skeletonizer.skeleton.component';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skeletonizer/angular",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "The way to skeletonize your Angular components",
5
5
  "author": "Luka Varga",
6
6
  "license": "MIT",
@@ -76,7 +76,7 @@
76
76
  "@angular-eslint/template-parser": "18.4.0",
77
77
  "@angular/cli": "~18.2.11",
78
78
  "@angular/compiler-cli": "^18.2.10",
79
- "@skeletonizer/utils": "^1.1.0",
79
+ "@skeletonizer/utils": "^1.1.1",
80
80
  "@types/jasmine": "~5.1.4",
81
81
  "@typescript-eslint/eslint-plugin": "^8.12.2",
82
82
  "@typescript-eslint/parser": "^8.12.2",
@@ -91,5 +91,5 @@
91
91
  "ng-packagr": "^18.2.1",
92
92
  "typescript": "~5.5.4"
93
93
  },
94
- "gitHead": "1cc1b5c8a71f0f2490f555edf700c238a64df3d1"
94
+ "gitHead": "a0b3a5c3b3d12cec97f9bf22830437ce1166c2a3"
95
95
  }