@procedures/collections 0.46.0 → 0.47.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/CHANGELOG.md +42 -8
  2. package/README.md +30 -0
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/index.d.ts +1 -58
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js +3 -94
  7. package/dist/index.js.map +1 -1
  8. package/dist/storage/index.d.ts +2 -2
  9. package/dist/storage/index.d.ts.map +1 -1
  10. package/dist/storage/index.js +1 -1
  11. package/dist/storage/index.js.map +1 -1
  12. package/dist/storage/memory.d.ts +1 -1
  13. package/dist/storage/memory.d.ts.map +1 -1
  14. package/dist/storage/memory.js +1 -1
  15. package/dist/storage/memory.js.map +1 -1
  16. package/dist/testing/index.d.ts +1 -1
  17. package/dist/testing/index.d.ts.map +1 -1
  18. package/dist/testing/index.js +1 -1
  19. package/dist/testing/index.js.map +1 -1
  20. package/dist/testing/storage-contract.js +1 -1
  21. package/dist/testing/storage-contract.js.map +1 -1
  22. package/dist/undo/index.d.ts +1 -1
  23. package/dist/undo/index.js +1 -1
  24. package/dist/undo/undo-log.d.ts +1 -1
  25. package/dist/undo/undo-log.js +1 -1
  26. package/package.json +6 -6
  27. package/src/index.ts +338 -213
  28. package/src/storage/index.ts +2 -2
  29. package/src/storage/memory.ts +1 -1
  30. package/src/testing/index.ts +1 -1
  31. package/src/testing/storage-contract.ts +1 -1
  32. package/src/undo/index.ts +1 -1
  33. package/src/undo/undo-log.ts +1 -1
  34. package/dist/async/async-queue.d.ts +0 -170
  35. package/dist/async/async-queue.d.ts.map +0 -1
  36. package/dist/async/async-queue.js +0 -404
  37. package/dist/async/async-queue.js.map +0 -1
  38. package/dist/async/channels.d.ts +0 -211
  39. package/dist/async/channels.d.ts.map +0 -1
  40. package/dist/async/channels.js +0 -393
  41. package/dist/async/channels.js.map +0 -1
  42. package/dist/async/settled.d.ts +0 -23
  43. package/dist/async/settled.d.ts.map +0 -1
  44. package/dist/async/settled.js +0 -32
  45. package/dist/async/settled.js.map +0 -1
  46. package/dist/behaviors/bounded.d.ts +0 -79
  47. package/dist/behaviors/bounded.d.ts.map +0 -1
  48. package/dist/behaviors/bounded.js +0 -393
  49. package/dist/behaviors/bounded.js.map +0 -1
  50. package/dist/behaviors/composite.d.ts +0 -17
  51. package/dist/behaviors/composite.d.ts.map +0 -1
  52. package/dist/behaviors/composite.js +0 -93
  53. package/dist/behaviors/composite.js.map +0 -1
  54. package/dist/behaviors/evented.d.ts +0 -154
  55. package/dist/behaviors/evented.d.ts.map +0 -1
  56. package/dist/behaviors/evented.js +0 -299
  57. package/dist/behaviors/evented.js.map +0 -1
  58. package/dist/behaviors/lru.d.ts +0 -84
  59. package/dist/behaviors/lru.d.ts.map +0 -1
  60. package/dist/behaviors/lru.js +0 -376
  61. package/dist/behaviors/lru.js.map +0 -1
  62. package/dist/behaviors/readonly.d.ts +0 -73
  63. package/dist/behaviors/readonly.d.ts.map +0 -1
  64. package/dist/behaviors/readonly.js +0 -189
  65. package/dist/behaviors/readonly.js.map +0 -1
  66. package/dist/behaviors/safe.d.ts +0 -163
  67. package/dist/behaviors/safe.d.ts.map +0 -1
  68. package/dist/behaviors/safe.js +0 -176
  69. package/dist/behaviors/safe.js.map +0 -1
  70. package/dist/behaviors/synchronized.d.ts +0 -88
  71. package/dist/behaviors/synchronized.d.ts.map +0 -1
  72. package/dist/behaviors/synchronized.js +0 -285
  73. package/dist/behaviors/synchronized.js.map +0 -1
  74. package/dist/behaviors/ttl.d.ts +0 -118
  75. package/dist/behaviors/ttl.d.ts.map +0 -1
  76. package/dist/behaviors/ttl.js +0 -354
  77. package/dist/behaviors/ttl.js.map +0 -1
  78. package/dist/contracts/model.d.ts +0 -29
  79. package/dist/contracts/model.d.ts.map +0 -1
  80. package/dist/contracts/model.js +0 -26
  81. package/dist/contracts/model.js.map +0 -1
  82. package/dist/core/effects.d.ts +0 -176
  83. package/dist/core/effects.d.ts.map +0 -1
  84. package/dist/core/effects.js +0 -180
  85. package/dist/core/effects.js.map +0 -1
  86. package/dist/core/events.d.ts +0 -192
  87. package/dist/core/events.d.ts.map +0 -1
  88. package/dist/core/events.js +0 -291
  89. package/dist/core/events.js.map +0 -1
  90. package/dist/core/middleware.d.ts +0 -231
  91. package/dist/core/middleware.d.ts.map +0 -1
  92. package/dist/core/middleware.js +0 -161
  93. package/dist/core/middleware.js.map +0 -1
  94. package/dist/core/policies.d.ts +0 -220
  95. package/dist/core/policies.d.ts.map +0 -1
  96. package/dist/core/policies.js +0 -48
  97. package/dist/core/policies.js.map +0 -1
  98. package/dist/core/traits.d.ts +0 -142
  99. package/dist/core/traits.d.ts.map +0 -1
  100. package/dist/core/traits.js +0 -8
  101. package/dist/core/traits.js.map +0 -1
  102. package/dist/fx/collectors.d.ts +0 -193
  103. package/dist/fx/collectors.d.ts.map +0 -1
  104. package/dist/fx/collectors.js +0 -375
  105. package/dist/fx/collectors.js.map +0 -1
  106. package/dist/fx/iter.d.ts +0 -166
  107. package/dist/fx/iter.d.ts.map +0 -1
  108. package/dist/fx/iter.js +0 -421
  109. package/dist/fx/iter.js.map +0 -1
  110. package/dist/impl/array-deque.d.ts +0 -112
  111. package/dist/impl/array-deque.d.ts.map +0 -1
  112. package/dist/impl/array-deque.js +0 -380
  113. package/dist/impl/array-deque.js.map +0 -1
  114. package/dist/impl/array-list.d.ts +0 -101
  115. package/dist/impl/array-list.d.ts.map +0 -1
  116. package/dist/impl/array-list.js +0 -387
  117. package/dist/impl/array-list.js.map +0 -1
  118. package/dist/impl/hash-map.d.ts +0 -149
  119. package/dist/impl/hash-map.d.ts.map +0 -1
  120. package/dist/impl/hash-map.js +0 -473
  121. package/dist/impl/hash-map.js.map +0 -1
  122. package/dist/impl/hash-set.d.ts +0 -125
  123. package/dist/impl/hash-set.d.ts.map +0 -1
  124. package/dist/impl/hash-set.js +0 -264
  125. package/dist/impl/hash-set.js.map +0 -1
  126. package/dist/impl/linked-hash-map.d.ts +0 -141
  127. package/dist/impl/linked-hash-map.d.ts.map +0 -1
  128. package/dist/impl/linked-hash-map.js +0 -442
  129. package/dist/impl/linked-hash-map.js.map +0 -1
  130. package/dist/impl/linked-list.d.ts +0 -109
  131. package/dist/impl/linked-list.d.ts.map +0 -1
  132. package/dist/impl/linked-list.js +0 -494
  133. package/dist/impl/linked-list.js.map +0 -1
  134. package/dist/impl/priority-queue.d.ts +0 -139
  135. package/dist/impl/priority-queue.d.ts.map +0 -1
  136. package/dist/impl/priority-queue.js +0 -343
  137. package/dist/impl/priority-queue.js.map +0 -1
  138. package/dist/impl/tree-map.d.ts +0 -153
  139. package/dist/impl/tree-map.d.ts.map +0 -1
  140. package/dist/impl/tree-map.js +0 -788
  141. package/dist/impl/tree-map.js.map +0 -1
  142. package/dist/impl/tree-set.d.ts +0 -112
  143. package/dist/impl/tree-set.d.ts.map +0 -1
  144. package/dist/impl/tree-set.js +0 -374
  145. package/dist/impl/tree-set.js.map +0 -1
  146. package/dist/interfaces/collection.d.ts +0 -119
  147. package/dist/interfaces/collection.d.ts.map +0 -1
  148. package/dist/interfaces/collection.js +0 -8
  149. package/dist/interfaces/collection.js.map +0 -1
  150. package/dist/interfaces/list.d.ts +0 -247
  151. package/dist/interfaces/list.d.ts.map +0 -1
  152. package/dist/interfaces/list.js +0 -8
  153. package/dist/interfaces/list.js.map +0 -1
  154. package/dist/interfaces/map.d.ts +0 -344
  155. package/dist/interfaces/map.d.ts.map +0 -1
  156. package/dist/interfaces/map.js +0 -8
  157. package/dist/interfaces/map.js.map +0 -1
  158. package/dist/interfaces/queue.d.ts +0 -304
  159. package/dist/interfaces/queue.d.ts.map +0 -1
  160. package/dist/interfaces/queue.js +0 -8
  161. package/dist/interfaces/queue.js.map +0 -1
  162. package/dist/interfaces/set.d.ts +0 -137
  163. package/dist/interfaces/set.d.ts.map +0 -1
  164. package/dist/interfaces/set.js +0 -8
  165. package/dist/interfaces/set.js.map +0 -1
  166. package/dist/order/index.d.ts +0 -7
  167. package/dist/order/index.d.ts.map +0 -1
  168. package/dist/order/index.js +0 -7
  169. package/dist/order/index.js.map +0 -1
  170. package/dist/order/rank.d.ts +0 -100
  171. package/dist/order/rank.d.ts.map +0 -1
  172. package/dist/order/rank.js +0 -286
  173. package/dist/order/rank.js.map +0 -1
  174. package/dist/storage/listeners.d.ts +0 -39
  175. package/dist/storage/listeners.d.ts.map +0 -1
  176. package/dist/storage/listeners.js +0 -65
  177. package/dist/storage/listeners.js.map +0 -1
  178. package/dist/testing/check.d.ts +0 -25
  179. package/dist/testing/check.d.ts.map +0 -1
  180. package/dist/testing/check.js +0 -85
  181. package/dist/testing/check.js.map +0 -1
  182. package/dist/utils/defaults.d.ts +0 -135
  183. package/dist/utils/defaults.d.ts.map +0 -1
  184. package/dist/utils/defaults.js +0 -322
  185. package/dist/utils/defaults.js.map +0 -1
  186. package/dist/utils/factories.d.ts +0 -144
  187. package/dist/utils/factories.d.ts.map +0 -1
  188. package/dist/utils/factories.js +0 -293
  189. package/dist/utils/factories.js.map +0 -1
  190. package/dist/utils/helpers.d.ts +0 -137
  191. package/dist/utils/helpers.d.ts.map +0 -1
  192. package/dist/utils/helpers.js +0 -221
  193. package/dist/utils/helpers.js.map +0 -1
  194. package/src/async/async-queue.ts +0 -481
  195. package/src/async/channels.ts +0 -450
  196. package/src/async/settled.ts +0 -41
  197. package/src/behaviors/bounded.ts +0 -485
  198. package/src/behaviors/composite.ts +0 -99
  199. package/src/behaviors/evented.ts +0 -464
  200. package/src/behaviors/lru.ts +0 -447
  201. package/src/behaviors/readonly.ts +0 -236
  202. package/src/behaviors/safe.ts +0 -372
  203. package/src/behaviors/synchronized.ts +0 -316
  204. package/src/behaviors/ttl.ts +0 -462
  205. package/src/contracts/model.ts +0 -44
  206. package/src/core/effects.ts +0 -323
  207. package/src/core/events.ts +0 -356
  208. package/src/core/middleware.ts +0 -415
  209. package/src/core/policies.ts +0 -316
  210. package/src/core/traits.ts +0 -164
  211. package/src/fx/collectors.ts +0 -500
  212. package/src/fx/iter.ts +0 -536
  213. package/src/impl/array-deque.ts +0 -463
  214. package/src/impl/array-list.ts +0 -490
  215. package/src/impl/hash-map.ts +0 -623
  216. package/src/impl/hash-set.ts +0 -342
  217. package/src/impl/linked-hash-map.ts +0 -572
  218. package/src/impl/linked-list.ts +0 -606
  219. package/src/impl/priority-queue.ts +0 -448
  220. package/src/impl/tree-map.ts +0 -912
  221. package/src/impl/tree-set.ts +0 -469
  222. package/src/interfaces/collection.ts +0 -141
  223. package/src/interfaces/list.ts +0 -281
  224. package/src/interfaces/map.ts +0 -405
  225. package/src/interfaces/queue.ts +0 -353
  226. package/src/interfaces/set.ts +0 -158
  227. package/src/order/index.ts +0 -6
  228. package/src/order/rank.ts +0 -271
  229. package/src/storage/listeners.ts +0 -72
  230. package/src/testing/check.ts +0 -81
  231. package/src/utils/defaults.ts +0 -345
  232. package/src/utils/factories.ts +0 -357
  233. package/src/utils/helpers.ts +0 -248
