New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@virtuoso.dev/message-list

Package Overview
Dependencies
Maintainers
0
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@virtuoso.dev/message-list - npm Package Compare versions

Comparing version 1.9.9 to 1.9.10

412

CHANGELOG.md

@@ -1,411 +0,11 @@

## [1.9.9](https://github.com/virtuoso-dev/message-list/compare/v1.9.8...v1.9.9) (2024-11-21)
# Change Log - @virtuoso.dev/message-list
This log was last generated on Fri, 10 Jan 2025 08:23:07 GMT and should not be manually modified.
### Bug Fixes
## 1.9.10
Fri, 10 Jan 2025 08:23:07 GMT
* revert minScrollTop readjustment ([945194f](https://github.com/virtuoso-dev/message-list/commit/945194f8a899a90cbfe82355cfadb84250433dbf))
### Patches
## [1.9.8](https://github.com/virtuoso-dev/message-list/compare/v1.9.7...v1.9.8) (2024-11-12)
- Remove bogus build option
### Bug Fixes
* correct is at bottom detection for gemini style scroll ([f1a55b1](https://github.com/virtuoso-dev/message-list/commit/f1a55b12c82a0177656ae8ccbdb5ee4964ec5197))
## [1.9.7](https://github.com/virtuoso-dev/message-list/compare/v1.9.6...v1.9.7) (2024-11-09)
### Bug Fixes
* enable react 19 ([1652d70](https://github.com/virtuoso-dev/message-list/commit/1652d70d47ec92c6ef1b9c64806a6083122e3560))
## [1.9.6](https://github.com/virtuoso-dev/message-list/compare/v1.9.5...v1.9.6) (2024-11-09)
### Bug Fixes
* restore gemini use case regression ([ae6d32e](https://github.com/virtuoso-dev/message-list/commit/ae6d32e0f5da3357eab59880ea642bca0b38af26))
## [1.9.5](https://github.com/virtuoso-dev/message-list/compare/v1.9.4...v1.9.5) (2024-11-08)
### Bug Fixes
* experimental fix for mobile safari ([7cd5353](https://github.com/virtuoso-dev/message-list/commit/7cd535363ab8e167d035b0bd87483294e889c407))
* limit the currently rendered items ([80bcbed](https://github.com/virtuoso-dev/message-list/commit/80bcbed6e80f4daa62c2ca72b2958ec32b81a90f))
## [1.9.4](https://github.com/virtuoso-dev/message-list/compare/v1.9.3...v1.9.4) (2024-11-07)
### Bug Fixes
* scroll to bottom for bottom-smooth ([0f4e4f2](https://github.com/virtuoso-dev/message-list/commit/0f4e4f27689b48ec4d140f08b7e6a1c2b610aaff))
## [1.9.3](https://github.com/virtuoso-dev/message-list/compare/v1.9.2...v1.9.3) (2024-10-30)
### Bug Fixes
* allow .local domain for dev ([c6e7fd8](https://github.com/virtuoso-dev/message-list/commit/c6e7fd8deef9d50339d12eee7256a86901848d84))
## [1.9.2](https://github.com/virtuoso-dev/message-list/compare/v1.9.1...v1.9.2) (2024-10-16)
### Bug Fixes
* handle upwards scroll through longer items ([518854a](https://github.com/virtuoso-dev/message-list/commit/518854a8ac4074dd4a918e4b74ee05414855515d))
## [1.9.1](https://github.com/virtuoso-dev/message-list/compare/v1.9.0...v1.9.1) (2024-08-14)
### Bug Fixes
* data map autoscroll gets canceled if scrolling upwards ([382b465](https://github.com/virtuoso-dev/message-list/commit/382b4655368e4544452c33e84701ae3082d54e4b))
# [1.9.0](https://github.com/virtuoso-dev/message-list/compare/v1.8.6...v1.9.0) (2024-08-13)
### Features
* utilities for ChatGPT style scrolling ([5a77bea](https://github.com/virtuoso-dev/message-list/commit/5a77beac45231639a1bc41db7d99263acf5bd7df))
## [1.8.6](https://github.com/virtuoso-dev/message-list/compare/v1.8.5...v1.8.6) (2024-08-12)
### Bug Fixes
* allow suppression of item measurement ([cf29a5e](https://github.com/virtuoso-dev/message-list/commit/cf29a5e7aecd51e6da1286b72de6f59b82530397))
## [1.8.5](https://github.com/virtuoso-dev/message-list/compare/v1.8.4...v1.8.5) (2024-08-10)
### Bug Fixes
* various tweaks and improvements ([5fdde8c](https://github.com/virtuoso-dev/message-list/commit/5fdde8cf36c150b9d16937fe86fee7dff4b6cb98))
## [1.8.4](https://github.com/virtuoso-dev/message-list/compare/v1.8.3...v1.8.4) (2024-08-08)
### Bug Fixes
* check if message is present ([8d7c2e7](https://github.com/virtuoso-dev/message-list/commit/8d7c2e79f97400ca359816014619677fe15177f5))
## [1.8.3](https://github.com/virtuoso-dev/message-list/compare/v1.8.2...v1.8.3) (2024-07-17)
### Bug Fixes
* data replace race condition ([04f2e5f](https://github.com/virtuoso-dev/message-list/commit/04f2e5f6bbcb8d0433c681b23eb53570b14a4557))
## [1.8.2](https://github.com/virtuoso-dev/message-list/compare/v1.8.1...v1.8.2) (2024-07-09)
### Bug Fixes
* precise completion of smooth scroll ([7694d8d](https://github.com/virtuoso-dev/message-list/commit/7694d8df35ad85bb54d703b8cad76e215c7b8cd5))
## [1.8.1](https://github.com/virtuoso-dev/message-list/compare/v1.8.0...v1.8.1) (2024-07-08)
### Bug Fixes
* scroll to item accepts custom scroll ([64da416](https://github.com/virtuoso-dev/message-list/commit/64da41655087c026eba66ca3d37837c57a0e0756))
# [1.8.0](https://github.com/virtuoso-dev/message-list/compare/v1.7.1...v1.8.0) (2024-07-07)
### Bug Fixes
* another take on animation ([318dfdc](https://github.com/virtuoso-dev/message-list/commit/318dfdc91ee3eedba98491e61f1fe0be95b861ba))
* avoid extra cancellation of scroll ([bcd478b](https://github.com/virtuoso-dev/message-list/commit/bcd478b4f34e5c672b6061a7c0e27598afa2eecf))
* console ([9294649](https://github.com/virtuoso-dev/message-list/commit/92946490c4bcdaa603a1e199d83b2154cd40c7c2))
* don't remount on data replace ([82e8c84](https://github.com/virtuoso-dev/message-list/commit/82e8c848be81d00b59529380e4ec69050adeb050))
* don't remount on data replace ([2af4e19](https://github.com/virtuoso-dev/message-list/commit/2af4e19c64c663db072a322753b29df65534ee1a))
* don't test for none ([e1a8a48](https://github.com/virtuoso-dev/message-list/commit/e1a8a486a927524eda0dccbf6249a6876c5ef3bc))
* extend timeout for livescroll ([ed13009](https://github.com/virtuoso-dev/message-list/commit/ed1300973625dd44c733fdcf0ac2381e551784f0))
* fix edge case of data replace ([2909623](https://github.com/virtuoso-dev/message-list/commit/2909623b0a1373b533f6b537d7f27f51e5af2435))
* improve catchup ([bfd1675](https://github.com/virtuoso-dev/message-list/commit/bfd1675be3aa72f4f6ceede7fd0ea959510deed6))
* improved atBottom flag logic ([9a36cd2](https://github.com/virtuoso-dev/message-list/commit/9a36cd29db1f33f8dfeda007039364646c29e670))
* increase debounce time ([07a52a6](https://github.com/virtuoso-dev/message-list/commit/07a52a6876062e3f94e763d78e749a57d2b9c410))
* instant scroll cancels smooth scroll ([2d55f43](https://github.com/virtuoso-dev/message-list/commit/2d55f438cb046645b79898d7dc391586ce971ad8))
* lint ([ecb15e6](https://github.com/virtuoso-dev/message-list/commit/ecb15e66089e0cbcb01e6c79dfcccd9759360946))
* more reliable autoscroll ([950dcc8](https://github.com/virtuoso-dev/message-list/commit/950dcc8a19bc610679a4ff9bc703aa4a8d474307))
* prepending works with uneven items, works on iPad ([2be5a70](https://github.com/virtuoso-dev/message-list/commit/2be5a709b1f331eb213c24bc84e5ad1bfcf9676b))
* relax react ([c492898](https://github.com/virtuoso-dev/message-list/commit/c49289800758475c2c196aaff44ac70192573b37))
* stabilize batch autoscroll ([5e82418](https://github.com/virtuoso-dev/message-list/commit/5e82418a8934126cd844f1e60b61c1145b000c11))
* strict mode ([521c9ba](https://github.com/virtuoso-dev/message-list/commit/521c9baef8b7d1d92953f6952d5e212eddad4696))
* switch to peer deps for react ([f992b02](https://github.com/virtuoso-dev/message-list/commit/f992b024368980e3db3fb3b6974e7e2e8a9e8c74))
* switch to peer deps for react ([4fcb5f3](https://github.com/virtuoso-dev/message-list/commit/4fcb5f3ed5205fff6d4e35cac89bf0d22cbbe8bb))
* testing something ([2f62e4f](https://github.com/virtuoso-dev/message-list/commit/2f62e4f1bba26f9bdfd5194819e5a10e4cc15e97))
* update dimensions when toggling footers ([1ce326c](https://github.com/virtuoso-dev/message-list/commit/1ce326c13dcc82bcdea852e0cc6c561ec923f725))
* use mousewheel for cancellation ([3f6fb62](https://github.com/virtuoso-dev/message-list/commit/3f6fb629155053cad649332acfd45bfac7342806))
### Features
* additional data manipulation methods ([88ebe5a](https://github.com/virtuoso-dev/message-list/commit/88ebe5a38507ef5b7ba6ee274b9685cee88fe257))
* control the smooth scroll ([74e6a9d](https://github.com/virtuoso-dev/message-list/commit/74e6a9d8c3c867cae5439731ead8b09dc774c53a))
* improve data.replace, optional purge parameter ([f73e083](https://github.com/virtuoso-dev/message-list/commit/f73e083cf61ac585bf207003e0bfd621fdcd7231))
* perf optimizations, custom scroll ([bc506cb](https://github.com/virtuoso-dev/message-list/commit/bc506cbd9678d6a378e916ab0fd612a84ffa0d5c))
* scroll into view ([4a52d62](https://github.com/virtuoso-dev/message-list/commit/4a52d62b075ad2cb3e41cdbd4f9354f016aebba3))
* support align start-no-overflow ([6d29d9b](https://github.com/virtuoso-dev/message-list/commit/6d29d9bbfaf3d82adb786d8446772f499d7af466))
* testing context, smooth scroll function, additional get methods ([d753986](https://github.com/virtuoso-dev/message-list/commit/d753986f6772bb2e35ae59f25234a00628afe12a))
* tree filtering ([b4efd6e](https://github.com/virtuoso-dev/message-list/commit/b4efd6e192d2b95735b527ebdfd5f63524d7135a))
# [1.8.0-alpha.23](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.22...v1.8.0-alpha.23) (2024-06-19)
### Bug Fixes
* instant scroll cancels smooth scroll ([2d55f43](https://github.com/virtuoso-dev/message-list/commit/2d55f438cb046645b79898d7dc391586ce971ad8))
# [1.8.0-alpha.22](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.21...v1.8.0-alpha.22) (2024-06-18)
### Bug Fixes
* update dimensions when toggling footers ([1ce326c](https://github.com/virtuoso-dev/message-list/commit/1ce326c13dcc82bcdea852e0cc6c561ec923f725))
# [1.8.0-alpha.21](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.20...v1.8.0-alpha.21) (2024-06-18)
### Features
* control the smooth scroll ([74e6a9d](https://github.com/virtuoso-dev/message-list/commit/74e6a9d8c3c867cae5439731ead8b09dc774c53a))
# [1.8.0-alpha.20](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.19...v1.8.0-alpha.20) (2024-06-17)
### Bug Fixes
* lint ([ecb15e6](https://github.com/virtuoso-dev/message-list/commit/ecb15e66089e0cbcb01e6c79dfcccd9759360946))
* use mousewheel for cancellation ([3f6fb62](https://github.com/virtuoso-dev/message-list/commit/3f6fb629155053cad649332acfd45bfac7342806))
# [1.8.0-alpha.19](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.18...v1.8.0-alpha.19) (2024-06-17)
### Bug Fixes
* don't test for none ([e1a8a48](https://github.com/virtuoso-dev/message-list/commit/e1a8a486a927524eda0dccbf6249a6876c5ef3bc))
# [1.8.0-alpha.18](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.17...v1.8.0-alpha.18) (2024-06-17)
### Bug Fixes
* avoid extra cancellation of scroll ([bcd478b](https://github.com/virtuoso-dev/message-list/commit/bcd478b4f34e5c672b6061a7c0e27598afa2eecf))
* improve catchup ([bfd1675](https://github.com/virtuoso-dev/message-list/commit/bfd1675be3aa72f4f6ceede7fd0ea959510deed6))
# [1.8.0-alpha.17](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.16...v1.8.0-alpha.17) (2024-06-17)
### Bug Fixes
* testing something ([2f62e4f](https://github.com/virtuoso-dev/message-list/commit/2f62e4f1bba26f9bdfd5194819e5a10e4cc15e97))
# [1.8.0-alpha.16](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.15...v1.8.0-alpha.16) (2024-06-17)
### Bug Fixes
* increase debounce time ([07a52a6](https://github.com/virtuoso-dev/message-list/commit/07a52a6876062e3f94e763d78e749a57d2b9c410))
# [1.8.0-alpha.15](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.14...v1.8.0-alpha.15) (2024-06-17)
### Bug Fixes
* another take on animation ([318dfdc](https://github.com/virtuoso-dev/message-list/commit/318dfdc91ee3eedba98491e61f1fe0be95b861ba))
# [1.8.0-alpha.14](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.13...v1.8.0-alpha.14) (2024-06-17)
### Bug Fixes
* more reliable autoscroll ([950dcc8](https://github.com/virtuoso-dev/message-list/commit/950dcc8a19bc610679a4ff9bc703aa4a8d474307))
# [1.8.0-alpha.13](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.12...v1.8.0-alpha.13) (2024-06-17)
### Bug Fixes
* extend timeout for livescroll ([ed13009](https://github.com/virtuoso-dev/message-list/commit/ed1300973625dd44c733fdcf0ac2381e551784f0))
# [1.8.0-alpha.12](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.11...v1.8.0-alpha.12) (2024-06-17)
### Features
* scroll into view ([4a52d62](https://github.com/virtuoso-dev/message-list/commit/4a52d62b075ad2cb3e41cdbd4f9354f016aebba3))
# [1.8.0-alpha.11](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.10...v1.8.0-alpha.11) (2024-06-15)
### Bug Fixes
* stabilize batch autoscroll ([5e82418](https://github.com/virtuoso-dev/message-list/commit/5e82418a8934126cd844f1e60b61c1145b000c11))
# [1.8.0-alpha.10](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.9...v1.8.0-alpha.10) (2024-06-15)
### Bug Fixes
* strict mode ([521c9ba](https://github.com/virtuoso-dev/message-list/commit/521c9baef8b7d1d92953f6952d5e212eddad4696))
# [1.8.0-alpha.9](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.8...v1.8.0-alpha.9) (2024-06-15)
### Bug Fixes
* console ([9294649](https://github.com/virtuoso-dev/message-list/commit/92946490c4bcdaa603a1e199d83b2154cd40c7c2))
* don't remount on data replace ([2af4e19](https://github.com/virtuoso-dev/message-list/commit/2af4e19c64c663db072a322753b29df65534ee1a))
### Features
* perf optimizations, custom scroll ([bc506cb](https://github.com/virtuoso-dev/message-list/commit/bc506cbd9678d6a378e916ab0fd612a84ffa0d5c))
# [1.8.0-alpha.8](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.7...v1.8.0-alpha.8) (2024-06-13)
### Bug Fixes
* don't remount on data replace ([82e8c84](https://github.com/virtuoso-dev/message-list/commit/82e8c848be81d00b59529380e4ec69050adeb050))
# [1.8.0-alpha.7](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.6...v1.8.0-alpha.7) (2024-06-11)
### Bug Fixes
* switch to peer deps for react ([4fcb5f3](https://github.com/virtuoso-dev/message-list/commit/4fcb5f3ed5205fff6d4e35cac89bf0d22cbbe8bb))
### Features
* support align start-no-overflow ([6d29d9b](https://github.com/virtuoso-dev/message-list/commit/6d29d9bbfaf3d82adb786d8446772f499d7af466))
# [1.8.0-alpha.6](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.5...v1.8.0-alpha.6) (2024-06-06)
### Bug Fixes
* switch to peer deps for react ([f992b02](https://github.com/virtuoso-dev/message-list/commit/f992b024368980e3db3fb3b6974e7e2e8a9e8c74))
# [1.8.0-alpha.5](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.4...v1.8.0-alpha.5) (2024-06-06)
### Bug Fixes
* relax react ([c492898](https://github.com/virtuoso-dev/message-list/commit/c49289800758475c2c196aaff44ac70192573b37))
# [1.8.0-alpha.4](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.3...v1.8.0-alpha.4) (2024-06-04)
### Features
* tree filtering ([b4efd6e](https://github.com/virtuoso-dev/message-list/commit/b4efd6e192d2b95735b527ebdfd5f63524d7135a))
# [1.8.0-alpha.3](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.2...v1.8.0-alpha.3) (2024-05-28)
### Bug Fixes
* fix edge case of data replace ([2909623](https://github.com/virtuoso-dev/message-list/commit/2909623b0a1373b533f6b537d7f27f51e5af2435))
# [1.8.0-alpha.2](https://github.com/virtuoso-dev/message-list/compare/v1.8.0-alpha.1...v1.8.0-alpha.2) (2024-05-28)
### Bug Fixes
* improved atBottom flag logic ([9a36cd2](https://github.com/virtuoso-dev/message-list/commit/9a36cd29db1f33f8dfeda007039364646c29e670))
# [1.8.0-alpha.1](https://github.com/virtuoso-dev/message-list/compare/v1.7.1...v1.8.0-alpha.1) (2024-05-27)
### Features
* additional data manipulation methods ([88ebe5a](https://github.com/virtuoso-dev/message-list/commit/88ebe5a38507ef5b7ba6ee274b9685cee88fe257))
## [1.7.1](https://github.com/virtuoso-dev/message-list/compare/v1.7.0...v1.7.1) (2024-05-21)
### Bug Fixes
* clamp scroll location ([4404740](https://github.com/virtuoso-dev/message-list/commit/44047400fced3f11560f088ce8bcae5c4d0a6aad))
# [1.7.0](https://github.com/virtuoso-dev/message-list/compare/v1.6.1...v1.7.0) (2024-05-14)
### Features
* improve support for resizing headers and footers ([76bc6e2](https://github.com/virtuoso-dev/message-list/commit/76bc6e27a81012629fd3f2e0605c1692f10df424))
## [1.6.1](https://github.com/virtuoso-dev/message-list/compare/v1.6.0...v1.6.1) (2024-05-09)
### Bug Fixes
* API doc ([d13cf7e](https://github.com/virtuoso-dev/message-list/commit/d13cf7ed68cad82a8e7e371f41dc176b899ced43))
# [1.6.0](https://github.com/virtuoso-dev/message-list/compare/v1.5.0...v1.6.0) (2024-05-09)
### Features
* data.replace method ([7b3839a](https://github.com/virtuoso-dev/message-list/commit/7b3839a8ccbe7702a7ed83ac982d9dfc778913f8))
# [1.5.0](https://github.com/virtuoso-dev/message-list/compare/v1.4.1...v1.5.0) (2024-05-03)
### Features
* scrollToItem done callback ([5a646d7](https://github.com/virtuoso-dev/message-list/commit/5a646d7bcc73dd1abb1fbe1b4e2ad8f7b48a8cea))
## [1.4.1](https://github.com/virtuoso-dev/message-list/compare/v1.4.0...v1.4.1) (2024-05-02)
### Bug Fixes
* avoid double onScroll call ([bc88563](https://github.com/virtuoso-dev/message-list/commit/bc88563365d4680799211ceec562fd46085267e5))
# [1.4.0](https://github.com/virtuoso-dev/message-list/compare/v1.3.1...v1.4.0) (2024-04-24)
### Features
* expose data.find and data.findIndex ([1a22c2d](https://github.com/virtuoso-dev/message-list/commit/1a22c2d452b251a5341ce81e2f7ac9e870a2321d))
## [1.3.1](https://github.com/virtuoso-dev/message-list/compare/v1.3.0...v1.3.1) (2024-04-19)
### Bug Fixes
* tweak short size behavior ([ad6e3e9](https://github.com/virtuoso-dev/message-list/commit/ad6e3e996d5d05c68ca22def44b805e830483075))
# [1.3.0](https://github.com/virtuoso-dev/message-list/compare/v1.2.1...v1.3.0) (2024-04-18)
### Features
* support custom scroll component ([98fe073](https://github.com/virtuoso-dev/message-list/commit/98fe0733ef2595d291777f6f28d17c285757664f))
## [1.2.1](https://github.com/virtuoso-dev/message-list/compare/v1.2.0...v1.2.1) (2024-04-07)
### Bug Fixes
* improve upwards scroll in iOS ([5d05d4a](https://github.com/virtuoso-dev/message-list/commit/5d05d4a919c14d1dcf57f03ac9bcc03a6a9e1ca2))
# [1.2.0](https://github.com/virtuoso-dev/message-list/compare/v1.1.0...v1.2.0) (2024-04-07)
### Features
* publish to NPM ([0978288](https://github.com/virtuoso-dev/message-list/commit/0978288556973ef1a8bcffe23647f5fd1dd9cff3))
# [1.1.0](https://github.com/virtuoso-dev/message-list/compare/v1.0.0...v1.1.0) (2024-04-07)
### Features
* message grouping and date separators ([36fefe8](https://github.com/virtuoso-dev/message-list/commit/36fefe8fd7ec9a347ce004af14546917a27473e3))

@@ -1,3 +0,1 @@

/// <reference types="react" />
import { default as default_2 } from 'react';

@@ -4,0 +2,0 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';

1663

dist/index.js

@@ -1,4 +0,4 @@

import { jsxs as en, jsx as T, Fragment as fo } from "react/jsx-runtime";
import { jsx as y, jsxs as en, Fragment as fo } from "react/jsx-runtime";
import { Cell as u, Signal as x, filter as d, withLatestFrom as I, map as f, scan as ne, throttleTime as Vt, mapTo as F, debounceTime as me, delayWithMicrotask as Ft, onNext as tn, Action as Bt, useCellValue as V, useRealm as Ht, Realm as ho, RealmContext as go, useCellValues as bo } from "@virtuoso.dev/gurx";
import g from "react";
import { Cell as u, Signal as S, throttleTime as Ht, map as f, mapTo as V, debounceTime as be, filter as d, scan as ne, withLatestFrom as I, delayWithMicrotask as Vt, onNext as tn, Action as Ft, useRealm as _t, useCellValue as H, Realm as ho, RealmContext as go, useCellValues as vo } from "@mdxeditor/gurx";
function Ie(e, t) {

@@ -10,15 +10,14 @@ const n = u(e, (o) => {

}
const ye = { lvl: 0 };
function nn(e, t, n, o = ye, s = ye) {
const Te = { lvl: 0 };
function nn(e, t, n, o = Te, s = Te) {
return { k: e, l: o, lvl: n, r: s, v: t };
}
function k(e) {
return e === ye;
return e === Te;
}
function Re() {
return ye;
return Te;
}
function yt(e, t) {
if (k(e))
return ye;
function Tt(e, t) {
if (k(e)) return Te;
const { k: n, l: o, r: s } = e;

@@ -30,12 +29,10 @@ if (t === n) {

return o;
{
const [i, r] = on(o);
return tt(R(e, { k: i, l: sn(o), v: r }));
}
} else
return t < n ? tt(R(e, { l: yt(o, t) })) : tt(R(e, { r: yt(s, t) }));
const [i, r] = on(o);
return tt(R(e, { k: i, l: sn(o), v: r }));
}
return t < n ? tt(R(e, { l: Tt(o, t) })) : tt(R(e, { r: Tt(s, t) }));
}
function ce(e, t, n = "k") {
if (k(e))
return [-1 / 0, void 0];
return [Number.NEGATIVE_INFINITY, void 0];
if (e[n] === t)

@@ -45,10 +42,10 @@ return [e.k, e.v];

const o = ce(e.r, t, n);
return o[0] === -1 / 0 ? [e.k, e.v] : o;
return o[0] === Number.NEGATIVE_INFINITY ? [e.k, e.v] : o;
}
return ce(e.l, t, n);
}
function F(e, t, n) {
return k(e) ? nn(t, n, 1) : t === e.k ? R(e, { k: t, v: n }) : t < e.k ? qt(R(e, { l: F(e.l, t, n) })) : qt(R(e, { r: F(e.r, t, n) }));
function B(e, t, n) {
return k(e) ? nn(t, n, 1) : t === e.k ? R(e, { k: t, v: n }) : t < e.k ? qt(R(e, { l: B(e.l, t, n) })) : qt(R(e, { r: B(e.r, t, n) }));
}
function Tt(e, t, n) {
function yt(e, t, n) {
if (k(e))

@@ -58,20 +55,20 @@ return [];

let l = [];
return o > t && (l = l.concat(Tt(i, t, n))), o >= t && o <= n && l.push({ k: o, v: s }), o <= n && (l = l.concat(Tt(r, t, n))), l;
return o > t && (l = l.concat(yt(i, t, n))), o >= t && o <= n && l.push({ k: o, v: s }), o <= n && (l = l.concat(yt(r, t, n))), l;
}
function bo(e, t, n, o) {
function mo(e, t, n, o) {
if (k(e))
return ye;
return Te;
let s = Re();
for (const { k: i, v: r } of me(e))
i > t && i <= n ? s = F(s, ...o(i, r)) : s = F(s, i, r);
for (const { k: i, v: r } of ve(e))
i > t && i <= n ? s = B(s, ...o(i, r)) : s = B(s, i, r);
return s;
}
function mo(e, t, n) {
function vo(e, t, n) {
let o = Re(), s = -1;
for (const { start: i, end: r, value: l } of Io(e))
i < t ? (o = F(o, i, l), s = l) : i > t + n ? o = F(o, i - n, l) : r >= t + n && s !== l && (o = F(o, t, l));
i < t ? (o = B(o, i, l), s = l) : i > t + n ? o = B(o, i - n, l) : r >= t + n && s !== l && (o = B(o, t, l));
return o;
}
function me(e) {
return k(e) ? [] : [...me(e.l), { k: e.k, v: e.v }, ...me(e.r)];
function ve(e) {
return k(e) ? [] : [...ve(e.l), { k: e.k, v: e.v }, ...ve(e.r)];
}

@@ -91,3 +88,3 @@ function on(e) {

function qt(e) {
return $t(cn(e));
return Et(cn(e));
}

@@ -111,21 +108,20 @@ function tt(e) {

throw new Error("Unexpected empty nodes");
} else {
if (kt(e))
return $t(R(e, { lvl: o - 1 }));
if (!k(n) && !k(n.l)) {
const s = n.l, i = kt(s) ? n.lvl - 1 : n.lvl;
return R(s, {
l: R(e, {
lvl: o - 1,
r: s.l
}),
lvl: s.lvl + 1,
r: $t(R(n, { l: s.r, lvl: i }))
});
} else
throw new Error("Unexpected empty nodes");
}
if (kt(e))
return Et(R(e, { lvl: o - 1 }));
if (!k(n) && !k(n.l)) {
const s = n.l, i = kt(s) ? n.lvl - 1 : n.lvl;
return R(s, {
l: R(e, {
lvl: o - 1,
r: s.l
}),
lvl: s.lvl + 1,
r: Et(R(n, { l: s.r, lvl: i }))
});
}
throw new Error("Unexpected empty nodes");
}
function Io(e) {
return un(me(e));
return un(ve(e));
}

@@ -136,3 +132,3 @@ function rn(e, t, n) {

const o = ce(e, t)[0];
return un(Tt(e, o, n));
return un(yt(e, o, n));
}

@@ -149,3 +145,3 @@ function ln(e, t) {

}
return i.push({ end: 1 / 0, start: o, value: s }), i;
return i.push({ end: Number.POSITIVE_INFINITY, start: o, value: s }), i;
}

@@ -155,3 +151,3 @@ function un(e) {

}
function $t(e) {
function Et(e) {
const { r: t, lvl: n } = e;

@@ -164,35 +160,2 @@ return !k(t) && !k(t.r) && t.lvl === n && t.r.lvl === n ? R(t, { l: R(e, { r: t.l }), lvl: n + 1 }) : e;

}
function ko(e) {
const { size: t, startIndex: n, endIndex: o } = e;
return (s) => s.start === n && (s.end === o || s.end === 1 / 0) && s.value === t;
}
function xo(e, t) {
let n = k(e) ? 0 : 1 / 0;
for (const o of t) {
const { size: s, startIndex: i, endIndex: r } = o;
if (n = Math.min(n, i), k(e)) {
e = F(e, 0, s);
continue;
}
const l = rn(e, i - 1, r + 1);
if (l.some(ko(o)))
continue;
let c = !1, a = !1;
for (const { start: p, end: v, value: m } of l)
c ? (r >= p || s === m) && (e = yt(e, p)) : (a = m !== s, c = !0), v > r && r >= p && m !== s && (e = F(e, r + 1, m));
a && (e = F(e, i, s));
}
return [e, n];
}
const ft = [Re(), 0];
function So(e, [t, n]) {
if (n.length > 0 && k(e) && t.length === 2) {
const o = t[0].size, s = t[1].size;
return [
n.reduce((i, r) => F(F(i, r, o), r + 1, s), Re()),
0
];
} else
return xo(e, t);
}
function ut(e, t, n, o = 0) {

@@ -219,23 +182,23 @@ let s = e.length - 1;

}
function yo(e, t, n, o) {
function ko(e, t, n, o) {
const s = ut(e, t, o), i = ut(e, n, o, s);
return e.slice(s, i + 1);
}
function Wt({ index: e }, t) {
function _t({ index: e }, t) {
return t === e ? 0 : t < e ? -1 : 1;
}
function To({ offset: e }, t) {
function So({ offset: e }, t) {
return t === e ? 0 : t < e ? -1 : 1;
}
function $o(e) {
function xo(e) {
return { index: e.index, value: e };
}
function Eo(e, t, n, o = 0) {
return o > 0 && (t = Math.max(t, an(e, o, Wt).offset)), t = Math.max(0, t), ln(yo(e, t, n, To), $o);
function To(e, t, n, o = 0) {
return o > 0 && (t = Math.max(t, an(e, o, _t).offset)), t = Math.max(0, t), ln(ko(e, t, n, So), xo);
}
const Te = [[], 0, 0, 0];
function wo(e, [t, n]) {
const ye = [[], 0, 0, 0];
function yo(e, [t, n]) {
let o = 0, s = 0, i = 0, r = 0;
if (n !== 0) {
r = ut(e, n - 1, Wt), i = e[r].offset;
r = ut(e, n - 1, _t), i = e[r].offset;
const c = ce(t, n - 1);

@@ -245,3 +208,3 @@ o = c[0], s = c[1], e.length && e[r].height === ce(t, n)[1] && (r -= 1), e = e.slice(0, r + 1);

e = [];
for (const { start: l, value: c } of rn(t, n, 1 / 0)) {
for (const { start: l, value: c } of rn(t, n, Number.POSITIVE_INFINITY)) {
const a = (l - o) * s + i;

@@ -252,24 +215,135 @@ e.push({ height: c, index: l, offset: a }), o = l, i = a, s = c;

}
function pn(e, t) {
function Eo(e) {
const { size: t, startIndex: n, endIndex: o } = e;
return (s) => s.start === n && (s.end === o || s.end === Number.POSITIVE_INFINITY) && s.value === t;
}
function $o(e, t) {
let n = k(e) ? 0 : Number.POSITIVE_INFINITY;
for (const o of t) {
const { size: s, startIndex: i, endIndex: r } = o;
if (n = Math.min(n, i), k(e)) {
e = B(e, 0, s);
continue;
}
const l = rn(e, i - 1, r + 1);
if (l.some(Eo(o)))
continue;
let c = !1, a = !1;
for (const { start: p, end: b, value: v } of l)
c ? (r >= p || s === v) && (e = Tt(e, p)) : (a = v !== s, c = !0), b > r && r >= p && v !== s && (e = B(e, r + 1, v));
a && (e = B(e, i, s));
}
return [e, n];
}
const ft = [Re(), 0];
function wo(e, [t, n]) {
if (n.length > 0 && k(e) && t.length === 2) {
const o = t[0].size, s = t[1].size;
return [
n.reduce((i, r) => B(B(i, r, o), r + 1, s), Re()),
0
];
}
return $o(e, t);
}
const de = x();
u([]);
u([]);
u(0);
u(null);
u(Number.NaN);
const be = u(!1), ae = u(ft, (e) => {
e.link(
e.pipe(
de,
d((t) => t.length > 0),
I(G),
f(([t, n]) => wo(n, [t, []]))
),
ae
);
}), G = u(ft[0], (e) => {
e.link(
e.pipe(
ae,
f(([t]) => t)
),
G
);
}), pn = u(ft[1], (e) => {
e.link(
e.pipe(
ae,
f(([, t]) => t)
),
pn
);
}), Ee = u(ye[1]), $e = u(ye[0]), Be = u(ye, (e) => {
e.link(
e.pipe(
G,
I(pn),
ne(([t], [n, o]) => yo(t, [n, o]), ye)
),
Be
), e.link(
e.pipe(
Be,
f(([, t]) => t)
),
Ee
), e.link(
e.pipe(
Be,
f(([t]) => t)
),
$e
);
}), fn = u(ye[2], (e) => {
e.link(
e.pipe(
Be,
f(([, , t]) => t)
),
fn
);
}), hn = u(ye[3], (e) => {
e.link(
e.pipe(
Be,
f(([, , , t]) => t)
),
hn
);
}), Me = u(0, (e) => {
e.link(
e.pipe(
e.combine(ke, hn, fn, Ee),
f(([t, n, o, s]) => o + (t - n) * s)
),
Me
);
});
function gn(e, t) {
if (t.length === 0)
return [0, 0];
const { offset: n, index: o, height: s } = an(t, e, Wt);
const { offset: n, index: o, height: s } = an(t, e, _t);
return [s * (e - o) + n, s];
}
function Et(e, t) {
return pn(e, t)[0];
function $t(e, t) {
return gn(e, t)[0];
}
function fn(e, t) {
function dn(e, t) {
return Math.abs(e - t) < 1.01;
}
function hn() {
function bn() {
return typeof navigator > "u" ? !1 : /Macintosh/i.test(navigator.userAgent) && navigator.maxTouchPoints && navigator.maxTouchPoints > 1 || /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent);
}
function gn(e) {
function mn(e) {
return !e;
}
function Lo(e) {
return e === 1 ? 1 : 1 - Math.pow(2, -10 * e);
return e === 1 ? 1 : 1 - 2 ** (-10 * e);
}
function dn(e = 1) {
function vn(e = 1) {
return (t, n) => {

@@ -286,3 +360,3 @@ const o = n.signalInstance();

}
const vn = "up", xt = "down", Ro = "none", Mo = {
const In = "up", St = "down", Ro = "none", Mo = {
atBottom: !1,

@@ -297,3 +371,3 @@ notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",

}
}, Ao = 0, Co = 4;
}, Ao = 0, Oo = 4;
function Gt(e) {

@@ -308,19 +382,19 @@ return (t, n) => {

u(!1);
const bn = u(!0);
S();
const ge = u(!1), Do = S((e) => {
e.link(e.pipe(bn, Ht(50)), Do);
}), mn = u(Co), Oo = u(Ao, (e) => {
const kn = u(!0);
x();
const ge = u(!1), No = x((e) => {
e.link(e.pipe(kn, Vt(50)), No);
}), Sn = u(Oo), Co = u(Ao, (e) => {
e.link(
e.pipe(
e.combine($, Oo),
e.combine(E, Co),
f(([t, n]) => t <= n)
),
bn
kn
);
}), Ne = u(!1, (e) => {
e.link(e.pipe($, Gt(1), V(!0)), Ne), e.link(e.pipe($, Gt(1), V(!1), be(100)), Ne);
}), Pe = u(!1, (e) => {
e.link(e.pipe(E, Gt(1), F(!0)), Pe), e.link(e.pipe(E, Gt(1), F(!1), me(100)), Pe);
}), wt = u(!1, (e) => {
e.link(e.pipe(se, V(!0)), wt), e.link(e.pipe(se, V(!1), be(200)), wt);
}), In = u(!1), nt = u(
e.link(e.pipe(se, F(!0)), wt), e.link(e.pipe(se, F(!1), me(200)), wt);
}), xn = u(!1), nt = u(
null,

@@ -332,8 +406,8 @@ (e) => {

j,
$,
E,
Z,
wn,
mn,
pt,
dt,
$n,
Sn,
at,
gt,
G

@@ -351,14 +425,14 @@ ),

if (a) {
let m, y;
return o > t.state.scrollTop ? (m = "SCROLLED_DOWN", y = t.state.scrollTop - o) : (m = n === s ? "LIST_TOO_SHORT" : "SIZE_DECREASED", y = t.state.scrollTop - o || t.scrollTopDelta), {
let v, T;
return o > t.state.scrollTop ? (v = "SCROLLED_DOWN", T = t.state.scrollTop - o) : (v = n === s ? "LIST_TOO_SHORT" : "SIZE_DECREASED", T = t.state.scrollTop - o || t.scrollTopDelta), {
atBottom: !0,
state: p,
atBottomBecause: m,
scrollTopDelta: y
atBottomBecause: v,
scrollTopDelta: T
};
}
let v;
return s < t.state.viewportHeight ? v = "VIEWPORT_HEIGHT_DECREASING" : i < t.state.viewportWidth ? v = "VIEWPORT_WIDTH_DECREASING" : o < t.state.scrollTop ? v = "SCROLLING_UPWARDS" : p.scrollHeight > t.state.scrollHeight || p.listMarginTop < t.state.listMarginTop ? t.atBottom ? v = "SIZE_INCREASED" : v = t.notAtBottomBecause : t.atBottom ? v = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM" : v = t.notAtBottomBecause, {
let b;
return s < t.state.viewportHeight ? b = "VIEWPORT_HEIGHT_DECREASING" : i < t.state.viewportWidth ? b = "VIEWPORT_WIDTH_DECREASING" : o < t.state.scrollTop ? b = "SCROLLING_UPWARDS" : p.scrollHeight > t.state.scrollHeight || p.listMarginTop < t.state.listMarginTop ? t.atBottom ? b = "SIZE_INCREASED" : b = t.notAtBottomBecause : t.atBottom ? b = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM" : b = t.notAtBottomBecause, {
atBottom: !1,
notAtBottomBecause: v,
notAtBottomBecause: b,
state: p

@@ -384,3 +458,3 @@ };

),
In
xn
), e.sub(

@@ -404,16 +478,9 @@ e.pipe(

(e, t) => !e || e.atBottom !== (t == null ? void 0 : t.atBottom) ? !1 : !e.atBottom && !t.atBottom ? e.notAtBottomBecause === t.notAtBottomBecause : !0
), kn = u(0, (e) => {
), Tn = u(0, (e) => {
e.link(
e.pipe(
e.combine($, j, Z),
e.combine(E, j, Z),
ne(
(t, [n, o, s]) => {
if (fn(t.scrollHeight, o))
return {
scrollTop: n,
scrollHeight: o,
jump: 0,
changed: !1
};
{
if (!dn(t.scrollHeight, o)) {
const i = o - (n + s) < 1;

@@ -432,2 +499,8 @@ return t.scrollTop !== n && i ? {

}
return {
scrollTop: n,
scrollHeight: o,
jump: 0,
changed: !1
};
},

@@ -439,11 +512,11 @@ { scrollHeight: 0, jump: 0, scrollTop: 0, changed: !1 }

),
kn
Tn
);
}), Lt = u(xt, (e) => {
}), Lt = u(St, (e) => {
e.link(
e.pipe(
$,
E,
ne(
(t, n) => e.getValue(wt) ? { direction: t.direction, prevScrollTop: n } : { direction: n < t.prevScrollTop ? vn : xt, prevScrollTop: n },
{ direction: xt, prevScrollTop: 0 }
(t, n) => e.getValue(wt) ? { direction: t.direction, prevScrollTop: n } : { direction: n < t.prevScrollTop ? In : St, prevScrollTop: n },
{ direction: St, prevScrollTop: 0 }
),

@@ -453,9 +526,9 @@ f((t) => t.direction)

Lt
), e.link(e.pipe($, be(100), V(Ro)), Lt);
), e.link(e.pipe(E, me(100), F(Ro)), Lt);
}), Zt = u(0, (e) => {
e.link(e.pipe(Ne, d(gn), V(0)), Zt), e.link(
e.link(e.pipe(Pe, d(mn), F(0)), Zt), e.link(
e.pipe(
$,
Ht(100),
I(Ne),
E,
Vt(100),
I(Pe),
d(([, t]) => !!t),

@@ -468,3 +541,3 @@ ne(([, t], [n]) => [t, n], [0, 0]),

});
function Pt(e, t) {
function Wt(e, t) {
if (typeof e == "number")

@@ -478,3 +551,3 @@ return {

const n = {
index: NaN,
index: Number.NaN,
align: e.align ?? "start-no-overflow",

@@ -486,3 +559,3 @@ behavior: e.behavior ?? "auto",

}
function xn({
function yn({
location: e,

@@ -498,16 +571,16 @@ sizeTree: t,

}) {
const { align: a, behavior: p, offset: v, index: m } = Pt(e, s - 1);
function y() {
const P = ce(t, m)[1];
if (P === void 0)
throw new Error(`Item at index ${m} not found`);
return P;
const { align: a, behavior: p, offset: b, index: v } = Wt(e, s - 1);
function T() {
const W = ce(t, v)[1];
if (W === void 0)
throw new Error(`Item at index ${v} not found`);
return W;
}
i -= l + c;
let x = Et(m, n) + r - l;
a === "end" ? x = x - i + y() : a === "center" && (x = x - i / 2 + y() / 2), v && (x += v);
let b = 0;
return a === "start" && (b = Math.max(0, Math.min(x - (o - i)))), x = Math.max(0, x), { top: x, behavior: p, align: a, forceBottomSpace: b };
let S = $t(v, n) + r - l;
a === "end" ? S = S - i + T() : a === "center" && (S = S - i / 2 + T() / 2), b && (S += b);
let m = 0;
return a === "start" && (m = Math.max(0, Math.min(S - (o - i)))), S = Math.max(0, S), { top: S, behavior: p, align: a, forceBottomSpace: m };
}
const He = u(null), Bo = u(!1), ot = u(!0), Rt = S((e) => {
const Ve = u(null), Do = u(!1), ot = u(!0), Rt = x((e) => {
e.link(

@@ -524,13 +597,13 @@ e.pipe(

),
He
Ve
);
}), Sn = S((e) => {
}), En = x((e) => {
e.link(
e.pipe(
Sn,
I(ke, we, Ge),
En,
I(ke, $e, Ge),
f(([t, n, o, s]) => {
let { align: i, behavior: r, offset: l, index: c } = Pt(t, n - 1);
const a = typeof t != "number" ? t.done : void 0, [p, v] = pn(c, o);
return p < -s.listOffset ? ((typeof t == "number" || t.align === void 0) && (i = "start-no-overflow"), { index: c, align: i, behavior: r, offset: l, done: a }) : p + v > -s.listOffset + s.visibleListHeight ? ((typeof t == "number" || t.align === void 0) && (i = "end"), { index: c, align: i, behavior: r, offset: l, done: a }) : null;
let { align: i, behavior: r, offset: l, index: c } = Wt(t, n - 1);
const a = typeof t != "number" ? t.done : void 0, [p, b] = gn(c, o);
return p < -s.listOffset ? ((typeof t == "number" || t.align === void 0) && (i = "start-no-overflow"), { index: c, align: i, behavior: r, offset: l, done: a }) : p + b > -s.listOffset + s.visibleListHeight ? ((typeof t == "number" || t.align === void 0) && (i = "end"), { index: c, align: i, behavior: r, offset: l, done: a }) : null;
}),

@@ -542,3 +615,3 @@ d((t) => t !== null)

);
}), te = S((e) => {
}), te = x((e) => {
const t = e.pipe(

@@ -548,9 +621,9 @@ te,

G,
we,
$e,
ke,
Z,
gt,
ht,
je,
qe,
Ae
Me
),

@@ -560,3 +633,3 @@ f(

try {
return xn({
return yn({
location: n,

@@ -579,15 +652,15 @@ totalHeight: p,

);
e.link(te, He), e.link(t, Le), e.link(
e.link(te, Ve), e.link(t, Le), e.link(
e.pipe(
te,
d((n) => typeof n != "number" && n.index === "LAST"),
V(!0)
F(!0)
),
ge
), e.link(e.pipe(t, V(!1)), ot), e.link(e.pipe(t, V(!1)), Bo), e.link(
), e.link(e.pipe(t, F(!1)), ot), e.link(e.pipe(t, F(!1)), Do), e.link(
e.pipe(
G,
// wait for the list to render with the specified sizeTree, so that enough space is available to scroll by
be(0),
I(ot, He),
me(0),
I(ot, Ve),
d(([, n, o]) => !n && o !== null),

@@ -597,6 +670,6 @@ f(([, , n]) => n)

te
), e.sub(e.pipe(Ke, be(10)), () => {
const n = e.getValue(He);
), e.sub(e.pipe(Ke, me(10)), () => {
const n = e.getValue(Ve);
n !== null && typeof n != "number" && n.done !== void 0 && n.done(), e.pubIn({
[He]: null,
[Ve]: null,
[ot]: !0

@@ -606,5 +679,5 @@ });

e.pipe(
rt,
it,
// wait for the list to render with the specified scrollOffset, so that enough space is available to scroll by
Vt(),
Ft(),
d((n) => n !== 0)

@@ -615,48 +688,32 @@ ),

e.pipe(
rt,
tn($),
it,
tn(E),
f(() => 0)
),
rt
it
);
}), Fe = u(null), $e = u(null, (e) => {
}), He = u(null), we = u(null, (e) => {
e.link(
e.pipe(
$e,
we,
d((n) => n !== null)
),
Fe
He
);
const t = e.pipe(
e.combine($e, G),
I(Fe),
e.combine(we, G),
I(He),
d(([[n, o], s]) => n !== null && !k(o) && s !== null),
f(([[n]]) => n)
);
e.link(e.pipe(t, Vt()), te), e.link(
e.link(e.pipe(t, Ft()), te), e.link(
e.pipe(
t,
tn(e.pipe(Ye, d(gn))),
V(null)
tn(e.pipe(ze, d(mn))),
F(null)
// unset the location after the scroll completes
),
Fe
He
);
});
function Ho(e, t) {
const n = t.slice();
let o = 0;
const s = [];
me(e).forEach(({ k: r, v: l }) => {
var p, v;
for (; n.length && n[0] < r; )
n.shift(), o++;
const c = Math.max(0, r - o), a = ((p = s.at(-1)) == null ? void 0 : p.k) ?? -1;
c === a ? (((v = s.at(-2)) == null ? void 0 : v.v) ?? -1) === l ? s.pop() : s[s.length - 1].v = l : s.push({ k: c, v: l });
});
let i = Re();
return s.forEach(({ k: r, v: l }) => {
i = F(i, r, l);
}), i;
}
function Vo(e, t) {

@@ -675,3 +732,3 @@ return [

}
const Fo = [], Ve = {
const Fo = [], Fe = {
items: Fo,

@@ -685,21 +742,21 @@ listBottom: 0,

data: null
}, Me = u(Ve, (e) => {
}, Ae = u(Fe, (e) => {
e.link(
e.pipe(
e.combine(
_o,
Mn,
Bo,
Rn,
G,
we,
$e,
ke,
Ae,
Me,
w,
rt,
$e,
Fe,
it,
we,
He,
Ue,
je,
qe,
W,
ve,
_,
be,
q

@@ -722,19 +779,19 @@ ),

p,
b,
v,
m,
y,
x,
b
T,
S,
m
]) => {
var Je;
if ((c == null ? void 0 : c.length) === 0)
return Ve;
return Fe;
if (k(s)) {
let z = 0;
return p !== null && (z = Pt(p, r - 1).index), { ...Ve, items: Vo(z, c), offsetTree: i, totalCount: r, data: c };
let Y = 0;
return p !== null && (Y = Wt(p, r - 1).index), { ...Fe, items: Vo(Y, c), offsetTree: i, totalCount: r, data: c };
}
let P = 0;
v !== null && n === 0 && (P = xn({
let W = 0;
b !== null && n === 0 && (W = yn({
totalHeight: l,
location: v,
location: b,
sizeTree: s,

@@ -744,8 +801,8 @@ offsetTree: i,

viewportHeight: e.getValue(Z),
headerHeight: e.getValue(gt),
stickyHeaderHeight: y,
stickyFooterHeight: x
headerHeight: e.getValue(ht),
stickyHeaderHeight: T,
stickyFooterHeight: S
}).top ?? 0);
const U = Math.min(
Math.max(n + P + a - b - m, 0),
Math.max(n + W + a - m - v, 0),
l - o

@@ -755,13 +812,13 @@ ), J = U + o;

return t;
const X = [], Q = r - 1, N = 0, M = Eo(i, U, J, N);
const X = [], Q = r - 1, P = 0, M = To(i, U, J, P);
let A = 0, pe = 0, Ze = !1;
for (const z of M) {
for (const Y of M) {
const {
value: { offset: xe, height: ie }
} = z;
let ee = z.start;
A = xe, xe < U && (ee += Math.floor((U - xe) / ie), A += (ee - z.start) * ie), ee < N && (A += (N - ee) * ie, ee = N);
const Ce = Math.min(z.end, Q);
for (let re = ee; re <= Ce && !(A >= J); re++) {
const De = {
value: { offset: Se, height: ie }
} = Y;
let ee = Y.start;
A = Se, Se < U && (ee += Math.floor((U - Se) / ie), A += (ee - Y.start) * ie), ee < P && (A += (P - ee) * ie, ee = P);
const Oe = Math.min(Y.end, Q);
for (let re = ee; re <= Oe && !(A >= J); re++) {
const Ne = {
data: c == null ? void 0 : c[re],

@@ -775,15 +832,15 @@ prevData: (c == null ? void 0 : c[re - 1]) ?? null,

};
Ze || (Ze = !0, pe = A), X.push(De), A += ie;
Ze || (Ze = !0, pe = A), X.push(Ne), A += ie;
}
}
const E = l - A, oe = ((Je = X[0]) == null ? void 0 : Je.offset) || 0;
return { items: X, listBottom: A, listTop: pe, offsetTree: i, paddingBottom: E, paddingTop: oe, totalCount: r, data: c };
const $ = l - A, oe = ((Je = X[0]) == null ? void 0 : Je.offset) || 0;
return { items: X, listBottom: A, listTop: pe, offsetTree: i, paddingBottom: $, paddingTop: oe, totalCount: r, data: c };
},
Ve
Fe
)
),
Me
Ae
);
}), ct = Ie([], (e) => e.pipe(
e.combine(Me, $),
e.combine(Ae, E),
f(([t, n]) => {

@@ -795,7 +852,7 @@ const o = t.items.slice();

})
)), q = u(!1), _e = u(!1), st = S((e) => {
)), q = u(!1), _e = u(!1), st = x((e) => {
e.link(
e.pipe(
Me,
I(kn, ve),
Ae,
I(Tn, be),
d(([, , t]) => !t),

@@ -811,11 +868,11 @@ ne(

d(([t]) => t !== 0),
I($, Lt, Ye),
d(([, t, n, o]) => !o && t !== 0 && n === vn),
I(E, Lt, ze),
d(([, t, n, o]) => !o && t !== 0 && n === In),
f(([[t]]) => t)
),
st
), hn() ? (e.sub(e.pipe(st, I(W, $)), ([t, n]) => {
e.pub(W, n - t);
), bn() ? (e.sub(e.pipe(st, I(_, E)), ([t, n]) => {
e.pub(_, n - t);
}), e.sub(
e.pipe(e.combine($, W, ve, _e)),
e.pipe(e.combine(E, _, be, _e)),
([t, n, o, s]) => {

@@ -825,7 +882,7 @@ o || s || (n > 0 && t < n ? (e.pub(q, !0), e.pub(Le, { top: 0, behavior: "instant" }), setTimeout(() => {

[q]: !1,
[W]: 0
[_]: 0
});
})) : n < 0 && t <= 0 && (e.pubIn({
[q]: !0,
[W]: 0
[_]: 0
}), setTimeout(() => {

@@ -837,15 +894,15 @@ e.pub(Le, { top: 0, behavior: "instant" }), e.pub(q, !1);

e.pipe(
e.combine(Ne, W, q, ve, _e),
e.combine(Pe, _, q, be, _e),
d(
([t, n, o, s, i]) => !t && n !== 0 && !o && !s && !i
),
Ht(100)
Vt(100)
),
([, t]) => {
e.pub(q, !0), t < 0 ? requestAnimationFrame(() => {
e.pub(se, -t), e.pub(W, 0), requestAnimationFrame(() => {
e.pub(se, -t), e.pub(_, 0), requestAnimationFrame(() => {
e.pub(q, !1);
});
}) : requestAnimationFrame(() => {
e.pub(se, -t), e.pub(W, 0), requestAnimationFrame(() => {
e.pub(se, -t), e.pub(_, 0), requestAnimationFrame(() => {
e.pub(q, !1);

@@ -856,5 +913,126 @@ });

)) : e.link(st, se);
}), ke = u(0), ze = u(null), w = u(null, (e) => {
}), ze = x(), Pt = u(!1), Ke = x((e) => {
e.link(e.pipe(Ke, F(!1)), ze);
}, !1), E = u(0), Z = u(0), $n = u(0), j = u(0), Bo = E, it = u(0), je = u(0), Ue = u(0), qe = u(0), Yt = u(0), Mt = u(null), wn = Bt(), Ho = Lo, _o = 50, ht = Ie(0, (e) => e.pipe(
e.combine(je, Ue),
f(([t, n]) => t + n)
)), Ln = Ie(0, (e) => e.pipe(
e.combine(qe, Yt),
f(([t, n]) => t + n)
)), Wo = Ie(0, (e) => e.pipe(
e.combine(je, Ue, E),
f(([t, n, o]) => t + Math.max(n - o, 0))
)), Po = Ie(0, (e) => e.pipe(
e.combine(qe, Yt, E, Z, j),
f(([t, n, o, s, i]) => {
o = Math.min(o, i - s);
const r = Math.max(n - (i - (o + s)), 0);
return t + r;
})
)), Rn = Ie(0, (e) => e.pipe(
e.combine(Z, Wo, Po),
f(([t, n, o]) => t - n - o)
)), gt = u(0), Mn = u(0, (e) => {
e.link(
e.pipe(
e.combine(Mn, Me, Z),
f(([t, n, o]) => t === 0 ? 0 : Math.max(0, Math.min(t - (n - o))))
),
gt
);
}), Le = x((e) => {
e.link(
e.pipe(
Le,
f((t) => t.align === "start" ? t.top ?? 0 : 0)
),
Mn
), e.link(
e.pipe(
Le,
I(E),
d(([t, n]) => t.top !== n),
F(!0)
),
ze
);
}), Ge = Ie(
{
listOffset: 0,
visibleListHeight: 0,
scrollHeight: 0,
bottomOffset: 0,
isAtBottom: !1
},
(e) => e.pipe(
e.combine(
E,
ht,
Ln,
Ue,
Rn,
j,
gt,
be,
He,
q,
ge
),
d(([, , , , , , , t, n, o]) => !t && n === null && !o),
f(
([
t,
n,
o,
s,
i,
r,
l,
c,
a,
p,
b
]) => {
const v = e.getValue(Sn), T = r - n - o, S = -t + s, m = T + Math.min(0, S) - i - l;
return {
scrollHeight: T,
listOffset: S,
visibleListHeight: i,
bottomOffset: m,
isAtBottom: b || m <= v
};
}
)
)
), At = x((e) => {
e.link(
e.pipe(
E,
me(0),
I(Ge),
d(([, t]) => t.scrollHeight > 0),
f(([, t]) => t)
),
At
);
}), se = x(), _ = u(0), rt = u(0), at = u(0), An = u(""), zt = x(), On = Bt(), Nn = Bt();
function Yo(e, t) {
var r, l;
const n = t.slice();
let o = 0;
const s = [];
for (const { k: c, v: a } of ve(e)) {
for (; n.length && n[0] < c; )
n.shift(), o++;
const p = Math.max(0, c - o), b = ((r = s.at(-1)) == null ? void 0 : r.k) ?? -1;
p === b ? (((l = s.at(-2)) == null ? void 0 : l.v) ?? -1) === a ? s.pop() : s[s.length - 1].v = a : s.push({ k: p, v: a });
}
let i = Re();
for (const { k: c, v: a } of s)
i = B(i, c, a);
return i;
}
const ke = u(0), Ye = u(null), w = u(null, (e) => {
e.link(
e.pipe(
w,

@@ -866,3 +1044,3 @@ d((t) => t !== null),

);
}), Be = u(null), le = S((e) => {
}), De = u(null), le = x((e) => {
e.link(

@@ -874,19 +1052,19 @@ e.pipe(

),
W
), e.link(e.pipe(le, V(!0)), _e), e.link(e.pipe(le, Vt()), Be);
_
), e.link(e.pipe(le, F(!0)), _e), e.link(e.pipe(le, Ft()), De);
function t(n, o) {
e.pubIn({
[se]: n,
[lt]: n
[rt]: n
}), o ? requestAnimationFrame(() => {
e.pubIn({
[W]: 0,
[lt]: 0,
[Be]: null,
[_]: 0,
[rt]: 0,
[De]: null,
[_e]: !1
});
}) : e.pubIn({
[W]: 0,
[lt]: 0,
[Be]: null,
[_]: 0,
[rt]: 0,
[De]: null,
[_e]: !1

@@ -897,4 +1075,4 @@ });

e.pipe(
we,
I(Be),
$e,
I(De),
d(([, n]) => n !== null),

@@ -904,3 +1082,3 @@ f(([n, o]) => {

throw new Error("Unexpected null items");
return Et(o.length, n);
return $t(o.length, n);
})

@@ -914,6 +1092,6 @@ ),

le,
dn(2),
I(we, Be),
vn(2),
I($e, De),
d(([, , n]) => n !== null),
f(([n, o]) => Et(n.length, o))
f(([n, o]) => $t(n.length, o))
),

@@ -929,3 +1107,3 @@ (n) => {

const i = n.length, r = s;
return me(o).reduce(
return ve(o).reduce(
(c, { k: a, v: p }) => ({

@@ -946,6 +1124,6 @@ ranges: [...c.ranges, { startIndex: c.prevIndex, endIndex: a + i - 1, size: c.prevSize }],

);
}), ht = S((e) => {
}), dt = x((e) => {
const t = e.pipe(
ht,
I(Ge, Nt, ze, G),
dt,
I(Ge, Pt, Ye, G),
d(([, , , , o]) => !k(o)),

@@ -991,3 +1169,3 @@ f(([{ data: o, scrollToBottom: s }, i, r, l]) => {

const n = e.pipe(
Yt,
zt,
I(ge),

@@ -1002,20 +1180,20 @@ d(([o, s]) => o === "up" && s)

ge
), e.link(e.pipe(n, V(!0)), Rt), e.link(
), e.link(e.pipe(n, F(!0)), Rt), e.link(
e.pipe(
t,
d((o) => o !== null),
be(20)
me(20)
),
te
);
}), at = S((e) => {
e.changeWith(w, at, (t, n) => t ? [...t, ...n.data] : n.data.slice()), e.link(at, ht);
}), it = S((e) => {
e.changeWith(w, it, (t, n) => t ? [...t.slice(0, n.offset), ...n.data, ...t.slice(n.offset)] : n.data.slice()), e.changeWith(ae, it, ([t], n) => {
}), pt = x((e) => {
e.changeWith(w, pt, (t, n) => t ? [...t, ...n.data] : n.data.slice()), e.link(pt, dt);
}), lt = x((e) => {
e.changeWith(w, lt, (t, n) => t ? [...t.slice(0, n.offset), ...n.data, ...t.slice(n.offset)] : n.data.slice()), e.changeWith(ae, lt, ([t], n) => {
const s = ce(t, n.offset, "k")[0], i = n.data.length;
return [bo(t, s, 1 / 0, (l, c) => [l + i, c]), s];
}), e.link(it, ht);
}), Mt = S((e) => {
e.changeWith(w, Mt, (t, { offset: n, count: o }) => t ? t.slice(0, n).concat(t.slice(n + o)) : []), e.changeWith(ae, Mt, ([t], { offset: n, count: o }) => [mo(t, n, o), n]);
}), St = u(null), We = S((e) => {
return [mo(t, s, Number.POSITIVE_INFINITY, (l, c) => [l + i, c]), s];
}), e.link(lt, dt);
}), Ot = x((e) => {
e.changeWith(w, Ot, (t, { offset: n, count: o }) => t ? t.slice(0, n).concat(t.slice(n + o)) : []), e.changeWith(ae, Ot, ([t], { offset: n, count: o }) => [vo(t, n, o), n]);
}), xt = u(null), We = x((e) => {
e.sub(

@@ -1029,9 +1207,9 @@ e.pipe(

n === null || n.length === 0 ? e.pubIn({
...t.initialLocation ? { [$e]: t.initialLocation } : {},
...t.initialLocation ? { [we]: t.initialLocation } : {},
[w]: t.data.slice()
}) : e.pubIn({
...t.initialLocation ? { [$e]: t.initialLocation } : {},
...t.initialLocation ? { [we]: t.initialLocation } : {},
[ae]: ft,
[Me]: Ve,
[St]: t.data.slice()
[Ae]: Fe,
[xt]: t.data.slice()
});

@@ -1041,4 +1219,4 @@ }

e.pipe(
On,
I(St),
Nn,
I(xt),
d(([, t]) => t !== null)

@@ -1049,3 +1227,3 @@ ),

[w]: t,
[St]: null
[xt]: null
});

@@ -1063,3 +1241,3 @@ }

startIndex: t.length,
endIndex: 1 / 0
endIndex: Number.POSITIVE_INFINITY
}

@@ -1076,3 +1254,3 @@ ])

requestAnimationFrame(() => {
o || e.pub(Dn), requestAnimationFrame(() => {
o || e.pub(On), requestAnimationFrame(() => {
n && e.pubIn({

@@ -1087,5 +1265,5 @@ [te]: n

);
}), Jt = S((e) => {
e.changeWith(w, Jt, (t, n) => t ? t.slice(n) : []), e.changeWith(ae, Jt, ([t], n) => [me(t).reduce((s, { k: i, v: r }) => F(s, Math.max(0, i - n), r), Re()), 0]);
}), Xt = S((e) => {
}), Jt = x((e) => {
e.changeWith(w, Jt, (t, n) => t ? t.slice(n) : []), e.changeWith(ae, Jt, ([t], n) => [ve(t).reduce((s, { k: i, v: r }) => B(s, Math.max(0, i - n), r), Re()), 0]);
}), Xt = x((e) => {
e.changeWith(w, Xt, (t, n) => t ? t.slice(0, t.length - n) : []), e.link(

@@ -1099,3 +1277,3 @@ e.pipe(

startIndex: t,
endIndex: 1 / 0
endIndex: Number.POSITIVE_INFINITY
}

@@ -1106,9 +1284,8 @@ ])

);
}), yn = S((e) => {
}), Cn = x((e) => {
const t = e.pipe(
yn,
Cn,
I(w),
f(([n, o]) => {
if (!o)
return [];
if (!o) return [];
const s = [];

@@ -1120,9 +1297,9 @@ return o.forEach((i, r) => {

);
e.changeWith(w, t, (n, o) => n ? n.filter((s, i) => !o.includes(i)) : []), e.changeWith(ae, t, ([n], o) => [Ho(n, o), 0]);
}), At = S((e) => {
e.changeWith(w, At, (t, { mapper: n }) => t ? t.map(n) : []), e.link(
e.changeWith(w, t, (n, o) => n ? n.filter((s, i) => !o.includes(i)) : []), e.changeWith(ae, t, ([n], o) => [Yo(n, o), 0]);
}), Nt = x((e) => {
e.changeWith(w, Nt, (t, { mapper: n }) => t ? t.map(n) : []), e.link(
e.pipe(
At,
dn(3),
I(In),
Nt,
vn(3),
I(xn),
d(([{ autoscrollToBottomBehavior: t }, n]) => n && !!t),

@@ -1134,224 +1311,29 @@ f(([{ autoscrollToBottomBehavior: t }]) => typeof t == "object" ? t.location() : { index: "LAST", align: "end", behavior: t }),

);
}), de = S();
u([]);
u([]);
u(0);
u(null);
u(NaN);
const ve = u(!1), ae = u(ft, (e) => {
e.link(
e.pipe(
de,
d((t) => t.length > 0),
I(G),
f(([t, n]) => So(n, [t, []]))
),
ae
}), zo = ({ item: e, ItemContent: t, mount: n, unmount: o }) => {
const s = V(Ye), i = g.useRef(null), r = g.useCallback(
(l) => {
l ? (i.current = l, n(l)) : i.current && (o(i.current), i.current = null);
},
[n, o]
);
}), G = u(ft[0], (e) => {
e.link(
e.pipe(
ae,
f(([t]) => t)
),
G
return /* @__PURE__ */ y(
"div",
{
ref: r,
"data-index": e.index,
"data-known-size": e.height,
style: {
overflowAnchor: "none",
position: "absolute",
width: "100%",
top: e.offset
},
children: /* @__PURE__ */ y(t, { index: e.index, prevData: e.prevData, nextData: e.nextData, data: e.data, context: s })
}
);
}), Tn = u(ft[1], (e) => {
e.link(
e.pipe(
ae,
f(([, t]) => t)
),
Tn
);
}), Ee = u(Te[1]), we = u(Te[0]), Pe = u(Te, (e) => {
e.link(
e.pipe(
G,
I(Tn),
ne(([t], [n, o]) => wo(t, [n, o]), Te)
),
Pe
), e.link(
e.pipe(
Pe,
f(([, t]) => t)
),
Ee
), e.link(
e.pipe(
Pe,
f(([t]) => t)
),
we
);
}), $n = u(Te[2], (e) => {
e.link(
e.pipe(
Pe,
f(([, , t]) => t)
),
$n
);
}), En = u(Te[3], (e) => {
e.link(
e.pipe(
Pe,
f(([, , , t]) => t)
),
En
);
}), Ae = u(0, (e) => {
e.link(
e.pipe(
e.combine(ke, En, $n, Ee),
f(([t, n, o, s]) => o + (t - n) * s)
),
Ae
);
}), Ye = S(), Nt = u(!1), Ke = S((e) => {
e.link(e.pipe(Ke, V(!1)), Ye);
}, !1), $ = u(0), Z = u(0), wn = u(0), j = u(0), _o = $, rt = u(0), je = u(0), Ue = u(0), qe = u(0), zt = u(0), Ct = u(null), Ln = Ft(), Wo = Lo, Po = 50, gt = Ie(0, (e) => e.pipe(
e.combine(je, Ue),
f(([t, n]) => t + n)
)), Rn = Ie(0, (e) => e.pipe(
e.combine(qe, zt),
f(([t, n]) => t + n)
)), No = Ie(0, (e) => e.pipe(
e.combine(je, Ue, $),
f(([t, n, o]) => t + Math.max(n - o, 0))
)), zo = Ie(0, (e) => e.pipe(
e.combine(qe, zt, $, Z, j),
f(([t, n, o, s, i]) => {
o = Math.min(o, i - s);
const r = Math.max(n - (i - (o + s)), 0);
return t + r;
})
)), Mn = Ie(0, (e) => e.pipe(
e.combine(Z, No, zo),
f(([t, n, o]) => t - n - o)
)), dt = u(0), An = u(0, (e) => {
e.link(
e.pipe(
e.combine(An, Ae, Z),
f(([t, n, o]) => t === 0 ? 0 : Math.max(0, Math.min(t - (n - o))))
),
dt
);
}), Le = S((e) => {
e.link(
e.pipe(
Le,
f((t) => t.align === "start" ? t.top ?? 0 : 0)
),
An
), e.link(
e.pipe(
Le,
I($),
d(([t, n]) => t.top !== n),
V(!0)
),
Ye
);
}), Ge = Ie(
{
listOffset: 0,
visibleListHeight: 0,
scrollHeight: 0,
bottomOffset: 0,
isAtBottom: !1
},
(e) => e.pipe(
e.combine(
$,
gt,
Rn,
Ue,
Mn,
j,
dt,
ve,
Fe,
q,
ge
),
d(([, , , , , , , t, n, o]) => !t && n === null && !o),
f(
([
t,
n,
o,
s,
i,
r,
l,
c,
a,
p,
v
]) => {
const m = e.getValue(mn), y = r - n - o, x = -t + s, b = y + Math.min(0, x) - i - l;
return {
scrollHeight: y,
listOffset: x,
visibleListHeight: i,
bottomOffset: b,
isAtBottom: v || b <= m
};
}
)
)
), Dt = S((e) => {
e.link(
e.pipe(
$,
be(0),
I(Ge),
d(([, t]) => t.scrollHeight > 0),
f(([, t]) => t)
),
Dt
);
}), se = S(), W = u(0), lt = u(0), pt = u(0), Cn = u(""), Yt = S(), Dn = Ft(), On = Ft(), Bn = ({ index: e }) => /* @__PURE__ */ en("div", { children: [
"Item ",
e
] }), Hn = ({ index: e }) => e, Ot = u(Bn), Vn = u(Hn), Fn = u(null), _n = u(null), Wn = u(null), Pn = u(null), Nn = u(null), zn = u("div"), Yo = {
position: "sticky",
top: 0,
zIndex: 1
}, Qe = {
overflowAnchor: "none"
}, Ko = {
position: "sticky",
bottom: 0
}, Yn = g.forwardRef((e, t) => /* @__PURE__ */ T("div", { style: { zIndex: 1 }, ...e, ref: t })), Kn = g.forwardRef((e, t) => /* @__PURE__ */ T("div", { ...e, ref: t })), jn = g.forwardRef(
({ style: e, ...t }, n) => /* @__PURE__ */ T("div", { ...t, style: { ...Yo, ...e }, ref: n })
), Un = g.forwardRef(
({ style: e, ...t }, n) => /* @__PURE__ */ T("div", { ...t, style: { ...Ko, ...e }, ref: n })
), qn = u(Yn), Gn = u(jn), Zn = u(Kn), Jn = u(Un), Bt = u("top", (e) => {
e.link(
e.pipe(
e.combine(Bt, Ae, Z, gt, Rn),
d(([t]) => t === "bottom" || t === "bottom-smooth"),
f(([, t, n, o, s]) => Math.max(0, n - t - o - s))
),
pt
), e.link(
e.pipe(
e.combine(pt, Bt),
d(([, t]) => t === "bottom-smooth"),
ne(
(t, [n]) => [t[1], n],
[0, 0]
),
f(([t, n]) => t > 0 && n > 0 ? "margin-top 0.2s ease-out" : "")
),
Cn
);
});
};
function Ko(e) {
return jo(qo(Go(Uo(e), 8 * e.length))).toLowerCase();
}
function jo(e) {
return Uo(Go(Zo(qo(e), 8 * e.length))).toLowerCase();
}
function Uo(e) {
for (var t, n = "0123456789ABCDEF", o = "", s = 0; s < e.length; s++)

@@ -1361,38 +1343,35 @@ t = e.charCodeAt(s), o += n.charAt(t >>> 4 & 15) + n.charAt(15 & t);

}
function qo(e) {
for (var t = Array(e.length >> 2), n = 0; n < t.length; n++)
t[n] = 0;
for (n = 0; n < 8 * e.length; n += 8)
t[n >> 5] |= (255 & e.charCodeAt(n / 8)) << n % 32;
function Uo(e) {
for (var t = Array(e.length >> 2), n = 0; n < t.length; n++) t[n] = 0;
for (n = 0; n < 8 * e.length; n += 8) t[n >> 5] |= (255 & e.charCodeAt(n / 8)) << n % 32;
return t;
}
function Go(e) {
for (var t = "", n = 0; n < 32 * e.length; n += 8)
t += String.fromCharCode(e[n >> 5] >>> n % 32 & 255);
function qo(e) {
for (var t = "", n = 0; n < 32 * e.length; n += 8) t += String.fromCharCode(e[n >> 5] >>> n % 32 & 255);
return t;
}
function Zo(e, t) {
function Go(e, t) {
e[t >> 5] |= 128 << t % 32, e[14 + (t + 64 >>> 9 << 4)] = t;
for (var n = 1732584193, o = -271733879, s = -1732584194, i = 271733878, r = 0; r < e.length; r += 16) {
const l = n, c = o, a = s, p = i;
o = B(
o = B(
o = B(
o = B(
o = O(
o = O(
o = O(
o = O(
o = D(
o = D(
o = D(
o = D(
o = C(
o = C(
o = C(
o = C(
o = D(
o = D(
o = D(
o = D(
o = C(
o = C(
o = C(
o = C(
o = N(
o = N(
o = N(
o = N(
o = O(
o = O(
o = O(
o = O(
o,
s = C(
s = O(
s,
i = C(i, n = C(n, o, s, i, e[r + 0], 7, -680876936), o, s, e[r + 1], 12, -389564586),
i = O(i, n = O(n, o, s, i, e[r + 0], 7, -680876936), o, s, e[r + 1], 12, -389564586),
n,

@@ -1410,5 +1389,5 @@ o,

),
s = C(
s = O(
s,
i = C(i, n = C(n, o, s, i, e[r + 4], 7, -176418897), o, s, e[r + 5], 12, 1200080426),
i = O(i, n = O(n, o, s, i, e[r + 4], 7, -176418897), o, s, e[r + 5], 12, 1200080426),
n,

@@ -1426,5 +1405,5 @@ o,

),
s = C(
s = O(
s,
i = C(i, n = C(n, o, s, i, e[r + 8], 7, 1770035416), o, s, e[r + 9], 12, -1958414417),
i = O(i, n = O(n, o, s, i, e[r + 8], 7, 1770035416), o, s, e[r + 9], 12, -1958414417),
n,

@@ -1442,5 +1421,5 @@ o,

),
s = C(
s = O(
s,
i = C(i, n = C(n, o, s, i, e[r + 12], 7, 1804603682), o, s, e[r + 13], 12, -40341101),
i = O(i, n = O(n, o, s, i, e[r + 12], 7, 1804603682), o, s, e[r + 13], 12, -40341101),
n,

@@ -1458,5 +1437,5 @@ o,

),
s = D(
s = N(
s,
i = D(i, n = D(n, o, s, i, e[r + 1], 5, -165796510), o, s, e[r + 6], 9, -1069501632),
i = N(i, n = N(n, o, s, i, e[r + 1], 5, -165796510), o, s, e[r + 6], 9, -1069501632),
n,

@@ -1474,5 +1453,5 @@ o,

),
s = D(
s = N(
s,
i = D(i, n = D(n, o, s, i, e[r + 5], 5, -701558691), o, s, e[r + 10], 9, 38016083),
i = N(i, n = N(n, o, s, i, e[r + 5], 5, -701558691), o, s, e[r + 10], 9, 38016083),
n,

@@ -1490,5 +1469,5 @@ o,

),
s = D(
s = N(
s,
i = D(i, n = D(n, o, s, i, e[r + 9], 5, 568446438), o, s, e[r + 14], 9, -1019803690),
i = N(i, n = N(n, o, s, i, e[r + 9], 5, 568446438), o, s, e[r + 14], 9, -1019803690),
n,

@@ -1506,5 +1485,5 @@ o,

),
s = D(
s = N(
s,
i = D(i, n = D(n, o, s, i, e[r + 13], 5, -1444681467), o, s, e[r + 2], 9, -51403784),
i = N(i, n = N(n, o, s, i, e[r + 13], 5, -1444681467), o, s, e[r + 2], 9, -51403784),
n,

@@ -1522,5 +1501,5 @@ o,

),
s = O(
s = C(
s,
i = O(i, n = O(n, o, s, i, e[r + 5], 4, -378558), o, s, e[r + 8], 11, -2022574463),
i = C(i, n = C(n, o, s, i, e[r + 5], 4, -378558), o, s, e[r + 8], 11, -2022574463),
n,

@@ -1538,5 +1517,5 @@ o,

),
s = O(
s = C(
s,
i = O(i, n = O(n, o, s, i, e[r + 1], 4, -1530992060), o, s, e[r + 4], 11, 1272893353),
i = C(i, n = C(n, o, s, i, e[r + 1], 4, -1530992060), o, s, e[r + 4], 11, 1272893353),
n,

@@ -1554,5 +1533,5 @@ o,

),
s = O(
s = C(
s,
i = O(i, n = O(n, o, s, i, e[r + 13], 4, 681279174), o, s, e[r + 0], 11, -358537222),
i = C(i, n = C(n, o, s, i, e[r + 13], 4, 681279174), o, s, e[r + 0], 11, -358537222),
n,

@@ -1570,5 +1549,5 @@ o,

),
s = O(
s = C(
s,
i = O(i, n = O(n, o, s, i, e[r + 9], 4, -640364487), o, s, e[r + 12], 11, -421815835),
i = C(i, n = C(n, o, s, i, e[r + 9], 4, -640364487), o, s, e[r + 12], 11, -421815835),
n,

@@ -1586,5 +1565,5 @@ o,

),
s = B(
s = D(
s,
i = B(i, n = B(n, o, s, i, e[r + 0], 6, -198630844), o, s, e[r + 7], 10, 1126891415),
i = D(i, n = D(n, o, s, i, e[r + 0], 6, -198630844), o, s, e[r + 7], 10, 1126891415),
n,

@@ -1602,5 +1581,5 @@ o,

),
s = B(
s = D(
s,
i = B(i, n = B(n, o, s, i, e[r + 12], 6, 1700485571), o, s, e[r + 3], 10, -1894986606),
i = D(i, n = D(n, o, s, i, e[r + 12], 6, 1700485571), o, s, e[r + 3], 10, -1894986606),
n,

@@ -1618,5 +1597,5 @@ o,

),
s = B(
s = D(
s,
i = B(i, n = B(n, o, s, i, e[r + 8], 6, 1873313359), o, s, e[r + 15], 10, -30611744),
i = D(i, n = D(n, o, s, i, e[r + 8], 6, 1873313359), o, s, e[r + 15], 10, -30611744),
n,

@@ -1634,5 +1613,5 @@ o,

),
s = B(
s = D(
s,
i = B(i, n = B(n, o, s, i, e[r + 4], 6, -145523070), o, s, e[r + 11], 10, -1120210379),
i = D(i, n = D(n, o, s, i, e[r + 4], 6, -145523070), o, s, e[r + 11], 10, -1120210379),
n,

@@ -1653,17 +1632,17 @@ o,

}
function vt(e, t, n, o, s, i) {
return ue(Jo(ue(ue(t, e), ue(o, i)), s), n);
function bt(e, t, n, o, s, i) {
return ue(Zo(ue(ue(t, e), ue(o, i)), s), n);
}
function O(e, t, n, o, s, i, r) {
return bt(t & n | ~t & o, e, t, s, i, r);
}
function N(e, t, n, o, s, i, r) {
return bt(t & o | n & ~o, e, t, s, i, r);
}
function C(e, t, n, o, s, i, r) {
return vt(t & n | ~t & o, e, t, s, i, r);
return bt(t ^ n ^ o, e, t, s, i, r);
}
function D(e, t, n, o, s, i, r) {
return vt(t & o | n & ~o, e, t, s, i, r);
return bt(n ^ (t | ~o), e, t, s, i, r);
}
function O(e, t, n, o, s, i, r) {
return vt(t ^ n ^ o, e, t, s, i, r);
}
function B(e, t, n, o, s, i, r) {
return vt(n ^ (t | ~o), e, t, s, i, r);
}
function ue(e, t) {

@@ -1673,110 +1652,153 @@ const n = (65535 & e) + (65535 & t);

}
function Jo(e, t) {
function Zo(e, t) {
return e << t | e >>> 32 - t;
}
const Xn = Symbol("INVALID_KEY");
function Xo(e) {
const Dn = Symbol("INVALID_KEY");
function Jo(e) {
const t = e.slice(0, 32), n = e.slice(32), o = atob(n);
if (t !== jo(n))
return Xn;
if (t !== Ko(n))
return Dn;
const [s, i] = o.split(";"), r = s.slice(2), l = new Date(Number(i.slice(2)));
return { orderNumber: r, expiryDate: l };
}
const Qo = {
const Xo = {
valid: !1,
consoleMessage: "The VirtuosoMessageList license wrapper component is missing. Enclose the VirtuosoMessageList with VirtuosoMessageListLicense and add your key at the lisenceKey property.",
watermarkMessage: "The VirtuosoMessageList license wrapper component is missing. Enclose the VirtuosoMessageList with VirtuosoMessageListLicense and add your key at the lisenceKey property."
}, es = {
}, Qo = {
valid: !1,
consoleMessage: "Your VirtuosoMessageListLicense is missing a license key. Purchase one from https://virtuoso.dev/pricing/",
watermarkMessage: "Your VirtuosoMessageListLicense is missing a license key. Purchase one from https://virtuoso.dev/pricing/"
}, ts = {
}, es = {
valid: !1,
consoleMessage: "Your VirtuosoMessageListLicense component is missing a license key - this component will not work if deployed in production. Purchase a key from https://virtuoso.dev/pricing/ before you deploy to production."
}, Qn = {
}, Vn = {
valid: !0
}, ns = {
}, ts = {
valid: !1,
consoleMessage: "Your Virtuoso Message List license key is invalid. Ensure that you have copy-pasted the key from the purchase email correctly.",
watermarkMessage: "Your Virtuoso Message List license key is invalid"
}, os = {
}, ns = {
valid: !1,
consoleMessage: "Your annual license key to use Virtuoso Message List in non-production environments has expired. You can still use it in production. To keep using it in development, purchase a new key from https://virtuoso.dev/pricing/",
watermarkMessage: "Your annual license key to use Virtuoso Message List in non-production environments has expired. You can still use it in production. To keep using it in development, purchase a new key from https://virtuoso.dev/pricing/"
}, ss = {
}, os = {
valid: !1,
consoleMessage: "You have installed a version of `@virtuoso.dev/message-list` that is newer than the period of your license key. Either downgrade to a supported version, or purchase a new license from https://virtuoso.dev/pricing/",
watermarkMessage: "You have installed a version of `@virtuoso.dev/message-list` that is newer than the period of your license key. Either downgrade to a supported version, or purchase a new license from https://virtuoso.dev/pricing/"
}, is = Qn, rs = /^(?:127\.0\.0\.1|localhost|0\.0\.0\.0|.+\.local)$/, ls = ["virtuoso.dev", "csb.app", "codesandbox.io"];
function us({ licenseKey: e, now: t, hostname: n, packageTimestamp: o }) {
const s = n.match(rs), i = ls.some((r) => n.endsWith(r));
if (e) {
const r = Xo(e);
if (r === Xn)
}, ss = Vn, is = /^(?:127\.0\.0\.1|localhost|0\.0\.0\.0|.+\.local)$/, rs = ["virtuoso.dev", "csb.app", "codesandbox.io"];
function ls({ licenseKey: e, now: t, hostname: n, packageTimestamp: o }) {
const s = n.match(is), i = rs.some((l) => n.endsWith(l));
if (!e)
return i ? ss : s ? es : Qo;
const r = Jo(e);
if (r === Dn)
return ts;
if (r.expiryDate.getTime() < t.getTime()) {
if (s)
return ns;
if (r.expiryDate.getTime() < t.getTime()) {
if (s)
return os;
if (r.expiryDate.getTime() < o)
return ss;
}
} else
return i ? is : s ? ts : es;
return Qn;
if (r.expiryDate.getTime() < o)
return os;
}
return Vn;
}
const eo = g.createContext(Qo), cs = ({
const Fn = g.createContext(Xo), us = ({
licenseKey: e,
children: t
}) => {
const n = us({
const n = ls({
licenseKey: e,
hostname: typeof window < "u" ? window.location.hostname : "localhost",
now: /* @__PURE__ */ new Date(),
packageTimestamp: 1732169353837
packageTimestamp: 1736497380066
});
return /* @__PURE__ */ T(eo.Provider, { value: n, children: t });
return /* @__PURE__ */ y(Fn.Provider, { value: n, children: t });
};
cs.displayName = Math.random().toString(36).slice(2, 8);
const as = g.createContext(void 0);
function ps(e, t, n) {
const o = _t(), s = g.useRef(null), i = g.useRef(null);
function r() {
us.displayName = Math.random().toString(36).slice(2, 8);
const cs = g.createContext(void 0), Bn = u(null), Hn = u(null), _n = u(null), Wn = u(null), Pn = u(null), Yn = u("div"), as = {
position: "sticky",
top: 0,
zIndex: 1
}, Qe = {
overflowAnchor: "none"
}, ps = {
position: "sticky",
bottom: 0
}, zn = g.forwardRef((e, t) => /* @__PURE__ */ y("div", { style: { zIndex: 1 }, ...e, ref: t })), Kn = g.forwardRef((e, t) => /* @__PURE__ */ y("div", { ...e, ref: t })), jn = g.forwardRef(
({ style: e, ...t }, n) => /* @__PURE__ */ y("div", { ...t, style: { ...as, ...e }, ref: n })
), Un = g.forwardRef(
({ style: e, ...t }, n) => /* @__PURE__ */ y("div", { ...t, style: { ...ps, ...e }, ref: n })
), qn = u(zn), Gn = u(jn), Zn = u(Kn), Jn = u(Un), Xn = ({ index: e }) => /* @__PURE__ */ en("div", { children: [
"Item ",
e
] }), Qn = ({ index: e }) => e, Ct = u(Xn), eo = u(Qn), Dt = u("top", (e) => {
e.link(
e.pipe(
e.combine(Dt, Me, Z, ht, Ln),
d(([t]) => t === "bottom" || t === "bottom-smooth"),
f(([, t, n, o, s]) => Math.max(0, n - t - o - s))
),
at
), e.link(
e.pipe(
e.combine(at, Dt),
d(([, t]) => t === "bottom-smooth"),
ne(
(t, [n]) => [t[1], n],
[0, 0]
),
f(([t, n]) => t > 0 && n > 0 ? "margin-top 0.2s ease-out" : "")
),
An
);
});
function et(e) {
const t = g.useRef(null);
return [g.useCallback(
(o) => {
o ? (t.current = o, e == null || e.observe(o, { box: "border-box" })) : t.current && (e == null || e.unobserve(t.current), t.current = null);
},
[e]
), t];
}
function fs(e, t, n) {
const o = Ht(), s = g.useRef(null), i = g.useRef(null), r = g.useCallback(() => {
s.current && (cancelAnimationFrame(s.current), s.current = null, i.current = null);
}
g.useEffect(() => o.sub(Yt, (a) => {
}, []);
g.useEffect(() => o.sub(zt, (a) => {
a !== i.current && r();
}), [o]), g.useEffect(() => o.sub(Ln, r), [o]);
}), [o, r]), g.useEffect(() => o.sub(wn, r), [o, r]);
const l = g.useCallback(
(a, p, v) => {
var P;
(a, p, b) => {
var W;
s.current && r();
const m = ((P = e.current) == null ? void 0 : P.scrollTop) ?? 0;
i.current = m < a ? "down" : "up";
let y = 0, x = 0;
function b() {
const v = ((W = e.current) == null ? void 0 : W.scrollTop) ?? 0;
i.current = v < a ? "down" : "up";
let T = 0, S = 0;
function m() {
var J, X;
const U = m + (a - m) * p(y);
(J = e.current) == null || J.scrollTo({ top: U, behavior: "instant" }), y += 1 / v, x += 1, x < v ? s.current = requestAnimationFrame(b) : ((X = e.current) == null || X.scrollTo({ top: a, behavior: "instant" }), s.current = null, i.current = null);
const U = v + (a - v) * p(T);
(J = e.current) == null || J.scrollTo({ top: U, behavior: "instant" }), T += 1 / b, S += 1, S < b ? s.current = requestAnimationFrame(m) : ((X = e.current) == null || X.scrollTo({ top: a, behavior: "instant" }), s.current = null, i.current = null);
}
b();
m();
},
[e]
[e, r]
);
return g.useCallback(
(a) => {
var p, v, m, y;
var p, b, v, T;
if (a.top === ((p = e.current) == null ? void 0 : p.scrollTop)) {
o.pub(Ke, (v = e.current) == null ? void 0 : v.scrollTop);
o.pub(Ke, (b = e.current) == null ? void 0 : b.scrollTop);
return;
}
if (a.top !== void 0 && (n.current = a.top, o.pub(Nt, !0)), a.forceBottomSpace !== void 0 && t.current && (t.current.style.paddingBottom = `${a.forceBottomSpace}px`), a.behavior === "smooth")
l(a.top ?? 0, Wo, Po);
if (a.top !== void 0 && (n.current = a.top, o.pub(Pt, !0)), a.forceBottomSpace !== void 0 && t.current && (t.current.style.paddingBottom = `${a.forceBottomSpace}px`), a.behavior === "smooth")
l(a.top ?? 0, Ho, _o);
else if (a.behavior === "auto" || a.behavior === "instant" || a.behavior === void 0)
r(), (m = e.current) == null || m.scrollTo(a);
r(), (v = e.current) == null || v.scrollTo(a);
else {
const { easing: x, animationFrameCount: b } = a.behavior(((y = e.current) == null ? void 0 : y.scrollTop) ?? 0, a.top ?? 0);
l(a.top ?? 0, x, b);
const { easing: S, animationFrameCount: m } = a.behavior(((T = e.current) == null ? void 0 : T.scrollTop) ?? 0, a.top ?? 0);
l(a.top ?? 0, S, m);
}
},
[o, l, t, e, n]
[o, l, t, e, n, r]
);

@@ -1791,3 +1813,3 @@ }

append: (t, n) => {
e.pub(at, {
e.pub(pt, {
data: t,

@@ -1804,3 +1826,3 @@ scrollToBottom: n

map: (t, n) => {
e.pub(At, {
e.pub(Nt, {
mapper: t,

@@ -1811,8 +1833,8 @@ autoscrollToBottomBehavior: n

findAndDelete: (t) => {
e.pub(yn, t);
e.pub(Cn, t);
},
findIndex: (t) => e.getValue(w).findIndex(t),
find: (t) => e.getValue(w).find(t),
insert: function(t, n, o) {
e.pub(it, {
insert: (t, n, o) => {
e.pub(lt, {
data: t,

@@ -1823,4 +1845,4 @@ offset: n,

},
deleteRange: function(t, n) {
e.pub(Mt, {
deleteRange: (t, n) => {
e.pub(Ot, {
offset: t,

@@ -1831,3 +1853,3 @@ count: n

batch: (t, n) => {
e.pub(ve, !0), t(), e.pub(ve, !1), e.pub(ht, { data: [], scrollToBottom: n });
e.pub(be, !0), t(), e.pub(be, !1), e.pub(dt, { data: [], scrollToBottom: n });
},

@@ -1841,5 +1863,5 @@ get: () => e.getValue(w).slice(),

scrollIntoView: (t) => {
e.pub(Sn, t);
e.pub(En, t);
},
scrollerElement: () => e.getValue(Ct),
scrollerElement: () => e.getValue(Mt),
getScrollLocation() {

@@ -1849,3 +1871,3 @@ return e.getValue(Ge);

cancelSmoothScroll() {
e.pub(Ln);
e.pub(wn);
},

@@ -1862,34 +1884,2 @@ height: (t) => {

}
const fs = ({ item: e, ItemContent: t, mount: n, unmount: o }) => {
const s = H(ze), i = g.useRef(null), r = g.useCallback(
(l) => {
l ? (i.current = l, n(l)) : i.current && (o(i.current), i.current = null);
},
[n, o]
);
return /* @__PURE__ */ T(
"div",
{
ref: r,
"data-index": e.index,
"data-known-size": e.height,
style: {
overflowAnchor: "none",
position: "absolute",
width: "100%",
top: e.offset
},
children: /* @__PURE__ */ T(t, { index: e.index, prevData: e.prevData, nextData: e.nextData, data: e.data, context: s })
}
);
};
function et(e) {
const t = g.useRef(null);
return [g.useCallback(
(o) => {
o ? (t.current = o, e == null || e.observe(o, { box: "border-box" })) : t.current && (e == null || e.unobserve(t.current), t.current = null);
},
[e]
), t];
}
let Qt = !1;

@@ -1899,3 +1889,3 @@ const hs = g.forwardRef(

initialData: e = [],
computeItemKey: t = Hn,
computeItemKey: t = Qn,
context: n = null,

@@ -1906,12 +1896,12 @@ initialLocation: o = null,

onRenderedDataChange: r,
ItemContent: l = Bn,
ItemContent: l = Xn,
Header: c = null,
StickyHeader: a = null,
Footer: p = null,
StickyFooter: v = null,
EmptyPlaceholder: m = null,
HeaderWrapper: y = Yn,
StickyHeaderWrapper: x = jn,
FooterWrapper: b = Kn,
StickyFooterWrapper: P = Un,
StickyFooter: b = null,
EmptyPlaceholder: v = null,
HeaderWrapper: T = zn,
StickyHeaderWrapper: S = jn,
FooterWrapper: m = Kn,
StickyFooterWrapper: W = Un,
ScrollElement: U = "div",

@@ -1922,31 +1912,31 @@ ...J

const M = new ho();
return M.register(Me), M.register(Ye), M.register(st), M.register(nt), M.register(at), M.register(le), M.register(We), M.pubIn({
return M.register(Ae), M.register(ze), M.register(st), M.register(nt), M.register(pt), M.register(le), M.register(We), M.pubIn({
[w]: e.slice(),
[ze]: n,
[Vn]: t,
[$e]: o,
[Ot]: l,
[Fn]: c,
[Wn]: p,
[_n]: a,
[Ye]: n,
[eo]: t,
[we]: o,
[Ct]: l,
[Bn]: c,
[_n]: p,
[Hn]: a,
[Wn]: b,
[Pn]: v,
[Nn]: m,
[zn]: U,
[Jn]: P,
[Gn]: x,
[Zn]: b,
[qn]: y,
[Bt]: s
}), M.singletonSub(Dt, i), M.singletonSub(ct, r), M;
[Yn]: U,
[Jn]: W,
[Gn]: S,
[Zn]: m,
[qn]: T,
[Dt]: s
}), M.singletonSub(At, i), M.singletonSub(ct, r), M;
}, []);
g.useImperativeHandle(X, () => to(Q), [Q]), g.useEffect(() => {
Q.pubIn({
[ze]: n,
[Ot]: l
}), Q.singletonSub(Dt, i), Q.singletonSub(ct, r);
[Ye]: n,
[Ct]: l
}), Q.singletonSub(At, i), Q.singletonSub(ct, r);
});
const N = g.useContext(eo);
const P = g.useContext(Fn);
return g.useEffect(() => {
N.consoleMessage && (Qt || (Qt = !0, console.error(N.consoleMessage)));
}, [N]), g.useEffect(() => {
P.consoleMessage && (Qt || (Qt = !0, console.error(P.consoleMessage)));
}, [P]), g.useEffect(() => {
const M = (A) => {

@@ -1959,3 +1949,3 @@ var pe;

};
}, []), typeof window < "u" && N.watermarkMessage ? /* @__PURE__ */ T(
}, []), typeof window < "u" && P.watermarkMessage ? /* @__PURE__ */ y(
"div",

@@ -1967,5 +1957,5 @@ {

},
children: N.watermarkMessage
children: P.watermarkMessage
}
) : /* @__PURE__ */ T(go.Provider, { value: Q, children: /* @__PURE__ */ T(gs, { ...J }) });
) : /* @__PURE__ */ y(go.Provider, { value: Q, children: /* @__PURE__ */ y(gs, { ...J }) });
}

@@ -1975,3 +1965,3 @@ );

const gs = ({ style: e, ...t }) => {
const n = _t(), o = g.useContext(as), [
const n = Ht(), o = g.useContext(cs), [
s,

@@ -1984,68 +1974,73 @@ i,

p,
b,
v,
m,
y,
x
] = vo(
Fn,
_n,
T,
S
] = bo(
Bn,
Hn,
qn,
Gn,
_n,
Wn,
Pn,
Zn,
Jn,
Ot,
Nn,
zn
), [b] = g.useState(() => {
Ct,
Pn,
Yn
), [m] = g.useState(() => {
if (typeof ResizeObserver > "u")
throw new Error("ResizeObserver not found. Please ensure that you have a polyfill installed.");
return new ResizeObserver((h) => {
var Xe, Se, Oe, jt;
const Y = h.length, _ = [];
var Xe, xe, Ce, jt;
const z = h.length, H = [];
let L = {};
for (let bt = 0; bt < Y; bt++) {
const he = h[bt], K = he.target;
if (K === N.current) {
for (let mt = 0; mt < z; mt++) {
const he = h[mt], K = he.target;
if (K === P.current) {
L = {
...L,
[Ue]: he.contentRect.height,
[j]: (Xe = E.current) == null ? void 0 : Xe.scrollHeight
[j]: (Xe = $.current) == null ? void 0 : Xe.scrollHeight
};
continue;
} else if (K === A.current) {
}
if (K === A.current) {
L = {
...L,
[je]: he.contentRect.height,
[j]: (Se = E.current) == null ? void 0 : Se.scrollHeight
[j]: (xe = $.current) == null ? void 0 : xe.scrollHeight
};
continue;
} else if (K === U.current) {
}
if (K === U.current) {
L = {
...L,
[zt]: he.contentRect.height,
[j]: (Oe = E.current) == null ? void 0 : Oe.scrollHeight
[Yt]: he.contentRect.height,
[j]: (Ce = $.current) == null ? void 0 : Ce.scrollHeight
};
continue;
} else if (K === X.current) {
}
if (K === X.current) {
L = {
...L,
[qe]: he.contentRect.height,
[j]: (jt = E.current) == null ? void 0 : jt.scrollHeight
[j]: (jt = $.current) == null ? void 0 : jt.scrollHeight
};
continue;
} else if (K === E.current) {
}
if (K === $.current) {
L = {
...L,
[$]: K.scrollTop,
[E]: K.scrollTop,
[j]: K.scrollHeight,
[Z]: he.contentRect.height,
[wn]: K.clientWidth
[$n]: K.clientWidth
};
continue;
} else if (K === oe.current) {
E.current && (L = {
}
if (K === oe.current) {
$.current && (L = {
...L,
[j]: E.current.scrollHeight
[j]: $.current.scrollHeight
});

@@ -2056,21 +2051,21 @@ continue;

continue;
const mt = parseInt(K.dataset.index), po = parseFloat(K.dataset.knownSize ?? ""), It = he.contentRect.height;
const vt = Number.parseInt(K.dataset.index), po = Number.parseFloat(K.dataset.knownSize ?? ""), It = he.contentRect.height;
if (It === po)
continue;
const Ut = _[_.length - 1];
_.length === 0 || Ut.size !== It || Ut.endIndex !== mt - 1 ? _.push({ endIndex: mt, size: It, startIndex: mt }) : _[_.length - 1].endIndex++;
const Ut = H[H.length - 1];
H.length === 0 || Ut.size !== It || Ut.endIndex !== vt - 1 ? H.push({ endIndex: vt, size: It, startIndex: vt }) : H[H.length - 1].endIndex++;
}
_.length > 0 && (L = {
H.length > 0 && (L = {
...L,
[de]: _
[de]: H
}), n.pubIn(L);
});
}), [P, U] = et(b), [J, X] = et(b), [Q, N] = et(b), [M, A] = et(b), pe = g.useCallback(
}), [W, U] = et(m), [J, X] = et(m), [Q, P] = et(m), [M, A] = et(m), pe = g.useCallback(
(h) => {
if (o) {
const Y = parseInt(h.dataset.index ?? "");
const z = Number.parseInt(h.dataset.index ?? "");
n.pub(de, [
{
startIndex: Y,
endIndex: Y,
startIndex: z,
endIndex: z,
size: o.itemHeight

@@ -2080,29 +2075,29 @@ }

}
b.observe(h);
m.observe(h);
},
[b, n, o]
[m, n, o]
), Ze = g.useCallback(
(h) => {
b.unobserve(h);
m.unobserve(h);
},
[b]
), E = g.useRef(null), oe = g.useRef(null), Je = g.useCallback(
[m]
), $ = g.useRef(null), oe = g.useRef(null), Je = g.useCallback(
(h) => {
h ? (oe.current = h, b.observe(h, { box: "border-box" })) : oe.current && (b.unobserve(oe.current), oe.current = null);
h ? (oe.current = h, m.observe(h, { box: "border-box" })) : oe.current && (m.unobserve(oe.current), oe.current = null);
},
[b]
), z = g.useRef(null), xe = ps(E, oe, z), ie = g.useCallback((h) => {
E.current && (E.current.scrollTop += h);
[m]
), Y = g.useRef(null), Se = fs($, oe, Y), ie = g.useCallback((h) => {
$.current && ($.current.scrollTop += h);
}, []), ee = g.useCallback(() => {
const h = E.current;
const h = $.current;
if (h !== null) {
if (z.current !== null) {
const Y = h.scrollHeight - h.clientHeight;
fn(h.scrollTop, Math.min(Y, z.current)) && (z.current = null, n.pub(Nt, !1), n.pub(Ke, h.scrollTop));
if (Y.current !== null) {
const z = h.scrollHeight - h.clientHeight;
dn(h.scrollTop, Math.min(z, Y.current)) && (Y.current = null, n.pub(Pt, !1), n.pub(Ke, h.scrollTop));
}
n.pub($, h.scrollTop);
n.pub(E, h.scrollTop);
}
}, [n]), Ce = g.useCallback(
}, [n]), Oe = g.useCallback(
(h) => {
n.pub(Yt, h.deltaY > 0 ? "down" : "up");
n.pub(zt, h.deltaY > 0 ? "down" : "up");
},

@@ -2112,16 +2107,16 @@ [n]

(h) => {
h ? (n.pub(Ct, h), E.current = h, h.addEventListener("scroll", ee), h.addEventListener("wheel", Ce), o && n.pubIn({
h ? (n.pub(Mt, h), $.current = h, h.addEventListener("scroll", ee), h.addEventListener("wheel", Oe), o && n.pubIn({
[Z]: o.viewportHeight,
[j]: o.viewportHeight,
[$]: 0
}), b.observe(h, { box: "border-box" })) : E.current && (E.current.removeEventListener("scroll", ee), E.current.removeEventListener("wheel", Ce), n.pub(Ct, null), b.unobserve(E.current), E.current = null);
[E]: 0
}), m.observe(h, { box: "border-box" })) : $.current && ($.current.removeEventListener("scroll", ee), $.current.removeEventListener("wheel", Oe), n.pub(Mt, null), m.unobserve($.current), $.current = null);
},
[b, n, ee, Ce, o]
), { items: De } = H(Me);
[m, n, ee, Oe, o]
), { items: Ne } = V(Ae);
g.useLayoutEffect(() => {
if (!hn())
if (!bn())
return;
const h = setInterval(() => {
var Y;
n.pub(j, (Y = E.current) == null ? void 0 : Y.scrollHeight);
var z;
n.pub(j, (z = $.current) == null ? void 0 : z.scrollHeight);
}, 1e3);

@@ -2131,23 +2126,23 @@ return () => {

};
}, [n]), g.useLayoutEffect(() => n.sub(Le, xe), [xe, n]), g.useLayoutEffect(() => n.sub(se, ie), [ie, n]);
}, [n]), g.useLayoutEffect(() => n.sub(Le, Se), [Se, n]), g.useLayoutEffect(() => n.sub(se, ie), [ie, n]);
const Kt = g.useCallback(() => {
var Y;
var z;
const h = [];
for (const _ of ((Y = oe.current) == null ? void 0 : Y.children) ?? []) {
if (_.dataset.index === void 0)
for (const H of ((z = oe.current) == null ? void 0 : z.children) ?? []) {
if (H.dataset.index === void 0)
continue;
const L = parseInt(_.dataset.index), Xe = parseFloat(_.dataset.knownSize ?? ""), Se = _.getBoundingClientRect().height;
if (Se === Xe)
const L = Number.parseInt(H.dataset.index), Xe = Number.parseFloat(H.dataset.knownSize ?? ""), xe = H.getBoundingClientRect().height;
if (xe === Xe)
continue;
const Oe = h[h.length - 1];
h.length === 0 || Oe.size !== Se || Oe.endIndex !== L - 1 ? h.push({ endIndex: L, size: Se, startIndex: L }) : h[h.length - 1].endIndex++;
const Ce = h[h.length - 1];
h.length === 0 || Ce.size !== xe || Ce.endIndex !== L - 1 ? h.push({ endIndex: L, size: xe, startIndex: L }) : h[h.length - 1].endIndex++;
}
n.pub(de, h);
}, [n]);
g.useLayoutEffect(() => n.sub(Dn, Kt), [Kt, n]);
const no = H(W), oo = H(lt), so = H(q), io = H(pt), ro = H(dt), lo = H(Cn), fe = H(ze), uo = H(Vn), co = H(ke), ao = H(Ae);
g.useLayoutEffect(() => n.sub(On, Kt), [Kt, n]);
const no = V(_), oo = V(rt), so = V(q), io = V(at), ro = V(gt), lo = V(An), fe = V(Ye), uo = V(eo), co = V(ke), ao = V(Me);
return g.useLayoutEffect(() => {
De.length === 0 && n.pub(On);
}, [De, n]), /* @__PURE__ */ T(fo, { children: /* @__PURE__ */ en(
x,
Ne.length === 0 && n.pub(Nn);
}, [Ne, n]), /* @__PURE__ */ y(fo, { children: /* @__PURE__ */ en(
S,
{

@@ -2162,7 +2157,7 @@ ...t,

},
...x === "div" ? { context: fe } : {},
...S === "div" ? { context: fe } : {},
children: [
i && /* @__PURE__ */ T(l, { ref: M, style: Qe, children: /* @__PURE__ */ T(i, { context: fe }) }),
s && /* @__PURE__ */ T(r, { ref: Q, style: Qe, children: /* @__PURE__ */ T(s, { context: fe }) }),
co > 0 ? /* @__PURE__ */ T(
i && /* @__PURE__ */ y(l, { ref: M, style: Qe, children: /* @__PURE__ */ y(i, { context: fe }) }),
s && /* @__PURE__ */ y(r, { ref: Q, style: Qe, children: /* @__PURE__ */ y(s, { context: fe }) }),
co > 0 ? /* @__PURE__ */ y(
"div",

@@ -2182,4 +2177,4 @@ {

},
children: De.map((h) => /* @__PURE__ */ T(
fs,
children: Ne.map((h) => /* @__PURE__ */ y(
zo,
{

@@ -2189,3 +2184,3 @@ mount: pe,

item: h,
ItemContent: m
ItemContent: v
},

@@ -2195,5 +2190,5 @@ uo({ index: h.index, data: h.data, context: fe })

}
) : y ? /* @__PURE__ */ T(y, { context: fe }) : null,
c && /* @__PURE__ */ T(p, { ref: P, style: Qe, children: /* @__PURE__ */ T(c, { context: fe }) }),
a && /* @__PURE__ */ T(v, { ref: J, style: Qe, children: /* @__PURE__ */ T(a, { context: fe }) })
) : T ? /* @__PURE__ */ y(T, { context: fe }) : null,
c && /* @__PURE__ */ y(p, { ref: W, style: Qe, children: /* @__PURE__ */ y(c, { context: fe }) }),
a && /* @__PURE__ */ y(b, { ref: J, style: Qe, children: /* @__PURE__ */ y(a, { context: fe }) })
]

@@ -2203,10 +2198,10 @@ }

};
function ms() {
return H(Ge);
function vs() {
return V(Ge);
}
function Is() {
return H(ct);
return V(ct);
}
function ks() {
const e = _t();
const e = Ht();
return g.useMemo(() => to(e), [e]);

@@ -2216,7 +2211,7 @@ }

hs as VirtuosoMessageList,
cs as VirtuosoMessageListLicense,
as as VirtuosoMessageListTestingContext,
us as VirtuosoMessageListLicense,
cs as VirtuosoMessageListTestingContext,
Is as useCurrentlyRenderedData,
ms as useVirtuosoLocation,
vs as useVirtuosoLocation,
ks as useVirtuosoMethods
};

@@ -23,3 +23,3 @@ {

},
"version": "1.9.9",
"version": "1.9.10",
"type": "module",

@@ -33,49 +33,4 @@ "module": "dist/index.js",

},
"scripts": {
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"dev": "ladle serve",
"test": "vitest",
"e2e": "npx playwright test",
"typecheck": "tsc --noEmit",
"docs:build": "npx typedoc --plugin typedoc-plugin-no-inherit --watch --excludeInternal --excludePrivate --out docs --name 'Virtuoso Message list' src/index.ts",
"docs:serve": "npx serve docs"
},
"release": {
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
]
}
]
]
},
"dependencies": {
"@mdxeditor/gurx": "^1.1.3"
"@virtuoso.dev/gurx": "1.0.0"
},

@@ -87,22 +42,12 @@ "peerDependencies": {

"devDependencies": {
"@ladle/react": "^4.0.2",
"@ladle/react": "~5.0.1",
"@ngneat/falso": "^7.2.0",
"@playwright/test": "^1.48.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^14.3.1",
"@types/node": "^20.11.25",
"@types/react": "^18.2.56",
"@types/react": "18",
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"@vitejs/plugin-react-swc": "^3.6.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.34.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"jsdom": "^24.0.0",
"prettier": "^3.2.5",
"random-avatar-generator": "^2.0.0",

@@ -112,20 +57,24 @@ "resize-observer-polyfill": "^1.5.1",

"typedoc-plugin-no-inherit": "^1.4.0",
"typescript": "^5.4.2",
"vite": "^5.1.4",
"vite-plugin-dts": "^3.7.3",
"vitest": "^1.3.1"
"typescript": "~5.7.2",
"vite": "~6.0.7",
"vite-plugin-dts": "~4.4.0",
"vitest": "3.0.0-beta.3",
"react": "18",
"react-dom": "18"
},
"engines": {
"node": ">=18"
},
"prettier": {
"printWidth": 140,
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
},
"files": [
"dist",
"CHANGELOG.md"
]
}
],
"scripts": {
"build": "tsc && vite build",
"lint": "biome check",
"ci-lint": "biome ci",
"dev": "LADLE=true ladle serve",
"test": "vitest",
"e2e": "npx playwright test",
"typecheck": "tsc --noEmit",
"docs:build": "npx typedoc --plugin typedoc-plugin-no-inherit --watch --excludeInternal --excludePrivate --out docs --name 'Virtuoso Message list' src/index.ts",
"docs:serve": "npx serve docs"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc