@octanejs/aria 0.0.46 → 0.0.47

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 (201) hide show
  1. package/README.md +7 -6
  2. package/UPSTREAM.md +58 -69
  3. package/package.json +11 -11
  4. package/src/calendar/useCalendarGrid.tsx +64 -62
  5. package/src/collections/Document.ts +3 -0
  6. package/src/color/useColorArea.tsx +95 -69
  7. package/src/color/useColorWheel.tsx +38 -37
  8. package/src/combobox/{useComboBox.ts → useComboBox.tsx} +239 -259
  9. package/src/components/ComboBox.ts +35 -2
  10. package/src/components/Dialog.ts +12 -1
  11. package/src/components/DropZone.tsx +3 -2
  12. package/src/components/FileTrigger.tsx +1 -0
  13. package/src/components/GridList.ts +11 -2
  14. package/src/components/ListBox.ts +1 -1
  15. package/src/components/Menu.ts +1 -0
  16. package/src/components/Meter.ts +3 -1
  17. package/src/components/Popover.ts +20 -8
  18. package/src/components/PreviewTrigger.tsx +101 -0
  19. package/src/components/ProgressBar.ts +10 -2
  20. package/src/components/Select.ts +1 -1
  21. package/src/components/Table.ts +26 -15
  22. package/src/components/TokenField.tsx +395 -0
  23. package/src/components/Tooltip.ts +4 -6
  24. package/src/components/Tree.ts +14 -7
  25. package/src/components/Virtualizer.tsx +30 -14
  26. package/src/components/index.ts +22 -0
  27. package/src/components/utils.ts +1 -1
  28. package/src/datepicker/useDateField.tsx +2 -11
  29. package/src/datepicker/useDatePickerGroup.tsx +44 -33
  30. package/src/datepicker/useDateSegment.tsx +31 -30
  31. package/src/dialog/useDialog.ts +8 -1
  32. package/src/dnd/DragManager.tsx +5 -1
  33. package/src/dnd/useDrag.tsx +2 -1
  34. package/src/focus/FocusScope.ts +2 -2
  35. package/src/grid/useGrid.ts +3 -0
  36. package/src/grid/{useGridCell.ts → useGridCell.tsx} +121 -64
  37. package/src/grid/utils.ts +1 -0
  38. package/src/gridlist/{useGridListItem.ts → useGridListItem.tsx} +152 -111
  39. package/src/index.ts +22 -0
  40. package/src/interactions/createEventHandler.ts +11 -8
  41. package/src/interactions/createKeyboardShortcutHandler.tsx +218 -0
  42. package/src/interactions/textSelection.ts +3 -3
  43. package/src/interactions/useContextMenu.tsx +125 -0
  44. package/src/interactions/useFocusVisible.ts +4 -4
  45. package/src/interactions/useKeyboard.ts +50 -2
  46. package/src/interactions/useLongPress.ts +33 -22
  47. package/src/interactions/useMove.ts +6 -6
  48. package/src/interactions/usePress.ts +8 -0
  49. package/src/interactions/utils.ts +10 -10
  50. package/src/intl/combobox/fi-FI.json +2 -2
  51. package/src/intl/previewtrigger/ar-AE.json +3 -0
  52. package/src/intl/previewtrigger/bg-BG.json +3 -0
  53. package/src/intl/previewtrigger/cs-CZ.json +3 -0
  54. package/src/intl/previewtrigger/da-DK.json +3 -0
  55. package/src/intl/previewtrigger/de-DE.json +3 -0
  56. package/src/intl/previewtrigger/el-GR.json +3 -0
  57. package/src/intl/previewtrigger/en-US.json +3 -0
  58. package/src/intl/previewtrigger/es-ES.json +3 -0
  59. package/src/intl/previewtrigger/et-EE.json +3 -0
  60. package/src/intl/previewtrigger/fi-FI.json +3 -0
  61. package/src/intl/previewtrigger/fr-FR.json +3 -0
  62. package/src/intl/previewtrigger/he-IL.json +3 -0
  63. package/src/intl/previewtrigger/hr-HR.json +3 -0
  64. package/src/intl/previewtrigger/hu-HU.json +3 -0
  65. package/src/intl/previewtrigger/index.ts +73 -0
  66. package/src/intl/previewtrigger/it-IT.json +3 -0
  67. package/src/intl/previewtrigger/ja-JP.json +3 -0
  68. package/src/intl/previewtrigger/ko-KR.json +3 -0
  69. package/src/intl/previewtrigger/lt-LT.json +3 -0
  70. package/src/intl/previewtrigger/lv-LV.json +3 -0
  71. package/src/intl/previewtrigger/nb-NO.json +3 -0
  72. package/src/intl/previewtrigger/nl-NL.json +3 -0
  73. package/src/intl/previewtrigger/pl-PL.json +3 -0
  74. package/src/intl/previewtrigger/pt-BR.json +3 -0
  75. package/src/intl/previewtrigger/pt-PT.json +3 -0
  76. package/src/intl/previewtrigger/ro-RO.json +3 -0
  77. package/src/intl/previewtrigger/ru-RU.json +3 -0
  78. package/src/intl/previewtrigger/sk-SK.json +3 -0
  79. package/src/intl/previewtrigger/sl-SI.json +3 -0
  80. package/src/intl/previewtrigger/sr-SP.json +3 -0
  81. package/src/intl/previewtrigger/sv-SE.json +3 -0
  82. package/src/intl/previewtrigger/tr-TR.json +3 -0
  83. package/src/intl/previewtrigger/uk-UA.json +3 -0
  84. package/src/intl/previewtrigger/zh-CN.json +3 -0
  85. package/src/intl/previewtrigger/zh-TW.json +3 -0
  86. package/src/intl/table/ar-AE.json +3 -3
  87. package/src/intl/table/bg-BG.json +3 -3
  88. package/src/intl/table/cs-CZ.json +3 -3
  89. package/src/intl/table/da-DK.json +3 -3
  90. package/src/intl/table/de-DE.json +3 -3
  91. package/src/intl/table/el-GR.json +3 -3
  92. package/src/intl/table/es-ES.json +3 -3
  93. package/src/intl/table/et-EE.json +3 -3
  94. package/src/intl/table/fi-FI.json +3 -3
  95. package/src/intl/table/fr-FR.json +3 -3
  96. package/src/intl/table/he-IL.json +3 -3
  97. package/src/intl/table/hr-HR.json +3 -3
  98. package/src/intl/table/hu-HU.json +3 -3
  99. package/src/intl/table/it-IT.json +3 -3
  100. package/src/intl/table/ja-JP.json +3 -3
  101. package/src/intl/table/ko-KR.json +3 -3
  102. package/src/intl/table/lt-LT.json +3 -3
  103. package/src/intl/table/lv-LV.json +3 -3
  104. package/src/intl/table/nb-NO.json +3 -3
  105. package/src/intl/table/nl-NL.json +3 -3
  106. package/src/intl/table/pl-PL.json +3 -3
  107. package/src/intl/table/pt-BR.json +3 -3
  108. package/src/intl/table/pt-PT.json +3 -3
  109. package/src/intl/table/ro-RO.json +3 -3
  110. package/src/intl/table/ru-RU.json +3 -3
  111. package/src/intl/table/sk-SK.json +3 -3
  112. package/src/intl/table/sl-SI.json +3 -3
  113. package/src/intl/table/sr-SP.json +3 -3
  114. package/src/intl/table/sv-SE.json +3 -3
  115. package/src/intl/table/tr-TR.json +3 -3
  116. package/src/intl/table/uk-UA.json +3 -3
  117. package/src/intl/table/zh-CN.json +4 -4
  118. package/src/intl/table/zh-TW.json +3 -3
  119. package/src/intl/tree/es-ES.json +1 -1
  120. package/src/link/useLink.ts +2 -0
  121. package/src/menu/useMenuItem.ts +33 -36
  122. package/src/menu/useMenuTrigger.tsx +217 -0
  123. package/src/menu/{useSubmenuTrigger.ts → useSubmenuTrigger.tsx} +112 -152
  124. package/src/numberfield/{useNumberField.ts → useNumberField.tsx} +185 -239
  125. package/src/overlays/Overlay.ts +5 -1
  126. package/src/overlays/ariaHideOutside.ts +6 -8
  127. package/src/overlays/useCloseOnScroll.ts +7 -5
  128. package/src/overlays/{useOverlay.ts → useOverlay.tsx} +72 -84
  129. package/src/overlays/usePopover.ts +10 -5
  130. package/src/overlays/usePreventScroll.ts +4 -4
  131. package/src/progress/useProgressBar.ts +2 -1
  132. package/src/radio/{useRadioGroup.ts → useRadioGroup.tsx} +83 -80
  133. package/src/searchfield/useSearchField.tsx +147 -0
  134. package/src/select/useSelect.ts +20 -20
  135. package/src/selection/useSelectableCollection.tsx +751 -0
  136. package/src/selection/useSelectableItem.ts +48 -11
  137. package/src/slider/{useSliderThumb.ts → useSliderThumb.tsx} +116 -159
  138. package/src/spinbutton/useSpinButton.tsx +330 -0
  139. package/src/stately/combobox/useComboBoxState.ts +1 -1
  140. package/src/stately/grid/useGridState.ts +9 -10
  141. package/src/stately/index.ts +11 -0
  142. package/src/stately/menu/useMenuTriggerState.ts +1 -1
  143. package/src/stately/menu/useSubmenuTriggerState.ts +2 -0
  144. package/src/stately/overlays/useOverlayTriggerState.ts +12 -1
  145. package/src/stately/radio/useRadioGroupState.ts +5 -1
  146. package/src/stately/table/TableUtils.ts +15 -1
  147. package/src/stately/table/useTableState.ts +7 -0
  148. package/src/stately/tokenfield/TokenFieldValue.tsx +440 -0
  149. package/src/stately/tokenfield/useTokenFieldState.tsx +57 -0
  150. package/src/stately/tooltip/useTooltipTriggerState.ts +16 -7
  151. package/src/stately/virtualizer/Layout.tsx +2 -0
  152. package/src/stately/virtualizer/ScrollAnchor.tsx +338 -0
  153. package/src/stately/virtualizer/Virtualizer.tsx +52 -1
  154. package/src/stately/virtualizer/types.tsx +2 -0
  155. package/src/table/useTableCell.ts +12 -0
  156. package/src/table/useTableColumnHeader.ts +8 -1
  157. package/src/table/useTableColumnResize.tsx +354 -0
  158. package/src/tag/useTag.ts +22 -15
  159. package/src/textfield/useTextField.ts +2 -0
  160. package/src/tokenfield/useToken.tsx +64 -0
  161. package/src/tokenfield/useTokenField.tsx +849 -0
  162. package/src/tooltip/usePreviewTrigger.tsx +266 -0
  163. package/src/tooltip/useSafeArea.tsx +171 -0
  164. package/src/upstream-exports/react-aria/mergeRefs.tsx +3 -0
  165. package/src/upstream-exports/react-aria/usePreviewTrigger.tsx +18 -0
  166. package/src/upstream-exports/react-aria/useTokenField.tsx +22 -0
  167. package/src/upstream-exports/react-stately/private/collections/getChildNodes.tsx +8 -0
  168. package/src/upstream-exports/react-stately/private/collections/getItemCount.tsx +2 -0
  169. package/src/upstream-exports/react-stately/private/grid/GridCollection.tsx +7 -0
  170. package/src/upstream-exports/react-stately/private/grid/useGridState.tsx +6 -0
  171. package/src/upstream-exports/react-stately/private/utils/number.tsx +2 -0
  172. package/src/upstream-exports/react-stately/useComboBoxState.tsx +23 -0
  173. package/src/upstream-exports/react-stately/useListState.tsx +15 -0
  174. package/src/upstream-exports/react-stately/useMenuTriggerState.tsx +26 -0
  175. package/src/upstream-exports/react-stately/useMultipleSelectionState.tsx +21 -0
  176. package/src/upstream-exports/react-stately/useNumberFieldState.tsx +20 -0
  177. package/src/upstream-exports/react-stately/useOverlayTriggerState.tsx +20 -0
  178. package/src/upstream-exports/react-stately/useRadioGroupState.tsx +16 -0
  179. package/src/upstream-exports/react-stately/useSearchFieldState.tsx +19 -0
  180. package/src/upstream-exports/react-stately/useSliderState.tsx +20 -0
  181. package/src/upstream-exports/react-stately/useTableState.tsx +45 -0
  182. package/src/upstream-exports/react-stately/useTokenFieldState.tsx +25 -0
  183. package/src/upstream-exports/react-stately/useTooltipTriggerState.tsx +20 -0
  184. package/src/upstream-exports/react-stately/useTreeState.tsx +14 -0
  185. package/src/utils/domHelpers.ts +74 -17
  186. package/src/utils/isVirtualEvent.ts +2 -1
  187. package/src/utils/openLink.ts +8 -3
  188. package/src/utils/platform.ts +7 -3
  189. package/src/utils/scrollIntoView.ts +4 -4
  190. package/src/utils/shadowdom/DOMFunctions.ts +42 -2
  191. package/src/utils/useId.ts +11 -2
  192. package/src/utils/useLoadMoreSentinel.ts +8 -3
  193. package/src/utils/useViewportSize.ts +3 -3
  194. package/src/virtualizer/ScrollView.tsx +13 -4
  195. package/src/virtualizer/VirtualizerItem.tsx +3 -1
  196. package/src/virtualizer/useVirtualizerItem.tsx +43 -3
  197. package/src/menu/useMenuTrigger.ts +0 -189
  198. package/src/searchfield/useSearchField.ts +0 -156
  199. package/src/selection/useSelectableCollection.ts +0 -750
  200. package/src/spinbutton/useSpinButton.ts +0 -380
  201. package/src/table/useTableColumnResize.ts +0 -374
