@onekeyfe/react-native-native-list 6.7.0-4 → 6.7.0-41
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/README.md +4 -0
- package/android/src/main/java/com/onekey/nativelist/HybridNativeList.kt +14 -1
- package/android/src/main/java/com/onekey/nativelist/NativeListAccessoryStack.kt +250 -9
- package/android/src/main/java/com/onekey/nativelist/NativeListActivityDetailsView.kt +35 -7
- package/android/src/main/java/com/onekey/nativelist/NativeListActivityRenderer.kt +25 -3
- package/android/src/main/java/com/onekey/nativelist/NativeListAdapter.kt +17 -1
- package/android/src/main/java/com/onekey/nativelist/NativeListButtonGroupRenderer.kt +102 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListContainerSlotAdapter.kt +12 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListDataRowRenderer.kt +102 -7
- package/android/src/main/java/com/onekey/nativelist/NativeListGeneratedIcons.kt +47 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +225 -11
- package/android/src/main/java/com/onekey/nativelist/NativeListLeadingVisual.kt +152 -33
- package/android/src/main/java/com/onekey/nativelist/NativeListMarketRenderer.kt +92 -28
- package/android/src/main/java/com/onekey/nativelist/NativeListMediaPlaceholderView.kt +244 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListMediaPreviewSlot.kt +66 -31
- package/android/src/main/java/com/onekey/nativelist/NativeListMediaTileRenderer.kt +32 -11
- package/android/src/main/java/com/onekey/nativelist/NativeListMessageRenderer.kt +25 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +149 -3
- package/android/src/main/java/com/onekey/nativelist/NativeListPrimitives.kt +120 -287
- package/android/src/main/java/com/onekey/nativelist/NativeListRendererRegistry.kt +2 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +7 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListResolvedText.kt +3 -2
- package/android/src/main/java/com/onekey/nativelist/NativeListSectionHeaderRenderer.kt +69 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListTextView.kt +55 -1
- package/android/src/main/java/com/onekey/nativelist/NativeListView.kt +1953 -117
- package/android/src/test/java/com/margelo/nitro/nativelist/NativeListActivityHostClipPolicyTest.kt +35 -0
- package/android/src/test/java/com/margelo/nitro/nativelist/NativeListIdentityTrailingAxisTest.kt +36 -0
- package/android/src/test/java/com/margelo/nitro/nativelist/NativeListLeadingSlotFrameTest.kt +68 -0
- package/android/src/test/java/com/margelo/nitro/nativelist/NativeListLeadingVisualClipPolicyTest.kt +44 -0
- package/android/src/test/java/com/margelo/nitro/nativelist/NativeListPressPolicyTest.kt +10 -0
- package/docs/ROW_TEMPLATES.md +74 -13
- package/docs/SPEC.md +1206 -15
- package/docs/STYLE_SPEC.md +14 -0
- package/ios/HybridNativeList.swift +21 -2
- package/ios/NativeListAccessoryStack.swift +237 -51
- package/ios/NativeListActivityDetailsView.swift +30 -11
- package/ios/NativeListActivityRenderer.swift +8 -2
- package/ios/NativeListButtonGroupRenderer.swift +89 -0
- package/ios/NativeListDataRowRenderer.swift +167 -30
- package/ios/NativeListDesignAssets.swift +13 -75
- package/ios/NativeListGeneratedIcons.swift +55 -0
- package/ios/NativeListIconBinding.swift +171 -0
- package/ios/NativeListIdentityRenderer.swift +256 -39
- package/ios/NativeListLeadingVisual.swift +127 -28
- package/ios/NativeListMarketRenderer.swift +120 -31
- package/ios/NativeListMediaPlaceholderView.swift +189 -0
- package/ios/NativeListMediaPreviewSlot.swift +122 -61
- package/ios/NativeListMediaTileRenderer.swift +15 -11
- package/ios/NativeListMessageRenderer.swift +34 -1
- package/ios/NativeListMetricCardRenderer.swift +4 -2
- package/ios/NativeListModels.swift +42 -2
- package/ios/NativeListRendererRegistry.swift +1 -0
- package/ios/NativeListResolvedText.swift +2 -1
- package/ios/NativeListRowHost.swift +14 -0
- package/ios/NativeListSectionHeaderRenderer.swift +100 -4
- package/ios/RNCNativeListView.swift +1053 -58
- package/ios/tests/NativeListAccessoryStackTests.swift +101 -0
- package/ios/tests/NativeListAccountSelectorLayoutTests.swift +96 -0
- package/ios/tests/NativeListActivityPresentationTests.swift +153 -0
- package/ios/tests/NativeListIdentityTitleIconLayoutTests.swift +81 -0
- package/ios/tests/NativeListLeadingVisualPairBackdropTests.swift +50 -0
- package/ios/tests/NativeListLifecycleTests.swift +2819 -3
- package/ios/tests/NativeListMarketMetricsTests.swift +117 -0
- package/ios/tests/NativeListMediaVisibilityTests.swift +26 -1
- package/ios/tests/NativeListSharedIconTests.swift +236 -0
- package/lib/module/NativeList.js +221 -36
- package/lib/module/NativeList.web.js +167 -46
- package/lib/module/index.js +1 -1
- package/lib/module/models.js +3 -0
- package/lib/module/selection.js +1 -1
- package/lib/module/validation.js +1246 -48
- package/lib/module/web/NativeListGeneratedIcons.js +31 -0
- package/lib/module/web/NativeListWebEngine.js +513 -275
- package/lib/module/web/templates/ActivityRowRenderer.js +120 -87
- package/lib/module/web/templates/ButtonGroupRowRenderer.js +47 -0
- package/lib/module/web/templates/DataRowRenderer.js +40 -5
- package/lib/module/web/templates/IdentityRowRenderer.js +158 -6
- package/lib/module/web/templates/MarketTableRowRenderer.js +36 -19
- package/lib/module/web/templates/MediaTileRowRenderer.js +84 -25
- package/lib/module/web/templates/MessageRowRenderer.js +18 -2
- package/lib/module/web/templates/RowContainerStyle.js +1 -0
- package/lib/module/web/templates/RowRendererRegistry.js +3 -0
- package/lib/module/web/templates/SectionHeaderRowRenderer.js +36 -2
- package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +26 -0
- package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +4 -0
- package/lib/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +10 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +20 -0
- package/lib/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +14 -0
- package/lib/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +12 -0
- package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +2 -0
- package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +43 -0
- package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +4 -0
- package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +4 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +4 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +6 -0
- package/lib/nitrogen/generated/shared/json/NativeListConfig.json +2 -0
- package/lib/typescript/src/NativeList.d.ts +3 -3
- package/lib/typescript/src/NativeList.nitro.d.ts +2 -0
- package/lib/typescript/src/NativeList.types.d.ts +20 -2
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/models.d.ts +126 -17
- package/lib/typescript/src/validation.d.ts +20 -0
- package/lib/typescript/src/web/NativeListGeneratedIcons.d.ts +2 -0
- package/lib/typescript/src/web/NativeListWebEngine.d.ts +32 -1
- package/lib/typescript/src/web/templates/ButtonGroupRowRenderer.d.ts +14 -0
- package/lib/typescript/src/web/templates/IdentityRowRenderer.d.ts +1 -1
- package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +9 -3
- package/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +26 -0
- package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +4 -0
- package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +10 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +20 -0
- package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +14 -0
- package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +12 -0
- package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +2 -0
- package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +43 -0
- package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +4 -0
- package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +4 -0
- package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +4 -0
- package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +6 -0
- package/nitrogen/generated/shared/json/NativeListConfig.json +2 -0
- package/package.json +16 -10
- package/react-native-native-list.podspec +2 -6
- package/scripts/generate-icons.mjs +150 -0
- package/scripts/generate-icons.test.mjs +288 -0
- package/scripts/native-list-icons.json +260 -0
- package/src/NativeList.nitro.ts +2 -0
- package/src/NativeList.tsx +416 -89
- package/src/NativeList.types.ts +24 -2
- package/src/NativeList.web.tsx +295 -89
- package/src/index.ts +2 -0
- package/src/models.ts +263 -144
- package/src/selection.ts +1 -0
- package/src/validation.ts +3013 -152
- package/src/web/NativeListGeneratedIcons.ts +28 -0
- package/src/web/NativeListWebEngine.ts +818 -343
- package/src/web/templates/ActivityRowRenderer.ts +178 -141
- package/src/web/templates/ButtonGroupRowRenderer.ts +58 -0
- package/src/web/templates/DataRowRenderer.ts +93 -20
- package/src/web/templates/IdentityRowRenderer.ts +231 -6
- package/src/web/templates/MarketTableRowRenderer.ts +53 -33
- package/src/web/templates/MediaTileRowRenderer.ts +90 -28
- package/src/web/templates/MessageRowRenderer.ts +23 -7
- package/src/web/templates/RowContainerStyle.ts +2 -0
- package/src/web/templates/RowRendererRegistry.ts +11 -1
- package/src/web/templates/SectionHeaderRowRenderer.ts +47 -4
- package/ios/Resources/NativeListIcons.xcassets/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_bottom.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_bottom.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_top.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_top.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_badge_verified_solid.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_badge_verified_solid.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_chart_trending_up.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_chart_trending_up.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_checked.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_checked.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_indeterminate.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_indeterminate.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_bottom.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_bottom.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_grabber_ver.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_grabber_ver.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_right_small.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_right_small.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_top.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_top.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_dot_hor.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_dot_hor.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_drag.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_drag.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_error_solid.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_error_solid.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_image_square_waves.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_image_square_waves.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_info_circle.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_info_circle.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle_solid.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle_solid.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_pencil.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_pencil.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_plus_circle.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_plus_circle.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_plus_small.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_plus_small.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_questionmark_solid.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_questionmark_solid.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_account_error_custom.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_account_error_custom.imageset/icon.svg +0 -14
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_all_networks_solid.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_all_networks_solid.imageset/icon.svg +0 -12
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_apple_brand.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_apple_brand.imageset/icon.svg +0 -6
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_bot_illus.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_bot_illus.imageset/icon.svg +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_crossed_small_solid.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_crossed_small_solid.imageset/icon.svg +0 -3
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_globus_outline.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_globus_outline.imageset/icon.svg +0 -7
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_google_illus.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_google_illus.imageset/icon.svg +0 -18
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_lock_solid.imageset/Contents.json +0 -15
- package/ios/Resources/NativeListIcons.xcassets/onekey_selector_lock_solid.imageset/icon.svg +0 -7
- package/ios/Resources/NativeListIcons.xcassets/onekey_shield_exclamation.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_shield_exclamation.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_speaker_promote.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_speaker_promote.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_star.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_star.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_star_solid.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_star_solid.imageset/icon.svg +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_swap_hor.imageset/Contents.json +0 -1
- package/ios/Resources/NativeListIcons.xcassets/onekey_swap_hor.imageset/icon.svg +0 -1
|
@@ -97,6 +97,7 @@ export declare const ROW_BOX_STYLE_KEYS_BY_TYPE: {
|
|
|
97
97
|
readonly metricCard: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "lineGap", "image"];
|
|
98
98
|
readonly sectionHeader: readonly ["horizontalPadding", "verticalPadding", "lineGap", "trailingGap"];
|
|
99
99
|
readonly action: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "trailingGap", "image"];
|
|
100
|
+
readonly buttonGroup: readonly [];
|
|
100
101
|
readonly system: readonly ["horizontalPadding", "verticalPadding", "lineGap"];
|
|
101
102
|
};
|
|
102
103
|
type TemplateBoxStyle<T extends keyof typeof ROW_BOX_STYLE_KEYS_BY_TYPE> = Pick<RowBoxStyle, (typeof ROW_BOX_STYLE_KEYS_BY_TYPE)[T][number] | 'container'>;
|
|
@@ -107,6 +108,7 @@ type TemplateBoxStyle<T extends keyof typeof ROW_BOX_STYLE_KEYS_BY_TYPE> = Pick<
|
|
|
107
108
|
* the same key name keeps one meaning across platforms. See docs/STYLE_SPEC.md §4.
|
|
108
109
|
*/
|
|
109
110
|
export type IdentityRowStyle = TemplateBoxStyle<'identity'> & Readonly<{
|
|
111
|
+
leadingContentMaxWidthRatio?: number;
|
|
110
112
|
title?: NativeListTextStyle;
|
|
111
113
|
subtitle?: NativeListTextStyle;
|
|
112
114
|
tertiary?: NativeListTextStyle;
|
|
@@ -168,6 +170,13 @@ export type SectionHeaderRowStyle = TemplateBoxStyle<'sectionHeader'> & Readonly
|
|
|
168
170
|
title?: NativeListTextStyle;
|
|
169
171
|
subtitle?: NativeListTextStyle;
|
|
170
172
|
value?: NativeListTextStyle;
|
|
173
|
+
valuePlacement?: 'afterTitle';
|
|
174
|
+
titleDecoration?: 'none' | 'dashed';
|
|
175
|
+
}>;
|
|
176
|
+
export type RowTextHelp = Readonly<{
|
|
177
|
+
actionKey: string;
|
|
178
|
+
presentation: 'tooltip' | 'popover';
|
|
179
|
+
underline?: 'dashed';
|
|
171
180
|
}>;
|
|
172
181
|
export type ActionRowStyle = TemplateBoxStyle<'action'> & Readonly<{
|
|
173
182
|
title?: NativeListTextStyle;
|
|
@@ -225,8 +234,13 @@ export type VisualOverlay = Readonly<{
|
|
|
225
234
|
offsetX?: number;
|
|
226
235
|
offsetY?: number;
|
|
227
236
|
image?: ImageSource;
|
|
237
|
+
fallbackIcon?: Readonly<{
|
|
238
|
+
name: string;
|
|
239
|
+
tintColor?: string;
|
|
240
|
+
}>;
|
|
228
241
|
name?: string;
|
|
229
242
|
text?: string;
|
|
243
|
+
fontWeight?: NativeListTextStyle['fontWeight'];
|
|
230
244
|
tintColor?: string;
|
|
231
245
|
backgroundColor?: string;
|
|
232
246
|
}>;
|
|
@@ -234,12 +248,15 @@ type VisualWithImage = Readonly<{
|
|
|
234
248
|
fallbackIcon?: Readonly<{
|
|
235
249
|
name: string;
|
|
236
250
|
tintColor?: string;
|
|
251
|
+
size?: number;
|
|
252
|
+
backgroundColor?: string;
|
|
237
253
|
}>;
|
|
238
254
|
overlays?: readonly VisualOverlay[];
|
|
239
255
|
borderStyle?: 'dashed';
|
|
240
256
|
borderColor?: string;
|
|
241
257
|
image?: ImageSource;
|
|
242
258
|
fallbackText?: string;
|
|
259
|
+
fallbackTextColor?: string;
|
|
243
260
|
backgroundColor?: string;
|
|
244
261
|
shape?: 'circle' | 'rounded' | 'square';
|
|
245
262
|
cornerIcon?: Readonly<{
|
|
@@ -291,8 +308,24 @@ export type TrailingAccessory = Readonly<{
|
|
|
291
308
|
kind: 'valuePair';
|
|
292
309
|
primary: string;
|
|
293
310
|
secondary: string;
|
|
311
|
+
primaryFontWeight?: 'medium';
|
|
312
|
+
primaryHelp?: RowTextHelp;
|
|
313
|
+
primaryTextSegments?: readonly ValueTextSegment[];
|
|
314
|
+
secondaryTextSegments?: readonly ValueTextSegment[];
|
|
294
315
|
primaryTone?: TextTone;
|
|
295
316
|
secondaryTone?: TextTone;
|
|
317
|
+
}> | Readonly<{
|
|
318
|
+
kind: 'button';
|
|
319
|
+
label: string;
|
|
320
|
+
actionKey: string;
|
|
321
|
+
disabled?: boolean;
|
|
322
|
+
testID?: string;
|
|
323
|
+
accessibilityLabel?: string;
|
|
324
|
+
textColor?: string;
|
|
325
|
+
backgroundColor?: string;
|
|
326
|
+
pressedBackgroundColor?: string;
|
|
327
|
+
hoverBackgroundColor?: string;
|
|
328
|
+
focusRingColor?: string;
|
|
296
329
|
}> | Readonly<{
|
|
297
330
|
kind: 'checkbox';
|
|
298
331
|
state: CheckboxState;
|
|
@@ -323,6 +356,7 @@ export type TrailingAccessory = Readonly<{
|
|
|
323
356
|
kind: 'icon';
|
|
324
357
|
name: string;
|
|
325
358
|
tintColor?: string;
|
|
359
|
+
buttonStyle?: 'tertiary';
|
|
326
360
|
disabled?: boolean;
|
|
327
361
|
actionKey?: string;
|
|
328
362
|
testID?: string;
|
|
@@ -362,6 +396,10 @@ export type RowBase = Readonly<{
|
|
|
362
396
|
}>;
|
|
363
397
|
export type IdentityRow = RowBase & Readonly<{
|
|
364
398
|
type: 'identity';
|
|
399
|
+
/** Opt in to content-based height; explicit row/container height still wins. */
|
|
400
|
+
contentHeight?: 'auto';
|
|
401
|
+
/** Emits a row action instead of a press after a successful long press. */
|
|
402
|
+
longPressActionKey?: string;
|
|
365
403
|
titleMatch?: readonly Readonly<{
|
|
366
404
|
start: number;
|
|
367
405
|
end: number;
|
|
@@ -375,11 +413,34 @@ export type IdentityRow = RowBase & Readonly<{
|
|
|
375
413
|
kind: 'icon';
|
|
376
414
|
}>;
|
|
377
415
|
title: string;
|
|
416
|
+
/** Plain 12/16 labels beside the title, preserving independent tones. */
|
|
417
|
+
titleSuffixes?: readonly Readonly<{
|
|
418
|
+
text: string;
|
|
419
|
+
tone: 'secondary' | 'disabled';
|
|
420
|
+
maxWidth?: number;
|
|
421
|
+
}>[];
|
|
422
|
+
titleIcon?: Readonly<{
|
|
423
|
+
name: string;
|
|
424
|
+
tintColor?: string;
|
|
425
|
+
accessibilityLabel?: string;
|
|
426
|
+
/** Web-only anchored help from this icon; does not add a click action. */
|
|
427
|
+
hoverActionKey?: string;
|
|
428
|
+
}>;
|
|
429
|
+
/** Web-only additional help icon after titleIcon. */
|
|
430
|
+
secondaryTitleIcon?: IdentityRow['titleIcon'];
|
|
431
|
+
/** Circular image after title icons; image dimensions must be square, 1...40. */
|
|
432
|
+
titleImage?: Readonly<{
|
|
433
|
+
image: ImageSource;
|
|
434
|
+
accessibilityLabel?: string;
|
|
435
|
+
/** Web-only help anchor; the consumer owns tooltip content. */
|
|
436
|
+
hoverActionKey?: string;
|
|
437
|
+
}>;
|
|
378
438
|
subtitle?: string;
|
|
379
439
|
tertiary?: string;
|
|
380
440
|
tertiaryTone?: 'secondary' | 'info';
|
|
381
441
|
titleLines?: 1 | 2;
|
|
382
|
-
|
|
442
|
+
/** Zero displays the complete subtitle. */
|
|
443
|
+
subtitleLines?: 0 | 1 | 2;
|
|
383
444
|
badges?: readonly BadgeModel[];
|
|
384
445
|
trailing?: readonly TrailingAccessory[];
|
|
385
446
|
draggable?: boolean;
|
|
@@ -413,6 +474,7 @@ export type ActivityAmount = Readonly<{
|
|
|
413
474
|
export type ActivityRow = RowBase & Readonly<{
|
|
414
475
|
type: 'activity';
|
|
415
476
|
leading: LeadingVisual;
|
|
477
|
+
hideLeading?: boolean;
|
|
416
478
|
secondaryLeading?: LeadingVisual;
|
|
417
479
|
title: string;
|
|
418
480
|
description?: string;
|
|
@@ -436,11 +498,14 @@ export type ActivityRow = RowBase & Readonly<{
|
|
|
436
498
|
}>;
|
|
437
499
|
export type MessageRow = RowBase & Readonly<{
|
|
438
500
|
type: 'message';
|
|
501
|
+
/** Draws only top and bottom container borders when a border is supplied. */
|
|
502
|
+
presentation?: 'inlineWarning';
|
|
439
503
|
unread?: boolean;
|
|
440
504
|
leading?: LeadingVisual;
|
|
441
505
|
title: string;
|
|
442
506
|
body: string;
|
|
443
|
-
|
|
507
|
+
/** Zero displays the complete body. */
|
|
508
|
+
bodyLines?: 0 | 1 | 2 | 3;
|
|
444
509
|
time: string;
|
|
445
510
|
thumbnail?: ImageSource;
|
|
446
511
|
style?: MessageRowStyle;
|
|
@@ -448,8 +513,12 @@ export type MessageRow = RowBase & Readonly<{
|
|
|
448
513
|
export type DataColumn = Readonly<{
|
|
449
514
|
key: string;
|
|
450
515
|
text: string;
|
|
516
|
+
textSegments?: readonly ValueTextSegment[];
|
|
517
|
+
titleIcon?: IdentityRow['titleIcon'];
|
|
518
|
+
secondaryTitleIcon?: IdentityRow['titleIcon'];
|
|
451
519
|
secondaryLeadingText?: string;
|
|
452
520
|
secondaryText?: string;
|
|
521
|
+
secondaryTextSegments?: readonly ValueTextSegment[];
|
|
453
522
|
weight?: 1 | 2 | 3;
|
|
454
523
|
alignment?: 'start' | 'center' | 'end';
|
|
455
524
|
tone?: 'primary' | 'secondary' | 'positive' | 'negative';
|
|
@@ -459,6 +528,7 @@ export type DataRow = RowBase & Readonly<{
|
|
|
459
528
|
type: 'dataRow';
|
|
460
529
|
leading?: LeadingVisual;
|
|
461
530
|
columns: readonly DataColumn[];
|
|
531
|
+
trailing?: readonly TrailingAccessory[];
|
|
462
532
|
checkbox?: Extract<TrailingAccessory, {
|
|
463
533
|
kind: 'checkbox';
|
|
464
534
|
}>;
|
|
@@ -532,6 +602,8 @@ export type MarketRow = RowBase & Readonly<{
|
|
|
532
602
|
variant: 'token' | 'stock' | 'perp';
|
|
533
603
|
/** Web-only bounded table presentation; native reads the ordinary Market fields. */
|
|
534
604
|
webTable?: WebMarketTablePresentation;
|
|
605
|
+
/** Two or three ordered native text metrics; omitting them keeps the compact quote. */
|
|
606
|
+
metrics?: readonly Pick<DataColumn, 'key' | 'text' | 'textSegments' | 'secondaryText' | 'secondaryTextSegments' | 'weight' | 'alignment' | 'tone' | 'secondaryTone'>[];
|
|
535
607
|
leadingAction?: Extract<TrailingAccessory, {
|
|
536
608
|
kind: 'icon';
|
|
537
609
|
}>;
|
|
@@ -611,9 +683,11 @@ export type SectionHeaderRow = RowBase & Readonly<{
|
|
|
611
683
|
indexTitle?: string;
|
|
612
684
|
variant?: 'summary' | 'gallery' | 'history';
|
|
613
685
|
title: string;
|
|
686
|
+
leadingBadge?: BadgeModel;
|
|
614
687
|
titleLoading?: boolean;
|
|
615
688
|
subtitle?: string;
|
|
616
689
|
value?: string;
|
|
690
|
+
valueHelp?: RowTextHelp;
|
|
617
691
|
valueActionKey?: string;
|
|
618
692
|
titleIcon?: Extract<TrailingAccessory, {
|
|
619
693
|
kind: 'icon';
|
|
@@ -641,6 +715,19 @@ export type ActionRow = RowBase & Readonly<{
|
|
|
641
715
|
trailing?: readonly TrailingAccessory[];
|
|
642
716
|
style?: ActionRowStyle;
|
|
643
717
|
}>;
|
|
718
|
+
export type ButtonGroupRow = RowBase & Readonly<{
|
|
719
|
+
type: 'buttonGroup';
|
|
720
|
+
buttons: readonly Readonly<{
|
|
721
|
+
key: string;
|
|
722
|
+
label: string;
|
|
723
|
+
actionKey: string;
|
|
724
|
+
disabled?: boolean;
|
|
725
|
+
loading?: boolean;
|
|
726
|
+
testID?: string;
|
|
727
|
+
accessibilityLabel?: string;
|
|
728
|
+
}>[];
|
|
729
|
+
style?: TemplateBoxStyle<'buttonGroup'>;
|
|
730
|
+
}>;
|
|
644
731
|
export type SystemRow = RowBase & Readonly<{
|
|
645
732
|
style?: SystemRowStyle;
|
|
646
733
|
}> & (Readonly<{
|
|
@@ -677,7 +764,7 @@ export type SystemRow = RowBase & Readonly<{
|
|
|
677
764
|
variant: 'spacer';
|
|
678
765
|
height: number;
|
|
679
766
|
}>);
|
|
680
|
-
export type RowModel = IdentityRow | WalletGroupRow | RailRow | ActivityRow | MessageRow | DataRow | MarketRow | MediaTileRow | MetricCardRow | SectionHeaderRow | ActionRow | SystemRow;
|
|
767
|
+
export type RowModel = IdentityRow | WalletGroupRow | RailRow | ActivityRow | MessageRow | DataRow | MarketRow | MediaTileRow | MetricCardRow | SectionHeaderRow | ActionRow | ButtonGroupRow | SystemRow;
|
|
681
768
|
export type NativeListTheme = Readonly<{
|
|
682
769
|
checkboxBackground?: string;
|
|
683
770
|
checkboxBorder?: string;
|
|
@@ -687,6 +774,8 @@ export type NativeListTheme = Readonly<{
|
|
|
687
774
|
rowBackground: string;
|
|
688
775
|
rowSelectedBackground: string;
|
|
689
776
|
rowPressedBackground?: string;
|
|
777
|
+
/** Web-only enabled-row hover color; defaults to rowPressedBackground. */
|
|
778
|
+
rowHoverBackground?: string;
|
|
690
779
|
subduedBackground?: string;
|
|
691
780
|
strongBackground?: string;
|
|
692
781
|
/** Web-only background for a displayed declared image fallback. */
|
|
@@ -699,6 +788,8 @@ export type NativeListTheme = Readonly<{
|
|
|
699
788
|
separator: string;
|
|
700
789
|
accent: string;
|
|
701
790
|
positive: string;
|
|
791
|
+
/** Optional exact background for the success tone of section leading badges. */
|
|
792
|
+
successBackground?: string;
|
|
702
793
|
negative: string;
|
|
703
794
|
criticalBackground?: string;
|
|
704
795
|
inverseBackground?: string;
|
|
@@ -740,6 +831,16 @@ export type NativeListListStyle = Readonly<{
|
|
|
740
831
|
export type NativeListSnapshot = Readonly<{
|
|
741
832
|
schemaVersion: 1;
|
|
742
833
|
generation: number;
|
|
834
|
+
/** One-shot animation for a user-initiated row-key insertion or removal. */
|
|
835
|
+
structuralTransition?: Readonly<{
|
|
836
|
+
id: string;
|
|
837
|
+
durationMs?: number;
|
|
838
|
+
anchorKey?: string;
|
|
839
|
+
}>;
|
|
840
|
+
disclosure?: Readonly<{
|
|
841
|
+
expanded: boolean;
|
|
842
|
+
expandedTrailingInset?: number;
|
|
843
|
+
}>;
|
|
743
844
|
layout: Readonly<{
|
|
744
845
|
kind: NativeListLayout;
|
|
745
846
|
orientation?: NativeListOrientation;
|
|
@@ -772,56 +873,64 @@ export type NativeListSnapshot = Readonly<{
|
|
|
772
873
|
listStyle?: NativeListListStyle;
|
|
773
874
|
}>;
|
|
774
875
|
type CommonPatchFields = 'revision' | 'disabled' | 'selected' | 'separator' | 'height' | 'heightRounding' | 'opacity' | 'pressDisabled' | 'accessibilityLabel' | 'style';
|
|
876
|
+
/** Null removes optional fields; undefined leaves the existing value unchanged. */
|
|
877
|
+
export type PatchClearableChanges<Row, Keys extends keyof Row> = Readonly<{
|
|
878
|
+
[K in Keys]?: undefined extends Row[K] ? Row[K] | null : Row[K];
|
|
879
|
+
}>;
|
|
775
880
|
export type RowPatch = Readonly<{
|
|
776
881
|
type: 'identity';
|
|
777
882
|
key: string;
|
|
778
|
-
changes:
|
|
883
|
+
changes: PatchClearableChanges<IdentityRow, CommonPatchFields | 'title' | 'titleSuffixes' | 'titleIcon' | 'secondaryTitleIcon' | 'titleImage' | 'subtitle' | 'subtitleLines' | 'contentHeight' | 'longPressActionKey' | 'tertiary' | 'tertiaryTone' | 'badges' | 'trailing' | 'leading' | 'leadingAction' | 'titleMatch' | 'titleActionKey' | 'titleActionOnHover' | 'subtitleSegments'>;
|
|
779
884
|
}> | Readonly<{
|
|
780
885
|
type: 'rail';
|
|
781
886
|
key: string;
|
|
782
|
-
changes:
|
|
887
|
+
changes: PatchClearableChanges<RailRow, CommonPatchFields | 'title' | 'status' | 'badge' | 'visual'>;
|
|
783
888
|
}> | Readonly<{
|
|
784
889
|
type: 'activity';
|
|
785
890
|
key: string;
|
|
786
|
-
changes:
|
|
891
|
+
changes: PatchClearableChanges<ActivityRow, CommonPatchFields | 'title' | 'description' | 'status' | 'amounts' | 'badges' | 'presentation' | 'fee' | 'descriptionActionKey' | 'primaryAmount' | 'secondaryAmount' | 'leading' | 'hideLeading' | 'secondaryLeading' | 'footerActions'>;
|
|
787
892
|
}> | Readonly<{
|
|
788
893
|
type: 'message';
|
|
789
894
|
key: string;
|
|
790
|
-
changes:
|
|
895
|
+
changes: PatchClearableChanges<MessageRow, CommonPatchFields | 'unread' | 'title' | 'body' | 'bodyLines' | 'presentation' | 'time' | 'thumbnail'>;
|
|
791
896
|
}> | Readonly<{
|
|
792
897
|
type: 'dataRow';
|
|
793
898
|
key: string;
|
|
794
|
-
changes:
|
|
899
|
+
changes: PatchClearableChanges<DataRow, CommonPatchFields | 'leading' | 'columns' | 'trailing' | 'checkbox' | 'index' | 'badge' | 'badges' | 'favorite' | 'favoriteActive'>;
|
|
795
900
|
}> | Readonly<{
|
|
796
901
|
type: 'market';
|
|
797
902
|
key: string;
|
|
798
|
-
changes:
|
|
903
|
+
changes: PatchClearableChanges<MarketRow, CommonPatchFields | 'leadingAction' | 'leading' | 'title' | 'subtitle' | 'subtitleSegments' | 'price' | 'priceSegments' | 'change' | 'badges' | 'pressActionKey' | 'pressInActionKey' | 'longPressActionKey' | 'diagnostics' | 'webTable' | 'metrics' | 'style'>;
|
|
799
904
|
}> | Readonly<{
|
|
800
905
|
type: 'mediaTile';
|
|
801
906
|
key: string;
|
|
802
|
-
changes:
|
|
907
|
+
changes: PatchClearableChanges<MediaTileRow, CommonPatchFields | 'image' | 'imageState' | 'media' | 'networkImage' | 'title' | 'subtitle' | 'badge' | 'closeActionKey'>;
|
|
803
908
|
}> | Readonly<{
|
|
804
909
|
type: 'metricCard';
|
|
805
910
|
key: string;
|
|
806
|
-
changes:
|
|
911
|
+
changes: PatchClearableChanges<MetricCardRow, CommonPatchFields | 'variant' | 'title' | 'value' | 'subtitle' | 'trend' | 'trendTone' | 'visual' | 'badge' | 'metrics' | 'progress'>;
|
|
807
912
|
}> | Readonly<{
|
|
808
913
|
type: 'sectionHeader';
|
|
809
914
|
key: string;
|
|
810
|
-
changes:
|
|
915
|
+
changes: PatchClearableChanges<SectionHeaderRow, CommonPatchFields | 'variant' | 'titleLoading' | 'title' | 'subtitle' | 'value' | 'valueHelp' | 'leadingBadge' | 'valueActionKey' | 'titleActionKey' | 'titleActionOnHover' | 'titleIcon' | 'valueIcon' | 'checkbox'>;
|
|
811
916
|
}> | Readonly<{
|
|
812
917
|
type: 'action';
|
|
813
918
|
key: string;
|
|
814
|
-
changes:
|
|
919
|
+
changes: PatchClearableChanges<ActionRow, CommonPatchFields | 'title' | 'tone' | 'icon' | 'checkbox' | 'trailing'>;
|
|
920
|
+
}> | Readonly<{
|
|
921
|
+
type: 'buttonGroup';
|
|
922
|
+
key: string;
|
|
923
|
+
changes: PatchClearableChanges<ButtonGroupRow, CommonPatchFields | 'buttons'>;
|
|
815
924
|
}> | Readonly<{
|
|
816
925
|
type: 'system';
|
|
817
926
|
key: string;
|
|
818
927
|
changes: Readonly<{
|
|
819
|
-
revision?: number;
|
|
820
|
-
disabled?: boolean;
|
|
821
|
-
message?: string;
|
|
928
|
+
revision?: number | null;
|
|
929
|
+
disabled?: boolean | null;
|
|
930
|
+
message?: string | null;
|
|
822
931
|
}>;
|
|
823
932
|
}>;
|
|
824
|
-
export type NativeListActionSource = 'row' | 'marketBadge' | 'leadingAction' | 'trailingAccessory' | 'footerAction' | 'description' | 'mediaClose';
|
|
933
|
+
export type NativeListActionSource = 'row' | 'marketBadge' | 'leadingAction' | 'trailingAccessory' | 'footerAction' | 'buttonGroup' | 'description' | 'mediaClose';
|
|
825
934
|
export type NativeListWindowRect = Readonly<{
|
|
826
935
|
x: number;
|
|
827
936
|
y: number;
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import type { NativeListSnapshot, RowPatch } from './models';
|
|
2
|
+
/** Component boundaries report locations, never caller-controlled payload values. */
|
|
3
|
+
export declare function containNativeListInput<T>(operation: () => T): T | undefined;
|
|
4
|
+
export declare function emptyNativeListSnapshot(): NativeListSnapshot;
|
|
2
5
|
export declare function validateSnapshot(snapshot: NativeListSnapshot): NativeListSnapshot;
|
|
6
|
+
/** Capture caller data once before validation, including accessor values. */
|
|
7
|
+
export declare function captureNativeListInput<T>(value: T): T;
|
|
8
|
+
/** Private native-wrapper ownership; exported validators keep their public identity. */
|
|
9
|
+
export declare function ownValidatedNativeSnapshot(snapshot: NativeListSnapshot): NativeListSnapshot;
|
|
3
10
|
export declare function validatePatches(patches: readonly RowPatch[]): readonly RowPatch[];
|
|
11
|
+
/** Plan value-only patches; callers own valid immutable snapshots and commit state. */
|
|
12
|
+
export declare function planNativeListPatches(previous: NativeListSnapshot, next: NativeListSnapshot): readonly RowPatch[] | undefined;
|
|
13
|
+
/** One canonical batch owns both accepted rows and the native wire payload. */
|
|
14
|
+
export declare function applyValidatedRowPatches(snapshot: NativeListSnapshot, patches: readonly RowPatch[]): {
|
|
15
|
+
patches: readonly RowPatch[];
|
|
16
|
+
snapshot: NativeListSnapshot;
|
|
17
|
+
json: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function applyOwnedNativePatches(snapshot: NativeListSnapshot, patches: readonly RowPatch[]): {
|
|
20
|
+
patches: readonly RowPatch[];
|
|
21
|
+
snapshot: NativeListSnapshot;
|
|
22
|
+
json: string;
|
|
23
|
+
};
|
|
4
24
|
export declare function applyRowPatches(snapshot: NativeListSnapshot, patches: readonly RowPatch[]): NativeListSnapshot;
|
|
5
25
|
export declare function serializeSnapshot(snapshot: NativeListSnapshot): string;
|
|
6
26
|
export declare function serializePatches(patches: readonly RowPatch[]): string;
|
|
@@ -8,7 +8,6 @@ export declare const WEB_REORDER_ANIMATION: {
|
|
|
8
8
|
readonly dropDurationMs: 80;
|
|
9
9
|
readonly dropTimingFunction: "ease";
|
|
10
10
|
};
|
|
11
|
-
export declare const WEB_MARKET_VERIFIED_PATH = "M9.483 11.458v3.5h-1v-3.5z M10.467 2.698a2.03 2.03 0 0 1 3.065 0l1.358 1.564a.03.03 0 0 0 .028.01l2.046-.325a2.03 2.03 0 0 1 2.347 1.971l.037 2.07q0 .016.014.026l1.776 1.066a2.03 2.03 0 0 1 .532 3.019l-1.304 1.609a.03.03 0 0 0-.005.03l.675 1.956a2.03 2.03 0 0 1-1.533 2.656l-2.033.394a.03.03 0 0 0-.023.019l-.741 1.933a2.03 2.03 0 0 1-2.88 1.05l-1.811-1.006a.03.03 0 0 0-.03 0l-1.811 1.005a2.03 2.03 0 0 1-2.88-1.049l-.742-1.933a.03.03 0 0 0-.023-.019l-2.033-.394a2.03 2.03 0 0 1-1.532-2.656l.675-1.957a.03.03 0 0 0-.005-.029l-1.304-1.61a2.03 2.03 0 0 1 .532-3.018l1.776-1.066a.03.03 0 0 0 .014-.026l.035-2.07a2.03 2.03 0 0 1 2.349-1.97l2.045.324a.03.03 0 0 0 .028-.01zm1.516 3.76a.5.5 0 0 0-.447.276l-1.861 3.724H8.483a1 1 0 0 0-1 1v3.5a1 1 0 0 0 1 1h6.692a2 2 0 0 0 1.981-1.73l.341-2.5a2 2 0 0 0-1.982-2.27h-1.939l.197-1.269a1.5 1.5 0 0 0-1.481-1.731z";
|
|
12
11
|
export type WebLayoutItem = Readonly<{
|
|
13
12
|
index: number;
|
|
14
13
|
key: string;
|
|
@@ -145,6 +144,7 @@ export declare class NativeListWebEngine {
|
|
|
145
144
|
private pullDistance;
|
|
146
145
|
private virtualizationEnabled;
|
|
147
146
|
private actionAnchor;
|
|
147
|
+
private pressedHelpElement;
|
|
148
148
|
private readonly actionAnchorInstanceId;
|
|
149
149
|
private actionAnchorCounter;
|
|
150
150
|
private bindingEpochCounter;
|
|
@@ -153,6 +153,26 @@ export declare class NativeListWebEngine {
|
|
|
153
153
|
private lastViewportWidth;
|
|
154
154
|
private lastViewportHeight;
|
|
155
155
|
private destroyed;
|
|
156
|
+
private hasAppliedSnapshot;
|
|
157
|
+
private lastStructuralTransitionId;
|
|
158
|
+
private structuralFrame;
|
|
159
|
+
private structuralFinish;
|
|
160
|
+
private structuralRevision;
|
|
161
|
+
private structuralAnimations;
|
|
162
|
+
private structuralScrollInterrupted;
|
|
163
|
+
private structuralRenderedHeight;
|
|
164
|
+
private structuralTargetHeight;
|
|
165
|
+
private reactFooterHeight;
|
|
166
|
+
private structuralFooterCompensation;
|
|
167
|
+
private structuralFooterExpansion;
|
|
168
|
+
private structuralFooterFromHeight;
|
|
169
|
+
private structuralFooterElement;
|
|
170
|
+
private structuralFooterStyles;
|
|
171
|
+
private structuralProgress;
|
|
172
|
+
private structuralAnchorStyles;
|
|
173
|
+
private structuralContentOverflow;
|
|
174
|
+
private structuralPrefixTransition;
|
|
175
|
+
private structuralTail;
|
|
156
176
|
private sectionIndexAlignStart;
|
|
157
177
|
private measuredRendererHeights;
|
|
158
178
|
private notifyScrollCommandAccepted;
|
|
@@ -168,6 +188,15 @@ export declare class NativeListWebEngine {
|
|
|
168
188
|
updateCallbacks(callbacks: NativeListWebCallbacks): void;
|
|
169
189
|
setVirtualizationEnabled(enabled: boolean): void;
|
|
170
190
|
applySnapshot(snapshot: NativeListSnapshot): void;
|
|
191
|
+
private applyValidatedSnapshot;
|
|
192
|
+
private cancelStructuralAnimation;
|
|
193
|
+
private handleStructuralUserScroll;
|
|
194
|
+
private updateStructuralTailWindow;
|
|
195
|
+
private writeStructuralHeight;
|
|
196
|
+
private reactFooterElement;
|
|
197
|
+
private readReactFooterHeight;
|
|
198
|
+
private applyStructuralFooterVisual;
|
|
199
|
+
private applyStructuralSnapshot;
|
|
171
200
|
currentContentHeight(): number;
|
|
172
201
|
currentSnapshot(): NativeListSnapshot;
|
|
173
202
|
applyPatches(patches: readonly RowPatch[]): void;
|
|
@@ -239,6 +268,8 @@ export declare class NativeListWebEngine {
|
|
|
239
268
|
private handleMarketTouchMove;
|
|
240
269
|
private handleMarketPointerEnd;
|
|
241
270
|
private handleTitlePointerOver;
|
|
271
|
+
private emitHoverAction;
|
|
272
|
+
private handleIconHelpPointerDown;
|
|
242
273
|
private handleTitlePointerOut;
|
|
243
274
|
private handleClick;
|
|
244
275
|
private handleKeyDown;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ButtonGroupRow } from '../../models';
|
|
2
|
+
import type { RowPrimitives } from './RowVisual';
|
|
3
|
+
declare function bind(body: HTMLElement, row: ButtonGroupRow): void;
|
|
4
|
+
declare function create(document: Document, row: ButtonGroupRow, _primitives: RowPrimitives): HTMLDivElement;
|
|
5
|
+
export declare const buttonGroupRowRenderer: {
|
|
6
|
+
key: "buttonGroup";
|
|
7
|
+
create: typeof create;
|
|
8
|
+
bind: typeof bind;
|
|
9
|
+
recycle: (body: HTMLElement) => void;
|
|
10
|
+
measure: (_row: ButtonGroupRow, _width: number) => number;
|
|
11
|
+
measureRendered: (body: HTMLElement) => number;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ButtonGroupRowRenderer.d.ts.map
|
|
@@ -10,7 +10,7 @@ export declare const identityRowRenderer: {
|
|
|
10
10
|
recycle: typeof recycle;
|
|
11
11
|
appliesSizePreset: (row: IdentityRow) => boolean;
|
|
12
12
|
measure: (row: IdentityRow, _width: number) => number;
|
|
13
|
-
measureRendered: (
|
|
13
|
+
measureRendered: (body: HTMLElement, row: IdentityRow) => number | undefined;
|
|
14
14
|
};
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=IdentityRowRenderer.d.ts.map
|
|
@@ -3,15 +3,21 @@ import type { MessageRow, NativeListTextStyle } from '../../models';
|
|
|
3
3
|
export declare function resolveMessageRow(row: MessageRow): {
|
|
4
4
|
title: Readonly<{
|
|
5
5
|
value: string;
|
|
6
|
-
style: Required<Pick<NativeListTextStyle, "fontSize" | "lineHeight"
|
|
6
|
+
style: Required<Pick<NativeListTextStyle, "fontSize" | "lineHeight">> & Omit<NativeListTextStyle, "lines"> & {
|
|
7
|
+
lines: 0 | 1 | 2 | 3;
|
|
8
|
+
};
|
|
7
9
|
}>;
|
|
8
10
|
body: Readonly<{
|
|
9
11
|
value: string;
|
|
10
|
-
style: Required<Pick<NativeListTextStyle, "fontSize" | "lineHeight"
|
|
12
|
+
style: Required<Pick<NativeListTextStyle, "fontSize" | "lineHeight">> & Omit<NativeListTextStyle, "lines"> & {
|
|
13
|
+
lines: 0 | 1 | 2 | 3;
|
|
14
|
+
};
|
|
11
15
|
}>;
|
|
12
16
|
time: Readonly<{
|
|
13
17
|
value: string;
|
|
14
|
-
style: Required<Pick<NativeListTextStyle, "fontSize" | "lineHeight"
|
|
18
|
+
style: Required<Pick<NativeListTextStyle, "fontSize" | "lineHeight">> & Omit<NativeListTextStyle, "lines"> & {
|
|
19
|
+
lines: 0 | 1 | 2 | 3;
|
|
20
|
+
};
|
|
15
21
|
}>;
|
|
16
22
|
horizontalPadding: number;
|
|
17
23
|
verticalPadding: number;
|
|
@@ -88,6 +88,15 @@ namespace margelo::nitro::nativelist {
|
|
|
88
88
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* containerSlotHeightsJson */)>("setContainerSlotHeightsJson");
|
|
89
89
|
method(_javaPart, jni::make_jstring(containerSlotHeightsJson));
|
|
90
90
|
}
|
|
91
|
+
std::string JHybridNativeListSpec::getSidecarLayoutJson() {
|
|
92
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getSidecarLayoutJson");
|
|
93
|
+
auto __result = method(_javaPart);
|
|
94
|
+
return __result->toStdString();
|
|
95
|
+
}
|
|
96
|
+
void JHybridNativeListSpec::setSidecarLayoutJson(const std::string& sidecarLayoutJson) {
|
|
97
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* sidecarLayoutJson */)>("setSidecarLayoutJson");
|
|
98
|
+
method(_javaPart, jni::make_jstring(sidecarLayoutJson));
|
|
99
|
+
}
|
|
91
100
|
NativeListScrollEdgeEffect JHybridNativeListSpec::getTopScrollEdgeEffect() {
|
|
92
101
|
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JNativeListScrollEdgeEffect>()>("getTopScrollEdgeEffect");
|
|
93
102
|
auto __result = method(_javaPart);
|
|
@@ -252,6 +261,23 @@ namespace margelo::nitro::nativelist {
|
|
|
252
261
|
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__string::javaobject> /* onVisibleRangeChanged */)>("setOnVisibleRangeChanged_cxx");
|
|
253
262
|
method(_javaPart, onVisibleRangeChanged.has_value() ? JFunc_void_std__string_cxx::fromCpp(onVisibleRangeChanged.value()) : nullptr);
|
|
254
263
|
}
|
|
264
|
+
std::optional<std::function<void(const std::string& /* payloadJson */)>> JHybridNativeListSpec::getOnStructuralTransitionSettled() {
|
|
265
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JFunc_void_std__string::javaobject>()>("getOnStructuralTransitionSettled_cxx");
|
|
266
|
+
auto __result = method(_javaPart);
|
|
267
|
+
return __result != nullptr ? std::make_optional([&]() -> std::function<void(const std::string& /* payloadJson */)> {
|
|
268
|
+
if (__result->isInstanceOf(JFunc_void_std__string_cxx::javaClassStatic())) [[likely]] {
|
|
269
|
+
auto downcast = jni::static_ref_cast<JFunc_void_std__string_cxx::javaobject>(__result);
|
|
270
|
+
return downcast->cthis()->getFunction();
|
|
271
|
+
} else {
|
|
272
|
+
auto __resultRef = jni::make_global(__result);
|
|
273
|
+
return JNICallable<JFunc_void_std__string, void(std::string)>(std::move(__resultRef));
|
|
274
|
+
}
|
|
275
|
+
}()) : std::nullopt;
|
|
276
|
+
}
|
|
277
|
+
void JHybridNativeListSpec::setOnStructuralTransitionSettled(const std::optional<std::function<void(const std::string& /* payloadJson */)>>& onStructuralTransitionSettled) {
|
|
278
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<JFunc_void_std__string::javaobject> /* onStructuralTransitionSettled */)>("setOnStructuralTransitionSettled_cxx");
|
|
279
|
+
method(_javaPart, onStructuralTransitionSettled.has_value() ? JFunc_void_std__string_cxx::fromCpp(onStructuralTransitionSettled.value()) : nullptr);
|
|
280
|
+
}
|
|
255
281
|
|
|
256
282
|
// Methods
|
|
257
283
|
void JHybridNativeListSpec::applySnapshot(const std::string& snapshotJson) {
|
|
@@ -56,6 +56,8 @@ namespace margelo::nitro::nativelist {
|
|
|
56
56
|
void setFontFamiliesJson(const std::string& fontFamiliesJson) override;
|
|
57
57
|
std::string getContainerSlotHeightsJson() override;
|
|
58
58
|
void setContainerSlotHeightsJson(const std::string& containerSlotHeightsJson) override;
|
|
59
|
+
std::string getSidecarLayoutJson() override;
|
|
60
|
+
void setSidecarLayoutJson(const std::string& sidecarLayoutJson) override;
|
|
59
61
|
NativeListScrollEdgeEffect getTopScrollEdgeEffect() override;
|
|
60
62
|
void setTopScrollEdgeEffect(NativeListScrollEdgeEffect topScrollEdgeEffect) override;
|
|
61
63
|
double getTopOverlayHeight() override;
|
|
@@ -80,6 +82,8 @@ namespace margelo::nitro::nativelist {
|
|
|
80
82
|
void setOnEndReached(const std::optional<std::function<void(const std::string& /* payloadJson */)>>& onEndReached) override;
|
|
81
83
|
std::optional<std::function<void(const std::string& /* payloadJson */)>> getOnVisibleRangeChanged() override;
|
|
82
84
|
void setOnVisibleRangeChanged(const std::optional<std::function<void(const std::string& /* payloadJson */)>>& onVisibleRangeChanged) override;
|
|
85
|
+
std::optional<std::function<void(const std::string& /* payloadJson */)>> getOnStructuralTransitionSettled() override;
|
|
86
|
+
void setOnStructuralTransitionSettled(const std::optional<std::function<void(const std::string& /* payloadJson */)>>& onStructuralTransitionSettled) override;
|
|
83
87
|
|
|
84
88
|
public:
|
|
85
89
|
// Methods
|
|
@@ -68,6 +68,11 @@ void JHybridNativeListStateUpdater::updateViewProps(jni::alias_ref<jni::JClass>
|
|
|
68
68
|
: !newProps->containerSlotHeightsJson.hasSameValue(oldProps->containerSlotHeightsJson)) {
|
|
69
69
|
hybridView->setContainerSlotHeightsJson(newProps->containerSlotHeightsJson.get());
|
|
70
70
|
}
|
|
71
|
+
if (oldProps == nullptr
|
|
72
|
+
? newProps->sidecarLayoutJson.isProvided()
|
|
73
|
+
: !newProps->sidecarLayoutJson.hasSameValue(oldProps->sidecarLayoutJson)) {
|
|
74
|
+
hybridView->setSidecarLayoutJson(newProps->sidecarLayoutJson.get());
|
|
75
|
+
}
|
|
71
76
|
if (oldProps == nullptr
|
|
72
77
|
? newProps->topScrollEdgeEffect.isProvided()
|
|
73
78
|
: !newProps->topScrollEdgeEffect.hasSameValue(oldProps->topScrollEdgeEffect)) {
|
|
@@ -128,6 +133,11 @@ void JHybridNativeListStateUpdater::updateViewProps(jni::alias_ref<jni::JClass>
|
|
|
128
133
|
: !newProps->onVisibleRangeChanged.hasSameValue(oldProps->onVisibleRangeChanged)) {
|
|
129
134
|
hybridView->setOnVisibleRangeChanged(newProps->onVisibleRangeChanged.get());
|
|
130
135
|
}
|
|
136
|
+
if (oldProps == nullptr
|
|
137
|
+
? newProps->onStructuralTransitionSettled.isProvided()
|
|
138
|
+
: !newProps->onStructuralTransitionSettled.hasSameValue(oldProps->onStructuralTransitionSettled)) {
|
|
139
|
+
hybridView->setOnStructuralTransitionSettled(newProps->onStructuralTransitionSettled.get());
|
|
140
|
+
}
|
|
131
141
|
|
|
132
142
|
// Update hybridRef if it changed
|
|
133
143
|
if (oldProps == nullptr
|
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt
CHANGED
|
@@ -45,6 +45,12 @@ abstract class HybridNativeListSpec: HybridView() {
|
|
|
45
45
|
@set:Keep
|
|
46
46
|
abstract var containerSlotHeightsJson: String
|
|
47
47
|
|
|
48
|
+
@get:DoNotStrip
|
|
49
|
+
@get:Keep
|
|
50
|
+
@set:DoNotStrip
|
|
51
|
+
@set:Keep
|
|
52
|
+
abstract var sidecarLayoutJson: String
|
|
53
|
+
|
|
48
54
|
@get:DoNotStrip
|
|
49
55
|
@get:Keep
|
|
50
56
|
@set:DoNotStrip
|
|
@@ -172,6 +178,20 @@ abstract class HybridNativeListSpec: HybridView() {
|
|
|
172
178
|
set(value) {
|
|
173
179
|
onVisibleRangeChanged = value?.let { it }
|
|
174
180
|
}
|
|
181
|
+
|
|
182
|
+
abstract var onStructuralTransitionSettled: ((payloadJson: String) -> Unit)?
|
|
183
|
+
|
|
184
|
+
private var onStructuralTransitionSettled_cxx: Func_void_std__string?
|
|
185
|
+
@Keep
|
|
186
|
+
@DoNotStrip
|
|
187
|
+
get() {
|
|
188
|
+
return onStructuralTransitionSettled?.let { Func_void_std__string_java(it) }
|
|
189
|
+
}
|
|
190
|
+
@Keep
|
|
191
|
+
@DoNotStrip
|
|
192
|
+
set(value) {
|
|
193
|
+
onStructuralTransitionSettled = value?.let { it }
|
|
194
|
+
}
|
|
175
195
|
|
|
176
196
|
// Methods
|
|
177
197
|
@DoNotStrip
|
|
@@ -96,6 +96,13 @@ namespace margelo::nitro::nativelist {
|
|
|
96
96
|
inline void setContainerSlotHeightsJson(const std::string& containerSlotHeightsJson) noexcept override {
|
|
97
97
|
_swiftPart.setContainerSlotHeightsJson(containerSlotHeightsJson);
|
|
98
98
|
}
|
|
99
|
+
inline std::string getSidecarLayoutJson() noexcept override {
|
|
100
|
+
auto __result = _swiftPart.getSidecarLayoutJson();
|
|
101
|
+
return __result;
|
|
102
|
+
}
|
|
103
|
+
inline void setSidecarLayoutJson(const std::string& sidecarLayoutJson) noexcept override {
|
|
104
|
+
_swiftPart.setSidecarLayoutJson(sidecarLayoutJson);
|
|
105
|
+
}
|
|
99
106
|
inline NativeListScrollEdgeEffect getTopScrollEdgeEffect() noexcept override {
|
|
100
107
|
auto __result = _swiftPart.getTopScrollEdgeEffect();
|
|
101
108
|
return static_cast<NativeListScrollEdgeEffect>(__result);
|
|
@@ -179,6 +186,13 @@ namespace margelo::nitro::nativelist {
|
|
|
179
186
|
inline void setOnVisibleRangeChanged(const std::optional<std::function<void(const std::string& /* payloadJson */)>>& onVisibleRangeChanged) noexcept override {
|
|
180
187
|
_swiftPart.setOnVisibleRangeChanged(onVisibleRangeChanged);
|
|
181
188
|
}
|
|
189
|
+
inline std::optional<std::function<void(const std::string& /* payloadJson */)>> getOnStructuralTransitionSettled() noexcept override {
|
|
190
|
+
auto __result = _swiftPart.getOnStructuralTransitionSettled();
|
|
191
|
+
return __result;
|
|
192
|
+
}
|
|
193
|
+
inline void setOnStructuralTransitionSettled(const std::optional<std::function<void(const std::string& /* payloadJson */)>>& onStructuralTransitionSettled) noexcept override {
|
|
194
|
+
_swiftPart.setOnStructuralTransitionSettled(onStructuralTransitionSettled);
|
|
195
|
+
}
|
|
182
196
|
|
|
183
197
|
public:
|
|
184
198
|
// Methods
|