@octanejs/aria 0.0.64 → 0.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/aria",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.66",
|
|
4
4
|
"license": "MIT AND Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"clsx": "^2.1.1"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"octane": "^0.
|
|
56
|
+
"octane": "^0.17.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@tsrx/react": "^0.4.5",
|
|
60
60
|
"esbuild": "^0.28.1",
|
|
61
|
-
"octane": "0.
|
|
61
|
+
"octane": "0.17.0",
|
|
62
62
|
"react": "19.2.7",
|
|
63
63
|
"react-aria": "3.51.0",
|
|
64
64
|
"react-aria-components": "1.20.0",
|
package/src/compat/react.ts
CHANGED
|
@@ -6,11 +6,6 @@ import * as Octane from 'octane';
|
|
|
6
6
|
|
|
7
7
|
export * from 'octane';
|
|
8
8
|
|
|
9
|
-
// React permits `useRef<Element>(null)`. Octane has the same runtime shape but
|
|
10
|
-
// infers the initializer literally, so expose the React-compatible overload at
|
|
11
|
-
// this import boundary while keeping the call visible to the Octane compiler.
|
|
12
|
-
export const useRef = Octane.useRef as <T>(initial: T | null) => { current: T };
|
|
13
|
-
|
|
14
9
|
export type ForwardedRef<T> =
|
|
15
10
|
((instance: T | null) => void | (() => void)) | { current: T | null } | null;
|
|
16
11
|
export type ReactNode = any;
|
|
@@ -82,7 +77,7 @@ export function forwardRef<T, P = Record<string, never>>(
|
|
|
82
77
|
return component;
|
|
83
78
|
}
|
|
84
79
|
|
|
85
|
-
const React = Object.assign({}, Octane, { forwardRef
|
|
80
|
+
const React = Object.assign({}, Octane, { forwardRef });
|
|
86
81
|
|
|
87
82
|
namespace React {
|
|
88
83
|
export type ForwardedRef<T> = import('./react').ForwardedRef<T>;
|
|
@@ -18,7 +18,7 @@ import type {
|
|
|
18
18
|
ValueBase,
|
|
19
19
|
} from '@react-types/shared';
|
|
20
20
|
import { NumberFormatter, NumberParser } from '@internationalized/number';
|
|
21
|
-
import { useCallback, useLinkedState, useMemo
|
|
21
|
+
import { useCallback, useLinkedState, useMemo } from 'octane';
|
|
22
22
|
|
|
23
23
|
import type { FocusableProps } from '../../interactions/useFocusable';
|
|
24
24
|
|
|
@@ -174,7 +174,8 @@ export function useNumberFieldState(...args: any[]): NumberFieldState {
|
|
|
174
174
|
onChange,
|
|
175
175
|
subSlot(slot, 'number'),
|
|
176
176
|
);
|
|
177
|
-
|
|
177
|
+
// Keep the mounted number as the form-reset fallback.
|
|
178
|
+
const initialValue = useMemo(() => numberValue, [], subSlot(slot, 'initial'));
|
|
178
179
|
const providedFormatOptions = formatOptions;
|
|
179
180
|
// Normalize parser rounding options before linked-source comparison or formatting.
|
|
180
181
|
let [numberParser, normalizedFormatOptions] = useMemo(
|