@onekeyfe/react-native-image 6.7.0-alpha.412 → 6.7.0-alpha.414

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 (83) hide show
  1. package/README.md +0 -12
  2. package/android/build.gradle +1 -3
  3. package/android/src/main/java/com/margelo/nitro/onekeyimage/OneKeyImageGlideRegistry.kt +1 -1
  4. package/android/src/main/java/com/margelo/nitro/onekeyimage/OneKeyImagePackage.kt +1 -2
  5. package/ios/OneKeyImageCoderBridge.h +0 -4
  6. package/ios/OneKeyImageCoderBridge.m +0 -9
  7. package/lib/module/package.json +1 -6
  8. package/lib/nitrogen/generated/android/onekeyimage+autolinking.cmake +0 -4
  9. package/lib/nitrogen/generated/android/onekeyimageOnLoad.cpp +0 -18
  10. package/lib/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Bridge.cpp +0 -17
  11. package/lib/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Bridge.hpp +15 -32
  12. package/lib/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Umbrella.hpp +0 -5
  13. package/lib/nitrogen/generated/ios/OneKeyImageAutolinking.mm +0 -8
  14. package/lib/nitrogen/generated/ios/OneKeyImageAutolinking.swift +0 -12
  15. package/nitro.json +0 -10
  16. package/nitrogen/generated/android/onekeyimage+autolinking.cmake +0 -4
  17. package/nitrogen/generated/android/onekeyimageOnLoad.cpp +0 -18
  18. package/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Bridge.cpp +0 -17
  19. package/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Bridge.hpp +15 -32
  20. package/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Umbrella.hpp +0 -5
  21. package/nitrogen/generated/ios/OneKeyImageAutolinking.mm +0 -8
  22. package/nitrogen/generated/ios/OneKeyImageAutolinking.swift +0 -12
  23. package/package.json +7 -40
  24. package/android/src/main/java/com/margelo/nitro/onekeyimage/OneKeyIcon.kt +0 -93
  25. package/android/src/main/java/com/margelo/nitro/onekeyimage/OneKeyNamedSVG.kt +0 -217
  26. package/android/src/main/java/com/margelo/nitro/onekeyimage/OneKeySVG.kt +0 -31
  27. package/ios/OneKeyIcon.swift +0 -90
  28. package/ios/OneKeyNamedSVG.swift +0 -282
  29. package/ios/tests/OneKeyIconTests.swift +0 -484
  30. package/lib/module/OneKeyIcon.nitro.js +0 -4
  31. package/lib/module/icon/assetUrls.js +0 -7
  32. package/lib/module/icon/dom.js +0 -21
  33. package/lib/module/icon/index.js +0 -29
  34. package/lib/module/icon/index.web.js +0 -32
  35. package/lib/module/icon/props.js +0 -22
  36. package/lib/nitrogen/generated/android/c++/JHybridOneKeyIconSpec.cpp +0 -67
  37. package/lib/nitrogen/generated/android/c++/JHybridOneKeyIconSpec.hpp +0 -66
  38. package/lib/nitrogen/generated/android/c++/views/JHybridOneKeyIconStateUpdater.cpp +0 -79
  39. package/lib/nitrogen/generated/android/c++/views/JHybridOneKeyIconStateUpdater.hpp +0 -54
  40. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/HybridOneKeyIconSpec.kt +0 -65
  41. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/views/HybridOneKeyIconManager.kt +0 -96
  42. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/views/HybridOneKeyIconStateUpdater.kt +0 -23
  43. package/lib/nitrogen/generated/ios/c++/HybridOneKeyIconSpecSwift.cpp +0 -11
  44. package/lib/nitrogen/generated/ios/c++/HybridOneKeyIconSpecSwift.hpp +0 -89
  45. package/lib/nitrogen/generated/ios/c++/views/HybridOneKeyIconComponent.mm +0 -150
  46. package/lib/nitrogen/generated/ios/swift/HybridOneKeyIconSpec.swift +0 -56
  47. package/lib/nitrogen/generated/ios/swift/HybridOneKeyIconSpec_cxx.swift +0 -193
  48. package/lib/nitrogen/generated/shared/c++/HybridOneKeyIconSpec.cpp +0 -24
  49. package/lib/nitrogen/generated/shared/c++/HybridOneKeyIconSpec.hpp +0 -66
  50. package/lib/nitrogen/generated/shared/c++/views/HybridOneKeyIconComponent.cpp +0 -36
  51. package/lib/nitrogen/generated/shared/c++/views/HybridOneKeyIconComponent.hpp +0 -88
  52. package/lib/nitrogen/generated/shared/json/OneKeyIconConfig.json +0 -11
  53. package/lib/typescript/src/OneKeyIcon.nitro.d.ts +0 -7
  54. package/lib/typescript/src/icon/assetUrls.d.ts +0 -2
  55. package/lib/typescript/src/icon/dom.d.ts +0 -3
  56. package/lib/typescript/src/icon/index.d.ts +0 -140
  57. package/lib/typescript/src/icon/index.web.d.ts +0 -134
  58. package/lib/typescript/src/icon/props.d.ts +0 -8
  59. package/nitrogen/generated/android/c++/JHybridOneKeyIconSpec.cpp +0 -67
  60. package/nitrogen/generated/android/c++/JHybridOneKeyIconSpec.hpp +0 -66
  61. package/nitrogen/generated/android/c++/views/JHybridOneKeyIconStateUpdater.cpp +0 -79
  62. package/nitrogen/generated/android/c++/views/JHybridOneKeyIconStateUpdater.hpp +0 -54
  63. package/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/HybridOneKeyIconSpec.kt +0 -65
  64. package/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/views/HybridOneKeyIconManager.kt +0 -96
  65. package/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/views/HybridOneKeyIconStateUpdater.kt +0 -23
  66. package/nitrogen/generated/ios/c++/HybridOneKeyIconSpecSwift.cpp +0 -11
  67. package/nitrogen/generated/ios/c++/HybridOneKeyIconSpecSwift.hpp +0 -89
  68. package/nitrogen/generated/ios/c++/views/HybridOneKeyIconComponent.mm +0 -150
  69. package/nitrogen/generated/ios/swift/HybridOneKeyIconSpec.swift +0 -56
  70. package/nitrogen/generated/ios/swift/HybridOneKeyIconSpec_cxx.swift +0 -193
  71. package/nitrogen/generated/shared/c++/HybridOneKeyIconSpec.cpp +0 -24
  72. package/nitrogen/generated/shared/c++/HybridOneKeyIconSpec.hpp +0 -66
  73. package/nitrogen/generated/shared/c++/views/HybridOneKeyIconComponent.cpp +0 -36
  74. package/nitrogen/generated/shared/c++/views/HybridOneKeyIconComponent.hpp +0 -88
  75. package/nitrogen/generated/shared/json/OneKeyIconConfig.json +0 -11
  76. package/scripts/configure-icon-imports.mjs +0 -7
  77. package/scripts/icon-fixtures.test.mjs +0 -398
  78. package/src/OneKeyIcon.nitro.ts +0 -8
  79. package/src/icon/assetUrls.ts +0 -4
  80. package/src/icon/dom.ts +0 -21
  81. package/src/icon/index.tsx +0 -38
  82. package/src/icon/index.web.tsx +0 -36
  83. package/src/icon/props.ts +0 -38
