{"_id":"@botfather/units-dom-snapshot","name":"@botfather/units-dom-snapshot","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@botfather/units-dom-snapshot","version":"0.1.0","description":"DOM snapshot extraction utilities for Units UI compression pipelines.","license":"MIT","type":"module","repository":{"type":"git","url":"git+https://github.com/Botfather/units.git","directory":"packages/units-dom-snapshot"},"homepage":"https://github.com/Botfather/units/tree/main/packages/units-dom-snapshot","bugs":{"url":"https://github.com/Botfather/units/issues"},"main":"./index.js","types":"./index.d.ts","publishConfig":{"access":"public"},"_id":"@botfather/units-dom-snapshot@0.1.0","_integrity":"sha512-diC7gBdqMZfdMuUGAzo9rb9fzYTEbc9qdErobyps4vannmm8SAfOXeYZUAisqzMtUki0sdyDsDoPhkhoeeM4HA==","_resolved":"/tmp/f0967a7986680178aa644d8984c12b28/botfather-units-dom-snapshot-0.1.0.tgz","_from":"file:botfather-units-dom-snapshot-0.1.0.tgz","_nodeVersion":"22.14.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-diC7gBdqMZfdMuUGAzo9rb9fzYTEbc9qdErobyps4vannmm8SAfOXeYZUAisqzMtUki0sdyDsDoPhkhoeeM4HA==","shasum":"4e06265ab0185347bc615ba8dbd0c354098037ce","tarball":"https://registry.npmjs.org/@botfather/units-dom-snapshot/-/units-dom-snapshot-0.1.0.tgz","fileCount":5,"unpackedSize":19258,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@botfather%2funits-dom-snapshot@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCKz0LZGizcJE9rLGoT5Mi7dpL921A5GivJ4VB/gRje0AIgSOihTH6eapvrbiGdz4dVUrzCAl0N4PBiND428gIN3gQ="}]},"_npmUser":{"name":"botfather","email":"mohan.tushar.11@gmail.com"},"directories":{},"maintainers":[{"name":"botfather","email":"mohan.tushar.11@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/units-dom-snapshot_0.1.0_1782196782277_0.8963105949379451"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-23T06:39:42.074Z","0.1.0":"2026-06-23T06:39:42.456Z","modified":"2026-06-23T06:39:42.978Z"},"maintainers":[{"name":"botfather","email":"mohan.tushar.11@gmail.com"}],"description":"DOM snapshot extraction utilities for Units UI compression pipelines.","homepage":"https://github.com/Botfather/units/tree/main/packages/units-dom-snapshot","repository":{"type":"git","url":"git+https://github.com/Botfather/units.git","directory":"packages/units-dom-snapshot"},"bugs":{"url":"https://github.com/Botfather/units/issues"},"license":"MIT","readme":"# @botfather/units-dom-snapshot\n\nDOM snapshot extraction utilities for arbitrary web pages.\n\n## What this package provides\n\n- `snapshotUi()` for browser contexts (`window` + `document`).\n- `snapshotUiFromRoot(root, options)` for direct root extraction and testing.\n- `captureSnapshotWithPlaywright(options)` for Node-side page capture via Playwright.\n\nSnapshots are neutral `UiNode` trees intended to feed Units transform pipelines and agent middleware.\n\n## Browser usage\n\n```js\nimport { snapshotUi } from \"@botfather/units-dom-snapshot\";\n\nconst uiTree = snapshotUi({\n  rootSelector: \"body\",\n  maxDepth: 40,\n  pruneInvisible: true,\n  pruneOffscreen: true,\n});\n```\n\n## Playwright usage\n\n```js\nimport { captureSnapshotWithPlaywright } from \"@botfather/units-dom-snapshot\";\n\nconst { snapshot } = await captureSnapshotWithPlaywright({\n  url: \"https://example.com\",\n  browserType: \"chromium\",\n  rootSelector: \"body\",\n  snapshotOptions: {\n    pruneInvisible: true,\n    pruneOffscreen: true,\n  },\n});\n```\n\nIf Playwright is not installed, `captureSnapshotWithPlaywright` throws an actionable error.\n","readmeFilename":"README.md","_rev":"1-04700be7ca1c852e566d2aad6400af88"}