@knitui/components 0.6.1 → 0.7.0
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.
- package/lib/commonjs/VirtualList/VirtualList.js +430 -57
- package/lib/commonjs/VirtualList/VirtualList.js.map +1 -1
- package/lib/commonjs/VirtualList/VirtualList.shared.js +266 -9
- package/lib/commonjs/VirtualList/VirtualList.shared.js.map +1 -1
- package/lib/module/VirtualList/VirtualList.js +432 -59
- package/lib/module/VirtualList/VirtualList.js.map +1 -1
- package/lib/module/VirtualList/VirtualList.shared.js +255 -6
- package/lib/module/VirtualList/VirtualList.shared.js.map +1 -1
- package/lib/typescript/VirtualList/VirtualList.d.ts.map +1 -1
- package/lib/typescript/VirtualList/VirtualList.shared.d.ts +205 -7
- package/lib/typescript/VirtualList/VirtualList.shared.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/VirtualList/VirtualList.shared.ts +387 -9
- package/src/VirtualList/VirtualList.tsx +462 -73
|
@@ -22,6 +22,11 @@ export interface VirtualListStyles {
|
|
|
22
22
|
/** Props spread onto each absolutely-positioned row wrapper. */
|
|
23
23
|
item?: Partial<BoxProps>;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* How much of the list stays mounted beyond the live window — see
|
|
27
|
+
* {@link VirtualListOwnProps.keepMounted} for the ladder.
|
|
28
|
+
*/
|
|
29
|
+
export type KeepMounted = boolean | number | "all";
|
|
25
30
|
/** Slot names of {@link VirtualListStyles}, for `slotStyles`. */
|
|
26
31
|
export declare const VIRTUAL_LIST_SLOTS: readonly ["scrollArea", "content", "item"];
|
|
27
32
|
/**
|
|
@@ -48,7 +53,14 @@ export interface VirtualListHandle {
|
|
|
48
53
|
}): void;
|
|
49
54
|
/** Scroll to the very top. */
|
|
50
55
|
scrollToTop(animated?: boolean): void;
|
|
51
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Scroll to the very end (bottom).
|
|
58
|
+
*
|
|
59
|
+
* Under `maintainVisibleContentPosition` a non-animated call HOLDS the end
|
|
60
|
+
* rather than hitting it once, re-deriving it as the rows there measure — which
|
|
61
|
+
* is what a list opening at the bottom of unmeasured content needs, since the
|
|
62
|
+
* total it aims at starts out mostly estimate.
|
|
63
|
+
*/
|
|
52
64
|
scrollToEnd(animated?: boolean): void;
|
|
53
65
|
/** The current vertical scroll offset (px). */
|
|
54
66
|
getScrollOffset(): number;
|
|
@@ -64,9 +76,12 @@ export interface VirtualListOwnProps<T> {
|
|
|
64
76
|
/** Render one row. Kept referentially stable (or memoize your rows). */
|
|
65
77
|
renderItem: (info: VirtualListRenderItemInfo<T>) => React.ReactNode;
|
|
66
78
|
/**
|
|
67
|
-
* Stable identity per row.
|
|
68
|
-
*
|
|
69
|
-
* so
|
|
79
|
+
* Stable identity per row. Supply this whenever rows can be inserted, removed,
|
|
80
|
+
* reordered or filtered: it is what makes the list's caches follow *items*
|
|
81
|
+
* instead of slots, so a measured height, a retained (`keepMounted`) row and its
|
|
82
|
+
* React state all move with their item. Without it the index is the identity,
|
|
83
|
+
* which is only correct for append/pop — a prepend shifts every measurement onto
|
|
84
|
+
* the wrong row and the list jumps while it re-measures.
|
|
70
85
|
*/
|
|
71
86
|
keyExtractor?: (item: T, index: number) => string;
|
|
72
87
|
/**
|
|
@@ -87,6 +102,38 @@ export interface VirtualListOwnProps<T> {
|
|
|
87
102
|
* slightly before they scroll in. @default 250
|
|
88
103
|
*/
|
|
89
104
|
drawDistance?: number;
|
|
105
|
+
/**
|
|
106
|
+
* How much stays mounted beyond the live window. Rows kept this way sit in the
|
|
107
|
+
* tree at their real offsets (clipped by the scroller), so their React state,
|
|
108
|
+
* DOM/native state and any in-flight work survive scrolling away and back — no
|
|
109
|
+
* re-fetch, no reset inputs, no video restarting.
|
|
110
|
+
*
|
|
111
|
+
* An escalating ladder, cheapest first:
|
|
112
|
+
*
|
|
113
|
+
* - `false` (default) — pure virtualization: leaving the window unmounts.
|
|
114
|
+
* - a number — keep at most that many already-seen rows outside the current
|
|
115
|
+
* window, evicting the least-recently-visible first (an LRU warm pool).
|
|
116
|
+
* The safe choice for long lists: bounded memory, and the rows the user is
|
|
117
|
+
* likely to come back to are exactly the ones kept.
|
|
118
|
+
* - `true` — keep every row that has ever been mounted, for as long as it is in
|
|
119
|
+
* `data`. Unbounded, but still LAZY: a row the user has never scrolled to has
|
|
120
|
+
* never mounted, so a 10k-row list costs nothing until it is scrolled.
|
|
121
|
+
* - `"all"` — no windowing at all. Every row in `data` is mounted immediately,
|
|
122
|
+
* whether or not it has ever been on screen, and `drawDistance` is moot. This
|
|
123
|
+
* is the escape hatch for when rows must exist before they are seen — measuring
|
|
124
|
+
* them all up front, letting `Ctrl-F`/find-in-page reach every row, printing,
|
|
125
|
+
* or driving something that needs the whole tree. It gives up the entire point
|
|
126
|
+
* of virtualization: mount cost is O(data), so keep it to lists of a size you
|
|
127
|
+
* would have rendered with `.map()` anyway.
|
|
128
|
+
*
|
|
129
|
+
* Kept rows are still measured and still re-render on `extraData`. Under a number
|
|
130
|
+
* or `true` they do NOT widen {@link VirtualListOwnProps.onRenderedRangeChange},
|
|
131
|
+
* which keeps reporting the live window; under `"all"` the window IS the whole
|
|
132
|
+
* list, so it reports `{ start: 0, end: data.length - 1 }`.
|
|
133
|
+
*
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
keepMounted?: KeepMounted;
|
|
90
137
|
/** Re-render trigger for `renderItem` when external state changes (PureComponent-style). */
|
|
91
138
|
extraData?: unknown;
|
|
92
139
|
/** Fired once as the end (bottom) comes within `onEndReachedThreshold` viewports. */
|
|
@@ -96,6 +143,45 @@ export interface VirtualListOwnProps<T> {
|
|
|
96
143
|
* length (a viewport). @default 0.5
|
|
97
144
|
*/
|
|
98
145
|
onEndReachedThreshold?: number;
|
|
146
|
+
/**
|
|
147
|
+
* Fired once as the start (top) comes within `onStartReachedThreshold`
|
|
148
|
+
* viewports — the mirror of {@link onEndReached}, for a list paginated
|
|
149
|
+
* BACKWARDS (a chat thread loading older messages, a log tailing history).
|
|
150
|
+
*
|
|
151
|
+
* Like `onEndReached` on a list shorter than its viewport, this fires on mount
|
|
152
|
+
* when the list rests at offset 0, because it genuinely IS at the start. A
|
|
153
|
+
* caller that opens the list scrolled elsewhere (`scrollToEnd` on a chat
|
|
154
|
+
* thread) should gate its loader until that initial scroll has been applied,
|
|
155
|
+
* or the first frame spends a page request on nothing.
|
|
156
|
+
*
|
|
157
|
+
* Pair it with `maintainVisibleContentPosition` — without it, the rows the
|
|
158
|
+
* user is reading slide down by the height of whatever gets prepended.
|
|
159
|
+
*/
|
|
160
|
+
onStartReached?: () => void;
|
|
161
|
+
/**
|
|
162
|
+
* Distance from the start at which `onStartReached` fires, in units of visible
|
|
163
|
+
* length (a viewport). @default 0.5
|
|
164
|
+
*/
|
|
165
|
+
onStartReachedThreshold?: number;
|
|
166
|
+
/**
|
|
167
|
+
* Hold the reading position across a layout change instead of letting the rows
|
|
168
|
+
* slide. Two things stop being jumpy:
|
|
169
|
+
*
|
|
170
|
+
* - A **prepend** (a `onStartReached` page of history) has its inserted height
|
|
171
|
+
* added to the scroll offset in the same frame, so the row the user was
|
|
172
|
+
* looking at does not move. Requires `keyExtractor` — a prepend is detected by
|
|
173
|
+
* finding the previous first row's key at its new index, and index keys carry
|
|
174
|
+
* no identity to find it by.
|
|
175
|
+
* - A non-animated **`scrollToEnd`** holds the bottom while the rows there
|
|
176
|
+
* measure, rather than aiming once at a total that is still mostly estimate.
|
|
177
|
+
*
|
|
178
|
+
* Off by default: it takes over the scroll position, which a list that only
|
|
179
|
+
* grows at the tail has no reason to hand over. Either correction is abandoned
|
|
180
|
+
* the moment the user scrolls — continuing to correct through a live gesture
|
|
181
|
+
* would fight it — and as soon as the rows in question have all been measured,
|
|
182
|
+
* since nothing can move after that.
|
|
183
|
+
*/
|
|
184
|
+
maintainVisibleContentPosition?: boolean;
|
|
99
185
|
/**
|
|
100
186
|
* The set of currently-rendered row indices whenever it changes. Useful for
|
|
101
187
|
* prefetch/telemetry; not a viewability report (that is phase 2).
|
|
@@ -123,6 +209,10 @@ export declare const DEFAULT_ESTIMATED_ITEM_SIZE = 200;
|
|
|
123
209
|
export declare const DEFAULT_DRAW_DISTANCE = 250;
|
|
124
210
|
/** Default `onEndReached` threshold, in viewports. */
|
|
125
211
|
export declare const DEFAULT_END_REACHED_THRESHOLD = 0.5;
|
|
212
|
+
/** Default `onStartReached` threshold, in viewports. */
|
|
213
|
+
export declare const DEFAULT_START_REACHED_THRESHOLD = 0.5;
|
|
214
|
+
/** Height change (px) at or below which a measurement is treated as unchanged. */
|
|
215
|
+
export declare const MEASURE_EPSILON = 0.5;
|
|
126
216
|
/**
|
|
127
217
|
* Cumulative running mean of every measured size for a type. Kept as a
|
|
128
218
|
* converging mean (running sum + count) rather than a short rolling window so
|
|
@@ -135,6 +225,11 @@ interface AverageBucket {
|
|
|
135
225
|
sum: number;
|
|
136
226
|
count: number;
|
|
137
227
|
}
|
|
228
|
+
/** One row's measurement, cached against its stable key. */
|
|
229
|
+
interface CachedMeasurement {
|
|
230
|
+
height: number;
|
|
231
|
+
type: string | number;
|
|
232
|
+
}
|
|
138
233
|
/**
|
|
139
234
|
* Mutable layout model for a variable-height, single-axis list. Holds each row
|
|
140
235
|
* wrapper's measured height (or a per-type estimate until measured) and lazily
|
|
@@ -153,18 +248,53 @@ export interface LayoutState {
|
|
|
153
248
|
averages: Map<string | number, AverageBucket>;
|
|
154
249
|
/** Lowest index whose offset may be stale; `count + 1` means clean. */
|
|
155
250
|
dirtyFrom: number;
|
|
251
|
+
/**
|
|
252
|
+
* The key of each row, when the caller supplied a `keyExtractor`; `null` in
|
|
253
|
+
* index mode. Present keys make measurements follow *items* rather than slots —
|
|
254
|
+
* see {@link syncLayoutKeys}.
|
|
255
|
+
*/
|
|
256
|
+
keys: readonly string[] | null;
|
|
257
|
+
/** Measurement per key, so a row keeps its height across data changes. */
|
|
258
|
+
cache: Map<string, CachedMeasurement>;
|
|
156
259
|
}
|
|
157
260
|
/** Create a layout store for `count` rows, seeding every row with `estimate`. */
|
|
158
261
|
export declare const createLayoutState: (count: number, estimate: number) => LayoutState;
|
|
159
262
|
/** Height of row `i` — its measurement if present, else the per-type estimate. */
|
|
160
263
|
export declare const heightAt: (state: LayoutState, i: number) => number;
|
|
264
|
+
/**
|
|
265
|
+
* Re-key the store to `keys` (one per row, in data order) and restore each row's
|
|
266
|
+
* measurement from the per-key cache.
|
|
267
|
+
*
|
|
268
|
+
* This is what makes a data change *identity-correct* rather than slot-correct, and
|
|
269
|
+
* it is the store half of backwards pagination. Index-keyed measurement is only
|
|
270
|
+
* right for append/pop: prepend one row and every height shifts to the wrong item,
|
|
271
|
+
* so the list reflows for the whole first scroll back up, re-learning heights in
|
|
272
|
+
* slots that already claimed to know them. Keyed by the caller's `keyExtractor`, a
|
|
273
|
+
* prepend, insert, removal, sort or filter moves each height with its item, and rows
|
|
274
|
+
* already measured never flash.
|
|
275
|
+
*
|
|
276
|
+
* Rebuilds the per-index arrays from the cache (O(n) — run only when the key list
|
|
277
|
+
* actually changes, not per render) and marks offsets stale from the first row that
|
|
278
|
+
* moved. Restored measurements deliberately do NOT re-feed the per-type running
|
|
279
|
+
* averages: they were counted when first measured.
|
|
280
|
+
*/
|
|
281
|
+
export declare const syncLayoutKeys: (state: LayoutState, keys: readonly string[]) => void;
|
|
161
282
|
/**
|
|
162
283
|
* Grow/shrink the store to `count` rows, preserving existing measurements by
|
|
163
|
-
* index
|
|
164
|
-
*
|
|
165
|
-
*
|
|
284
|
+
* index — correct for an append or a pop, which is what row `i` keeping its height
|
|
285
|
+
* means, and the only option in index mode (no `keyExtractor`). A PREPEND is not
|
|
286
|
+
* that shape, and neither is a reorder or a filter: supply a `keyExtractor` and
|
|
287
|
+
* {@link syncLayoutKeys} keeps every measurement attached to its item across any
|
|
288
|
+
* data change instead. Returns the new state (same instance, mutated) so callers
|
|
289
|
+
* can keep their ref.
|
|
166
290
|
*/
|
|
167
291
|
export declare const resizeLayoutState: (state: LayoutState, count: number) => LayoutState;
|
|
292
|
+
/**
|
|
293
|
+
* Whether every row in `[from, to)` carries a real measurement — i.e. whether
|
|
294
|
+
* anything in that band can still move. Used to release the prepend anchor once
|
|
295
|
+
* the inserted rows have settled.
|
|
296
|
+
*/
|
|
297
|
+
export declare const areRowsMeasured: (state: LayoutState, from: number, to: number) => boolean;
|
|
168
298
|
/**
|
|
169
299
|
* Record a measured wrapper height for row `i` of `type`. Updates the per-type
|
|
170
300
|
* running average and marks offsets stale from `i`. Returns `true` when the
|
|
@@ -184,5 +314,73 @@ export declare const findVisibleRange: (state: LayoutState, scrollStart: number,
|
|
|
184
314
|
start: number;
|
|
185
315
|
end: number;
|
|
186
316
|
};
|
|
317
|
+
/**
|
|
318
|
+
* The `keepMounted` warm pool: which already-seen rows stay mounted after they
|
|
319
|
+
* leave the window. A `Set` doubles as the LRU order — JS iterates insertion
|
|
320
|
+
* order, and re-visiting a row is `delete` + `add`, which moves it to the back —
|
|
321
|
+
* so the front of the set is always the least-recently-visible row and eviction
|
|
322
|
+
* is a forward walk.
|
|
323
|
+
*/
|
|
324
|
+
export interface RetainState {
|
|
325
|
+
/** Every retained index, oldest-visible first. */
|
|
326
|
+
seen: Set<number>;
|
|
327
|
+
/**
|
|
328
|
+
* Bumped on every content change. The component derives its mounted extras from
|
|
329
|
+
* the pool during render rather than mirroring them into state (state would go
|
|
330
|
+
* stale the moment a data change remapped the pool mid-render); this counter is
|
|
331
|
+
* what lets that derivation be cached across the renders in between.
|
|
332
|
+
*/
|
|
333
|
+
version: number;
|
|
334
|
+
}
|
|
335
|
+
/** Create an empty retention pool. */
|
|
336
|
+
export declare const createRetainState: () => RetainState;
|
|
337
|
+
/** Empty extras list — a shared constant so "nothing retained" is one identity. */
|
|
338
|
+
export declare const NO_RETAINED: readonly number[];
|
|
339
|
+
/** The `keepMounted` value that turns windowing off entirely. */
|
|
340
|
+
export declare const MOUNT_ALL = "all";
|
|
341
|
+
/** Whether `keepMounted` asks for the whole list to be mounted up front. */
|
|
342
|
+
export declare const isMountAll: (keepMounted: KeepMounted | undefined) => boolean;
|
|
343
|
+
/**
|
|
344
|
+
* Resolve the `keepMounted` prop to a pool capacity: `0` (off), a positive integer,
|
|
345
|
+
* or `Infinity` (unbounded). `"all"` resolves to `0` — with every row inside the
|
|
346
|
+
* window there is nothing left for a pool to hold.
|
|
347
|
+
*/
|
|
348
|
+
export declare const resolveRetainLimit: (keepMounted: KeepMounted | undefined) => number;
|
|
349
|
+
/**
|
|
350
|
+
* Fold the live window `range` into the pool: rows in the window are (re)marked
|
|
351
|
+
* most-recently-visible (which is also how a row first enters the pool), rows the
|
|
352
|
+
* data no longer has are dropped, and once the rows outside the window exceed
|
|
353
|
+
* `limit` the least-recently-visible ones are evicted until they fit. A `limit` of
|
|
354
|
+
* `0` empties the pool, so turning `keepMounted` off releases everything.
|
|
355
|
+
*
|
|
356
|
+
* Mutates `state`, bumping `state.version` only when something actually changed,
|
|
357
|
+
* and is idempotent for an unchanged `(range, count, limit)`. Read the result with
|
|
358
|
+
* {@link retainedOutside}.
|
|
359
|
+
*/
|
|
360
|
+
export declare const retainRange: (state: RetainState, range: {
|
|
361
|
+
start: number;
|
|
362
|
+
end: number;
|
|
363
|
+
}, count: number, limit: number) => void;
|
|
364
|
+
/**
|
|
365
|
+
* The retained rows that fall OUTSIDE `range`, ascending — exactly the extra rows
|
|
366
|
+
* to mount on top of the window. Pure: safe to call during render.
|
|
367
|
+
*/
|
|
368
|
+
export declare const retainedOutside: (state: RetainState, range: {
|
|
369
|
+
start: number;
|
|
370
|
+
end: number;
|
|
371
|
+
}, count: number) => number[];
|
|
372
|
+
/**
|
|
373
|
+
* Move the pool's indices onto a new key list, so "already mounted" tracks the
|
|
374
|
+
* *item* across a data change instead of the slot it happened to occupy. Rows that
|
|
375
|
+
* left the data drop out; the LRU order is preserved (a `Set` rebuilt in iteration
|
|
376
|
+
* order keeps oldest-visible first). A no-op when nothing is retained.
|
|
377
|
+
*/
|
|
378
|
+
export declare const remapRetainState: (state: RetainState, oldKeys: readonly string[], newKeys: readonly string[]) => void;
|
|
379
|
+
/**
|
|
380
|
+
* One-level equality for two prop bags. Used to give an inline `styles.item`
|
|
381
|
+
* object a stable identity across renders, so a caller writing the idiomatic
|
|
382
|
+
* `styles={{ item: { … } }}` literal does not defeat every row's memo.
|
|
383
|
+
*/
|
|
384
|
+
export declare const shallowEqualProps: (a: Record<string, unknown>, b: Record<string, unknown>) => boolean;
|
|
187
385
|
export {};
|
|
188
386
|
//# sourceMappingURL=VirtualList.shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualList.shared.d.ts","sourceRoot":"","sources":["../../../src/VirtualList/VirtualList.shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD,0EAA0E;AAC1E,MAAM,WAAW,yBAAyB,CAAC,CAAC;IAC1C,kCAAkC;IAClC,IAAI,EAAE,CAAC,CAAC;IACR,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,2DAA2D;IAC3D,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/B,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC5B,gEAAgE;IAChE,IAAI,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC1B;AAED,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,4CAI0B,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,aAAa,CAAC,OAAO,EAAE;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE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AE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EACrC,OAAO,MAAM,KACZ,MAAM,EAWR,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,WAAW,EAClB,SAAS,SAAS,MAAM,EAAE,EAC1B,SAAS,SAAS,MAAM,EAAE,KACzB,IAaF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAC5B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1B,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KACzB,OAQF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knitui/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Cross-platform (React Native + Web) component kit for Knit UI.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "The Haus <joost@the.haus>",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"sideEffects": false,
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"expo-image": "~57.0.1",
|
|
64
|
-
"@knitui/core": "0.
|
|
65
|
-
"@knitui/hooks": "0.
|
|
66
|
-
"@knitui/icons": "0.
|
|
64
|
+
"@knitui/core": "0.7.0",
|
|
65
|
+
"@knitui/hooks": "0.7.0",
|
|
66
|
+
"@knitui/icons": "0.7.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"react": "*",
|
|
@@ -91,22 +91,22 @@
|
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@babel/core": "^7.25.0",
|
|
93
93
|
"@playwright/test": "^1.50.0",
|
|
94
|
-
"@storybook/addon-docs": "^10.5.
|
|
95
|
-
"@storybook/react-vite": "^10.5.
|
|
94
|
+
"@storybook/addon-docs": "^10.5.5",
|
|
95
|
+
"@storybook/react-vite": "^10.5.5",
|
|
96
96
|
"@tamagui/build": "^2.4.6",
|
|
97
97
|
"@testing-library/jest-dom": "^6.6.3",
|
|
98
98
|
"@testing-library/react": "^16.1.0",
|
|
99
99
|
"@testing-library/user-event": "^14.5.2",
|
|
100
100
|
"@types/jest": "^29.5.12",
|
|
101
101
|
"@types/react": "~19.2.0",
|
|
102
|
-
"@vitejs/plugin-react": "^6.0.
|
|
102
|
+
"@vitejs/plugin-react": "^6.0.4",
|
|
103
103
|
"babel-jest": "^29.7.0",
|
|
104
|
-
"babel-preset-expo": "^57.0.
|
|
104
|
+
"babel-preset-expo": "^57.0.5",
|
|
105
105
|
"jest": "^29.7.0",
|
|
106
106
|
"jest-environment-jsdom": "^29.7.0",
|
|
107
107
|
"react": "19.2.3",
|
|
108
108
|
"react-dom": "19.2.3",
|
|
109
|
-
"react-native": "0.86.
|
|
109
|
+
"react-native": "0.86.2",
|
|
110
110
|
"react-native-builder-bob": "^0.43.0",
|
|
111
111
|
"react-native-web": "~0.21.0",
|
|
112
112
|
"storybook": "^10.5.3",
|