package/README.md CHANGED
@@ -15,16 +15,17 @@ pnpm add @octanejs/aria
15
15
  - `@octanejs/aria` — the `react-aria` behavior-hook surface.
16
16
  - `@octanejs/aria/stately` — the `react-stately` state-hook surface.
17
17
  - `@octanejs/aria/components` — the complete public export surface of
18
- `react-aria-components@1.19.0`.
18
+ `react-aria-components@1.20.0`.
19
19
 
20
20
  Ported from the pinned `adobe/react-spectrum` checkout at commit
21
- `1c84a49a1faf50b571c84e00bcf9c60b22ddd03e`, which publishes
22
- `react-aria@3.50.0`, `react-stately@3.48.0`, and
23
- `react-aria-components@1.19.0`. The components entry point has an exact checked
24
- crosswalk: all 280 runtime exports and all 313 type exports match the pinned
21
+ `5ecb3333001313e83898cd07644227897e3bae1f`, which publishes
22
+ `react-aria@3.51.0`, `react-stately@3.49.0`, and
23
+ `react-aria-components@1.20.0`. The components entry point has an exact checked
24
+ crosswalk: all 286 runtime exports and all 327 type exports match the pinned
25
25
  package, with no missing or extra names. Existing families retain differential
26
26
  tests against React; calendar/date, color, drag and drop, file, data, toast, and
