@onekeyfe/react-native-text 6.7.0-alpha.430 → 6.7.0-alpha.435

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.
@@ -6,74 +6,10 @@
6
6
  *
7
7
  * Adapted for the OneKey Android native Text component.
8
8
  */
9
- import { type GestureResponderEvent } from 'react-native';
10
- export declare const Text: import("react").ForwardRefExoticComponent<Readonly<Omit<Readonly<{
11
- onPointerEnter?: (event: import("react-native").PointerEvent) => void;
12
- onPointerLeave?: (event: import("react-native").PointerEvent) => void;
13
- onPointerMove?: (event: import("react-native").PointerEvent) => void;
14
- }>, "onMoveShouldSetResponder" | "onResponderGrant" | "onResponderMove" | "onResponderRelease" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "id" | "testID" | "nativeID" | "onAccessibilityAction" | "onLayout" | "adjustsFontSizeToFit" | "allowFontScaling" | "android_hyphenationFrequency" | "dataDetectorType" | "disabled" | "dynamicTypeRamp" | "ellipsizeMode" | "lineBreakStrategyIOS" | "maxFontSizeMultiplier" | "minimumFontScale" | "numberOfLines" | "onTextLayout" | "selectable" | "selectionColor" | "textBreakStrategy" | "suppressHighlighting" | "onLongPress" | "onPress" | "onPressIn" | "onPressOut" | "pressRetentionOffset"> & Omit<import("react-native/types_generated/Libraries/Text/TextProps").TextPropsIOS, "onMoveShouldSetResponder" | "onResponderGrant" | "onResponderMove" | "onResponderRelease" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "id" | "testID" | "nativeID" | "onAccessibilityAction" | "onLayout" | "allowFontScaling" | "android_hyphenationFrequency" | "ellipsizeMode" | "maxFontSizeMultiplier" | "numberOfLines" | "onTextLayout" | "selectable" | keyof import("react-native/types_generated/Libraries/Text/TextProps").TextPropsAndroid | "onLongPress" | "onPress" | "onPressIn" | "onPressOut" | "pressRetentionOffset"> & Omit<import("react-native/types_generated/Libraries/Text/TextProps").TextPropsAndroid, "onMoveShouldSetResponder" | "onResponderGrant" | "onResponderMove" | "onResponderRelease" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "id" | "testID" | "nativeID" | "onAccessibilityAction" | "onLayout" | "allowFontScaling" | "android_hyphenationFrequency" | "ellipsizeMode" | "maxFontSizeMultiplier" | "numberOfLines" | "onTextLayout" | "selectable" | "onLongPress" | "onPress" | "onPressIn" | "onPressOut" | "pressRetentionOffset"> & Omit<Readonly<{
15
- onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
16
- allowFontScaling?: boolean | undefined;
17
- android_hyphenationFrequency?: ("normal" | "none" | "full") | undefined;
18
- children?: React.ReactNode | undefined;
19
- ellipsizeMode?: ("clip" | "head" | "middle" | "tail") | undefined;
20
- id?: string;
21
- maxFontSizeMultiplier?: number | undefined;
22
- nativeID?: string | undefined;
23
- numberOfLines?: number | undefined;
24
- onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
25
- onLongPress?: ((event: GestureResponderEvent) => unknown) | undefined;
26
- onPress?: ((event: GestureResponderEvent) => unknown) | undefined;
27
- onPressIn?: ((event: GestureResponderEvent) => unknown) | undefined;
28
- onPressOut?: ((event: GestureResponderEvent) => unknown) | undefined;
29
- onResponderGrant?: ((event: GestureResponderEvent) => void) | undefined;
30
- onResponderMove?: ((event: GestureResponderEvent) => void) | undefined;
31
- onResponderRelease?: ((event: GestureResponderEvent) => void) | undefined;
32
- onResponderTerminate?: ((event: GestureResponderEvent) => void) | undefined;
33
- onResponderTerminationRequest?: (() => boolean) | undefined;
34
- onStartShouldSetResponder?: (() => boolean) | undefined;
35
- onMoveShouldSetResponder?: (() => boolean) | undefined;
36
- onTextLayout?: ((event: import("react-native").TextLayoutEvent) => unknown) | undefined;
37
- pressRetentionOffset?: import("react-native/types_generated/Libraries/Text/TextProps").PressRetentionOffset | undefined;
38
- role?: import("react-native").Role | undefined;
39
- selectable?: boolean | undefined;
40
- style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").TextStyleProp | undefined;
41
- testID?: string | undefined;
42
- }>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable"> & Omit<Readonly<Omit<Readonly<{
43
- accessibilityLabelledBy?: (string | undefined) | (Array<string> | undefined);
44
- "aria-labelledby"?: string | undefined;
45
- accessibilityLiveRegion?: ("none" | "polite" | "assertive") | undefined;
46
- "aria-live"?: ("polite" | "assertive" | "off") | undefined;
47
- importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
48
- screenReaderFocusable?: boolean;
49
- }>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & Omit<Readonly<{
50
- accessibilityIgnoresInvertColors?: boolean | undefined;
51
- accessibilityViewIsModal?: boolean | undefined;
52
- accessibilityShowsLargeContentViewer?: boolean | undefined;
53
- accessibilityLargeContentTitle?: string | undefined;
54
- "aria-modal"?: boolean | undefined;
55
- accessibilityElementsHidden?: boolean | undefined;
56
- accessibilityLanguage?: string | undefined;
57
- accessibilityRespondsToUserInteraction?: boolean | undefined;
58
- }>, "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & {
59
- accessible?: boolean | undefined;
60
- accessibilityLabel?: string | undefined;
61
- accessibilityHint?: string | undefined;
62
- "aria-label"?: string | undefined;
63
- accessibilityRole?: import("react-native").AccessibilityRole | undefined;
64
- role?: import("react-native").Role | undefined;
65
- accessibilityState?: import("react-native").AccessibilityState | undefined;
66
- accessibilityValue?: import("react-native").AccessibilityValue | undefined;
67
- "aria-valuemax"?: import("react-native").AccessibilityValue["max"] | undefined;
68
- "aria-valuemin"?: import("react-native").AccessibilityValue["min"] | undefined;
69
- "aria-valuenow"?: import("react-native").AccessibilityValue["now"] | undefined;
70
- "aria-valuetext"?: import("react-native").AccessibilityValue["text"] | undefined;
71
- accessibilityActions?: ReadonlyArray<import("react-native/types_generated/Libraries/Components/View/ViewAccessibility").AccessibilityActionInfo> | undefined;
72
- "aria-busy"?: boolean | undefined;
73
- "aria-checked"?: (boolean | undefined) | "mixed";
74
- "aria-disabled"?: boolean | undefined;
75
- "aria-expanded"?: boolean | undefined;
76
- "aria-selected"?: boolean | undefined;
77
- "aria-hidden"?: boolean | undefined;
78
- }>, never>> & import("react").RefAttributes<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>>;
9
+ import { type HostInstance } from 'react-native';
10
+ import { type ForwardRefExoticComponent, type PropsWithoutRef, type RefAttributes } from 'react';
11
+ import type { TextProps } from './types';
12
+ type TextForwardRef = HostInstance;
13
+ export declare const Text: ForwardRefExoticComponent<PropsWithoutRef<TextProps> & RefAttributes<TextForwardRef>>;
14
+ export {};
79
15
  //# sourceMappingURL=Text.android.d.ts.map
