@bootkit/ng0 0.0.0-alpha.37 → 0.0.0-alpha.39

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.
@@ -1,6 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, input, HostListener, Directive } from '@angular/core';
2
+ import { Injectable, input, HostListener, Directive, inject, PLATFORM_ID, ElementRef, Renderer2, booleanAttribute, EventEmitter, Output } from '@angular/core';
3
3
  import { Subject } from 'rxjs';
4
+ import { isPlatformServer } from '@angular/common';
4
5
 
5
6
  class ClipboardService {
6
7
  _writeSubject = new Subject;
@@ -43,9 +44,136 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImpor
43
44
  args: ['click']
44
45
  }] } });
45
46
 
47
+ /**
48
+ * Directive that observes the intersection of an element with the viewport and optionally applies CSS classes when the element enters or leaves the viewport.
49
+ * It uses the Intersection Observer API to monitor visibility changes.
50
+ * It can be used to trigger animate-on-scroll (AOS) animations, lazy loading, or other actions based on element visibility.
51
+ */
52
+ class IntersectionObserverDirective {
53
+ _platformId = inject(PLATFORM_ID);
54
+ _elementRef = inject(ElementRef);
55
+ _renderer = inject(Renderer2);
56
+ _entered;
57
+ _observer;
58
+ _addClass(c) { this._renderer.addClass(this._elementRef.nativeElement, c); }
59
+ ;
60
+ _removeClass(c) { this._renderer.removeClass(this._elementRef.nativeElement, c); }
61
+ ;
62
+ /**
63
+ * Threshold(s) at which to trigger the intersection callback.
64
+ * Can be a single number or an array of numbers between 0 and 1.
65
+ * For example, 0.5 means the callback will be triggered when 50% of the element is visible in the viewport.
66
+ */
67
+ threshold = input(...(ngDevMode ? [undefined, { debugName: "threshold" }] : []));
68
+ /**
69
+ * Root element to use for intersection observation.
70
+ * If not provided, the viewport (browser window) is used as the root.
71
+ */
72
+ root = input(...(ngDevMode ? [undefined, { debugName: "root" }] : []));
73
+ /**
74
+ * Root margin to apply to the intersection observer.
75
+ * This can be a string similar to the CSS margin property, e.g., '10px 20px 30px 40px'.
76
+ * It defines the margin around the root element (viewport) to consider for intersection.
77
+ */
78
+ rootMargin = input(...(ngDevMode ? [undefined, { debugName: "rootMargin" }] : []));
79
+ /**
80
+ * Css class to apply when the element enters the viewport.
81
+ */
82
+ enterClass = input(...(ngDevMode ? [undefined, { debugName: "enterClass" }] : []));
83
+ /**
84
+ * Css class to apply when the element leaves the viewport.
85
+ */
86
+ leaveClass = input(...(ngDevMode ? [undefined, { debugName: "leaveClass" }] : []));
87
+ /**
88
+ * Whether to observe only once (true) or continuously (false).
89
+ * If true, the observer will disconnect after the first intersection event.
90
+ * @default false
91
+ */
92
+ once = input(true, ...(ngDevMode ? [{ debugName: "once", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
93
+ /**
94
+ * Event emitted when the element enters the viewport.
95
+ */
96
+ enter = new EventEmitter();
97
+ /**
98
+ * Event emitted when the element leaves the viewport.
99
+ * This event will only be emitted if the element has previously entered the viewport.
100
+ */
101
+ leave = new EventEmitter();
102
+ ngOnInit() {
103
+ if (isPlatformServer(this._platformId)) {
104
+ return;
105
+ }
106
+ this._setupObserver();
107
+ }
108
+ _setupObserver() {
109
+ this._observer = new IntersectionObserver((entries) => {
110
+ entries.forEach(entry => {
111
+ if (entry.isIntersecting) {
112
+ if (this.enterClass()) {
113
+ this._addClass(this.enterClass());
114
+ if (this._entered === false && this.leaveClass()) {
115
+ this._removeClass(this.leaveClass());
116
+ }
117
+ }
118
+ this._entered = true;
119
+ this.enter.emit(entry);
120
+ if (this.once()) {
121
+ this.disconnect();
122
+ }
123
+ }
124
+ else {
125
+ if (this._entered) {
126
+ if (this.leaveClass()) {
127
+ this._addClass(this.leaveClass());
128
+ if (this.enterClass()) {
129
+ this._removeClass(this.enterClass());
130
+ }
131
+ }
132
+ this._entered = false;
133
+ this.leave.emit(entry);
134
+ if (this.once()) {
135
+ this.disconnect();
136
+ }
137
+ }
138
+ }
139
+ });
140
+ }, {
141
+ root: this.root(),
142
+ threshold: this.threshold(),
143
+ rootMargin: this.rootMargin()
144
+ });
145
+ this._observer.takeRecords(); // Clear initial records
146
+ this._observer.observe(this._elementRef.nativeElement);
147
+ }
148
+ /**
149
+ * Disconnects the intersection observer.
150
+ * This stops all observation and releases resources.
151
+ */
152
+ disconnect() {
153
+ this._observer?.disconnect();
154
+ }
155
+ ngOnDestroy() {
156
+ this.disconnect();
157
+ }
158
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: IntersectionObserverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
159
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: IntersectionObserverDirective, isStandalone: true, selector: "[ng0IntersectionObserver]", inputs: { threshold: { classPropertyName: "threshold", publicName: "threshold", isSignal: true, isRequired: false, transformFunction: null }, root: { classPropertyName: "root", publicName: "root", isSignal: true, isRequired: false, transformFunction: null }, rootMargin: { classPropertyName: "rootMargin", publicName: "rootMargin", isSignal: true, isRequired: false, transformFunction: null }, enterClass: { classPropertyName: "enterClass", publicName: "enterClass", isSignal: true, isRequired: false, transformFunction: null }, leaveClass: { classPropertyName: "leaveClass", publicName: "leaveClass", isSignal: true, isRequired: false, transformFunction: null }, once: { classPropertyName: "once", publicName: "once", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { enter: "enter", leave: "leave" }, exportAs: ["ng0IntersectionObserver"], ngImport: i0 });
160
+ }
161
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: IntersectionObserverDirective, decorators: [{
162
+ type: Directive,
163
+ args: [{
164
+ selector: '[ng0IntersectionObserver]',
165
+ exportAs: 'ng0IntersectionObserver',
166
+ standalone: true
167
+ }]
168
+ }], propDecorators: { threshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "threshold", required: false }] }], root: [{ type: i0.Input, args: [{ isSignal: true, alias: "root", required: false }] }], rootMargin: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootMargin", required: false }] }], enterClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "enterClass", required: false }] }], leaveClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "leaveClass", required: false }] }], once: [{ type: i0.Input, args: [{ isSignal: true, alias: "once", required: false }] }], enter: [{
169
+ type: Output
170
+ }], leave: [{
171
+ type: Output
172
+ }] } });
173
+
46
174
  /**
47
175
  * Generated bundle index. Do not edit.
48
176
  */
