@onekeyfe/react-native-native-list 6.7.0-3 → 6.7.0-4
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 +8 -2
- package/lib/module/web/NativeListWebEngine.js +4 -1
- package/lib/module/web/templates/MarketTableRowRenderer.js +1 -0
- package/lib/module/web/templates/MediaTileRowRenderer.js +2 -2
- package/package.json +3 -3
- package/src/web/NativeListWebEngine.ts +4 -1
- package/src/web/templates/MarketTableRowRenderer.ts +3 -0
- package/src/web/templates/MediaTileRowRenderer.ts +2 -2
package/docs/SPEC.md
CHANGED
|
@@ -953,6 +953,11 @@ matching the consumer's existing finite logo group. Geometry/badge/image changes
|
|
|
953
953
|
use normal rebind and release replaced image leases; price-only updates retain
|
|
954
954
|
these nodes. No native caller emits these Web-only fields.
|
|
955
955
|
|
|
956
|
+
Web gallery media follows the shared input precedence: media wins over image,
|
|
957
|
+
unless an explicit empty/error imageState suppresses media probing. An empty/error
|
|
958
|
+
gallery without either source retains the gallery fallback surface when
|
|
959
|
+
imageState explicitly selects that state.
|
|
960
|
+
|
|
956
961
|
Web gallery media preserves the consuming NFT card presentation: healthy image
|
|
957
962
|
and exhausted fallback surfaces have a10px radius, while a healthy video surface
|
|
958
963
|
has square corners. The image/video frame uses the list page background; only
|
|
@@ -1008,8 +1013,9 @@ sources without changing default native mapper output.
|
|
|
1008
1013
|
|
|
1009
1014
|
ImageSource.fallbackUris is an optional Web-only ordered continuation after uri.
|
|
1010
1015
|
It retains the complete caller-provided sequence (no truncation or deduplication).
|
|
1011
|
-
|
|
1012
|
-
|
|
1016
|
+
Empty or unusable continuation entries are skipped in order until a usable URI
|
|
1017
|
+
is found or the complete sequence is exhausted. Exhaustion reaches the declared
|
|
1018
|
+
visual fallback. Skipped entries consume no retry budget; each usable URI
|
|
1013
1019
|
uses its declared retryTimes before proceeding; Market Web callers pass the
|
|
1014
1020
|
existing ImageV2 default of one retry per source. This array path does not change
|
|
1015
1021
|
legacy fallbackUri switching/retry order when fallbackUris is absent. Native
|
|
@@ -581,7 +581,10 @@ function configureWebImageRetry(image, source, initialUri) {
|
|
|
581
581
|
}
|
|
582
582
|
if (orderedFallbacks !== undefined && retryCount >= retryLimit) {
|
|
583
583
|
if (fallbackIndex >= orderedFallbacks.length) return;
|
|
584
|
-
|
|
584
|
+
let nextUri;
|
|
585
|
+
while (!nextUri && fallbackIndex < orderedFallbacks.length) {
|
|
586
|
+
nextUri = safeImageUri(orderedFallbacks[fallbackIndex++]);
|
|
587
|
+
}
|
|
585
588
|
if (!nextUri) return;
|
|
586
589
|
event.stopImmediatePropagation();
|
|
587
590
|
retryCount = 0;
|
|
@@ -239,6 +239,7 @@ function updateCell(view, cell, primitives, index) {
|
|
|
239
239
|
view.resting?.replaceChildren(...(cell.secondary ?? []).map(part => textPart(document, part, true)));
|
|
240
240
|
if (view.hover) {
|
|
241
241
|
const button = view.hover.querySelector('button');
|
|
242
|
+
view.hover.parentElement?.querySelector('button')?.setAttribute('aria-label', cell.hoverActionLabel ?? 'Copy address');
|
|
242
243
|
for (const child of [...view.hover.children]) if (child !== button) child.remove();
|
|
243
244
|
for (const part of cell.hoverSecondary ?? []) view.hover.insertBefore(textPart(document, part, true), button);
|
|
244
245
|
}
|
|
@@ -122,7 +122,7 @@ function recycleLegacy(body) {
|
|
|
122
122
|
v.imageKey = v.networkKey = '';
|
|
123
123
|
}
|
|
124
124
|
const galleries = new WeakMap();
|
|
125
|
-
const isGalleryMedia = row => row.variant === 'gallery' && !row.image;
|
|
125
|
+
const isGalleryMedia = row => row.variant === 'gallery' && (!row.image || !!row.media && !row.imageState);
|
|
126
126
|
function clearGalleryMedia(v) {
|
|
127
127
|
v.epoch += 1;
|
|
128
128
|
v.frame.style.borderRadius = '10px';
|
|
@@ -249,7 +249,7 @@ function bindGallery(body, row, primitives) {
|
|
|
249
249
|
v.mediaKey = mediaKey;
|
|
250
250
|
v.fallback.style.visibility = 'visible';
|
|
251
251
|
const epoch = v.epoch;
|
|
252
|
-
const source = row.media?.source;
|
|
252
|
+
const source = row.imageState ? undefined : row.media?.source;
|
|
253
253
|
const probe = attempt => {
|
|
254
254
|
if (v.epoch !== epoch) return;
|
|
255
255
|
const kind = row.media?.probeOrder[attempt];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-native-list",
|
|
3
|
-
"version": "6.7.0-
|
|
3
|
+
"version": "6.7.0-4",
|
|
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",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"typescript": "^5.9.2"
|
|
87
87
|
},
|
|
88
88
|
"peerDependencies": {
|
|
89
|
-
"@onekeyfe/react-native-image": "6.7.0-
|
|
90
|
-
"@onekeyfe/react-native-native-logger": "6.7.0-
|
|
89
|
+
"@onekeyfe/react-native-image": "6.7.0-4",
|
|
90
|
+
"@onekeyfe/react-native-native-logger": "6.7.0-4",
|
|
91
91
|
"react": "*",
|
|
92
92
|
"react-native": "*",
|
|
93
93
|
"react-native-nitro-modules": "0.37.0"
|
|
@@ -987,7 +987,10 @@ function configureWebImageRetry(
|
|
|
987
987
|
}
|
|
988
988
|
if (orderedFallbacks !== undefined && retryCount >= retryLimit) {
|
|
989
989
|
if (fallbackIndex >= orderedFallbacks.length) return;
|
|
990
|
-
|
|
990
|
+
let nextUri: string | undefined;
|
|
991
|
+
while (!nextUri && fallbackIndex < orderedFallbacks.length) {
|
|
992
|
+
nextUri = safeImageUri(orderedFallbacks[fallbackIndex++]);
|
|
993
|
+
}
|
|
991
994
|
if (!nextUri) return;
|
|
992
995
|
event.stopImmediatePropagation();
|
|
993
996
|
retryCount = 0;
|
|
@@ -344,6 +344,9 @@ function updateCell(
|
|
|
344
344
|
);
|
|
345
345
|
if (view.hover) {
|
|
346
346
|
const button = view.hover.querySelector('button');
|
|
347
|
+
view.hover.parentElement
|
|
348
|
+
?.querySelector('button')
|
|
349
|
+
?.setAttribute('aria-label', cell.hoverActionLabel ?? 'Copy address');
|
|
347
350
|
for (const child of [...view.hover.children])
|
|
348
351
|
if (child !== button) child.remove();
|
|
349
352
|
for (const part of cell.hoverSecondary ?? [])
|
|
@@ -192,7 +192,7 @@ type GalleryViews = {
|
|
|
192
192
|
};
|
|
193
193
|
const galleries = new WeakMap<HTMLElement, GalleryViews>();
|
|
194
194
|
const isGalleryMedia = (row: MediaTileRow) =>
|
|
195
|
-
row.variant === 'gallery' && !row.image;
|
|
195
|
+
row.variant === 'gallery' && (!row.image || (!!row.media && !row.imageState));
|
|
196
196
|
|
|
197
197
|
function clearGalleryMedia(v: GalleryViews) {
|
|
198
198
|
v.epoch += 1;
|
|
@@ -332,7 +332,7 @@ function bindGallery(
|
|
|
332
332
|
v.mediaKey = mediaKey;
|
|
333
333
|
v.fallback.style.visibility = 'visible';
|
|
334
334
|
const epoch = v.epoch;
|
|
335
|
-
const source = row.media?.source;
|
|
335
|
+
const source = row.imageState ? undefined : row.media?.source;
|
|
336
336
|
const probe = (attempt: number) => {
|
|
337
337
|
if (v.epoch !== epoch) return;
|
|
338
338
|
const kind = row.media?.probeOrder[attempt];
|