{"_id":"@avtest/ng-spy","_rev":"6-a967db255543d2b52243ce549e854ca7","name":"@avtest/ng-spy","dist-tags":{"latest":"5.0.6"},"versions":{"5.0.0":{"name":"@avtest/ng-spy","version":"5.0.0","peerDependencies":{"@angular/common":">=17.0.0","@angular/core":">17.0.0"},"keywords":["scrollspy","angular","scroll-spy","scroll spy"],"repository":{"type":"git","url":"git+https://github.com/chefomar/angular-scroll-spy.git"},"author":{"name":"omardev","email":"elshinnaweyom@gmail.com"},"dependencies":{"tslib":"^2.0.0"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"license":"MIT","module":"fesm2022/avtest-ng-spy.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/avtest-ng-spy.mjs","esm":"./esm2022/avtest-ng-spy.mjs","default":"./fesm2022/avtest-ng-spy.mjs"}},"sideEffects":false,"gitHead":"bec42cd19bbb31298bc901d7123c4787aa1aa761","description":"A lightweight, dependency-free scrollspy for angular. Use this library to spy on HTML elements on your page when the window is scrolled or resized.","bugs":{"url":"https://github.com/chefomar/angular-scroll-spy/issues"},"homepage":"https://github.com/chefomar/angular-scroll-spy#readme","_id":"@avtest/ng-spy@5.0.0","_nodeVersion":"18.13.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-jRqGBwO2RU9hLPgyfJ2wenurRvF6wANO6J9oVk1xUp9FWq5+BiU90KBFpEYo9EcSR+M5Osvza1UFRmpjDe+3nQ==","shasum":"29e9b4becf5f742d3256a143f9d8173304466314","tarball":"https://registry.npmjs.org/@avtest/ng-spy/-/ng-spy-5.0.0.tgz","fileCount":24,"unpackedSize":91758,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNVP8gifaaS69kayZGus+tOCi9oRKrIFEKf7U96xBFAAiBaNSD0AGR9SRvYyRFkf9Fypo+pI1RCuf+khsC3r9TNnA=="}]},"_npmUser":{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"},"directories":{},"maintainers":[{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-spy_5.0.0_1701330521531_0.23050299853255596"},"_hasShrinkwrap":false},"5.0.1":{"name":"@avtest/ng-spy","version":"5.0.1","peerDependencies":{"@angular/common":">=17.0.0","@angular/core":">17.0.0"},"keywords":["scrollspy","angular","scroll-spy","scroll spy"],"repository":{"type":"git","url":"git+https://github.com/chefomar/angular-scroll-spy.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"author":{"name":"omardev","email":"elshinnaweyom@gmail.com"},"dependencies":{"tslib":"^2.0.0"},"license":"MIT","module":"fesm2022/avtest-ng-spy.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/avtest-ng-spy.mjs","esm":"./esm2022/avtest-ng-spy.mjs","default":"./fesm2022/avtest-ng-spy.mjs"}},"sideEffects":false,"gitHead":"bec42cd19bbb31298bc901d7123c4787aa1aa761","description":"A lightweight, dependency-free scrollspy for angular. Use this library to spy on HTML elements on your page when the window is scrolled or resized.","bugs":{"url":"https://github.com/chefomar/angular-scroll-spy/issues"},"homepage":"https://github.com/chefomar/angular-scroll-spy#readme","_id":"@avtest/ng-spy@5.0.1","_nodeVersion":"18.13.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-LQ8GBxaVgU1mOkFT5yH1vFFixHYFyhbtPewFjyomJi8xeG0TXr9D+9HUUZihXkpddn6Kvtit0qxeCH6PtUZXhg==","shasum":"b432bfbe6f8ffc48ada4ab34b1814556c228d152","tarball":"https://registry.npmjs.org/@avtest/ng-spy/-/ng-spy-5.0.1.tgz","fileCount":24,"unpackedSize":97604,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID1l0Me4YRlKhDzgnjE+lbZvgSJ3yBc4S0hC3Ooj2lb9AiEAu2tR5tr+p8iMWlbZ+JczVo4R6oevP/BrGoVP2K31YNM="}]},"_npmUser":{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"},"directories":{},"maintainers":[{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-spy_5.0.1_1701679849276_0.006945309478686212"},"_hasShrinkwrap":false},"5.0.2":{"name":"@avtest/ng-spy","version":"5.0.2","peerDependencies":{"@angular/common":">=17.0.0","@angular/core":">17.0.0"},"keywords":["scrollspy","angular","scroll-spy","scroll spy"],"repository":{"type":"git","url":"git+https://github.com/chefomar/angular-scroll-spy.git"},"author":{"name":"omardev","email":"elshinnaweyom@gmail.com"},"dependencies":{"tslib":"^2.0.0"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"license":"MIT","module":"fesm2022/avtest-ng-spy.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/avtest-ng-spy.mjs","esm":"./esm2022/avtest-ng-spy.mjs","default":"./fesm2022/avtest-ng-spy.mjs"}},"sideEffects":false,"gitHead":"ed95e78726fc26908f5fac84ace57b8491ebba0c","description":"A lightweight, dependency-free scrollspy for angular. Use this library to spy on HTML elements on your page when the window is scrolled or resized.","bugs":{"url":"https://github.com/chefomar/angular-scroll-spy/issues"},"homepage":"https://github.com/chefomar/angular-scroll-spy#readme","_id":"@avtest/ng-spy@5.0.2","_nodeVersion":"18.13.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-GTcKftewHGDanZ5if/I6AG6WTvlFg+fQTPlCWFlE7xonaJeL8mAD6JaWIznheIFKTUsvtqWR17YjnH64A2AsEA==","shasum":"55289cd47dd3113ead655c84d46877a64e744c86","tarball":"https://registry.npmjs.org/@avtest/ng-spy/-/ng-spy-5.0.2.tgz","fileCount":24,"unpackedSize":97744,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDU4aLfZbvAkyEKS5ZVzv0bnrzxFCALANM33pro8pNQPgIgTaI3LnqhbrhZXsMK4VS0nzRWN2txMQ+MHS7pao9ukJI="}]},"_npmUser":{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"},"directories":{},"maintainers":[{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-spy_5.0.2_1701680409082_0.6501318546739188"},"_hasShrinkwrap":false},"5.0.3":{"name":"@avtest/ng-spy","version":"5.0.3","peerDependencies":{"@angular/common":">=17.0.0","@angular/core":">17.0.0"},"keywords":["scrollspy","angular","scroll-spy","scroll spy"],"repository":{"type":"git","url":"git+https://github.com/chefomar/angular-scroll-spy.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"author":{"name":"omardev","email":"elshinnaweyom@gmail.com"},"dependencies":{"tslib":"^2.0.0"},"license":"MIT","module":"fesm2022/avtest-ng-spy.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/avtest-ng-spy.mjs","esm":"./esm2022/avtest-ng-spy.mjs","default":"./fesm2022/avtest-ng-spy.mjs"}},"sideEffects":false,"gitHead":"02e7728bf92e2ae8408f8e499153580d1f832ee0","description":"A lightweight, dependency-free scrollspy for angular. Use this library to spy on HTML elements on your page when the window is scrolled or resized.","bugs":{"url":"https://github.com/chefomar/angular-scroll-spy/issues"},"homepage":"https://github.com/chefomar/angular-scroll-spy#readme","_id":"@avtest/ng-spy@5.0.3","_nodeVersion":"18.13.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-BNek06MUIVFbEjBetSHB5lm3OGt6K5N7wmEmlvBWfd8jI1bywWMJPj21rj3JuJXcJleiSvdJc7Yf+6Zu/Ysxnw==","shasum":"497ead0fd26721b1f6b9fa451d22e4969d6df2d9","tarball":"https://registry.npmjs.org/@avtest/ng-spy/-/ng-spy-5.0.3.tgz","fileCount":24,"unpackedSize":97744,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGVoqpE63yqBUYSaU8hcZ+NCqww+I8JYoHmOolpn8XJXAiBooQ/YxQeHRyW0NtUIP5pq9Xi7JvKphY3CgqU6qEKnCg=="}]},"_npmUser":{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"},"directories":{},"maintainers":[{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-spy_5.0.3_1701682597495_0.5369315081092996"},"_hasShrinkwrap":false},"5.0.4":{"name":"@avtest/ng-spy","version":"5.0.4","peerDependencies":{"@angular/common":">=17.0.0","@angular/core":">17.0.0"},"keywords":["scrollspy","angular","scroll-spy","scroll spy"],"repository":{"type":"git","url":"git+https://github.com/chefomar/angular-scroll-spy.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"author":{"name":"omardev","email":"elshinnaweyom@gmail.com"},"dependencies":{"tslib":"^2.0.0"},"license":"MIT","module":"fesm2022/avtest-ng-spy.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/avtest-ng-spy.mjs","esm":"./esm2022/avtest-ng-spy.mjs","default":"./fesm2022/avtest-ng-spy.mjs"}},"sideEffects":false,"gitHead":"778143fce7dab69f06b488ea6868abcdc6b97eee","description":"A lightweight, dependency-free scrollspy for angular. Use this library to spy on HTML elements on your page when the window is scrolled or resized.","bugs":{"url":"https://github.com/chefomar/angular-scroll-spy/issues"},"homepage":"https://github.com/chefomar/angular-scroll-spy#readme","_id":"@avtest/ng-spy@5.0.4","_nodeVersion":"18.13.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-Mmg7SmEbKECqVMcWWkgqFN+93nS+dUtkeKbw//J5CJcg19XOpUtJwcMMO3S5MsMCeEfDcVRlh+ikk8F+rMRkAA==","shasum":"d7f396dabd1cbc22977e5d93247cfe452e6cc9aa","tarball":"https://registry.npmjs.org/@avtest/ng-spy/-/ng-spy-5.0.4.tgz","fileCount":24,"unpackedSize":91858,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDqHqfipAS7qSosF3qxOHEAoikX5biAU9DmLVVbX4Yc9AIhAOVS0g8a1D/EBr/0u23M5Swlz17MzGjEHHF+c6D+Mym+"}]},"_npmUser":{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"},"directories":{},"maintainers":[{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-spy_5.0.4_1701684337136_0.781520931484261"},"_hasShrinkwrap":false},"5.0.5":{"name":"@avtest/ng-spy","version":"5.0.5","peerDependencies":{"@angular/common":">=17.0.0","@angular/core":">17.0.0"},"keywords":["scrollspy","angular","scroll-spy","scroll spy"],"repository":{"type":"git","url":"git+https://github.com/chefomar/angular-scroll-spy.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"author":{"name":"omardev","email":"elshinnaweyom@gmail.com"},"dependencies":{"tslib":"^2.0.0"},"license":"MIT","module":"fesm2022/avtest-ng-spy.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/avtest-ng-spy.mjs","esm":"./esm2022/avtest-ng-spy.mjs","default":"./fesm2022/avtest-ng-spy.mjs"}},"sideEffects":false,"gitHead":"f841bf23101a95a15a9145bb0b080c42e1459731","description":"A lightweight, dependency-free scrollspy for angular. Use this library to spy on HTML elements on your page when the window is scrolled or resized.","bugs":{"url":"https://github.com/chefomar/angular-scroll-spy/issues"},"homepage":"https://github.com/chefomar/angular-scroll-spy#readme","_id":"@avtest/ng-spy@5.0.5","_nodeVersion":"18.13.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-wEZbUsz+bi4n96Z5kKssxl1YJ7wh/PrF0259LNL4al1vCsSvd+0G88iQYGs5RXkbefwdmu7jVttVo6fPdmLf8Q==","shasum":"eadf492fb3c26cd9970505cead002cc23abae526","tarball":"https://registry.npmjs.org/@avtest/ng-spy/-/ng-spy-5.0.5.tgz","fileCount":24,"unpackedSize":93094,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYwSfpnXwysv2n5rYhN4iRNw09jgvBv98ecURg4hIjdAIgXOac9bvtZ+iI1mtGv6Cf/uhZvkg+/lu4+YnH74JkXjU="}]},"_npmUser":{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"},"directories":{},"maintainers":[{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-spy_5.0.5_1701698468932_0.9609486366576871"},"_hasShrinkwrap":false},"5.0.6":{"name":"@avtest/ng-spy","version":"5.0.6","peerDependencies":{"@angular/common":">=17.0.0","@angular/core":">17.0.0"},"keywords":["scrollspy","angular","scroll-spy","scroll spy"],"repository":{"type":"git","url":"git+https://github.com/chefomar/angular-scroll-spy.git"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"author":{"name":"omardev","email":"elshinnaweyom@gmail.com"},"dependencies":{"tslib":"^2.0.0"},"license":"MIT","module":"fesm2022/avtest-ng-spy.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","esm2022":"./esm2022/avtest-ng-spy.mjs","esm":"./esm2022/avtest-ng-spy.mjs","default":"./fesm2022/avtest-ng-spy.mjs"}},"sideEffects":false,"gitHead":"316f698265e998c308103ad3ca5b1b2878b60f47","description":"A lightweight, dependency-free scrollspy for angular. Use this library to spy on HTML elements on your page when the window is scrolled or resized.","bugs":{"url":"https://github.com/chefomar/angular-scroll-spy/issues"},"homepage":"https://github.com/chefomar/angular-scroll-spy#readme","_id":"@avtest/ng-spy@5.0.6","_nodeVersion":"18.13.0","_npmVersion":"9.6.6","dist":{"integrity":"sha512-Th2wTZMyAfeDq1I/8N9Xc6IQudOufaMK9J0i9JkYp525PHIArgHZrUQM8VJm2Bj76VEec7OZKrtEDa/ukE3hxQ==","shasum":"56652889c65e0088d99ce4c045f621e9922001cd","tarball":"https://registry.npmjs.org/@avtest/ng-spy/-/ng-spy-5.0.6.tgz","fileCount":24,"unpackedSize":95062,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCT0VnH99u59Xc8l+HefYxxyDDJmkJwFPhteyOSzL+sFgIgKC7E6iDHWLpdImPXGRolv0mE43o8De9efmiPKuD4MU8="}]},"_npmUser":{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"},"directories":{},"maintainers":[{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ng-spy_5.0.6_1701767388672_0.10970689958394364"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-30T07:48:41.402Z","5.0.0":"2023-11-30T07:48:41.808Z","modified":"2023-12-05T09:09:49.131Z","5.0.1":"2023-12-04T08:50:49.434Z","5.0.2":"2023-12-04T09:00:09.286Z","5.0.3":"2023-12-04T09:36:37.722Z","5.0.4":"2023-12-04T10:05:37.322Z","5.0.5":"2023-12-04T14:01:09.190Z","5.0.6":"2023-12-05T09:09:48.958Z"},"maintainers":[{"name":"lennarthoffmann","email":"lhoffmann@av-test.com"}],"description":"A lightweight, dependency-free scrollspy for angular. Use this library to spy on HTML elements on your page when the window is scrolled or resized.","homepage":"https://github.com/chefomar/angular-scroll-spy#readme","keywords":["scrollspy","angular","scroll-spy","scroll spy"],"repository":{"type":"git","url":"git+https://github.com/chefomar/angular-scroll-spy.git"},"author":{"name":"omardev","email":"elshinnaweyom@gmail.com"},"bugs":{"url":"https://github.com/chefomar/angular-scroll-spy/issues"},"license":"MIT","readme":"# ng-spy\n\nA lightweight, dependency-free scrollspy for angular. Use this library to spy on HTML elements on your page when the window is scrolled or resized.\n\nThis library provides directives and services to help you subscribe to new elements entering the browser window and possibly adds or remove CSS classes to these elements.\n\nThis library does not provide utilities to `scrollTo` spied elements and certainly does not handle link clicks. You have to handle these on your own.\n\n## Table of Contents\n1. [Example](#Example)\n2. [Usage](#Usage)\n3. [Documentation](#Documentation)\n    - [Directives](#Directives)\n    - [Services](#Services)\n    - [Interfaces](#Interfaces)\n    - [Injection Tokens](#InjectionTokens)\n\n## Example\n[Checkout this example](https://chefomar.github.io/angular-scroll-spy/)\n\nCode for the previous example is also in this repository under the src folder.\n\n## Usage\n\n1. `npm install --save ng-spy`\n2. Import the module\n\n    ```typescript\n    @NgModule({\n      declarations: [],\n      imports: [\n        // ...\n        ScrollSpyModule\n      ],\n      providers: [],\n      bootstrap: [AppComponent]\n    })\n    export class AppModule { }\n    ```\n\n3. In your container component:\n\n    ```typescript\n    ngAfterViewInit() {\n      this.spyService.spy({ thresholdBottom: 50 });\n    }\n    ```\n\n4. Use `SpyTarget` directive to mark element as a target:\n\n    ```html\n    <h1 spyTarget=\"target-1\">Hello, World!!</h1>\n    ```\n\n5. Optional: Use `SpyOn` directive to spy on a target:\n\n    ```html\n    <a spyOn=\"target-1\" activeClass=\"navbar__link--active\" class=\"navbar__link\" href=\"#target-1\">target 1</a>\n    ```\n\n6. Alternatively, you can subscribe to `activeSpyTarget` from `ScrollSpyService`, which will emit every time a new element is active.\n\n    ```typescript\n    this.scrollspyService.activeSpyTarget.subscribe(\n      (activeTargetName: string) => console.log(activeTargetName)\n    );\n    ```\n\n7. To start multiple spys you can scope the `ScrollSpyService` to a specific component or module in the `providers` array.\n\n    ```typescript\n    // In component or module metadata:\n    {\n      // ...\n      providers: [ ScrollSpyService ]\n    }\n    ```\n\n## Documentation\n\n### Directives\n\n#### `SpyOn`\n\nA directive to spy on a previously added target.\n\n##### Input\n\n|     Name    \t|  Type  \t|                     Description                     \t| Default value \t|\n|:-----------:\t|:------:\t|:---------------------------------------------------:\t|:-------------:\t|\n| activeClass \t| string \t| a class to be added to host element if it is active \t|               \t|\n| spyOn       \t| string \t| the name of the target to spy on                    \t|               \t|\n\n#### `SpyTarget`\n\nA directive to mark an element as a spy target.\n\n##### Input\n\n|    Name   \t|  Type  \t|                                                   Description                                                   \t| Default value \t|\n|:---------:\t|:------:\t|:---------------------------------------------------------------------------------------------------------------:\t|:-------------:\t|\n| spyTarget \t| string \t| the name of the target to be added. This also adds an id attribute to the host element with the `spyTarget` value |               \t|\n\n### Services\n\n#### `ScrollSpyService`\n\n##### Functions\n\n###### `spy(spyOptions: SpyOptions): void`\n\nStarts spying on the targets. Call this on the top level container of your targets in `AfterViewInit` lifecycle hook. Without calling this function, nothing will happen.\n\n**Parameters:**\n\n|    Name    \t|    Type    \t| Optional? \t|                                  Description                                 \t|                Default value               \t|\n|:----------:\t|:----------:\t|-----------\t|:----------------------------------------------------------------------------:\t|:------------------------------------------:\t|\n| spyOptions \t| SpyOptions \t| Yes       \t| Options to override some default behaviors. See SpyOptions for more details. \t| { thresholdTop = 0 , thresholdBottom = 0 } \t|\n\n###### `addTarget(target: SpyTarget): void`\n\nadds the `target` to the targets collection for spying. This action will also trigger a check to re-evaluate the active target.\n\n**Parameters:**\n\n|  Name  \t|    Type   \t| Optional? \t|       Description      \t| Default value \t|\n|:------:\t|:---------:\t|-----------\t|:----------------------:\t|:-------------:\t|\n| target \t| SpyTarget \t| No        \t| The target to be added.\t|               \t|\n\n###### `removeTarget(target: string): void`\n\nRemoves a previously added target from the targets collection. This action will also trigger a check to re-evaluate the active target.\n\n**Parameters:**\n\n|  Name  \t|  Type  \t| Optional? \t|          Description          \t| Default value \t|\n|:------:\t|:------:\t|-----------\t|:-----------------------------:\t|:-------------:\t|\n| target \t| string \t| No        \t| The target name to be removed \t|               \t|\n\n###### `checkActiveElement(scrollContainer?: ElementRef): void`\n\nTries to find the active target in the targets collection. If found it will emit the target name using the `activeSpyTarget` observable, Otherwise it will emit null.\n\n**Parameters:**\n\n|       Name      \t|    Type    \t| Optional? \t|                       Description                       \t| Default value \t|\n|:---------------:\t|:----------:\t|-----------\t|:-------------------------------------------------------:\t|:-------------:\t|\n| scrollContainer \t| ElementRef \t| Yes       \t| The scroll container in which your targets are present. \t|               \t|\n\n###### `isElementActive(element: ElementRef, scrollContainer?: ElementRef, currentActiveElement?: ElementRef): boolean`\n\nChecks if the `element` is inside the browser window and optionally inside the `scrollContainer`.\n\nIf a `currentActiveElement` is provided, it will also check if the `element`'s offsetTop is greater than the `currentActiveElement`. Meaning, if two targets are active, only the last one on the screen will be emitted.\n\nIf a `scrollContainer` is provided, it will ignore `thresholdBottom` and `thresholdTop` in the window check and will instead check for the threshold inside the `scrollContainer`.\n\n**Parameters:**\n\n|         Name         \t|    Type    \t| Optional? \t|                    Description                    \t| Default value \t|\n|:--------------------:\t|:----------:\t|-----------\t|:-------------------------------------------------:\t|:-------------:\t|\n| element              \t| ElementRef \t| No        \t| The element to be checked.                        \t|               \t|\n| scrollContainer      \t| ElementRef \t| Yes       \t| The scroll container which the element is inside. \t|               \t|\n| currentActiveElement \t| ElementRef \t| Yes       \t| An element that is guaranteed to be active.       \t|               \t|\n\n###### `stopSpying(): void`\n\nStops spying on the targets, completes the `activeSpyTarget` subject and clears the targets collection.\n\n##### Getters\n\n###### `activeSpyTarget: Observable<string>`\n\nUse this to subscribe to new active spy targets. Value can be `null` if no target is found to be active.\n\n### Interfaces\n\n##### `SpyOptions`\n\n|       Name      \t|    Type    \t| Optional? \t|                                        Description                                        \t|\n|:---------------:\t|:----------:\t|-----------\t|:-----------------------------------------------------------------------------------------:\t|\n| scrollContainer \t| ElementRef \t| Yes       \t| The scroll container in which your targets are present.                                   \t|\n| thresholdTop    \t| number     \t| Yes       \t| A number added to the top of your scroll container while checking in `isElementActive`    \t|\n| thresholdBottom \t| number     \t| Yes       \t| A number added to the bottom of your scroll container while checking in `isElementActive` \t|\n\n##### `SpyTarget`\n\n|   Name  \t|    Type    \t| Optional? \t|                                                    Description                                                   \t|\n|:-------:\t|:----------:\t|-----------\t|:----------------------------------------------------------------------------------------------------------------:\t|\n| name    \t| string     \t| No        \t| The name of the spy target. This is also may be used as an id for the html element. So make sure this is unique. \t|\n| element \t| ElementRef \t| No        \t| A reference to the target element.                                                                               \t|\n\n### InjectionTokens\n\n#### `RESIZE_TIME_THRESHOLD`\n\nUsed in the resize event with `auditTime`.\n\n**Default Value**: 300\n\n#### `SCROLL_TIME_THRESHOLD`\n\nUsed in the scroll events with `auditTime`.\n\n**Default Value**: 10\n","readmeFilename":"README.md"}