@onekeyfe/react-native-native-list 6.7.0-alpha.418 → 6.7.0-alpha.422
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/docs/SPEC.md
CHANGED
|
@@ -2028,6 +2028,23 @@ logo groups retain their4px gap and overlap geometry. No other text-part gaps
|
|
|
2028
2028
|
change. Regression acceptance includes Dark/Light recycled visuals, preserved
|
|
2029
2029
|
network overlays, independent copy actions and Stock hover group spacing.
|
|
2030
2030
|
|
|
2031
|
+
For token visuals in Web/Electron Market tables, changing only `overlays` MUST
|
|
2032
|
+
retain the main image frame, its loaded/error visibility and pending image
|
|
2033
|
+
callbacks. Removed overlay images release their pending work. Changes to the
|
|
2034
|
+
main image descriptor or other leading-visual fields keep the existing full
|
|
2035
|
+
rebind behavior. This is a Web renderer lifecycle rule; it changes neither the
|
|
2036
|
+
snapshot schema nor the iOS/Android implementations. Acceptance covers adding,
|
|
2037
|
+
replacing and removing overlays before and after image load/failure, including
|
|
2038
|
+
consumer row-key changes, and replacing the main image source. Overlay-only
|
|
2039
|
+
updates MUST retain the existing circular bitmap clipping of padded square
|
|
2040
|
+
badges and their caller-provided geometry.
|
|
2041
|
+
Status: implemented on the 6.7.0-alpha.402 publication source. Package DOM
|
|
2042
|
+
regressions, the built-module Chromium lifecycle fixture and consuming Electron
|
|
2043
|
+
refresh/navigation badge rendering are verified. Consuming Electron acceptance
|
|
2044
|
+
also covers a manually locked refresh, user password unlock, first Market entry
|
|
2045
|
+
and a complete quote polling cycle. No native implementation or public API
|
|
2046
|
+
changes are included.
|
|
2047
|
+
|
|
2031
2048
|
Gallery collection subtitles retain an 8px trailing text inset whether or not
|
|
2032
2049
|
a network thumbnail is present. The subtitle uses border-box sizing and its row
|
|
2033
2050
|
has no extra gap, preserving the same 8px separation with a thumbnail and the
|
|
@@ -195,11 +195,32 @@ function updateCell(view, cell, primitives, index) {
|
|
|
195
195
|
if (cell.kind === 'asset') {
|
|
196
196
|
const visualKey = JSON.stringify(cell.leading);
|
|
197
197
|
if (view.visualKey !== visualKey) {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
const visualImageKey = JSON.stringify(cell.leading?.kind === 'token' ? {
|
|
199
|
+
...cell.leading,
|
|
200
|
+
overlays: undefined
|
|
201
|
+
} : cell.leading);
|
|
202
|
+
if (view.visual && cell.leading?.kind === 'token' && view.visualImageKey === visualImageKey) {
|
|
203
|
+
// Keep the main frame: its load/error callbacks own its visibility.
|
|
204
|
+
for (const overlay of view.visual.querySelectorAll(':scope > .ok-native-list-visual-overlay')) {
|
|
205
|
+
primitives.dispose(overlay);
|
|
206
|
+
overlay.remove();
|
|
207
|
+
}
|
|
208
|
+
const overlayVisual = primitives.visual({
|
|
209
|
+
kind: 'token',
|
|
210
|
+
overlays: cell.leading.overlays
|
|
211
|
+
});
|
|
212
|
+
if (overlayVisual) {
|
|
213
|
+
for (const overlay of overlayVisual.querySelectorAll(':scope > .ok-native-list-visual-overlay')) view.visual.appendChild(overlay);
|
|
214
|
+
primitives.dispose(overlayVisual);
|
|
215
|
+
}
|
|
216
|
+
} else {
|
|
217
|
+
if (view.visual) {
|
|
218
|
+
primitives.dispose(view.visual);
|
|
219
|
+
view.visual.remove();
|
|
220
|
+
}
|
|
221
|
+
view.visual = primitives.visual(cell.leading);
|
|
201
222
|
}
|
|
202
|
-
view.
|
|
223
|
+
view.visualImageKey = visualImageKey;
|
|
203
224
|
view.visualKey = visualKey;
|
|
204
225
|
if (view.visual) Object.assign(view.visual.style, {
|
|
205
226
|
width: '40px',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-native-list",
|
|
3
|
-
"version": "6.7.0-alpha.
|
|
3
|
+
"version": "6.7.0-alpha.422",
|
|
4
4
|
"description": "Template-driven native RecyclerView and UICollectionView for React Native",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"typescript": "^5.9.2"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
|
-
"@onekeyfe/react-native-image": "6.7.0-alpha.
|
|
93
|
-
"@onekeyfe/react-native-native-logger": "6.7.0-alpha.
|
|
92
|
+
"@onekeyfe/react-native-image": "6.7.0-alpha.422",
|
|
93
|
+
"@onekeyfe/react-native-native-logger": "6.7.0-alpha.422",
|
|
94
94
|
"react": "*",
|
|
95
95
|
"react-native": "*",
|
|
96
96
|
"react-native-nitro-modules": "0.37.0"
|
|
@@ -15,6 +15,7 @@ type CellViews = {
|
|
|
15
15
|
signature: string;
|
|
16
16
|
visual?: HTMLElement;
|
|
17
17
|
visualKey?: string;
|
|
18
|
+
visualImageKey?: string;
|
|
18
19
|
title?: HTMLElement;
|
|
19
20
|
resting?: HTMLElement;
|
|
20
21
|
hover?: HTMLElement;
|
|
@@ -278,11 +279,42 @@ function updateCell(
|
|
|
278
279
|
if (cell.kind === 'asset') {
|
|
279
280
|
const visualKey = JSON.stringify(cell.leading);
|
|
280
281
|
if (view.visualKey !== visualKey) {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
282
|
+
const visualImageKey = JSON.stringify(
|
|
283
|
+
cell.leading?.kind === 'token'
|
|
284
|
+
? { ...cell.leading, overlays: undefined }
|
|
285
|
+
: cell.leading
|
|
286
|
+
);
|
|
287
|
+
if (
|
|
288
|
+
view.visual &&
|
|
289
|
+
cell.leading?.kind === 'token' &&
|
|
290
|
+
view.visualImageKey === visualImageKey
|
|
291
|
+
) {
|
|
292
|
+
// Keep the main frame: its load/error callbacks own its visibility.
|
|
293
|
+
for (const overlay of view.visual.querySelectorAll<HTMLElement>(
|
|
294
|
+
':scope > .ok-native-list-visual-overlay'
|
|
295
|
+
)) {
|
|
296
|
+
primitives.dispose(overlay);
|
|
297
|
+
overlay.remove();
|
|
298
|
+
}
|
|
299
|
+
const overlayVisual = primitives.visual({
|
|
300
|
+
kind: 'token',
|
|
301
|
+
overlays: cell.leading.overlays,
|
|
302
|
+
});
|
|
303
|
+
if (overlayVisual) {
|
|
304
|
+
for (const overlay of overlayVisual.querySelectorAll<HTMLElement>(
|
|
305
|
+
':scope > .ok-native-list-visual-overlay'
|
|
306
|
+
))
|
|
307
|
+
view.visual.appendChild(overlay);
|
|
308
|
+
primitives.dispose(overlayVisual);
|
|
309
|
+
}
|
|
310
|
+
} else {
|
|
311
|
+
if (view.visual) {
|
|
312
|
+
primitives.dispose(view.visual);
|
|
313
|
+
view.visual.remove();
|
|
314
|
+
}
|
|
315
|
+
view.visual = primitives.visual(cell.leading);
|
|
284
316
|
}
|
|
285
|
-
view.
|
|
317
|
+
view.visualImageKey = visualImageKey;
|
|
286
318
|
view.visualKey = visualKey;
|
|
287
319
|
if (view.visual)
|
|
288
320
|
Object.assign(view.visual.style, {
|