27
- layout additions have focused public-behavior coverage.
27
+ layout additions have focused public-behavior coverage. The 1.20 release adds
28
+ TokenField and PreviewTrigger, keyboard shortcut bindings, and context-menu triggers.
28
29
 
29
30
  Status, supported surface, and known divergences: `status.json` (rendered into
30
31
  `docs/bindings-status.md`). Source provenance and refresh instructions:
package/UPSTREAM.md CHANGED
@@ -1,108 +1,97 @@
1
1
  # React Aria upstream ledger
2
2
 
3
3
  `@octanejs/aria` targets the coordinated React Spectrum release at commit
4
- `1c84a49a1faf50b571c84e00bcf9c60b22ddd03e`:
4
+ `5ecb3333001313e83898cd07644227897e3bae1f`:
5
5
 
6
- | Package | Version | Verified tag | npm SHA-256 | npm integrity |
7
- | --- | --- | --- | --- | --- |
8
- | `react-aria` | `3.50.0` | `react-aria@3.50.0` | `bcab487177dba271a36f247531043c3c940579cacc201e31bbdbba29ef2d2a7c` | `sha512-S0Os6QZk33fzUAKu1QLT9afoUaCBt1ZNdoiq0n2YMVgKIdNIQS8zxiZ8O9hYE6QyDkHKjD6q39LQZ+qaSAIgjw==` |
9
- | `react-aria-components` | `1.19.0` | `react-aria-components@1.19.0` | `d63da4e2ab794d3a86a16ba17b719f22a256d9c0c5fd22c057d228e0f05932a1` | `sha512-2smSS5nqJ8cGYMQezuUXveZm7eMyHCqTN6mDpylQBYLYbdF5dxCCuW1DHn1VKLe1DybSfPvX/cZtJlDmvFfn8A==` |
10
- | `react-stately` | `3.48.0` | `react-stately@3.48.0` | `55f38303d09112619b9adc754032ba3caadc7e5a0b7fbc74bfc5636369674dd4` | `sha512-ImicSAG+lTotAe5izcs1fz49Zk48w7pDusqYg04WaPhCoej8BJ24soMu3iLXIrsi273s4P1gZrYGrqReMfgEEA==` |
6
+ | Package | Version | npm SHA-256 | npm integrity |
7
+ | --- | --- | --- | --- |
8
+ | `react-aria` | `3.51.0` | `8d404cc6c43909f85dcd207435614db08f38c69553b8085bed2910c61b7e89fa` | `sha512-AyWLw0XR38cFPwBu/ErgGaVrc5dupLEKmRlMXTGvFKOtbaGRQ2+yQJkjVhpdHhoRhU4+G+tJDFeHDTS8tK3bfQ==` |
9
+ | `react-aria-components` | `1.20.0` | `b63f044f9cb25cb48789b8c2ce06b27c83a81c94c6413a29766eabb3c15458dd` | `sha512-BMbpIgoV9aELeBrB0Y120NgoigHb5OdcJwc+4e7uSnbTbamea6lo+gqcc4LAxzMaK3Jf+7LI1oCDE6yANsmxIQ==` |
10
+ | `react-stately` | `3.49.0` | `90e49592b8c2aa351c9e25c2ad82f477aa50682dd7ef9afe8c7c11a01f856793` | `sha512-13iNq2KzBrRAzxRc+n53hgROfIistiYY/sPtIhCw1qUB7/kmo+X1xEU2uiS5zcCIrc55AUPwoHqOIIpKWSwB9A==` |
11
11
 
