@dxos/react-input 0.8.4-main.f9ba587 → 0.8.4-main.fffef41

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": "@dxos/react-input",
3
- "version": "0.8.4-main.f9ba587",
3
+ "version": "0.8.4-main.fffef41",
4
4
  "description": "Input primitive components for React.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -10,6 +10,7 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
15
  "browser": "./dist/lib/browser/index.mjs",
15
16
  "node": "./dist/lib/node-esm/index.mjs"
@@ -29,17 +30,17 @@
29
30
  "@radix-ui/react-use-controllable-state": "1.1.0",
30
31
  "lodash.omit": "^4.5.0",
31
32
  "rci": "^0.1.0",
32
- "@dxos/react-hooks": "0.8.4-main.f9ba587"
33
+ "@dxos/react-hooks": "0.8.4-main.fffef41"
33
34
  },
34
35
  "devDependencies": {
35
- "@types/react": "~18.2.0",
36
- "@types/react-dom": "~18.2.0",
37
- "react": "~18.2.0",
38
- "react-dom": "~18.2.0"
36
+ "@types/react": "~19.2.2",
37
+ "@types/react-dom": "~19.2.2",
38
+ "react": "~19.2.0",
39
+ "react-dom": "~19.2.0"
39
40
  },
40
41
  "peerDependencies": {
41
- "react": "~18.2.0",
42
- "react-dom": "~18.2.0"
42
+ "react": "^19.0.0",
43
+ "react-dom": "^19.0.0"
43
44
  },
44
45
  "publishConfig": {
45
46
  "access": "public"
package/src/PinInput.tsx CHANGED
@@ -3,11 +3,11 @@
3
3
  //
4
4
 
5
5
  import { CodeInput, getSegmentCssWidth } from 'rci';
6
- import React, { type ComponentProps, type ComponentPropsWithRef, forwardRef, useCallback } from 'react';
6
+ import React, { type ComponentProps, type ComponentPropsWithRef, type RefObject, forwardRef, useCallback } from 'react';
7
7
 
8
8
  import { useForwardedRef, useIsFocused } from '@dxos/react-hooks';
9
9
 
10
- import { INPUT_NAME, type InputScopedProps, useInputContext, type Valence } from './Root';
10
+ import { INPUT_NAME, type InputScopedProps, type Valence, useInputContext } from './Root';
11
11
 
12
12
  type PinInputProps = Omit<
13
13
  ComponentPropsWithRef<typeof CodeInput>,
@@ -66,7 +66,7 @@ const PinInput = forwardRef<HTMLInputElement, PinInputProps>(
66
66
  'aria-invalid': 'true' as const,
67
67
  'aria-errormessage': errorMessageId,
68
68
  }),
69
- inputRef,
69
+ inputRef: inputRef as RefObject<HTMLInputElement>,
70
70
  renderSegment,
71
71
  className: inputClassName,
72
72
  }}
package/src/Root.tsx CHANGED
@@ -2,7 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { createContextScope, type Scope } from '@radix-ui/react-context';
5
+ import { type Scope, createContextScope } from '@radix-ui/react-context';
6
6
  import React, { type PropsWithChildren } from 'react';
7
7
 
8
8
  import { useId } from '@dxos/react-hooks';