@@ -1,140 +0,0 @@
1
- import { type HybridViewMethods } from 'react-native-nitro-modules';
2
- import type { OneKeyIconNativeProps } from '../OneKeyIcon.nitro';
3
- import { type OneKeyIconProps } from './props';
4
- export type { OneKeyIconProps } from './props';
5
- export declare function OneKeyIcon({ name, color, style, ...viewProps }: OneKeyIconProps): import("react").FunctionComponentElement<Omit<{
6
- hybridRef?: import("react-native-nitro-modules").NitroViewWrappedCallback<((ref: import("react-native-nitro-modules").HybridView<OneKeyIconNativeProps, HybridViewMethods>) => void) | undefined> | undefined;
7
- iconName?: string | undefined;
8
- resolvedColor?: string | undefined;
9
- } & Readonly<Omit<Readonly<{
10
- onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
11
- onAccessibilityTap?: (() => unknown) | undefined;
12
- onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
13
- onMagicTap?: (() => unknown) | undefined;
14
- onAccessibilityEscape?: (() => unknown) | undefined;
15
- }>, "onMoveShouldSetResponder" | "onMoveShouldSetResponderCapture" | "onResponderGrant" | "onResponderMove" | "onResponderReject" | "onResponderRelease" | "onResponderStart" | "onResponderEnd" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "onStartShouldSetResponderCapture" | "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
16
- onMoveShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
17
- onMoveShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
18
- onResponderGrant?: ((e: import("react-native").GestureResponderEvent) => void | boolean) | undefined;
19
- onResponderMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
20
- onResponderReject?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
21
- onResponderRelease?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
22
- onResponderStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
23
- onResponderEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
24
- onResponderTerminate?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
25
- onResponderTerminationRequest?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
26
- onStartShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
27
- onStartShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
28
- }>, "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
29
- onMouseEnter?: ((event: import("react-native").MouseEvent) => void) | undefined;
30
- onMouseLeave?: ((event: import("react-native").MouseEvent) => void) | undefined;
31
- }>, "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
32
- onClick?: ((event: import("react-native").PointerEvent) => void) | undefined;
33
- onClickCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
34
- onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
35
- onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
36
- onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
37
- onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
38
- onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
39
- onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
40
- onPointerCancel?: ((e: import("react-native").PointerEvent) => void) | undefined;
41
- onPointerCancelCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
42
- onPointerDown?: ((e: import("react-native").PointerEvent) => void) | undefined;
43
- onPointerDownCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
44
- onPointerUp?: ((e: import("react-native").PointerEvent) => void) | undefined;
45
- onPointerUpCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
46
- onPointerOver?: ((e: import("react-native").PointerEvent) => void) | undefined;
47
- onPointerOverCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
48
- onPointerOut?: ((e: import("react-native").PointerEvent) => void) | undefined;
49
- onPointerOutCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
50
- onGotPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
51
- onGotPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
52
- onLostPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
53
- onLostPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
54
- }>, "onClick" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
55
- onBlur?: ((event: import("react-native").BlurEvent) => void) | undefined;
56
- onBlurCapture?: ((event: import("react-native").BlurEvent) => void) | undefined;
57
- onFocus?: ((event: import("react-native").FocusEvent) => void) | undefined;
58
- onFocusCapture?: ((event: import("react-native").FocusEvent) => void) | undefined;
59
- }>, "onClick" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
60
- onKeyDown?: ((event: import("react-native").KeyDownEvent) => void) | undefined;
61
- onKeyDownCapture?: ((event: import("react-native").KeyDownEvent) => void) | undefined;
62
- onKeyUp?: ((event: import("react-native").KeyUpEvent) => void) | undefined;
63
- onKeyUpCapture?: ((event: import("react-native").KeyUpEvent) => void) | undefined;
64
- }>, "onClick" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
65
- onTouchCancel?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
66
- onTouchCancelCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
67
- onTouchEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
68
- onTouchEndCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
69
- onTouchMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
70
- onTouchMoveCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
71
- onTouchStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
72
- onTouchStartCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
73
- }>, "onClick" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
74
- nativeBackgroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
75
- nativeForegroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
76
- renderToHardwareTextureAndroid?: boolean | undefined;
77
- hasTVPreferredFocus?: boolean | undefined;
78
- nextFocusDown?: number | undefined;
79
- nextFocusForward?: number | undefined;
80
- nextFocusLeft?: number | undefined;
81
- nextFocusRight?: number | undefined;
82
- nextFocusUp?: number | undefined;
83
- focusable?: boolean | undefined;
84
- tabIndex?: 0 | -1;
85
- onClick?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
86
- }>, "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
87
- shouldRasterizeIOS?: boolean | undefined;
88
- }>, "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<Omit<Readonly<{
89
- accessibilityLabelledBy?: (string | undefined) | (Array<string> | undefined);
90
- "aria-labelledby"?: string | undefined;
91
- accessibilityLiveRegion?: ("none" | "polite" | "assertive") | undefined;
92
- "aria-live"?: ("polite" | "assertive" | "off") | undefined;
93
- importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
94
- screenReaderFocusable?: boolean;
95
- }>, "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<{
96
- accessibilityIgnoresInvertColors?: boolean | undefined;
97
- accessibilityViewIsModal?: boolean | undefined;
98
- accessibilityShowsLargeContentViewer?: boolean | undefined;
99
- accessibilityLargeContentTitle?: string | undefined;
100
- "aria-modal"?: boolean | undefined;
101
- accessibilityElementsHidden?: boolean | undefined;
102
- accessibilityLanguage?: string | undefined;
103
- accessibilityRespondsToUserInteraction?: boolean | undefined;
104
- }>, "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"> & {
105
- accessible?: boolean | undefined;
106
- accessibilityLabel?: string | undefined;
107
- accessibilityHint?: string | undefined;
108
- "aria-label"?: string | undefined;
109
- accessibilityRole?: import("react-native").AccessibilityRole | undefined;
110
- role?: import("react-native").Role | undefined;
111
- accessibilityState?: import("react-native").AccessibilityState | undefined;
112
- accessibilityValue?: import("react-native").AccessibilityValue | undefined;
113
- "aria-valuemax"?: import("react-native").AccessibilityValue["max"] | undefined;
114
- "aria-valuemin"?: import("react-native").AccessibilityValue["min"] | undefined;
115
- "aria-valuenow"?: import("react-native").AccessibilityValue["now"] | undefined;
116
- "aria-valuetext"?: import("react-native").AccessibilityValue["text"] | undefined;
117
- accessibilityActions?: ReadonlyArray<import("react-native/types_generated/Libraries/Components/View/ViewAccessibility").AccessibilityActionInfo> | undefined;
118
- "aria-busy"?: boolean | undefined;
119
- "aria-checked"?: (boolean | undefined) | "mixed";
120
- "aria-disabled"?: boolean | undefined;
121
- "aria-expanded"?: boolean | undefined;
122
- "aria-selected"?: boolean | undefined;
123
- "aria-hidden"?: boolean | undefined;
124
- }>, "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
125
- children?: React.ReactNode;
126
- style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").ViewStyleProp | undefined;
127
- collapsable?: boolean | undefined;
128
- collapsableChildren?: boolean | undefined;
129
- id?: string;
130
- testID?: string | undefined;
131
- nativeID?: string | undefined;
132
- needsOffscreenAlphaCompositing?: boolean | undefined;
133
- hitSlop?: import("react-native/types_generated/Libraries/StyleSheet/EdgeInsetsPropType").EdgeInsetsOrSizeProp | undefined;
134
- pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
135
- removeClippedSubviews?: boolean | undefined;
136
- experimental_accessibilityOrder?: Array<string> | undefined;
137
- }>, never>>, "ref"> & {
138
- ref?: React.Ref<import("react-native").HostInstance>;
139
- }>;
140
- //# sourceMappingURL=index.d.ts.map
@@ -1,134 +0,0 @@
1
- import { type OneKeyIconProps } from './props';
2
- export type { OneKeyIconProps } from './props';
3
- export declare function OneKeyIcon({ name, color, style, ...viewProps }: OneKeyIconProps): import("react").FunctionComponentElement<Omit<Readonly<Omit<Readonly<{
4
- onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
5
- onAccessibilityTap?: (() => unknown) | undefined;
6
- onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
7
- onMagicTap?: (() => unknown) | undefined;
8
- onAccessibilityEscape?: (() => unknown) | undefined;
9
- }>, "onMoveShouldSetResponder" | "onMoveShouldSetResponderCapture" | "onResponderGrant" | "onResponderMove" | "onResponderReject" | "onResponderRelease" | "onResponderStart" | "onResponderEnd" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "onStartShouldSetResponderCapture" | "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
10
- onMoveShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
11
- onMoveShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
12
- onResponderGrant?: ((e: import("react-native").GestureResponderEvent) => void | boolean) | undefined;
13
- onResponderMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
14
- onResponderReject?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
15
- onResponderRelease?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
16
- onResponderStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
17
- onResponderEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
18
- onResponderTerminate?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
19
- onResponderTerminationRequest?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
20
- onStartShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
21
- onStartShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
22
- }>, "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
23
- onMouseEnter?: ((event: import("react-native").MouseEvent) => void) | undefined;
24
- onMouseLeave?: ((event: import("react-native").MouseEvent) => void) | undefined;
25
- }>, "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
26
- onClick?: ((event: import("react-native").PointerEvent) => void) | undefined;
27
- onClickCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
28
- onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
29
- onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
30
- onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
31
- onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
32
- onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
33
- onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
34
- onPointerCancel?: ((e: import("react-native").PointerEvent) => void) | undefined;
35
- onPointerCancelCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
36
- onPointerDown?: ((e: import("react-native").PointerEvent) => void) | undefined;
37
- onPointerDownCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
38
- onPointerUp?: ((e: import("react-native").PointerEvent) => void) | undefined;
39
- onPointerUpCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
40
- onPointerOver?: ((e: import("react-native").PointerEvent) => void) | undefined;
41
- onPointerOverCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
42
- onPointerOut?: ((e: import("react-native").PointerEvent) => void) | undefined;
43
- onPointerOutCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
44
- onGotPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
45
- onGotPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
46
- onLostPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
47
- onLostPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
48
- }>, "onClick" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
49
- onBlur?: ((event: import("react-native").BlurEvent) => void) | undefined;
50
- onBlurCapture?: ((event: import("react-native").BlurEvent) => void) | undefined;
51
- onFocus?: ((event: import("react-native").FocusEvent) => void) | undefined;
52
- onFocusCapture?: ((event: import("react-native").FocusEvent) => void) | undefined;
53
- }>, "onClick" | "onKeyDown" | "onKeyDownCapture" | "onKeyUp" | "onKeyUpCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
54
- onKeyDown?: ((event: import("react-native").KeyDownEvent) => void) | undefined;
55
- onKeyDownCapture?: ((event: import("react-native").KeyDownEvent) => void) | undefined;
56
- onKeyUp?: ((event: import("react-native").KeyUpEvent) => void) | undefined;
57
- onKeyUpCapture?: ((event: import("react-native").KeyUpEvent) => void) | undefined;
58
- }>, "onClick" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
59
- onTouchCancel?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
60
- onTouchCancelCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
61
- onTouchEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
62
- onTouchEndCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
63
- onTouchMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
64
- onTouchMoveCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
65
- onTouchStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
66
- onTouchStartCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
67
- }>, "onClick" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
68
- nativeBackgroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
69
- nativeForegroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
70
- renderToHardwareTextureAndroid?: boolean | undefined;
71
- hasTVPreferredFocus?: boolean | undefined;
72
- nextFocusDown?: number | undefined;
73
- nextFocusForward?: number | undefined;
74
- nextFocusLeft?: number | undefined;
75
- nextFocusRight?: number | undefined;
76
- nextFocusUp?: number | undefined;
77
- focusable?: boolean | undefined;
78
- tabIndex?: 0 | -1;
79
- onClick?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
80
- }>, "shouldRasterizeIOS" | "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
81
- shouldRasterizeIOS?: boolean | undefined;
82
- }>, "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" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<Omit<Readonly<{
83
- accessibilityLabelledBy?: (string | undefined) | (Array<string> | undefined);
84
- "aria-labelledby"?: string | undefined;
85
- accessibilityLiveRegion?: ("none" | "polite" | "assertive") | undefined;
86
- "aria-live"?: ("polite" | "assertive" | "off") | undefined;
87
- importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
88
- screenReaderFocusable?: boolean;
89
- }>, "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<{
90
- accessibilityIgnoresInvertColors?: boolean | undefined;
91
- accessibilityViewIsModal?: boolean | undefined;
92
- accessibilityShowsLargeContentViewer?: boolean | undefined;
93
- accessibilityLargeContentTitle?: string | undefined;
94
- "aria-modal"?: boolean | undefined;
95
- accessibilityElementsHidden?: boolean | undefined;
96
- accessibilityLanguage?: string | undefined;
97
- accessibilityRespondsToUserInteraction?: boolean | undefined;
98
- }>, "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"> & {
99
- accessible?: boolean | undefined;
100
- accessibilityLabel?: string | undefined;
101
- accessibilityHint?: string | undefined;
102
- "aria-label"?: string | undefined;
103
- accessibilityRole?: import("react-native").AccessibilityRole | undefined;
104
- role?: import("react-native").Role | undefined;
105
- accessibilityState?: import("react-native").AccessibilityState | undefined;
106
- accessibilityValue?: import("react-native").AccessibilityValue | undefined;
107
- "aria-valuemax"?: import("react-native").AccessibilityValue["max"] | undefined;
108
- "aria-valuemin"?: import("react-native").AccessibilityValue["min"] | undefined;
109
- "aria-valuenow"?: import("react-native").AccessibilityValue["now"] | undefined;
110
- "aria-valuetext"?: import("react-native").AccessibilityValue["text"] | undefined;
111
- accessibilityActions?: ReadonlyArray<import("react-native/types_generated/Libraries/Components/View/ViewAccessibility").AccessibilityActionInfo> | undefined;
112
- "aria-busy"?: boolean | undefined;
113
- "aria-checked"?: (boolean | undefined) | "mixed";
114
- "aria-disabled"?: boolean | undefined;
115
- "aria-expanded"?: boolean | undefined;
116
- "aria-selected"?: boolean | undefined;
117
- "aria-hidden"?: boolean | undefined;
118
- }>, "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
119
- children?: React.ReactNode;
120
- style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").ViewStyleProp | undefined;
121
- collapsable?: boolean | undefined;
122
- collapsableChildren?: boolean | undefined;
123
- id?: string;
124
- testID?: string | undefined;
125
- nativeID?: string | undefined;
126
- needsOffscreenAlphaCompositing?: boolean | undefined;
127
- hitSlop?: import("react-native/types_generated/Libraries/StyleSheet/EdgeInsetsPropType").EdgeInsetsOrSizeProp | undefined;
128
- pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
129
- removeClippedSubviews?: boolean | undefined;
130
- experimental_accessibilityOrder?: Array<string> | undefined;
131
- }>, never>>, "ref"> & {
132
- ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
133
- }>;
134
- //# sourceMappingURL=index.web.d.ts.map
@@ -1,8 +0,0 @@
1
- import type { ViewProps } from 'react-native';
2
- export interface OneKeyIconProps extends Omit<ViewProps, 'children'> {
3
- name: string;
4
- color?: string;
5
- }
6
- export declare function normalizeIconColor(input?: string): string | undefined;
7
- export declare function isIconName(name: string): boolean;
8
- //# sourceMappingURL=props.d.ts.map
@@ -1,67 +0,0 @@
1
- ///
2
- /// JHybridOneKeyIconSpec.cpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © Marc Rousavy @ Margelo
6
- ///
7
-
8
- #include "JHybridOneKeyIconSpec.hpp"
9
-
10
-
11
-
12
- #include <string>
13
- #include <optional>
14
-
15
- namespace margelo::nitro::onekeyimage {
16
-
17
- std::shared_ptr<JHybridOneKeyIconSpec> JHybridOneKeyIconSpec::JavaPart::getJHybridOneKeyIconSpec() {
18
- auto hybridObject = JHybridObject::JavaPart::getJHybridObject();
19
- auto castHybridObject = std::dynamic_pointer_cast<JHybridOneKeyIconSpec>(hybridObject);
20
- if (castHybridObject == nullptr) [[unlikely]] {
21
- throw std::runtime_error("Failed to downcast JHybridObject to JHybridOneKeyIconSpec!");
22
- }
23
- return castHybridObject;
24
- }
25
-
26
- jni::local_ref<JHybridOneKeyIconSpec::CxxPart::jhybriddata> JHybridOneKeyIconSpec::CxxPart::initHybrid(jni::alias_ref<jhybridobject> jThis) {
27
- return makeCxxInstance(jThis);
28
- }
29
-
30
- std::shared_ptr<JHybridObject> JHybridOneKeyIconSpec::CxxPart::createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) {
31
- auto castJavaPart = jni::dynamic_ref_cast<JHybridOneKeyIconSpec::JavaPart>(javaPart);
32
- if (castJavaPart == nullptr) [[unlikely]] {
33
- throw std::runtime_error("Failed to cast JHybridObject::JavaPart to JHybridOneKeyIconSpec::JavaPart!");
34
- }
35
- return std::make_shared<JHybridOneKeyIconSpec>(castJavaPart);
36
- }
37
-
38
- void JHybridOneKeyIconSpec::CxxPart::registerNatives() {
39
- registerHybrid({
40
- makeNativeMethod("initHybrid", JHybridOneKeyIconSpec::CxxPart::initHybrid),
41
- });
42
- }
43
-
44
- // Properties
45
- std::optional<std::string> JHybridOneKeyIconSpec::getIconName() {
46
- static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getIconName");
47
- auto __result = method(_javaPart);
48
- return __result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt;
49
- }
50
- void JHybridOneKeyIconSpec::setIconName(const std::optional<std::string>& iconName) {
51
- static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* iconName */)>("setIconName");
52
- method(_javaPart, iconName.has_value() ? jni::make_jstring(iconName.value()) : nullptr);
53
- }
54
- std::optional<std::string> JHybridOneKeyIconSpec::getResolvedColor() {
55
- static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<jni::JString>()>("getResolvedColor");
56
- auto __result = method(_javaPart);
57
- return __result != nullptr ? std::make_optional(__result->toStdString()) : std::nullopt;
58
- }
59
- void JHybridOneKeyIconSpec::setResolvedColor(const std::optional<std::string>& resolvedColor) {
60
- static const auto method = _javaPart->javaClassStatic()->getMethod<void(jni::alias_ref<jni::JString> /* resolvedColor */)>("setResolvedColor");
61
- method(_javaPart, resolvedColor.has_value() ? jni::make_jstring(resolvedColor.value()) : nullptr);
62
- }
63
-
64
- // Methods
65
-
66
-
67
- } // namespace margelo::nitro::onekeyimage
@@ -1,66 +0,0 @@
1
- ///
2
- /// HybridOneKeyIconSpec.hpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © Marc Rousavy @ Margelo
6
- ///
7
-
8
- #pragma once
9
-
10
- #include <NitroModules/JHybridObject.hpp>
11
- #include <fbjni/fbjni.h>
12
- #include "HybridOneKeyIconSpec.hpp"
13
-
14
-
15
-
16
-
17
- namespace margelo::nitro::onekeyimage {
18
-
19
- using namespace facebook;
20
-
21
- class JHybridOneKeyIconSpec: public virtual HybridOneKeyIconSpec, public virtual JHybridObject {
22
- public:
23
- struct JavaPart: public jni::JavaClass<JavaPart, JHybridObject::JavaPart> {
24
- static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/onekeyimage/HybridOneKeyIconSpec;";
25
- std::shared_ptr<JHybridOneKeyIconSpec> getJHybridOneKeyIconSpec();
26
- };
27
- struct CxxPart: public jni::HybridClass<CxxPart, JHybridObject::CxxPart> {
28
- static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/onekeyimage/HybridOneKeyIconSpec$CxxPart;";
29
- static jni::local_ref<jhybriddata> initHybrid(jni::alias_ref<jhybridobject> jThis);
30
- static void registerNatives();
31
- using HybridBase::HybridBase;
32
- protected:
33
- std::shared_ptr<JHybridObject> createHybridObject(const jni::local_ref<JHybridObject::JavaPart>& javaPart) override;
34
- };
35
-
36
- public:
37
- explicit JHybridOneKeyIconSpec(const jni::local_ref<JHybridOneKeyIconSpec::JavaPart>& javaPart):
38
- HybridObject(HybridOneKeyIconSpec::TAG),
39
- JHybridObject(javaPart),
40
- _javaPart(jni::make_global(javaPart)) {}
41
- ~JHybridOneKeyIconSpec() override {
42
- // Hermes GC can destroy JS objects on a non-JNI Thread.
43
- jni::ThreadScope::WithClassLoader([&] { _javaPart.reset(); });
44
- }
45
-
46
- public:
47
- inline const jni::global_ref<JHybridOneKeyIconSpec::JavaPart>& getJavaPart() const noexcept {
48
- return _javaPart;
49
- }
50
-
51
- public:
52
- // Properties
53
- std::optional<std::string> getIconName() override;
54
- void setIconName(const std::optional<std::string>& iconName) override;
55
- std::optional<std::string> getResolvedColor() override;
56
- void setResolvedColor(const std::optional<std::string>& resolvedColor) override;
57
-
58
- public:
59
- // Methods
60
-
61
-
62
- private:
63
- jni::global_ref<JHybridOneKeyIconSpec::JavaPart> _javaPart;
64
- };
65
-
66
- } // namespace margelo::nitro::onekeyimage
@@ -1,79 +0,0 @@
1
- ///
2
- /// JHybridOneKeyIconStateUpdater.cpp
3
- /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
- /// https://github.com/mrousavy/nitro
5
- /// Copyright © Marc Rousavy @ Margelo
6
- ///
7
-
8
- #include "JHybridOneKeyIconStateUpdater.hpp"
9
- #include "views/HybridOneKeyIconComponent.hpp"
10
- #include <NitroModules/NitroDefines.hpp>
11
- #include <react/fabric/StateWrapperImpl.h>
12
-
13
- namespace margelo::nitro::onekeyimage::views {
14
-
15
- using namespace facebook;
16
- using ConcreteStateData = react::ConcreteState<HybridOneKeyIconState>;
17
-
18
- std::shared_ptr<const HybridOneKeyIconProps> JHybridOneKeyIconStateUpdater::getPropsFromStateWrapper(
19
- jni::alias_ref<JStateWrapper::javaobject> stateWrapper) {
20
- if (stateWrapper.get() == nullptr) {
21
- return nullptr;
22
- }
23
- // Get concrete StateWrapperImpl from passed StateWrapper interface object
24
- jobject rawStateWrapper = stateWrapper.get();
25
- if (!stateWrapper->isInstanceOf(react::StateWrapperImpl::javaClassStatic())) [[unlikely]] {
26
- throw std::runtime_error("StateWrapper is not a StateWrapperImpl");
27
- }
28
- auto stateWrapperImpl = jni::alias_ref<react::StateWrapperImpl::javaobject>{
29
- static_cast<react::StateWrapperImpl::javaobject>(rawStateWrapper)
30
- };
31
- std::shared_ptr<const react::State> state = stateWrapperImpl->cthis()->getState();
32
- if (state == nullptr) {
33
- return nullptr;
34
- }
35
- auto concreteState = std::static_pointer_cast<const ConcreteStateData>(state);
36
- const HybridOneKeyIconState& data = concreteState->getData();
37
- const std::shared_ptr<const HybridOneKeyIconProps>& props = data.getProps();
38
- if (props == nullptr) [[unlikely]] {
39
- throw std::runtime_error("HybridOneKeyIconState's data doesn't contain any props!");
40
- }
41
- return props;
42
- }
43
-
44
- void JHybridOneKeyIconStateUpdater::updateViewProps(jni::alias_ref<jni::JClass> /* class */,
45
- jni::alias_ref<JHybridOneKeyIconSpec::JavaPart> javaView,
46
- jni::alias_ref<JStateWrapper::javaobject> newState,
47
- jni::alias_ref<JStateWrapper::javaobject> oldState) {
48
- std::shared_ptr<JHybridOneKeyIconSpec> hybridView = javaView->getJHybridOneKeyIconSpec();
49
- std::shared_ptr<const HybridOneKeyIconProps> newProps = getPropsFromStateWrapper(newState);
50
- std::shared_ptr<const HybridOneKeyIconProps> oldProps = getPropsFromStateWrapper(oldState);
51
- if (newProps == nullptr) [[unlikely]] {
52
- throw std::runtime_error("Current StateWrapper doesn't contain any props!");
53
- }
54
-
55
- // Update only props that differ from the previous State snapshot.
56
- if (oldProps == nullptr
57
- ? newProps->iconName.isProvided()
58
- : !newProps->iconName.hasSameValue(oldProps->iconName)) {
59
- hybridView->setIconName(newProps->iconName.get());
60
- }
61
- if (oldProps == nullptr
62
- ? newProps->resolvedColor.isProvided()
63
- : !newProps->resolvedColor.hasSameValue(oldProps->resolvedColor)) {
64
- hybridView->setResolvedColor(newProps->resolvedColor.get());
65
- }
66
-
67
- // Update hybridRef if it changed
68
- if (oldProps == nullptr
69
- ? newProps->hybridRef.isProvided()
70
- : !newProps->hybridRef.hasSameValue(oldProps->hybridRef)) {
71
- // hybridRef changed - call it with new this
72
- const auto& maybeFunc = newProps->hybridRef.get();
73
- if (maybeFunc.has_value()) {
74
- maybeFunc.value()(hybridView);
75
- }
76
- }
77
- }
78
-
79
- } // namespace margelo::nitro::onekeyimage::views