12
- All three signed registry artifacts record the same `gitHead`, and all three tags resolve to
13
- that commit. The ordered composite SHA-256 of the three npm tarballs is
14
- `dcad3293f0f7438705f72cdd7df03351476aeaba7d0d2743c7ad6d8130aff56f`.
15
- The supported range is these exact coordinated versions; upgrades require a new crosswalk.
12
+ Registry metadata and tarball manifests record the same `gitHead` for all three
13
+ packages. Downloaded bytes match their npm SHA-512 integrity values. The ordered
14
+ SHA-256 of the three concatenated tarballs is
15
+ `775b11dacccd090af9b3a59f47b17dcf03efd7cf09be32b5b8e94dc707167b86`.
16
+ The supported range is these exact coordinated versions.
16
17
 
17
18
  ## Source and test boundary
18
19
 
19
- - Canonical repository: `https://github.com/adobe/react-spectrum.git`
20
- - Source roots: `packages/react-aria/src`, `packages/react-aria-components/src`, and
21
- `packages/react-stately/src`
20
+ - Repository: `https://github.com/adobe/react-spectrum.git`
21
+ - Source roots: `packages/react-aria/src`, `packages/react-aria-components/src`, and `packages/react-stately/src`
22
22
  - Public entry points: each package's `exports/index.ts`
