real-view 1.0.1 → 1.0.2

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AntonVoronezh <anton.voronezh.1990@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  [![npm version](https://img.shields.io/npm/v/real-view.svg?style=flat-square)](https://www.npmjs.com/package/real-view)
4
4
  [![minzipped size](https://img.shields.io/bundlephobia/minzip/real-view?style=flat-square)](https://bundlephobia.com/package/real-view)
5
5
  [![license](https://img.shields.io/npm/l/real-view?style=flat-square)](LICENSE)
6
+ [![Boosty](https://img.shields.io/badge/Support-Boosty-orange?style=flat-square&logo=boosty)](https://boosty.to/antonvoronezh/donate)
7
+ [![Crypto](https://img.shields.io/badge/Donate-Crypto-2CA5E0?style=flat-square&logo=telegram&logoColor=white)](https://t.me/AntonVoronezhh/5)
6
8
 
7
9
  > **Stop guessing. Start knowing.**
8
10
  > The only visibility tracker that knows if your user *actually* sees the element.
@@ -188,9 +190,24 @@ Real View uses a **"Lazy Raycasting"** architecture to keep performance high:
188
190
  3. **Style Audit:** It recursively checks `opacity`, `visibility`, and `display` up the DOM tree.
189
191
  4. **Tab Hygiene:** It listens to the Page Visibility API to pause tracking when the tab is backgrounded.
190
192
 
191
- ## Support the project if you value your time ➡️➡️➡️
193
+ ## Support the project ❤️
192
194
  > "We eliminated the lying `IntersectionObserver` reports, saved your analytics from counting impressions hidden behind sticky headers, and absorbed the manual DOM raycasting nightmare. You saved dozens of hours not writing complex visibility logic that would have killed your main thread anyway. **Your donation** is a fair trade for honest data and weekends free from debugging occlusion."
193
195
 
196
+ If this library saved you time, please consider supporting the development:
197
+
198
+ 1. **Fiat (Cards/PayPal):** via **[Boosty](https://boosty.to/antonvoronezh/donate)** (one-time or monthly).
199
+ 2. **Crypto (USDT/TON/BTC/ETH):** view wallet addresses on **[Telegram](https://t.me/AntonVoronezhh/5)**.
200
+
201
+ <div style="display: flex; gap: 10px;">
202
+ <a href="https://boosty.to/antonvoronezh/donate">
203
+ <img src="https://img.shields.io/badge/Support_on-Boosty-orange?style=for-the-badge&logo=boosty" alt="Support on Boosty">
204
+ </a>
205
+ <a href="https://t.me/AntonVoronezhh/5">
206
+ <img src="https://img.shields.io/badge/Crypto_via-Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white" alt="Crypto via Telegram">
207
+ </a>
208
+ </div>
209
+
210
+
194
211
  ## License
195
212
 
196
213
  MIT
package/banner.js ADDED
@@ -0,0 +1,46 @@
1
+ try {
2
+ if (
3
+ process.env.CI ||
4
+ process.env.ADBLOCK ||
5
+ process.env.DISABLE_OPENCOLLECTIVE ||
6
+ process.env.npm_config_ignore_scripts === "true" ||
7
+ process.env.NODE_ENV === "test"
8
+ ) {
9
+ process.exit(0);
10
+ }
11
+
12
+ const loglevel = (process.env.npm_config_loglevel || "").toLowerCase();
13
+ if (loglevel === "silent") process.exit(0);
14
+
15
+ const reset = "\x1b[0m";
16
+ const cyan = "\x1b[36m";
17
+ const green = "\x1b[32m";
18
+ const yellow = "\x1b[33m";
19
+ const dim = "\x1b[2m";
20
+ const bold = "\x1b[1m";
21
+
22
+ const box = `${cyan}===============================================================${reset}`;
23
+
24
+ const msg = `
25
+ ${box}
26
+ ${green}${bold} Thanks for installing nope-click!${reset} ${green}🚀${reset}
27
+ ${box}
28
+
29
+ ${yellow}This project is community-supported.${reset}
30
+ If it saves you time, please consider supporting development:
31
+
32
+ ${green}Boosty (Cards/PayPal):${reset} https://boosty.to/antonvoronezh/donate
33
+ ${green}Crypto (Telegram):${reset} https://t.me/AntonVoronezhh/5
34
+
35
+ ${dim}Tip: hide install messages with --silent (or npm config set loglevel silent).${reset}
36
+ ${dim}Scripts can be disabled with --ignore-scripts (then this won’t run).${reset}
37
+ `;
38
+
39
+ process.stderr.write(msg);
40
+
41
+ process.stderr.write(
42
+ `${bold}Support:${reset} https://boosty.to/antonvoronezh/donate | https://t.me/AntonVoronezhh/5\n`
43
+ );
44
+ } catch (_) {
45
+ process.exit(0);
46
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "real-view",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Occlusion-aware visibility sensor. Combines IntersectionObserver with Raycasting to track real impressions in React, Vue, Svelte, Angular, and Solid.",
5
5
  "author": {
6
6
  "name": "AntonVoronezh",
@@ -19,23 +19,24 @@
19
19
  {
20
20
  "type": "boosty",
21
21
  "url": "https://boosty.to/antonvoronezh/donate"
22
+ },
23
+ {
24
+ "type": "crypto",
25
+ "url": "https://t.me/AntonVoronezhh/5"
22
26
  }
23
27
  ],
24
- "type": "module",
25
- "main": "./dist/index.js",
26
- "module": "./dist/index.mjs",
27
- "types": "./dist/index.d.ts",
28
- "exports": {},
29
28
  "files": [
30
29
  "dist",
31
30
  "README.md",
32
- "LICENSE"
31
+ "LICENSE",
32
+ "banner.js"
33
33
  ],
34
34
  "scripts": {
35
35
  "build": "tsup src/index.ts src/react.ts src/vue.ts src/svelte.ts src/solid.ts src/angular.ts --format cjs,esm --dts --clean",
36
36
  "test": "vitest run",
37
37
  "lint": "tsc --noEmit",
38
- "prepublishOnly": "npm run build"
38
+ "prepublishOnly": "npm run build",
39
+ "postinstall": "node ./banner.js || exit 0"
39
40
  },
40
41
  "keywords": [
41
42
  "visibility",
@@ -55,6 +56,11 @@
55
56
  "viewability"
56
57
  ],
57
58
  "license": "MIT",
59
+ "type": "module",
60
+ "main": "./dist/index.js",
61
+ "module": "./dist/index.mjs",
62
+ "types": "./dist/index.d.ts",
63
+ "exports": {},
58
64
  "peerDependencies": {
59
65
  "react": ">=16.8.0",
60
66
  "vue": ">=3.0.0",
package/license DELETED
@@ -1,9 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) AntonVoronezh <anton.voronezh.1990@gmail.com>
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
-
7
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.