@roku-sdk/components 0.0.0-stage → 2.18.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.
Files changed (211) hide show
  1. package/BREAKING_CHANGES.md +84 -0
  2. package/LICENSE +21 -0
  3. package/README.md +19 -2
  4. package/core-jsx.d.ts +53 -0
  5. package/eslint.config.mjs +3 -0
  6. package/jsx.d.ts +273 -0
  7. package/package.json +84 -3
  8. package/src/__tests__/container.test.tsx +150 -0
  9. package/src/__tests__/glyphs.test.ts +202 -0
  10. package/src/__tests__/modal-boundary-export.test.ts +12 -0
  11. package/src/__tests__/native-modal.test.tsx +224 -0
  12. package/src/__tests__/tween-release.test.tsx +125 -0
  13. package/src/__tests__/tween-stops-shape.test.tsx +165 -0
  14. package/src/__tests__/tween-without-compat.test.tsx +64 -0
  15. package/src/__tests__/tween.test.tsx +195 -0
  16. package/src/blended-busy-spinner.props.ts +37 -0
  17. package/src/blended-busy-spinner.tsx +13 -0
  18. package/src/bounding-tracker.props.ts +18 -0
  19. package/src/bounding-tracker.tsx +13 -0
  20. package/src/button-row.tsx +126 -0
  21. package/src/channel-store.props.ts +425 -0
  22. package/src/channel-store.tsx +76 -0
  23. package/src/container.tsx +130 -0
  24. package/src/core/jsx-runtime.ts +39 -0
  25. package/src/focusable-group.props.ts +8 -0
  26. package/src/focusable-group.tsx +17 -0
  27. package/src/focusable.props.ts +14 -0
  28. package/src/focusable.tsx +17 -0
  29. package/src/glyphs.ts +116 -0
  30. package/src/helpers/index.tsx +4 -0
  31. package/src/helpers/resolution-context.tsx +68 -0
  32. package/src/helpers/scale-for-device-resolution.ts +31 -0
  33. package/src/index.tsx +70 -0
  34. package/src/jsx-props.ts +87 -0
  35. package/src/kdfs.d.ts +14 -0
  36. package/src/kdfs.ts +15 -0
  37. package/src/key-handler.props.ts +33 -0
  38. package/src/key-handler.tsx +24 -0
  39. package/src/modal-dialog.props.ts +38 -0
  40. package/src/modal-dialog.tsx +41 -0
  41. package/src/retain-asset.ts +24 -0
  42. package/src/sg-intrinsics.json +1153 -0
  43. package/src/sg-nodes/__tests__/__snapshots__/font.test.tsx.snap +13 -0
  44. package/src/sg-nodes/__tests__/__snapshots__/prop-forwarding.test.tsx.snap +4409 -0
  45. package/src/sg-nodes/__tests__/core-props.test.ts +301 -0
  46. package/src/sg-nodes/__tests__/font.test.tsx +141 -0
  47. package/src/sg-nodes/__tests__/imperative-methods.test.ts +268 -0
  48. package/src/sg-nodes/__tests__/prop-forwarding.test.tsx +1049 -0
  49. package/src/sg-nodes/__tests__/solid-integration.test.tsx +719 -0
  50. package/src/sg-nodes/animated-image.props.ts +64 -0
  51. package/src/sg-nodes/animated-image.tsx +23 -0
  52. package/src/sg-nodes/animation.props.ts +292 -0
  53. package/src/sg-nodes/animation.tsx +190 -0
  54. package/src/sg-nodes/array-grid.ts +602 -0
  55. package/src/sg-nodes/audio.props.ts +302 -0
  56. package/src/sg-nodes/audio.tsx +57 -0
  57. package/src/sg-nodes/busy-spinner.props.ts +59 -0
  58. package/src/sg-nodes/busy-spinner.tsx +84 -0
  59. package/src/sg-nodes/button-group.props.ts +141 -0
  60. package/src/sg-nodes/button-group.tsx +30 -0
  61. package/src/sg-nodes/button.props.ts +119 -0
  62. package/src/sg-nodes/button.tsx +31 -0
  63. package/src/sg-nodes/check-list.props.ts +71 -0
  64. package/src/sg-nodes/check-list.tsx +55 -0
  65. package/src/sg-nodes/content-node.props.ts +1316 -0
  66. package/src/sg-nodes/content-node.tsx +153 -0
  67. package/src/sg-nodes/core-props.ts +197 -0
  68. package/src/sg-nodes/custom-keyboard.props.ts +108 -0
  69. package/src/sg-nodes/custom-keyboard.tsx +48 -0
  70. package/src/sg-nodes/dialog.props.ts +159 -0
  71. package/src/sg-nodes/dialog.tsx +36 -0
  72. package/src/sg-nodes/dynamic-key-grid.props.ts +22 -0
  73. package/src/sg-nodes/dynamic-key-grid.tsx +16 -0
  74. package/src/sg-nodes/dynamic-keyboard.props.ts +30 -0
  75. package/src/sg-nodes/dynamic-keyboard.tsx +18 -0
  76. package/src/sg-nodes/dynamic-mini-keyboard.props.ts +22 -0
  77. package/src/sg-nodes/dynamic-mini-keyboard.tsx +18 -0
  78. package/src/sg-nodes/dynamic-pinpad.props.ts +57 -0
  79. package/src/sg-nodes/dynamic-pinpad.tsx +18 -0
  80. package/src/sg-nodes/effect.props.ts +116 -0
  81. package/src/sg-nodes/effect.tsx +39 -0
  82. package/src/sg-nodes/font.props.ts +45 -0
  83. package/src/sg-nodes/font.tsx +80 -0
  84. package/src/sg-nodes/group.props.ts +105 -0
  85. package/src/sg-nodes/group.tsx +30 -0
  86. package/src/sg-nodes/label-list.props.ts +86 -0
  87. package/src/sg-nodes/label-list.tsx +64 -0
  88. package/src/sg-nodes/label.props.ts +207 -0
  89. package/src/sg-nodes/label.tsx +56 -0
  90. package/src/sg-nodes/layout-group.props.ts +69 -0
  91. package/src/sg-nodes/layout-group.tsx +75 -0
  92. package/src/sg-nodes/list-panel.props.ts +104 -0
  93. package/src/sg-nodes/list-panel.tsx +49 -0
  94. package/src/sg-nodes/markup-grid.props.ts +78 -0
  95. package/src/sg-nodes/markup-grid.tsx +38 -0
  96. package/src/sg-nodes/markup-list.props.ts +68 -0
  97. package/src/sg-nodes/markup-list.tsx +38 -0
  98. package/src/sg-nodes/mask-group.props.ts +78 -0
  99. package/src/sg-nodes/mask-group.tsx +59 -0
  100. package/src/sg-nodes/media-playback-methods.ts +20 -0
  101. package/src/sg-nodes/node.ts +77 -0
  102. package/src/sg-nodes/overhang.props.ts +169 -0
  103. package/src/sg-nodes/overhang.tsx +29 -0
  104. package/src/sg-nodes/panel-set.props.ts +71 -0
  105. package/src/sg-nodes/panel-set.tsx +53 -0
  106. package/src/sg-nodes/panel.props.ts +176 -0
  107. package/src/sg-nodes/panel.tsx +56 -0
  108. package/src/sg-nodes/poster-grid.props.ts +277 -0
  109. package/src/sg-nodes/poster-grid.tsx +45 -0
  110. package/src/sg-nodes/poster.props.ts +125 -0
  111. package/src/sg-nodes/poster.tsx +44 -0
  112. package/src/sg-nodes/radio-button-list.props.ts +59 -0
  113. package/src/sg-nodes/radio-button-list.tsx +68 -0
  114. package/src/sg-nodes/rectangle.props.ts +29 -0
  115. package/src/sg-nodes/rectangle.tsx +27 -0
  116. package/src/sg-nodes/row-list.props.ts +288 -0
  117. package/src/sg-nodes/row-list.tsx +47 -0
  118. package/src/sg-nodes/scene.props.ts +65 -0
  119. package/src/sg-nodes/scene.tsx +15 -0
  120. package/src/sg-nodes/scrollable-text.props.ts +133 -0
  121. package/src/sg-nodes/scrollable-text.tsx +64 -0
  122. package/src/sg-nodes/scrolling-label.props.ts +106 -0
  123. package/src/sg-nodes/scrolling-label.tsx +42 -0
  124. package/src/sg-nodes/simple-label.props.ts +156 -0
  125. package/src/sg-nodes/simple-label.tsx +59 -0
  126. package/src/sg-nodes/sound-effect.props.ts +130 -0
  127. package/src/sg-nodes/sound-effect.tsx +65 -0
  128. package/src/sg-nodes/standard-dialog.props.ts +520 -0
  129. package/src/sg-nodes/standard-dialog.tsx +428 -0
  130. package/src/sg-nodes/standard-keyboard-dialog.props.ts +84 -0
  131. package/src/sg-nodes/standard-keyboard-dialog.tsx +59 -0
  132. package/src/sg-nodes/standard-message-dialog.props.ts +56 -0
  133. package/src/sg-nodes/standard-message-dialog.tsx +48 -0
  134. package/src/sg-nodes/standard-pinpad-dialog.props.ts +64 -0
  135. package/src/sg-nodes/standard-pinpad-dialog.tsx +46 -0
  136. package/src/sg-nodes/standard-progress-dialog.props.ts +30 -0
  137. package/src/sg-nodes/standard-progress-dialog.tsx +43 -0
  138. package/src/sg-nodes/target-group.props.ts +278 -0
  139. package/src/sg-nodes/target-group.tsx +63 -0
  140. package/src/sg-nodes/target-list.props.ts +128 -0
  141. package/src/sg-nodes/target-list.tsx +66 -0
  142. package/src/sg-nodes/target-set.props.ts +63 -0
  143. package/src/sg-nodes/target-set.tsx +42 -0
  144. package/src/sg-nodes/time-grid.props.ts +646 -0
  145. package/src/sg-nodes/time-grid.tsx +87 -0
  146. package/src/sg-nodes/tween.props.ts +115 -0
  147. package/src/sg-nodes/types.ts +150 -0
  148. package/src/sg-nodes/video.props.ts +573 -0
  149. package/src/sg-nodes/video.tsx +73 -0
  150. package/src/sg-nodes/voice-text-edit-box.props.ts +91 -0
  151. package/src/sg-nodes/voice-text-edit-box.tsx +15 -0
  152. package/src/sg-nodes/zoom-row-list.props.ts +416 -0
  153. package/src/sg-nodes/zoom-row-list.tsx +42 -0
  154. package/src/standard-dialog-next/__tests__/standard-dialog-next.test.tsx +186 -0
  155. package/src/standard-dialog-next/index.ts +5 -0
  156. package/src/standard-dialog-next/standard-dialog-next.props.ts +80 -0
  157. package/src/standard-dialog-next/standard-dialog-next.tsx +326 -0
  158. package/src/test-helpers/tween-test-setup.ts +78 -0
  159. package/src/tween.tsx +173 -0
  160. package/src/types.ts +8 -0
  161. package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.brs +13 -0
  162. package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml +10 -0
  163. package/src/xml-components/blended-busy-spinner/BlendedBusySpinner.xml.d.ts +42 -0
  164. package/src/xml-components/bounding-tracker/BoundingTracker.brs +26 -0
  165. package/src/xml-components/bounding-tracker/BoundingTracker.xml +14 -0
  166. package/src/xml-components/bounding-tracker/BoundingTracker.xml.d.ts +42 -0
  167. package/src/xml-components/channel-store/channelStoreExt.brs +159 -0
  168. package/src/xml-components/channel-store/channelStoreExt.xml +29 -0
  169. package/src/xml-components/channel-store/channelStoreExt.xml.d.ts +57 -0
  170. package/src/xml-components/focus/focusable-group.brs +251 -0
  171. package/src/xml-components/focus/focusable-group.xml +15 -0
  172. package/src/xml-components/focus/focusable-group.xml.d.ts +42 -0
  173. package/src/xml-components/focus/focusable.xml +18 -0
  174. package/src/xml-components/focus/focusable.xml.d.ts +48 -0
  175. package/src/xml-components/keyboards/CustomAddressKDF.keyboard.json +547 -0
  176. package/src/xml-components/keyboards/CustomKeyboard.brs +322 -0
  177. package/src/xml-components/keyboards/CustomKeyboard.xml +45 -0
  178. package/src/xml-components/keyboards/CustomKeyboard.xml.d.ts +73 -0
  179. package/src/xml-components/keyboards/KeyGridExt.xml +4 -0
  180. package/src/xml-components/keyboards/KeyGridExt.xml.d.ts +37 -0
  181. package/src/xml-components/keyboards/KeyboardExt.xml +4 -0
  182. package/src/xml-components/keyboards/KeyboardExt.xml.d.ts +37 -0
  183. package/src/xml-components/keyboards/MOPPinPadCustomKDF.keyboard.json +151 -0
  184. package/src/xml-components/keyboards/MiniKeyboardExt.xml +4 -0
  185. package/src/xml-components/keyboards/MiniKeyboardExt.xml.d.ts +37 -0
  186. package/src/xml-components/keyboards/PhonePadCustomKDF.keyboard.json +42 -0
  187. package/src/xml-components/keyboards/PinPadExt.brs +102 -0
  188. package/src/xml-components/keyboards/PinPadExt.xml +17 -0
  189. package/src/xml-components/keyboards/PinPadExt.xml.d.ts +49 -0
  190. package/src/xml-components/keyboards/WifiCustomKDF.keyboard.json +1242 -0
  191. package/src/xml-components/keyhandler/KeyHandler.brs +30 -0
  192. package/src/xml-components/keyhandler/KeyHandler.xml +16 -0
  193. package/src/xml-components/keyhandler/KeyHandler.xml.d.ts +45 -0
  194. package/src/xml-components/managed-list-panel/ManagedListPanel.brs +137 -0
  195. package/src/xml-components/managed-list-panel/ManagedListPanel.xml +10 -0
  196. package/src/xml-components/managed-list-panel/ManagedListPanel.xml.d.ts +37 -0
  197. package/src/xml-components/modal/Modal.brs +105 -0
  198. package/src/xml-components/modal/Modal.xml +22 -0
  199. package/src/xml-components/modal/Modal.xml.d.ts +54 -0
  200. package/src/xml-components/modal/StandardDialogExt.xml +10 -0
  201. package/src/xml-components/modal/StandardDialogExt.xml.d.ts +37 -0
  202. package/src/xml-components/modal/StandardKeyboardDialogExt.xml +10 -0
  203. package/src/xml-components/modal/StandardKeyboardDialogExt.xml.d.ts +37 -0
  204. package/src/xml-components/modal/StandardMessageDialogExt.xml +10 -0
  205. package/src/xml-components/modal/StandardMessageDialogExt.xml.d.ts +37 -0
  206. package/src/xml-components/modal/StandardPinPadDialogExt.xml +10 -0
  207. package/src/xml-components/modal/StandardPinPadDialogExt.xml.d.ts +37 -0
  208. package/src/xml-components/modal/StandardProgressDialogExt.xml +10 -0
  209. package/src/xml-components/modal/StandardProgressDialogExt.xml.d.ts +37 -0
  210. package/src/xml-components/modal/tests/Modal.test.brs +195 -0
  211. package/tsconfig.json +10 -0