23
23
  - Test roots: each package's `test` directory
24
- - License: Apache-2.0; the pinned root `LICENSE` SHA-256 is
25
- `7dfe6526888bac51759c99f9a51262ba2711a8c12a067f2181609dd9a4066b84`
24
+ - License: Apache-2.0; root `LICENSE` SHA-256 `7dfe6526888bac51759c99f9a51262ba2711a8c12a067f2181609dd9a4066b84`
26
25
  - React oracle: `react@19.2.7` and `react-dom@19.2.7`
27
26
 
28
- The monorepo source and suites are not vendored in this retrofit because the three package
29
- trees contain more than two thousand source/support files. The immutable external checkout
30
- can be reproduced with:
27
+ The exact source can be reproduced with:
31
28
 
32
29
  ```sh
33
- git clone --depth 1 --branch react-aria@3.50.0 --filter=blob:none --sparse \
34
- https://github.com/adobe/react-spectrum.git react-spectrum-aria-3.50.0
35
- git -C react-spectrum-aria-3.50.0 sparse-checkout set --skip-checks \
36
- packages/react-aria packages/react-aria-components packages/react-stately LICENSE
30
+ git clone --filter=blob:none --sparse https://github.com/adobe/react-spectrum.git react-spectrum-aria
31
+ git -C react-spectrum-aria checkout 5ecb3333001313e83898cd07644227897e3bae1f
32
+ git -C react-spectrum-aria sparse-checkout set packages/react-aria packages/react-aria-components packages/react-stately
37
33
  ```
38
34
 
39
- `audit/upstream-crosswalk.json` records all 1,294 public entry-point exports and all 185
40
- test-root artifacts from that checkout. It currently classifies 998 exports as
41
- `surface-present-unverified`, with per-symbol entry-point evidence, and 296 as explicit gaps.
42
- Surface presence is not a behavioral parity claim. The upstream suites contain 177 runtime
43
- test files, one type test, and seven support artifacts. They are present but have not been
44
- adapted case-by-case, so this binding remains `recorded-unverified`.
35
+ `audit/upstream-crosswalk.json` classifies all 1,340 public entry-point exports and
36
+ 198 test-root artifacts: 1,044 exports are `surface-present-unverified`, and 296
37
+ remain explicit gaps in the curated root/stately surfaces. These gaps predate
38
+ this update. The checkout contains 189 runtime test files, one type test, and eight
39
+ support artifacts. Surface presence is not a behavior-parity claim.
45
40
 
46
41
  ## React Aria Components public surface
47
42
 
48
- The `@octanejs/aria/components` entry point separately claims complete named-export parity
49
- with the pinned `react-aria-components@1.19.0` package. The completed inventory is 280 runtime
50
- exports and 313 type exports, including calendar/date/time, color, drag-and-drop,
51
- DropZone/FileTrigger, toast, data hooks, Virtualizer, and layout classes.
52
-
53
- `scripts/check-react-aria-components-exports.mjs` parses the installed pinned declaration
54
- barrel and `src/components/index.ts`, keeps runtime and type-only exports in separate lanes,
55
- and rejects missing or extra names in either direction:
43
+ `@octanejs/aria/components` matches all 286 runtime and 327 type export names from
44
+ `react-aria-components@1.20.0`, including the new TokenField and PreviewTrigger
45
+ families. `scripts/check-react-aria-components-exports.mjs` checks runtime and type
46
+ names separately and rejects missing or extra names in either direction:
56
47
 
