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

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 +328 -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 +368 -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,328 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0-preview.3]
4
+
5
+ - Verify the uploaded release artifact by its ID and checksum before staging the
6
+ preview under the default npm tag.
7
+
8
+ ## [0.2.0-preview.2]
9
+
10
+ - Publish approved previews under the default npm tag. The starter instructions
11
+ use `@latest` to select the current release.
12
+
13
+ ## [0.2.0-preview.1]
14
+
15
+ - Keep item content mounted through internal FlatList window updates. Parent renders, updated data, callbacks and extraData still refresh item content.
16
+
17
+ - Reuse committed placement branches and submit the affected native nodes on
18
+ stable React trees. Validate inherited presentation settings, geometry and
19
+ font readiness before reuse. The full placement and submission paths handle
20
+ structure changes, cross-node accessibility and unsupported node shapes.
21
+ - Add a standalone catalog with packaged artwork, virtualized rows, modal
22
+ navigation, and restoration of the originating card and scroll position.
23
+ Document physical sideloading, debugging and checksum-based rollback.
24
+ - Retain SDK memory diagnostics when a counter is a BigInt. The generated
25
+ logger writes those values as exact decimal strings.
26
+ - Draw text in explicit tight line boxes while retaining the authored Yoga
27
+ height and wrapped text.
28
+ - Keep Back with the presented Modal when an inner dialog isolates accessibility.
29
+
30
+ - Keep repeated web-runtime cleanup from retiring a later host's ownership,
31
+ while allowing failed cleanup to be retried. Accept native Canvas image
32
+ source types in the Node adapter and check the real decoder in a typed consumer.
33
+
34
+ - Share one application lifetime between registered and custom mounts, with
35
+ lazy content/setup, fenced callbacks, shared async disposal and independent
36
+ cleanup after failure. Preserve original startup errors and retire web-global
37
+ leases out of order without overwriting another host.
38
+ - Add injected, bounded preview font leases and attached-text observations,
39
+ plus the explicit `/testing/node` text HTTP/image-source adapter boundary.
40
+ Independent packed consumers cover lifetime/resource retirement and actual
41
+ local sockets; runtime graphs exclude Node qualification IO.
42
+
43
+ - Correct collection alignment to use declared item lengths, retire removed
44
+ header geometry, and preserve the actual footer/inset offset across repeated
45
+ End requests. Defer initial indices until newly arrived data is committed.
46
+ Fixed-seed geometry/input replay and minimized packed-consumer cases cover
47
+ these transitions and explicit-command supersession.
48
+
49
+ - Resolve direct committed ARIA description relationships separately from names,
50
+ with ordered IDs, native-hint fallback, valid empty descriptions, source
51
+ replacement and bounded modal/live publication. Qualify host and independent
52
+ packed behavior; browser hidden-reference semantics remain distinct.
53
+
54
+ - Keep NativeWind focus-styled TextInput mounting inside its input owner by
55
+ omitting the pinned engine's synthetic no-op press callback for that component.
56
+ Preserve authored events, other component paths and non-Roku transformers.
57
+ Independent Metro Node/Hermes and SDK checks cover the styled field.
58
+
59
+ - Release failed text-preparation cohorts immediately and fence late raster
60
+ leases without disturbing committed successors. Observe every started font
61
+ and raster promise even when a later synchronous error prevents the normal
62
+ join. Preserve the original error and exercise bounded-cache recovery through
63
+ an independent packed consumer.
64
+
65
+ - Isolate Image load state by its source/recycling tuple, reject cross-generation
66
+ readiness and stop public callbacks after reentrant retirement. Release Canvas
67
+ Poster/mask decoder references on replacement, clearing and disposal. Packed
68
+ callbacks and actual browser decode/failure/recovery/pixels pass; device
69
+ raster display and ordering remain pending.
70
+
71
+ - Deliver FlatList separator highlight/unhighlight and leading/trailing prop
72
+ updates through mounted keyed row controllers. Match upstream item metadata,
73
+ shared grid-row controllers and element pass-through; retire saved callbacks
74
+ when a cell leaves. Packed consumers and visible Canvas highlight/restoration
75
+ checks keep the host behavior distinct from device qualification.
76
+
77
+ - Virtualize single-axis horizontal FlatList lanes with variable widths,
78
+ x-aligned scrolling, boundaries/insets and bounded retirement. Apply keyed
79
+ anchor replacement before reconciling the new window. Packed large-list and
80
+ visible SDK/Canvas fixtures pass; axis changes require remount, horizontal
81
+ grids stay unsupported, and native scrolling/focus remain pending.
82
+
83
+ - Route modal Back through committed exposure so nested parent effects cannot
84
+ intercept their child's Back. Retain closing/reversal ownership and fence
85
+ retired route portals, animation completions and held input. Physical remote
86
+ and focus behavior remain device-pending.
87
+
88
+ - Add fixed-height vertical FlatList columns with original item callback indices,
89
+ upstream row-index geometry/scrolling, row styles/separators, keyed lifetime
90
+ rules and complete bounded windows. Reject horizontal grids and column-prop
91
+ changes without remount. Exercise 30,001-item packed consumers and a visible
92
+ SDK/Canvas fixture; native scrolling, focus and performance remain pending.
93
+
94
+ - Parse ARIA label ID lists with HTML whitespace while retaining explicit native
95
+ alias IDs. Resolve committed label relationships after modal exposure, without
96
+ tree-order-dependent chaining; retain reference order, repeated references,
97
+ missing-source fallback and replacement cleanup. Native speech/traversal and
98
+ the complete HTML accessible-name algorithm remain outside this host subset.
99
+
100
+ - Preserve primary interruption diagnostics and the caller's SIGTERM handler
101
+ when process cleanup raises; keep failed inputs and propagate cleanup errors.
102
+ Permit explicitly authorized workspace retained ceilings through 80 GiB total,
103
+ preserving the other limits and conservative defaults for unconfigured stores.
104
+
105
+ - Cancel held JS input and pending background focus when an external editor is
106
+ admitted, preserving a newer reentrant focus attempt. Exercise the real SDK
107
+ revision/close protocol through mounted React inputs with controlled edits,
108
+ queued successors, missing acknowledgements and complete cleanup. Native
109
+ keyboard focus and physical remote delivery remain unqualified.
110
+
111
+ - Reuse settled Yoga geometry for equivalent React commits and declarative
112
+ opacity-only updates, retaining React effects, current handlers, native writes
113
+ and complete retirement. Changed layout, async fonts, complex inline/raster
114
+ text and explicit native refresh keep the full layout path. The current host
115
+ benchmark accepts explicit consumer inputs and distinguishes structural work
116
+ from uninstrumented Mac timing; firmware performance remains unqualified.
117
+
118
+ - Persist approved workspace qualification policies with store-bound provenance,
119
+ complete recovery-headroom admission and real inherited-owner validation.
120
+ Other stores retain conservative defaults.
121
+
122
+ - Preserve authored ARIA current/invalid/popup state, heading levels,
123
+ orientation and role descriptions in committed host semantics and English
124
+ Audio Guide requests. Reconcile focused/live updates, token fallbacks,
125
+ descriptor removal and retirement without exposing secure field values or
126
+ adding native SceneGraph fields. Native traversal/actions/speech still need
127
+ separate qualification.
128
+
129
+ - Deliver observed editor selections through `TextInput.onSelectionChange`.
130
+ Native dialog carets use text prefixes for UTF-16 conversion; Canvas reports
131
+ actual ranges and caret-only movement. Replays, controlled corrections,
132
+ reentrant callbacks and subscription retirement keep their original request
133
+ lifetime. Native ranges, programmatic selection and firmware behavior remain
134
+ unqualified.
135
+
136
+ - Publish observed modal text edits through ordinary `TextInput.onChangeText`
137
+ before submission. Reconcile controlled formatting/rejection without reopening,
138
+ suppress programmatic echoes and duplicate accepted-value changes, preserve
139
+ already observed edits on Cancel, and fence reentrant/retired subscriptions.
140
+ SDK and Canvas ports share the optional `TextEntrySession.subscribeText`
141
+ contract; native keyboard and voice behavior remain device-pending.
142
+
143
+ - Fence animation admission, sampling and publications across reentrant
144
+ cancellation/listener callbacks. A replacement owns one clock, canceled
145
+ samples cannot overwrite it, and nested publications cannot deliver stale
146
+ values afterward. Reconcile derived-value closures after React commits,
147
+ replace conditional subscriptions, preserve inline timing clocks and retire
148
+ mapper work before cancellation callbacks.
149
+
150
+ - Bound local qualification storage and retire verified temporary environments.
151
+ Count explicitly tracked reuse inputs and stable generated outputs in the
152
+ cumulative budget as well as fresh cohort directories.
153
+ Retire unused per-lane dependency caches after exact-archive proofs, retaining
154
+ source inventories, complete generated trees and the SDK/browser dependency.
155
+
156
+ - Update active modal text drafts for controlled value changes and imperative
157
+ edits without reopening or fabricating input events. Fence submissions that
158
+ race a native update using editor revisions; keep old ports' missing update
159
+ capability explicit. Native editing behavior remains unqualified.
160
+
161
+ - Serialize secure strings in a nonempty versioned encrypted envelope, preserving
162
+ empty values and escaped UTF-16 surrogates while retaining legacy credential
163
+ reads and fail-closed native-decryption handling. Native protection and durable
164
+ device behavior remain unqualified.
165
+
166
+ - Batch offscreen keyed collection rows with explicit limits, intervals and
167
+ interaction-aware cancellation, retaining visible priority and native identity.
168
+ Apply declared initial indices after header/inset measurement and respect the
169
+ minimum eligible visible anchor index. Native scrolling/performance remain
170
+ unqualified.
171
+
172
+ - Add focused modal `Keyboard.dismiss` and observed `keyboardDidHide`, preserving
173
+ submission ordering and fencing replacement, reentrant focus and retired roots.
174
+ Separate SDK logical cancellation from native close acknowledgement, bound
175
+ missing acknowledgements, and add a reusable Canvas text-entry port to the
176
+ default preview. Keyboard geometry/will/show events and firmware remain outside
177
+ the qualified subset.
178
+
179
+ - Add object-handle accessibility focus requests, route tag/ref requests to their
180
+ owning root and retain TextInput host aliases through native-ID replacement.
181
+ Preserve visibility, modal, delayed-commit and retired-reference fences.
182
+ - Retain explicit View/Text focus admission and announce toggle pressed states
183
+ through the common accessibility semantics on observed focus and updates.
184
+
185
+ - Add public Metro browser Fast Refresh sessions, static update chunks, original
186
+ patch source maps and a reusable project development server. Preserve safe
187
+ component state, recover from module/render/build errors, reload for unsafe
188
+ lifetimes and retire the runtime with its host. Add a sixth independent packed
189
+ consumer lane; native stateful hot reload remains unqualified.
190
+
191
+ - Own static raster compilation, embedded URI registration, Metro density/cache
192
+ restoration and SDK image imports in the public build package; use the same
193
+ prepared image bytes in default SDK and browser builders.
194
+ - Return source/dependency metadata for the actual Metro output chunks, retain
195
+ configured serializer hooks, and reject invalid JavaScript factories before
196
+ publishing any frontend files.
197
+ - Return Metro's complete asset inventory, including density variants and
198
+ asset-plugin metadata, for consumer-owned image compilation and SDK imports.
199
+ - Select one React/JSX entry implementation before Metro dependency collection
200
+ in either profile, retaining source offsets and rejecting changed wrappers.
201
+ - Qualify fresh Metro CLI setup, types/doctor, actual SDK output and browser
202
+ edit/error/fix/reload/activation through the shared browser journey; include
203
+ both Metro lanes in local full and exact-archive candidate qualification.
204
+ - Add `init --bundler=metro`, the optional Metro project/SDK path and public
205
+ `buildRokuMetroModules`; preserve module order/cache and source maps, prepare
206
+ complete Intl data before file-map scanning, and bound SDK code modules.
207
+ - Add an optional Metro Babel transformer using the common Hermes-safe Yoga and
208
+ NativeWind preparation, immutable input snapshots and dependency-aware cache
209
+ keys; preserve other platforms and the application's configured transformer.
210
+ Add a separate independent archive/Metro/SDK qualification command.
211
+ - Describe production/development compilation profiles in the public project
212
+ builder and environment types, including prepared and SDK build results.
213
+ - Retain bounded native video error codes and structured categories; publish
214
+ late details separately from the single failure edge, omit raw diagnostics,
215
+ and fence callbacks from retired content.
216
+ - Navigate renderer-owned directional edges using committed transformed bounds,
217
+ preserving explicit semantic links/stops, input ownership and modal fences.
218
+ - Resolve explicit logical font families and static normal/italic weights to
219
+ physical assets in the shared metrics, Label and raster resource owner and
220
+ public SDK/browser builders; reject unavailable synthetic styling.
221
+ - Add an explicit tabular-number font profile using the font's actual single-glyph
222
+ OpenType substitutions, renamed assets and common label/raster face selection.
223
+ - Keep non-touch TV focus independent of pointerEvents and accessibility
224
+ exclusion; retain explicit modal, disabled and display-none input fences.
225
+ - Resolve absolute inset, axis and edge aliases with explicit-side precedence,
226
+ percentage geometry and negative overflow in the admitted LTR layout.
227
+ - Revalidate delayed focus after modal dismissal against the committed tree;
228
+ reject hidden targets and cancel held presses across visibility/modal changes.
229
+ - Add opt-in development root StrictMode replay, fence replayed ref/tag focus
230
+ requests, suppress replay-only modal dismissal, and order nested modal
231
+ isolation by native hierarchy.
232
+ - Add ordinary native-ref `focus()` and tag-based accessibility focus requests;
233
+ fence retired refs and delayed measurements/requests across same-ID replacement.
234
+ - Keep TextInput handles stable and cancel/fence dialog work on background and
235
+ replacement, including requests made through a retained old handle.
236
+ - Normalize primitive accessibility roles, RN/ARIA state/value/label aliases,
237
+ hints and labelled-by text into committed host semantics; announce observed
238
+ focus and live updates through Audio Guide. Retain English/native-review limits.
239
+ - Isolate modal accessibility and background input through animated retirement.
240
+
241
+ Public releases are immutable. Before 1.0, breaking public contracts require a
242
+ minor-version change. New adapters and changes to supported versions require
243
+ updated compatibility evidence. See [maintenance](docs/maintenance.md).
244
+
245
+ ## [0.2.0]
246
+
247
+ First developer preview under MIT.
248
+
249
+ - Replay queued directional input before Select and activate the destination
250
+ after native focus is observed. Imperative focus changes still fence input.
251
+ - Reuse solved geometry for fixed-size plain labels that supplied no intrinsic
252
+ measurement. Apply current text normally. Reuse unchanged native fields while
253
+ preserving event subscriptions, child order and activation writes.
254
+ - Build an independent app from the included initializer. Release preparation
255
+ seals the exact archive for staging under the `preview` dist-tag.
256
+
257
+ - Admit native focus before fencing remote input. Refused disabled, hidden or
258
+ modal-isolated requests preserve another control's held press and earlier
259
+ eligible requests. Retire pending fences when their target becomes ineligible,
260
+ preserve reentrant focus ordering and disable native focus outside a modal.
261
+
262
+ - Capture and bubble observed focus/blur through committed View and ScrollView
263
+ ancestors. Events retain measurable target/currentTarget instances and support
264
+ propagation cancellation. Focus requests remain separate from observations;
265
+ portalled modal focus does not enter background scroll ancestors. Authored empty
266
+ native IDs retain their place in the observation path.
267
+ - Lay out wrapped nested Text through measured attributed runs and retained
268
+ one-line native styled labels. Preserve colors/fonts, explicit blank lines,
269
+ authored line heights and tail ellipsis; retire removed lines on resize or
270
+ ancestor removal. Tracked/shadowed mixed paragraphs and device fidelity remain
271
+ outside this qualified subset.
272
+
273
+ - Add explicit production/development compilation profiles.
274
+ Finite builds now default to production React; previews default to development.
275
+ Development SDK artifacts have independent paths and ZIPs record their profile.
276
+ - Execute Modal fade/slide transitions through the shared JavaScript animation
277
+ executor, retaining portal/Back ownership through close and cancelling stale
278
+ completions when reopened or unmounted. Physical presentation remains pending.
279
+ - Export the portable text-fetch factory and request/response/redirect types.
280
+ Verified transports can explicitly admit strict redirect refusal; the pinned
281
+ SDK port still rejects it before IO. Preserve cloned policy, strip fragments
282
+ and reject redirect results defensively without treating that as hop proof.
283
+ - Add the nonvisual `SceneGraphAudio` resource through `/media`, with explicit
284
+ stream formats, observed state/position/duration/codec/error fields, paused
285
+ seeking and stop-before-removal cleanup. Playback rate and fractional volume
286
+ are outside this native subset; physical decoding remains unqualified.
287
+ - Keep small frontends in one build and retire abandoned partition-attempt
288
+ outputs without touching caller-owned files or buffered builds.
289
+ - Support collection separators and extraData invalidation while preserving
290
+ retained native rows for clipping hints. Correct immediate scroll-to-end when
291
+ measured tail rows replace estimated geometry.
292
+ - Add opt-in English Intl bootstrap for number/currency/compact formatting,
293
+ calendar/time-zone formatting, locale canonicalization and collation through
294
+ pinned FormatJS packages. Configure the polyfill from observed device time zone.
295
+ - Load fallback calendar/collation data only when needed, avoiding large table
296
+ decoding on hosts with working native Intl while preserving the full fallback.
297
+ - Retire SDK HTTP abort listeners even when firmware never completes a cancelled
298
+ operation or its native abort callback throws; native IO remains device-pending.
299
+ - Preserve `Request` credentials/redirect policies through cloning and reject
300
+ unsupported policies and embedded URL credentials before network dispatch.
301
+ - Admit `View.collapsable` while preserving native group identity and measurement
302
+ for both values; layout-only view removal is not performed.
303
+ - Admit text entry through a scoped native StandardKeyboardDialog port, with
304
+ explicit submit/cancel, masked input, bounded length and late-result fencing.
305
+ - Add normalized-history `router.dismissTo`, provider-bound navigation hooks and
306
+ safe retirement when multiple router providers unmount out of order.
307
+ - Keep canonical path parameters isolated from conflicting query values and
308
+ snapshot array parameters without retaining mutable caller-owned arrays.
309
+
310
+ ## [0.1.0]
311
+
312
+ Unpublished experimental beta. No public license has been selected.
313
+
314
+ - Extract React/SceneGraph rendering, layout, input, services and build adapters.
315
+ - Add a standalone generator, AppRegistry entry, SDK build and Canvas development loop.
316
+ - Qualify packed independent consumers and their component/library contracts.
317
+ - Add compatibility inventory, toolchain checks, release preparation and development cleanup.
318
+ - Emit build identity and native ready/memory/error diagnostics from generated SDK startup.
319
+ - Add connected cold-start collection with stale-build, runtime-error and foreground guards.
320
+ - Honor configured native application/storage names and clean up failed development startup.
321
+ - Use explicit pnpm script invocation for the application doctor.
322
+ - Keep offline SDK startup independent of missing firmware fetch metadata; fence
323
+ unsupported cancellation, normalize native response headers and reject late aborted bodies.
324
+ - Detect atomic configuration replacements through file metadata and watch inputs
325
+ before cold compilation so startup edits cannot be missed.
326
+
327
+ Hardware qualification, complete upstream API coverage, full Metro-to-SDK
328
+ 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 default npm release includes previews. The starter includes a counter and a virtualized catalog you can navigate with a remote.
11
+
12
+ ```sh
13
+ npx --yes react-native-roku@latest 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
+ }