49
177
 
50
- export { ClipboardCopyDirective, ClipboardService };
178
+ export { ClipboardCopyDirective, ClipboardService, IntersectionObserverDirective };
51
179
  //# sourceMappingURL=bootkit-ng0-platform-browser.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bootkit-ng0-platform-browser.mjs","sources":["../../../projects/ng0/platform/browser/clipboard/clipboard.service.ts","../../../projects/ng0/platform/browser/clipboard/clipboard-copy.directive.ts","../../../projects/ng0/platform/browser/bootkit-ng0-platform-browser.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ClipboardService {\r\n private _writeSubject = new Subject<any>;\r\n public readonly write = this._writeSubject.asObservable();\r\n\r\n constructor() { }\r\n\r\n public writeText(text: string) {\r\n window.navigator.clipboard.writeText(text);\r\n this._writeSubject.next(text);\r\n }\r\n}\r\n","import { Directive, HostListener, input } from '@angular/core';\r\nimport { ClipboardService } from './clipboard.service';\r\n\r\n@Directive({\r\n selector: '[ng0-clipboard-copy]',\r\n standalone: true\r\n})\r\nexport class ClipboardCopyDirective {\r\n public value = input<string>(undefined, {alias: 'ng0-clipboard-copy'})\r\n\r\n constructor(private clipboardService: ClipboardService) {\r\n }\r\n\r\n \r\n\r\n @HostListener('click') private _onHostClick() {\r\n this.clipboardService.writeText(this.value()!);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.ClipboardService"],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AtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,gBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE;AACb,iBAAA;;sBASE,YAAY;uBAAC,OAAO;;;ACfvB;;AAEG;;;;"}