57
48
  ```sh
58
49
  pnpm --filter @octanejs/aria exports:check
59
50
  ```
60
51
 
61
- This components-entry claim does not convert the broader `react-aria` and `react-stately`
62
- crosswalk into a full-export or full-upstream-suite claim.
52
+ The root behavior hooks and `/stately` remain curated surfaces. This export check
53
+ does not claim complete type assignability or execution of every upstream suite.
63
54
 
64
- ## Refreshing the advanced source staging tree
55
+ ## Refreshing source
65
56
 
66
- The sparse `.react-spectrum` checkout must point at the exact coordinated commit above.
67
- `scripts/port-advanced-source.mjs` creates a reviewable staging tree, rewrites package
68
- boundaries to the local Octane adapters, copies locale dictionaries, and records provenance.
69
- It must not target `packages/aria`, because reviewed Octane adaptations must not be
70
- overwritten mechanically.
57
+ `scripts/port-advanced-source.mjs` creates a staging tree from the pinned source,
58
+ rewrites package boundaries, and copies locale dictionaries. It rejects
59
+ `packages/aria` as an output location so mechanical conversion cannot overwrite
60
+ reviewed native-event, ref, and hook-slot adaptations.
71
61
 
72
62
  ```sh
73
63
  node packages/aria/scripts/port-advanced-source.mjs \
64
+ --source-checkout /tmp/react-spectrum-aria \
74
65
  --output-root /tmp/octane-aria-upstream
75
66
  ```
76
67
 
77
- Review the staged diff against `packages/aria`, preserve native-event, ref-as-prop,
78
- hook-slot, and compiler adaptations, then run the export audit, `tsrx-tsc`, and the Aria
79
- test projects. Updating the pin requires reviewing the upstream source and export diffs
80
- together. Newly adapted Adobe source retains its Apache-2.0 header; the required license
81
- text is shipped as `LICENSE-APACHE-2.0`.
68
+ Review the release diff, preserve Octane adaptations, and run the export audit,
69
+ `tsrx-tsc`, Aria test projects, and Shadcn integration tests. New Adobe source retains
70
+ its Apache-2.0 header; `LICENSE-APACHE-2.0` ships the license text. Artifact hashes and
71
+ release adaptation notes live in `audit/release-1.20.0.json`.
82
72
 
83
73
  ## Executable evidence
84
74
 
85
- The only React-parity-owned executable lane today is the bounded differential project. It
86
- compiles the same `.tsrx` fixtures once for Octane and once for the pinned React packages,
87
- covering interaction hooks, form-field event wiring, collections, Select, ComboBox, React Aria
88
- Components render props, keyed collection updates, and Tree/Table state.
75
+ The differential project compiles shared fixtures for Octane and the pinned React
76
+ packages. It covers interaction hooks, forms, collections, Select, ComboBox, render
77
+ props, keyed updates, Tree/Table, and the new shortcut and TokenField markup cases.
78
+
79
+ The complete 96-case upstream TokenFieldValue file and its source are vendored under
80
+ `upstream/react-stately`. The `aria-token-value-pristine` and
81
+ `aria-token-value-adapted` projects run the original source and the Octane adaptation,
82
+ respectively. The adaptation preserves every case and assertion while replacing the
83
+ source import and test registration and removing the React-version gate. Per-case
84
+ inventories and file hashes are recorded in `audit/react-parity.json`.
89
85
 
90
- That lane is representative evidence only. Declaring the upstream runtime and type suites
91
- `present` records that the coordinated checkout contains those suites; it is not a claim that
92
- this binding has completed pristine full-suite, one-for-one adapted, or type-lane execution.
93
- The export/test crosswalk and Octane-only divergence/framework contracts remain ordinary-shard
94
- coverage until those required lanes and inventories exist.
86
+ This is bounded evidence for one upstream file. Other upstream runtime and type
87
+ suites have not been adapted case-by-case, so the binding remains
88
+ `recorded-unverified`. Octane-only tests separately cover native event wiring, SSR,
89
+ hydration, and component integration.
95
90
 
96
91
  ## Intentional divergences
97
92
 