package/src/index.ts CHANGED
@@ -48,241 +48,366 @@
48
48
  * )
49
49
  */
50
50
 
51
- // ============================================================================
52
- // Core types and utilities
53
- // ============================================================================
54
-
55
- export * from "./core/traits.js";
56
- export * from "./core/effects.js";
57
- export * from "./core/policies.js";
58
- export * from "./core/middleware.js";
59
- export * from "./core/events.js";
60
- // ============================================================================
61
- // Interfaces
62
- // ============================================================================
63
-
64
- export * from "./interfaces/collection.js";
65
- export * from "./interfaces/list.js";
66
- export * from "./interfaces/map.js";
67
- export * from "./interfaces/set.js";
68
-
69
- // ============================================================================
70
- // Storage
71
- // ============================================================================
72
-
51
+ // The storage, the overlay and the undo log stay in this package.
73
52
  export * from "./storage/index.js";
74
-
75
- // The overlay: a logical document through a stack of layers, and the stacks from rules
76
53
  export * from "./overlay/index.js";
77
-
78
- // The order of a list as data: a rank between two neighbors, and the index of a drop
79
- export * from "./order/index.js";
80
-
81
- // The undo of the changes of items: the inverse of a patch, and an undo log
82
54
  export * from "./undo/index.js";
