@lynx-js/types 3.4.11 → 3.5.9

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.
@@ -0,0 +1,67 @@
1
+ // Copyright 2025 The Lynx Authors. All rights reserved.
2
+ // Licensed under the Apache License Version 2.0 that can be found in the
3
+ // LICENSE file in the root directory of this source tree.
4
+
5
+ import { StandardProps } from '../props';
6
+
7
+ export interface ListItemProps extends StandardProps {
8
+ /**
9
+ * The unique key of list child node, and it's a mandatory property.
10
+ * @Android
11
+ * @iOS
12
+ * @Harmony
13
+ * @PC
14
+ */
15
+ 'item-key': string;
16
+
17
+ /**
18
+ * sticky top effect. Not compatible with flatten.
19
+ * @defaultValue false
20
+ * @Android
21
+ * @iOS
22
+ * @Harmony
23
+ * @PC
24
+ */
25
+ 'sticky-top'?: boolean;
26
+
27
+ /**
28
+ * sticky bottom effect. Not compatible with flatten.
29
+ * @defaultValue false
30
+ * @Android
31
+ * @iOS
32
+ * @Harmony
33
+ * @PC
34
+ */
35
+ 'sticky-bottom'?: boolean;
36
+
37
+ /**
38
+ * Adding the `full-span` attribute to `<list-item/>` will make it occupy a single line. You need to configure {@link ListProps."list-type" | list-type} correctly to make the list enter a multi-column layout for this to work.
39
+ * @defaultValue false
40
+ * @Android
41
+ * @iOS
42
+ * @Harmony
43
+ * @PC
44
+ */
45
+ 'full-span'?: boolean;
46
+
47
+ /**
48
+ * Preset size in main scroll axis to control the placeholder size of the view while the list component has not finished rendering. The more accurately it is set, the less flickering the list will have. If not set, we will use list size in main axis as the estimated size of list-item.
49
+ * @defaultValue -1
50
+ * @Android
51
+ * @iOS
52
+ * @Harmony
53
+ * @PC
54
+ */
55
+ 'estimated-main-axis-size-px'?: number;
56
+
57
+ /**
58
+ * Control whether the list-item can be recycled. If set to false, the list-item will not be recycled after being scrolled off the screen, and do not need to be re-rendered when they come back on the screen. The default value is true.
59
+ * @since 3.4
60
+ * @defaultValue true
61
+ * @Android
62
+ * @iOS
63
+ * @Harmony
64
+ * @PC
65
+ */
66
+ recyclable?: boolean;
67
+ }