98
- - Native text editing uses Octane `onInput` wiring while public value callbacks retain their
99
- upstream `onChange(value)` names.
100
- - React `forwardRef` wrappers become Octane ref-as-prop components.
101
- - The i18n server serializer keeps generated identifiers valid after 26 hoisted strings,
102
- correcting invalid JavaScript emitted by the pinned upstream algorithm.
103
- - Server locale direction is derived from the injected locale, including RTL locales, rather
104
- than being hard-coded to `ltr`.
105
-
106
- `native-input-event-wiring` is linked to the differential case in `audit/react-parity.json`.
107
- The other divergences above remain documented package contracts with ordinary-shard tests; they
108
- are not counted as completed React-parity suite evidence until adapted upstream lanes exist.
93
+ - Native text editing uses `onInput`; value-level `onChange(value)` callbacks retain their names.
94
+ - Refs are ordinary props, including adapters for upstream `forwardRef` wrappers.
95
+ - React Server Components are outside the Octane binding.
96
+ - The i18n server serializer produces valid identifiers after 26 hoisted strings.
97
+ - Server locale direction follows the injected locale, including RTL locales.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/aria",
3
- "version": "0.0.46",
3
+ "version": "0.0.47",
4
4
  "license": "MIT AND Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -46,26 +46,26 @@
46
46
  "./components": "./src/components/index.ts"
47
47
  },
48
48
  "dependencies": {
49
- "@internationalized/date": "^3.12.2",
49
+ "@internationalized/date": "^3.12.3",
50
50
  "@internationalized/number": "^3.6.7",
51
- "@internationalized/string": "^3.2.9",
52
- "@react-types/shared": "^3.36.0",
51
+ "@internationalized/string": "^3.2.10",
52
+ "@react-types/shared": "^3.36.1",
53
53
  "clsx": "^2.1.1"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "octane": "^0.1.51 || ^0.2.0"
57
57
  },
58
58
  "devDependencies": {
59
- "@tsrx/react": "^0.2.63",
59
+ "@tsrx/react": "^0.2.69",
60
60
  "esbuild": "^0.28.1",
61
- "react": "^19.2.7",
62
- "react-aria": "3.50.0",
63
- "react-aria-components": "1.19.0",
64
- "react-dom": "^19.2.7",
65
- "react-stately": "3.48.0",
61
+ "react": "19.2.7",
62
+ "react-aria": "3.51.0",
63
+ "react-aria-components": "1.20.0",
64
+ "react-dom": "19.2.7",
65
+ "react-stately": "3.49.0",
66
66
  "typescript": "^5.9.3",
67
67
  "vitest": "^4.1.10",
68
- "octane": "0.2.0"
68
+ "octane": "0.2.7"
69
69
  },
