react-native-external-keyboard 0.11.0 → 1.0.0

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 (52) hide show
  1. package/android/src/main/java/com/externalkeyboard/ExternalKeyboardViewPackage.java +24 -22
  2. package/android/src/main/java/com/externalkeyboard/services/KeyboardService.java +4 -13
  3. package/android/src/newarch/TextInputFocusWrapperManagerSpec.java +0 -3
  4. package/lib/commonjs/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -3
  5. package/lib/commonjs/nativeSpec/ExternalKeyboardViewNativeComponent.ts +6 -5
  6. package/lib/commonjs/nativeSpec/KeyboardFocusGroupNativeComponent.ts +5 -3
  7. package/lib/commonjs/nativeSpec/TextInputFocusWrapperNativeComponent.ts +5 -3
  8. package/lib/module/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -3
  9. package/lib/module/nativeSpec/ExternalKeyboardViewNativeComponent.ts +6 -5
  10. package/lib/module/nativeSpec/KeyboardFocusGroupNativeComponent.ts +5 -3
  11. package/lib/module/nativeSpec/TextInputFocusWrapperNativeComponent.ts +5 -3
  12. package/lib/typescript/src/components/BaseKeyboardView/BaseKeyboardView.d.ts +129 -3
  13. package/lib/typescript/src/components/BaseKeyboardView/BaseKeyboardView.d.ts.map +1 -1
  14. package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.d.ts +372 -6
  15. package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.d.ts.map +1 -1
  16. package/lib/typescript/src/components/KeyboardFocusLock/FocusFrame/FocusFrame.d.ts +1 -1
  17. package/lib/typescript/src/components/KeyboardFocusLock/FocusFrame/FocusFrame.d.ts.map +1 -1
  18. package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.d.ts +1 -1
  19. package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.d.ts.map +1 -1
  20. package/lib/typescript/src/components/KeyboardFocusView/KeyboardFocusView.d.ts +124 -1
  21. package/lib/typescript/src/components/KeyboardFocusView/KeyboardFocusView.d.ts.map +1 -1
  22. package/lib/typescript/src/components/Touchable/Pressable.d.ts +158 -1
  23. package/lib/typescript/src/components/Touchable/Pressable.d.ts.map +1 -1
  24. package/lib/typescript/src/context/OrderFocusContext.d.ts +1 -1
  25. package/lib/typescript/src/context/OrderFocusContext.d.ts.map +1 -1
  26. package/lib/typescript/src/index.d.ts +656 -9
  27. package/lib/typescript/src/index.d.ts.map +1 -1
  28. package/lib/typescript/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.d.ts +2 -2
  29. package/lib/typescript/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.d.ts.map +1 -1
  30. package/lib/typescript/src/nativeSpec/ExternalKeyboardViewNativeComponent.d.ts +2 -2
  31. package/lib/typescript/src/nativeSpec/ExternalKeyboardViewNativeComponent.d.ts.map +1 -1
  32. package/lib/typescript/src/nativeSpec/KeyboardFocusGroupNativeComponent.d.ts +2 -2
  33. package/lib/typescript/src/nativeSpec/KeyboardFocusGroupNativeComponent.d.ts.map +1 -1
  34. package/lib/typescript/src/nativeSpec/NativeExternalKeyboardModule.d.ts +1 -1
  35. package/lib/typescript/src/nativeSpec/TextInputFocusWrapperNativeComponent.d.ts +2 -2
  36. package/lib/typescript/src/nativeSpec/TextInputFocusWrapperNativeComponent.d.ts.map +1 -1
  37. package/lib/typescript/src/types/focus.types.d.ts +1 -10
  38. package/lib/typescript/src/types/focus.types.d.ts.map +1 -1
  39. package/lib/typescript/src/utils/useFocusStyle.d.ts +1005 -3
  40. package/lib/typescript/src/utils/useFocusStyle.d.ts.map +1 -1
  41. package/lib/typescript/src/utils/useKeyboardFocusContainer.d.ts +867 -3
  42. package/lib/typescript/src/utils/useKeyboardFocusContainer.d.ts.map +1 -1
  43. package/lib/typescript/src/utils/useRenderedChildren.d.ts +1 -1
  44. package/lib/typescript/src/utils/useRenderedChildren.d.ts.map +1 -1
  45. package/lib/typescript/src/utils/withKeyboardFocus.d.ts +6 -2
  46. package/lib/typescript/src/utils/withKeyboardFocus.d.ts.map +1 -1
  47. package/package.json +4 -7
  48. package/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -3
  49. package/src/nativeSpec/ExternalKeyboardViewNativeComponent.ts +6 -5
  50. package/src/nativeSpec/KeyboardFocusGroupNativeComponent.ts +5 -3
  51. package/src/nativeSpec/TextInputFocusWrapperNativeComponent.ts +5 -3
  52. package/src/types/focus.types.ts +1 -10
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyboardFocusContainer.d.ts","sourceRoot":"","sources":["../../../../src/utils/useKeyboardFocusContainer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEzD,KAAK,eAAe,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;AAE7C,MAAM,MAAM,8BAA8B,CACxC,MAAM,SAAS,eAAe,GAAG,eAAe,EAChD,aAAa,SAAS,eAAe,GAAG,eAAe,IACrD;IACF,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAChC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,cAAc,CAAC,EAAE,YAAY,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,yBAAyB,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;CADpwtB,CAAC"}
@@ -13,6 +13,6 @@ type UseRenderedChildrenProps = {
13
13
  * - `renderFocusable` is evaluated immediately and returned as a static node
14
14
  * Returns `undefined` when neither prop is provided.
15
15
  */
16
- export declare const useRenderedChildren: ({ focused, keyboardPressed, renderContent, renderFocusable, }: UseRenderedChildrenProps) => string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | ((state: Record<string, unknown>) => import("react").ReactNode) | null | undefined;
16
+ export declare const useRenderedChildren: ({ focused, keyboardPressed, renderContent, renderFocusable, }: UseRenderedChildrenProps) => string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | ((state: Record<string, unknown>) => import("react").ReactNode) | null | undefined;
17
17
  export {};
18
18
  //# sourceMappingURL=useRenderedChildren.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useRenderedChildren.d.ts","sourceRoot":"","sources":["../../../../src/utils/useRenderedChildren.ts"],"names":[],"mappings":"AAEA,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACpE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;CACpE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,+DAKjC,wBAAwB,yKAIT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,kDAgBxC,CAAC"}
1
+ {"version":3,"file":"useRenderedChildren.d.ts","sourceRoot":"","sources":["../../../../src/utils/useRenderedChildren.ts"],"names":[],"mappings":"AAEA,KAAK,wBAAwB,GAAG;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACpE,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;CACpE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAI,+DAKjC,wBAAwB,wZAIT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,kDAgBxC,CAAC"}
@@ -1,5 +1,9 @@
1
1
  import React from 'react';
2
- import { View } from 'react-native';
2
+ import { View, type ViewProps } from 'react-native';
3
3
  import type { WithKeyboardFocusProps, KeyboardFocusableComponent } from '../types';
4
- export declare const withKeyboardFocus: <ComponentProps extends object, ViewStyleType, ViewType = View>(Component: KeyboardFocusableComponent<ComponentProps>) => React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<WithKeyboardFocusProps<ComponentProps, ViewStyleType, ViewType>> & React.RefAttributes<import("..").KeyboardFocus | View>>>;
4
+ export declare const withKeyboardFocus: <ComponentProps extends object, ViewStyleType, ViewType = View>(Component: KeyboardFocusableComponent<ComponentProps>) => React.NamedExoticComponent<React.PropsWithoutRef<WithKeyboardFocusProps<ComponentProps, ViewStyleType, ViewType>> & React.RefAttributes<import("..").KeyboardFocus | ((props: Omit<ViewProps, keyof {
5
+ ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
6
+ }> & {
7
+ ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
8
+ }) => React.ReactNode)>>;
5
9
  //# sourceMappingURL=withKeyboardFocus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withKeyboardFocus.d.ts","sourceRoot":"","sources":["../../../../src/utils/withKeyboardFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,EAA4B,IAAI,EAAkB,MAAM,cAAc,CAAC;AAE9E,OAAO,KAAK,EAIV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAKlB,eAAO,MAAM,iBAAiB,GAC5B,cAAc,SAAS,MAAM,EAC7B,aAAa,EACb,QAAQ,GAAG,IAAI,EAEf,WAAW,0BAA0B,CAAC,cAAc,CAAC,gNAyMtD,CAAC"}
1
+ {"version":3,"file":"withKeyboardFocus.d.ts","sourceRoot":"","sources":["../../../../src/utils/withKeyboardFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AACvD,OAAO,EAA4B,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9E,OAAO,KAAK,EAIV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAKlB,eAAO,MAAM,iBAAiB,GAC5B,cAAc,SAAS,MAAM,EAC7B,aAAa,EACb,QAAQ,GAAG,IAAI,EAEf,WAAW,0BAA0B,CAAC,cAAc,CAAC;OAK5B,CAAC;;OAEtB,CAAD;wBAkMJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-external-keyboard",
3
- "version": "0.11.0",
3
+ "version": "1.0.0",
4
4
  "description": "Toolkit for improving physical keyboard support in React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -73,7 +73,7 @@
73
73
  "@react-native/eslint-config": "0.83.4",
74
74
  "@release-it/conventional-changelog": "^10.0.1",
75
75
  "@types/jest": "^29.5.14",
76
- "@types/react": "^18.3.30",
76
+ "@types/react": "^19.2.0",
77
77
  "commitlint": "^19.8.1",
78
78
  "del-cli": "^6.0.0",
79
79
  "eslint": "^9.35.0",
@@ -82,8 +82,8 @@
82
82
  "jest": "^29.7.0",
83
83
  "lefthook": "^2.0.3",
84
84
  "prettier": "^2.8.8",
85
- "react": "18.3.1",
86
- "react-native": "0.76.5",
85
+ "react": "19.2.0",
86
+ "react-native": "0.83.4",
87
87
  "react-native-builder-bob": "^0.40.18",
88
88
  "release-it": "^19.0.4",
89
89
  "turbo": "^2.5.6",
@@ -93,9 +93,6 @@
93
93
  "react": "*",
94
94
  "react-native": "*"
95
95
  },
96
- "resolutions": {
97
- "@types/react": "^18.3.30"
98
- },
99
96
  "workspaces": [
100
97
  "example"
101
98
  ],
@@ -1,7 +1,5 @@
1
- import type { ViewProps } from 'react-native';
1
+ import { codegenNativeComponent, type ViewProps } from 'react-native';
2
2
  import type { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
- // eslint-disable-next-line @react-native/no-deep-imports
4
- import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
5
3
 
6
4
  export interface ExternalKeyboardLockViewNativeComponentProps
7
5
  extends ViewProps {
@@ -1,4 +1,9 @@
1
- import type { ColorValue, ViewProps } from 'react-native';
1
+ import {
2
+ codegenNativeComponent,
3
+ codegenNativeCommands,
4
+ type ColorValue,
5
+ type ViewProps,
6
+ } from 'react-native';
2
7
  import type {
3
8
  BubblingEventHandler,
4
9
  DirectEventHandler,
@@ -6,10 +11,6 @@ import type {
6
11
  Int32,
7
12
  } from 'react-native/Libraries/Types/CodegenTypes';
8
13
  import type { ComponentType } from 'react';
9
- // eslint-disable-next-line @react-native/no-deep-imports
10
- import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
11
- // eslint-disable-next-line @react-native/no-deep-imports
12
- import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
13
14
 
14
15
  export type FocusChange = Readonly<{
15
16
  isFocused: boolean;
@@ -1,7 +1,9 @@
1
- import type { ViewProps, ColorValue } from 'react-native';
1
+ import {
2
+ codegenNativeComponent,
3
+ type ViewProps,
4
+ type ColorValue,
5
+ } from 'react-native';
2
6
  import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
3
- // eslint-disable-next-line @react-native/no-deep-imports
4
- import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
5
7
 
6
8
  export type FocusChange = Readonly<{
7
9
  isFocused: boolean;
@@ -1,11 +1,13 @@
1
- import type { ViewProps, ColorValue } from 'react-native';
1
+ import {
2
+ codegenNativeComponent,
3
+ type ViewProps,
4
+ type ColorValue,
5
+ } from 'react-native';
2
6
  import type {
3
7
  DirectEventHandler,
4
8
  Float,
5
9
  Int32,
6
10
  } from 'react-native/Libraries/Types/CodegenTypes';
7
- // eslint-disable-next-line @react-native/no-deep-imports
8
- import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
9
11
 
10
12
  export type FocusChange = Readonly<{
11
13
  isFocused: boolean;
@@ -1,13 +1,4 @@
1
- import type { ElementRef } from 'react';
2
- import type { HostComponent, NativeSyntheticEvent } from 'react-native';
3
-
4
- /**
5
- * The host view ref instance (`measure`, `measureInWindow`, `setNativeProps`, …).
6
- *
7
- * RN exposes this as `HostInstance` from 0.77 onward; we derive it from
8
- * `HostComponent` so the type also resolves on older RN (e.g. 0.76).
9
- */
10
- type HostInstance = ElementRef<HostComponent<unknown>>;
1
+ import type { HostInstance, NativeSyntheticEvent } from 'react-native';
11
2
 
12
3
  /**
13
4
  * Handler invoked when a view gains or loses keyboard focus.