83
55
 
84
- // Export queue interfaces with disambiguation for PriorityQueue
85
- export type {
86
- ReadonlyQueue,
87
- Queue,
88
- Deque,
89
- BlockingQueue,
90
- PriorityQueue as IPriorityQueue,
91
- AsyncQueue as IAsyncQueue,
92
- TransferQueue,
93
- DelayQueue,
94
- } from "./interfaces/queue.js";
95
-
96
- // ============================================================================
97
- // Implementations
98
- // ============================================================================
99
-
100
- export * from "./impl/array-list.js";
101
- export * from "./impl/array-deque.js";
102
- export * from "./impl/hash-map.js";
103
- export * from "./impl/linked-hash-map.js";
104
- export * from "./impl/tree-map.js";
105
- export * from "./impl/tree-set.js";
106
- export * from "./impl/linked-list.js";
107
- export * from "./impl/hash-set.js";
108
- export * from "./impl/priority-queue.js";
109
-
110
- // ============================================================================
111
- // Behaviors
112
- // ============================================================================
113
-
114
- // Export bounded behaviors (excluding duplicate BoundedCollection interface)
56
+ // The lists, sets, maps, queues, behaviors, channels and lazy operations are in the general package.
115
57
  export {
58
+ type ArrayConvertible,
59
+ ArrayDeque,
60
+ type ArrayDequeOptions,
61
+ ArrayList,
62
+ type ArrayListOptions,
63
+ type Async,
64
+ AsyncEmitter,
65
+ type AsyncOption,
66
+ AsyncQueue,
67
+ type AsyncQueueOptions,
68
+ type AsyncResult,
69
+ type Asyncify,
70
+ type BiMap,
71
+ type BlockingQueue,
72
+ type Bounded,
73
+ type BoundedCollection,
116
74
  type BoundedOptions,
117
- boundedList,
118
- boundedQueue,
75
+ Channel,
76
+ type CircularList,
77
+ type Clearable,
78
+ type Cloneable,
79
+ type Collection,
80
+ CollectionBuilder,
81
+ type CollectionEvents,
82
+ type Collector,
83
+ type CompactionPolicy,
84
+ type Compare,
85
+ type ComparisonProvider,
86
+ type ConflictResolutionPolicy,
87
+ DEFAULT_CONFLICT_POLICY,
88
+ DEFAULT_EVICTION_POLICY,
89
+ DEFAULT_GROWTH_POLICY,
90
+ DEFAULT_OVERFLOW_POLICY,
91
+ DEFAULT_RETRY_POLICY,
92
+ DEFAULT_UNDERFLOW_POLICY,
93
+ DEFAULT_VALIDATION_POLICY,
94
+ type DelayQueue,
95
+ type Deque,
96
+ type DequeEvents,
97
+ type Disposable,
98
+ type ElementOf,
99
+ type ElementType,
100
+ Emitter,
101
+ type Emptiable,
102
+ type Entry,
103
+ type Eq,
104
+ type EqualityProvider,
105
+ Err,
106
+ EventBatcher,
107
+ type EventMap,
108
+ type Evented,
109
+ type EvictionCandidate,
110
+ type EvictionMetadata,
111
+ type EvictionPolicy,
112
+ type EvictionSelector,
113
+ type Freezable,
114
+ type GrowthPolicy,
115
+ type Hash,
116
+ HashMap,
117
+ type HashMapOptions,
118
+ type HashProvider,
119
+ HashSet,
120
+ type HashSetOptions,
121
+ type IAsyncQueue,
122
+ type IPriorityQueue,
123
+ type IsReadonly,
124
+ KEY_DIGITS,
125
+ type KeyCheckOptions,
126
+ type KeyedItem,
127
+ LRUCache,
128
+ type LRUOptions,
129
+ LinkedHashMap,
130
+ type LinkedHashMapOptions,
131
+ LinkedList,
132
+ type LinkedListOptions,
133
+ type List,
134
+ type ListEvents,
135
+ type Listener,
136
+ type MapEvents,
137
+ type MapLike,
138
+ type MergeFunction,
139
+ type Middleware,
140
+ type MultiMap,
141
+ type MutableCollectionBase,
142
+ type NavigableMap,
143
+ type NavigableSet,
144
+ None,
145
+ Ok,
146
+ type Option,
147
+ type OverflowContext,
148
+ type OverflowHandler,
149
+ type OverflowPolicy,
150
+ type Point,
151
+ PriorityQueue,
152
+ type PriorityQueueOptions,
153
+ type Queue,
154
+ type QueueEvents,
155
+ type RandomAccess,
156
+ type Readonly,
157
+ type ReadonlyCollection,
158
+ type ReadonlyCollectionBase,
159
+ type ReadonlyList,
160
+ type ReadonlyMapLike,
161
+ type ReadonlyOptions,
162
+ type ReadonlyQueue,
163
+ type ReadonlySet,
164
+ type Result,
165
+ type RetryContext,
166
+ type RetryPolicy,
167
+ type RetryPredicate,
168
+ type SafeCollection,
169
+ type SafeDequeOperations,
170
+ type SafeListOperations,
171
+ type SafeMapOperations,
172
+ type SafeQueueOperations,
173
+ type SelectCase,
174
+ type Set,
175
+ type Settled,
176
+ type Sized,
177
+ Some,
178
+ type SortedMap,
179
+ type SortedSet,
180
+ type Stack,
181
+ type SummaryLocation,
182
+ type SummaryMonoid,
183
+ type SummarySearch,
184
+ type SummarySpec,
185
+ type SummaryStatistics,
186
+ SummaryTree,
187
+ TTLCache,
188
+ type TTLOptions,
189
+ type TransferQueue,
190
+ TreeMap,
191
+ type TreeMapOptions,
192
+ TreeSet,
193
+ type TreeSetOptions,
194
+ type UnderflowContext,
195
+ type UnderflowHandler,
196
+ type UnderflowPolicy,
197
+ type Unsubscribe,
198
+ type ValidationContext,
199
+ type ValidationHandler,
200
+ type ValidationPolicy,
201
+ type Vector,
202
+ type WeakMapLike,
203
+ type WithCapability,
204
+ arrayContains,
205
+ arrayDeque,
206
+ arrayIterator,
207
+ arrayList,
208
+ arrayRemove,
209
+ arrayRemoveAll,
210
+ asSettled,
211
+ asyncQueue,
212
+ average,
213
+ averagingNumber,
214
+ blockMethods,
215
+ booleanCompare,
216
+ bounded,
119
217
  boundedDeque,
218
+ boundedList,
120
219
  boundedMap,
121
- bounded,
122
- } from "./behaviors/bounded.js";
123
-
124
- export * from "./behaviors/readonly.js";
125
- export * from "./behaviors/safe.js";
126
- export * from "./behaviors/evented.js";
127
- export * from "./behaviors/synchronized.js";
128
- export * from "./behaviors/lru.js";
129
- export * from "./behaviors/ttl.js";
130
-
131
- // ============================================================================
132
- // Async/Concurrent
133
- // ============================================================================
134
-
135
- export * from "./async/async-queue.js";
136
- export * from "./async/channels.js";
137
- export * from "./async/settled.js";
138
-
139
- // ============================================================================
140
- // Functional Operations
141
- // ============================================================================
142
-
143
- export * from "./fx/iter.js";
144
- export * from "./fx/collectors.js";
145
-
146
- // ============================================================================
147
- // Utilities
148
- // ============================================================================
149
-
150
- export * from "./utils/defaults.js";
151
- export * from "./utils/factories.js";
152
- export * from "./utils/helpers.js";
153
-
154
- // ============================================================================
155
- // Re-exports for convenience
156
- // ============================================================================
157
-
158
- // Most commonly used exports
159
- export { compose, bundle } from "./core/middleware.js";
160
- export { arrayList } from "./impl/array-list.js";
161
- export { arrayDeque } from "./impl/array-deque.js";
162
- export { hashMap } from "./impl/hash-map.js";
163
- export { linkedHashMap } from "./impl/linked-hash-map.js";
164
- export { treeMap } from "./impl/tree-map.js";
165
- export { treeSet } from "./impl/tree-set.js";
166
- export { linkedList } from "./impl/linked-list.js";
167
- export { hashSet } from "./impl/hash-set.js";
168
- export { priorityQueue } from "./impl/priority-queue.js";
169
- // Common behaviors
170
- export { readonly, readonlyList, readonlyMap } from "./behaviors/readonly.js";
171
- export { safeList, safeQueue, safeMap } from "./behaviors/safe.js";
172
- export { eventedList, eventedQueue, eventedMap } from "./behaviors/evented.js";
173
- export { synchronized } from "./behaviors/synchronized.js";
174
- export { lruMap, lruCache, LRUCache } from "./behaviors/lru.js";
175
- export { ttlMap, ttlCache, TTLCache, ttlCollection } from "./behaviors/ttl.js";
176
-
177
- // Async/Concurrent
178
- export { asyncQueue, AsyncQueue } from "./async/async-queue.js";
179
- export { asSettled, type Settled } from "./async/settled.js";
180
- export {
220
+ boundedQueue,
221
+ buffered,
222
+ buildList,
223
+ buildMap,
224
+ bundle,
181
225
  channel,
182
- Channel,
183
- select,
184
- timeout,
185
- ticker,
186
- pipeline,
187
- fanOut,
188
- fanIn,
189
- merge,
190
- workerPool,
191
- } from "./async/channels.js";
192
-
193
- // Functional operations
194
- export {
195
- map,
196
- filter,
197
- flatMap,
198
- flatten,
199
- take,
200
- skip,
201
- takeWhile,
202
- skipWhile,
203
- concat,
204
- zip,
205
- enumerate,
226
+ checkBounds,
227
+ checkInsertBounds,
228
+ checkRangeBounds,
206
229
  chunk,
207
- window,
208
- partition,
209
- reduce,
210
- scan,
211
- sort,
212
- reverse,
230
+ clamp,
231
+ collect,
232
+ collectToArray,
233
+ collectToList,
234
+ collectToMap,
235
+ collectToSet,
236
+ combineHashes,
237
+ compareKeys,
238
+ comparing,
239
+ comparingKey,
240
+ compose,
241
+ concat,
242
+ count,
243
+ counting,
244
+ createEmitter,
245
+ dateCompare,
246
+ deepEq,
247
+ defaultCompare,
248
+ defaultEq,
249
+ defaultHash,
250
+ delegate,
213
251
  distinct,
214
252
  distinctConsecutive,
215
- tap,
216
- some,
253
+ dropIndex,
254
+ emptyList,
255
+ emptyMap,
256
+ emptyQueue,
257
+ enhanceMethod,
258
+ enumerate,
259
+ eqBy,
260
+ evented,
261
+ eventedDeque,
262
+ eventedList,
263
+ eventedMap,
264
+ eventedQueue,
217
265
  every,
218
- none,
266
+ fanIn,
267
+ fanOut,
268
+ filter,
269
+ filtering,
219
270
  find,
220
- count,
221
- min,
222
- max,
223
- sum,
224
- average,
225
- toArray,
226
- toSet,
227
- toMap as iterToMap,
228
- pipe,
229
- } from "./fx/iter.js";
230
-
231
- export {
232
- collect,
233
- toList as collectToList,
234
- toArray as collectToArray,
235
- toSet as collectToSet,
236
- toMap as collectToMap,
271
+ findIndex,
272
+ findLastIndex,
273
+ first,
274
+ flatMap,
275
+ flatMapOption,
276
+ flatMapResult,
277
+ flatMapping,
278
+ flatten,
279
+ forwardEvent,
280
+ fromNullable,
281
+ getOrElse,
282
+ getOrElseResult,
283
+ groupBy,
237
284
  groupingBy,
238
285
  groupingByWith,
239
- partitioningBy,
240
- counting,
241
- summingNumber,
242
- averagingNumber,
243
- minBy,
244
- maxBy,
286
+ hasCapability,
287
+ hashBy,
288
+ hashMap,
289
+ hashNumber,
290
+ hashSet,
291
+ hashString,
292
+ immutableListOf,
293
+ immutableMapOf,
294
+ interceptMethods,
295
+ isErr,
296
+ isNone,
297
+ isOk,
298
+ isSome,
299
+ isValidKey,
300
+ iterToMap,
245
301
  joining,
246
- mapping,
247
- filtering,
248
- flatMapping,
249
- reducing,
250
- reducingWith,
251
- teeing,
252
- first,
302
+ keyBetween,
303
+ keysBetween,
304
+ keysForDrop,
253
305
  last,
254
- summarizingNumber,
255
- } from "./fx/collectors.js";
256
-
257
- // Common factories
258
- export {
259
- emptyList,
260
- emptyMap,
261
- emptyQueue,
262
- singletonList,
263
- singletonMap,
264
- nCopies,
306
+ linkedHashMap,
307
+ linkedList,
265
308
  listOf,
309
+ lruCache,
310
+ lruMap,
311
+ map,
312
+ mapAsyncOption,
313
+ mapAsyncResult,
314
+ mapError,
266
315
  mapOf,
316
+ mapOption,
317
+ mapResult,
318
+ mapping,
319
+ max,
320
+ maxBy,
321
+ merge,
322
+ min,
323
+ minBy,
324
+ mutableListOf,
325
+ mutableMapOf,
326
+ nCopies,
327
+ none,
328
+ nullsFirst,
329
+ nullsLast,
330
+ numberCompare,
331
+ onWhen,
332
+ optionToResult,
333
+ partition,
334
+ partitioningBy,
335
+ pipe,
336
+ pipeline,
337
+ priorityQueue,
338
+ queueOf,
267
339
  range,
268
340
  rangeTo,
341
+ readWriteLock,
342
+ readonly,
343
+ readonlyCollection,
344
+ readonlyList,
345
+ readonlyMap,
346
+ readonlyQueue,
347
+ reduce,
348
+ reducing,
349
+ reducingWith,
350
+ reentrantSynchronized,
351
+ requireNonEmpty,
352
+ requireNonNull,
353
+ resultToOption,
354
+ reverse,
355
+ reverseArrayIterator,
356
+ reversed,
357
+ safe,
358
+ safeDeque,
359
+ safeList,
360
+ safeMap,
361
+ safeQueue,
362
+ scan,
363
+ select,
364
+ sequence,
365
+ sequenceResults,
366
+ shallowEq,
367
+ singletonList,
368
+ singletonMap,
369
+ skip,
370
+ skipWhile,
371
+ some,
372
+ sort,
373
+ stringCompare,
374
+ stringCompareIgnoreCase,
375
+ stringHashCode,
376
+ sum,
377
+ summarizingNumber,
378
+ summaryTree,
379
+ summingNumber,
380
+ synchronized,
381
+ synchronizedCollection,
382
+ synchronizedList,
383
+ synchronizedMap,
384
+ synchronizedSet,
385
+ take,
386
+ takeWhile,
387
+ tap,
388
+ teeing,
389
+ thenComparing,
390
+ ticker,
391
+ timeout,
392
+ toArray,
269
393
  toList,
270
394
  toMap,
271
- groupBy,
272
- } from "./utils/factories.js";
273
-
274
- // Effects
275
- export {
276
- None,
277
- Some,
278
- type Option,
279
- Ok,
280
- Err,
281
- type Result,
282
- isSome,
283
- isNone,
284
- isOk,
285
- isErr,
286
- getOrElse,
395
+ toNullable,
396
+ toSet,
397
+ treeMap,
398
+ treeSet,
399
+ tryCatch,
400
+ tryCatchAsync,
401
+ ttlCache,
402
+ ttlCollection,
403
+ ttlMap,
404
+ unbuffered,
405
+ unmodifiableCollection,
406
+ unmodifiableList,
407
+ unmodifiableMap,
287
408
  unwrap,
288
- } from "./core/effects.js";
409
+ unwrapResult,
410
+ window,
411
+ workerPool,
412
+ zip,
413
+ } from "@mark1russell7/collections";
@@ -74,8 +74,8 @@ export {
74
74
  export type { CurrentItem, VersionConflict, VersionOf } from "@procedures/client/query";
75
75
 
76
76
  // The listeners of the events of a storage
77
- export { StorageListeners, reportListenerError } from "./listeners.js";
78
- export type { ListenerErrorHandler } from "./listeners.js";
77
+ export { StorageListeners, reportListenerError } from "@mark1russell7/collections";
78
+ export type { ListenerErrorHandler } from "@mark1russell7/collections";
79
79
 
80
80
  export { InMemoryStorage } from "./memory.js";
81
81
  export type { InMemoryStorageOptions } from "./memory.js";
@@ -16,7 +16,7 @@ import type {
16
16
  StorageObserver,
17
17
  StorageWriteOptions,
18
18
  } from "./interface.js";
19
- import { StorageListeners, type ListenerErrorHandler } from "./listeners.js";
19
+ import { StorageListeners, type ListenerErrorHandler } from "@mark1russell7/collections";
20
20
  import {
21
21
  VersionConflictError,
22
22
  applyPatch,
@@ -17,4 +17,4 @@ export {
17
17
  type ContractTestApi,
18
18
  type ContractTestContext,
19
19
  } from "./storage-contract.js";
20
- export { ContractViolation, deepEqual } from "./check.js";
20
+ export { ContractViolation, deepEqual } from "@mark1russell7/collections/testing";
@@ -42,7 +42,7 @@ import {
42
42
  type StorageSelector,
43
43
  type VersionConflict,
44
44
  } from "@procedures/client/query";
45
- import { holds, rejects, same, show } from "./check.js";
45
+ import { holds, rejects, same, show } from "@mark1russell7/collections/testing";
46
46
 
47
47
  /** The item of the suite. Its `id` is its key, so a `HybridStorage` can sync it. */
48
48
  export interface ContractItem {
package/src/undo/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The undo of the changes of items (Graph's split, wave 2, W10). `inversePatch` gives the patch
2
+ * The undo of the changes of items. `inversePatch` gives the patch
3
3
  * that undoes a patch, and `UndoLog` keeps the undo of each change in a storage.
4
4
  */
5
5
  export { inversePatch } from "./inverse.js";
@@ -110,7 +110,7 @@ function newestFirst(a: UndoEntry, b: UndoEntry): number {
110
110
  }
111
111
 
112
112
  /**
113
- * An undo log of the changes of items in collection storages (Graph's split, wave 2, W10). Each
113
+ * An undo log of the changes of items in collection storages. Each
114
114
  * entry keeps the patch that undoes one change (`inversePatch`), or the whole item before the
115
115
  * change when no patch can undo it, and the fingerprint of the item after the change.
116
116
  *