70
70
  "scripts": {
71
71
  "exports:check": "node scripts/check-react-aria-components-exports.mjs",
@@ -1,5 +1,5 @@
1
1
  /** @jsxImportSource octane */
2
- // Ported from adobe/react-spectrum@1c84a49a1faf50b571c84e00bcf9c60b22ddd03e (packages/react-aria/src/calendar/useCalendarGrid.ts).
2
+ // Ported from adobe/react-spectrum@5ecb3333001313e83898cd07644227897e3bae1f (packages/react-aria/src/calendar/useCalendarGrid.ts).
3
3
  /*
4
4
  * Copyright 2020 Adobe. All rights reserved.
5
5
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
@@ -19,12 +19,13 @@ import {
19
19
  } from '../upstream-exports/react-stately/useCalendarState';
20
20
  import { DOMAttributes } from '@react-types/shared';
21
21
  import { hookData, useVisibleRangeDescription } from './utils';
22
- import { KeyboardEvent, useMemo } from '../compat/react';
23
22
  import { mergeProps } from '../utils/mergeProps';
24
23
  import { RangeCalendarState } from '../upstream-exports/react-stately/useRangeCalendarState';
25
24
  import { useDateFormatter } from '../i18n/useDateFormatter';
25
+ import { useKeyboard } from '../interactions/useKeyboard';
26
26
  import { useLabels } from '../utils/useLabels';
27
27
  import { useLocale } from '../i18n/I18nProvider';
28
+ import { useMemo } from '../compat/react';
28
29
 
29
30
  export interface AriaCalendarGridProps {
30
31
  /**
@@ -83,70 +84,67 @@ export function useCalendarGrid(
83
84
 
84
85
  let { direction } = useLocale();
85
86
 
86
- let onKeyDown = (e: KeyboardEvent) => {
87
- switch (e.key) {
88
- case 'Enter':
89
- case ' ':
90
- e.preventDefault();
91
- state.selectFocusedDate();
92
- break;
93
- case 'PageUp':
94
- e.preventDefault();
95
- e.stopPropagation();
96
- state.focusPreviousSection(e.shiftKey);
97
- break;
98
- case 'PageDown':
99
- e.preventDefault();
100
- e.stopPropagation();
101
- state.focusNextSection(e.shiftKey);
102
- break;
103
- case 'End':
104
- e.preventDefault();
105
- e.stopPropagation();
87
+ let { keyboardProps } = useKeyboard({
88
+ shortcuts: {
89
+ End: () => {
106
90
  state.focusSectionEnd();
107
- break;
108
- case 'Home':
109
- e.preventDefault();
110
- e.stopPropagation();
91
+ },
92
+ Home: () => {
111
93
  state.focusSectionStart();
112
- break;
113
- case 'ArrowLeft':
114
- e.preventDefault();
115
- e.stopPropagation();
94
+ },
95
+ Escape: () => {
96
+ // Cancel the selection.
97
+ if ('setAnchorDate' in state) {
98
+ state.setAnchorDate(null);
99
+ }
100
+ return false; // TODO: is this really correct? or should it return true when we cancel and only propagate if there's nothing to do
101
+ },
102
+ },
103
+ });
104
+
105
+ let { keyboardProps: repeatKeyboardProps } = useKeyboard({
106
+ shortcuts: {
107
+ Enter: () => {
108
+ state.selectFocusedDate();
109
+ },
110
+ ' ': () => {
111
+ state.selectFocusedDate();
112
+ },
113
+ PageUp: () => {
114
+ state.focusPreviousSection();
115
+ },
116
+ 'Shift+PageUp': () => {
117
+ state.focusPreviousSection(true);
118
+ },
119
+ PageDown: () => {
120
+ state.focusNextSection();
121
+ },
122
+ 'Shift+PageDown': () => {
123
+ state.focusNextSection(true);
124
+ },
125
+ ArrowLeft: () => {
116
126
  if (direction === 'rtl') {
117
127
  state.focusNextDay();
118
128
  } else {
119
129
  state.focusPreviousDay();
120
130
  }
121
- break;
122
- case 'ArrowUp':
123
- e.preventDefault();
124
- e.stopPropagation();
131
+ },
132
+ ArrowUp: () => {
125
133
  state.focusPreviousRow();
126
- break;
127
- case 'ArrowRight':
128
- e.preventDefault();
129
- e.stopPropagation();
134
+ },
135
+ ArrowRight: () => {
130
136
  if (direction === 'rtl') {
131
137
  state.focusPreviousDay();
132
138
  } else {
133
139
  state.focusNextDay();
134
140
  }
135
- break;
136
- case 'ArrowDown':
137
- e.preventDefault();
138
- e.stopPropagation();
141
+ },
142
+ ArrowDown: () => {
139
143
  state.focusNextRow();
140
- break;
141
- case 'Escape':
142
- // Cancel the selection.
143
- if ('setAnchorDate' in state) {
144
- e.preventDefault();
145
- state.setAnchorDate(null);
146
- }
147
- break;
148
- }
149
- };
144
+ },
145
+ },
146
+ allowRepeats: true,
147
+ });
150
148
 
151
149
  let visibleRangeDescription = useVisibleRangeDescription(
152
150
  startDate,
@@ -181,16 +179,20 @@ export function useCalendarGrid(
181
179
  let weeksInMonth = state.getWeeksInMonth(startDate);
182
180
 
183
181
  return {
184
- gridProps: mergeProps(labelProps, {
185
- role: 'grid',
186
- 'aria-readonly': state.isReadOnly || undefined,
187
- 'aria-disabled': state.isDisabled || undefined,
188
- 'aria-multiselectable':
189
- 'highlightedRange' in state || state.selectionMode === 'multiple' || undefined,
190
- onKeyDown,
191
- onFocus: () => state.setFocused(true),
192
- onBlur: () => state.setFocused(false),
193
- }) as unknown as DOMAttributes,
182
+ gridProps: mergeProps(
183
+ labelProps,
184
+ {
185
+ role: 'grid',
186
+ 'aria-readonly': state.isReadOnly || undefined,
187
+ 'aria-disabled': state.isDisabled || undefined,
188
+ 'aria-multiselectable':
189
+ 'highlightedRange' in state || state.selectionMode === 'multiple' || undefined,
190
+ onFocus: () => state.setFocused(true),
191
+ onBlur: () => state.setFocused(false),
192
+ },
193
+ keyboardProps,
194
+ repeatKeyboardProps,
195
+ ),
194
196
  headerProps: {
195
197
  // Column headers are hidden to screen readers to make navigating with a touch screen reader easier.
196
198
  // The day names are already included in the label of each cell, so there's no need to announce them twice.
@@ -437,6 +437,9 @@ export class Document<T, C extends BaseCollection<T> = BaseCollection<T>> {
437
437
 
438
438
  subscribe(fn: () => void): () => boolean {
439
439
  this.subscriptions.add(fn);
440
+ if (this.queuedRender) {
441
+ fn();
442
+ }
440
443
  return (): boolean => this.subscriptions.delete(fn);
441
444
  }
442
445