@onekeyfe/react-native-chart-webview 3.0.39

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 (132) hide show
  1. package/ChartWebview.podspec +29 -0
  2. package/LICENSE +21 -0
  3. package/README.md +31 -0
  4. package/android/CMakeLists.txt +24 -0
  5. package/android/build.gradle +131 -0
  6. package/android/src/main/AndroidManifest.xml +2 -0
  7. package/android/src/main/cpp/cpp-adapter.cpp +6 -0
  8. package/android/src/main/java/com/margelo/nitro/chartwebview/ChartWebview.kt +331 -0
  9. package/android/src/main/java/com/margelo/nitro/chartwebview/ChartWebviewPackage.kt +29 -0
  10. package/android/src/main/java/com/margelo/nitro/chartwebview/PooledChartWebView.kt +385 -0
  11. package/ios/ChartWebview.swift +747 -0
  12. package/lib/module/ChartWebview.nitro.js +4 -0
  13. package/lib/module/ChartWebview.nitro.js.map +1 -0
  14. package/lib/module/bridge.js +30 -0
  15. package/lib/module/bridge.js.map +1 -0
  16. package/lib/module/index.js +19 -0
  17. package/lib/module/index.js.map +1 -0
  18. package/lib/module/package.json +1 -0
  19. package/lib/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
  20. package/lib/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +76 -0
  21. package/lib/nitrogen/generated/android/c++/JHybridChartWebviewSpec.cpp +186 -0
  22. package/lib/nitrogen/generated/android/c++/JHybridChartWebviewSpec.hpp +88 -0
  23. package/lib/nitrogen/generated/android/c++/views/JHybridChartWebviewStateUpdater.cpp +96 -0
  24. package/lib/nitrogen/generated/android/c++/views/JHybridChartWebviewStateUpdater.hpp +49 -0
  25. package/lib/nitrogen/generated/android/chartwebview+autolinking.cmake +83 -0
  26. package/lib/nitrogen/generated/android/chartwebview+autolinking.gradle +27 -0
  27. package/lib/nitrogen/generated/android/chartwebviewOnLoad.cpp +50 -0
  28. package/lib/nitrogen/generated/android/chartwebviewOnLoad.hpp +25 -0
  29. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/Func_void.kt +80 -0
  30. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/Func_void_std__string.kt +80 -0
  31. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/HybridChartWebviewSpec.kt +153 -0
  32. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/chartwebviewOnLoad.kt +35 -0
  33. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/views/HybridChartWebviewManager.kt +50 -0
  34. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/views/HybridChartWebviewStateUpdater.kt +23 -0
  35. package/lib/nitrogen/generated/ios/ChartWebview+autolinking.rb +60 -0
  36. package/lib/nitrogen/generated/ios/ChartWebview-Swift-Cxx-Bridge.cpp +49 -0
  37. package/lib/nitrogen/generated/ios/ChartWebview-Swift-Cxx-Bridge.hpp +158 -0
  38. package/lib/nitrogen/generated/ios/ChartWebview-Swift-Cxx-Umbrella.hpp +46 -0
  39. package/lib/nitrogen/generated/ios/ChartWebviewAutolinking.mm +33 -0
  40. package/lib/nitrogen/generated/ios/ChartWebviewAutolinking.swift +25 -0
  41. package/lib/nitrogen/generated/ios/c++/HybridChartWebviewSpecSwift.cpp +11 -0
  42. package/lib/nitrogen/generated/ios/c++/HybridChartWebviewSpecSwift.hpp +164 -0
  43. package/lib/nitrogen/generated/ios/c++/views/HybridChartWebviewComponent.mm +146 -0
  44. package/lib/nitrogen/generated/ios/swift/Func_void.swift +47 -0
  45. package/lib/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  46. package/lib/nitrogen/generated/ios/swift/HybridChartWebviewSpec.swift +68 -0
  47. package/lib/nitrogen/generated/ios/swift/HybridChartWebviewSpec_cxx.swift +450 -0
  48. package/lib/nitrogen/generated/shared/c++/HybridChartWebviewSpec.cpp +45 -0
  49. package/lib/nitrogen/generated/shared/c++/HybridChartWebviewSpec.hpp +87 -0
  50. package/lib/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.cpp +207 -0
  51. package/lib/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.hpp +118 -0
  52. package/lib/nitrogen/generated/shared/json/ChartWebviewConfig.json +20 -0
  53. package/lib/nitrogen/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
  54. package/lib/nitrogen/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +76 -0
  55. package/lib/nitrogen/nitrogen/generated/android/c++/JHybridChartWebviewSpec.cpp +186 -0
  56. package/lib/nitrogen/nitrogen/generated/android/c++/JHybridChartWebviewSpec.hpp +88 -0
  57. package/lib/nitrogen/nitrogen/generated/android/c++/views/JHybridChartWebviewStateUpdater.cpp +96 -0
  58. package/lib/nitrogen/nitrogen/generated/android/c++/views/JHybridChartWebviewStateUpdater.hpp +49 -0
  59. package/lib/nitrogen/nitrogen/generated/android/chartwebview+autolinking.cmake +83 -0
  60. package/lib/nitrogen/nitrogen/generated/android/chartwebview+autolinking.gradle +27 -0
  61. package/lib/nitrogen/nitrogen/generated/android/chartwebviewOnLoad.cpp +50 -0
  62. package/lib/nitrogen/nitrogen/generated/android/chartwebviewOnLoad.hpp +25 -0
  63. package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/Func_void.kt +80 -0
  64. package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/Func_void_std__string.kt +80 -0
  65. package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/HybridChartWebviewSpec.kt +153 -0
  66. package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/chartwebviewOnLoad.kt +35 -0
  67. package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/views/HybridChartWebviewManager.kt +50 -0
  68. package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/views/HybridChartWebviewStateUpdater.kt +23 -0
  69. package/lib/nitrogen/nitrogen/generated/ios/ChartWebview+autolinking.rb +60 -0
  70. package/lib/nitrogen/nitrogen/generated/ios/ChartWebview-Swift-Cxx-Bridge.cpp +49 -0
  71. package/lib/nitrogen/nitrogen/generated/ios/ChartWebview-Swift-Cxx-Bridge.hpp +158 -0
  72. package/lib/nitrogen/nitrogen/generated/ios/ChartWebview-Swift-Cxx-Umbrella.hpp +46 -0
  73. package/lib/nitrogen/nitrogen/generated/ios/ChartWebviewAutolinking.mm +33 -0
  74. package/lib/nitrogen/nitrogen/generated/ios/ChartWebviewAutolinking.swift +25 -0
  75. package/lib/nitrogen/nitrogen/generated/ios/c++/HybridChartWebviewSpecSwift.cpp +11 -0
  76. package/lib/nitrogen/nitrogen/generated/ios/c++/HybridChartWebviewSpecSwift.hpp +164 -0
  77. package/lib/nitrogen/nitrogen/generated/ios/c++/views/HybridChartWebviewComponent.mm +146 -0
  78. package/lib/nitrogen/nitrogen/generated/ios/swift/Func_void.swift +47 -0
  79. package/lib/nitrogen/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  80. package/lib/nitrogen/nitrogen/generated/ios/swift/HybridChartWebviewSpec.swift +68 -0
  81. package/lib/nitrogen/nitrogen/generated/ios/swift/HybridChartWebviewSpec_cxx.swift +450 -0
  82. package/lib/nitrogen/nitrogen/generated/shared/c++/HybridChartWebviewSpec.cpp +45 -0
  83. package/lib/nitrogen/nitrogen/generated/shared/c++/HybridChartWebviewSpec.hpp +87 -0
  84. package/lib/nitrogen/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.cpp +207 -0
  85. package/lib/nitrogen/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.hpp +118 -0
  86. package/lib/nitrogen/nitrogen/generated/shared/json/ChartWebviewConfig.json +20 -0
  87. package/lib/typescript/package.json +1 -0
  88. package/lib/typescript/src/ChartWebview.nitro.d.ts +21 -0
  89. package/lib/typescript/src/ChartWebview.nitro.d.ts.map +1 -0
  90. package/lib/typescript/src/bridge.d.ts +2 -0
  91. package/lib/typescript/src/bridge.d.ts.map +1 -0
  92. package/lib/typescript/src/index.d.ts +145 -0
  93. package/lib/typescript/src/index.d.ts.map +1 -0
  94. package/nitro.json +17 -0
  95. package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
  96. package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +76 -0
  97. package/nitrogen/generated/android/c++/JHybridChartWebviewSpec.cpp +186 -0
  98. package/nitrogen/generated/android/c++/JHybridChartWebviewSpec.hpp +88 -0
  99. package/nitrogen/generated/android/c++/views/JHybridChartWebviewStateUpdater.cpp +96 -0
  100. package/nitrogen/generated/android/c++/views/JHybridChartWebviewStateUpdater.hpp +49 -0
  101. package/nitrogen/generated/android/chartwebview+autolinking.cmake +83 -0
  102. package/nitrogen/generated/android/chartwebview+autolinking.gradle +27 -0
  103. package/nitrogen/generated/android/chartwebviewOnLoad.cpp +50 -0
  104. package/nitrogen/generated/android/chartwebviewOnLoad.hpp +25 -0
  105. package/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/Func_void.kt +80 -0
  106. package/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/Func_void_std__string.kt +80 -0
  107. package/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/HybridChartWebviewSpec.kt +153 -0
  108. package/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/chartwebviewOnLoad.kt +35 -0
  109. package/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/views/HybridChartWebviewManager.kt +50 -0
  110. package/nitrogen/generated/android/kotlin/com/margelo/nitro/chartwebview/views/HybridChartWebviewStateUpdater.kt +23 -0
  111. package/nitrogen/generated/ios/ChartWebview+autolinking.rb +60 -0
  112. package/nitrogen/generated/ios/ChartWebview-Swift-Cxx-Bridge.cpp +49 -0
  113. package/nitrogen/generated/ios/ChartWebview-Swift-Cxx-Bridge.hpp +158 -0
  114. package/nitrogen/generated/ios/ChartWebview-Swift-Cxx-Umbrella.hpp +46 -0
  115. package/nitrogen/generated/ios/ChartWebviewAutolinking.mm +33 -0
  116. package/nitrogen/generated/ios/ChartWebviewAutolinking.swift +25 -0
  117. package/nitrogen/generated/ios/c++/HybridChartWebviewSpecSwift.cpp +11 -0
  118. package/nitrogen/generated/ios/c++/HybridChartWebviewSpecSwift.hpp +164 -0
  119. package/nitrogen/generated/ios/c++/views/HybridChartWebviewComponent.mm +146 -0
  120. package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
  121. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  122. package/nitrogen/generated/ios/swift/HybridChartWebviewSpec.swift +68 -0
  123. package/nitrogen/generated/ios/swift/HybridChartWebviewSpec_cxx.swift +450 -0
  124. package/nitrogen/generated/shared/c++/HybridChartWebviewSpec.cpp +45 -0
  125. package/nitrogen/generated/shared/c++/HybridChartWebviewSpec.hpp +87 -0
  126. package/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.cpp +207 -0
  127. package/nitrogen/generated/shared/c++/views/HybridChartWebviewComponent.hpp +118 -0
  128. package/nitrogen/generated/shared/json/ChartWebviewConfig.json +20 -0
  129. package/package.json +170 -0
  130. package/src/ChartWebview.nitro.ts +59 -0
  131. package/src/bridge.ts +27 -0
  132. package/src/index.tsx +20 -0
