@onekeyfe/react-native-image 6.7.0-alpha.415 → 6.7.0-alpha.418

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 +12 -0
  2. package/android/build.gradle +3 -1
  3. package/android/src/main/java/com/margelo/nitro/onekeyimage/OneKeyIcon.kt +93 -0
  4. package/android/src/main/java/com/margelo/nitro/onekeyimage/OneKeyImageGlideRegistry.kt +1 -1
  5. package/android/src/main/java/com/margelo/nitro/onekeyimage/OneKeyImagePackage.kt +2 -1
  6. package/android/src/main/java/com/margelo/nitro/onekeyimage/OneKeyNamedSVG.kt +217 -0
  7. package/android/src/main/java/com/margelo/nitro/onekeyimage/OneKeySVG.kt +31 -0
  8. package/ios/OneKeyIcon.swift +90 -0
  9. package/ios/OneKeyImageCoderBridge.h +4 -0
  10. package/ios/OneKeyImageCoderBridge.m +9 -0
  11. package/ios/OneKeyNamedSVG.swift +282 -0
  12. package/ios/tests/OneKeyIconTests.swift +484 -0
  13. package/lib/module/OneKeyIcon.nitro.js +4 -0
  14. package/lib/module/icon/assetUrls.js +13 -0
  15. package/lib/module/icon/dom.js +21 -0
  16. package/lib/module/icon/index.js +29 -0
  17. package/lib/module/icon/index.web.js +32 -0
  18. package/lib/module/icon/props.js +22 -0
  19. package/lib/module/package.json +6 -1
  20. package/lib/nitrogen/generated/android/c++/JHybridOneKeyIconSpec.cpp +67 -0
  21. package/lib/nitrogen/generated/android/c++/JHybridOneKeyIconSpec.hpp +66 -0
  22. package/lib/nitrogen/generated/android/c++/views/JHybridOneKeyIconStateUpdater.cpp +79 -0
  23. package/lib/nitrogen/generated/android/c++/views/JHybridOneKeyIconStateUpdater.hpp +54 -0
  24. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/HybridOneKeyIconSpec.kt +65 -0
  25. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/views/HybridOneKeyIconManager.kt +96 -0
  26. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/views/HybridOneKeyIconStateUpdater.kt +23 -0
  27. package/lib/nitrogen/generated/android/onekeyimage+autolinking.cmake +4 -0
  28. package/lib/nitrogen/generated/android/onekeyimageOnLoad.cpp +18 -0
  29. package/lib/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Bridge.cpp +17 -0
  30. package/lib/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Bridge.hpp +32 -15
  31. package/lib/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Umbrella.hpp +5 -0
  32. package/lib/nitrogen/generated/ios/OneKeyImageAutolinking.mm +8 -0
  33. package/lib/nitrogen/generated/ios/OneKeyImageAutolinking.swift +12 -0
  34. package/lib/nitrogen/generated/ios/c++/HybridOneKeyIconSpecSwift.cpp +11 -0
  35. package/lib/nitrogen/generated/ios/c++/HybridOneKeyIconSpecSwift.hpp +89 -0
  36. package/lib/nitrogen/generated/ios/c++/views/HybridOneKeyIconComponent.mm +150 -0
  37. package/lib/nitrogen/generated/ios/swift/HybridOneKeyIconSpec.swift +56 -0
  38. package/lib/nitrogen/generated/ios/swift/HybridOneKeyIconSpec_cxx.swift +193 -0
  39. package/lib/nitrogen/generated/shared/c++/HybridOneKeyIconSpec.cpp +24 -0
  40. package/lib/nitrogen/generated/shared/c++/HybridOneKeyIconSpec.hpp +66 -0
  41. package/lib/nitrogen/generated/shared/c++/views/HybridOneKeyIconComponent.cpp +36 -0
  42. package/lib/nitrogen/generated/shared/c++/views/HybridOneKeyIconComponent.hpp +88 -0
  43. package/lib/nitrogen/generated/shared/json/OneKeyIconConfig.json +11 -0
  44. package/lib/typescript/src/OneKeyIcon.nitro.d.ts +7 -0
  45. package/lib/typescript/src/icon/assetUrls.d.ts +2 -0
  46. package/lib/typescript/src/icon/dom.d.ts +3 -0
  47. package/lib/typescript/src/icon/index.d.ts +140 -0
  48. package/lib/typescript/src/icon/index.web.d.ts +134 -0
  49. package/lib/typescript/src/icon/props.d.ts +8 -0
  50. package/nitro.json +10 -0
  51. package/nitrogen/generated/android/c++/JHybridOneKeyIconSpec.cpp +67 -0
  52. package/nitrogen/generated/android/c++/JHybridOneKeyIconSpec.hpp +66 -0
  53. package/nitrogen/generated/android/c++/views/JHybridOneKeyIconStateUpdater.cpp +79 -0
  54. package/nitrogen/generated/android/c++/views/JHybridOneKeyIconStateUpdater.hpp +54 -0
  55. package/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/HybridOneKeyIconSpec.kt +65 -0
  56. package/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/views/HybridOneKeyIconManager.kt +96 -0
  57. package/nitrogen/generated/android/kotlin/com/margelo/nitro/onekeyimage/views/HybridOneKeyIconStateUpdater.kt +23 -0
  58. package/nitrogen/generated/android/onekeyimage+autolinking.cmake +4 -0
  59. package/nitrogen/generated/android/onekeyimageOnLoad.cpp +18 -0
  60. package/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Bridge.cpp +17 -0
  61. package/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Bridge.hpp +32 -15
  62. package/nitrogen/generated/ios/OneKeyImage-Swift-Cxx-Umbrella.hpp +5 -0
  63. package/nitrogen/generated/ios/OneKeyImageAutolinking.mm +8 -0
  64. package/nitrogen/generated/ios/OneKeyImageAutolinking.swift +12 -0
  65. package/nitrogen/generated/ios/c++/HybridOneKeyIconSpecSwift.cpp +11 -0
  66. package/nitrogen/generated/ios/c++/HybridOneKeyIconSpecSwift.hpp +89 -0
  67. package/nitrogen/generated/ios/c++/views/HybridOneKeyIconComponent.mm +150 -0
  68. package/nitrogen/generated/ios/swift/HybridOneKeyIconSpec.swift +56 -0
  69. package/nitrogen/generated/ios/swift/HybridOneKeyIconSpec_cxx.swift +193 -0
  70. package/nitrogen/generated/shared/c++/HybridOneKeyIconSpec.cpp +24 -0
  71. package/nitrogen/generated/shared/c++/HybridOneKeyIconSpec.hpp +66 -0
  72. package/nitrogen/generated/shared/c++/views/HybridOneKeyIconComponent.cpp +36 -0
  73. package/nitrogen/generated/shared/c++/views/HybridOneKeyIconComponent.hpp +88 -0
  74. package/nitrogen/generated/shared/json/OneKeyIconConfig.json +11 -0
  75. package/package.json +40 -7
  76. package/scripts/configure-icon-imports.mjs +7 -0
  77. package/scripts/icon-fixtures.test.mjs +398 -0
  78. package/src/OneKeyIcon.nitro.ts +8 -0
  79. package/src/icon/assetUrls.ts +13 -0
  80. package/src/icon/dom.ts +21 -0
  81. package/src/icon/index.tsx +38 -0
  82. package/src/icon/index.web.tsx +36 -0
  83. package/src/icon/props.ts +38 -0
