react-native-roku 0.0.0-stage → 0.2.0-preview.1

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 (200) hide show
  1. package/CHANGELOG.md +318 -0
  2. package/CONTRIBUTING.md +34 -0
  3. package/LICENSE +21 -0
  4. package/NOTICE.md +10 -0
  5. package/README.md +66 -2
  6. package/bin/react-native-roku.mjs +91 -0
  7. package/build/assets.cjs +311 -0
  8. package/build/assets.d.cts +50 -0
  9. package/build/compatibility.d.mts +40 -0
  10. package/build/compatibility.mjs +272 -0
  11. package/build/dev.d.mts +34 -0
  12. package/build/dev.mjs +297 -0
  13. package/build/devWorkspace.d.mts +11 -0
  14. package/build/devWorkspace.mjs +86 -0
  15. package/build/device.d.mts +47 -0
  16. package/build/device.mjs +310 -0
  17. package/build/environment.d.mts +29 -0
  18. package/build/environment.mjs +144 -0
  19. package/build/esbuild.d.mts +5 -0
  20. package/build/esbuild.mjs +118 -0
  21. package/build/fontVariants.d.mts +27 -0
  22. package/build/fontVariants.mjs +424 -0
  23. package/build/frontend.d.mts +52 -0
  24. package/build/frontend.mjs +75 -0
  25. package/build/identity.mjs +45 -0
  26. package/build/index.d.mts +22 -0
  27. package/build/index.mjs +87 -0
  28. package/build/intl.mjs +121 -0
  29. package/build/metro.cjs +38 -0
  30. package/build/metro.d.cts +37 -0
  31. package/build/metroFrontend.mjs +222 -0
  32. package/build/metroMetadata.mjs +119 -0
  33. package/build/metroModules.mjs +397 -0
  34. package/build/metroRefresh.d.mts +64 -0
  35. package/build/metroRefresh.mjs +346 -0
  36. package/build/metroTransformer.cjs +146 -0
  37. package/build/nativeTextMemo.mjs +296 -0
  38. package/build/nativewind.d.mts +9 -0
  39. package/build/nativewind.mjs +92 -0
  40. package/build/project.d.mts +111 -0
  41. package/build/project.mjs +615 -0
  42. package/build/reactCompiler.mjs +113 -0
  43. package/build/reactProfile.cjs +35 -0
  44. package/build/refreshRuntime.mjs +187 -0
  45. package/build/refreshSourceMap.mjs +53 -0
  46. package/build/release.mjs +99 -0
  47. package/build/resolution.d.mts +3 -0
  48. package/build/resolution.mjs +25 -0
  49. package/build/surfaces.d.mts +1 -0
  50. package/build/surfaces.mjs +42 -0
  51. package/build/testing/node.d.mts +29 -0
  52. package/build/testing/node.mjs +106 -0
  53. package/build/yoga.d.mts +8 -0
  54. package/build/yoga.mjs +186 -0
  55. package/compatibility/public-api.json +327 -0
  56. package/compatibility/registry.json +2258 -0
  57. package/config/release.json +15 -0
  58. package/config/toolchain.json +34 -0
  59. package/docs/compatibility.md +813 -0
  60. package/docs/getting-started.md +460 -0
  61. package/docs/maintenance.md +362 -0
  62. package/docs/qualification.md +241 -0
  63. package/docs/standalone-testing.md +56 -0
  64. package/examples/hello-roku/README.md +35 -0
  65. package/examples/hello-roku/package.template.json +31 -0
  66. package/examples/hello-roku/pnpm-workspace.yaml +11 -0
  67. package/examples/hello-roku/roku.config.json +22 -0
  68. package/examples/hello-roku/src/App.tsx +54 -0
  69. package/examples/hello-roku/src/Catalog.tsx +200 -0
  70. package/examples/hello-roku/src/assets.d.ts +16 -0
  71. package/examples/hello-roku/src/catalog-cover.png +0 -0
  72. package/examples/hello-roku/tsconfig.json +1 -0
  73. package/examples/hello-roku/tsconfig.react.json +1 -0
  74. package/native/components/RNRAppControl.brs +215 -0
  75. package/native/components/RNRAppControl.xml +13 -0
  76. package/native/components/RNRDeviceFacts.brs +19 -0
  77. package/native/components/RNRDeviceFacts.xml +9 -0
  78. package/native/components/RNRDeviceFactsTask.brs +74 -0
  79. package/native/components/RNRDeviceFactsTask.xml +9 -0
  80. package/native/components/RNRTextRaster.brs +15 -0
  81. package/native/components/RNRTextRaster.xml +9 -0
  82. package/native/components/RNRTextRasterTask.brs +77 -0
  83. package/native/components/RNRTextRasterTask.xml +9 -0
  84. package/native/manifest.json +7 -0
  85. package/package.json +183 -3
  86. package/src/animation/clock.ts +10 -0
  87. package/src/animation/derivedValue.ts +163 -0
  88. package/src/animation/legacyAnimated.ts +255 -0
  89. package/src/animation/reanimated.ts +243 -0
  90. package/src/animation/sharedValue.ts +285 -0
  91. package/src/animation/worklets.ts +23 -0
  92. package/src/application/AppRegistry.ts +31 -0
  93. package/src/application/mountApplication.ts +136 -0
  94. package/src/graphics/BitmapLayer.tsx +68 -0
  95. package/src/graphics/RoundedBorder.tsx +116 -0
  96. package/src/graphics/TextRasterCache.ts +259 -0
  97. package/src/graphics/gradient.ts +37 -0
  98. package/src/graphics/inlineRaster.ts +85 -0
  99. package/src/graphics/png.ts +77 -0
  100. package/src/graphics/rasterPixels.ts +89 -0
  101. package/src/graphics/surfaces.ts +105 -0
  102. package/src/graphics/textRaster.types.ts +60 -0
  103. package/src/graphics/textRasterGeometry.ts +116 -0
  104. package/src/host/host.types.ts +57 -0
  105. package/src/index.ts +22 -0
  106. package/src/interop/nativewind.ts +2 -0
  107. package/src/layout/FontResources.ts +252 -0
  108. package/src/layout/affine.ts +89 -0
  109. package/src/layout/flexLayout.ts +398 -0
  110. package/src/layout/fontFaces.d.mts +19 -0
  111. package/src/layout/fontFaces.mjs +85 -0
  112. package/src/layout/fontVariants.d.mts +2 -0
  113. package/src/layout/fontVariants.mjs +8 -0
  114. package/src/layout/inlineParagraph.ts +158 -0
  115. package/src/layout/inlineText.ts +68 -0
  116. package/src/layout/layoutReuse.ts +117 -0
  117. package/src/layout/nativeNodeFields.ts +179 -0
  118. package/src/layout/preparedFields.ts +78 -0
  119. package/src/layout/textLayout.ts +138 -0
  120. package/src/layout/transform.ts +113 -0
  121. package/src/media/SceneGraphAudio.ts +161 -0
  122. package/src/media/SceneGraphVideo.ts +167 -0
  123. package/src/media/audioSession.ts +84 -0
  124. package/src/media/index.ts +2 -0
  125. package/src/media/videoErrorDetails.ts +40 -0
  126. package/src/media/videoSession.ts +136 -0
  127. package/src/navigation/RouterStore.ts +244 -0
  128. package/src/navigation/expoRouter.ts +115 -0
  129. package/src/react-native/NativeInput.ts +494 -0
  130. package/src/react-native/NativeSystemState.ts +95 -0
  131. package/src/react-native/accessibility.ts +265 -0
  132. package/src/react-native/activityIndicator.ts +72 -0
  133. package/src/react-native/compilerPressable.ts +26 -0
  134. package/src/react-native/createNativeRoot.ts +2126 -0
  135. package/src/react-native/directionalFocus.ts +55 -0
  136. package/src/react-native/environment.ts +275 -0
  137. package/src/react-native/flatList.ts +1001 -0
  138. package/src/react-native/flatListViewability.ts +231 -0
  139. package/src/react-native/focusEvents.ts +85 -0
  140. package/src/react-native/image.ts +247 -0
  141. package/src/react-native/index.ts +54 -0
  142. package/src/react-native/interactionManager.ts +76 -0
  143. package/src/react-native/keyboard.ts +60 -0
  144. package/src/react-native/linearGradient.ts +94 -0
  145. package/src/react-native/modal.tsx +148 -0
  146. package/src/react-native/nativeHostContext.ts +80 -0
  147. package/src/react-native/nativeModules.ts +86 -0
  148. package/src/react-native/nativeRoot.types.ts +22 -0
  149. package/src/react-native/nativeViewHandle.ts +191 -0
  150. package/src/react-native/nativewindPressable.ts +38 -0
  151. package/src/react-native/panResponder.ts +73 -0
  152. package/src/react-native/primitives.ts +685 -0
  153. package/src/react-native/safeArea.ts +76 -0
  154. package/src/react-native/scrollView.ts +289 -0
  155. package/src/react-native/styleInterop.ts +8 -0
  156. package/src/react-native/styleSheet.ts +54 -0
  157. package/src/react-native/textInput.ts +334 -0
  158. package/src/react-native/unsupported.ts +25 -0
  159. package/src/renderer/SceneRoot.ts +1006 -0
  160. package/src/scene/SdkDeviceFacts.ts +151 -0
  161. package/src/scene/SdkDeviceServices.ts +72 -0
  162. package/src/scene/SdkSceneGraph.ts +124 -0
  163. package/src/scene/SdkTextEntry.ts +321 -0
  164. package/src/scene/SdkTextMetrics.ts +136 -0
  165. package/src/scene/SdkTextRasterTransport.ts +191 -0
  166. package/src/scene/SdkWebTransport.ts +122 -0
  167. package/src/scene/createRokuHost.ts +213 -0
  168. package/src/scene/sceneGraph.types.ts +38 -0
  169. package/src/services/DeviceServices.ts +53 -0
  170. package/src/services/RegistryStorage.ts +85 -0
  171. package/src/services/RokuKeySession.ts +29 -0
  172. package/src/services/asyncStorage.ts +23 -0
  173. package/src/services/base64.ts +52 -0
  174. package/src/services/crypto.ts +18 -0
  175. package/src/services/expoConstants.ts +11 -0
  176. package/src/services/expoLinking.ts +12 -0
  177. package/src/services/expoStatusBar.ts +4 -0
  178. package/src/services/installWebRuntime.ts +105 -0
  179. package/src/services/intlEnglish.ts +54 -0
  180. package/src/services/languageRuntime.ts +65 -0
  181. package/src/services/nativeTimers.ts +96 -0
  182. package/src/services/secureStore.ts +23 -0
  183. package/src/services/textEntryRequest.ts +22 -0
  184. package/src/services/utf8.ts +57 -0
  185. package/src/services/webRuntime.ts +346 -0
  186. package/src/testing/CanvasResources.ts +141 -0
  187. package/src/testing/CanvasSceneGraph.ts +496 -0
  188. package/src/testing/CanvasTextEntry.ts +237 -0
  189. package/src/testing/PreviewTextObservations.ts +82 -0
  190. package/src/testing/RecordingSceneGraph.ts +136 -0
  191. package/src/types/normalize-colors.d.ts +4 -0
  192. package/src/vector/dynamicSvg.tsx +226 -0
  193. package/src/vector/svg.ts +222 -0
  194. package/src/vector/svg.types.ts +4 -0
  195. package/src/vector/svgElements.ts +58 -0
  196. package/src/vector/svgKey.d.mts +4 -0
  197. package/src/vector/svgKey.mjs +16 -0
  198. package/src/vector/svgPath.ts +157 -0
  199. package/src/vector/svgPixels.ts +133 -0
  200. package/tsconfig.consumer.json +29 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,318 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0-preview.1]
