@octanejs/aria 0.0.6 → 0.0.7

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.6",
3
+ "version": "0.0.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -46,18 +46,18 @@
46
46
  "clsx": "^2.1.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "octane": "0.1.12"
49
+ "octane": "0.1.13"
50
50
  },
51
51
  "devDependencies": {
52
- "@tsrx/react": "^0.2.44",
52
+ "@tsrx/react": "^0.2.46",
53
53
  "esbuild": "^0.28.1",
54
- "react": "^19.2.0",
54
+ "react": "^19.2.7",
55
55
  "react-aria": "3.50.0",
56
56
  "react-aria-components": "1.19.0",
57
- "react-dom": "^19.2.0",
57
+ "react-dom": "^19.2.7",
58
58
  "react-stately": "3.48.0",
59
- "vitest": "^4.1.9",
60
- "octane": "0.1.12"
59
+ "vitest": "^4.1.10",
60
+ "octane": "0.1.13"
61
61
  },
62
62
  "scripts": {
63
63
  "test": "vitest run"
@@ -160,11 +160,9 @@ export interface DOMProps extends StyleProps, SharedDOMProps {
160
160
  }
161
161
 
162
162
  export type ClassNameOrFunction<T> =
163
- | string
164
- | ((values: T & { defaultClassName: string | undefined }) => string);
163
+ string | ((values: T & { defaultClassName: string | undefined }) => string);
165
164
  type StyleOrFunction<T> =
166
- | CSSProperties
167
- | ((values: T & { defaultStyle: CSSProperties }) => CSSProperties | undefined);
165
+ CSSProperties | ((values: T & { defaultStyle: CSSProperties }) => CSSProperties | undefined);
168
166
 
169
167
  export interface StyleRenderProps<T, E extends string = 'div'> extends DOMRenderProps<E, T> {
170
168
  /**
@@ -180,8 +178,7 @@ export interface StyleRenderProps<T, E extends string = 'div'> extends DOMRender
180
178
  }
181
179
 
182
180
  export type ChildrenOrFunction<T> =
183
- | ReactNode
184
- | ((values: T & { defaultChildren: ReactNode | undefined }) => ReactNode);
181
+ ReactNode | ((values: T & { defaultChildren: ReactNode | undefined }) => ReactNode);
185
182
 
186
183
  export interface RenderProps<T, E extends string = 'div'> extends StyleRenderProps<T, E> {
187
184
  /**
@@ -3,10 +3,7 @@
3
3
  // (callback ref with optional cleanup, or object ref), passed as ordinary props.
4
4
 
5
5
  export type MergableRef<T> =
6
- | ((value: T | null) => void | (() => void))
7
- | { current: T | null }
8
- | null
9
- | undefined;
6
+ ((value: T | null) => void | (() => void)) | { current: T | null } | null | undefined;
10
7
 
11
8
  /**
12
9
  * Merges multiple refs into one. Works with either callback or object refs.
@@ -25,8 +25,7 @@ export function useFormReset(...args: any[]): void {
25
25
  const [user, slotArg] = splitSlot(args);
26
26
  const slot = slotArg ?? S('useFormReset');
27
27
  const ref = user[0] as
28
- | { current: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null }
29
- | undefined;
28
+ { current: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | null } | undefined;
30
29
  const initialValue = user[1];
31
30
  const onReset = user[2] as (value: any) => void;
32
31
 
@@ -21,20 +21,14 @@ export function useObjectRef<T>(
21
21
  // Slot-threading form: sibling ported hooks pass their derived sub-slot as the trailing arg.
22
22
  export function useObjectRef<T>(
23
23
  ref:
24
- | ((instance: T | null) => (() => void) | void)
25
- | MutableRefObject<T | null>
26
- | null
27
- | undefined,
24
+ ((instance: T | null) => (() => void) | void) | MutableRefObject<T | null> | null | undefined,
28
25
  slot: symbol | undefined,
29
26
  ): MutableRefObject<T | null>;
30
27
  export function useObjectRef(...args: any[]): any {
31
28
  const [user, slotArg] = splitSlot(args);
32
29
  const slot = slotArg ?? S('useObjectRef');
33
30
  const ref = user[0] as
34
- | ((instance: any) => (() => void) | void)
35
- | MutableRefObject<any>
36
- | null
37
- | undefined;
31
+ ((instance: any) => (() => void) | void) | MutableRefObject<any> | null | undefined;
38
32
 
39
33
  const objRef: MutableRefObject<any> = useRef(null, subSlot(slot, 'obj'));
40
34
  const cleanupRef: MutableRefObject<(() => void) | void> = useRef(