{"_id":"@anjunar/scalajs-ui-viewport","_rev":"6-d31f2e58684590af6776cc541462aee4","name":"@anjunar/scalajs-ui-viewport","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@anjunar/scalajs-ui-viewport","version":"1.0.0","author":{"name":"Patrick Bittner"},"license":"MIT","_id":"@anjunar/scalajs-ui-viewport@1.0.0","maintainers":[{"name":"anjunar","email":"anjunar@gmx.de"}],"homepage":"https://github.com/anjunar/scalajs-ui#readme","bugs":{"url":"https://github.com/anjunar/scalajs-ui/issues"},"dist":{"shasum":"802601bdd24702ce48bab623026e5c3855e26373","tarball":"https://registry.npmjs.org/@anjunar/scalajs-ui-viewport/-/scalajs-ui-viewport-1.0.0.tgz","fileCount":26,"integrity":"sha512-lE7DJ+bhi1np8nD8Zj2E1RnmbIS7piNPlFeJXQAuJbIqus4/vvrsUAfD/nTH5B2peRSE3gr736JdY0O+WJK0dg==","signatures":[{"sig":"MEUCIQDp/7+j98/m7Z6F81ikQfZfFF6SODCGa/KbNlqPsRRLDgIgUkXP5y6AU6faXXocq7vyqjQ7VCoo1bST45A/N6ng+qM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21908},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"a9312d1aa728764c037b016ba66b703e003d6d50","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","verify":"npm run typecheck && npm run test && npm run test:consumer","prepack":"npm run build","typecheck":"npm run build && tsc -p tsconfig.test.json","test:watch":"vitest","test:consumer":"vitest run --config vitest.consumer.config.ts"},"_npmUser":{"name":"anjunar","email":"anjunar@gmx.de"},"repository":{"url":"git+https://github.com/anjunar/scalajs-ui.git","type":"git","directory":"npm/scalajs-ui-viewport"},"_npmVersion":"11.17.0","description":"The TypeScript viewport API of UI 3: windows, anchor-following overlays, and self-dismissing notifications, projected onto the ui.viewport components that run in the Scala.js runtime published as @anjunar/scalajs-ui-bridge.","directories":{},"sideEffects":false,"_nodeVersion":"26.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^30.0.1","vitest":"^3.2.7","typescript":"^5.6.0","@types/node":"^22.0.0","@anjunar/scalajs-ui":"*","@anjunar/scalajs-ui-core":"*","@anjunar/scalajs-ui-bridge":"*"},"peerDependencies":{"@anjunar/scalajs-ui":"^1.0.0","@anjunar/scalajs-ui-core":"^1.0.0","@anjunar/scalajs-ui-bridge":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/scalajs-ui-viewport_1.0.0_1789143249026_0.5841528014816351","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@anjunar/scalajs-ui-viewport","version":"1.0.2","author":{"name":"Patrick Bittner"},"license":"MIT","_id":"@anjunar/scalajs-ui-viewport@1.0.2","maintainers":[{"name":"anjunar","email":"anjunar@gmx.de"}],"homepage":"https://github.com/anjunar/scalajs-ui#readme","bugs":{"url":"https://github.com/anjunar/scalajs-ui/issues"},"dist":{"shasum":"2d710dbed87431bd962a296f3f67004734a42281","tarball":"https://registry.npmjs.org/@anjunar/scalajs-ui-viewport/-/scalajs-ui-viewport-1.0.2.tgz","fileCount":26,"integrity":"sha512-VrTaXgw5IXrTyWzQyFM2WzdLrvk9loJ3bcf0Ixcq3zKwpx3b7FfQua+XYJSzJgTouhICl6+TRXXOanwVwr6X5A==","signatures":[{"sig":"MEQCIHLbo0OH2erX8tj6OUH8PuSo/qXR+wiZnIuCCF1i85y7AiBxsmi0esmKRkc1+KQ00TUs3efjL3DXFta2ZzykaTug2w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22148},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"192dd9f15ce1652b461173756defb0046fbd9ac4","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","verify":"npm run typecheck && npm run test && npm run test:consumer","prepack":"npm run build","typecheck":"npm run build && tsc -p tsconfig.test.json","test:watch":"vitest","test:consumer":"vitest run --config vitest.consumer.config.ts"},"_npmUser":{"name":"anjunar","email":"anjunar@gmx.de"},"repository":{"url":"git+https://github.com/anjunar/scalajs-ui.git","type":"git","directory":"npm/scalajs-ui-viewport"},"_npmVersion":"11.17.0","description":"The TypeScript viewport API of Scala JS UI 1.0: windows, anchor-following overlays, and self-dismissing notifications, projected onto the ui.viewport components that run in the Scala.js runtime published as @anjunar/scalajs-ui-bridge.","directories":{},"sideEffects":false,"_nodeVersion":"26.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^30.0.1","vitest":"^3.2.7","typescript":"^5.6.0","@types/node":"^22.0.0","@anjunar/scalajs-ui":"*","@anjunar/scalajs-ui-core":"*","@anjunar/scalajs-ui-bridge":"*"},"peerDependencies":{"@anjunar/scalajs-ui":"^1.0.2","@anjunar/scalajs-ui-core":"^1.0.2","@anjunar/scalajs-ui-bridge":"^1.0.2"},"_npmOperationalInternal":{"tmp":"tmp/scalajs-ui-viewport_1.0.2_1789506030629_0.00931823683830535","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@anjunar/scalajs-ui-viewport","version":"1.0.3","author":{"name":"Patrick Bittner"},"license":"MIT","_id":"@anjunar/scalajs-ui-viewport@1.0.3","maintainers":[{"name":"anjunar","email":"anjunar@gmx.de"}],"homepage":"https://github.com/anjunar/scalajs-ui#readme","bugs":{"url":"https://github.com/anjunar/scalajs-ui/issues"},"dist":{"shasum":"486ececc88fdd7f79ea6f8e3ede449effe1b206d","tarball":"https://registry.npmjs.org/@anjunar/scalajs-ui-viewport/-/scalajs-ui-viewport-1.0.3.tgz","fileCount":26,"integrity":"sha512-NQ5jtxfO9CaZaHtz4YsPyX4z6UDe3ukBJAI7Y43N29c1sic0lizGfjINIYlHCk/OgWlUV3R9N7DWcWlKNcwG0A==","signatures":[{"sig":"MEUCIQDuBQxA4ryQqVOBYEAcD1KOkCMBjdx4TZ9XPOQ1QXgg5AIgYLeG1zsGcHpkeezPDqYQHwelJ3unmTNlNLYfItIuxHk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22148},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"81e89fc0d354046d9c9d548e5e1932d7baba0505","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","verify":"npm run typecheck && npm run test && npm run test:consumer","prepack":"npm run build","typecheck":"npm run build && tsc -p tsconfig.test.json","test:watch":"vitest","test:consumer":"vitest run --config vitest.consumer.config.ts"},"_npmUser":{"name":"anjunar","email":"anjunar@gmx.de"},"repository":{"url":"git+https://github.com/anjunar/scalajs-ui.git","type":"git","directory":"npm/scalajs-ui-viewport"},"_npmVersion":"11.17.0","description":"The TypeScript viewport API of Scala JS UI 1.0: windows, anchor-following overlays, and self-dismissing notifications, projected onto the ui.viewport components that run in the Scala.js runtime published as @anjunar/scalajs-ui-bridge.","directories":{},"sideEffects":false,"_nodeVersion":"26.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^30.0.1","vitest":"^3.2.7","typescript":"^5.6.0","@types/node":"^22.0.0","@anjunar/scalajs-ui":"*","@anjunar/scalajs-ui-core":"*","@anjunar/scalajs-ui-bridge":"*"},"peerDependencies":{"@anjunar/scalajs-ui":"^1.0.3","@anjunar/scalajs-ui-core":"^1.0.3","@anjunar/scalajs-ui-bridge":"^1.0.3"},"_npmOperationalInternal":{"tmp":"tmp/scalajs-ui-viewport_1.0.3_1789552904436_0.21930666514275154","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@anjunar/scalajs-ui-viewport","version":"1.0.5","author":{"name":"Patrick Bittner"},"license":"MIT","_id":"@anjunar/scalajs-ui-viewport@1.0.5","maintainers":[{"name":"anjunar","email":"anjunar@gmx.de"}],"homepage":"https://github.com/anjunar/scalajs-ui#readme","bugs":{"url":"https://github.com/anjunar/scalajs-ui/issues"},"dist":{"shasum":"5cfaf30ebd9a4f83c0e9925c324c738cc5ccdda3","tarball":"https://registry.npmjs.org/@anjunar/scalajs-ui-viewport/-/scalajs-ui-viewport-1.0.5.tgz","fileCount":26,"integrity":"sha512-yq7xKEFCAH82ABNzeK9VnronxUove/VK6QjHcRl6MfxdcJ3sqovojffwnCTwYlXawaNFYZb7hpDU+AqbDTnKZA==","signatures":[{"sig":"MEQCIA2t+7KRgtV035dKr+R3o4Zd7yLOFMv/L9oDZ2+EQp6bAiBFkjciM2MBaOw024ymhLAmemzEJYFiK1ZXbQtufX8plQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQC+hIOcdkIr+cq+RSuSAXM9X2tNKTA4HjmovTQnfZf3ewIhAIuMSgrWKCeSCnYneWIp8QUOF4PW89HBa8YCGobiJA/W","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22149},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"13988ebfcf64a17c3b7777ef28c3e55e6d48ddca","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","verify":"npm run typecheck && npm run test && npm run test:consumer","prepack":"npm run build","typecheck":"npm run build && tsc -p tsconfig.test.json","test:watch":"vitest","test:consumer":"vitest run --config vitest.consumer.config.ts"},"_npmUser":{"name":"anjunar","email":"anjunar@gmx.de"},"repository":{"url":"git+https://github.com/anjunar/scalajs-ui.git","type":"git","directory":"npm/scalajs-ui-viewport"},"_npmVersion":"11.17.0","description":"The TypeScript viewport API of Scala JS UI 1.0: windows, anchor-following overlays, and self-dismissing notifications, projected onto the ui.viewport components that run in the Scala.js runtime published as @anjunar/scalajs-ui-bridge.","directories":{},"sideEffects":false,"_nodeVersion":"26.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^30.0.1","vitest":"^3.2.7","typescript":"^5.6.0","@types/node":"^22.0.0","@anjunar/scalajs-ui":"*","@anjunar/scalajs-ui-core":"*","@anjunar/scalajs-ui-bridge":"*"},"peerDependencies":{"@anjunar/scalajs-ui":"^1.0.5","@anjunar/scalajs-ui-core":"^1.0.5","@anjunar/scalajs-ui-bridge":"^1.0.5"},"_npmOperationalInternal":{"tmp":"tmp/scalajs-ui-viewport_1.0.5_1789736145280_0.20246289746328539","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@anjunar/scalajs-ui-viewport","version":"1.0.6","author":{"name":"Patrick Bittner"},"license":"MIT","_id":"@anjunar/scalajs-ui-viewport@1.0.6","maintainers":[{"name":"anjunar","email":"anjunar@gmx.de"}],"homepage":"https://github.com/anjunar/scalajs-ui#readme","bugs":{"url":"https://github.com/anjunar/scalajs-ui/issues"},"dist":{"shasum":"d4a61c1b830f3686136b682200a676aadcb90b30","tarball":"https://registry.npmjs.org/@anjunar/scalajs-ui-viewport/-/scalajs-ui-viewport-1.0.6.tgz","fileCount":26,"integrity":"sha512-uqsD9vtc5rv4E244UtKDeifauHBXCXb+Zo6EAp2EiIxhY7dQJMlCdEB16mU4JoGRqozgq3y4pFFdKMw8sru2TA==","signatures":[{"sig":"MEUCIQD+aaS8FtB8YdYw+bxdu36t6Kd69yNEGEOYCBmzOXAwGgIgGRLHRh4Du9cYkod41hirtWt6iRaqMgufIPmq9TPUEdY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCNQJuLkLsthpdKfpoyU1/tybAkaMBwQ2SqpfRCAGEvaAIgBmHKREgAjP01QYEXT9SAFPc2S0w9Tz9UQpBFdBc3xbU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22149},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"b5f4e2ac72fff6d18aff21420f18a811c54578e0","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","verify":"npm run typecheck && npm run test && npm run test:consumer","prepack":"npm run build","typecheck":"npm run build && tsc -p tsconfig.test.json","test:watch":"vitest","test:consumer":"vitest run --config vitest.consumer.config.ts"},"_npmUser":{"name":"anjunar","email":"anjunar@gmx.de"},"repository":{"url":"git+https://github.com/anjunar/scalajs-ui.git","type":"git","directory":"npm/scalajs-ui-viewport"},"_npmVersion":"11.17.0","description":"The TypeScript viewport API of Scala JS UI 1.0: windows, anchor-following overlays, and self-dismissing notifications, projected onto the ui.viewport components that run in the Scala.js runtime published as @anjunar/scalajs-ui-bridge.","directories":{},"sideEffects":false,"_nodeVersion":"26.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^30.0.1","vitest":"^3.2.7","typescript":"^5.6.0","@types/node":"^22.0.0","@anjunar/scalajs-ui":"*","@anjunar/scalajs-ui-core":"*","@anjunar/scalajs-ui-bridge":"*"},"peerDependencies":{"@anjunar/scalajs-ui":"^1.0.6","@anjunar/scalajs-ui-core":"^1.0.6","@anjunar/scalajs-ui-bridge":"^1.0.6"},"_npmOperationalInternal":{"tmp":"tmp/scalajs-ui-viewport_1.0.6_1789958595660_0.5332895962890898","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"_id":"@anjunar/scalajs-ui-viewport@1.1.0","bugs":{"url":"https://github.com/anjunar/scalajs-ui/issues"},"dist":{"shasum":"27ba8f3ec3fc78b1632276bfd9df315a258b5ee4","tarball":"https://registry.npmjs.org/@anjunar/scalajs-ui-viewport/-/scalajs-ui-viewport-1.1.0.tgz","fileCount":26,"integrity":"sha512-vheKd+Ks8EPKV62elEK4SZ3rsNWSTgacI/uPsF4P5uxAJZYZT3pcdNAs95FeEfPgEAEoHLwtq3DCITq/ZO2Rug==","signatures":[{"sig":"MEQCIFhnAXX4V7ZBg4s6aphECj3edCWpsDmVSk1XCE9JaxtHAiA7QARLmqlJ5P+a3RdE9sbLMGQGV9mdbXAWLy6qQFa+iA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD+y49hn1xVIlSfYslGfafwLB4r0b5r9gjWs5MT4xqziwIhANgXmELeZ+JlfqoMk31Xw2M+VqA0n54120j2pKTw+Siz"}],"unpackedSize":22427},"main":"./dist/index.js","name":"@anjunar/scalajs-ui-viewport","type":"module","types":"./dist/index.d.ts","author":{"name":"Patrick Bittner"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"a054cd17cb7cb398f4be3461b25c2a5df009a442","license":"MIT","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","verify":"npm run typecheck && npm run test && npm run test:consumer","prepack":"npm run build","typecheck":"npm run build && tsc -p tsconfig.test.json","test:watch":"vitest","test:consumer":"vitest run --config vitest.consumer.config.ts"},"version":"1.1.0","_npmUser":{"name":"anjunar","email":"anjunar@gmx.de"},"homepage":"https://github.com/anjunar/scalajs-ui#readme","repository":{"url":"git+https://github.com/anjunar/scalajs-ui.git","type":"git","directory":"npm/scalajs-ui-viewport"},"_npmVersion":"11.17.0","description":"The TypeScript viewport API of Scala JS UI 1.0: windows, anchor-following overlays, and self-dismissing notifications, projected onto the ui.viewport components that run in the Scala.js runtime published as @anjunar/scalajs-ui-bridge.","directories":{},"maintainers":[{"name":"anjunar","email":"anjunar@gmx.de"}],"sideEffects":false,"_nodeVersion":"26.4.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jsdom":"^30.0.1","vitest":"^3.2.7","typescript":"^5.6.0","@types/node":"^22.0.0","@anjunar/scalajs-ui":"*","@anjunar/scalajs-ui-core":"*","@anjunar/scalajs-ui-bridge":"*"},"peerDependencies":{"@anjunar/scalajs-ui":"^1.1.0","@anjunar/scalajs-ui-core":"^1.1.0","@anjunar/scalajs-ui-bridge":"^1.1.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/scalajs-ui-viewport_1.1.0_1790707613380_0.8312716678300152"}}},"time":{"created":"2026-09-11T16:14:08.858Z","modified":"2026-09-29T18:46:53.620Z","1.0.0":"2026-09-11T16:14:09.137Z","1.0.2":"2026-09-15T21:00:30.767Z","1.0.3":"2026-09-16T10:01:44.572Z","1.0.5":"2026-09-18T12:55:45.360Z","1.0.6":"2026-09-21T02:43:15.741Z","1.1.0":"2026-09-29T18:46:53.475Z"},"bugs":{"url":"https://github.com/anjunar/scalajs-ui/issues"},"author":{"name":"Patrick Bittner"},"license":"MIT","homepage":"https://github.com/anjunar/scalajs-ui#readme","repository":{"url":"git+https://github.com/anjunar/scalajs-ui.git","type":"git","directory":"npm/scalajs-ui-viewport"},"description":"The TypeScript viewport API of Scala JS UI 1.0: windows, anchor-following overlays, and self-dismissing notifications, projected onto the ui.viewport components that run in the Scala.js runtime published as @anjunar/scalajs-ui-bridge.","maintainers":[{"name":"anjunar","email":"anjunar@gmx.de"}],"readme":"# @anjunar/scalajs-ui-viewport\n\nTypeScript access to the Scala JS UI 1.0 viewport layer: movable windows, anchor-following overlays, and self-dismissing notifications.\n\n## Overview\n\nThe package supplies typed wrappers over `ui.viewport`. Positioning, dragging, z-order, timers, and lifecycle behavior run in the Scala.js runtime linked by `@anjunar/scalajs-ui-bridge`.\n\n## Installation\n\n```bash\nnpm install @anjunar/scalajs-ui-core @anjunar/scalajs-ui-viewport @anjunar/scalajs-ui-bridge @anjunar/scalajs-ui\n```\n\nUsing only `@anjunar/scalajs-ui-viewport` (no router/controls/forms/editor)? Import `@anjunar/scalajs-ui-bridge/viewport` instead of the bare package to skip installing the other features -- see that package's README.\n\n## Quick start\n\n```ts\nimport { button, div, onClick, text, when, property } from \"@anjunar/scalajs-ui-core\";\nimport { floatingWindow, notify, viewport } from \"@anjunar/scalajs-ui-viewport\";\n\nconst open = property(false);\n\nviewport(() => {\n  button(\"Open\", {}, () => onClick(() => open.set(true)));\n  button(\"Notify\", {}, () => onClick(() => notify(\"Saved\", { kind: \"success\" })));\n  when(open, () => floatingWindow({\n    title: \"Details\",\n    widthPx: 400,\n    heightPx: 260,\n    onClose: () => open.set(false),\n  }, () => div(() => text(\"Window content\"))));\n});\n```\n\n`floatingWindow`, `overlay`, and `notify` require a nearest `viewport()` ancestor. An overlay follows the nearest DOM anchor in the component tree and is suitable for menus and dropdowns.\n\n## SSR and hydration\n\nServer output can include window and notification content. Dragging, timers, and geometry-based overlay positioning require hydration. Keep essential content in the normal page tree if it must remain useful without JavaScript.\n\n## API overview\n\n- `viewport(body)` — establishes the ambient viewport.\n- `floatingWindow(options, body)` — mounts a window while it remains in the tree.\n- `overlay(options, body)` — mounts an anchored overlay.\n- `notify(message, options?)` — creates a notification with `info`, `success`, `warning`, or `error` kind.\n- `WindowOptions`, `OverlayOptions`, `NotificationOptions` — typed option objects.\n\n## Related modules\n\n- [`@anjunar/scalajs-ui-core`](../scalajs-ui-core/README.md) provides state and composition.\n- [`@anjunar/scalajs-ui-router`](../scalajs-ui-router/README.md) commonly runs inside a viewport.\n- [`@anjunar/scalajs-ui-forms`](../scalajs-ui-forms/README.md) uses viewport overlays for combo boxes and dialogs.\n","readmeFilename":"README.md"}