4
+
5
+ - Keep item content mounted through internal FlatList window updates. Parent renders, updated data, callbacks and extraData still refresh item content.
6
+
7
+ - Reuse committed placement branches and submit the affected native nodes on
8
+ stable React trees. Validate inherited presentation settings, geometry and
9
+ font readiness before reuse. The full placement and submission paths handle
10
+ structure changes, cross-node accessibility and unsupported node shapes.
11
+ - Add a standalone catalog with packaged artwork, virtualized rows, modal
12
+ navigation, and restoration of the originating card and scroll position.
13
+ Document physical sideloading, debugging and checksum-based rollback.
14
+ - Retain SDK memory diagnostics when a counter is a BigInt. The generated
15
+ logger writes those values as exact decimal strings.
16
+ - Draw text in explicit tight line boxes while retaining the authored Yoga
17
+ height and wrapped text.
18
+ - Keep Back with the presented Modal when an inner dialog isolates accessibility.
19
+
20
+ - Keep repeated web-runtime cleanup from retiring a later host's ownership,
21
+ while allowing failed cleanup to be retried. Accept native Canvas image
22
+ source types in the Node adapter and check the real decoder in a typed consumer.
23
+
24
+ - Share one application lifetime between registered and custom mounts, with
25
+ lazy content/setup, fenced callbacks, shared async disposal and independent
26
+ cleanup after failure. Preserve original startup errors and retire web-global
27
+ leases out of order without overwriting another host.
28
+ - Add injected, bounded preview font leases and attached-text observations,
29
+ plus the explicit `/testing/node` text HTTP/image-source adapter boundary.
30
+ Independent packed consumers cover lifetime/resource retirement and actual
31
+ local sockets; runtime graphs exclude Node qualification IO.
32
+
33
+ - Correct collection alignment to use declared item lengths, retire removed
34
+ header geometry, and preserve the actual footer/inset offset across repeated
35
+ End requests. Defer initial indices until newly arrived data is committed.
36
+ Fixed-seed geometry/input replay and minimized packed-consumer cases cover
37
+ these transitions and explicit-command supersession.
38
+
39
+ - Resolve direct committed ARIA description relationships separately from names,
40
+ with ordered IDs, native-hint fallback, valid empty descriptions, source
41
+ replacement and bounded modal/live publication. Qualify host and independent
42
+ packed behavior; browser hidden-reference semantics remain distinct.
43
+
44
+ - Keep NativeWind focus-styled TextInput mounting inside its input owner by
45
+ omitting the pinned engine's synthetic no-op press callback for that component.
46
+ Preserve authored events, other component paths and non-Roku transformers.
47
+ Independent Metro Node/Hermes and SDK checks cover the styled field.
48
+
49
+ - Release failed text-preparation cohorts immediately and fence late raster
50
+ leases without disturbing committed successors. Observe every started font
51
+ and raster promise even when a later synchronous error prevents the normal
52
+ join. Preserve the original error and exercise bounded-cache recovery through
53
+ an independent packed consumer.
54
+
55
+ - Isolate Image load state by its source/recycling tuple, reject cross-generation
56
+ readiness and stop public callbacks after reentrant retirement. Release Canvas
57
+ Poster/mask decoder references on replacement, clearing and disposal. Packed
58
+ callbacks and actual browser decode/failure/recovery/pixels pass; device
59
+ raster display and ordering remain pending.
60
+
61
+ - Deliver FlatList separator highlight/unhighlight and leading/trailing prop
62
+ updates through mounted keyed row controllers. Match upstream item metadata,
63
+ shared grid-row controllers and element pass-through; retire saved callbacks
64
+ when a cell leaves. Packed consumers and visible Canvas highlight/restoration
65
+ checks keep the host behavior distinct from device qualification.
66
+
67
+ - Virtualize single-axis horizontal FlatList lanes with variable widths,
68
+ x-aligned scrolling, boundaries/insets and bounded retirement. Apply keyed
69
+ anchor replacement before reconciling the new window. Packed large-list and
70
+ visible SDK/Canvas fixtures pass; axis changes require remount, horizontal
71
+ grids stay unsupported, and native scrolling/focus remain pending.
72
+
73
+ - Route modal Back through committed exposure so nested parent effects cannot
74
+ intercept their child's Back. Retain closing/reversal ownership and fence
75
+ retired route portals, animation completions and held input. Physical remote
76
+ and focus behavior remain device-pending.
77
+
78
+ - Add fixed-height vertical FlatList columns with original item callback indices,
79
+ upstream row-index geometry/scrolling, row styles/separators, keyed lifetime
80
+ rules and complete bounded windows. Reject horizontal grids and column-prop
81
+ changes without remount. Exercise 30,001-item packed consumers and a visible
82
+ SDK/Canvas fixture; native scrolling, focus and performance remain pending.
83
+
84
+ - Parse ARIA label ID lists with HTML whitespace while retaining explicit native
85
+ alias IDs. Resolve committed label relationships after modal exposure, without
86
+ tree-order-dependent chaining; retain reference order, repeated references,
87
+ missing-source fallback and replacement cleanup. Native speech/traversal and
88
+ the complete HTML accessible-name algorithm remain outside this host subset.
89
+
90
+ - Preserve primary interruption diagnostics and the caller's SIGTERM handler
91
+ when process cleanup raises; keep failed inputs and propagate cleanup errors.
92
+ Permit explicitly authorized workspace retained ceilings through 80 GiB total,
93
+ preserving the other limits and conservative defaults for unconfigured stores.
94
+
95
+ - Cancel held JS input and pending background focus when an external editor is
96
+ admitted, preserving a newer reentrant focus attempt. Exercise the real SDK
97
+ revision/close protocol through mounted React inputs with controlled edits,
98
+ queued successors, missing acknowledgements and complete cleanup. Native
99
+ keyboard focus and physical remote delivery remain unqualified.
100
+
101
+ - Reuse settled Yoga geometry for equivalent React commits and declarative
102
+ opacity-only updates, retaining React effects, current handlers, native writes
103
+ and complete retirement. Changed layout, async fonts, complex inline/raster
104
+ text and explicit native refresh keep the full layout path. The current host
105
+ benchmark accepts explicit consumer inputs and distinguishes structural work
106
+ from uninstrumented Mac timing; firmware performance remains unqualified.
107
+
108
+ - Persist approved workspace qualification policies with store-bound provenance,
109
+ complete recovery-headroom admission and real inherited-owner validation.
110
+ Other stores retain conservative defaults.
111
+
112
+ - Preserve authored ARIA current/invalid/popup state, heading levels,
113
+ orientation and role descriptions in committed host semantics and English
114
+ Audio Guide requests. Reconcile focused/live updates, token fallbacks,
115
+ descriptor removal and retirement without exposing secure field values or
116
+ adding native SceneGraph fields. Native traversal/actions/speech still need
117
+ separate qualification.
118
+
119
+ - Deliver observed editor selections through `TextInput.onSelectionChange`.
120
+ Native dialog carets use text prefixes for UTF-16 conversion; Canvas reports
121
+ actual ranges and caret-only movement. Replays, controlled corrections,
122
+ reentrant callbacks and subscription retirement keep their original request
123
+ lifetime. Native ranges, programmatic selection and firmware behavior remain
124
+ unqualified.
125
+
126
+ - Publish observed modal text edits through ordinary `TextInput.onChangeText`
127
+ before submission. Reconcile controlled formatting/rejection without reopening,
128
+ suppress programmatic echoes and duplicate accepted-value changes, preserve
129
+ already observed edits on Cancel, and fence reentrant/retired subscriptions.
130
+ SDK and Canvas ports share the optional `TextEntrySession.subscribeText`
131
+ contract; native keyboard and voice behavior remain device-pending.
132
+
133
+ - Fence animation admission, sampling and publications across reentrant
134
+ cancellation/listener callbacks. A replacement owns one clock, canceled
135
+ samples cannot overwrite it, and nested publications cannot deliver stale
136
+ values afterward. Reconcile derived-value closures after React commits,
137
+ replace conditional subscriptions, preserve inline timing clocks and retire
138
+ mapper work before cancellation callbacks.
139
+
140
+ - Bound local qualification storage and retire verified temporary environments.
141
+ Count explicitly tracked reuse inputs and stable generated outputs in the
142
+ cumulative budget as well as fresh cohort directories.
143
+ Retire unused per-lane dependency caches after exact-archive proofs, retaining
144
+ source inventories, complete generated trees and the SDK/browser dependency.
145
+
146
+ - Update active modal text drafts for controlled value changes and imperative
147
+ edits without reopening or fabricating input events. Fence submissions that
148
+ race a native update using editor revisions; keep old ports' missing update
149
+ capability explicit. Native editing behavior remains unqualified.
150
+
151
+ - Serialize secure strings in a nonempty versioned encrypted envelope, preserving
152
+ empty values and escaped UTF-16 surrogates while retaining legacy credential
153
+ reads and fail-closed native-decryption handling. Native protection and durable
154
+ device behavior remain unqualified.
155
+
156
+ - Batch offscreen keyed collection rows with explicit limits, intervals and
157
+ interaction-aware cancellation, retaining visible priority and native identity.
158
+ Apply declared initial indices after header/inset measurement and respect the
159
+ minimum eligible visible anchor index. Native scrolling/performance remain
160
+ unqualified.
161
+
162
+ - Add focused modal `Keyboard.dismiss` and observed `keyboardDidHide`, preserving
163
+ submission ordering and fencing replacement, reentrant focus and retired roots.
164
+ Separate SDK logical cancellation from native close acknowledgement, bound
165
+ missing acknowledgements, and add a reusable Canvas text-entry port to the
166
+ default preview. Keyboard geometry/will/show events and firmware remain outside
167
+ the qualified subset.
168
+
169
+ - Add object-handle accessibility focus requests, route tag/ref requests to their
170
+ owning root and retain TextInput host aliases through native-ID replacement.
171
+ Preserve visibility, modal, delayed-commit and retired-reference fences.
172
+ - Retain explicit View/Text focus admission and announce toggle pressed states
173
+ through the common accessibility semantics on observed focus and updates.
174
+
175
+ - Add public Metro browser Fast Refresh sessions, static update chunks, original
176
+ patch source maps and a reusable project development server. Preserve safe
177
+ component state, recover from module/render/build errors, reload for unsafe
178
+ lifetimes and retire the runtime with its host. Add a sixth independent packed
179
+ consumer lane; native stateful hot reload remains unqualified.
180
+
181
+ - Own static raster compilation, embedded URI registration, Metro density/cache
182
+ restoration and SDK image imports in the public build package; use the same
183
+ prepared image bytes in default SDK and browser builders.
184
+ - Return source/dependency metadata for the actual Metro output chunks, retain
185
+ configured serializer hooks, and reject invalid JavaScript factories before
186
+ publishing any frontend files.
187
+ - Return Metro's complete asset inventory, including density variants and
188
+ asset-plugin metadata, for consumer-owned image compilation and SDK imports.
189
+ - Select one React/JSX entry implementation before Metro dependency collection
190
+ in either profile, retaining source offsets and rejecting changed wrappers.
191
+ - Qualify fresh Metro CLI setup, types/doctor, actual SDK output and browser
192
+ edit/error/fix/reload/activation through the shared browser journey; include
193
+ both Metro lanes in local full and exact-archive candidate qualification.
194
+ - Add `init --bundler=metro`, the optional Metro project/SDK path and public
195
+ `buildRokuMetroModules`; preserve module order/cache and source maps, prepare
196
+ complete Intl data before file-map scanning, and bound SDK code modules.
197
+ - Add an optional Metro Babel transformer using the common Hermes-safe Yoga and
198
+ NativeWind preparation, immutable input snapshots and dependency-aware cache
199
+ keys; preserve other platforms and the application's configured transformer.
200
+ Add a separate independent archive/Metro/SDK qualification command.
201
+ - Describe production/development compilation profiles in the public project
202
+ builder and environment types, including prepared and SDK build results.
203
+ - Retain bounded native video error codes and structured categories; publish
204
+ late details separately from the single failure edge, omit raw diagnostics,
205
+ and fence callbacks from retired content.
206
+ - Navigate renderer-owned directional edges using committed transformed bounds,
207
+ preserving explicit semantic links/stops, input ownership and modal fences.
208
+ - Resolve explicit logical font families and static normal/italic weights to
209
+ physical assets in the shared metrics, Label and raster resource owner and
210
+ public SDK/browser builders; reject unavailable synthetic styling.
211
+ - Add an explicit tabular-number font profile using the font's actual single-glyph
212
+ OpenType substitutions, renamed assets and common label/raster face selection.
213
+ - Keep non-touch TV focus independent of pointerEvents and accessibility
214
+ exclusion; retain explicit modal, disabled and display-none input fences.
215
+ - Resolve absolute inset, axis and edge aliases with explicit-side precedence,
216
+ percentage geometry and negative overflow in the admitted LTR layout.
217
+ - Revalidate delayed focus after modal dismissal against the committed tree;
218
+ reject hidden targets and cancel held presses across visibility/modal changes.
219
+ - Add opt-in development root StrictMode replay, fence replayed ref/tag focus
220
+ requests, suppress replay-only modal dismissal, and order nested modal
221
+ isolation by native hierarchy.
222
+ - Add ordinary native-ref `focus()` and tag-based accessibility focus requests;
223
+ fence retired refs and delayed measurements/requests across same-ID replacement.
224
+ - Keep TextInput handles stable and cancel/fence dialog work on background and
225
+ replacement, including requests made through a retained old handle.
226
+ - Normalize primitive accessibility roles, RN/ARIA state/value/label aliases,
227
+ hints and labelled-by text into committed host semantics; announce observed
228
+ focus and live updates through Audio Guide. Retain English/native-review limits.
229
+ - Isolate modal accessibility and background input through animated retirement.
230
+
231
+ Public releases are immutable. Before 1.0, breaking public contracts require a
232
+ minor-version change. New adapters and changes to supported versions require
233
+ updated compatibility evidence. See [maintenance](docs/maintenance.md).
234
+
235
+ ## [0.2.0]
236
+
237
+ First developer preview under MIT.
238
+
239
+ - Replay queued directional input before Select and activate the destination
240
+ after native focus is observed. Imperative focus changes still fence input.
241
+ - Reuse solved geometry for fixed-size plain labels that supplied no intrinsic
242
+ measurement. Apply current text normally. Reuse unchanged native fields while
243
+ preserving event subscriptions, child order and activation writes.
244
+ - Build an independent app from the included initializer. Release preparation
245
+ seals the exact archive for staging under the `preview` dist-tag.
246
+
247
+ - Admit native focus before fencing remote input. Refused disabled, hidden or
248
+ modal-isolated requests preserve another control's held press and earlier
249
+ eligible requests. Retire pending fences when their target becomes ineligible,
250
+ preserve reentrant focus ordering and disable native focus outside a modal.
251
+
252
+ - Capture and bubble observed focus/blur through committed View and ScrollView
253
+ ancestors. Events retain measurable target/currentTarget instances and support
254
+ propagation cancellation. Focus requests remain separate from observations;
255
+ portalled modal focus does not enter background scroll ancestors. Authored empty
256
+ native IDs retain their place in the observation path.
257
+ - Lay out wrapped nested Text through measured attributed runs and retained
258
+ one-line native styled labels. Preserve colors/fonts, explicit blank lines,
259
+ authored line heights and tail ellipsis; retire removed lines on resize or
260
+ ancestor removal. Tracked/shadowed mixed paragraphs and device fidelity remain
261
+ outside this qualified subset.
262
+
263
+ - Add explicit production/development compilation profiles.
264
+ Finite builds now default to production React; previews default to development.
265
+ Development SDK artifacts have independent paths and ZIPs record their profile.
266
+ - Execute Modal fade/slide transitions through the shared JavaScript animation
267
+ executor, retaining portal/Back ownership through close and cancelling stale
268
+ completions when reopened or unmounted. Physical presentation remains pending.
269
+ - Export the portable text-fetch factory and request/response/redirect types.
270
+ Verified transports can explicitly admit strict redirect refusal; the pinned
271
+ SDK port still rejects it before IO. Preserve cloned policy, strip fragments
272
+ and reject redirect results defensively without treating that as hop proof.
273
+ - Add the nonvisual `SceneGraphAudio` resource through `/media`, with explicit
274
+ stream formats, observed state/position/duration/codec/error fields, paused
275
+ seeking and stop-before-removal cleanup. Playback rate and fractional volume
276
+ are outside this native subset; physical decoding remains unqualified.
277
+ - Keep small frontends in one build and retire abandoned partition-attempt
278
+ outputs without touching caller-owned files or buffered builds.
279
+ - Support collection separators and extraData invalidation while preserving
280
+ retained native rows for clipping hints. Correct immediate scroll-to-end when
281
+ measured tail rows replace estimated geometry.
282
+ - Add opt-in English Intl bootstrap for number/currency/compact formatting,
283
+ calendar/time-zone formatting, locale canonicalization and collation through
284
+ pinned FormatJS packages. Configure the polyfill from observed device time zone.
285
+ - Load fallback calendar/collation data only when needed, avoiding large table
286
+ decoding on hosts with working native Intl while preserving the full fallback.
287
+ - Retire SDK HTTP abort listeners even when firmware never completes a cancelled
288
+ operation or its native abort callback throws; native IO remains device-pending.
289
+ - Preserve `Request` credentials/redirect policies through cloning and reject
290
+ unsupported policies and embedded URL credentials before network dispatch.
291
+ - Admit `View.collapsable` while preserving native group identity and measurement
292
+ for both values; layout-only view removal is not performed.
293
+ - Admit text entry through a scoped native StandardKeyboardDialog port, with
294
+ explicit submit/cancel, masked input, bounded length and late-result fencing.
295
+ - Add normalized-history `router.dismissTo`, provider-bound navigation hooks and
296
+ safe retirement when multiple router providers unmount out of order.
297
+ - Keep canonical path parameters isolated from conflicting query values and
298
+ snapshot array parameters without retaining mutable caller-owned arrays.
299
+
300
+ ## [0.1.0]
301
+
302
+ Unpublished experimental beta. No public license has been selected.
303
+
304
+ - Extract React/SceneGraph rendering, layout, input, services and build adapters.
305
+ - Add a standalone generator, AppRegistry entry, SDK build and Canvas development loop.
306
+ - Qualify packed independent consumers and their component/library contracts.
307
+ - Add compatibility inventory, toolchain checks, release preparation and development cleanup.
308
+ - Emit build identity and native ready/memory/error diagnostics from generated SDK startup.
309
+ - Add connected cold-start collection with stale-build, runtime-error and foreground guards.
310
+ - Honor configured native application/storage names and clean up failed development startup.
311
+ - Use explicit pnpm script invocation for the application doctor.
312
+ - Keep offline SDK startup independent of missing firmware fetch metadata; fence
313
+ unsupported cancellation, normalize native response headers and reject late aborted bodies.
314
+ - Detect atomic configuration replacements through file metadata and watch inputs
315
+ before cold compilation so startup edits cannot be missed.
316
+
317
+ Hardware qualification, complete upstream API coverage, full Metro-to-SDK
318
+ integration and state-preserving Fast Refresh remain open.
@@ -0,0 +1,34 @@
1
+ # Contributing and maintaining compatibility
2
+
3
+ The project uses the [MIT License](LICENSE). See [maintenance](docs/maintenance.md)
4
+ for release qualification and the owner approval step.
5
+
6
+ Use the pinned Node/pnpm versions and run `pnpm check`. That command validates
7
+ runtime and SDK types, host/build contracts, package hygiene, an independent
8
+ packed React consumer, a complete independent SDK example build, and a fresh
9
+ headless-browser edit/reload/error/recovery journey. Set `ROKU_TEST_CHROMIUM`
10
+ when Chrome/Chromium is not installed in a standard location. Examples
11
+ must not import a larger application's source or depend on its configuration.
12
+ Run the public fixtures against the packed package.
13
+
14
+ A change to a public prop, library adapter or device service should carry a
15
+ behavioral contract for the affected API, including cleanup/failure behavior.
16
+ Mark unsupported operations explicitly. Keep product routes, data/query policy,
17
+ focus topology, server behavior and feature composition out of this package.
18
+ Native code owns mechanics; applications own their product decisions.
19
+
20
+ The public alias manifest owns resolution; the public TypeScript config is
21
+ checked against it. Keep generic compatibility transforms in the package's build
22
+ plugin. Do not repair consumers by editing installed dependencies or creating
23
+ source-tree symlinks. Pinned upstream-source corrections must reject drift.
24
+
25
+ Treat React/reconciler and SDK versions as coordinated compatibility boundaries.
26
+ Before releasing a version, run package qualification and consuming-app tests,
27
+ then device qualification for rendering, input/focus, fonts, networking/storage,
28
+ video and sustained resource/performance behavior. CLI/Canvas success is not a
29
+ device claim. The old upstream Hermes CLI's Intl failure remains an explicit
30
+ partial result until the actual target runtime is qualified.
31
+
32
+ Publish immutable versions from the reviewed public source revision. During local development, consumers
33
+ can install content-addressed tarballs. No build/check command commits, pushes,
34
+ publishes or installs a channel.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Alexander Keith
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE.md ADDED
@@ -0,0 +1,10 @@
1
+ # Notices
2
+
3
+ The authored react-native-roku implementation is distributed under the MIT
4
+ License. See [LICENSE](LICENSE). Dependencies retain their own licenses and
5
+ notices and are installed separately.
6
+
7
+ The optional English Intl bootstrap uses FormatJS packages and their Unicode
8
+ and CLDR data. Their dependency licenses and data notices remain applicable.
9
+ The starter uses Inter through its font dependency. Preserve the font
10
+ distribution notices when redistributing a generated channel with those fonts.
package/README.md CHANGED
@@ -1,3 +1,67 @@
1
- # Temporary Holding Version
1
+ # react-native-roku
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Experimental, source-distributed React Native-compatible host for Roku SceneGraph
4
+ (RSG 2.0 / Roku SDK 2.19.1). It renders React 19.2.8 through a custom reconciler,
5
+ Yoga layout, native text metrics, and explicit platform adapters. It is not a
6
+ complete React Native implementation.
7
+
8
+ ## Create your first Roku app
9
+
10
+ Use Node 24.18.1 and pnpm 11.23.0. The preview starter includes a counter and a virtualized catalog you can navigate with a remote.
11
+
12
+ ```sh
13
+ npx --yes react-native-roku@preview init my-roku-app
14
+ cd my-roku-app
15
+ pnpm install
16
+ pnpm run doctor
17
+ pnpm dev
18
+ ```
19
+
20
+ Edit `src/App.tsx` in the browser preview. Stop the preview and run `pnpm build` to create `dist/roku-app.zip` for a Roku in developer mode. Follow the [device setup and sideload guide](docs/getting-started.md).
21
+
22
+ ## What the preview supports
23
+
24
+ The [compatibility matrix](docs/compatibility.md) lists supported React Native APIs and platform differences. Physical navigation testing covers the Roku Ultra 4850X. Performance on lower-tier hardware, long-session memory behavior, and spoken screen-reader output need further testing.
25
+
26
+ The public `rokuPlugin` from `react-native-roku/build/esbuild` owns platform
27
+ resolution and pinned compatibility transforms. React code can extend
28
+ `react-native-roku/tsconfig`; SDK code uses `createRokuHost` from
29
+ `react-native-roku/sdk-host`. A normal app supplies `src/App.tsx` and `roku.config.json`. The CLI generates
30
+ SDK anchors, Scene/Main files and native helpers under `.roku/`; application
31
+ code keeps ordinary React and supported `react-native` imports. Advanced
32
+ consumers can retain their existing build pipeline through the public host and
33
+ configuration helpers.
34
+
35
+ Use `pnpm dev` for the Canvas watch/reload preview, `pnpm run doctor` for readiness,
36
+ and `pnpm build` for a finite SDK ZIP build. This development loop reloads the
37
+ page after successful compilation; it does not preserve React state through
38
+ Fast Refresh. `react-native-roku/metro` also supplies a target-scoped resolver
39
+ adapter for existing Metro configurations. The separate Metro lanes cover
40
+ packaged builds, browser reload and browser Fast Refresh. Native device
41
+ updates require another build and sideload.
42
+
43
+ ## Develop
44
+
45
+ Use Node 24.18.1 and pnpm 11.23.0:
46
+
47
+ ```sh
48
+ pnpm setup:repo
49
+ pnpm check:fast
50
+ pnpm check
51
+ ```
52
+
53
+ `pnpm check` runs both TypeScript boundaries, runtime/build tests, package hygiene,
54
+ and an independent consumer installed from the actual tarball. The consumer runs
55
+ outside this repository and imports only public exports.
56
+
57
+ `pnpm check` includes both packed consumers, the official SDK build and a real
58
+ headless-browser edit/error/recovery loop. The
59
+ complete example's source has no imports from a consuming application.
60
+ See [compatibility](docs/compatibility.md) and [contribution guidance](CONTRIBUTING.md)
61
+ for the bounded support contract and release gates.
62
+
63
+ See [maintenance](docs/maintenance.md) for the executable compatibility register,
64
+ CI, packed consumer updates, development cleanup, device capture and
65
+ release preparation. This developer preview uses the [MIT License](LICENSE).
66
+
67
+ See the [standalone test guide](docs/standalone-testing.md) for device setup and coverage. The [full-title Solid benchmark and measured Ultra example](https://github.com/react-native-roku/react-native-roku/blob/HEAD/benchmarks/navigation/README.md#reproduce-the-full-title-solid-scorecard) include matched inputs, per-launch tails and same-build variation.
@@ -0,0 +1,91 @@
1
+ #!/usr/bin/env node
2
+ import { existsSync, readFileSync, writeFileSync, cpSync, rmSync } from "node:fs";
3
+ import { resolve, basename, relative, join } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+ import { supportedNode, toolchain, rokuBuildProfile } from "../build/environment.mjs";
6
+ if (!supportedNode())
7
+ throw Error(`Use Node >=${toolchain.node.minimum} <25 before running react-native-roku`);
8
+
9
+ const [command, destination, ...options] = process.argv.slice(2);
10
+ if (command === "--help" || !command) {
11
+ console.log(
12
+ "Usage: react-native-roku <init|dev|build|doctor>\ninit <new-directory> [--package=<version-or-file:archive>] [--bundler=esbuild|metro]\nbuild|dev [--profile=production|development]\nBuild defaults to production React; dev defaults to development. Neither installs or deploys a channel.",
13
+ );
14
+ } else if (["build", "dev", "doctor"].includes(command)) {
15
+ const flags = [destination, ...options].filter((value) => value !== undefined);
16
+ if (
17
+ command === "doctor"
18
+ ? flags.length
19
+ : flags.length > 1 || flags.some((value) => !value.startsWith("--profile="))
20
+ )
21
+ throw Error("This command accepts only --profile=production|development on build/dev");
22
+ const profile = rokuBuildProfile(
23
+ flags[0]?.slice(10) ?? (command === "dev" ? "development" : "production"),
24
+ ).name;
25
+ const api = await import("../build/project.mjs");
26
+ if (command === "doctor") {
27
+ const result = api.doctorRokuProject();
28
+ console.log(JSON.stringify(result, null, 2));
29
+ if (result.status !== "passed") process.exitCode = 1;
30
+ } else if (command === "build")
31
+ console.log(JSON.stringify(await api.buildRokuProject(process.cwd(), { profile })));
32
+ else await api.devRokuProject(process.cwd(), { profile });
33
+ } else {
34
+ if (
35
+ command !== "init" ||
36
+ !destination ||
37
+ options.some((value) => !value.startsWith("--package=") && !value.startsWith("--bundler=")) ||
38
+ options.length > 2 ||
39
+ new Set(options.map((value) => value.split("=")[0])).size !== options.length
40
+ )
41
+ throw Error(
42
+ "Usage: react-native-roku init <new-directory> [--package=<version-or-file:archive>] [--bundler=esbuild|metro]",
43
+ );
44
+ const target = resolve(destination);
45
+ if (existsSync(target)) throw Error("The destination already exists; choose a new directory.");
46
+ const root = fileURLToPath(new URL("../", import.meta.url));
47
+ const version = JSON.parse(readFileSync(resolve(root, "package.json"))).version;
48
+ const packageSpecifier =
49
+ options.find((value) => value.startsWith("--package="))?.slice("--package=".length) ?? version;
50
+ const bundler =
51
+ options.find((value) => value.startsWith("--bundler="))?.slice("--bundler=".length) ??
52
+ "esbuild";
53
+ if (!["esbuild", "metro"].includes(bundler)) throw Error("Choose Roku bundler esbuild or metro");
54
+ if (!packageSpecifier.trim()) throw Error("The package specifier must not be empty.");
55
+ const starter = resolve(root, "examples/hello-roku");
56
+ const excluded = new Set(["node_modules", "dist", ".roku", join("src", "generated")]);
57
+ cpSync(starter, target, {
58
+ recursive: true,
59
+ errorOnExist: true,
60
+ force: false,
61
+ filter: (path) => !excluded.has(relative(starter, path)),
62
+ });
63
+ const template = resolve(target, "package.template.json");
64
+ const manifest = JSON.parse(readFileSync(template));
65
+ manifest.name =
66
+ basename(target)
67
+ .toLowerCase()
68
+ .replace(/[^a-z0-9-]+/g, "-")
69
+ .replace(/^-+|-+$/g, "") || "roku-app";
70
+ manifest.dependencies["react-native-roku"] = packageSpecifier;
71
+ if (bundler === "metro") {
72
+ Object.assign(manifest.devDependencies, toolchain.optionalPackages.metro);
73
+ const configPath = resolve(target, "roku.config.json");
74
+ const config = JSON.parse(readFileSync(configPath));
75
+ config.bundler = "metro";
76
+ writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n");
77
+ writeFileSync(
78
+ resolve(target, "babel.config.cjs"),
79
+ 'module.exports={presets:["@react-native/babel-preset"]};\n',
80
+ );
81
+ }
82
+ writeFileSync(resolve(target, "package.json"), JSON.stringify(manifest, null, 2) + "\n");
83
+ rmSync(template);
84
+ rmSync(resolve(target, ".npmignore"), { force: true });
85
+ // Generated projects own their manifest and lockfile.
86
+ writeFileSync(resolve(target, ".gitignore"), "node_modules/\n.roku/\ndist/\n");
87
+ writeFileSync(resolve(target, ".node-version"), toolchain.node.minimum + "\n");
88
+ console.log(
89
+ `Created ${target}\nNext: cd ${JSON.stringify(target)}, pnpm install, pnpm typecheck, pnpm build.\nNative behavior requires a Roku device; this command performs no install or deployment.`,
90
+ );
91
+ }