@@ -1,6 +1,4 @@
1
- export declare const Text: (props: Omit<import("react-native").TextProps, keyof {
2
- ref?: React.Ref<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>;
3
- }> & {
4
- ref?: React.Ref<import("react-native/types_generated/src/private/webapis/dom/nodes/ReactNativeElement").default>;
1
+ export declare const Text: (props: Omit<import("react-native").TextProps, "ref"> & {
2
+ ref?: React.Ref<import("react-native").TextInstance> | undefined;
5
3
  }) => React.ReactNode;
6
4
  //# sourceMappingURL=Text.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-text",
3
- "version": "6.7.0-alpha.430",
3
+ "version": "6.7.0-alpha.435",
4
4
  "description": "Opt-in native text rendering for React Native",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/module/index.js",
@@ -60,10 +60,10 @@
60
60
  "@eslint/compat": "^1.3.2",
61
61
  "@eslint/eslintrc": "^3.3.1",
62
62
  "@eslint/js": "^9.35.0",
63
- "@react-native/babel-preset": "0.86.2",
64
- "@react-native/eslint-config": "0.86.2",
63
+ "@react-native/babel-preset": "0.88.0",
64
+ "@react-native/eslint-config": "0.88.0",
65
65
  "@types/jest": "^29.5.14",
66
- "@types/react": "^19.2.0",
66
+ "@types/react": "^19.3.0",
67
67
  "@types/react-test-renderer": "^19.1.0",
68
68
  "del-cli": "^6.0.0",
69
69
  "eslint": "^9.35.0",
@@ -71,10 +71,10 @@
71
71
  "eslint-plugin-prettier": "^5.5.4",
72
72
  "jest": "^29.7.0",
73
73
  "prettier": "^2.8.8",
74
- "react": "19.2.3",
75
- "react-native": "patch:react-native@npm%3A0.86.2#~/.yarn/patches/react-native-npm-0.86.2-c9d546616f.patch",
74
+ "react": "19.3.0",
75
+ "react-native": "patch:react-native@npm%3A0.88.0#~/.yarn/patches/react-native-npm-0.88.0-60c6201dd2.patch",
76
76
  "react-native-builder-bob": "^0.40.13",
77
- "react-test-renderer": "19.2.3",
77
+ "react-test-renderer": "19.3.0",
78
78
  "typescript": "^5.9.2"
79
79
  },
80
80
  "peerDependencies": {
@@ -108,7 +108,7 @@
108
108
  "useTabs": false
109
109
  },
110
110
  "jest": {
111
- "preset": "react-native"
111
+ "preset": "@react-native/jest-preset"
112
112
  },
113
113
  "codegenConfig": {
114
114
  "name": "RNOneKeyTextSpec",
@@ -21,7 +21,16 @@ import {
21
21
  type HostInstance,
22
22
  type TextStyle,
23
23
  } from 'react-native';
24
- import { forwardRef, useContext, useMemo, useState, type Ref } from 'react';
24
+ import {
25
+ forwardRef,
26
+ useContext,
27
+ useMemo,
28
+ useState,
29
+ type ForwardRefExoticComponent,
30
+ type PropsWithoutRef,
31
+ type Ref,
32
+ type RefAttributes,
33
+ } from 'react';
25
34
 
26
35
  import OneKeyTextNativeComponent from './OneKeyTextNativeHost';
27
36
  import type { NativeProps } from './OneKeyTextNativeComponent';
@@ -455,7 +464,9 @@ function TextImpl(props: TextProps, forwardedRef: Ref<TextForwardRef>) {
455
464
  return nativeText;
456
465
  }
457
466
 
458
- export const Text = forwardRef<TextForwardRef, TextProps>(TextImpl);
467
+ export const Text: ForwardRefExoticComponent<
468
+ PropsWithoutRef<TextProps> & RefAttributes<TextForwardRef>
469
+ > = forwardRef<TextForwardRef, TextProps>(TextImpl);
459
470
  Text.displayName = 'Text';
460
471
 
461
472
  const userSelectToSelectableMap = {