@@ -0,0 +1,207 @@
1
+ ///
2
+ /// HybridChartWebviewComponent.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include "HybridChartWebviewComponent.hpp"
9
+
10
+ #include <string>
11
+ #include <exception>
12
+ #include <utility>
13
+ #include <NitroModules/NitroDefines.hpp>
14
+ #include <NitroModules/JSIConverter.hpp>
15
+ #include <react/renderer/core/RawValue.h>
16
+ #include <react/renderer/core/ShadowNode.h>
17
+ #include <react/renderer/core/ComponentDescriptor.h>
18
+ #include <react/renderer/components/view/ViewProps.h>
19
+
20
+ namespace margelo::nitro::chartwebview::views {
21
+
22
+ extern const char HybridChartWebviewComponentName[] = "ChartWebview";
23
+
24
+ HybridChartWebviewProps::HybridChartWebviewProps(const react::PropsParserContext& context,
25
+ const HybridChartWebviewProps& sourceProps,
26
+ const react::RawProps& rawProps):
27
+ react::ViewProps(context, sourceProps, rawProps, filterObjectKeys),
28
+ uri([&]() -> CachedProp<std::optional<std::string>> {
29
+ try {
30
+ const react::RawValue* rawValue = rawProps.at("uri", nullptr, nullptr);
31
+ if (rawValue == nullptr) return sourceProps.uri;
32
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
33
+ return CachedProp<std::optional<std::string>>::fromRawValue(*runtime, value, sourceProps.uri);
34
+ } catch (const std::exception& exc) {
35
+ throw std::runtime_error(std::string("ChartWebview.uri: ") + exc.what());
36
+ }
37
+ }()),
38
+ localBundle([&]() -> CachedProp<std::optional<std::string>> {
39
+ try {
40
+ const react::RawValue* rawValue = rawProps.at("localBundle", nullptr, nullptr);
41
+ if (rawValue == nullptr) return sourceProps.localBundle;
42
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
43
+ return CachedProp<std::optional<std::string>>::fromRawValue(*runtime, value, sourceProps.localBundle);
44
+ } catch (const std::exception& exc) {
45
+ throw std::runtime_error(std::string("ChartWebview.localBundle: ") + exc.what());
46
+ }
47
+ }()),
48
+ entry([&]() -> CachedProp<std::optional<std::string>> {
49
+ try {
50
+ const react::RawValue* rawValue = rawProps.at("entry", nullptr, nullptr);
51
+ if (rawValue == nullptr) return sourceProps.entry;
52
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
53
+ return CachedProp<std::optional<std::string>>::fromRawValue(*runtime, value, sourceProps.entry);
54
+ } catch (const std::exception& exc) {
55
+ throw std::runtime_error(std::string("ChartWebview.entry: ") + exc.what());
56
+ }
57
+ }()),
58
+ paramsJson([&]() -> CachedProp<std::optional<std::string>> {
59
+ try {
60
+ const react::RawValue* rawValue = rawProps.at("paramsJson", nullptr, nullptr);
61
+ if (rawValue == nullptr) return sourceProps.paramsJson;
62
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
63
+ return CachedProp<std::optional<std::string>>::fromRawValue(*runtime, value, sourceProps.paramsJson);
64
+ } catch (const std::exception& exc) {
65
+ throw std::runtime_error(std::string("ChartWebview.paramsJson: ") + exc.what());
66
+ }
67
+ }()),
68
+ bridgeScript([&]() -> CachedProp<std::optional<std::string>> {
69
+ try {
70
+ const react::RawValue* rawValue = rawProps.at("bridgeScript", nullptr, nullptr);
71
+ if (rawValue == nullptr) return sourceProps.bridgeScript;
72
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
73
+ return CachedProp<std::optional<std::string>>::fromRawValue(*runtime, value, sourceProps.bridgeScript);
74
+ } catch (const std::exception& exc) {
75
+ throw std::runtime_error(std::string("ChartWebview.bridgeScript: ") + exc.what());
76
+ }
77
+ }()),
78
+ reuseKey([&]() -> CachedProp<std::optional<std::string>> {
79
+ try {
80
+ const react::RawValue* rawValue = rawProps.at("reuseKey", nullptr, nullptr);
81
+ if (rawValue == nullptr) return sourceProps.reuseKey;
82
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
83
+ return CachedProp<std::optional<std::string>>::fromRawValue(*runtime, value, sourceProps.reuseKey);
84
+ } catch (const std::exception& exc) {
85
+ throw std::runtime_error(std::string("ChartWebview.reuseKey: ") + exc.what());
86
+ }
87
+ }()),
88
+ pooled([&]() -> CachedProp<std::optional<bool>> {
89
+ try {
90
+ const react::RawValue* rawValue = rawProps.at("pooled", nullptr, nullptr);
91
+ if (rawValue == nullptr) return sourceProps.pooled;
92
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
93
+ return CachedProp<std::optional<bool>>::fromRawValue(*runtime, value, sourceProps.pooled);
94
+ } catch (const std::exception& exc) {
95
+ throw std::runtime_error(std::string("ChartWebview.pooled: ") + exc.what());
96
+ }
97
+ }()),
98
+ active([&]() -> CachedProp<std::optional<bool>> {
99
+ try {
100
+ const react::RawValue* rawValue = rawProps.at("active", nullptr, nullptr);
101
+ if (rawValue == nullptr) return sourceProps.active;
102
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
103
+ return CachedProp<std::optional<bool>>::fromRawValue(*runtime, value, sourceProps.active);
104
+ } catch (const std::exception& exc) {
105
+ throw std::runtime_error(std::string("ChartWebview.active: ") + exc.what());
106
+ }
107
+ }()),
108
+ onMessage([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* message */)>>> {
109
+ try {
110
+ const react::RawValue* rawValue = rawProps.at("onMessage", nullptr, nullptr);
111
+ if (rawValue == nullptr) return sourceProps.onMessage;
112
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
113
+ return CachedProp<std::optional<std::function<void(const std::string& /* message */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onMessage);
114
+ } catch (const std::exception& exc) {
115
+ throw std::runtime_error(std::string("ChartWebview.onMessage: ") + exc.what());
116
+ }
117
+ }()),
118
+ onLoadEnd([&]() -> CachedProp<std::optional<std::function<void()>>> {
119
+ try {
120
+ const react::RawValue* rawValue = rawProps.at("onLoadEnd", nullptr, nullptr);
121
+ if (rawValue == nullptr) return sourceProps.onLoadEnd;
122
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
123
+ return CachedProp<std::optional<std::function<void()>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onLoadEnd);
124
+ } catch (const std::exception& exc) {
125
+ throw std::runtime_error(std::string("ChartWebview.onLoadEnd: ") + exc.what());
126
+ }
127
+ }()),
128
+ onError([&]() -> CachedProp<std::optional<std::function<void(const std::string& /* message */)>>> {
129
+ try {
130
+ const react::RawValue* rawValue = rawProps.at("onError", nullptr, nullptr);
131
+ if (rawValue == nullptr) return sourceProps.onError;
132
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
133
+ return CachedProp<std::optional<std::function<void(const std::string& /* message */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.onError);
134
+ } catch (const std::exception& exc) {
135
+ throw std::runtime_error(std::string("ChartWebview.onError: ") + exc.what());
136
+ }
137
+ }()),
138
+ hybridRef([&]() -> CachedProp<std::optional<std::function<void(const std::shared_ptr<HybridChartWebviewSpec>& /* ref */)>>> {
139
+ try {
140
+ const react::RawValue* rawValue = rawProps.at("hybridRef", nullptr, nullptr);
141
+ if (rawValue == nullptr) return sourceProps.hybridRef;
142
+ const auto& [runtime, value] = (std::pair<jsi::Runtime*, jsi::Value>)*rawValue;
143
+ return CachedProp<std::optional<std::function<void(const std::shared_ptr<HybridChartWebviewSpec>& /* ref */)>>>::fromRawValue(*runtime, value.asObject(*runtime).getProperty(*runtime, "f"), sourceProps.hybridRef);
144
+ } catch (const std::exception& exc) {
145
+ throw std::runtime_error(std::string("ChartWebview.hybridRef: ") + exc.what());
146
+ }
147
+ }()) { }
148
+
149
+ HybridChartWebviewProps::HybridChartWebviewProps(const HybridChartWebviewProps& other):
150
+ react::ViewProps(),
151
+ uri(other.uri),
152
+ localBundle(other.localBundle),
153
+ entry(other.entry),
154
+ paramsJson(other.paramsJson),
155
+ bridgeScript(other.bridgeScript),
156
+ reuseKey(other.reuseKey),
157
+ pooled(other.pooled),
158
+ active(other.active),
159
+ onMessage(other.onMessage),
160
+ onLoadEnd(other.onLoadEnd),
161
+ onError(other.onError),
162
+ hybridRef(other.hybridRef) { }
163
+
164
+ bool HybridChartWebviewProps::filterObjectKeys(const std::string& propName) {
165
+ switch (hashString(propName)) {
166
+ case hashString("uri"): return true;
167
+ case hashString("localBundle"): return true;
168
+ case hashString("entry"): return true;
169
+ case hashString("paramsJson"): return true;
170
+ case hashString("bridgeScript"): return true;
171
+ case hashString("reuseKey"): return true;
172
+ case hashString("pooled"): return true;
173
+ case hashString("active"): return true;
174
+ case hashString("onMessage"): return true;
175
+ case hashString("onLoadEnd"): return true;
176
+ case hashString("onError"): return true;
177
+ case hashString("hybridRef"): return true;
178
+ default: return false;
179
+ }
180
+ }
181
+
182
+ HybridChartWebviewComponentDescriptor::HybridChartWebviewComponentDescriptor(const react::ComponentDescriptorParameters& parameters)
183
+ : ConcreteComponentDescriptor(parameters,
184
+ react::RawPropsParser(/* enableJsiParser */ true)) {}
185
+
186
+ std::shared_ptr<const react::Props> HybridChartWebviewComponentDescriptor::cloneProps(const react::PropsParserContext& context,
187
+ const std::shared_ptr<const react::Props>& props,
188
+ react::RawProps rawProps) const {
189
+ // 1. Prepare raw props parser
190
+ rawProps.parse(rawPropsParser_);
191
+ // 2. Copy props with Nitro's cached copy constructor
192
+ return HybridChartWebviewShadowNode::Props(context, /* & */ rawProps, props);
193
+ }
194
+
195
+ #ifdef ANDROID
196
+ void HybridChartWebviewComponentDescriptor::adopt(react::ShadowNode& shadowNode) const {
197
+ // This is called immediately after `ShadowNode` is created, cloned or in progress.
198
+ // On Android, we need to wrap props in our state, which gets routed through Java and later unwrapped in JNI/C++.
199
+ auto& concreteShadowNode = dynamic_cast<HybridChartWebviewShadowNode&>(shadowNode);
200
+ const HybridChartWebviewProps& props = concreteShadowNode.getConcreteProps();
201
+ HybridChartWebviewState state;
202
+ state.setProps(props);
203
+ concreteShadowNode.setStateData(std::move(state));
204
+ }
205
+ #endif
206
+
207
+ } // namespace margelo::nitro::chartwebview::views
@@ -0,0 +1,118 @@
1
+ ///
2
+ /// HybridChartWebviewComponent.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ #include <optional>
11
+ #include <NitroModules/NitroDefines.hpp>
12
+ #include <NitroModules/NitroHash.hpp>
13
+ #include <NitroModules/CachedProp.hpp>
14
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
+ #include <react/renderer/core/PropsParserContext.h>
16
+ #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
+ #include <react/renderer/components/view/ViewProps.h>
18
+
19
+ #include <string>
20
+ #include <optional>
21
+ #include <functional>
22
+ #include <memory>
23
+ #include "HybridChartWebviewSpec.hpp"
24
+
25
+ namespace margelo::nitro::chartwebview::views {
26
+
27
+ using namespace facebook;
28
+
29
+ /**
30
+ * The name of the actual native View.
31
+ */
32
+ extern const char HybridChartWebviewComponentName[];
33
+
34
+ /**
35
+ * Props for the "ChartWebview" View.
36
+ */
37
+ class HybridChartWebviewProps final: public react::ViewProps {
38
+ public:
39
+ HybridChartWebviewProps() = default;
40
+ HybridChartWebviewProps(const HybridChartWebviewProps&);
41
+ HybridChartWebviewProps(const react::PropsParserContext& context,
42
+ const HybridChartWebviewProps& sourceProps,
43
+ const react::RawProps& rawProps);
44
+
45
+ public:
46
+ CachedProp<std::optional<std::string>> uri;
47
+ CachedProp<std::optional<std::string>> localBundle;
48
+ CachedProp<std::optional<std::string>> entry;
49
+ CachedProp<std::optional<std::string>> paramsJson;
50
+ CachedProp<std::optional<std::string>> bridgeScript;
51
+ CachedProp<std::optional<std::string>> reuseKey;
52
+ CachedProp<std::optional<bool>> pooled;
53
+ CachedProp<std::optional<bool>> active;
54
+ CachedProp<std::optional<std::function<void(const std::string& /* message */)>>> onMessage;
55
+ CachedProp<std::optional<std::function<void()>>> onLoadEnd;
56
+ CachedProp<std::optional<std::function<void(const std::string& /* message */)>>> onError;
57
+ CachedProp<std::optional<std::function<void(const std::shared_ptr<HybridChartWebviewSpec>& /* ref */)>>> hybridRef;
58
+
59
+ private:
60
+ static bool filterObjectKeys(const std::string& propName);
61
+ };
62
+
63
+ /**
64
+ * State for the "ChartWebview" View.
65
+ */
66
+ class HybridChartWebviewState final {
67
+ public:
68
+ HybridChartWebviewState() = default;
69
+
70
+ public:
71
+ void setProps(const HybridChartWebviewProps& props) { _props.emplace(props); }
72
+ const std::optional<HybridChartWebviewProps>& getProps() const { return _props; }
73
+
74
+ public:
75
+ #ifdef ANDROID
76
+ HybridChartWebviewState(const HybridChartWebviewState& /* previousState */, folly::dynamic /* data */) {}
77
+ folly::dynamic getDynamic() const {
78
+ throw std::runtime_error("HybridChartWebviewState does not support folly!");
79
+ }
80
+ react::MapBuffer getMapBuffer() const {
81
+ throw std::runtime_error("HybridChartWebviewState does not support MapBuffer!");
82
+ };
83
+ #endif
84
+
85
+ private:
86
+ std::optional<HybridChartWebviewProps> _props;
87
+ };
88
+
89
+ /**
90
+ * The Shadow Node for the "ChartWebview" View.
91
+ */
92
+ using HybridChartWebviewShadowNode = react::ConcreteViewShadowNode<HybridChartWebviewComponentName /* "HybridChartWebview" */,
93
+ HybridChartWebviewProps /* custom props */,
94
+ react::ViewEventEmitter /* default */,
95
+ HybridChartWebviewState /* custom state */>;
96
+
97
+ /**
98
+ * The Component Descriptor for the "ChartWebview" View.
99
+ */
100
+ class HybridChartWebviewComponentDescriptor final: public react::ConcreteComponentDescriptor<HybridChartWebviewShadowNode> {
101
+ public:
102
+ HybridChartWebviewComponentDescriptor(const react::ComponentDescriptorParameters& parameters);
103
+
104
+ public:
105
+ /**
106
+ * A faster path for cloning props - reuses the caching logic from `HybridChartWebviewProps`.
107
+ */
108
+ std::shared_ptr<const react::Props> cloneProps(const react::PropsParserContext& context,
109
+ const std::shared_ptr<const react::Props>& props,
110
+ react::RawProps rawProps) const override;
111
+ #ifdef ANDROID
112
+ void adopt(react::ShadowNode& shadowNode) const override;
113
+ #endif
114
+ };
115
+
116
+ /* The actual view for "ChartWebview" needs to be implemented in platform-specific code. */
117
+
118
+ } // namespace margelo::nitro::chartwebview::views
@@ -0,0 +1,20 @@
1
+ {
2
+ "uiViewClassName": "ChartWebview",
3
+ "supportsRawText": false,
4
+ "bubblingEventTypes": {},
5
+ "directEventTypes": {},
6
+ "validAttributes": {
7
+ "uri": true,
8
+ "localBundle": true,
9
+ "entry": true,
10
+ "paramsJson": true,
11
+ "bridgeScript": true,
12
+ "reuseKey": true,
13
+ "pooled": true,
14
+ "active": true,
15
+ "onMessage": true,
16
+ "onLoadEnd": true,
17
+ "onError": true,
18
+ "hybridRef": true
19
+ }
20
+ }
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,21 @@
1
+ import type { HybridView, HybridViewMethods, HybridViewProps } from 'react-native-nitro-modules';
2
+ export interface ChartWebviewProps extends HybridViewProps {
3
+ uri?: string;
4
+ localBundle?: string;
5
+ entry?: string;
6
+ paramsJson?: string;
7
+ bridgeScript?: string;
8
+ reuseKey?: string;
9
+ pooled?: boolean;
10
+ active?: boolean;
11
+ onMessage?: (message: string) => void;
12
+ onLoadEnd?: () => void;
13
+ onError?: (message: string) => void;
14
+ }
15
+ export interface ChartWebviewMethods extends HybridViewMethods {
16
+ postMessage(message: string): void;
17
+ reload(): void;
18
+ clearSnapshot(): void;
19
+ }
20
+ export type ChartWebview = HybridView<ChartWebviewProps, ChartWebviewMethods>;
21
+ //# sourceMappingURL=ChartWebview.nitro.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartWebview.nitro.d.ts","sourceRoot":"","sources":["../../../src/ChartWebview.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EACjB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAKpC,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IAGxD,GAAG,CAAC,EAAE,MAAM,CAAC;IAIb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IAIf,UAAU,CAAC,EAAE,MAAM,CAAC;IAMpB,YAAY,CAAC,EAAE,MAAM,CAAC;IAItB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,MAAM,CAAC,EAAE,OAAO,CAAC;IAMjB,MAAM,CAAC,EAAE,OAAO,CAAC;IAIjB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAG5D,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,MAAM,IAAI,IAAI,CAAC;IAGf,aAAa,IAAI,IAAI,CAAC;CACvB;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const CHART_BRIDGE_JS = "(function(){\n if (window.__onekeyChartBridge) return; window.__onekeyChartBridge = true;\n var fwd = function(m){\n try { window.__chartNativePost(typeof m === 'string' ? m : JSON.stringify(m)); } catch (e) {}\n };\n window.$onekey = window.$onekey || {};\n window.$onekey.$private = window.$onekey.$private || {};\n window.$onekey.$private.request = function(m){ fwd(m); };\n window.ReactNativeWebView = window.ReactNativeWebView || {};\n window.ReactNativeWebView.postMessage = function(s){ fwd(String(s)); };\n window.addEventListener('message', function(e){\n try { var d = e && e.data; if (d && d.scope === '$private') fwd(d); } catch (err) {}\n });\n})();";
2
+ //# sourceMappingURL=bridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../../src/bridge.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,eAAe,2qBAatB,CAAC"}
@@ -0,0 +1,145 @@
1
+ import { type ComponentProps } from 'react';
2
+ import type { ChartWebviewMethods, ChartWebviewProps } from './ChartWebview.nitro';
3
+ export type { ChartWebviewMethods, ChartWebviewProps } from './ChartWebview.nitro';
4
+ export { CHART_BRIDGE_JS } from './bridge';
5
+ declare const NativeChartWebviewView: import("react-native-nitro-modules").ReactNativeView<ChartWebviewProps, ChartWebviewMethods>;
6
+ export declare function ChartWebviewView(props: ComponentProps<typeof NativeChartWebviewView>): import("react").FunctionComponentElement<Omit<{
7
+ hybridRef?: import("react-native-nitro-modules").NitroViewWrappedCallback<((ref: import("react-native-nitro-modules").HybridView<ChartWebviewProps, ChartWebviewMethods>) => void) | undefined> | undefined;
8
+ uri?: string | undefined;
9
+ localBundle?: string | undefined;
10
+ entry?: string | undefined;
11
+ paramsJson?: string | undefined;
12
+ bridgeScript?: string | undefined;
13
+ reuseKey?: string | undefined;
14
+ pooled?: boolean | undefined;
15
+ active?: boolean | undefined;
16
+ onMessage?: import("react-native-nitro-modules").NitroViewWrappedCallback<((message: string) => void) | undefined> | undefined;
17
+ onLoadEnd?: import("react-native-nitro-modules").NitroViewWrappedCallback<(() => void) | undefined> | undefined;
18
+ onError?: import("react-native-nitro-modules").NitroViewWrappedCallback<((message: string) => void) | undefined> | undefined;
19
+ } & Readonly<Omit<Readonly<{
20
+ onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
21
+ onAccessibilityTap?: (() => unknown) | undefined;
22
+ onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
23
+ onMagicTap?: (() => unknown) | undefined;
24
+ onAccessibilityEscape?: (() => unknown) | undefined;
25
+ }>, "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" | "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
+ onMoveShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
27
+ onMoveShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
28
+ onResponderGrant?: ((e: import("react-native").GestureResponderEvent) => void | boolean) | undefined;
29
+ onResponderMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
30
+ onResponderReject?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
31
+ onResponderRelease?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
32
+ onResponderStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
33
+ onResponderEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
34
+ onResponderTerminate?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
35
+ onResponderTerminationRequest?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
36
+ onStartShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
37
+ onStartShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
38
+ }>, "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" | "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<{
39
+ onMouseEnter?: ((event: import("react-native").MouseEvent) => void) | undefined;
40
+ onMouseLeave?: ((event: import("react-native").MouseEvent) => void) | undefined;
41
+ }>, "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" | "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<{
42
+ onClick?: ((event: import("react-native").PointerEvent) => void) | undefined;
43
+ onClickCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
44
+ onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
45
+ onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
46
+ onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
47
+ onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
48
+ onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
49
+ onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
50
+ onPointerCancel?: ((e: import("react-native").PointerEvent) => void) | undefined;
51
+ onPointerCancelCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
52
+ onPointerDown?: ((e: import("react-native").PointerEvent) => void) | undefined;
53
+ onPointerDownCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
54
+ onPointerUp?: ((e: import("react-native").PointerEvent) => void) | undefined;
55
+ onPointerUpCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
56
+ onPointerOver?: ((e: import("react-native").PointerEvent) => void) | undefined;
57
+ onPointerOverCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
58
+ onPointerOut?: ((e: import("react-native").PointerEvent) => void) | undefined;
59
+ onPointerOutCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
60
+ onGotPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
61
+ onGotPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
62
+ onLostPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
63
+ onLostPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
64
+ }>, "onClick" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "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
+ onBlur?: ((event: import("react-native").BlurEvent) => void) | undefined;
66
+ onBlurCapture?: ((event: import("react-native").BlurEvent) => void) | undefined;
67
+ onFocus?: ((event: import("react-native").FocusEvent) => void) | undefined;
68
+ onFocusCapture?: ((event: import("react-native").FocusEvent) => void) | undefined;
69
+ }>, "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<{
70
+ onTouchCancel?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
71
+ onTouchCancelCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
72
+ onTouchEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
73
+ onTouchEndCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
74
+ onTouchMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
75
+ onTouchMoveCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
76
+ onTouchStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
77
+ onTouchStartCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
78
+ }>, "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<{
79
+ nativeBackgroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
80
+ nativeForegroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
81
+ renderToHardwareTextureAndroid?: boolean | undefined;
82
+ hasTVPreferredFocus?: boolean | undefined;
83
+ nextFocusDown?: number | undefined;
84
+ nextFocusForward?: number | undefined;
85
+ nextFocusLeft?: number | undefined;
86
+ nextFocusRight?: number | undefined;
87
+ nextFocusUp?: number | undefined;
88
+ focusable?: boolean | undefined;
89
+ tabIndex?: 0 | -1;
90
+ onClick?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
91
+ }>, "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<{
92
+ shouldRasterizeIOS?: boolean | undefined;
93
+ }>, "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<{
94
+ accessibilityLabelledBy?: (string | undefined) | (Array<string> | undefined);
95
+ "aria-labelledby"?: string | undefined;
96
+ accessibilityLiveRegion?: ("none" | "polite" | "assertive") | undefined;
97
+ "aria-live"?: ("polite" | "assertive" | "off") | undefined;
98
+ importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
99
+ screenReaderFocusable?: boolean;
100
+ }>, "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<{
101
+ accessibilityIgnoresInvertColors?: boolean | undefined;
102
+ accessibilityViewIsModal?: boolean | undefined;
103
+ accessibilityShowsLargeContentViewer?: boolean | undefined;
104
+ accessibilityLargeContentTitle?: string | undefined;
105
+ "aria-modal"?: boolean | undefined;
106
+ accessibilityElementsHidden?: boolean | undefined;
107
+ accessibilityLanguage?: string | undefined;
108
+ accessibilityRespondsToUserInteraction?: boolean | undefined;
109
+ }>, "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"> & {
110
+ accessible?: boolean | undefined;
111
+ accessibilityLabel?: string | undefined;
112
+ accessibilityHint?: string | undefined;
113
+ "aria-label"?: string | undefined;
114
+ accessibilityRole?: import("react-native").AccessibilityRole | undefined;
115
+ role?: import("react-native").Role | undefined;
116
+ accessibilityState?: import("react-native").AccessibilityState | undefined;
117
+ accessibilityValue?: import("react-native").AccessibilityValue | undefined;
118
+ "aria-valuemax"?: import("react-native").AccessibilityValue["max"] | undefined;
119
+ "aria-valuemin"?: import("react-native").AccessibilityValue["min"] | undefined;
120
+ "aria-valuenow"?: import("react-native").AccessibilityValue["now"] | undefined;
121
+ "aria-valuetext"?: import("react-native").AccessibilityValue["text"] | undefined;
122
+ accessibilityActions?: ReadonlyArray<import("react-native/types_generated/Libraries/Components/View/ViewAccessibility").AccessibilityActionInfo> | undefined;
123
+ "aria-busy"?: boolean | undefined;
124
+ "aria-checked"?: (boolean | undefined) | "mixed";
125
+ "aria-disabled"?: boolean | undefined;
126
+ "aria-expanded"?: boolean | undefined;
127
+ "aria-selected"?: boolean | undefined;
128
+ "aria-hidden"?: boolean | undefined;
129
+ }>, "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
130
+ children?: React.ReactNode;
131
+ style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").ViewStyleProp | undefined;
132
+ collapsable?: boolean | undefined;
133
+ collapsableChildren?: boolean | undefined;
134
+ id?: string;
135
+ testID?: string | undefined;
136
+ nativeID?: string | undefined;
137
+ needsOffscreenAlphaCompositing?: boolean | undefined;
138
+ hitSlop?: import("react-native/types_generated/Libraries/StyleSheet/EdgeInsetsPropType").EdgeInsetsOrSizeProp | undefined;
139
+ pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
140
+ removeClippedSubviews?: boolean | undefined;
141
+ experimental_accessibilityOrder?: Array<string> | undefined;
142
+ }>, never>>, "ref"> & {
143
+ ref?: React.Ref<import("react-native").HostInstance>;
144
+ }>;
145
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGnF,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,QAAA,MAAM,sBAAsB,8FAG3B,CAAC;AAKF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,sBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEpF"}
package/nitro.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "cxxNamespace": ["chartwebview"],
3
+ "ios": {
4
+ "iosModuleName": "ChartWebview"
5
+ },
6
+ "android": {
7
+ "androidNamespace": ["chartwebview"],
8
+ "androidCxxLibName": "chartwebview"
9
+ },
10
+ "autolinking": {
11
+ "ChartWebview": {
12
+ "swift": "HybridChartWebview",
13
+ "kotlin": "HybridChartWebview"
14
+ }
15
+ },
16
+ "ignorePaths": ["node_modules"]
17
+ }