@onekeyfe/react-native-native-list 3.0.157-alpha.249 → 3.0.157-alpha.251
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 +21 -5
- package/android/src/main/java/com/onekey/nativelist/NativeListAccessoryStack.kt +711 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListActionRenderer.kt +169 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListActivityRenderer.kt +243 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListAdapter.kt +20 -6
- package/android/src/main/java/com/onekey/nativelist/NativeListDataRowRenderer.kt +487 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +820 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListImageSlot.kt +147 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListLeadingVisual.kt +453 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListMarketRenderer.kt +997 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListMediaTileRenderer.kt +234 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListMessageRenderer.kt +232 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListMetricCardRenderer.kt +551 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +24 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListPrimitives.kt +475 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListRailRenderer.kt +143 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListRendererRegistry.kt +42 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +415 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListResolvedText.kt +163 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListRowHost.kt +70 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListSectionHeaderRenderer.kt +748 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListSystemRenderer.kt +464 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListTextView.kt +25 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListView.kt +174 -104
- package/android/src/main/java/com/onekey/nativelist/NativeListWalletGroupRenderer.kt +407 -0
- package/android/src/test/java/com/margelo/nitro/nativelist/NativeListSelectorBackgroundColorTest.kt +34 -0
- package/docs/DESIGN.md +518 -9
- package/docs/MIGRATION_BASELINE.md +117 -0
- package/docs/ROW_TEMPLATES.md +359 -0
- package/docs/SPEC.md +358 -0
- package/docs/STYLE_SPEC.md +978 -0
- package/docs/images/list-capabilities.svg +39 -0
- package/docs/images/row-action.svg +17 -0
- package/docs/images/row-activity.svg +24 -0
- package/docs/images/row-data.svg +24 -0
- package/docs/images/row-identity.svg +25 -0
- package/docs/images/row-market.svg +23 -0
- package/docs/images/row-media-tile.svg +26 -0
- package/docs/images/row-message.svg +20 -0
- package/docs/images/row-metric-card.svg +33 -0
- package/docs/images/row-rail.svg +18 -0
- package/docs/images/row-section-header.svg +19 -0
- package/docs/images/row-style-regions.svg +30 -0
- package/docs/images/row-system.svg +30 -0
- package/docs/images/row-wallet-group.svg +26 -0
- package/ios/NativeListAccessoryStack.swift +680 -0
- package/ios/NativeListActionRenderer.swift +108 -0
- package/ios/NativeListActivityRenderer.swift +179 -0
- package/ios/NativeListDataRowRenderer.swift +444 -0
- package/ios/NativeListIdentityRenderer.swift +685 -0
- package/ios/NativeListImageSlot.swift +140 -0
- package/ios/NativeListLeadingVisual.swift +372 -0
- package/ios/NativeListMarketRenderer.swift +698 -0
- package/ios/NativeListMediaTileRenderer.swift +184 -0
- package/ios/NativeListMessageRenderer.swift +168 -0
- package/ios/NativeListMetricCardRenderer.swift +420 -0
- package/ios/NativeListModels.swift +32 -0
- package/ios/NativeListRailRenderer.swift +152 -0
- package/ios/NativeListRendererCell.swift +311 -0
- package/ios/NativeListRendererRegistry.swift +50 -0
- package/ios/NativeListResolvedText.swift +122 -0
- package/ios/NativeListRowHost.swift +63 -0
- package/ios/NativeListSectionHeaderRenderer.swift +708 -0
- package/ios/NativeListSystemRenderer.swift +568 -0
- package/ios/NativeListTextLabel.swift +42 -0
- package/ios/NativeListTextStyles.swift +236 -0
- package/ios/NativeListWalletGroupRenderer.swift +255 -0
- package/ios/RNCNativeListView.swift +111 -180
- package/lib/module/models.js +54 -0
- package/lib/module/validation.js +324 -26
- package/lib/module/web/NativeListWebEngine.js +148 -936
- package/lib/module/web/templates/ActionRowRenderer.js +97 -0
- package/lib/module/web/templates/ActivityRowRenderer.js +95 -0
- package/lib/module/web/templates/DataRowRenderer.js +145 -0
- package/lib/module/web/templates/IdentityRowRenderer.js +289 -0
- package/lib/module/web/templates/MarketRowRenderer.js +310 -0
- package/lib/module/web/templates/MediaTileRowRenderer.js +132 -0
- package/lib/module/web/templates/MessageRowRenderer.js +165 -0
- package/lib/module/web/templates/MetricCardRowRenderer.js +172 -0
- package/lib/module/web/templates/RailRowRenderer.js +98 -0
- package/lib/module/web/templates/RowContainerStyle.js +100 -0
- package/lib/module/web/templates/RowElements.js +93 -0
- package/lib/module/web/templates/RowRendererRegistry.js +70 -0
- package/lib/module/web/templates/RowText.js +121 -0
- package/lib/module/web/templates/RowVisual.js +43 -0
- package/lib/module/web/templates/SectionHeaderRowRenderer.js +146 -0
- package/lib/module/web/templates/SystemRowRenderer.js +161 -0
- package/lib/module/web/templates/WalletGroupRowRenderer.js +96 -0
- package/lib/typescript/src/models.d.ts +166 -13
- package/lib/typescript/src/web/NativeListWebEngine.d.ts +18 -16
- package/lib/typescript/src/web/templates/ActionRowRenderer.d.ts +15 -0
- package/lib/typescript/src/web/templates/ActivityRowRenderer.d.ts +15 -0
- package/lib/typescript/src/web/templates/DataRowRenderer.d.ts +15 -0
- package/lib/typescript/src/web/templates/IdentityRowRenderer.d.ts +16 -0
- package/lib/typescript/src/web/templates/MarketRowRenderer.d.ts +30 -0
- package/lib/typescript/src/web/templates/MediaTileRowRenderer.d.ts +15 -0
- package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +44 -0
- package/lib/typescript/src/web/templates/MetricCardRowRenderer.d.ts +15 -0
- package/lib/typescript/src/web/templates/RailRowRenderer.d.ts +28 -0
- package/lib/typescript/src/web/templates/RowContainerStyle.d.ts +9 -0
- package/lib/typescript/src/web/templates/RowElements.d.ts +38 -0
- package/lib/typescript/src/web/templates/RowRendererRegistry.d.ts +83 -0
- package/lib/typescript/src/web/templates/RowText.d.ts +9 -0
- package/lib/typescript/src/web/templates/RowVisual.d.ts +20 -0
- package/lib/typescript/src/web/templates/SectionHeaderRowRenderer.d.ts +15 -0
- package/lib/typescript/src/web/templates/SystemRowRenderer.d.ts +16 -0
- package/lib/typescript/src/web/templates/WalletGroupRowRenderer.d.ts +20 -0
- package/package.json +3 -3
- package/src/models.ts +281 -19
- package/src/validation.ts +501 -46
- package/src/web/NativeListWebEngine.ts +361 -1932
- package/src/web/templates/ActionRowRenderer.ts +123 -0
- package/src/web/templates/ActivityRowRenderer.ts +159 -0
- package/src/web/templates/DataRowRenderer.ts +212 -0
- package/src/web/templates/IdentityRowRenderer.ts +527 -0
- package/src/web/templates/MarketRowRenderer.ts +467 -0
- package/src/web/templates/MediaTileRowRenderer.ts +182 -0
- package/src/web/templates/MessageRowRenderer.ts +306 -0
- package/src/web/templates/MetricCardRowRenderer.ts +337 -0
- package/src/web/templates/RailRowRenderer.ts +136 -0
- package/src/web/templates/RowContainerStyle.ts +131 -0
- package/src/web/templates/RowElements.ts +160 -0
- package/src/web/templates/RowRendererRegistry.ts +111 -0
- package/src/web/templates/RowText.ts +181 -0
- package/src/web/templates/RowVisual.ts +115 -0
- package/src/web/templates/SectionHeaderRowRenderer.ts +243 -0
- package/src/web/templates/SystemRowRenderer.ts +282 -0
- package/src/web/templates/WalletGroupRowRenderer.ts +131 -0
- package/android/src/main/java/com/onekey/nativelist/NativeListRowView.kt +0 -4538
- package/ios/NativeListCell.swift +0 -4300
|
@@ -29,43 +29,157 @@ export type BadgeModel = Readonly<{
|
|
|
29
29
|
text: string;
|
|
30
30
|
tone?: 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
31
31
|
}>;
|
|
32
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Named typography steps, shared with the application's design scale. Resolved
|
|
34
|
+
* to fontSize/lineHeight/fontWeight in JavaScript before the snapshot is
|
|
35
|
+
* serialized, so no native renderer needs to know the vocabulary.
|
|
36
|
+
* See docs/STYLE_SPEC.md §3.2.
|
|
37
|
+
*/
|
|
38
|
+
export type NativeListTypographyToken = '$headingXl' | '$headingLg' | '$headingMd' | '$headingSm' | '$headingXs' | '$bodyLg' | '$bodyMd' | '$bodySm' | '$bodyXs';
|
|
39
|
+
export type NativeListTextStyle = Readonly<{
|
|
40
|
+
token?: NativeListTypographyToken;
|
|
33
41
|
fontSize?: number;
|
|
34
42
|
fontWeight?: 'regular' | 'medium' | 'semibold' | 'bold';
|
|
35
43
|
color?: string;
|
|
36
44
|
lineHeight?: number;
|
|
37
|
-
lines
|
|
45
|
+
/** Maximum visible lines; does not reserve empty lines or enlarge the row. */
|
|
46
|
+
lines?: 1 | 2 | 3;
|
|
47
|
+
truncate?: 'tail' | 'clip';
|
|
38
48
|
alignment?: 'start' | 'center' | 'end';
|
|
49
|
+
verticalAlignment?: 'top' | 'center' | 'bottom';
|
|
50
|
+
/** Optical translation in logical units; does not affect layout. */
|
|
51
|
+
offsetY?: number;
|
|
39
52
|
}>;
|
|
40
|
-
|
|
53
|
+
/** Retained alias: Market shipped this name before the style surface was shared. */
|
|
54
|
+
export type MarketTextStyle = NativeListTextStyle;
|
|
55
|
+
export type NativeListImageStyle = Readonly<{
|
|
41
56
|
width?: number;
|
|
42
57
|
height?: number;
|
|
43
58
|
shape?: 'circle' | 'rounded' | 'square';
|
|
44
59
|
cornerRadius?: number;
|
|
45
60
|
contentFit?: ImageContentFit;
|
|
46
61
|
}>;
|
|
47
|
-
export type
|
|
62
|
+
export type MarketImageStyle = NativeListImageStyle;
|
|
63
|
+
export type NativeListRowContainerStyle = Readonly<{
|
|
64
|
+
/** Explicit row height in logical units; overrides RowBase.height. */
|
|
65
|
+
height?: number;
|
|
66
|
+
backgroundColor?: string;
|
|
67
|
+
opacity?: number;
|
|
68
|
+
cornerRadius?: number;
|
|
69
|
+
borderWidth?: number;
|
|
70
|
+
borderColor?: string;
|
|
71
|
+
contentVerticalAlignment?: 'top' | 'center' | 'bottom';
|
|
72
|
+
}>;
|
|
73
|
+
/** Local box vocabulary. Each template exposes only parameters for its own slots. */
|
|
74
|
+
export type RowBoxStyle = Readonly<{
|
|
75
|
+
container?: NativeListRowContainerStyle;
|
|
48
76
|
horizontalPadding?: number;
|
|
49
77
|
verticalPadding?: number;
|
|
50
78
|
leadingGap?: number;
|
|
51
|
-
/**
|
|
79
|
+
/** Gap between the template's text rows. Omission preserves its default. */
|
|
52
80
|
lineGap?: number;
|
|
53
81
|
titleBadgeGap?: number;
|
|
82
|
+
trailingGap?: number;
|
|
83
|
+
image?: NativeListImageStyle;
|
|
84
|
+
}>;
|
|
85
|
+
/** Template-owned slots determine which local box parameters exist, on every platform. */
|
|
86
|
+
export declare const ROW_BOX_STYLE_KEYS_BY_TYPE: {
|
|
87
|
+
readonly identity: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "lineGap", "titleBadgeGap", "trailingGap", "image"];
|
|
88
|
+
readonly walletGroup: readonly ["horizontalPadding", "verticalPadding"];
|
|
89
|
+
readonly rail: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "titleBadgeGap", "trailingGap", "image"];
|
|
90
|
+
readonly activity: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "lineGap", "trailingGap", "image"];
|
|
91
|
+
readonly message: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "lineGap", "image"];
|
|
92
|
+
readonly dataRow: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "lineGap", "titleBadgeGap", "image"];
|
|
93
|
+
readonly market: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "lineGap", "titleBadgeGap", "trailingGap", "image"];
|
|
94
|
+
readonly mediaTile: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "lineGap", "image"];
|
|
95
|
+
readonly metricCard: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "lineGap", "image"];
|
|
96
|
+
readonly sectionHeader: readonly ["horizontalPadding", "verticalPadding", "lineGap", "trailingGap"];
|
|
97
|
+
readonly action: readonly ["horizontalPadding", "verticalPadding", "leadingGap", "trailingGap", "image"];
|
|
98
|
+
readonly system: readonly ["horizontalPadding", "verticalPadding", "lineGap"];
|
|
99
|
+
};
|
|
100
|
+
type TemplateBoxStyle<T extends keyof typeof ROW_BOX_STYLE_KEYS_BY_TYPE> = Pick<RowBoxStyle, (typeof ROW_BOX_STYLE_KEYS_BY_TYPE)[T][number] | 'container'>;
|
|
101
|
+
/**
|
|
102
|
+
* A style key names the model field it modifies, never the view that carries
|
|
103
|
+
* it. Each template renderer owns its views and maps the key to whichever view
|
|
104
|
+
* renders that field (for example metricCard `value` is its large number), so
|
|
105
|
+
* the same key name keeps one meaning across platforms. See docs/STYLE_SPEC.md §4.
|
|
106
|
+
*/
|
|
107
|
+
export type IdentityRowStyle = TemplateBoxStyle<'identity'> & Readonly<{
|
|
108
|
+
title?: NativeListTextStyle;
|
|
109
|
+
subtitle?: NativeListTextStyle;
|
|
110
|
+
tertiary?: NativeListTextStyle;
|
|
111
|
+
badge?: NativeListTextStyle;
|
|
112
|
+
value?: NativeListTextStyle;
|
|
113
|
+
valueSecondary?: NativeListTextStyle;
|
|
114
|
+
}>;
|
|
115
|
+
export type WalletGroupRowStyle = TemplateBoxStyle<'walletGroup'>;
|
|
116
|
+
export type RailRowStyle = TemplateBoxStyle<'rail'> & Readonly<{
|
|
117
|
+
title?: NativeListTextStyle;
|
|
118
|
+
badge?: NativeListTextStyle;
|
|
119
|
+
status?: NativeListTextStyle;
|
|
120
|
+
}>;
|
|
121
|
+
export type ActivityRowStyle = TemplateBoxStyle<'activity'> & Readonly<{
|
|
122
|
+
title?: NativeListTextStyle;
|
|
123
|
+
description?: NativeListTextStyle;
|
|
124
|
+
status?: NativeListTextStyle;
|
|
125
|
+
primaryAmount?: NativeListTextStyle;
|
|
126
|
+
secondaryAmount?: NativeListTextStyle;
|
|
127
|
+
}>;
|
|
128
|
+
export type MessageRowStyle = TemplateBoxStyle<'message'> & Readonly<{
|
|
129
|
+
title?: NativeListTextStyle;
|
|
130
|
+
body?: NativeListTextStyle;
|
|
131
|
+
time?: NativeListTextStyle;
|
|
132
|
+
}>;
|
|
133
|
+
export type DataRowStyle = TemplateBoxStyle<'dataRow'> & Readonly<{
|
|
134
|
+
columns?: NativeListTextStyle;
|
|
135
|
+
columnSecondary?: NativeListTextStyle;
|
|
136
|
+
index?: NativeListTextStyle;
|
|
137
|
+
}>;
|
|
138
|
+
export type MarketRowStyle = TemplateBoxStyle<'market'> & Readonly<{
|
|
54
139
|
/** OneKey patch: keep badges next to the intrinsic title width. */
|
|
55
140
|
titleBadgeLayout?: 'inline';
|
|
56
|
-
trailingGap?: number;
|
|
57
141
|
/** OneKey patch: preserve separate Market content and subtitle insets. */
|
|
58
142
|
contentTrailingGap?: number;
|
|
59
143
|
subtitleTrailingPadding?: number;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
change?: MarketTextStyle;
|
|
144
|
+
title?: NativeListTextStyle;
|
|
145
|
+
subtitle?: NativeListTextStyle;
|
|
146
|
+
price?: NativeListTextStyle;
|
|
147
|
+
change?: NativeListTextStyle;
|
|
65
148
|
changeWidth?: number;
|
|
66
149
|
changeHeight?: number;
|
|
67
150
|
changeCornerRadius?: number;
|
|
68
151
|
}>;
|
|
152
|
+
export type MediaTileRowStyle = TemplateBoxStyle<'mediaTile'> & Readonly<{
|
|
153
|
+
title?: NativeListTextStyle;
|
|
154
|
+
subtitle?: NativeListTextStyle;
|
|
155
|
+
badge?: NativeListTextStyle;
|
|
156
|
+
}>;
|
|
157
|
+
export type MetricCardRowStyle = TemplateBoxStyle<'metricCard'> & Readonly<{
|
|
158
|
+
/** Standard-card label or composite-card heading. */
|
|
159
|
+
title?: NativeListTextStyle;
|
|
160
|
+
/** Large number in the standard template; absent in composite variants. */
|
|
161
|
+
value?: NativeListTextStyle;
|
|
162
|
+
subtitle?: NativeListTextStyle;
|
|
163
|
+
trend?: NativeListTextStyle;
|
|
164
|
+
}>;
|
|
165
|
+
export type SectionHeaderRowStyle = TemplateBoxStyle<'sectionHeader'> & Readonly<{
|
|
166
|
+
title?: NativeListTextStyle;
|
|
167
|
+
subtitle?: NativeListTextStyle;
|
|
168
|
+
value?: NativeListTextStyle;
|
|
169
|
+
}>;
|
|
170
|
+
export type ActionRowStyle = TemplateBoxStyle<'action'> & Readonly<{
|
|
171
|
+
title?: NativeListTextStyle;
|
|
172
|
+
value?: NativeListTextStyle;
|
|
173
|
+
}>;
|
|
174
|
+
export type SystemRowStyle = TemplateBoxStyle<'system'> & Readonly<{
|
|
175
|
+
title?: NativeListTextStyle;
|
|
176
|
+
message?: NativeListTextStyle;
|
|
177
|
+
/**
|
|
178
|
+
* Retry button text. Web draws a retry button only for the Market retry;
|
|
179
|
+
* a non-Market Web retry is message-only, so this has no target there.
|
|
180
|
+
*/
|
|
181
|
+
actionText?: NativeListTextStyle;
|
|
182
|
+
}>;
|
|
69
183
|
export type MarketBadgeModel = Readonly<{
|
|
70
184
|
key: string;
|
|
71
185
|
text?: string;
|
|
@@ -267,12 +381,14 @@ export type IdentityRow = RowBase & Readonly<{
|
|
|
267
381
|
badges?: readonly BadgeModel[];
|
|
268
382
|
trailing?: readonly TrailingAccessory[];
|
|
269
383
|
draggable?: boolean;
|
|
384
|
+
style?: IdentityRowStyle;
|
|
270
385
|
}>;
|
|
271
386
|
export type WalletGroupRow = RowBase & Readonly<{
|
|
272
387
|
type: 'walletGroup';
|
|
273
388
|
parent: IdentityRow;
|
|
274
389
|
children: readonly IdentityRow[];
|
|
275
390
|
draggable?: boolean;
|
|
391
|
+
style?: WalletGroupRowStyle;
|
|
276
392
|
}>;
|
|
277
393
|
export type RailRow = RowBase & Readonly<{
|
|
278
394
|
type: 'rail';
|
|
@@ -281,6 +397,7 @@ export type RailRow = RowBase & Readonly<{
|
|
|
281
397
|
status?: 'none' | 'online' | 'warning' | 'error';
|
|
282
398
|
badge?: BadgeModel;
|
|
283
399
|
draggable?: boolean;
|
|
400
|
+
style?: RailRowStyle;
|
|
284
401
|
}>;
|
|
285
402
|
export type ActivityRow = RowBase & Readonly<{
|
|
286
403
|
type: 'activity';
|
|
@@ -292,6 +409,7 @@ export type ActivityRow = RowBase & Readonly<{
|
|
|
292
409
|
primaryAmount?: string;
|
|
293
410
|
secondaryAmount?: string;
|
|
294
411
|
footerActions?: readonly FooterAction[];
|
|
412
|
+
style?: ActivityRowStyle;
|
|
295
413
|
}>;
|
|
296
414
|
export type MessageRow = RowBase & Readonly<{
|
|
297
415
|
type: 'message';
|
|
@@ -302,6 +420,7 @@ export type MessageRow = RowBase & Readonly<{
|
|
|
302
420
|
bodyLines?: 1 | 2 | 3;
|
|
303
421
|
time: string;
|
|
304
422
|
thumbnail?: ImageSource;
|
|
423
|
+
style?: MessageRowStyle;
|
|
305
424
|
}>;
|
|
306
425
|
export type DataColumn = Readonly<{
|
|
307
426
|
key: string;
|
|
@@ -325,6 +444,7 @@ export type DataRow = RowBase & Readonly<{
|
|
|
325
444
|
badges?: readonly BadgeModel[];
|
|
326
445
|
favorite?: boolean;
|
|
327
446
|
favoriteActive?: boolean;
|
|
447
|
+
style?: DataRowStyle;
|
|
328
448
|
}>;
|
|
329
449
|
/** Native Market quote row. All values are already localized/formatted strings. */
|
|
330
450
|
export type MarketRow = RowBase & Readonly<{
|
|
@@ -366,6 +486,7 @@ export type MediaTileRow = RowBase & Readonly<{
|
|
|
366
486
|
subtitle?: string;
|
|
367
487
|
badge?: BadgeModel;
|
|
368
488
|
closeActionKey?: string;
|
|
489
|
+
style?: MediaTileRowStyle;
|
|
369
490
|
}>;
|
|
370
491
|
/** Compact KPI card for dashboards and grids. */
|
|
371
492
|
export type MetricValue = Readonly<{
|
|
@@ -387,6 +508,7 @@ export type MetricCardRow = RowBase & Readonly<{
|
|
|
387
508
|
badge?: BadgeModel;
|
|
388
509
|
metrics?: readonly MetricValue[];
|
|
389
510
|
progress?: number;
|
|
511
|
+
style?: MetricCardRowStyle;
|
|
390
512
|
}>;
|
|
391
513
|
export type SectionHeaderRow = RowBase & Readonly<{
|
|
392
514
|
type: 'sectionHeader';
|
|
@@ -412,6 +534,7 @@ export type SectionHeaderRow = RowBase & Readonly<{
|
|
|
412
534
|
checkbox?: Extract<TrailingAccessory, {
|
|
413
535
|
kind: 'checkbox';
|
|
414
536
|
}>;
|
|
537
|
+
style?: SectionHeaderRowStyle;
|
|
415
538
|
}>;
|
|
416
539
|
export type ActionRow = RowBase & Readonly<{
|
|
417
540
|
type: 'action';
|
|
@@ -426,8 +549,11 @@ export type ActionRow = RowBase & Readonly<{
|
|
|
426
549
|
kind: 'checkbox';
|
|
427
550
|
}>;
|
|
428
551
|
trailing?: readonly TrailingAccessory[];
|
|
552
|
+
style?: ActionRowStyle;
|
|
429
553
|
}>;
|
|
430
|
-
export type SystemRow = RowBase &
|
|
554
|
+
export type SystemRow = RowBase & Readonly<{
|
|
555
|
+
style?: SystemRowStyle;
|
|
556
|
+
}> & (Readonly<{
|
|
431
557
|
type: 'system';
|
|
432
558
|
variant: 'loading';
|
|
433
559
|
presentation?: 'market';
|
|
@@ -493,6 +619,32 @@ export type SectionIndexConfig = Readonly<{
|
|
|
493
619
|
hapticsEnabled?: boolean;
|
|
494
620
|
centeredInWindow?: boolean;
|
|
495
621
|
}>;
|
|
622
|
+
export type NativeListSeparatorStyle = Readonly<{
|
|
623
|
+
/**
|
|
624
|
+
* Leading inset in logical pixels. Omitted keeps each platform's own default,
|
|
625
|
+
* which is not the same everywhere — see docs/STYLE_SPEC.md §6.2.
|
|
626
|
+
*/
|
|
627
|
+
inset?: number;
|
|
628
|
+
/**
|
|
629
|
+
* Overrides the `separator` theme token for this list only. Must be
|
|
630
|
+
* `#RRGGBB` or `#RRGGBBAA`, like every row style color.
|
|
631
|
+
*/
|
|
632
|
+
color?: string;
|
|
633
|
+
}>;
|
|
634
|
+
/**
|
|
635
|
+
* List chrome that every platform can honour. Pull to refresh, the section index
|
|
636
|
+
* rail and the reorder preview are deliberately absent: the first two are system
|
|
637
|
+
* controls or three independent constant sets, and the third is drawn with
|
|
638
|
+
* platform-specific primitives. See docs/STYLE_SPEC.md §5.
|
|
639
|
+
*/
|
|
640
|
+
export type NativeListListStyle = Readonly<{
|
|
641
|
+
separator?: NativeListSeparatorStyle;
|
|
642
|
+
/**
|
|
643
|
+
* Corner radius of a `groupId` card, `0…40` logical units. Does not affect
|
|
644
|
+
* rail or media tiles.
|
|
645
|
+
*/
|
|
646
|
+
groupCornerRadius?: number;
|
|
647
|
+
}>;
|
|
496
648
|
export type NativeListSnapshot = Readonly<{
|
|
497
649
|
schemaVersion: 1;
|
|
498
650
|
generation: number;
|
|
@@ -524,8 +676,9 @@ export type NativeListSnapshot = Readonly<{
|
|
|
524
676
|
emptyState?: ActionRow | SystemRow;
|
|
525
677
|
fixedFooter?: ActionRow | SystemRow;
|
|
526
678
|
theme?: NativeListTheme;
|
|
679
|
+
listStyle?: NativeListListStyle;
|
|
527
680
|
}>;
|
|
528
|
-
type CommonPatchFields = 'revision' | 'disabled' | 'selected' | 'separator' | 'height' | 'heightRounding' | 'opacity' | 'pressDisabled' | 'accessibilityLabel';
|
|
681
|
+
type CommonPatchFields = 'revision' | 'disabled' | 'selected' | 'separator' | 'height' | 'heightRounding' | 'opacity' | 'pressDisabled' | 'accessibilityLabel' | 'style';
|
|
529
682
|
export type RowPatch = Readonly<{
|
|
530
683
|
type: 'identity';
|
|
531
684
|
key: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export { resolveWebMarketLayoutStyle, type WebMarketLayoutStyle, } from './templates/MarketRowRenderer';
|
|
2
|
+
import type { ActionAnchorInvalidatedEvent, NativeListSnapshot, NativeListActionAnchor, NativeListActionSource, ReorderEvent, RowActionEvent, RowModel, RowPatch, SelectionDeltaEvent, VisibleRangeChangedEvent } from '../models';
|
|
2
3
|
import type { ActionAnchorState, ScrollToIndexFailedInfo, ScrollToLocationParams } from '../NativeList.types';
|
|
3
4
|
import { type NormalizedPositionScroll } from '../scrolling';
|
|
4
5
|
export declare const WEB_REORDER_ANIMATION: {
|
|
@@ -32,21 +33,7 @@ export declare function webSectionIndexContainerLayout(entryCount: number, conta
|
|
|
32
33
|
};
|
|
33
34
|
export declare function webSectionIndexInverseScale(layoutHeight: number, renderedHeight: number): number;
|
|
34
35
|
export declare function webSectionIndexActiveKey(rows: readonly RowModel[], layout: WebListLayout, offset: number, viewportLength: number): string | undefined;
|
|
35
|
-
export type WebMarketLayoutStyle = Readonly<{
|
|
36
|
-
horizontalPadding: number;
|
|
37
|
-
verticalPadding: number;
|
|
38
|
-
leadingGap: number;
|
|
39
|
-
titleBadgeGap: number;
|
|
40
|
-
trailingGap: number;
|
|
41
|
-
imageWidth: number;
|
|
42
|
-
imageHeight: number;
|
|
43
|
-
imageCornerRadius: number;
|
|
44
|
-
changeWidth: number;
|
|
45
|
-
changeHeight: number;
|
|
46
|
-
changeCornerRadius: number;
|
|
47
|
-
}>;
|
|
48
36
|
/** Resolves every reusable Market geometry field, including legacy defaults. */
|
|
49
|
-
export declare function resolveWebMarketLayoutStyle(row: MarketRow): WebMarketLayoutStyle;
|
|
50
37
|
export type NativeListWebCallbacks = Readonly<{
|
|
51
38
|
onRowAction?: (event: RowActionEvent) => void;
|
|
52
39
|
onActionAnchorInvalidated?: (event: ActionAnchorInvalidatedEvent) => void;
|
|
@@ -66,6 +53,12 @@ export declare function webActionAnchorPayload(token: string, rect: Readonly<{
|
|
|
66
53
|
width: number;
|
|
67
54
|
height: number;
|
|
68
55
|
}>, source: NativeListActionSource, generation: number, layoutDirection: 'ltr' | 'rtl', slot?: number): NativeListActionAnchor;
|
|
56
|
+
type RenderContext = Readonly<{
|
|
57
|
+
document: Document;
|
|
58
|
+
snapshot: NativeListSnapshot;
|
|
59
|
+
selectedKeys: ReadonlySet<string>;
|
|
60
|
+
itemIndex: number;
|
|
61
|
+
}>;
|
|
69
62
|
export declare function isWebRowReorderable(snapshot: NativeListSnapshot, row: RowModel): boolean;
|
|
70
63
|
export declare function moveWebReorderRow(rows: readonly RowModel[], fromIndex: number, toIndex: number): readonly RowModel[];
|
|
71
64
|
export declare function cancelWebReorderRows(originalRows: readonly RowModel[]): readonly RowModel[];
|
|
@@ -89,6 +82,7 @@ export declare function isWebMarketQuotePatch(patch: RowPatch): boolean;
|
|
|
89
82
|
/** Number of Market image-binding passes caused by one Web patch transaction. */
|
|
90
83
|
export declare function webMarketImageBindDeltaForPatches(patches: readonly RowPatch[]): 0 | 1;
|
|
91
84
|
export declare const WEB_LIST_CSS: string;
|
|
85
|
+
export declare function createRowBody(context: RenderContext, row: RowModel): HTMLElement;
|
|
92
86
|
export declare class NativeListWebEngine {
|
|
93
87
|
private readonly document;
|
|
94
88
|
private readonly root;
|
|
@@ -109,6 +103,7 @@ export declare class NativeListWebEngine {
|
|
|
109
103
|
private layout;
|
|
110
104
|
private readonly mounted;
|
|
111
105
|
private readonly pool;
|
|
106
|
+
private readonly rendererKeys;
|
|
112
107
|
private frameHandle;
|
|
113
108
|
private resizeObserver;
|
|
114
109
|
private sectionIndexTransformObserver;
|
|
@@ -146,7 +141,7 @@ export declare class NativeListWebEngine {
|
|
|
146
141
|
private lastViewportHeight;
|
|
147
142
|
private destroyed;
|
|
148
143
|
private sectionIndexAlignStart;
|
|
149
|
-
private
|
|
144
|
+
private measuredRendererHeights;
|
|
150
145
|
constructor(host: HTMLElement, snapshot: NativeListSnapshot, callbacks: NativeListWebCallbacks, virtualizationEnabled?: boolean, sectionIndexContainer?: HTMLElement | null);
|
|
151
146
|
updateCallbacks(callbacks: NativeListWebCallbacks): void;
|
|
152
147
|
setVirtualizationEnabled(enabled: boolean): void;
|
|
@@ -163,6 +158,12 @@ export declare class NativeListWebEngine {
|
|
|
163
158
|
destroy(): void;
|
|
164
159
|
private setSnapshot;
|
|
165
160
|
private applyTheme;
|
|
161
|
+
/**
|
|
162
|
+
* List chrome from `snapshot.listStyle`. Every value is absent by default and
|
|
163
|
+
* the stylesheet carries today's number as the fallback, so an untouched list
|
|
164
|
+
* renders exactly as before. See docs/STYLE_SPEC.md §5.
|
|
165
|
+
*/
|
|
166
|
+
private applyListStyle;
|
|
166
167
|
private recomputeLayout;
|
|
167
168
|
private updateAvatarWindow;
|
|
168
169
|
private renderWindow;
|
|
@@ -266,4 +267,5 @@ export declare class NativeListWebEngine {
|
|
|
266
267
|
private remapMountedRows;
|
|
267
268
|
private updateReorderVisualState;
|
|
268
269
|
}
|
|
270
|
+
export declare function applyRowStyle(body: HTMLElement, row: RowModel): void;
|
|
269
271
|
//# sourceMappingURL=NativeListWebEngine.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ActionRow } from '../../models';
|
|
2
|
+
import { type RowPrimitives } from './RowVisual';
|
|
3
|
+
declare function bind(body: HTMLElement, row: ActionRow, primitives: RowPrimitives): void;
|
|
4
|
+
declare function create(document: Document, row: ActionRow, primitives: RowPrimitives): HTMLDivElement;
|
|
5
|
+
declare function recycle(body: HTMLElement): void;
|
|
6
|
+
export declare const actionRowRenderer: {
|
|
7
|
+
key: "action";
|
|
8
|
+
create: typeof create;
|
|
9
|
+
bind: typeof bind;
|
|
10
|
+
recycle: typeof recycle;
|
|
11
|
+
measure: (row: ActionRow, _width: number) => 48 | 60 | 44;
|
|
12
|
+
measureRendered: (_body: HTMLElement, _row: ActionRow) => number | undefined;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=ActionRowRenderer.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ActivityRow } from '../../models';
|
|
2
|
+
import { type RowPrimitives } from './RowVisual';
|
|
3
|
+
declare function bind(body: HTMLElement, row: ActivityRow, primitives: RowPrimitives): void;
|
|
4
|
+
declare function create(document: Document, row: ActivityRow, primitives: RowPrimitives): HTMLElement;
|
|
5
|
+
declare function recycle(body: HTMLElement): void;
|
|
6
|
+
export declare const activityRowRenderer: {
|
|
7
|
+
key: "activity";
|
|
8
|
+
create: typeof create;
|
|
9
|
+
bind: typeof bind;
|
|
10
|
+
recycle: typeof recycle;
|
|
11
|
+
measure: (row: ActivityRow, _width: number) => 60 | 100;
|
|
12
|
+
measureRendered: (_body: HTMLElement, _row: ActivityRow) => number | undefined;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=ActivityRowRenderer.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DataRow } from '../../models';
|
|
2
|
+
import { type RowPrimitives } from './RowVisual';
|
|
3
|
+
declare function bind(body: HTMLElement, row: DataRow, primitives: RowPrimitives): void;
|
|
4
|
+
declare function create(document: Document, row: DataRow, primitives: RowPrimitives): HTMLElement;
|
|
5
|
+
declare function recycle(body: HTMLElement): void;
|
|
6
|
+
export declare const dataRowRenderer: {
|
|
7
|
+
key: "dataRow";
|
|
8
|
+
create: typeof create;
|
|
9
|
+
bind: typeof bind;
|
|
10
|
+
recycle: typeof recycle;
|
|
11
|
+
measure: (row: DataRow, _width: number, layout?: string) => number;
|
|
12
|
+
measureRendered: (_body: HTMLElement, _row: DataRow) => number | undefined;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=DataRowRenderer.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IdentityRow } from '../../models';
|
|
2
|
+
import { type RowPrimitives } from './RowVisual';
|
|
3
|
+
declare function bind(body: HTMLElement, row: IdentityRow, primitives: RowPrimitives): void;
|
|
4
|
+
declare function create(document: Document, row: IdentityRow, primitives: RowPrimitives): HTMLDivElement;
|
|
5
|
+
declare function recycle(body: HTMLElement): void;
|
|
6
|
+
export declare const identityRowRenderer: {
|
|
7
|
+
key: "identity";
|
|
8
|
+
create: typeof create;
|
|
9
|
+
bind: typeof bind;
|
|
10
|
+
recycle: typeof recycle;
|
|
11
|
+
appliesSizePreset: (row: IdentityRow) => boolean;
|
|
12
|
+
measure: (row: IdentityRow, _width: number) => number;
|
|
13
|
+
measureRendered: (_body: HTMLElement, _row: IdentityRow) => number | undefined;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=IdentityRowRenderer.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MarketRow } from '../../models';
|
|
2
|
+
import { type RowPrimitives } from './RowVisual';
|
|
3
|
+
export type WebMarketLayoutStyle = Readonly<{
|
|
4
|
+
horizontalPadding: number;
|
|
5
|
+
verticalPadding: number;
|
|
6
|
+
leadingGap: number;
|
|
7
|
+
titleBadgeGap: number;
|
|
8
|
+
trailingGap: number;
|
|
9
|
+
imageWidth: number;
|
|
10
|
+
imageHeight: number;
|
|
11
|
+
imageCornerRadius: number;
|
|
12
|
+
changeWidth: number;
|
|
13
|
+
changeHeight: number;
|
|
14
|
+
changeCornerRadius: number;
|
|
15
|
+
}>;
|
|
16
|
+
export declare function resolveWebMarketLayoutStyle(row: MarketRow): WebMarketLayoutStyle;
|
|
17
|
+
export declare function setMarketQuoteContent(element: HTMLElement, row: MarketRow): void;
|
|
18
|
+
declare function bind(body: HTMLElement, row: MarketRow, primitives: RowPrimitives): void;
|
|
19
|
+
declare function create(document: Document, row: MarketRow, primitives: RowPrimitives): HTMLDivElement;
|
|
20
|
+
declare function recycle(body: HTMLElement): void;
|
|
21
|
+
export declare const marketRowRenderer: {
|
|
22
|
+
key: "market";
|
|
23
|
+
create: typeof create;
|
|
24
|
+
bind: typeof bind;
|
|
25
|
+
recycle: typeof recycle;
|
|
26
|
+
measure: (row: MarketRow, _width: number) => number;
|
|
27
|
+
measureRendered: (_body: HTMLElement, _row: MarketRow) => number | undefined;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=MarketRowRenderer.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MediaTileRow } from '../../models';
|
|
2
|
+
import type { RowPrimitives } from './RowVisual';
|
|
3
|
+
declare function bind(body: HTMLElement, row: MediaTileRow, primitives: RowPrimitives): void;
|
|
4
|
+
declare function create(document: Document, row: MediaTileRow, primitives: RowPrimitives): HTMLElement;
|
|
5
|
+
declare function recycle(body: HTMLElement): void;
|
|
6
|
+
export declare const mediaTileRowRenderer: {
|
|
7
|
+
key: "mediaTile";
|
|
8
|
+
create: typeof create;
|
|
9
|
+
bind: typeof bind;
|
|
10
|
+
recycle: typeof recycle;
|
|
11
|
+
measure: (_row: MediaTileRow, _width: number) => number;
|
|
12
|
+
measureRendered: (_body: HTMLElement, _row: MediaTileRow) => number | undefined;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=MediaTileRowRenderer.d.ts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { RowPrimitives } from './RowVisual';
|
|
2
|
+
import type { MessageRow, NativeListTextStyle } from '../../models';
|
|
3
|
+
export declare function resolveMessageRow(row: MessageRow): {
|
|
4
|
+
title: Readonly<{
|
|
5
|
+
value: string;
|
|
6
|
+
style: Required<Pick<NativeListTextStyle, "fontSize" | "lineHeight" | "lines">> & NativeListTextStyle;
|
|
7
|
+
}>;
|
|
8
|
+
body: Readonly<{
|
|
9
|
+
value: string;
|
|
10
|
+
style: Required<Pick<NativeListTextStyle, "fontSize" | "lineHeight" | "lines">> & NativeListTextStyle;
|
|
11
|
+
}>;
|
|
12
|
+
time: Readonly<{
|
|
13
|
+
value: string;
|
|
14
|
+
style: Required<Pick<NativeListTextStyle, "fontSize" | "lineHeight" | "lines">> & NativeListTextStyle;
|
|
15
|
+
}>;
|
|
16
|
+
horizontalPadding: number;
|
|
17
|
+
verticalPadding: number;
|
|
18
|
+
lineGap: number;
|
|
19
|
+
leadingGap: number;
|
|
20
|
+
imageWidth: number;
|
|
21
|
+
imageHeight: number;
|
|
22
|
+
image: Readonly<{
|
|
23
|
+
width?: number;
|
|
24
|
+
height?: number;
|
|
25
|
+
shape?: "circle" | "rounded" | "square";
|
|
26
|
+
cornerRadius?: number;
|
|
27
|
+
contentFit?: import("../..").ImageContentFit;
|
|
28
|
+
}> | undefined;
|
|
29
|
+
automaticHeight: boolean;
|
|
30
|
+
};
|
|
31
|
+
export declare function classifyMessageUpdate(old: MessageRow | undefined, row: MessageRow): "replace" | "unchanged" | "assets" | "content";
|
|
32
|
+
export declare function bindMessageRow(body: HTMLElement, row: MessageRow, primitives: RowPrimitives): void;
|
|
33
|
+
export declare function createMessageRow(document: Document, row: MessageRow, primitives: RowPrimitives): HTMLElement;
|
|
34
|
+
export declare function recycleMessageRow(body: HTMLElement): void;
|
|
35
|
+
export declare function measureMessageRow(row: MessageRow, availableWidth: number): number;
|
|
36
|
+
export declare const messageRowRenderer: {
|
|
37
|
+
key: "message";
|
|
38
|
+
create: typeof createMessageRow;
|
|
39
|
+
bind: typeof bindMessageRow;
|
|
40
|
+
recycle: typeof recycleMessageRow;
|
|
41
|
+
measure: typeof measureMessageRow;
|
|
42
|
+
measureRendered: (body: HTMLElement, row: MessageRow) => number | undefined;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=MessageRowRenderer.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MetricCardRow } from '../../models';
|
|
2
|
+
import { type RowPrimitives } from './RowVisual';
|
|
3
|
+
declare function bind(body: HTMLElement, row: MetricCardRow, primitives: RowPrimitives): void;
|
|
4
|
+
declare function create(document: Document, row: MetricCardRow, primitives: RowPrimitives): HTMLDivElement;
|
|
5
|
+
declare function recycle(body: HTMLElement): void;
|
|
6
|
+
export declare const metricCardRowRenderer: {
|
|
7
|
+
key: "metricCard";
|
|
8
|
+
create: typeof create;
|
|
9
|
+
bind: typeof bind;
|
|
10
|
+
recycle: typeof recycle;
|
|
11
|
+
measure: (row: MetricCardRow, _width: number) => 161 | 178 | 132;
|
|
12
|
+
measureRendered: (_body: HTMLElement, _row: MetricCardRow) => number | undefined;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=MetricCardRowRenderer.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RailRow } from '../../models';
|
|
2
|
+
import type { RowPrimitives } from './RowVisual';
|
|
3
|
+
export declare function resolveRailRow(row: RailRow): {
|
|
4
|
+
horizontalPadding: number;
|
|
5
|
+
verticalPadding: number;
|
|
6
|
+
leadingGap: number;
|
|
7
|
+
badgeGap: number;
|
|
8
|
+
trailingGap: number;
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
title: string;
|
|
12
|
+
badge: string;
|
|
13
|
+
status: string;
|
|
14
|
+
};
|
|
15
|
+
declare function bind(body: HTMLElement, row: RailRow, primitives: RowPrimitives): void;
|
|
16
|
+
declare function create(document: Document, row: RailRow, primitives: RowPrimitives): HTMLDivElement;
|
|
17
|
+
declare function recycle(body: HTMLElement): void;
|
|
18
|
+
export declare function measureRailWidth(row: RailRow): number;
|
|
19
|
+
export declare const railRowRenderer: {
|
|
20
|
+
key: "rail";
|
|
21
|
+
create: typeof create;
|
|
22
|
+
bind: typeof bind;
|
|
23
|
+
recycle: typeof recycle;
|
|
24
|
+
measure: (_row: RailRow, _width: number) => number;
|
|
25
|
+
measureRendered: (_body: HTMLElement, _row: RailRow) => number | undefined;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
28
|
+
//# sourceMappingURL=RailRowRenderer.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RowModel } from '../../models';
|
|
2
|
+
/**
|
|
3
|
+
* Undo the previous container pass before a renderer rebinds `body`, so the
|
|
4
|
+
* renderer always writes over its own baseline and the next
|
|
5
|
+
* `applyRowContainerStyle` records that fresh value as the value to restore.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resetRowContainerStyle(body: HTMLElement): void;
|
|
8
|
+
export declare function applyRowContainerStyle(body: HTMLElement, row: RowModel): void;
|
|
9
|
+
//# sourceMappingURL=RowContainerStyle.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { NativeListActionSource } from '../../models';
|
|
2
|
+
export declare function createElement(document: Document, tag: string, className?: string, text?: string): HTMLElement;
|
|
3
|
+
export declare function setData(element: HTMLElement, name: string, value: string | number | boolean | undefined): void;
|
|
4
|
+
export declare function tagSlot<T extends HTMLElement>(element: T, slot: string): T;
|
|
5
|
+
export declare function markActionAnchorSource(element: HTMLElement, source: NativeListActionSource, slot?: number): void;
|
|
6
|
+
export declare function createTextColumn(document: Document, title: string, subtitle?: string, tertiary?: string, tertiaryTone?: 'secondary' | 'info', badges?: readonly Readonly<{
|
|
7
|
+
text: string;
|
|
8
|
+
tone?: string;
|
|
9
|
+
}>[], slots?: Readonly<{
|
|
10
|
+
title: string;
|
|
11
|
+
subtitle: string;
|
|
12
|
+
tertiary: string;
|
|
13
|
+
}>): HTMLElement;
|
|
14
|
+
export declare function createBadge(document: Document, badge: Readonly<{
|
|
15
|
+
text: string;
|
|
16
|
+
tone?: string;
|
|
17
|
+
}>): HTMLElement;
|
|
18
|
+
export declare function applyTabularNumbers(body: HTMLElement): void;
|
|
19
|
+
/**
|
|
20
|
+
* Selector presentations use their explicit-height geometry whenever the row
|
|
21
|
+
* has a resolved explicit height: the legacy `row.height` or the preferred
|
|
22
|
+
* `style.container.height`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function hasExplicitRowHeight(row: Readonly<{
|
|
25
|
+
height?: number;
|
|
26
|
+
style?: Readonly<{
|
|
27
|
+
container?: Readonly<{
|
|
28
|
+
height?: number;
|
|
29
|
+
}>;
|
|
30
|
+
}>;
|
|
31
|
+
}>): boolean;
|
|
32
|
+
/** Legacy `size` preset adjustment, applied by templates that opt in. */
|
|
33
|
+
export declare function rowSizeModifier(size: string | undefined): number;
|
|
34
|
+
/** Captures factory inline styles of a template subtree. */
|
|
35
|
+
export declare function captureInlineStyles(root: HTMLElement): Map<HTMLElement, string>;
|
|
36
|
+
/** Restores captured factory styles while keeping image loading visibility. */
|
|
37
|
+
export declare function restoreInlineStyles(defaults: Map<HTMLElement, string>): void;
|
|
38
|
+
//# sourceMappingURL=RowElements.d.ts.map
|