{"_id":"@atharly/web-sdk","name":"@atharly/web-sdk","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@atharly/web-sdk","version":"0.1.1","description":"Atharly Web SDK — silent click-time fingerprint + in-app browser interstitial. KSA-hosted mobile attribution.","type":"module","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts"}},"keywords":["atharly","attribution","deep-linking","fingerprint","mobile-attribution","ksa","saudi-arabia","pdpl"],"homepage":"https://atharly.com/docs","bugs":{"email":"hello@atharly.com"},"author":{"name":"Atharly","email":"hello@atharly.com","url":"https://atharly.com"},"license":"MIT","publishConfig":{"access":"public"},"engines":{"node":">=18"},"sideEffects":false,"scripts":{"build":"vite build","test":"vitest run","lint":"eslint src/","type-check":"tsc --noEmit","prepublishOnly":"npm run type-check && npm run test && npm run build"},"devDependencies":{"@types/node":"^20.12.0","@typescript-eslint/eslint-plugin":"^7.7.0","@typescript-eslint/parser":"^7.7.0","eslint":"^8.57.0","happy-dom":"^14.0.0","javascript-obfuscator":"^5.4.2","typescript":"^5.4.0","vite":"^5.2.0","vite-plugin-dts":"^3.9.0","vite-plugin-javascript-obfuscator":"^3.1.0","vitest":"^1.6.0"},"gitHead":"f2cbfd58867472d0ab66d9a79fc079db18205151","_id":"@atharly/web-sdk@0.1.1","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-EocdM5HARclkjUosthx2MUGEBNsFNagxG0iVt2Hda8ocepQ3v/CFytbey7p/Vs8ng0C20hLqg6MGT2/vCul7Ig==","shasum":"eced3334152a447acf0f078c668bc6bf799392f2","tarball":"https://registry.npmjs.org/@atharly/web-sdk/-/web-sdk-0.1.1.tgz","fileCount":6,"unpackedSize":92171,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFdWuZ0y/Tp7pA0rouHFmq+CPCbEYQCSNiDsPlUVpk39AiBaLgHwma+G6WA3G1Aqpk5gHw8F+S2kKhmHiENnmHof9A=="}]},"_npmUser":{"name":"theblissprogrammer","email":"info@atharly.com"},"directories":{},"maintainers":[{"name":"theblissprogrammer","email":"info@atharly.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/web-sdk_0.1.1_1778422795373_0.975723983365244"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-10T14:19:55.302Z","0.1.1":"2026-05-10T14:19:55.540Z","modified":"2026-05-10T14:19:55.736Z"},"maintainers":[{"name":"theblissprogrammer","email":"info@atharly.com"}],"description":"Atharly Web SDK — silent click-time fingerprint + in-app browser interstitial. KSA-hosted mobile attribution.","homepage":"https://atharly.com/docs","keywords":["atharly","attribution","deep-linking","fingerprint","mobile-attribution","ksa","saudi-arabia","pdpl"],"author":{"name":"Atharly","email":"hello@atharly.com","url":"https://atharly.com"},"bugs":{"email":"hello@atharly.com"},"license":"MIT","readme":"# @atharly/web-sdk\n\nThe Atharly Web SDK — TypeScript NPM package for silent click-time\nfingerprinting and an in-app browser interstitial flow. Powers the\nweb-side of the [Atharly](https://atharly.com) KSA-hosted attribution\nplatform. Ships as ESM, CJS, and UMD bundles with full TypeScript\ndeclarations and zero runtime dependencies.\n\n## Install\n\n```sh\nnpm install @atharly/web-sdk\n```\n\nOr via CDN (UMD bundle):\n\n```html\n<script src=\"https://cdn.atharly.com/web-sdk@0.1.0/index.umd.js\"></script>\n<script>\n  window.atharly.init({ apiKey: \"at_pk_<tenant>_<key>_<secret>\" });\n</script>\n```\n\n## Usage\n\n```ts\nimport { atharly } from \"@atharly/web-sdk\";\n\natharly.init({\n  apiKey: \"at_pk_<tenant>_<key>_<secret>\",\n  // Optional — defaults to https://ingest.atharly.com.\n  // Override for local dev or non-prod environments.\n  apiUrl: \"https://ingest.atharly.com\",\n});\n\n// On a CTA click that points at a smart link:\nawait atharly.captureClick(\"click_abc123\");\n\n// On the in-app-browser interstitial landing page (e.g. when a link\n// opens inside Instagram / TikTok webview):\natharly.detectAndRenderInterstitial();\n```\n\n## What it does\n\n1. **Click-time fingerprint** — collects a stable browser\n   fingerprint (audio, canvas, WebGL caps, fonts, codecs, CPU/GPU\n   bench) and POSTs it to `/v1/click/signals` so the server-side\n   matcher can wire the eventual install back to this click.\n2. **In-app browser interstitial** — when a link opens inside a\n   webview that won't honour Universal Links / App Links (Instagram,\n   TikTok, Snapchat), the SDK shows an \"Open in Safari/Chrome\" page\n   that breaks out to the device's real browser, where the OS can\n   hand off to the native app.\n\n## Layout\n\n- `src/index.ts` — public surface (`atharly.init`, `.captureClick`,\n  `.detectAndRenderInterstitial`).\n- `src/core/` — fingerprint collectors, interstitial renderer,\n  transport.\n- `tests/` — vitest suite.\n- `vite.config.ts` — multi-format library build.\n\n## Development\n\n```sh\nnpm install\nnpm run build        # → dist/index.js, dist/index.mjs, dist/index.d.ts (+ UMD)\nnpm test             # vitest\nnpm run type-check   # tsc --noEmit (strict mode)\nnpm run lint         # ESLint\nnpm pack             # dry-run; inspect the tarball before publishing\n```\n\n`prepublishOnly` runs type-check + test + build automatically before\n`npm publish` so a broken build can't ship.\n\n## Publishing\n\n```sh\nnpm login                 # only the first time\nnpm publish --access public\n```\n\n`publishConfig.access = \"public\"` is set in package.json so the\nscoped `@atharly` package goes out as public. First publish:\n\n```sh\nnpm pack && tar -tf atharly-web-sdk-0.1.0.tgz   # confirm contents\nnpm publish\n```\n\nBump version with `npm version patch | minor | major` before the\nnext publish — npm refuses to overwrite an existing version.\n\n## Status\n\nEarly. The CPU bench runs synchronously on the main thread for\n~50 ms; profile against a real low-end Android device before\nrelying on the spec's entropy figure for a launch decision. The\nCDN distribution path (`cdn.atharly.com/web-sdk@<version>.umd.js`)\nis wired in production for current customers; the npm registry\npublish above is the new general-availability channel.\n\n## License\n\nMIT. See `LICENSE`.\n","readmeFilename":"README.md","_rev":"1-115e6fab9a8c11b8818ff0b01d3b585b"}