@@ -0,0 +1,322 @@
1
+ Sub Init()
2
+ this = m.top
3
+ textEditBox = this.textEditBox
4
+
5
+ textEditBox.disableVoiceUnderscoreControl = true
6
+ textEditBox.active = true
7
+ textEditBox.observeFieldScoped("text", "textChanged")
8
+ textEditBox.observeFieldScoped("isDictating", "isDictatingChanged")
9
+ textEditBox.observeField("renderTracking", "KeyChanged")
10
+ End Sub
11
+
12
+ ' Re-apply Ext underscore props when dictation ends (OS may not restore them
13
+ ' while disableVoiceUnderscoreControl is true).
14
+ Sub isDictatingChanged(event as Object)
15
+ m.top.isDictating = event.getData()
16
+ if event.getData() = false
17
+ showUnderscoresChanged()
18
+ centerUnderscoresChanged()
19
+ end if
20
+ End Sub
21
+
22
+ Sub KeyChanged()
23
+ disableKeyChanged()
24
+ enableKeyChanged()
25
+ End Sub
26
+
27
+ Sub modeChanged()
28
+ this = m.top
29
+ m.currMode = this.mode
30
+ if m.currMode <> this.keyGrid.mode
31
+ this.keyGrid.mode = m.currMode
32
+ end if
33
+ End Sub
34
+
35
+ Sub initTextChanged()
36
+ applyInitText()
37
+ End Sub
38
+
39
+ Sub keyDefinitionUriChanged()
40
+ this = m.top
41
+ if this.keyDefinitionUri <> invalid and this.keyDefinitionUri <> ""
42
+ this.keyGrid.keyDefinitionUri = this.keyDefinitionUri
43
+ end if
44
+ End Sub
45
+
46
+ Sub jumpToKeyChanged()
47
+ this = m.top
48
+ if this.jumpToKey <> invalid
49
+ this.keyGrid.jumpToKey = this.jumpToKey
50
+ this.keyGrid.visible = false
51
+ this.keyGrid.visible = true
52
+ end if
53
+ End Sub
54
+
55
+ Sub disableKeyChanged()
56
+ this = m.top
57
+ if this.disableKey <> invalid
58
+ this.keyGrid.disableKey = this.disableKey
59
+ this.keyGrid.visible = false
60
+ this.keyGrid.visible = true
61
+ end if
62
+ End Sub
63
+
64
+ Sub enableKeyChanged()
65
+ this = m.top
66
+ if this.enableKey <> invalid
67
+ this.keyGrid.enableKey = this.enableKey
68
+ this.keyGrid.visible = false
69
+ this.keyGrid.visible = true
70
+ end if
71
+ End Sub
72
+
73
+ Sub focusVisibleChanged()
74
+ this = m.top
75
+ if this.focusVisible <> invalid
76
+ this.keyGrid.focusVisible = this.focusVisible
77
+ end if
78
+ End Sub
79
+
80
+ Sub horizWrapChanged()
81
+ this = m.top
82
+ if this.horizWrap <> invalid
83
+ this.keyGrid.horizWrap = this.horizWrap
84
+ end if
85
+ End Sub
86
+
87
+ Sub vertWrapChanged()
88
+ this = m.top
89
+ if this.vertWrap <> invalid
90
+ this.keyGrid.vertWrap = this.vertWrap
91
+ end if
92
+ End Sub
93
+
94
+ Sub paletteChanged()
95
+ this = m.top
96
+ if this.palette <> invalid
97
+ this.keyGrid.palette = this.palette
98
+ end if
99
+ End Sub
100
+
101
+ function getCurrentDateTime(utc = false as Boolean) as Object
102
+ localDateTime = CreateObject("roDateTime")
103
+ if utc = false then
104
+ localDateTime.ToLocalTime()
105
+ end if
106
+ strLocalDate = localDateTime.ToISOString()
107
+
108
+ return [Left(strLocalDate, 10), Left(Right(strLocalDate, 9), 8)]
109
+ end function
110
+
111
+ Sub applyInitText()
112
+ this = m.top
113
+ textEditBox = this.textEditBox
114
+ if this.initText <> invalid
115
+ this.text = this.initText
116
+ textEditBox.text = this.text
117
+ textEditBox.cursorPosition = this.text.len()
118
+ end if
119
+ End Sub
120
+
121
+ Sub textChanged(event as Object)
122
+ this = m.top
123
+ textEditBox = this.textEditBox
124
+ currentText = this.text
125
+
126
+ textLengthChange = currentText.len()
127
+
128
+ ' Address-form KDF logic (e.g. CustomAddressKDF): month/year modes auto-format
129
+ ' date segments. Not a general CustomKeyboard feature — other KDFs with
130
+ ' month/year mode names may need different behavior.
131
+ if this.mode = "month" and textLengthChange = 1 then
132
+ this.text = "0" + currentText
133
+ end if
134
+
135
+ if this.mode = "year" then
136
+ yearFirstTwoChars = Left(getCurrentDateTime()[0], 2)
137
+ if textLengthChange = 2 and Val(this.text) <> Val(yearFirstTwoChars) then
138
+ this.text = yearFirstTwoChars + this.text
139
+ end if
140
+ end if
141
+
142
+ this.textEditBox.text = this.text
143
+ this.textEditBox.cursorPosition = this.text.len()
144
+ End Sub
145
+
146
+ Sub disableVoiceUnderscoreControlChanged()
147
+ this = m.top
148
+ textEditBox = this.textEditBox
149
+ if this.disableVoiceUnderscoreControl <> invalid
150
+ textEditBox.disableVoiceUnderscoreControl = this.disableVoiceUnderscoreControl
151
+ end if
152
+ End Sub
153
+
154
+ Sub showUnderscoresChanged()
155
+ this = m.top
156
+ textEditBox = this.textEditBox
157
+ if this.showUnderscores <> invalid
158
+ textEditBox.showUnderscores = this.showUnderscores
159
+ end if
160
+ End Sub
161
+
162
+ Sub centerUnderscoresChanged()
163
+ this = m.top
164
+ textEditBox = this.textEditBox
165
+ if this.centerUnderscores <> invalid
166
+ textEditBox.centerUnderscores = this.centerUnderscores
167
+ end if
168
+ End Sub
169
+
170
+ Sub maxTextLengthChanged()
171
+ this = m.top
172
+ textEditBox = this.textEditBox
173
+ if this.maxTextLength <> invalid
174
+ textEditBox.maxTextLength = this.maxTextLength
175
+ end if
176
+ End Sub
177
+
178
+ Sub voiceEnabledChanged()
179
+ this = m.top
180
+ textEditBox = this.textEditBox
181
+ if this.voiceEnabled <> invalid
182
+ textEditBox.voiceEnabled = this.voiceEnabled
183
+ end if
184
+ End Sub
185
+
186
+ Sub voiceEntryTypeChanged()
187
+ this = m.top
188
+ textEditBox = this.textEditBox
189
+ if this.voiceEntryType <> invalid
190
+ textEditBox.voiceEntryType = this.voiceEntryType
191
+ end if
192
+ End Sub
193
+
194
+ Sub voiceToolTipWidthChanged()
195
+ this = m.top
196
+ textEditBox = this.textEditBox
197
+ if this.voiceToolTipWidth <> invalid
198
+ textEditBox.voiceToolTipWidth = this.voiceToolTipWidth
199
+ end if
200
+ End Sub
201
+
202
+ Sub voiceInputRegexFilterChanged()
203
+ this = m.top
204
+ textEditBox = this.textEditBox
205
+ if this.voiceInputRegexFilter <> invalid
206
+ textEditBox.voiceInputRegexFilter = this.voiceInputRegexFilter
207
+ end if
208
+ End Sub
209
+
210
+ Sub hintTextChanged()
211
+ this = m.top
212
+ textEditBox = this.textEditBox
213
+ if this.hintText <> invalid
214
+ textEditBox.hintText = this.hintText
215
+ end if
216
+ End Sub
217
+
218
+ Sub cursorPositionChanged()
219
+ this = m.top
220
+ textEditBox = this.textEditBox
221
+ if this.cursorPosition <> invalid
222
+ textEditBox.cursorPosition = this.cursorPosition
223
+ end if
224
+ End Sub
225
+
226
+ Sub clearOnDownKeyChanged()
227
+ this = m.top
228
+ textEditBox = this.textEditBox
229
+ if this.clearOnDownKey <> invalid
230
+ textEditBox.clearOnDownKey = this.clearOnDownKey
231
+ end if
232
+ End Sub
233
+
234
+ Sub activeChanged()
235
+ this = m.top
236
+ textEditBox = this.textEditBox
237
+ if this.active <> invalid
238
+ textEditBox.active = this.active
239
+ end if
240
+ End Sub
241
+
242
+ Sub secureModeChanged()
243
+ this = m.top
244
+ textEditBox = this.textEditBox
245
+ if this.secureMode <> invalid
246
+ textEditBox.secureMode = this.secureMode
247
+ end if
248
+ End Sub
249
+
250
+ Sub textColorChanged()
251
+ this = m.top
252
+ textEditBox = this.textEditBox
253
+ if this.textColor <> invalid and this.textColor <> ""
254
+ textEditBox.textColor = this.textColor
255
+ end if
256
+ End Sub
257
+
258
+ Sub hintTextColorChanged()
259
+ this = m.top
260
+ textEditBox = this.textEditBox
261
+ if this.hintTextColor <> invalid and this.hintTextColor <> ""
262
+ textEditBox.hintTextColor = this.hintTextColor
263
+ end if
264
+ End Sub
265
+
266
+ Sub voiceTextBoxWidthChanged()
267
+ this = m.top
268
+ textEditBox = this.textEditBox
269
+ if this.voiceTextBoxWidth <> invalid
270
+ textEditBox.width = this.voiceTextBoxWidth
271
+ end if
272
+ End Sub
273
+
274
+ Sub backgroundUriChanged()
275
+ this = m.top
276
+ textEditBox = this.textEditBox
277
+ if this.backgroundUri <> invalid
278
+ textEditBox.backgroundUri = this.backgroundUri
279
+ end if
280
+ End Sub
281
+
282
+ Sub leadingEllipsisChanged()
283
+ this = m.top
284
+ textEditBox = this.textEditBox
285
+ if this.leadingEllipsis <> invalid
286
+ textEditBox.leadingEllipsis = this.leadingEllipsis
287
+ end if
288
+ End Sub
289
+
290
+ function isCapsModifierKey(key as string) as boolean
291
+ return LCase(key).StartsWith("caps")
292
+ end function
293
+
294
+ ' Register mod keys (abc123 / symbols / accents) in KDFs such as WifiCustomKDF only
295
+ ' swap the visible key grid, so suppress strOut and let the app choose the mode.
296
+ function isRegisterModifierKey(key as string) as boolean
297
+ lk = LCase(key)
298
+ return lk = "abc123" or lk = "symbols" or lk = "accents"
299
+ end function
300
+
301
+ Function keySelected(key as string) as boolean
302
+ this = m.top
303
+ if isCapsModifierKey(key) or isRegisterModifierKey(key)
304
+ m.top.SetField("keySelectedValue", {"key": key})
305
+ return true
306
+ end if
307
+
308
+ if key = "ChangeCase" or key = "Next" or key = "Prev" or key = "ToggleLang"
309
+ m.top.SetField("keySelectedValue", {"key": key})
310
+ return true
311
+ end if
312
+
313
+ ' Address-form KDF: month/year modes replace text on each key press.
314
+ if m.top.keyGrid.mode = "year" or m.top.keyGrid.mode = "month" then
315
+ m.top.textEditBox.text = key
316
+ m.top.SetField("keySelectedValue", {"key": key})
317
+ return true
318
+ end if
319
+
320
+ m.top.SetField("keySelectedValue", {"key": key})
321
+ return false
322
+ End Function
@@ -0,0 +1,45 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <component name="CustomKeyboard" extends="DynamicCustomKeyboard">
4
+ <script type="text/brightscript" uri="CustomKeyboard.brs" />
5
+ <interface>
6
+ <field id="voiceEnabled" type="boolean" value="false" onChange="voiceEnabledChanged" />
7
+ <field id="voiceToolTipWidth" type="float" onChange="voiceToolTipWidthChanged" />
8
+ <field id="voiceEntryType" type="string" onChange="voiceEntryTypeChanged" />
9
+ <field id="voiceInputRegexFilter" type="string" onChange="voiceInputRegexFilterChanged" />
10
+ <field id="isDictating" type="boolean" alwaysNotify="true" />
11
+ <field id="hintText" type="string" onChange="hintTextChanged" />
12
+ <field id="maxTextLength" type="float" onChange="maxTextLengthChanged" />
13
+ <field id="cursorPosition" type="float" onChange="cursorPositionChanged" />
14
+ <field id="clearOnDownKey" type="boolean" onChange="clearOnDownKeyChanged" />
15
+ <field id="active" type="boolean" onChange="activeChanged" />
16
+ <field id="secureMode" type="boolean" onChange="secureModeChanged" />
17
+ <field id="textColor" type="string" onChange="textColorChanged" />
18
+ <field id="hintTextColor" type="string" onChange="hintTextColorChanged" />
19
+ <field id="voiceTextBoxWidth" type="float" onChange="voiceTextBoxWidthChanged" />
20
+ <field id="backgroundUri" type="string" onChange="backgroundUriChanged" />
21
+ <field id="leadingEllipsis" type="boolean" onChange="leadingEllipsisChanged" />
22
+
23
+ <field id="disableVoiceUnderscoreControl" type="boolean"
24
+ onChange="disableVoiceUnderscoreControlChanged" />
25
+ <field id="showUnderscores" type="boolean" onChange="showUnderscoresChanged" />
26
+ <field id="centerUnderscores" type="boolean" onChange="centerUnderscoresChanged" />
27
+
28
+ <field id="keyDefinitionUri" type="string" onChange="keyDefinitionUriChanged" />
29
+ <field id="mode" type="string" onChange="modeChanged" />
30
+ <field id="jumpToKey" type="floatarray" onChange="jumpToKeyChanged" />
31
+ <field id="disableKey" type="string" onChange="disableKeyChanged" />
32
+ <field id="enableKey" type="string" onChange="enableKeyChanged" />
33
+ <field id="focusVisible" type="boolean" onChange="focusVisibleChanged" />
34
+ <field id="horizWrap" type="boolean" onChange="horizWrapChanged" />
35
+ <field id="vertWrap" type="boolean" onChange="vertWrapChanged" />
36
+ <field id="palette" type="node" onChange="paletteChanged" />
37
+ <field id="keySelectedValue" type="assocarray" />
38
+ <field id="initText" type="string" onChange="initTextChanged" />
39
+
40
+ <function name="keySelected" />
41
+ <field id="next" type="bool" alwaysNotify="true" />
42
+ <field id="prev" type="bool" alwaysNotify="true" />
43
+ </interface>
44
+
45
+ </component>
@@ -0,0 +1,73 @@
1
+ // Auto-generated TypeScript declarations for XML component import.
2
+ // DO NOT EDIT — this file is regenerated during build.
3
+ //
4
+ // Source component: CustomKeyboard
5
+ // Extends: DynamicCustomKeyboard
6
+
7
+ import type { IKeyboardPropsWithVoice } from "@roku-sdk/components";
8
+ import type { TypedXmlComponent } from "@roku-sdk/interfaces";
9
+
10
+ interface CustomKeyboardFields {
11
+ /** @default "false" */
12
+ voiceEnabled: boolean;
13
+ voiceToolTipWidth: number;
14
+ voiceEntryType: string;
15
+ voiceInputRegexFilter: string;
16
+ isDictating: boolean;
17
+ hintText: string;
18
+ maxTextLength: number;
19
+ cursorPosition: number;
20
+ clearOnDownKey: boolean;
21
+ active: boolean;
22
+ secureMode: boolean;
23
+ textColor: string;
24
+ hintTextColor: string;
25
+ voiceTextBoxWidth: number;
26
+ backgroundUri: string;
27
+ leadingEllipsis: boolean;
28
+ disableVoiceUnderscoreControl: boolean;
29
+ showUnderscores: boolean;
30
+ centerUnderscores: boolean;
31
+ keyDefinitionUri: string;
32
+ mode: string;
33
+ jumpToKey: number[];
34
+ disableKey: string;
35
+ enableKey: string;
36
+ focusVisible: boolean;
37
+ horizWrap: boolean;
38
+ vertWrap: boolean;
39
+ palette: import("@roku-sdk/interfaces").DomNode;
40
+ keySelectedValue: Record<string, unknown>;
41
+ initText: string;
42
+ next: boolean;
43
+ prev: boolean;
44
+ }
45
+
46
+ export interface ICustomKeyboardProps extends IKeyboardPropsWithVoice, Partial<CustomKeyboardFields> {}
47
+
48
+ declare const _default: TypedXmlComponent<"CustomKeyboard", CustomKeyboardFields>;
49
+ export default _default;
50
+
51
+ declare module "@roku-sdk/solid" {
52
+ namespace JSX {
53
+ interface IntrinsicElements {
54
+ customKeyboard: ICustomKeyboardProps;
55
+ }
56
+ }
57
+ }
58
+
59
+ declare module "@roku-sdk/solid/jsx-runtime" {
60
+ namespace JSX {
61
+ interface IntrinsicElements {
62
+ customKeyboard: ICustomKeyboardProps;
63
+ }
64
+ }
65
+ }
66
+
67
+ declare module "solid-js" {
68
+ namespace JSX {
69
+ interface IntrinsicElements {
70
+ customKeyboard: ICustomKeyboardProps;
71
+ }
72
+ }
73
+ }
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <component name="KeyGridExt" extends="DynamicKeyGrid">
4
+ </component>
@@ -0,0 +1,37 @@
1
+ // Auto-generated TypeScript declarations for XML component import.
2
+ // DO NOT EDIT — this file is regenerated during build.
3
+ //
4
+ // Source component: KeyGridExt
5
+ // Extends: DynamicKeyGrid
6
+
7
+ import type { IDynamicKeyGridProps } from "@roku-sdk/components";
8
+ import type { TypedXmlComponent } from "@roku-sdk/interfaces";
9
+
10
+ export interface IKeyGridExtProps extends IDynamicKeyGridProps {}
11
+
12
+ declare const _default: TypedXmlComponent<"KeyGridExt", Record<string, never>>;
13
+ export default _default;
14
+
15
+ declare module "@roku-sdk/solid" {
16
+ namespace JSX {
17
+ interface IntrinsicElements {
18
+ keyGridExt: IKeyGridExtProps;
19
+ }
20
+ }
21
+ }
22
+
23
+ declare module "@roku-sdk/solid/jsx-runtime" {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ keyGridExt: IKeyGridExtProps;
27
+ }
28
+ }
29
+ }
30
+
31
+ declare module "solid-js" {
32
+ namespace JSX {
33
+ interface IntrinsicElements {
34
+ keyGridExt: IKeyGridExtProps;
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <component name="KeyboardExt" extends="DynamicKeyboard">
4
+ </component>
@@ -0,0 +1,37 @@
1
+ // Auto-generated TypeScript declarations for XML component import.
2
+ // DO NOT EDIT — this file is regenerated during build.
3
+ //
4
+ // Source component: KeyboardExt
5
+ // Extends: DynamicKeyboard
6
+
7
+ import type { IDynamicKeyboardProps } from "@roku-sdk/components";
8
+ import type { TypedXmlComponent } from "@roku-sdk/interfaces";
9
+
10
+ export interface IKeyboardExtProps extends IDynamicKeyboardProps {}
11
+
12
+ declare const _default: TypedXmlComponent<"KeyboardExt", Record<string, never>>;
13
+ export default _default;
14
+
15
+ declare module "@roku-sdk/solid" {
16
+ namespace JSX {
17
+ interface IntrinsicElements {
18
+ keyboardExt: IKeyboardExtProps;
19
+ }
20
+ }
21
+ }
22
+
23
+ declare module "@roku-sdk/solid/jsx-runtime" {
24
+ namespace JSX {
25
+ interface IntrinsicElements {
26
+ keyboardExt: IKeyboardExtProps;
27
+ }
28
+ }
29
+ }
30
+
31
+ declare module "solid-js" {
32
+ namespace JSX {
33
+ interface IntrinsicElements {
34
+ keyboardExt: IKeyboardExtProps;
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "keyboardWidthFHD": 495,
3
+ "keyboardHeightFHD": 350,
4
+ "keyboardWidthHD": 324,
5
+ "keyboardHeightHD": 240,
6
+ "sections": [
7
+ {
8
+ "grids": [
9
+ {
10
+ "modes": "card",
11
+ "rows": [
12
+ {
13
+ "keys": [{ "label": "1" }, { "label": "2" }, { "label": "3" }]
14
+ },
15
+ {
16
+ "keys": [{ "label": "4" }, { "label": "5" }, { "label": "6" }]
17
+ },
18
+ {
19
+ "keys": [{ "label": "7" }, { "label": "8" }, { "label": "9" }]
20
+ },
21
+ {
22
+ "keys": [
23
+ {
24
+ "icon": "theme:DKB_ClearKeyBitmap",
25
+ "focusIcon": "theme:DKB_ClearKeyFocusBitmap",
26
+ "strOut": "clear"
27
+ },
28
+ { "label": "0" },
29
+ {
30
+ "icon": "theme:DKB_DeleteKeyBitmap",
31
+ "focusIcon": "theme:DKB_DeleteKeyFocusBitmap",
32
+ "autoRepeat": 1,
33
+ "strOut": "backspace"
34
+ }
35
+ ]
36
+ },
37
+ {
38
+ "keys": [{ "label": "Prev", "disabled": 1 }, { "label": "Next" }]
39
+ }
40
+ ]
41
+ },
42
+ {
43
+ "modes": "month",
44
+ "rows": [
45
+ {
46
+ "keys": [{ "label": "01" }, { "label": "02" }, { "label": "03" }]
47
+ },
48
+ {
49
+ "keys": [{ "label": "04" }, { "label": "05" }, { "label": "06" }]
50
+ },
51
+ {
52
+ "keys": [{ "label": "07" }, { "label": "08" }, { "label": "09" }]
53
+ },
54
+ {
55
+ "keys": [{ "label": "10" }, { "label": "11" }, { "label": "12" }]
56
+ },
57
+ {
58
+ "keys": [{ "label": "Prev" }, { "label": "Next" }]
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "modes": "year",
64
+ "rows": [
65
+ {
66
+ "keys": [{ "label": "2022" }, { "label": "2023" }, { "label": "2024" }]
67
+ },
68
+ {
69
+ "keys": [{ "label": "2025" }, { "label": "2026" }, { "label": "2027" }]
70
+ },
71
+ {
72
+ "keys": [{ "label": "2028" }, { "label": "2029" }, { "label": "2030" }]
73
+ },
74
+ {
75
+ "keys": [{ "label": "2031" }, { "label": "2032" }, { "label": "2033" }]
76
+ },
77
+ {
78
+ "keys": [{ "label": "Prev" }, { "label": "Next" }]
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "modes": "cvv",
84
+ "rows": [
85
+ {
86
+ "keys": [{ "label": "1" }, { "label": "2" }, { "label": "3" }]
87
+ },
88
+ {
89
+ "keys": [{ "label": "4" }, { "label": "5" }, { "label": "6" }]
90
+ },
91
+ {
92
+ "keys": [{ "label": "7" }, { "label": "8" }, { "label": "9" }]
93
+ },
94
+ {
95
+ "keys": [
96
+ {
97
+ "icon": "theme:DKB_ClearKeyBitmap",
98
+ "focusIcon": "theme:DKB_ClearKeyFocusBitmap",
99
+ "strOut": "clear"
100
+ },
101
+ { "label": "0" },
102
+ {
103
+ "icon": "theme:DKB_DeleteKeyBitmap",
104
+ "focusIcon": "theme:DKB_DeleteKeyFocusBitmap",
105
+ "autoRepeat": 1,
106
+ "strOut": "backspace"
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "keys": [{ "label": "Prev" }, { "label": "Next" }]
112
+ }
113
+ ]
114
+ },
115
+ {
116
+ "modes": "zip",
117
+ "rows": [
118
+ {
119
+ "keys": [{ "label": "1" }, { "label": "2" }, { "label": "3" }]
120
+ },
121
+ {
122
+ "keys": [{ "label": "4" }, { "label": "5" }, { "label": "6" }]
123
+ },
124
+ {
125
+ "keys": [{ "label": "7" }, { "label": "8" }, { "label": "9" }]
126
+ },
127
+ {
128
+ "keys": [
129
+ {
130
+ "icon": "theme:DKB_ClearKeyBitmap",
131
+ "focusIcon": "theme:DKB_ClearKeyFocusBitmap",
132
+ "strOut": "clear"
133
+ },
134
+ { "label": "0" },
135
+ {
136
+ "icon": "theme:DKB_DeleteKeyBitmap",
137
+ "focusIcon": "theme:DKB_DeleteKeyFocusBitmap",
138
+ "autoRepeat": 1,
139
+ "strOut": "backspace"
140
+ }
141
+ ]
142
+ },
143
+ {
144
+ "keys": [{ "label": "Prev" }, { "label": "Next" }]
145
+ }
146
+ ]
147
+ }
148
+ ]
149
+ }
150
+ ]
151
+ }
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <component name="MiniKeyboardExt" extends="DynamicMiniKeyboard">
4
+ </component>