@roku-sdk/components 0.0.0-stage → 2.19.0
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/BREAKING_CHANGES.md +84 -0
- package/LICENSE +21 -0
- package/README.md +19 -2
- package/core-jsx.d.ts +53 -0
- package/eslint.config.mjs +3 -0
- package/jsx.d.ts +273 -0
- package/package.json +85 -3
- package/src/__tests__/container.test.tsx +150 -0
- package/src/__tests__/effect-gradient-validation.test.tsx +133 -0
- package/src/__tests__/glyphs.test.ts +202 -0
- package/src/__tests__/modal-boundary-export.test.ts +12 -0
- package/src/__tests__/native-modal.test.tsx +224 -0
- package/src/__tests__/tween-release.test.tsx +125 -0
- package/src/__tests__/tween-stops-shape.test.tsx +165 -0
- package/src/__tests__/tween-without-compat.test.tsx +64 -0
- package/src/__tests__/tween.test.tsx +195 -0
- package/src/blended-busy-spinner.props.ts +37 -0
- package/src/blended-busy-spinner.tsx +13 -0
- package/src/bounding-tracker.props.ts +18 -0
- package/src/bounding-tracker.tsx +13 -0
- package/src/button-row.tsx +126 -0
- package/src/channel-store.props.ts +425 -0
- package/src/channel-store.tsx +76 -0
- package/src/container.tsx +130 -0
- package/src/core/jsx-runtime.ts +39 -0
- package/src/focusable-group.props.ts +8 -0
- package/src/focusable-group.tsx +17 -0
- package/src/focusable.props.ts +14 -0
- package/src/focusable.tsx +17 -0
- package/src/glyphs.ts +116 -0
- package/src/helpers/index.tsx +4 -0
- package/src/helpers/resolution-context.tsx +68 -0
- package/src/helpers/scale-for-device-resolution.ts +31 -0
- package/src/index.tsx +70 -0
- package/src/jsx-props.ts +87 -0
- package/src/kdfs.d.ts +14 -0
- package/src/kdfs.ts +15 -0
- package/src/key-handler.props.ts +33 -0
- package/src/key-handler.tsx +24 -0
- package/src/modal-dialog.props.ts +38 -0
- package/src/modal-dialog.tsx +41 -0
- package/src/retain-asset.ts +24 -0
- package/src/sg-intrinsics.json +1153 -0
- package/src/sg-nodes/__tests__/__snapshots__/font.test.tsx.snap +13 -0
- package/src/sg-nodes/__tests__/__snapshots__/prop-forwarding.test.tsx.snap +4409 -0
- package/src/sg-nodes/__tests__/core-props.test.ts +301 -0
- package/src/sg-nodes/__tests__/font.test.tsx +141 -0
- package/src/sg-nodes/__tests__/imperative-methods.test.ts +276 -0
- package/src/sg-nodes/__tests__/prop-forwarding.test.tsx +1049 -0
- package/src/sg-nodes/__tests__/solid-integration.test.tsx +719 -0
- package/src/sg-nodes/animated-image.props.ts +64 -0
- package/src/sg-nodes/animated-image.tsx +23 -0
- package/src/sg-nodes/animation.props.ts +292 -0
- package/src/sg-nodes/animation.tsx +190 -0
- package/src/sg-nodes/array-grid.ts +602 -0
- package/src/sg-nodes/audio.props.ts +302 -0
- package/src/sg-nodes/audio.tsx +57 -0
- package/src/sg-nodes/busy-spinner.props.ts +59 -0
- package/src/sg-nodes/busy-spinner.tsx +84 -0
- package/src/sg-nodes/button-group.props.ts +141 -0
- package/src/sg-nodes/button-group.tsx +30 -0
- package/src/sg-nodes/button.props.ts +119 -0
- package/src/sg-nodes/button.tsx +31 -0
- package/src/sg-nodes/check-list.props.ts +71 -0
- package/src/sg-nodes/check-list.tsx +55 -0
- package/src/sg-nodes/content-node.props.ts +1316 -0
- package/src/sg-nodes/content-node.tsx +153 -0
- package/src/sg-nodes/core-props.ts +197 -0
- package/src/sg-nodes/custom-keyboard.props.ts +108 -0
- package/src/sg-nodes/custom-keyboard.tsx +48 -0
- package/src/sg-nodes/dialog.props.ts +159 -0
- package/src/sg-nodes/dialog.tsx +36 -0
- package/src/sg-nodes/dynamic-key-grid.props.ts +22 -0
- package/src/sg-nodes/dynamic-key-grid.tsx +16 -0
- package/src/sg-nodes/dynamic-keyboard.props.ts +30 -0
- package/src/sg-nodes/dynamic-keyboard.tsx +18 -0
- package/src/sg-nodes/dynamic-mini-keyboard.props.ts +22 -0
- package/src/sg-nodes/dynamic-mini-keyboard.tsx +18 -0
- package/src/sg-nodes/dynamic-pinpad.props.ts +57 -0
- package/src/sg-nodes/dynamic-pinpad.tsx +18 -0
- package/src/sg-nodes/effect.props.ts +119 -0
- package/src/sg-nodes/effect.tsx +167 -0
- package/src/sg-nodes/font.props.ts +45 -0
- package/src/sg-nodes/font.tsx +80 -0
- package/src/sg-nodes/group.props.ts +105 -0
- package/src/sg-nodes/group.tsx +30 -0
- package/src/sg-nodes/label-list.props.ts +86 -0
- package/src/sg-nodes/label-list.tsx +64 -0
- package/src/sg-nodes/label.props.ts +207 -0
- package/src/sg-nodes/label.tsx +56 -0
- package/src/sg-nodes/layout-group.props.ts +69 -0
- package/src/sg-nodes/layout-group.tsx +75 -0
- package/src/sg-nodes/list-panel.props.ts +103 -0
- package/src/sg-nodes/list-panel.tsx +49 -0
- package/src/sg-nodes/markup-grid.props.ts +78 -0
- package/src/sg-nodes/markup-grid.tsx +38 -0
- package/src/sg-nodes/markup-list.props.ts +66 -0
- package/src/sg-nodes/markup-list.tsx +38 -0
- package/src/sg-nodes/mask-group.props.ts +78 -0
- package/src/sg-nodes/mask-group.tsx +59 -0
- package/src/sg-nodes/media-playback-methods.ts +20 -0
- package/src/sg-nodes/node.ts +77 -0
- package/src/sg-nodes/overhang.props.ts +169 -0
- package/src/sg-nodes/overhang.tsx +29 -0
- package/src/sg-nodes/panel-set.props.ts +71 -0
- package/src/sg-nodes/panel-set.tsx +53 -0
- package/src/sg-nodes/panel.props.ts +176 -0
- package/src/sg-nodes/panel.tsx +56 -0
- package/src/sg-nodes/poster-grid.props.ts +277 -0
- package/src/sg-nodes/poster-grid.tsx +45 -0
- package/src/sg-nodes/poster.props.ts +125 -0
- package/src/sg-nodes/poster.tsx +44 -0
- package/src/sg-nodes/radio-button-list.props.ts +59 -0
- package/src/sg-nodes/radio-button-list.tsx +68 -0
- package/src/sg-nodes/rectangle.props.ts +29 -0
- package/src/sg-nodes/rectangle.tsx +27 -0
- package/src/sg-nodes/row-list.props.ts +288 -0
- package/src/sg-nodes/row-list.tsx +47 -0
- package/src/sg-nodes/scene.props.ts +65 -0
- package/src/sg-nodes/scene.tsx +15 -0
- package/src/sg-nodes/scrollable-text.props.ts +133 -0
- package/src/sg-nodes/scrollable-text.tsx +64 -0
- package/src/sg-nodes/scrolling-label.props.ts +106 -0
- package/src/sg-nodes/scrolling-label.tsx +42 -0
- package/src/sg-nodes/simple-label.props.ts +156 -0
- package/src/sg-nodes/simple-label.tsx +59 -0
- package/src/sg-nodes/sound-effect.props.ts +130 -0
- package/src/sg-nodes/sound-effect.tsx +65 -0
- package/src/sg-nodes/standard-dialog.props.ts +520 -0
- package/src/sg-nodes/standard-dialog.tsx +428 -0
- package/src/sg-nodes/standard-keyboard-dialog.props.ts +84 -0
- package/src/sg-nodes/standard-keyboard-dialog.tsx +58 -0
- package/src/sg-nodes/standard-message-dialog.props.ts +56 -0
- package/src/sg-nodes/standard-message-dialog.tsx +47 -0
- package/src/sg-nodes/standard-pinpad-dialog.props.ts +64 -0
- package/src/sg-nodes/standard-pinpad-dialog.tsx +44 -0
- package/src/sg-nodes/standard-progress-dialog.props.ts +30 -0
- package/src/sg-nodes/standard-progress-dialog.tsx +40 -0
- package/src/sg-nodes/target-group.props.ts +278 -0
- package/src/sg-nodes/target-group.tsx +63 -0
- package/src/sg-nodes/target-list.props.ts +128 -0
- package/src/sg-nodes/target-list.tsx +66 -0
- package/src/sg-nodes/target-set.props.ts +63 -0
- package/src/sg-nodes/target-set.tsx +42 -0
- package/src/sg-nodes/time-grid.props.ts +646 -0
- package/src/sg-nodes/time-grid.tsx +87 -0
- package/src/sg-nodes/tween.props.ts +115 -0
- package/src/sg-nodes/types.ts +150 -0
- package/src/sg-nodes/video.props.ts +642 -0
- package/src/sg-nodes/video.tsx +75 -0
- package/src/sg-nodes/voice-text-edit-box.props.ts +91 -0
- package/src/sg-nodes/voice-text-edit-box.tsx +15 -0
- package/src/sg-nodes/zoom-row-list.props.ts +416 -0
- package/src/sg-nodes/zoom-row-list.tsx +42 -0
- package/src/standard-dialog-next/__tests__/standard-dialog-next.test.tsx +186 -0
- package/src/standard-dialog-next/index.ts +5 -0
- package/src/standard-dialog-next/standard-dialog-next.props.ts +80 -0
- package/src/standard-dialog-next/standard-dialog-next.tsx +326 -0
- package/src/test-helpers/tween-test-setup.ts +78 -0
- package/src/tween.tsx +173 -0
- package/src/types.ts +8 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.brs +13 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml +10 -0
- package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml.d.ts +42 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.brs +26 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.xml +14 -0
- package/src/xml-components/bounding-tracker/BoundingTracker.xml.d.ts +42 -0
- package/src/xml-components/channel-store/channelStoreExt.brs +159 -0
- package/src/xml-components/channel-store/channelStoreExt.xml +29 -0
- package/src/xml-components/channel-store/channelStoreExt.xml.d.ts +57 -0
- package/src/xml-components/focus/focusable-group.brs +251 -0
- package/src/xml-components/focus/focusable-group.xml +15 -0
- package/src/xml-components/focus/focusable-group.xml.d.ts +42 -0
- package/src/xml-components/focus/focusable.xml +18 -0
- package/src/xml-components/focus/focusable.xml.d.ts +48 -0
- package/src/xml-components/keyboards/CustomAddressKDF.keyboard.json +547 -0
- package/src/xml-components/keyboards/CustomKeyboard.brs +322 -0
- package/src/xml-components/keyboards/CustomKeyboard.xml +45 -0
- package/src/xml-components/keyboards/CustomKeyboard.xml.d.ts +73 -0
- package/src/xml-components/keyboards/KeyGridExt.xml +4 -0
- package/src/xml-components/keyboards/KeyGridExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/KeyboardExt.xml +4 -0
- package/src/xml-components/keyboards/KeyboardExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/MOPPinPadCustomKDF.keyboard.json +151 -0
- package/src/xml-components/keyboards/MiniKeyboardExt.xml +4 -0
- package/src/xml-components/keyboards/MiniKeyboardExt.xml.d.ts +37 -0
- package/src/xml-components/keyboards/PhonePadCustomKDF.keyboard.json +42 -0
- package/src/xml-components/keyboards/PinPadExt.brs +102 -0
- package/src/xml-components/keyboards/PinPadExt.xml +17 -0
- package/src/xml-components/keyboards/PinPadExt.xml.d.ts +49 -0
- package/src/xml-components/keyboards/WifiCustomKDF.keyboard.json +1242 -0
- package/src/xml-components/keyhandler/KeyHandler.brs +30 -0
- package/src/xml-components/keyhandler/KeyHandler.xml +16 -0
- package/src/xml-components/keyhandler/KeyHandler.xml.d.ts +45 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.brs +137 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.xml +10 -0
- package/src/xml-components/managed-list-panel/ManagedListPanel.xml.d.ts +37 -0
- package/src/xml-components/modal/Modal.brs +105 -0
- package/src/xml-components/modal/Modal.xml +22 -0
- package/src/xml-components/modal/Modal.xml.d.ts +54 -0
- package/src/xml-components/modal/StandardDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardKeyboardDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardKeyboardDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardMessageDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardMessageDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardPinPadDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardPinPadDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/StandardProgressDialogExt.xml +10 -0
- package/src/xml-components/modal/StandardProgressDialogExt.xml.d.ts +37 -0
- package/src/xml-components/modal/tests/Modal.test.brs +195 -0
- package/tsconfig.json +10 -0
|
@@ -0,0 +1,602 @@
|
|
|
1
|
+
// Copyright (c) 2026 Roku, Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import type { IGroupProps } from "./group.props";
|
|
5
|
+
import type { EventHandler, JSX, Rect2D, ResType, Uri, Vector2D } from "./types";
|
|
6
|
+
|
|
7
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
8
|
+
// Focus Animation Style Types
|
|
9
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Horizontal focus animation style for grid items.
|
|
13
|
+
*
|
|
14
|
+
* Specifies how the focus indicator moves in a row of grid items
|
|
15
|
+
* in response to the remote direction pad Left and Right key presses.
|
|
16
|
+
*
|
|
17
|
+
* @see {@link https://developer.roku.com/dev/docs/arraygrid}
|
|
18
|
+
*/
|
|
19
|
+
export enum HorizFocusAnimationStyle {
|
|
20
|
+
/**
|
|
21
|
+
* Causes the focus indicator to float left or right until it reaches the end of the row,
|
|
22
|
+
* at which point the focus indicator will stay fixed on the first or last item in the row,
|
|
23
|
+
* and the items will scroll left or right if there were items that were not visible.
|
|
24
|
+
*/
|
|
25
|
+
FloatingFocus = "floatingFocus",
|
|
26
|
+
/**
|
|
27
|
+
* Causes the row to wrap around when the focus indicator reaches the first or last item
|
|
28
|
+
* in the row, as long as the row contains enough items to fill the row. If the row does
|
|
29
|
+
* not contain enough items to fill the row, the focus indicator will float left and right.
|
|
30
|
+
*/
|
|
31
|
+
FixedFocusWrap = "fixedFocusWrap"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Vertical focus animation style for list or grid column items.
|
|
36
|
+
*
|
|
37
|
+
* Specifies how the focus indicator moves in a list or a column of grid items
|
|
38
|
+
* in response to the remote direction pad Up and Down key presses.
|
|
39
|
+
*
|
|
40
|
+
* @see {@link https://developer.roku.com/dev/docs/arraygrid}
|
|
41
|
+
*/
|
|
42
|
+
export enum VertFocusAnimationStyle {
|
|
43
|
+
/**
|
|
44
|
+
* Causes the focus indicator to float up or down until it reaches the end of the list or
|
|
45
|
+
* grid column, at which point the focus indicator will stay fixed on the first or last item
|
|
46
|
+
* in the list or grid column, and the items will scroll up or down if there are items that
|
|
47
|
+
* were not visible. Note that when this style is set, section dividers are not rendered.
|
|
48
|
+
*/
|
|
49
|
+
FloatingFocus = "floatingFocus",
|
|
50
|
+
/**
|
|
51
|
+
* Causes the column to wrap around when the focus indicator reaches the first or last item
|
|
52
|
+
* in the list or grid column, as long as the list or grid column contains enough items to
|
|
53
|
+
* fill the list or grid column. If the list or grid column does not contain enough items
|
|
54
|
+
* to fill the list or grid column, the focus indicator will float up and down.
|
|
55
|
+
*/
|
|
56
|
+
FixedFocusWrap = "fixedFocusWrap",
|
|
57
|
+
/**
|
|
58
|
+
* Causes the focus to stay fixed on the upper leftmost item. As the user scrolls down,
|
|
59
|
+
* the row containing the previously selected item scrolls up off screen. Scrolling
|
|
60
|
+
* continues until the last row is reached.
|
|
61
|
+
*/
|
|
62
|
+
FixedFocus = "fixedFocus"
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
66
|
+
// ArrayGrid Properties
|
|
67
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Properties for the ArrayGrid abstract node class.
|
|
71
|
+
*
|
|
72
|
+
* ArrayGrid is an abstract base class that provides functionality to the list and grid
|
|
73
|
+
* node classes that are extended from ArrayGrid. The field value settings and their effect
|
|
74
|
+
* in this abstract base class depend in many cases on whether a list, or a grid, node class
|
|
75
|
+
* is extended from ArrayGrid, and the specific type of list or grid.
|
|
76
|
+
*
|
|
77
|
+
* The following node classes extended from ArrayGrid derive their basic functionality
|
|
78
|
+
* from the ArrayGrid abstract node class:
|
|
79
|
+
*
|
|
80
|
+
* - {@link https://developer.roku.com/dev/docs/labellist LabelList}
|
|
81
|
+
* - {@link https://developer.roku.com/dev/docs/markuplist MarkupList}
|
|
82
|
+
* - {@link https://developer.roku.com/dev/docs/postergrid PosterGrid}
|
|
83
|
+
* - {@link https://developer.roku.com/dev/docs/markupgrid MarkupGrid}
|
|
84
|
+
* - {@link https://developer.roku.com/dev/docs/rowlist RowList}
|
|
85
|
+
*
|
|
86
|
+
* > **Note:** ArrayGrid is not meant to be instantiated directly by app code.
|
|
87
|
+
*
|
|
88
|
+
* @see {@link https://developer.roku.com/dev/docs/arraygrid}
|
|
89
|
+
*
|
|
90
|
+
* @example Basic grid setup
|
|
91
|
+
* ```tsx
|
|
92
|
+
* <MarkupGrid
|
|
93
|
+
* itemSize={[300, 200]}
|
|
94
|
+
* itemSpacing={[20, 20]}
|
|
95
|
+
* numRows={3}
|
|
96
|
+
* numColumns={4}
|
|
97
|
+
* drawFocusFeedback={true}
|
|
98
|
+
* vertFocusAnimationStyle={VertFocusAnimationStyle.FloatingFocus}
|
|
99
|
+
* content={gridContent}
|
|
100
|
+
* onItemSelected={(event) => handleSelection(event)}
|
|
101
|
+
* />
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
export interface IArrayGridProps extends IGroupProps {
|
|
105
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
106
|
+
// Content Data
|
|
107
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Specifies the content meta-data for the list or grid.
|
|
111
|
+
*
|
|
112
|
+
* This field must be set with a ContentNode that specifies the content meta-data
|
|
113
|
+
* for the list or grid in order for the list or grid to be displayed.
|
|
114
|
+
*
|
|
115
|
+
* See the Data Bindings section of each list or grid reference description for
|
|
116
|
+
* details on the content meta-data that must be specified in the ContentNode.
|
|
117
|
+
*
|
|
118
|
+
* **Important:** Place `content` before `jumpToItem` and `animateToItem` in the
|
|
119
|
+
* component. When content is updated dynamically, update `jumpToItem`/`animateToItem`
|
|
120
|
+
* in the same transaction or after content has been updated.
|
|
121
|
+
*
|
|
122
|
+
* @see {@link https://developer.roku.com/dev/docs/content-metadata}
|
|
123
|
+
*/
|
|
124
|
+
content?: JSX.Element;
|
|
125
|
+
|
|
126
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
127
|
+
// Layout Configuration
|
|
128
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Specifies the width and height of each item in the list or grid.
|
|
132
|
+
* For list or grid items that are posters, itemSize is the value of a
|
|
133
|
+
* basePosterSize field and any sub-elements included with the poster.
|
|
134
|
+
*
|
|
135
|
+
* @default [0, 0]
|
|
136
|
+
* @example [300, 200]
|
|
137
|
+
*/
|
|
138
|
+
itemSize?: ResType<Vector2D>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Specifies the horizontal and vertical spacing between the list or grid items.
|
|
142
|
+
* For lists, the vector2d Y-value specifies the vertical spacing between items
|
|
143
|
+
* in the list, and the vector2d X-value is ignored.
|
|
144
|
+
*
|
|
145
|
+
* @default [0, 0]
|
|
146
|
+
* @example [20, 10]
|
|
147
|
+
*/
|
|
148
|
+
itemSpacing?: ResType<Vector2D>;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Specifies the number of visible rows displayed.
|
|
152
|
+
* Note that the actual number of rows may be more or less than the number
|
|
153
|
+
* specified depending on the number of items in the list or grid content.
|
|
154
|
+
*
|
|
155
|
+
* @default 0
|
|
156
|
+
*/
|
|
157
|
+
numRows?: number;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Specifies the number of columns in a grid.
|
|
161
|
+
* This field is not used for lists.
|
|
162
|
+
*
|
|
163
|
+
* @default 0
|
|
164
|
+
*/
|
|
165
|
+
numColumns?: number;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Specifies that a grid will have a layout of items of different widths
|
|
169
|
+
* configured by parameters included in a ContentNode for the grid.
|
|
170
|
+
* This field is not used by lists.
|
|
171
|
+
*
|
|
172
|
+
* @default false
|
|
173
|
+
*/
|
|
174
|
+
fixedLayout?: boolean;
|
|
175
|
+
|
|
176
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
177
|
+
// Focus Management
|
|
178
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Specifies the row that will have fixed focus if the vertFocusAnimationStyle
|
|
182
|
+
* field value is set to fixedFocusWrap.
|
|
183
|
+
*
|
|
184
|
+
* @default 0
|
|
185
|
+
*/
|
|
186
|
+
focusRow?: number;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Specifies the column that will have fixed focus for grids if the
|
|
190
|
+
* horizFocusAnimationStyle field value is set to fixedFocusWrap.
|
|
191
|
+
* This field is not used for lists.
|
|
192
|
+
*
|
|
193
|
+
* @default 0
|
|
194
|
+
*/
|
|
195
|
+
focusColumn?: number;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Specifies how the focus indicator moves in a row of grid items in response
|
|
199
|
+
* to the remote direction pad Left and Right key presses.
|
|
200
|
+
* This field is not used for lists.
|
|
201
|
+
*
|
|
202
|
+
* @default "floatingFocus"
|
|
203
|
+
*/
|
|
204
|
+
horizFocusAnimationStyle?: HorizFocusAnimationStyle | `${HorizFocusAnimationStyle}`;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Specifies how the focus indicator moves in a list or a column of grid items
|
|
208
|
+
* in response to the remote direction pad Up and Down key presses.
|
|
209
|
+
*
|
|
210
|
+
* @default "floatingFocus"
|
|
211
|
+
*/
|
|
212
|
+
vertFocusAnimationStyle?: VertFocusAnimationStyle | `${VertFocusAnimationStyle}`;
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Specifies whether changes in the focus item should be animated.
|
|
216
|
+
* If this field is set to true, any scrolling or repositioning/scaling of the
|
|
217
|
+
* focus indicator occurs without an animation. This causes fields reflecting
|
|
218
|
+
* the focus status (itemFocused, currFocusRow, currFocusColumn) to be updated
|
|
219
|
+
* instantly and not transition smoothly between old and new values.
|
|
220
|
+
*
|
|
221
|
+
* For example, currFocusRow will go directly from 3.0 to 4.0 instead of
|
|
222
|
+
* taking on values between 3.0 and 4.0.
|
|
223
|
+
*
|
|
224
|
+
* @default false
|
|
225
|
+
*/
|
|
226
|
+
skipFocusAnimations?: boolean;
|
|
227
|
+
|
|
228
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
229
|
+
// Focus Feedback
|
|
230
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Causes a specified bitmap to be drawn on list or grid items to indicate
|
|
234
|
+
* focus has moved to that item.
|
|
235
|
+
*
|
|
236
|
+
* @default true
|
|
237
|
+
*/
|
|
238
|
+
drawFocusFeedback?: boolean;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* If the drawFocusFeedback field value is set to true, specifies whether the
|
|
242
|
+
* specified focus indicator bitmap is drawn on top of the focused list or grid items.
|
|
243
|
+
* The default value draws the specified focus indicator bitmap below the focused
|
|
244
|
+
* list or grid item.
|
|
245
|
+
*
|
|
246
|
+
* @default false
|
|
247
|
+
*/
|
|
248
|
+
drawFocusFeedbackOnTop?: boolean;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* When set to true, the focus feedback indicator will quickly fade out when
|
|
252
|
+
* scrolling multiple items and fade back in when the scrolling ends.
|
|
253
|
+
* The focus feedback indicator will also fade in and out when using the
|
|
254
|
+
* FFW/Rewind keys to scroll a page at a time.
|
|
255
|
+
*
|
|
256
|
+
* @default false
|
|
257
|
+
*/
|
|
258
|
+
fadeFocusFeedbackWhenAutoScrolling?: boolean;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* If the drawFocusFeedback field value is set to true, specifies a custom bitmap
|
|
262
|
+
* to be drawn on list or grid items to indicate the focus has moved to that item.
|
|
263
|
+
* Only set this field to use a bitmap with a different appearance than the system default.
|
|
264
|
+
*
|
|
265
|
+
* In most cases, you will want to use a 9-patch PNG bitmap with both expandable
|
|
266
|
+
* regions as well as margins to fit around the item.
|
|
267
|
+
*
|
|
268
|
+
* @example "pkg:/images/focus.9.png"
|
|
269
|
+
*/
|
|
270
|
+
focusBitmapUri?: Uri;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* If the drawFocusFeedback field value is set to true, specifies a custom bitmap
|
|
274
|
+
* to be drawn on list or grid items to indicate focus on that item, when the list
|
|
275
|
+
* or grid itself does not have focus.
|
|
276
|
+
*
|
|
277
|
+
* In most cases, you will want to use a 9-patch PNG bitmap with both expandable
|
|
278
|
+
* regions as well as margins to fit around the item.
|
|
279
|
+
*
|
|
280
|
+
* @example "pkg:/images/focus-footprint.9.png"
|
|
281
|
+
*/
|
|
282
|
+
focusFootprintBitmapUri?: Uri;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Blend the graphic image specified by focusBitmapUri with the specified color.
|
|
286
|
+
* If set to the default, 0xFFFFFFFF, no color blending will occur.
|
|
287
|
+
*
|
|
288
|
+
* @default "0xFFFFFFFF"
|
|
289
|
+
* @example "0x0066FFFF"
|
|
290
|
+
*/
|
|
291
|
+
focusBitmapBlendColor?: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Blend the graphic image specified by focusFootprintBitmapUri with the specified color.
|
|
295
|
+
* If set to the default, 0xFFFFFFFF, no color blending will occur.
|
|
296
|
+
*
|
|
297
|
+
* @default "0xFFFFFFFF"
|
|
298
|
+
* @example "0x666666FF"
|
|
299
|
+
*/
|
|
300
|
+
focusFootprintBlendColor?: string;
|
|
301
|
+
|
|
302
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
303
|
+
// Wrap Divider
|
|
304
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* If the vertFocusAnimationStyle field value is set to fixedFocusWrap, specifies
|
|
308
|
+
* a custom bitmap to use as a visual divider between the last and first list or
|
|
309
|
+
* grid items, when the list or grid wraps.
|
|
310
|
+
*
|
|
311
|
+
* In most cases, you will want to use a 9-patch PNG bitmap with both expandable regions.
|
|
312
|
+
*
|
|
313
|
+
* @example "pkg:/images/wrap-divider.9.png"
|
|
314
|
+
*/
|
|
315
|
+
wrapDividerBitmapUri?: Uri;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* If the vertFocusAnimationStyle field value is set to fixedFocusWrap, specifies
|
|
319
|
+
* the width of a bitmap used as a visual divider between the last and first list
|
|
320
|
+
* or grid items when the list or grid wraps.
|
|
321
|
+
*
|
|
322
|
+
* @default 0
|
|
323
|
+
*/
|
|
324
|
+
wrapDividerWidth?: number;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* If the vertFocusAnimationStyle field value is set to fixedFocusWrap, specifies
|
|
328
|
+
* the height of a bitmap used as a visual divider between the last and first list
|
|
329
|
+
* or grid items, when the list or grid wraps.
|
|
330
|
+
*
|
|
331
|
+
* @default 36
|
|
332
|
+
*/
|
|
333
|
+
wrapDividerHeight?: number;
|
|
334
|
+
|
|
335
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
336
|
+
// Variable Row/Column Sizing
|
|
337
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Specifies differing heights for each list or grid row, to allow the height
|
|
341
|
+
* of each row to vary from row to row.
|
|
342
|
+
*
|
|
343
|
+
* The specified values override the itemSize field vector2d Y-value for each
|
|
344
|
+
* list or grid row corresponding to its position in the array, in top to bottom order.
|
|
345
|
+
*
|
|
346
|
+
* @default []
|
|
347
|
+
* @example [100, 150, 100, 200]
|
|
348
|
+
*/
|
|
349
|
+
rowHeights?: number[];
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Specifies differing widths for each grid column, to allow the width of each
|
|
353
|
+
* column to vary from column to column.
|
|
354
|
+
* This field is not used by lists.
|
|
355
|
+
*
|
|
356
|
+
* @default []
|
|
357
|
+
* @example [200, 300, 200, 250]
|
|
358
|
+
*/
|
|
359
|
+
columnWidths?: number[];
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Specifies differing spaces between each list or grid row, to allow the spacing
|
|
363
|
+
* between rows to vary from row to row.
|
|
364
|
+
*
|
|
365
|
+
* @default []
|
|
366
|
+
* @example [10, 20, 10, 15]
|
|
367
|
+
*/
|
|
368
|
+
rowSpacings?: number[];
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Specifies differing spaces between each grid column, to allow the spacing between
|
|
372
|
+
* columns to vary from column to column.
|
|
373
|
+
* This field is not used by lists.
|
|
374
|
+
*
|
|
375
|
+
* @default []
|
|
376
|
+
* @example [10, 15, 10, 20]
|
|
377
|
+
*/
|
|
378
|
+
columnSpacings?: number[];
|
|
379
|
+
|
|
380
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
381
|
+
// Section Divider
|
|
382
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* If the ContentNode specifies sections for a list or grid, specifies a custom
|
|
386
|
+
* bitmap to use as a visual divider between the sections of the list or grid.
|
|
387
|
+
*
|
|
388
|
+
* @example "pkg:/images/section-divider.9.png"
|
|
389
|
+
*/
|
|
390
|
+
sectionDividerBitmapUri?: Uri;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* If the ContentNode specifies sections for a list or grid, specifies a custom
|
|
394
|
+
* font to use for the section title text.
|
|
395
|
+
*
|
|
396
|
+
* @example "pkg:/fonts/SectionTitle.ttf"
|
|
397
|
+
*/
|
|
398
|
+
sectionDividerFont?: string;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* If the ContentNode specifies sections for a list or grid, specifies a custom
|
|
402
|
+
* color to use for the section title text.
|
|
403
|
+
*
|
|
404
|
+
* @example "0xFFFFFFFF"
|
|
405
|
+
*/
|
|
406
|
+
sectionDividerTextColor?: string;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* If the ContentNode specifies sections for a list or grid, specifies the
|
|
410
|
+
* spacing between the icon, label, and section divider bitmap.
|
|
411
|
+
*
|
|
412
|
+
* @default 0
|
|
413
|
+
*/
|
|
414
|
+
sectionDividerSpacing?: number;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* If the ContentNode specifies sections for a list or grid, specifies the
|
|
418
|
+
* width of the section divider bitmap.
|
|
419
|
+
*
|
|
420
|
+
* @default 0
|
|
421
|
+
*/
|
|
422
|
+
sectionDividerWidth?: number;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* If the ContentNode specifies sections for a list or grid, specifies the
|
|
426
|
+
* height of the section divider bitmap.
|
|
427
|
+
*
|
|
428
|
+
* @default 0
|
|
429
|
+
*/
|
|
430
|
+
sectionDividerHeight?: number;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* If the ContentNode specifies sections for a list or grid, specifies the
|
|
434
|
+
* minimum width of the section divider bitmap.
|
|
435
|
+
*
|
|
436
|
+
* @default 0
|
|
437
|
+
*/
|
|
438
|
+
sectionDividerMinWidth?: number;
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* If the ContentNode specifies sections for a list or grid, specifies the
|
|
442
|
+
* left offset of the section divider from the list or grid.
|
|
443
|
+
*
|
|
444
|
+
* @default 0
|
|
445
|
+
*/
|
|
446
|
+
sectionDividerLeftOffset?: number;
|
|
447
|
+
|
|
448
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
449
|
+
// Rendering Configuration
|
|
450
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Specifies the number of rendering operations to display a complex list or grid.
|
|
454
|
+
*
|
|
455
|
+
* This allows you to achieve a performance increase by specifying that individual
|
|
456
|
+
* sub-elements of the list or grid items occur on sequential rendering operations.
|
|
457
|
+
*
|
|
458
|
+
* @default 1
|
|
459
|
+
*/
|
|
460
|
+
numRenderPasses?: number;
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Specifies a clipping region for the list or grid items.
|
|
464
|
+
*
|
|
465
|
+
* @default [0.0, 0.0, 0.0, 0.0]
|
|
466
|
+
*/
|
|
467
|
+
itemClippingRect?: Rect2D;
|
|
468
|
+
|
|
469
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
470
|
+
// Selection and Navigation
|
|
471
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* When set to a valid item index, causes the list or grid to immediately update
|
|
475
|
+
* so that the item at the specified index moves into focus.
|
|
476
|
+
*
|
|
477
|
+
* **Important:** Set this property after `content` in the component order. When
|
|
478
|
+
* content is updated dynamically, update `jumpToItem` in the same transaction
|
|
479
|
+
* or after content has been updated.
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* ```tsx
|
|
483
|
+
* <LabelList
|
|
484
|
+
* content={content}
|
|
485
|
+
* jumpToItem={jumpToItem}
|
|
486
|
+
* ...
|
|
487
|
+
* />
|
|
488
|
+
* ```
|
|
489
|
+
*
|
|
490
|
+
* @writeonly
|
|
491
|
+
* @default 0
|
|
492
|
+
*/
|
|
493
|
+
jumpToItem?: number;
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* When set to a valid item index, causes the list or grid to quickly scroll
|
|
497
|
+
* so that the item at the specified index moves into focus.
|
|
498
|
+
*
|
|
499
|
+
* **Important:** Set this property after `content` in the component order. When
|
|
500
|
+
* content is updated dynamically, update `animateToItem` in the same transaction
|
|
501
|
+
* or after content has been updated.
|
|
502
|
+
*
|
|
503
|
+
* @example
|
|
504
|
+
* ```tsx
|
|
505
|
+
* <LabelList
|
|
506
|
+
* content={content}
|
|
507
|
+
* animateToItem={animateToItem}
|
|
508
|
+
* ...
|
|
509
|
+
* />
|
|
510
|
+
* ```
|
|
511
|
+
*
|
|
512
|
+
* @writeonly
|
|
513
|
+
* @default 0
|
|
514
|
+
*/
|
|
515
|
+
animateToItem?: number;
|
|
516
|
+
|
|
517
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
518
|
+
// Event Outputs (Read-Only)
|
|
519
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* When a list or grid item is selected, set to the index of the selected item.
|
|
523
|
+
*
|
|
524
|
+
* @readonly
|
|
525
|
+
* @default 0
|
|
526
|
+
*/
|
|
527
|
+
itemSelected?: number;
|
|
528
|
+
|
|
529
|
+
/** Event fired when a list or grid item is selected. */
|
|
530
|
+
onItemSelected?: EventHandler<number>;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* When focus moves to a list or grid item, set to the index of the focused item.
|
|
534
|
+
*
|
|
535
|
+
* @readonly
|
|
536
|
+
* @default 0
|
|
537
|
+
*/
|
|
538
|
+
itemFocused?: number;
|
|
539
|
+
|
|
540
|
+
/** Event fired when focus moves to a list or grid item. */
|
|
541
|
+
onItemFocused?: EventHandler<number>;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* When focus moves away from a list or grid item, set to the index of the unfocused item.
|
|
545
|
+
*
|
|
546
|
+
* @readonly
|
|
547
|
+
* @default 0
|
|
548
|
+
*/
|
|
549
|
+
itemUnfocused?: number;
|
|
550
|
+
|
|
551
|
+
/** Event fired when focus moves away from a list or grid item. */
|
|
552
|
+
onItemUnfocused?: EventHandler<number>;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Current opacity of the focus feedback indicator (read-only).
|
|
556
|
+
*
|
|
557
|
+
* @readonly
|
|
558
|
+
* @default 0
|
|
559
|
+
*/
|
|
560
|
+
currFocusFeedbackOpacity?: number;
|
|
561
|
+
|
|
562
|
+
/** Event fired when the current focus feedback opacity changes. */
|
|
563
|
+
onCurrFocusFeedbackOpacityChange?: EventHandler<number>;
|
|
564
|
+
|
|
565
|
+
/**
|
|
566
|
+
* Current opacity of the focus feedback indicator (writable).
|
|
567
|
+
*
|
|
568
|
+
* @default 0
|
|
569
|
+
*/
|
|
570
|
+
itemcurrFocusFeedbackOpacity?: number;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Which row of a grid is in the focus position as the items scroll around.
|
|
574
|
+
* Example: `currFocusRow = 3.7` means item 3 occupies 30% and item 4 occupies 70%.
|
|
575
|
+
*
|
|
576
|
+
* @default 0.0
|
|
577
|
+
*/
|
|
578
|
+
currFocusRow?: number;
|
|
579
|
+
|
|
580
|
+
/** Event fired when the current focus row changes. */
|
|
581
|
+
onCurrFocusRowChange?: EventHandler<number>;
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Which column of a grid is in the focus position as the items scroll around.
|
|
585
|
+
*
|
|
586
|
+
* @default 0.0
|
|
587
|
+
*/
|
|
588
|
+
currFocusColumn?: number;
|
|
589
|
+
|
|
590
|
+
/** Event fired when the current focus column changes. */
|
|
591
|
+
onCurrFocusColumnChange?: EventHandler<number>;
|
|
592
|
+
|
|
593
|
+
/**
|
|
594
|
+
* Which section of a grid is in the focus position as the items scroll around.
|
|
595
|
+
*
|
|
596
|
+
* @default 0.0
|
|
597
|
+
*/
|
|
598
|
+
currFocusSection?: number;
|
|
599
|
+
|
|
600
|
+
/** Event fired when the current focus section changes. */
|
|
601
|
+
onCurrFocusSectionChange?: EventHandler<number>;
|
|
602
|
+
}
|