@@ -0,0 +1,88 @@
1
+ ///
2
+ /// HybridOneKeyIconComponent.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/ReactProp.hpp>
11
+ #include <NitroModules/ViewComponentDescriptor.hpp>
12
+ #include <NitroModules/ViewPropsHolderState.hpp>
13
+ #include <react/renderer/components/view/ConcreteViewShadowNode.h>
14
+ #include <react/renderer/components/view/ViewProps.h>
15
+ #include <react/renderer/core/PropsParserContext.h>
16
+ #include <react/renderer/core/RawProps.h>
17
+
18
+ #include <string>
19
+
20
+ #include <string>
21
+ #include <optional>
22
+ #include <memory>
23
+ #include "HybridOneKeyIconSpec.hpp"
24
+ #include <functional>
25
+
26
+ namespace margelo::nitro::onekeyimage::views {
27
+
28
+ using namespace facebook;
29
+
30
+ /**
31
+ * The name of the actual native View.
32
+ */
33
+ extern const char HybridOneKeyIconComponentName[];
34
+
35
+ /**
36
+ * Props for the "OneKeyIcon" View.
37
+ */
38
+ class HybridOneKeyIconProps final: public react::ViewProps {
39
+ public:
40
+ HybridOneKeyIconProps() = default;
41
+ HybridOneKeyIconProps(const react::PropsParserContext& context,
42
+ const HybridOneKeyIconProps& sourceProps,
43
+ const react::RawProps& rawProps);
44
+
45
+ public:
46
+ nitro::ReactProp<std::optional<std::string>> iconName;
47
+ nitro::ReactProp<std::optional<std::string>> resolvedColor;
48
+ nitro::ReactProp<std::optional<std::function<void(const std::shared_ptr<HybridOneKeyIconSpec>& /* ref */)>>> hybridRef;
49
+
50
+ [[nodiscard]]
51
+ bool hasSameProps(const HybridOneKeyIconProps& other) const noexcept {
52
+ return iconName.hasSameValue(other.iconName) &&
53
+ resolvedColor.hasSameValue(other.resolvedColor) &&
54
+ hybridRef.hasSameValue(other.hybridRef);
55
+ }
56
+
57
+ [[nodiscard]]
58
+ bool hasAnyProvidedProps() const noexcept {
59
+ return iconName.isProvided() ||
60
+ resolvedColor.isProvided() ||
61
+ hybridRef.isProvided();
62
+ }
63
+
64
+ private:
65
+ static bool filterObjectKeys(const std::string& propName);
66
+ };
67
+
68
+ /**
69
+ * State for the "OneKeyIcon" View.
70
+ */
71
+ using HybridOneKeyIconState = nitro::ViewPropsHolderState<HybridOneKeyIconProps>;
72
+
73
+ /**
74
+ * The Shadow Node for the "OneKeyIcon" View.
75
+ */
76
+ using HybridOneKeyIconShadowNode = react::ConcreteViewShadowNode<HybridOneKeyIconComponentName /* "HybridOneKeyIcon" */,
77
+ HybridOneKeyIconProps /* custom props */,
78
+ react::ViewEventEmitter /* default */,
79
+ HybridOneKeyIconState /* custom state */>;
80
+
81
+ /**
82
+ * The Component Descriptor for the "OneKeyIcon" View.
83
+ */
84
+ using HybridOneKeyIconComponentDescriptor = nitro::ViewComponentDescriptor<HybridOneKeyIconShadowNode>;
85
+
86
+ /* The actual view for "OneKeyIcon" needs to be implemented in platform-specific code. */
87
+
88
+ } // namespace margelo::nitro::onekeyimage::views
@@ -0,0 +1,11 @@
1
+ {
2
+ "uiViewClassName": "OneKeyIcon",
3
+ "supportsRawText": false,
4
+ "bubblingEventTypes": {},
5
+ "directEventTypes": {},
6
+ "validAttributes": {
7
+ "iconName": true,
8
+ "resolvedColor": true,
9
+ "hybridRef": true
10
+ }
11
+ }
@@ -0,0 +1,7 @@
1
+ import type { HybridView, HybridViewProps } from 'react-native-nitro-modules';
2
+ export interface OneKeyIconNativeProps extends HybridViewProps {
3
+ iconName?: string;
4
+ resolvedColor?: string;
5
+ }
6
+ export type OneKeyIcon = HybridView<OneKeyIconNativeProps>;
7
+ //# sourceMappingURL=OneKeyIcon.nitro.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare function iconResourceHref(name: string): string | undefined;
2
+ //# sourceMappingURL=assetUrls.d.ts.map
@@ -0,0 +1,3 @@
1
+ /** Native SDK DOM consumers own name coverage, styling and accessible labels. */
2
+ export declare function createNamedIcon(document: Document, name: string): SVGSVGElement;
3
+ //# sourceMappingURL=dom.d.ts.map
@@ -0,0 +1,140 @@
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
@@ -0,0 +1,134 @@
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
@@ -0,0 +1,8 @@
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
package/nitro.json CHANGED
@@ -25,6 +25,16 @@
25
25
  "language": "kotlin",
26
26
  "implementationClassName": "HybridOneKeyImageCache"
27
27
  }
28
+ },
29
+ "OneKeyIcon": {
30
+ "ios": {
31
+ "language": "swift",
32
+ "implementationClassName": "HybridOneKeyIcon"
33
+ },
34
+ "android": {
35
+ "language": "kotlin",
36
+ "implementationClassName": "HybridOneKeyIcon"
37
+ }
28
38
  }
29
39
  },
30
40
  "ignorePaths": ["node_modules"]
@@ -0,0 +1,67 @@
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