@onekeyfe/react-native-native-list 6.7.0-alpha.344 → 6.7.0-alpha.354
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/android/src/main/java/com/onekey/nativelist/HybridNativeList.kt +7 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListAccessoryStack.kt +240 -7
- package/android/src/main/java/com/onekey/nativelist/NativeListActivityDetailsView.kt +7 -4
- package/android/src/main/java/com/onekey/nativelist/NativeListActivityRenderer.kt +6 -3
- 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 +87 -7
- package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +135 -1
- package/android/src/main/java/com/onekey/nativelist/NativeListLeadingVisual.kt +43 -14
- package/android/src/main/java/com/onekey/nativelist/NativeListMessageRenderer.kt +25 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +17 -2
- package/android/src/main/java/com/onekey/nativelist/NativeListPrimitives.kt +22 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListRendererRegistry.kt +2 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +2 -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 +585 -21
- package/android/src/test/java/com/margelo/nitro/nativelist/NativeListPressPolicyTest.kt +1 -0
- package/docs/ROW_TEMPLATES.md +60 -9
- package/docs/SPEC.md +361 -8
- package/docs/STYLE_SPEC.md +6 -0
- package/ios/HybridNativeList.swift +10 -0
- package/ios/NativeListAccessoryStack.swift +220 -37
- package/ios/NativeListActivityDetailsView.swift +18 -8
- package/ios/NativeListActivityRenderer.swift +8 -2
- package/ios/NativeListButtonGroupRenderer.swift +89 -0
- package/ios/NativeListDataRowRenderer.swift +105 -8
- package/ios/NativeListDesignAssets.swift +3 -0
- package/ios/NativeListIdentityRenderer.swift +119 -4
- package/ios/NativeListLeadingVisual.swift +49 -14
- package/ios/NativeListMessageRenderer.swift +34 -1
- package/ios/NativeListModels.swift +16 -2
- package/ios/NativeListRendererRegistry.swift +1 -0
- package/ios/NativeListResolvedText.swift +2 -1
- package/ios/NativeListRowHost.swift +14 -0
- package/ios/NativeListSectionHeaderRenderer.swift +88 -0
- package/ios/RNCNativeListView.swift +331 -29
- package/ios/Resources/NativeListIcons.xcassets/onekey_crypto_coin_outline.imageset/Contents.json +15 -0
- package/ios/Resources/NativeListIcons.xcassets/onekey_crypto_coin_outline.imageset/icon.svg +4 -0
- package/ios/Resources/NativeListIcons.xcassets/onekey_gas_solid.imageset/Contents.json +15 -0
- package/ios/Resources/NativeListIcons.xcassets/onekey_gas_solid.imageset/icon.svg +3 -0
- package/ios/Resources/NativeListIcons.xcassets/onekey_refresh_ccw_outline.imageset/Contents.json +15 -0
- package/ios/Resources/NativeListIcons.xcassets/onekey_refresh_ccw_outline.imageset/icon.svg +3 -0
- package/ios/tests/NativeListActivityPresentationTests.swift +56 -0
- package/ios/tests/NativeListLifecycleTests.swift +890 -3
- package/lib/module/NativeList.js +64 -27
- package/lib/module/NativeList.web.js +84 -17
- package/lib/module/models.js +1 -0
- package/lib/module/selection.js +1 -1
- package/lib/module/validation.js +532 -18
- package/lib/module/web/NativeListWebEngine.js +391 -24
- package/lib/module/web/templates/ActivityRowRenderer.js +8 -7
- 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 +90 -4
- 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 +9 -0
- package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +2 -0
- package/lib/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +5 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +6 -0
- package/lib/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +7 -0
- package/lib/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +6 -0
- package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +1 -0
- package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +11 -0
- package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +2 -0
- package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +2 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +2 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +3 -0
- package/lib/nitrogen/generated/shared/json/NativeListConfig.json +1 -0
- package/lib/typescript/src/NativeList.d.ts +2 -2
- package/lib/typescript/src/NativeList.nitro.d.ts +1 -0
- package/lib/typescript/src/NativeList.types.d.ts +8 -0
- package/lib/typescript/src/models.d.ts +101 -9
- package/lib/typescript/src/validation.d.ts +13 -0
- package/lib/typescript/src/web/NativeListWebEngine.d.ts +26 -0
- 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 +9 -0
- package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +5 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +6 -0
- package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +7 -0
- package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +6 -0
- package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +11 -0
- package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +2 -0
- package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +2 -0
- package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +3 -0
- package/nitrogen/generated/shared/json/NativeListConfig.json +1 -0
- package/package.json +3 -3
- package/react-native-native-list.podspec +1 -0
- package/src/NativeList.nitro.ts +1 -0
- package/src/NativeList.tsx +155 -69
- package/src/NativeList.types.ts +9 -0
- package/src/NativeList.web.tsx +159 -49
- package/src/models.ts +113 -3
- package/src/selection.ts +1 -0
- package/src/validation.ts +1156 -18
- package/src/web/NativeListWebEngine.ts +594 -28
- package/src/web/templates/ActivityRowRenderer.ts +14 -6
- package/src/web/templates/ButtonGroupRowRenderer.ts +58 -0
- package/src/web/templates/DataRowRenderer.ts +93 -20
- package/src/web/templates/IdentityRowRenderer.ts +150 -5
- 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
|
@@ -23,6 +23,7 @@ namespace margelo::nitro::nativelist::views {
|
|
|
23
23
|
snapshotJson(nitro::ReactProp<std::string>::fromRawValue("NativeList", "snapshotJson", rawProps, sourceProps.snapshotJson)),
|
|
24
24
|
fontFamiliesJson(nitro::ReactProp<std::string>::fromRawValue("NativeList", "fontFamiliesJson", rawProps, sourceProps.fontFamiliesJson)),
|
|
25
25
|
containerSlotHeightsJson(nitro::ReactProp<std::string>::fromRawValue("NativeList", "containerSlotHeightsJson", rawProps, sourceProps.containerSlotHeightsJson)),
|
|
26
|
+
sidecarLayoutJson(nitro::ReactProp<std::string>::fromRawValue("NativeList", "sidecarLayoutJson", rawProps, sourceProps.sidecarLayoutJson)),
|
|
26
27
|
topScrollEdgeEffect(nitro::ReactProp<NativeListScrollEdgeEffect>::fromRawValue("NativeList", "topScrollEdgeEffect", rawProps, sourceProps.topScrollEdgeEffect)),
|
|
27
28
|
topOverlayHeight(nitro::ReactProp<double>::fromRawValue("NativeList", "topOverlayHeight", rawProps, sourceProps.topOverlayHeight)),
|
|
28
29
|
scrollPositionThresholdsJson(nitro::ReactProp<std::string>::fromRawValue("NativeList", "scrollPositionThresholdsJson", rawProps, sourceProps.scrollPositionThresholdsJson)),
|
|
@@ -42,6 +43,7 @@ namespace margelo::nitro::nativelist::views {
|
|
|
42
43
|
case hashString("snapshotJson"): return true;
|
|
43
44
|
case hashString("fontFamiliesJson"): return true;
|
|
44
45
|
case hashString("containerSlotHeightsJson"): return true;
|
|
46
|
+
case hashString("sidecarLayoutJson"): return true;
|
|
45
47
|
case hashString("topScrollEdgeEffect"): return true;
|
|
46
48
|
case hashString("topOverlayHeight"): return true;
|
|
47
49
|
case hashString("scrollPositionThresholdsJson"): return true;
|
|
@@ -49,6 +49,7 @@ namespace margelo::nitro::nativelist::views {
|
|
|
49
49
|
nitro::ReactProp<std::string> snapshotJson;
|
|
50
50
|
nitro::ReactProp<std::string> fontFamiliesJson;
|
|
51
51
|
nitro::ReactProp<std::string> containerSlotHeightsJson;
|
|
52
|
+
nitro::ReactProp<std::string> sidecarLayoutJson;
|
|
52
53
|
nitro::ReactProp<NativeListScrollEdgeEffect> topScrollEdgeEffect;
|
|
53
54
|
nitro::ReactProp<double> topOverlayHeight;
|
|
54
55
|
nitro::ReactProp<std::string> scrollPositionThresholdsJson;
|
|
@@ -68,6 +69,7 @@ namespace margelo::nitro::nativelist::views {
|
|
|
68
69
|
return snapshotJson.hasSameValue(other.snapshotJson) &&
|
|
69
70
|
fontFamiliesJson.hasSameValue(other.fontFamiliesJson) &&
|
|
70
71
|
containerSlotHeightsJson.hasSameValue(other.containerSlotHeightsJson) &&
|
|
72
|
+
sidecarLayoutJson.hasSameValue(other.sidecarLayoutJson) &&
|
|
71
73
|
topScrollEdgeEffect.hasSameValue(other.topScrollEdgeEffect) &&
|
|
72
74
|
topOverlayHeight.hasSameValue(other.topOverlayHeight) &&
|
|
73
75
|
scrollPositionThresholdsJson.hasSameValue(other.scrollPositionThresholdsJson) &&
|
|
@@ -88,6 +90,7 @@ namespace margelo::nitro::nativelist::views {
|
|
|
88
90
|
return snapshotJson.isProvided() ||
|
|
89
91
|
fontFamiliesJson.isProvided() ||
|
|
90
92
|
containerSlotHeightsJson.isProvided() ||
|
|
93
|
+
sidecarLayoutJson.isProvided() ||
|
|
91
94
|
topScrollEdgeEffect.isProvided() ||
|
|
92
95
|
topOverlayHeight.isProvided() ||
|
|
93
96
|
scrollPositionThresholdsJson.isProvided() ||
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ImageSource } from './models';
|
|
2
|
+
import type { ImageSource, NativeListSnapshot } from './models';
|
|
3
3
|
import type { NativeListProps } from './NativeList.types';
|
|
4
4
|
export type { NativeListProps, NativeListRef } from './NativeList.types';
|
|
5
5
|
export type { ActionAnchorState, NativeListKeyboardDismissMode, NativeListKeyboardShouldPersistTaps, ScrollAlignment, ScrollPositionOptions, ScrollToEndParams, ScrollToIndexFailedInfo, ScrollToIndexParams, ScrollToItemParams, ScrollToKeyParams, ScrollToLocationParams, ScrollToOffsetParams, } from './NativeList.types';
|
|
6
6
|
export declare function preloadNativeListAvatarImages(sources: readonly ImageSource[]): Promise<boolean>;
|
|
7
7
|
export declare const NativeList: React.ForwardRefExoticComponent<NativeListProps & React.RefAttributes<Readonly<{
|
|
8
|
-
applySnapshot(snapshot:
|
|
8
|
+
applySnapshot(snapshot: NativeListSnapshot): void;
|
|
9
9
|
applyPatches(patches: readonly import("./models").RowPatch[]): void;
|
|
10
10
|
reconcileSelection(selectedKeys: readonly string[]): void;
|
|
11
11
|
scrollToKey: (paramsOrKey: import("./NativeList.types").ScrollToKeyParams | string, animated?: boolean, alignment?: import("./NativeList.types").ScrollAlignment) => void;
|
|
@@ -8,6 +8,7 @@ export interface NativeListNativeProps extends HybridViewProps {
|
|
|
8
8
|
snapshotJson: string;
|
|
9
9
|
fontFamiliesJson: string;
|
|
10
10
|
containerSlotHeightsJson: string;
|
|
11
|
+
sidecarLayoutJson: string;
|
|
11
12
|
topScrollEdgeEffect: NativeListScrollEdgeEffect;
|
|
12
13
|
topOverlayHeight: number;
|
|
13
14
|
scrollPositionThresholdsJson: string;
|
|
@@ -49,6 +49,11 @@ export type NativeListWebScrollHost = Readonly<{
|
|
|
49
49
|
clientHeight: number;
|
|
50
50
|
scrollTop: number;
|
|
51
51
|
}>;
|
|
52
|
+
export type NativeListSidecarLayout = Readonly<{
|
|
53
|
+
width: number;
|
|
54
|
+
gap: number;
|
|
55
|
+
maxContentWidth: number;
|
|
56
|
+
}>;
|
|
52
57
|
type InitialScrollProps = Readonly<{
|
|
53
58
|
initialScrollIndex?: never;
|
|
54
59
|
initialScrollKey?: never;
|
|
@@ -86,6 +91,9 @@ export type NativeListProps = Omit<ViewProps, 'children'> & Readonly<{
|
|
|
86
91
|
listHeader?: ReactNode;
|
|
87
92
|
listFooter?: ReactNode;
|
|
88
93
|
listEmpty?: ReactNode;
|
|
94
|
+
/** Scrolling right column for a vertical linear list. Requires sidecarLayout. */
|
|
95
|
+
listSidecar?: ReactNode;
|
|
96
|
+
sidecarLayout?: NativeListSidecarLayout;
|
|
89
97
|
/** Fixed overlay above scrolling rows on iOS 26 and newer. */
|
|
90
98
|
topOverlay?: ReactNode;
|
|
91
99
|
/** Selects UIKit's top scroll-edge effect on iOS 26 and newer. */
|
|
@@ -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,27 @@ 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'];
|
|
378
431
|
subtitle?: string;
|
|
379
432
|
tertiary?: string;
|
|
380
433
|
tertiaryTone?: 'secondary' | 'info';
|
|
381
434
|
titleLines?: 1 | 2;
|
|
382
|
-
|
|
435
|
+
/** Zero displays the complete subtitle. */
|
|
436
|
+
subtitleLines?: 0 | 1 | 2;
|
|
383
437
|
badges?: readonly BadgeModel[];
|
|
384
438
|
trailing?: readonly TrailingAccessory[];
|
|
385
439
|
draggable?: boolean;
|
|
@@ -413,6 +467,7 @@ export type ActivityAmount = Readonly<{
|
|
|
413
467
|
export type ActivityRow = RowBase & Readonly<{
|
|
414
468
|
type: 'activity';
|
|
415
469
|
leading: LeadingVisual;
|
|
470
|
+
hideLeading?: boolean;
|
|
416
471
|
secondaryLeading?: LeadingVisual;
|
|
417
472
|
title: string;
|
|
418
473
|
description?: string;
|
|
@@ -436,11 +491,14 @@ export type ActivityRow = RowBase & Readonly<{
|
|
|
436
491
|
}>;
|
|
437
492
|
export type MessageRow = RowBase & Readonly<{
|
|
438
493
|
type: 'message';
|
|
494
|
+
/** Draws only top and bottom container borders when a border is supplied. */
|
|
495
|
+
presentation?: 'inlineWarning';
|
|
439
496
|
unread?: boolean;
|
|
440
497
|
leading?: LeadingVisual;
|
|
441
498
|
title: string;
|
|
442
499
|
body: string;
|
|
443
|
-
|
|
500
|
+
/** Zero displays the complete body. */
|
|
501
|
+
bodyLines?: 0 | 1 | 2 | 3;
|
|
444
502
|
time: string;
|
|
445
503
|
thumbnail?: ImageSource;
|
|
446
504
|
style?: MessageRowStyle;
|
|
@@ -448,8 +506,12 @@ export type MessageRow = RowBase & Readonly<{
|
|
|
448
506
|
export type DataColumn = Readonly<{
|
|
449
507
|
key: string;
|
|
450
508
|
text: string;
|
|
509
|
+
textSegments?: readonly ValueTextSegment[];
|
|
510
|
+
titleIcon?: IdentityRow['titleIcon'];
|
|
511
|
+
secondaryTitleIcon?: IdentityRow['titleIcon'];
|
|
451
512
|
secondaryLeadingText?: string;
|
|
452
513
|
secondaryText?: string;
|
|
514
|
+
secondaryTextSegments?: readonly ValueTextSegment[];
|
|
453
515
|
weight?: 1 | 2 | 3;
|
|
454
516
|
alignment?: 'start' | 'center' | 'end';
|
|
455
517
|
tone?: 'primary' | 'secondary' | 'positive' | 'negative';
|
|
@@ -459,6 +521,7 @@ export type DataRow = RowBase & Readonly<{
|
|
|
459
521
|
type: 'dataRow';
|
|
460
522
|
leading?: LeadingVisual;
|
|
461
523
|
columns: readonly DataColumn[];
|
|
524
|
+
trailing?: readonly TrailingAccessory[];
|
|
462
525
|
checkbox?: Extract<TrailingAccessory, {
|
|
463
526
|
kind: 'checkbox';
|
|
464
527
|
}>;
|
|
@@ -611,9 +674,11 @@ export type SectionHeaderRow = RowBase & Readonly<{
|
|
|
611
674
|
indexTitle?: string;
|
|
612
675
|
variant?: 'summary' | 'gallery' | 'history';
|
|
613
676
|
title: string;
|
|
677
|
+
leadingBadge?: BadgeModel;
|
|
614
678
|
titleLoading?: boolean;
|
|
615
679
|
subtitle?: string;
|
|
616
680
|
value?: string;
|
|
681
|
+
valueHelp?: RowTextHelp;
|
|
617
682
|
valueActionKey?: string;
|
|
618
683
|
titleIcon?: Extract<TrailingAccessory, {
|
|
619
684
|
kind: 'icon';
|
|
@@ -641,6 +706,19 @@ export type ActionRow = RowBase & Readonly<{
|
|
|
641
706
|
trailing?: readonly TrailingAccessory[];
|
|
642
707
|
style?: ActionRowStyle;
|
|
643
708
|
}>;
|
|
709
|
+
export type ButtonGroupRow = RowBase & Readonly<{
|
|
710
|
+
type: 'buttonGroup';
|
|
711
|
+
buttons: readonly Readonly<{
|
|
712
|
+
key: string;
|
|
713
|
+
label: string;
|
|
714
|
+
actionKey: string;
|
|
715
|
+
disabled?: boolean;
|
|
716
|
+
loading?: boolean;
|
|
717
|
+
testID?: string;
|
|
718
|
+
accessibilityLabel?: string;
|
|
719
|
+
}>[];
|
|
720
|
+
style?: TemplateBoxStyle<'buttonGroup'>;
|
|
721
|
+
}>;
|
|
644
722
|
export type SystemRow = RowBase & Readonly<{
|
|
645
723
|
style?: SystemRowStyle;
|
|
646
724
|
}> & (Readonly<{
|
|
@@ -677,7 +755,7 @@ export type SystemRow = RowBase & Readonly<{
|
|
|
677
755
|
variant: 'spacer';
|
|
678
756
|
height: number;
|
|
679
757
|
}>);
|
|
680
|
-
export type RowModel = IdentityRow | WalletGroupRow | RailRow | ActivityRow | MessageRow | DataRow | MarketRow | MediaTileRow | MetricCardRow | SectionHeaderRow | ActionRow | SystemRow;
|
|
758
|
+
export type RowModel = IdentityRow | WalletGroupRow | RailRow | ActivityRow | MessageRow | DataRow | MarketRow | MediaTileRow | MetricCardRow | SectionHeaderRow | ActionRow | ButtonGroupRow | SystemRow;
|
|
681
759
|
export type NativeListTheme = Readonly<{
|
|
682
760
|
checkboxBackground?: string;
|
|
683
761
|
checkboxBorder?: string;
|
|
@@ -687,6 +765,8 @@ export type NativeListTheme = Readonly<{
|
|
|
687
765
|
rowBackground: string;
|
|
688
766
|
rowSelectedBackground: string;
|
|
689
767
|
rowPressedBackground?: string;
|
|
768
|
+
/** Web-only enabled-row hover color; defaults to rowPressedBackground. */
|
|
769
|
+
rowHoverBackground?: string;
|
|
690
770
|
subduedBackground?: string;
|
|
691
771
|
strongBackground?: string;
|
|
692
772
|
/** Web-only background for a displayed declared image fallback. */
|
|
@@ -699,6 +779,8 @@ export type NativeListTheme = Readonly<{
|
|
|
699
779
|
separator: string;
|
|
700
780
|
accent: string;
|
|
701
781
|
positive: string;
|
|
782
|
+
/** Optional exact background for the success tone of section leading badges. */
|
|
783
|
+
successBackground?: string;
|
|
702
784
|
negative: string;
|
|
703
785
|
criticalBackground?: string;
|
|
704
786
|
inverseBackground?: string;
|
|
@@ -740,6 +822,12 @@ export type NativeListListStyle = Readonly<{
|
|
|
740
822
|
export type NativeListSnapshot = Readonly<{
|
|
741
823
|
schemaVersion: 1;
|
|
742
824
|
generation: number;
|
|
825
|
+
/** One-shot animation for a user-initiated row-key insertion or removal. */
|
|
826
|
+
structuralTransition?: Readonly<{
|
|
827
|
+
id: string;
|
|
828
|
+
durationMs?: number;
|
|
829
|
+
anchorKey?: string;
|
|
830
|
+
}>;
|
|
743
831
|
layout: Readonly<{
|
|
744
832
|
kind: NativeListLayout;
|
|
745
833
|
orientation?: NativeListOrientation;
|
|
@@ -775,7 +863,7 @@ type CommonPatchFields = 'revision' | 'disabled' | 'selected' | 'separator' | 'h
|
|
|
775
863
|
export type RowPatch = Readonly<{
|
|
776
864
|
type: 'identity';
|
|
777
865
|
key: string;
|
|
778
|
-
changes: Partial<Pick<IdentityRow, CommonPatchFields | 'title' | 'subtitle' | 'tertiary' | 'tertiaryTone' | 'badges' | 'trailing' | 'leading' | 'leadingAction' | 'titleMatch' | 'titleActionKey' | 'titleActionOnHover' | 'subtitleSegments'>>;
|
|
866
|
+
changes: Partial<Pick<IdentityRow, CommonPatchFields | 'title' | 'titleSuffixes' | 'titleIcon' | 'secondaryTitleIcon' | 'subtitle' | 'subtitleLines' | 'contentHeight' | 'longPressActionKey' | 'tertiary' | 'tertiaryTone' | 'badges' | 'trailing' | 'leading' | 'leadingAction' | 'titleMatch' | 'titleActionKey' | 'titleActionOnHover' | 'subtitleSegments'>>;
|
|
779
867
|
}> | Readonly<{
|
|
780
868
|
type: 'rail';
|
|
781
869
|
key: string;
|
|
@@ -783,15 +871,15 @@ export type RowPatch = Readonly<{
|
|
|
783
871
|
}> | Readonly<{
|
|
784
872
|
type: 'activity';
|
|
785
873
|
key: string;
|
|
786
|
-
changes: Partial<Pick<ActivityRow, CommonPatchFields | 'title' | 'description' | 'status' | 'amounts' | 'badges' | 'presentation' | 'fee' | 'descriptionActionKey' | 'primaryAmount' | 'secondaryAmount' | 'leading' | 'secondaryLeading' | 'footerActions'>>;
|
|
874
|
+
changes: Partial<Pick<ActivityRow, CommonPatchFields | 'title' | 'description' | 'status' | 'amounts' | 'badges' | 'presentation' | 'fee' | 'descriptionActionKey' | 'primaryAmount' | 'secondaryAmount' | 'leading' | 'hideLeading' | 'secondaryLeading' | 'footerActions'>>;
|
|
787
875
|
}> | Readonly<{
|
|
788
876
|
type: 'message';
|
|
789
877
|
key: string;
|
|
790
|
-
changes: Partial<Pick<MessageRow, CommonPatchFields | 'unread' | 'title' | 'body' | 'bodyLines' | 'time' | 'thumbnail'>>;
|
|
878
|
+
changes: Partial<Pick<MessageRow, CommonPatchFields | 'unread' | 'title' | 'body' | 'bodyLines' | 'presentation' | 'time' | 'thumbnail'>>;
|
|
791
879
|
}> | Readonly<{
|
|
792
880
|
type: 'dataRow';
|
|
793
881
|
key: string;
|
|
794
|
-
changes: Partial<Pick<DataRow, CommonPatchFields | 'leading' | 'columns' | 'checkbox' | 'index' | 'badge' | 'badges' | 'favorite' | 'favoriteActive'>>;
|
|
882
|
+
changes: Partial<Pick<DataRow, CommonPatchFields | 'leading' | 'columns' | 'trailing' | 'checkbox' | 'index' | 'badge' | 'badges' | 'favorite' | 'favoriteActive'>>;
|
|
795
883
|
}> | Readonly<{
|
|
796
884
|
type: 'market';
|
|
797
885
|
key: string;
|
|
@@ -807,11 +895,15 @@ export type RowPatch = Readonly<{
|
|
|
807
895
|
}> | Readonly<{
|
|
808
896
|
type: 'sectionHeader';
|
|
809
897
|
key: string;
|
|
810
|
-
changes: Partial<Pick<SectionHeaderRow, CommonPatchFields | 'variant' | 'titleLoading' | 'title' | 'subtitle' | 'value' | 'valueActionKey' | 'titleActionKey' | 'titleActionOnHover' | 'titleIcon' | 'valueIcon' | 'checkbox'>>;
|
|
898
|
+
changes: Partial<Pick<SectionHeaderRow, CommonPatchFields | 'variant' | 'titleLoading' | 'title' | 'subtitle' | 'value' | 'valueHelp' | 'leadingBadge' | 'valueActionKey' | 'titleActionKey' | 'titleActionOnHover' | 'titleIcon' | 'valueIcon' | 'checkbox'>>;
|
|
811
899
|
}> | Readonly<{
|
|
812
900
|
type: 'action';
|
|
813
901
|
key: string;
|
|
814
902
|
changes: Partial<Pick<ActionRow, CommonPatchFields | 'title' | 'tone' | 'icon' | 'checkbox' | 'trailing'>>;
|
|
903
|
+
}> | Readonly<{
|
|
904
|
+
type: 'buttonGroup';
|
|
905
|
+
key: string;
|
|
906
|
+
changes: Partial<Pick<ButtonGroupRow, CommonPatchFields | 'buttons'>>;
|
|
815
907
|
}> | Readonly<{
|
|
816
908
|
type: 'system';
|
|
817
909
|
key: string;
|
|
@@ -821,7 +913,7 @@ export type RowPatch = Readonly<{
|
|
|
821
913
|
message?: string;
|
|
822
914
|
}>;
|
|
823
915
|
}>;
|
|
824
|
-
export type NativeListActionSource = 'row' | 'marketBadge' | 'leadingAction' | 'trailingAccessory' | 'footerAction' | 'description' | 'mediaClose';
|
|
916
|
+
export type NativeListActionSource = 'row' | 'marketBadge' | 'leadingAction' | 'trailingAccessory' | 'footerAction' | 'buttonGroup' | 'description' | 'mediaClose';
|
|
825
917
|
export type NativeListWindowRect = Readonly<{
|
|
826
918
|
x: number;
|
|
827
919
|
y: number;
|
|
@@ -1,7 +1,20 @@
|
|
|
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[];
|
|
4
11
|
export declare function applyRowPatches(snapshot: NativeListSnapshot, patches: readonly RowPatch[]): NativeListSnapshot;
|
|
12
|
+
/** Native wrapper only: preserve full public validation for unsupported patches. */
|
|
13
|
+
export declare function applyOwnedNativePatches(snapshot: NativeListSnapshot, patches: readonly RowPatch[]): {
|
|
14
|
+
patches: readonly RowPatch[];
|
|
15
|
+
snapshot: NativeListSnapshot;
|
|
16
|
+
json: string;
|
|
17
|
+
};
|
|
5
18
|
export declare function serializeSnapshot(snapshot: NativeListSnapshot): string;
|
|
6
19
|
export declare function serializePatches(patches: readonly RowPatch[]): string;
|
|
7
20
|
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -145,6 +145,7 @@ export declare class NativeListWebEngine {
|
|
|
145
145
|
private pullDistance;
|
|
146
146
|
private virtualizationEnabled;
|
|
147
147
|
private actionAnchor;
|
|
148
|
+
private pressedHelpElement;
|
|
148
149
|
private readonly actionAnchorInstanceId;
|
|
149
150
|
private actionAnchorCounter;
|
|
150
151
|
private bindingEpochCounter;
|
|
@@ -153,6 +154,22 @@ export declare class NativeListWebEngine {
|
|
|
153
154
|
private lastViewportWidth;
|
|
154
155
|
private lastViewportHeight;
|
|
155
156
|
private destroyed;
|
|
157
|
+
private hasAppliedSnapshot;
|
|
158
|
+
private lastStructuralTransitionId;
|
|
159
|
+
private structuralFrame;
|
|
160
|
+
private structuralFinish;
|
|
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;
|
|
156
173
|
private sectionIndexAlignStart;
|
|
157
174
|
private measuredRendererHeights;
|
|
158
175
|
private notifyScrollCommandAccepted;
|
|
@@ -168,6 +185,13 @@ export declare class NativeListWebEngine {
|
|
|
168
185
|
updateCallbacks(callbacks: NativeListWebCallbacks): void;
|
|
169
186
|
setVirtualizationEnabled(enabled: boolean): void;
|
|
170
187
|
applySnapshot(snapshot: NativeListSnapshot): void;
|
|
188
|
+
private cancelStructuralAnimation;
|
|
189
|
+
private handleStructuralUserScroll;
|
|
190
|
+
private writeStructuralHeight;
|
|
191
|
+
private reactFooterElement;
|
|
192
|
+
private readReactFooterHeight;
|
|
193
|
+
private applyStructuralFooterVisual;
|
|
194
|
+
private applyStructuralSnapshot;
|
|
171
195
|
currentContentHeight(): number;
|
|
172
196
|
currentSnapshot(): NativeListSnapshot;
|
|
173
197
|
applyPatches(patches: readonly RowPatch[]): void;
|
|
@@ -239,6 +263,8 @@ export declare class NativeListWebEngine {
|
|
|
239
263
|
private handleMarketTouchMove;
|
|
240
264
|
private handleMarketPointerEnd;
|
|
241
265
|
private handleTitlePointerOver;
|
|
266
|
+
private emitHoverAction;
|
|
267
|
+
private handleIconHelpPointerDown;
|
|
242
268
|
private handleTitlePointerOut;
|
|
243
269
|
private handleClick;
|
|
244
270
|
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);
|
|
@@ -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;
|
|
@@ -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)) {
|
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
|
|
@@ -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);
|
|
@@ -130,6 +130,12 @@ using namespace margelo::nitro::nativelist::views;
|
|
|
130
130
|
: !newViewProps.containerSlotHeightsJson.hasSameValue(oldViewProps->containerSlotHeightsJson)) {
|
|
131
131
|
swiftPart.setContainerSlotHeightsJson(newViewProps.containerSlotHeightsJson.get());
|
|
132
132
|
}
|
|
133
|
+
// sidecarLayoutJson: string
|
|
134
|
+
if (oldViewProps == nullptr
|
|
135
|
+
? newViewProps.sidecarLayoutJson.isProvided()
|
|
136
|
+
: !newViewProps.sidecarLayoutJson.hasSameValue(oldViewProps->sidecarLayoutJson)) {
|
|
137
|
+
swiftPart.setSidecarLayoutJson(newViewProps.sidecarLayoutJson.get());
|
|
138
|
+
}
|
|
133
139
|
// topScrollEdgeEffect: enum
|
|
134
140
|
if (oldViewProps == nullptr
|
|
135
141
|
? newViewProps.topScrollEdgeEffect.isProvided()
|
|
@@ -13,6 +13,7 @@ public protocol HybridNativeListSpec_protocol: HybridObject, HybridView {
|
|
|
13
13
|
var snapshotJson: String { get set }
|
|
14
14
|
var fontFamiliesJson: String { get set }
|
|
15
15
|
var containerSlotHeightsJson: String { get set }
|
|
16
|
+
var sidecarLayoutJson: String { get set }
|
|
16
17
|
var topScrollEdgeEffect: NativeListScrollEdgeEffect { get set }
|
|
17
18
|
var topOverlayHeight: Double { get set }
|
|
18
19
|
var scrollPositionThresholdsJson: String { get set }
|
|
@@ -154,6 +154,17 @@ open class HybridNativeListSpec_cxx {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
public final var sidecarLayoutJson: std.string {
|
|
158
|
+
@inline(__always)
|
|
159
|
+
get {
|
|
160
|
+
return std.string(self.__implementation.sidecarLayoutJson)
|
|
161
|
+
}
|
|
162
|
+
@inline(__always)
|
|
163
|
+
set {
|
|
164
|
+
self.__implementation.sidecarLayoutJson = String(newValue)
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
157
168
|
public final var topScrollEdgeEffect: Int32 {
|
|
158
169
|
@inline(__always)
|
|
159
170
|
get {
|
|
@@ -20,6 +20,8 @@ namespace margelo::nitro::nativelist {
|
|
|
20
20
|
prototype.registerHybridSetter("fontFamiliesJson", &HybridNativeListSpec::setFontFamiliesJson);
|
|
21
21
|
prototype.registerHybridGetter("containerSlotHeightsJson", &HybridNativeListSpec::getContainerSlotHeightsJson);
|
|
22
22
|
prototype.registerHybridSetter("containerSlotHeightsJson", &HybridNativeListSpec::setContainerSlotHeightsJson);
|
|
23
|
+
prototype.registerHybridGetter("sidecarLayoutJson", &HybridNativeListSpec::getSidecarLayoutJson);
|
|
24
|
+
prototype.registerHybridSetter("sidecarLayoutJson", &HybridNativeListSpec::setSidecarLayoutJson);
|
|
23
25
|
prototype.registerHybridGetter("topScrollEdgeEffect", &HybridNativeListSpec::getTopScrollEdgeEffect);
|
|
24
26
|
prototype.registerHybridSetter("topScrollEdgeEffect", &HybridNativeListSpec::setTopScrollEdgeEffect);
|
|
25
27
|
prototype.registerHybridGetter("topOverlayHeight", &HybridNativeListSpec::getTopOverlayHeight);
|