1
+ {"version":3,"file":"bootkit-ng0-platform-browser.mjs","sources":["../../../projects/ng0/platform/browser/clipboard/clipboard.service.ts","../../../projects/ng0/platform/browser/clipboard/clipboard-copy.directive.ts","../../../projects/ng0/platform/browser/intersection-observer.directive.ts","../../../projects/ng0/platform/browser/bootkit-ng0-platform-browser.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ClipboardService {\r\n private _writeSubject = new Subject<any>;\r\n public readonly write = this._writeSubject.asObservable();\r\n\r\n constructor() { }\r\n\r\n public writeText(text: string) {\r\n window.navigator.clipboard.writeText(text);\r\n this._writeSubject.next(text);\r\n }\r\n}\r\n","import { Directive, HostListener, input } from '@angular/core';\r\nimport { ClipboardService } from './clipboard.service';\r\n\r\n@Directive({\r\n selector: '[ng0-clipboard-copy]',\r\n standalone: true\r\n})\r\nexport class ClipboardCopyDirective {\r\n public value = input<string>(undefined, {alias: 'ng0-clipboard-copy'})\r\n\r\n constructor(private clipboardService: ClipboardService) {\r\n }\r\n\r\n \r\n\r\n @HostListener('click') private _onHostClick() {\r\n this.clipboardService.writeText(this.value()!);\r\n }\r\n}\r\n","import { ElementRef, input, OnInit, PLATFORM_ID, Directive, OnDestroy, Output, EventEmitter, inject, Renderer2, booleanAttribute } from '@angular/core';\r\nimport { isPlatformServer } from '@angular/common';\r\n\r\n/**\r\n * Directive that observes the intersection of an element with the viewport and optionally applies CSS classes when the element enters or leaves the viewport.\r\n * It uses the Intersection Observer API to monitor visibility changes.\r\n * It can be used to trigger animate-on-scroll (AOS) animations, lazy loading, or other actions based on element visibility.\r\n */\r\n@Directive({\r\n selector: '[ng0IntersectionObserver]',\r\n exportAs: 'ng0IntersectionObserver',\r\n standalone: true\r\n})\r\nexport class IntersectionObserverDirective implements OnInit, OnDestroy {\r\n private readonly _platformId = inject(PLATFORM_ID);\r\n private readonly _elementRef = inject(ElementRef);\r\n private readonly _renderer = inject(Renderer2);\r\n private _entered?: boolean;\r\n private _observer?: IntersectionObserver;\r\n private _addClass(c: string) { this._renderer.addClass(this._elementRef.nativeElement, c) };\r\n private _removeClass(c: string) { this._renderer.removeClass(this._elementRef.nativeElement, c) };\r\n\r\n /**\r\n * Threshold(s) at which to trigger the intersection callback.\r\n * Can be a single number or an array of numbers between 0 and 1.\r\n * For example, 0.5 means the callback will be triggered when 50% of the element is visible in the viewport.\r\n */\r\n public readonly threshold = input<number | number[] | undefined>();\r\n\r\n /**\r\n * Root element to use for intersection observation. \r\n * If not provided, the viewport (browser window) is used as the root.\r\n */\r\n public readonly root = input<Element | Document | null | undefined>();\r\n\r\n /**\r\n * Root margin to apply to the intersection observer.\r\n * This can be a string similar to the CSS margin property, e.g., '10px 20px 30px 40px'.\r\n * It defines the margin around the root element (viewport) to consider for intersection.\r\n */\r\n public readonly rootMargin = input<string | undefined>();\r\n\r\n /**\r\n * Css class to apply when the element enters the viewport.\r\n */\r\n public readonly enterClass = input<string | undefined>();\r\n\r\n /**\r\n * Css class to apply when the element leaves the viewport.\r\n */\r\n public readonly leaveClass = input<string | undefined>();\r\n\r\n /**\r\n * Whether to observe only once (true) or continuously (false).\r\n * If true, the observer will disconnect after the first intersection event.\r\n * @default false\r\n */\r\n public readonly once = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * Event emitted when the element enters the viewport.\r\n */\r\n @Output() public readonly enter = new EventEmitter<IntersectionObserverEntry>();\r\n\r\n /**\r\n * Event emitted when the element leaves the viewport.\r\n * This event will only be emitted if the element has previously entered the viewport.\r\n */\r\n @Output() public readonly leave = new EventEmitter<IntersectionObserverEntry>();\r\n\r\n\r\n ngOnInit(): void {\r\n if (isPlatformServer(this._platformId)) {\r\n return;\r\n }\r\n\r\n this._setupObserver();\r\n }\r\n\r\n private _setupObserver() {\r\n this._observer = new IntersectionObserver(\r\n (entries) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n if (this.enterClass()) {\r\n this._addClass(this.enterClass()!);\r\n\r\n if (this._entered === false && this.leaveClass()) {\r\n this._removeClass(this.leaveClass()!);\r\n }\r\n }\r\n\r\n this._entered = true;\r\n this.enter.emit(entry);\r\n\r\n if (this.once()) {\r\n this.disconnect();\r\n }\r\n } else {\r\n if (this._entered) {\r\n if (this.leaveClass()) {\r\n this._addClass(this.leaveClass()!);\r\n\r\n if (this.enterClass()) {\r\n this._removeClass(this.enterClass()!);\r\n }\r\n }\r\n\r\n this._entered = false;\r\n this.leave.emit(entry);\r\n\r\n if (this.once()) {\r\n this.disconnect();\r\n }\r\n }\r\n }\r\n });\r\n },\r\n {\r\n root: this.root(),\r\n threshold: this.threshold(),\r\n rootMargin: this.rootMargin()\r\n }\r\n );\r\n\r\n this._observer.takeRecords(); // Clear initial records\r\n this._observer.observe(this._elementRef.nativeElement);\r\n }\r\n\r\n /**\r\n * Disconnects the intersection observer.\r\n * This stops all observation and releases resources.\r\n */\r\n public disconnect(): void {\r\n this._observer?.disconnect();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.disconnect();\r\n }\r\n}\r\n","/**\n *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KAAA,EAAA,OAAA,EAAA,EAAA,QAAA,EAAA,CAAA,yBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAA7B,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBALzC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,UAAU,EAAE;AACf,iBAAA;;sBAkDI;;sBAMA;;;ACpEL;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- const LibName = 'bootkit/angular-pro';
1
+ const libName = 'bootkit/ng0';
2
2
 
3
3
  /*
4
4
  * Public API Surface of bootkit
@@ -8,5 +8,5 @@ const LibName = 'bootkit/angular-pro';
8
8
  * Generated bundle index. Do not edit.
9
9
  */
10
10
 
11
- export { LibName };
11
+ export { libName };
12
12
  //# sourceMappingURL=bootkit-ng0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bootkit-ng0.mjs","sources":["../../../projects/ng0/src/lib/index.ts","../../../projects/ng0/src/public-api.ts","../../../projects/ng0/src/bootkit-ng0.ts"],"sourcesContent":["export * from './types';\r\n \r\nexport const LibName = 'bootkit/angular-pro';","/*\r\n * Public API Surface of bootkit\r\n */\r\n\r\nexport * from './lib';\r\n \r\n \r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAEO,MAAM,OAAO,GAAG;;ACFvB;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"bootkit-ng0.mjs","sources":["../../../projects/ng0/src/lib/index.ts","../../../projects/ng0/src/public-api.ts","../../../projects/ng0/src/bootkit-ng0.ts"],"sourcesContent":["export const libName = 'bootkit/ng0';","/*\r\n * Public API Surface of bootkit\r\n */\r\n\r\nexport * from './lib';\r\n \r\n \r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAO,MAAM,OAAO,GAAG;;ACAvB;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- declare const LibName = "bootkit/angular-pro";
1
+ declare const libName = "bootkit/ng0";
2
2
 
3
- export { LibName };
3
+ export { libName };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bootkit/ng0",
3
- "version": "0.0.0-alpha.37",
3
+ "version": "0.0.0-alpha.39",
4
4
  "description": "Angular+Bootstrap Component Library",
5
5
  "homepage": "https://bootkitlib.github.io/",
6
6
  "author": "BootKit",
@@ -39,14 +39,14 @@
39
39
  "types": "./common/index.d.ts",
40
40
  "default": "./fesm2022/bootkit-ng0-common.mjs"
41
41
  },
42
- "./date": {
43
- "types": "./date/index.d.ts",
44
- "default": "./fesm2022/bootkit-ng0-date.mjs"
45
- },
46
42
  "./data": {
47
43
  "types": "./data/index.d.ts",
48
44
  "default": "./fesm2022/bootkit-ng0-data.mjs"
49
45
  },
46
+ "./date": {
47
+ "types": "./date/index.d.ts",
48
+ "default": "./fesm2022/bootkit-ng0-date.mjs"
49
+ },
50
50
  "./file": {
51
51
  "types": "./file/index.d.ts",
52
52
  "default": "./fesm2022/bootkit-ng0-file.mjs"
@@ -83,14 +83,14 @@
83
83
  "types": "./components/backdrop/index.d.ts",
84
84
  "default": "./fesm2022/bootkit-ng0-components-backdrop.mjs"
85
85
  },
86
- "./components/card": {
87
- "types": "./components/card/index.d.ts",
88
- "default": "./fesm2022/bootkit-ng0-components-card.mjs"
89
- },
90
86
  "./components/button": {
91
87
  "types": "./components/button/index.d.ts",
92
88
  "default": "./fesm2022/bootkit-ng0-components-button.mjs"
93
89
  },
90
+ "./components/card": {
91
+ "types": "./components/card/index.d.ts",
92
+ "default": "./fesm2022/bootkit-ng0-components-card.mjs"
93
+ },
94
94
  "./components/code": {
95
95
  "types": "./components/code/index.d.ts",
96
96
  "default": "./fesm2022/bootkit-ng0-components-code.mjs"
@@ -1,22 +1,88 @@
1
1
  import * as rxjs from 'rxjs';
2
- import * as i0 from '@angular/core';
2
+ import * as _angular_core from '@angular/core';
3
+ import { OnInit, OnDestroy, EventEmitter } from '@angular/core';
3
4
 
4
5
  declare class ClipboardService {
5
6
  private _writeSubject;
6
7
  readonly write: rxjs.Observable<any>;
7
8
  constructor();
8
9
  writeText(text: string): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardService, never>;
10
- static ɵprov: i0.ɵɵInjectableDeclaration<ClipboardService>;
10
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipboardService, never>;
11
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ClipboardService>;
11
12
  }
12
13
 
13
14
  declare class ClipboardCopyDirective {
14
15
  private clipboardService;
15
- value: i0.InputSignal<string | undefined>;
16
+ value: _angular_core.InputSignal<string | undefined>;
16
17
  constructor(clipboardService: ClipboardService);
17
18
  private _onHostClick;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<ClipboardCopyDirective, never>;
19
- static ɵdir: i0.ɵɵDirectiveDeclaration<ClipboardCopyDirective, "[ng0-clipboard-copy]", never, { "value": { "alias": "ng0-clipboard-copy"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
19
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClipboardCopyDirective, never>;
20
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ClipboardCopyDirective, "[ng0-clipboard-copy]", never, { "value": { "alias": "ng0-clipboard-copy"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
20
21
  }
21
22
 
22
- export { ClipboardCopyDirective, ClipboardService };
23
+ /**
24
+ * Directive that observes the intersection of an element with the viewport and optionally applies CSS classes when the element enters or leaves the viewport.
25
+ * It uses the Intersection Observer API to monitor visibility changes.
26
+ * It can be used to trigger animate-on-scroll (AOS) animations, lazy loading, or other actions based on element visibility.
27
+ */
28
+ declare class IntersectionObserverDirective implements OnInit, OnDestroy {
29
+ private readonly _platformId;
30
+ private readonly _elementRef;
31
+ private readonly _renderer;
32
+ private _entered?;
33
+ private _observer?;
34
+ private _addClass;
35
+ private _removeClass;
36
+ /**
37
+ * Threshold(s) at which to trigger the intersection callback.
38
+ * Can be a single number or an array of numbers between 0 and 1.
39
+ * For example, 0.5 means the callback will be triggered when 50% of the element is visible in the viewport.
40
+ */
41
+ readonly threshold: _angular_core.InputSignal<number | number[] | undefined>;
42
+ /**
43
+ * Root element to use for intersection observation.
44
+ * If not provided, the viewport (browser window) is used as the root.
45
+ */
46
+ readonly root: _angular_core.InputSignal<Element | Document | null | undefined>;
47
+ /**
48
+ * Root margin to apply to the intersection observer.
49
+ * This can be a string similar to the CSS margin property, e.g., '10px 20px 30px 40px'.
50
+ * It defines the margin around the root element (viewport) to consider for intersection.
51
+ */
52
+ readonly rootMargin: _angular_core.InputSignal<string | undefined>;
53
+ /**
54
+ * Css class to apply when the element enters the viewport.
55
+ */
56
+ readonly enterClass: _angular_core.InputSignal<string | undefined>;
57
+ /**
58
+ * Css class to apply when the element leaves the viewport.
59
+ */
60
+ readonly leaveClass: _angular_core.InputSignal<string | undefined>;
61
+ /**
62
+ * Whether to observe only once (true) or continuously (false).
63
+ * If true, the observer will disconnect after the first intersection event.
64
+ * @default false
65
+ */
66
+ readonly once: _angular_core.InputSignalWithTransform<boolean, unknown>;
67
+ /**
68
+ * Event emitted when the element enters the viewport.
69
+ */
70
+ readonly enter: EventEmitter<IntersectionObserverEntry>;
71
+ /**
72
+ * Event emitted when the element leaves the viewport.
73
+ * This event will only be emitted if the element has previously entered the viewport.
74
+ */
75
+ readonly leave: EventEmitter<IntersectionObserverEntry>;
76
+ ngOnInit(): void;
77
+ private _setupObserver;
78
+ /**
79
+ * Disconnects the intersection observer.
80
+ * This stops all observation and releases resources.
81
+ */
82
+ disconnect(): void;
83
+ ngOnDestroy(): void;
84
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<IntersectionObserverDirective, never>;
85
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<IntersectionObserverDirective, "[ng0IntersectionObserver]", ["ng0IntersectionObserver"], { "threshold": { "alias": "threshold"; "required": false; "isSignal": true; }; "root": { "alias": "root"; "required": false; "isSignal": true; }; "rootMargin": { "alias": "rootMargin"; "required": false; "isSignal": true; }; "enterClass": { "alias": "enterClass"; "required": false; "isSignal": true; }; "leaveClass": { "alias": "leaveClass"; "required": false; "isSignal": true; }; "once": { "alias": "once"; "required": false; "isSignal": true; }; }, { "enter": "enter"; "leave": "leave"; }, never, never, true, never>;
86
+ }
87
+
88
+ export { ClipboardCopyDirective, ClipboardService, IntersectionObserverDirective };